EXPERIMENT -
Aim – To plot a bode plot of an open loop transfer function.
Apparatus Required – MATLAB
Theory – The Bode plot or the Bode diagram consists of two plots –
Magnitude plot
Phase plot
In both the plots, x-axis represents angular frequency (logarithmic scale). Whereas, yaxis
represents the magnitude (linear scale) of open loop transfer function in the magnitude plot and
the phase angle (linear scale) of the open loop transfer function in the phase plot.
The magnitude of the open loop transfer function in dB is –
M=20log|G(jω)H(jω)|
The phase angle of the open loop transfer function in degrees is –
Φ=∠G(jω)H(jω)
Code –
Example . To plot bode plot of an open loop transfer function
1. G(s) = 50/(s^3+9s^2+30s+40)
2. G(s) = (4s+1)/(2s^4+3s^3+s^2)
3. G(s) = 80/(s(s+2)(s+20))
4. G(s) = 800/(s^2(s+10)(s+40))
1.
>> num = [50]
>> den = [1 9 30 40]
>> sys1= tf (num, den)
50
sys1 = -------------------------------------
(S^3+9 s^2 + 30 s + 40)
Continuous-time transfer function.
>> bode (sys1)
2.
>> sys2 = zpk([-0.25],[0,0,-2,-0.5],2)
2 (s + 0.25)
sys2= -------------------------
s^2 (s + 2) (s + 0.5)
Continuous-time zero/pole/gain model.
>> bode(sys2)
3.
>> sys3 = zpk([],[0,-2,-20],80)
80
sys3= -------------------------
s (s + 2) (s + 20)
Continuous-time zero/pole/gain model.
>> bode(sys3)
4.
>> sys4 = zpk([],[0,0,-10,-40],800)
800
sys4= -------------------------
s^2 (s + 10) (s + 40)
Continuous-time zero/pole/gain model.
>> bode(sys4)
Result –
Bode plot of an above open loop transfer function has been obtained
Procedure –
Use of MATLAB keywords must be true.