You are on page 1of 1

Bode diagram problem to find phase margin and gain margin using MATLAB script:

Consider the unity feedback system transfer function is,


K
G s 
s  s  2  s  50 
Where H  s   1

a) Consider the value of gain, K  1300


Determine the Transfer Function of the system
1300
G s 
s  s  2  s  50 
Gain margin and phase margin can be obtained by generating the bode plot of the
transfer function of the system
1300
The matlab transcipt for the bode plot of the transfer function G  s  
s  s  2  s  50 
is as follows:
>> s=tf('s');
>> K=1300;
>> G=K/(s*(s+2)*(s+50));
>> bode(G);
>> grid;
>> margin(G);
1300
The bode plot for the transfer function G  s   is shown in figure below:
s  s  2  s  50 

Therefore, from the MATLAB bode plot for the gain K  1300 ,
The gain margin is G.M.  12 dB
The phase margin is P.M.  16.6 degrees
The gain crossover frequency at phase margin is gc  4.89 rad/sec.

You might also like