Control System Toolbox (Part-III) : 1 10/17/2018 Dept. of EEE, PUST
Control System Toolbox (Part-III) : 1 10/17/2018 Dept. of EEE, PUST
– Nyquist Plot
10( s 10)
G( s)
s( s 2)( s 5)
To obtain the bode plot use following MATLAB code
-50
-100
-90
Phase (deg)
-135
-180
-225
-1 0 1 2
10/17/2018 10 Dept. of EEE, PUST
10 10 10 4
Frequency (rad/s)
Bode Plots (for specific Frequency range)
10( s 10)
G( s)
s( s 2)( s 5)
To obtain the bode plot for specific frequency range
w=0.1:0.1:100;
num =10*[1 10];
den1= [1 0];
den2=[1 2];
den3=[1 5];
den12=conv(den1,den2);
den=conv(den12,den3);
bode(num,den,w)
grid on
10/17/2018 Dept. of EEE, PUST 5
Bode Plots (for specific Frequency range)
Bode Diagram
50
Magnitude (dB)
-50
-100
-90
Phase (deg)
-135
-180
-225
-1 0 1 2 3
10/17/2018 10 10 Dept. of EEE,10
PUST 10 10 6
Frequency (rad/s)
Bode Plots (with left hand arguments)
s 10 2
G( s) 2
5s 2s 25
2500
G( s)
s( s 5)( s 50)
To obtain the Nyquist plot use the following MATLAB code
num =2500;
den1= [1 0];
den2=[1 5];
den3=[1 50];
den12=conv(den1,den2);
den=conv(den12,den3);
nyquist(num,den)
10/17/2018 Dept. of EEE, PUST 10
Polar plots or Nyquist plot
Nyquist Diagram
40
30
20
-w
10
Imaginary Axis
-10
-20 w
-30
-40
-2.5 -2 -1.5 -1 -0.5 0
Real Axis
10/17/2018 Dept. of EEE, PUST 11
Polar plots or Nyquist plot
2500
G( s)
s( s 5)( s 50)
To adjust the default axes of Nyquist plot use axis command
num =2500;
den1= [1 0];
den2=[1 5];
den3=[1 50];
den12=conv(den1,den2);
den=conv(den12,den3);
nyquist(num,den)
axis([-2.5 0 -2 2])
10/17/2018 Dept. of EEE, PUST 12
grid on
Polar plots or Nyquist plot
Nyquist Diagram
2
2 dB 0 dB
1.5
-2 dB
4 dB
1 -4 dB
6 dB
-6 dB
0.5 10 dB -10 dB
Imaginary Axis
20 dB -20 dB
0
-0.5
-1
-1.5
-2
-2.5 -2 -1.5 -1 -0.5 0
10/17/2018 Dept. of EEE, PUST 13
Real Axis
Nyquist plot (Open-loop & Closed Loop Frequency Response )
Nyquist Diagram
2
2 dB 0 dB
1.5
-2 dB
4 dB
1 -4 dB
6 dB
-6 dB
0.5 10 dB -10 dB
Imaginary Axis
20 dB -20 dB
0
-1.5
-2
10/17/2018 -2.5 -2 Dept.
-1.5 of EEE, PUST
-1 -0.5 0 14
Real Axis
Polar plots or Nyquist plot
10( s 10)
G( s)
s( s 2)( s 5)
(i) Obtain the Nyquist plot of the following system (when w>0).
(ii) Determine the open-loop & closed-loop magnitude responses
when w=2.5 rad/sec
To obtain the gain margin and phase use the following mat
lab code.
2500
G( s)
s( s 5)( s 50)
num =2500;
den1= [1 0];
den2=[1 5];
den3=[1 50];
den12=conv(den1,den2);
den=conv(den12,den3)
[GM, PM, wp, wg]=margin(num,den)
10/17/2018 Dept. of EEE, PUST 16
Phase & Gain Margins
To obtain the gain margin and phase use the following mat lab code.
2500
G( s)
s( s 5)( s 50)
GM =
5.5000
num =2500;
PM =
den1= [1 0];
31.7124
den2=[1 5];
den3=[1 50];
wp =
den12=conv(den1,den2);
15.8114
den=conv(den12,den3)
[GM, PM, wp, wg]=margin(num,den)
10/17/2018 Dept. of EEE, PUST
wg = 17
6.2184
Phase & Gain Margins
To obtain the gain margin and phase use the following mat
lab code.
2500
G( s)
s( s 5)( s 50)
num =2500;
den1= [1 0];
den2=[1 5];
den3=[1 50];
den12=conv(den1,den2);
den=conv(den12,den3)
margin(num,den)
10/17/2018 Dept. of EEE, PUST 18
Phase & Gain Margins
Bode Diagram
Gm = 14.8 dB (at 15.8 rad/s) , Pm = 31.7 deg (at 6.22 rad/s)
0
Magnitude (dB)
-50
-100
-90
-135
Phase (deg)
-180
-225
-270
-1 0 1 2 3
10/17/2018 10 10 Dept. of EEE,10
PUST 10 10 19
Frequency (rad/s)
System Characteristics (Bode Plot)
20
Magnitude (dB)
0 k=10
K=100
-20
-40
0
Phase (deg)
-45
-90
-2 -1 0 1 2
10/17/2018
10 10 Dept. of EEE,
10 PUST 10 10 24
Frequency (rad/s)
Exercise#6
s = tf('s');
G = 1/(s*(s+7)*(s+11));
rlocus(G);
axis equal;