![Page 1: Lecture 8: Frequency Response Analysis and Stability 1](https://reader035.vdocuments.net/reader035/viewer/2022070414/5697c01c1a28abf838cd01ee/html5/thumbnails/1.jpg)
Lecture 8:
Frequency Response Analysis and Stability
1
![Page 2: Lecture 8: Frequency Response Analysis and Stability 1](https://reader035.vdocuments.net/reader035/viewer/2022070414/5697c01c1a28abf838cd01ee/html5/thumbnails/2.jpg)
Objectives
• Test system stability in the frequency domain using the Bode stability method.
• Explain the meaning of gain and phase margins.
2
![Page 3: Lecture 8: Frequency Response Analysis and Stability 1](https://reader035.vdocuments.net/reader035/viewer/2022070414/5697c01c1a28abf838cd01ee/html5/thumbnails/3.jpg)
Frequency Response: determines the response of systems variables to a sine input.
• Perfect sine disturbances occur frequently in plants
• We can learn useful generalizations about control performance and robustness.
Why do we study frequency response?
No!
Yes!
3
![Page 4: Lecture 8: Frequency Response Analysis and Stability 1](https://reader035.vdocuments.net/reader035/viewer/2022070414/5697c01c1a28abf838cd01ee/html5/thumbnails/4.jpg)
Frequency Response : Sine in sine out
How do we calculate the frequency response?
The frequency response can be calculated from the transfer function by setting s = j, with = frequency and j = complex variable.
4
![Page 5: Lecture 8: Frequency Response Analysis and Stability 1](https://reader035.vdocuments.net/reader035/viewer/2022070414/5697c01c1a28abf838cd01ee/html5/thumbnails/5.jpg)
0 1 2 3 4 5 6-0.4
-0.2
0
0.2
0.4
time
Y,
ou
tlet
fro
m s
yste
m
0 1 2 3 4 5 6-1
-0.5
0
0.5
1
time
U,
inle
t to
sys
tem
input
outputB
A
P
P’
Amplitude ratio = |Y(t)| max / |U(t)| max
Phase angle = phase difference between input and output
Frequency Response : Sine in sine out
5
![Page 6: Lecture 8: Frequency Response Analysis and Stability 1](https://reader035.vdocuments.net/reader035/viewer/2022070414/5697c01c1a28abf838cd01ee/html5/thumbnails/6.jpg)
Amplitude ratio = |Y(t)| max / |U(t)| max
Phase angle = phase difference between input and output
))(Re(
))(Im(tan)(angle Phase
))(Im())(Re()(Ratio Amp.
jG
jGjG
jGjGjGAR
1
22
These calculations are tedious by hand but easily performed in standard programming languages.
In most programming languages, the absolute value gives the magnitude of a complex number.
Frequency Response : Sine in sine out
6
![Page 7: Lecture 8: Frequency Response Analysis and Stability 1](https://reader035.vdocuments.net/reader035/viewer/2022070414/5697c01c1a28abf838cd01ee/html5/thumbnails/7.jpg)
Frequency response of mixing tank.
Time-domain behavior.
Bode Plot - Shows frequency response for a range of frequencies
•Log (AR) vs log()•Phase angle vs log()
7
![Page 8: Lecture 8: Frequency Response Analysis and Stability 1](https://reader035.vdocuments.net/reader035/viewer/2022070414/5697c01c1a28abf838cd01ee/html5/thumbnails/8.jpg)
TC
v1
v2
We influence stability when we implement control. How do we achieve the influence we want?
STABILITY
0 20 40 60 80
100
120-40
-20
0
20
0 20 40 60 80 100 120-0.2
0
0.2
0.4
0.6
0.8
or
No!
Yes!
8
![Page 9: Lecture 8: Frequency Response Analysis and Stability 1](https://reader035.vdocuments.net/reader035/viewer/2022070414/5697c01c1a28abf838cd01ee/html5/thumbnails/9.jpg)
First, let’s define stability: A system is stable if all bounded inputs to the system result in bounded outputs.
Feed
Vaporproduct
LiquidproductProcess
fluidSteam
F1
F2 F3
T1 T2
T3
T5
T4
T6 P1
L1
A1
L. Key
ProcessSampleInputs
SampleOutputs
0 0.5 1 1.5-1
-0.5
0
0.5
1
0 0.5 1 1.5-1
-0.5
0
0.5
1
bou
nd
edu
nb
oun
ded
bou
nd
edu
nb
oun
ded
9
![Page 10: Lecture 8: Frequency Response Analysis and Stability 1](https://reader035.vdocuments.net/reader035/viewer/2022070414/5697c01c1a28abf838cd01ee/html5/thumbnails/10.jpg)
STABILITY
Set point response
)()()()(
)()()(
)(
)(
sGsGsGsG
sGsGsG
sSP
sCV
Scvp
cvp
1
The denominator determines the stability of the closed-loop
feedback system!
Bode Stability Method
Calculating the roots is easy with standard software. However, if the equation has a dead time, the term e-s appears. Therefore, we need another method.
The method we will use next is the Bode Stability Method.
10
![Page 11: Lecture 8: Frequency Response Analysis and Stability 1](https://reader035.vdocuments.net/reader035/viewer/2022070414/5697c01c1a28abf838cd01ee/html5/thumbnails/11.jpg)
Bode Stability: To understand, let’s do a thought experiment
GP(s)Gv(s)GC(s)
GS(s)
CV(s)
CVm(s)
SP(s) E(s) MV(s) ++
+-
Loop open
11
![Page 12: Lecture 8: Frequency Response Analysis and Stability 1](https://reader035.vdocuments.net/reader035/viewer/2022070414/5697c01c1a28abf838cd01ee/html5/thumbnails/12.jpg)
GP(s)Gv(s)GC(s)
GS(s)
CV(s)
CVm(s)
SP(s) E(s) MV(s) +
++-
Loop closed
No forcing!!
GP(s)Gv(s)GC(s)
GS(s)
CV(s)
CVm(s)
SP(s) E(s) MV(s) +
++-
Loop closed
No forcing!!
Bode Stability: To understand, let’s do a thought experiment
Under what conditions is the system stable (unstable)?
Hint: think about the sine wave as it travels around the loop once.
12
![Page 13: Lecture 8: Frequency Response Analysis and Stability 1](https://reader035.vdocuments.net/reader035/viewer/2022070414/5697c01c1a28abf838cd01ee/html5/thumbnails/13.jpg)
GP(s)Gv(s)GC(s)
GS(s)
CV(s)
CVm(s)
SP(s) E(s) MV(s) +
++-
Loop closed
If the sine is larger in amplitude after one cycle; then it will increase each “time around” the loop. The system will be unstable.
Now: at what frequency does the sine most reinforce itself?
Bode Stability: To understand, let’s do a thought experiment
13
![Page 14: Lecture 8: Frequency Response Analysis and Stability 1](https://reader035.vdocuments.net/reader035/viewer/2022070414/5697c01c1a28abf838cd01ee/html5/thumbnails/14.jpg)
GP(s)Gv(s)GC(s)
GS(s)
CV(s)
CVm(s)
SP(s) E(s) MV(s) +
++-
Loop closed
When the sine has a lag of 180° due to element dynamics, the feedback will reinforce the oscillation (remember the - sign).
This is the critical or phase crossover frequency, pc.
Bode Stability: To understand, let’s do a thought experiment
14
![Page 15: Lecture 8: Frequency Response Analysis and Stability 1](https://reader035.vdocuments.net/reader035/viewer/2022070414/5697c01c1a28abf838cd01ee/html5/thumbnails/15.jpg)
Let’s put the results together. GOL(s) includes all elements in the closed loop.
At the critical frequency: GOL(jpc) = -180
The amplitude ratio: |GOL(jpc) | < 1 for stability
|GOL(jpc) | > 1 for instability
Bode Stability
15
The gain margin (GM) is defined as:
GM =
Hence, if the gain margin is less than 1 (negative in dB), the system is unstable.
![Page 16: Lecture 8: Frequency Response Analysis and Stability 1](https://reader035.vdocuments.net/reader035/viewer/2022070414/5697c01c1a28abf838cd01ee/html5/thumbnails/16.jpg)
Phase Margin
Another relevant term is the phase margin. To calculate it, we need to find the gain crossover frequency (gc) which is the frequency at which the open-loop gain crosses unity.
The phase margin (PM) is the distance between the open loop phase and -180 at frequency gc
If the phase margin is negative, the system is unstable.
16
)(180PM gcjG
![Page 17: Lecture 8: Frequency Response Analysis and Stability 1](https://reader035.vdocuments.net/reader035/viewer/2022070414/5697c01c1a28abf838cd01ee/html5/thumbnails/17.jpg)
Interpretation of Gain and Phase Margins
• The gain margin tells us the maximum proportional gain we are allowed to use without affecting system stability.
• The phase margin tells us the maximum additional phase (and also dead time) that can be added to the loop without affecting system stability.
The best way to understand the gain and phase margins is to try a numerical example!
17
![Page 18: Lecture 8: Frequency Response Analysis and Stability 1](https://reader035.vdocuments.net/reader035/viewer/2022070414/5697c01c1a28abf838cd01ee/html5/thumbnails/18.jpg)
Example
Find the gain and phase margin for the following process under proportional control. Is the system stable?
Find the delay margin as well.
18
.)1(
2)(
2se
ssG
![Page 19: Lecture 8: Frequency Response Analysis and Stability 1](https://reader035.vdocuments.net/reader035/viewer/2022070414/5697c01c1a28abf838cd01ee/html5/thumbnails/19.jpg)
Answer, continued
• To find the gain margin, we need the phase crossover frequency.
• At this frequency,
(system stable)• Therefore, the gain margin = 1/0.735 = 1.36 = 2.63 dB.
19
dB63.2
735.01
2)(
2
pcjG
rad/sec.31.1
.tan2)( 1
pc
pcpcpcjG
![Page 20: Lecture 8: Frequency Response Analysis and Stability 1](https://reader035.vdocuments.net/reader035/viewer/2022070414/5697c01c1a28abf838cd01ee/html5/thumbnails/20.jpg)
Answer, continued
• To find the phase margin, we need the gain crossover frequency.
• At this frequency,
20
rad/sec.1
11
2)(
2
gc
gcjG
.3.147
rad57.22
1
)1(tan21
)(tan2)(1
1
gcgcgcjG
![Page 21: Lecture 8: Frequency Response Analysis and Stability 1](https://reader035.vdocuments.net/reader035/viewer/2022070414/5697c01c1a28abf838cd01ee/html5/thumbnails/21.jpg)
Answer, continued
• Therefore, the phase margin (PM) is found as
• And the delay margin (DM) is obtained as
21
.rad57.0
7.32
3.147180PM
sec.57.0
PMDM
gc
![Page 22: Lecture 8: Frequency Response Analysis and Stability 1](https://reader035.vdocuments.net/reader035/viewer/2022070414/5697c01c1a28abf838cd01ee/html5/thumbnails/22.jpg)
s=tf(‘s’);
G=2/(s+1)^2*exp(-s);
margin(G)
We can check our result using the command “margin” in Matlab.
22
![Page 23: Lecture 8: Frequency Response Analysis and Stability 1](https://reader035.vdocuments.net/reader035/viewer/2022070414/5697c01c1a28abf838cd01ee/html5/thumbnails/23.jpg)
• Let us now use Simulink to understand the interpretation of gain margin and phase margins.
• For this purpose, we build the following model:
23
![Page 24: Lecture 8: Frequency Response Analysis and Stability 1](https://reader035.vdocuments.net/reader035/viewer/2022070414/5697c01c1a28abf838cd01ee/html5/thumbnails/24.jpg)
Closed-loop step response (original process with proportional controller gain = 1)
The system is stable.
24
![Page 25: Lecture 8: Frequency Response Analysis and Stability 1](https://reader035.vdocuments.net/reader035/viewer/2022070414/5697c01c1a28abf838cd01ee/html5/thumbnails/25.jpg)
Closed-loop step response with proportional controller of gain 1.4.
The system is
unstable.
Remember that the gain margin is 1.36.25
![Page 26: Lecture 8: Frequency Response Analysis and Stability 1](https://reader035.vdocuments.net/reader035/viewer/2022070414/5697c01c1a28abf838cd01ee/html5/thumbnails/26.jpg)
Closed-loop step response with proportional controller of gain 1 and additional delay of 0.6 sec.
Remember that the phase margin tells us that additional delay must not exceed 0.57.
The system is
unstable.
26