Bode Plots
Bode Plots
Objectives:
The objectives of this experiment are to:
1. Plot Bode Diagrams and analyze stability.
2. Examine the relationship between open loop frequency
response and closed loop transient response.
3. Use frequency response to design the gain to meet
stability specification.
Introduction:
GM =0−|G ( jω)||ω π
PM =∠ G( jω)|ω −(−180 ° ) .
c
Figure 4.1: Gain and phase margins and System bandwidth on the
Bode Diagrams.
1000 K
G ( s )=
s (s+5)(s+20)
Solution:
10
G ( jω )=
jω ( jω5 +1)( 20jω +1)
Since, the system has a pole at the origin.
>> s=tf('s');
>> x=1000/(s*(s+5)*(s+20));
>> bode(x)
>> allmargin(x);
-50
-100
S y s te m: x
-150
-90 Ph a s e Ma r g in ( d e g ) : 2 2 .5
De la y Ma r g in ( s e c ) : 0 .0 6 4 7
A t f r e q u e n c y ( r a d /s e c ) : 6 .0 8
-135 Clo s e d L o o p S ta b le ? Y e s
Phas e (deg)
-180
-225
-270
-1 0 1 2 3
10 10 10 10 10
Fr e q u e n c y ( r a d /s e c )
>> sys=feedback(0.5*x,1)
>> step(sys)
System: sys
Peak amplitude: 1.28 Step Response
Overshoot
1.4 (%): 27.8
At time (sec): 0.761
1.2
System: sys System: sys
Settling Time (sec): 2.26 Final Value: 1
1
0.8
Amplitude
0.6
0.4
0.2
0
0 0.5 1 1.5 2 2.5 3 3.5
Time (sec)
Solution:
100
G ( jω )=
( jω2 +1)( jω
4
+1 )( 10jω +1)
Since, the system doesn’t have a pole nor a zero at the
origin.
S y s te m: x
B o d e Dia g r a m G a in Ma r g in ( d B ) : - 1 8
50 A t f r e q u e n c y ( r a d /s e c ) : 8 .2 5
Clo s e d L o o p S ta b le ? No
0
M a g n itu d e ( d B )
-50
-100
0
-90 S y s te m: x
Phas e (deg)
Ph a s e Ma r g in ( d e g ) : - 4 4 .4
De la y Ma r g in ( s e c ) : 0 .2 8 9
A t f r e q u e n c y ( r a d /s e c ) : 1 9
-180
Clo s e d L o o p S ta b le ? No
-270
-2 -1 0 1 2 3
10 10 10 10 10 10
Fr e q u e n c y ( r a d /s e c )
>> x1=800/((s+2)*(s+4)*(s+10));
>> allmargin(x1);
>> bode(x1)
B o d e Dia g r a m S y s te m : x 1
50 G a in M a r g in ( d B ) : 2 .0 2
A t f r e q u e n c y ( r a d /s e c ) : 8 .2 5
Clo s e d L o o p S ta b le ? Y e s
0
M a g n itu d e ( d B )
-50
-100
-150
0
S y s te m : x 1
Ph a s e M a r g in ( d e g ) : 7 .1 1
-90 De la y M a r g in ( s e c ) : 0 .0 1 6 8
Phas e (deg)
A t f r e q u e n c y ( r a d /s e c ) : 7 .3 9
Clo s e d L o o p S ta b le ? Y e s
-180
-270
-2 -1 0 1 2 3
10 10 10 10 10 10
Fr e q u e n c y ( r a d /s e c )
Example 4.3: Use MATLAB LTI Viewer with the Bode Plot
for a unity feedback system with:
50 K ( s+2 )
G ( s )=
( s2 +4 s +16 )
Solution:
G ( jω )=
6.25 ( jω2 +1)
( ( jω )2 4 jω
16
+
16
+1 )
Since, the system doesn’t have a pole nor a zero at the
origin.
>> bandwidth(x);
Bode Diagram
30
System: x
Frequency (rad/sec): 0.101 System: x
20 Magnitude (dB): 15.9 Frequency (rad/sec): 12.1
Magnitude (dB): 12.9
Magnitude (dB)
10
-10
45
0
Phase (deg)
System: x
Phase Margin (deg): 92.3
-45 Delay Margin (sec): 0.0321
At frequency (rad/sec): 50.2
Closed Loop Stable? Yes
-90
-1 0 1 2
10 10 10 10
Frequency (rad/sec)
Figure 4.8: LTI Viewer with Bode Plot diagram of Example 4.3.
>> % To obtain the closed loop step response when K =2 using LTI
Viewer %
>> sys=feedback(2*x,1);
>> ltiview(sys)
System: sys
Peak amplitude: 0.974
Overshoot (%): 5.21
At time (sec): 0.0675 Step Response System: sys
1
Final Value: 0.926
0.6
Amplitude
0.5
0.4
0.3
0.2
0.1
0
0 0.2 0.4 0.6 0.8 1 1.2
Time (sec)
K ( s−5 ) ( s−15)
G ( s )=
(s+1) ( s +10 ) (s+30)
Solution:
G ( jω )=
2.5 ( jω
5
−1)( −1 )
jω
15
>> s=tf('s');
>> x=10*(s-5)*(s-15)/((s+1)*(s+10)*(s+30));
>> bode(x)
>> allmargin(x)
Bode Diagram
10
0
Magnitude (dB)
-10 System: x
Gain Margin (dB): 3.92
At frequency (rad/sec): 5.1
-20
Closed Loop Stable? Yes
-30
System: x
Phase Margin (deg): 55.2
-40
360 Delay Margin (sec): 0.376
At frequency (rad/sec): 2.56
Closed Loop Stable? Yes
270
Phase (deg)
180
90
-90
-1 0 1 2 3
10 10 10 10 10
Frequency (rad/sec)
System: sys
Peak amplitude: 1.12
Overshoot (%): 57.2 Step Response
At 1.2
time (sec): 0.921
System: sys
0.8 Final Value: 0.714
0.4
0.2
-0.2
-0.4
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
Solution:
−0.3 jω
2e
G ( jω )=
( jω1 +1)( jω5 +1)
Since, the system doesn’t have a pole nor a zero at the
origin.
>> a=10;
>> bode(x)
>> allmargin(x);
Bode Diagram
20
0
Magnitude (dB)
-20 System: x
Gain Margin (dB): 8.08
-40 At frequency (rad/sec): 3.88
Closed Loop Stable? Yes
-60
-80
-100
0
System: x
Phase Margin (deg): 75.9
-5760 Delay Margin (sec): 0.819
Phase (deg)
-17280
-2 -1 0 1 2 3
10 10 10 10 10 10
Frequency (rad/sec)
System
Performance
K=10 K=8 K=4.5 K=2.5
Settling Time ( T s ¿ 3.42 sec 2.75 sec 2.19 sec 1.85 sec
K (s +1)
G ( s )=
( s−1 ) ( s−6 )
1. Using a Bode diagram for K = 8, determine the system
stability.
2. Using SISO Design Tool. Select a gain K so that the
phase margin is at least 45° .
----------------------------------------------------------------------------------------------------------
--
Homework 4.3: Consider two systems with transfer
function:
4 25
G 1 ( s )= 2
,G 2 ( s )= 2
s + 2 s+ 4 s +5 s +25
Using MATLAB: