ECE 486 Control Systems
Lecture 16
Bode’s Gain-Phase Relationship
Last time, we discussed stability in terms of frequency response. More specifically, we can tell how far we are from instability by identifying gain margin and phase margin on Bode plots.
In this lecture, we will study Bode’s Gain-Phase Relationship and use this as a guideline to design controllers using frequency response. We need to understand the effect of various types of controllers (PD/lead, PI/lag etc.) on the closed loop performance by reading the open loop Bode plot. Then we will develop frequency response techniques for shaping transient and steady state response using dynamic compensation.
Recall the unity feedback configuration as shown in Figure 1.
Figure 1: Unity feedback configuration with open loop transfer function KG(s)
Assuming that G(s) is minimum-phase, i.e., it has no Right Half Plane zeros, we derived in Lecture 14 the following for the Bode plot of KG(s)
low freq. | real zero/pole | complex zero/pole | |
mag. (slope) | n | up/down by 1 | up/down by 2 |
phase | n×90∘ | up/down by 90∘ | up/down by 180∘ |
We can state this succinctly as follows,
Gain-Phase Relationship: Far enough from breakpoints, Phase≈Magnitude Slope×90∘.
This suggests the following rule of thumb.
- If M has slope −2 at ωc, by the above Gain-Phase relation, we have ϕ(ωc)=−180∘, thus no phase margin.
- If M has slope −1 at ωc, by the above Gain-Phase relation, we have ϕ(ωc)=−90∘, thus we have phase margin PM=90∘.
Figure 2: Gain-Phase relationship as design guideline
Other than what is shown in Figure 2, similar considerations may apply when magnitude plot has positive slopes depending on different transfer functions.
Gain-Phase Relationship and Bandwidth
By the design guideline above, when phase margin is 90∘,
{|KG(jωc)|=1∠G(jωc)=−90∘⟹KG(jωc)=−j.By the unity feedback configuration in Figure 1, we can evaluate the closed loop transfer function at s=jωc,
T(jωc)=KG(jωc)1+KG(jωc)=−j1−j.|T(jωc)|=|−j1−j|=1√2.⟹ωc=ωBW. (ωBW is bandwidth)Note though, |KG(jω)|→∞ as ω→0 if it has a Type 1 factor K0(jω)n as shown in its magnitude plot in Figure 2.
|T(0)|=limω→0|KG(jω)||1+KG(jω)|=1.Relationship between crossover frequency ωc and bandwidth ωBW:
- If PM=90∘, then ωc=ωBW.
- If PM<90∘, then ωc≤ωBW≤2ωc. (See FPE.)
Control Design Using Frequency Response
Bode’s Gain-Phase Relationship suggests that we can shape the time response of the closed loop system by choosing K or, more generally, a dynamic controller KD(s) to tune the Phase Margin.
In particular, from the quantitative Gain-Phase Relationship, we have
Magnitude slope at ωc=−1⟹Phase at ωc≈−90∘,
which gives us phase margin of 90∘ and consequently good damping.
Consider the following example. Let G(s)=1s2, a double integrator with unity feedback as shown in Figure 3.
Figure 3: Example of design using frequency response
Our objective is to design a controller KD(s) where K is some scalar gain, such that
- closed loop stability is guaranteed;
- the system enjoys good damping (will make this more precise in a bit);
- the system bandwidth ωBW≈0.5. It is always a closed-loop characteristic.
Then our naive strategy following the above Bode’s Gain-Phase Relationship would be
- if we manage slope of −1 in magnitude plot at ωc, then phase margin PM=90∘. So it implies good damping;
- if PM=90∘, then ωc=ωBW. By Equation (1), we want ωc≈0.5 by the specification.
Trials: First Attempt with P-Control
If we apply P-control, KD(s)=K. Then
D(s)=1⟹KD(s)G(s)=KG(s)=Ks2.
The Bode plot Figure 4 shows =−2 everywhere, so no phase margin.
Figure 4: Bode plot for the first attempt with P-control
It confirms what we already knew; P-control alone would not do the job since if we calculate the characteristic equation explicitly,
K+s2=0,then the closed loop poles are on the imaginary axis, i.e., not strictly stable.
Trials: Second Attempt with PD-Control
Now let’s try PD-control with
KD(s)=K(τs+1),where KP=K, KD=Kτ.
Then the open loop transfer function KD(s)G(s) becomes
KD(s)G(s)=K(τs+1)s2.
Its Bode plot interpretation is that PD controller introduces a Type 2 factor in the numerator, which pushes the slope up by 1.
Compared to Figure 4 when D(s)=1, now PD-control has the effect of pushing the slope in magnitude plot of KD(s)G(s) from −2 to −1 past the breakpoint ω=1/τ.
Figure 5: Bode plot for the second attempt with PD-control
For the Gain-Phase Relationship to be valid, choose the breakpoint several times smaller than desired ωc. For example, let’s take τ=10.
Then 1τ=0.1=ωc5.
Now the open loop transfer function becomes
KD(s)G(s)=K(10s+1)s2.
We want ωc≈0.5, therefore
M(j0.5)=1⟹|KD(j0.5)G(j0.5)|=1.⟹K|5j+1|0.52=4K√26≈20K=1.⟹K=120.Validation: Confirming Second Attempt with PD Control
With K=120, our PD controller becomes
KD(s)=10s+120.
What have we accomplished with this controller?
- PM≈90∘ at ωc=0.5.
- It still needs to be checked in Matlab and we need to iterate with different K’s if necessary.
Further we note several trade-offs here.
- We want ωBW to be large enough for fast response, but not too large in order to avoid noise amplification at high frequencies. Recall the first half of the statement from Lecture 13 that larger ωBW⟺ larger ωn⟺ smaller tr.
- PD control increases slope in magnitude plot ⟹ it increases ωc ⟹ it increases ωBW, hence faster response.
- But the usual caveat holds — D-control is not physically realizable, so we turn to its approximate lead compensation.
Lead Compensation in Bode Plot
We shall consider the lead controller in Equation (2) momentarily and return to our example with lead control design thereafter.
KD(s)=Ks+zs+p,p≫z.
Rewrite it in Bode form
KD(s)=Kz(sz+1)p(sp+1).
Or, absorbing zp into the overall gain, we have
KD(s)=K(sz+1)(sp+1).
There are two breakpoints
- Type 2 factor with a zero has a breakpoint at ω=z. Note we hit this breakpoint frequency first since z≪p.
- Type 2 factor with a pole has a breakpoint at ω=p.
Figure 6: Bode plot for lead controller Ks+zs+p
Figure 6 shows the Bode plot for lead control in Equation (2).
We see
- the magnitude levels off at high frequencies, i.e., minor noise amplification;
- it can bump up phase for some frequencies, hence the term phase lead.
Next we will look into the relationship between lead compensation and phase margin.
Figure 7: Bode plot for lead controller Ks+zs+p with ωc centered
As shown in Figure 7, for the best effect on phase margin, ωc should be halfway between z and p on the log scale plot. Therefore
logωc=logz+logp2,or ωc=√zp.This means we align the crossover frequency with the geometric mean of z and p.
By the phase plot in Figure 7, we want large difference p−z between z and p so that lead control can contribute a large phase bump which will be closer to 90∘.
But on the other hand it also means the “band” between z and p in the magnitude plot in Figure 7 becomes wider. It follows that it levels off only at larger frequencies, i.e., worse noise amplification.
Trials: Third Attempt with Lead Control
Now let’s return to our example of controlling G(s)=1s2. This time we use lead compensation.
With lead control, the magnitude Bode plot of KD(s)G(s) shall look like Figure 8.
Figure 8: Bode plot for KD(s)G(s) with lead control
The lead controller raises the slope of magnitude plot for some frequencies thus adding a lead controller will increase ωc.
Figure 9: Bode plot for KD(s)G(s) with lead control
For example, with lead controller where K=1/4,
- adding lead increases ωc;
- phase margin PM<90∘;
- bandwidth ωBW may be >ωc.
To be on the safe side, we choose another K so that
ωc=ωBW2.
Recall this is because generally ωc≤ωBW≤2ωc.
Thus, we want
ωc=0.25⟹K=116.
Next we pick z and p so that ωc is approximately their geometric mean, for example,
z=0.1,p=2.√z⋅p=√0.2≈0.447.Then the resulting lead controller is
KD(s)=116s0.1+1s2+1.As an alternative, what we did in the lecture was
- Based on ωc=0.25 and ωc=√zp, we obtained zp=116.
- To be on the safer side, we let the gap between breakpoints z and p be wide enough so that crossover frequency ωc is not close to either of them. For example, set z=0.01 and p=6.25.
- Lastly, computed the K based on |KD(ωc)G(ωc)|=1.
It may still need to be refined using Matlab though.
To recap, control design using frequency response follows the general design procedure below.
- Choose a K to get desired bandwidth specifically without lead component s+zs+p.
- Choose a lead zero and a pole to get desired phase margin.
- In general, we should first check PM with K from 1, without lead, to see how much more PM bump we need.
- Check design and iterate until specs are met.
We shall bear in mind that this is an intuitive procedure; it’s not very precise. Sometimes it requires several rounds of trial and error.