Matlab Control Systems Question

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
1 reply · 6K views
mcfetridges
Messages
13
Reaction score
0
I am having a problem with plotting Bode plots in Matlab. We are required to plot a e^(-sT) (simple time shift) as a Bode plot. The "bode" function in Matlab requires either a TF, ZPK, SS, or FRD system as its first input. I cannot seem to find out how to plot the exponential. I can easily plot the normal transfer functions however. If anyone has any idea that would be great.

Stephen McFetridge
University of Alberta
 
Physics news on Phys.org
mcfetridges said:
I am having a problem with plotting Bode plots in Matlab. We are required to plot a e^(-sT) (simple time shift) as a Bode plot. The "bode" function in Matlab requires either a TF, ZPK, SS, or FRD system as its first input. I cannot seem to find out how to plot the exponential. I can easily plot the normal transfer functions however. If anyone has any idea that would be great.

Stephen McFetridge
University of Alberta
Define a frequency vector, for instance:
omega = 0.1:0.01:10
% omega goes from 0.1 rad/s to 10 rad/s by steps of o.o1 seconds.
Then define your function
H = exp(-i*omega*T)
where T is the known delay
The amplitude in dB is:
Amp = 20*log10(abs(H))
and the phase in radians
Phase = angle(H)
Now you can draw the Bode plots as
semilogx(omega, Amp)
semilogx(omega, Phase)