lecture 8: frequency response analysis and stability 1
TRANSCRIPT
Lecture 8:
Frequency Response Analysis and Stability
1
Objectives
• Test system stability in the frequency domain using the Bode stability method.
• Explain the meaning of gain and phase margins.
2
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
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
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
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
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
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
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
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
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
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
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
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
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.
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
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
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
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
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
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
s=tf(‘s’);
G=2/(s+1)^2*exp(-s);
margin(G)
We can check our result using the command “margin” in Matlab.
22
• Let us now use Simulink to understand the interpretation of gain margin and phase margins.
• For this purpose, we build the following model:
23
Closed-loop step response (original process with proportional controller gain = 1)
The system is stable.
24
Closed-loop step response with proportional controller of gain 1.4.
The system is
unstable.
Remember that the gain margin is 1.36.25
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