MATLAB Matlab Control Systems Question

Click For Summary
The discussion focuses on plotting Bode plots for the function e^(-sT) in MATLAB, which represents a simple time shift. The "bode" function requires a transfer function (TF), zero-pole-gain (ZPK), state-space (SS), or frequency response data (FRD) as input, making it challenging to plot the exponential function directly. A solution is provided by defining a frequency vector and calculating the function H as H = exp(-i*omega*T), where T is the time delay. The amplitude in decibels is computed using Amp = 20*log10(abs(H)), and the phase is determined with Phase = angle(H). Finally, Bode plots can be created using semilogx for both amplitude and phase.
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)
 

Similar threads

  • · Replies 11 ·
Replies
11
Views
4K
  • · Replies 7 ·
Replies
7
Views
3K
Replies
2
Views
1K
Replies
1
Views
2K
Replies
1
Views
4K
  • · Replies 2 ·
Replies
2
Views
6K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 13 ·
Replies
13
Views
2K