Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Frequency-domain design

So far, we have seen how to analyze the frequency response of a plant G(s)G(s) by examining its Bode plot. If we use feedback compensation to change the system’s transfer function, then we are designing a compensator C(s)C(s) and our resulting closed-loop system has transfer function

T(s)=C(s)G(s)1+C(s)G(s)=L(s)1+L(s)T(s) = \frac{C(s)G(s)}{1 + C(s)G(s)} = \frac{L(s)}{1+L(s)}

Where we define the loop transfer function L(s)=C(s)G(s)L(s) = C(s)G(s).

What matters is closed-loop performance, i.e., the frequency response of T(s)T(s). However, T(s)T(s) depends on C(s)C(s) in a complicated way, so our approach will be to:

  1. Decide what we want the Bode plot of T(s)T(s) to look like.

  2. Infer what the Bode plot of L(s)L(s) should look like to achieve the desired T(s)T(s).

  3. Design C(s)C(s) so that the Bode plot of L(s)=C(s)G(s)L(s) = C(s)G(s) has the desired shape.

The last step is easy because of the decomposition of bode plots property. We can make the Bode plot of L(s)L(s) by summing the Bode plots of C(s)C(s) and G(s)G(s). So if we know what we want the Bode plot of L(s)L(s) to look like, we can design C(s)C(s) accordingly.

This means we can do our design by only looking at the Bode plot of our open-loop plant G(s)G(s). This technique is called loop shaping and is a powerful tool for control design.

Closed-loop performance

We’ll start with a block diagram that includes some extra disturbance inputs:

Block diagram for control design, including reference input r, disturbance input d, and measurement noise n. The loop transfer function is L(s) = C(s)G(s).

Figure 1:Block diagram for control design, including reference input rr, disturbance input dd, and measurement noise nn. The loop transfer function is L(s)=C(s)G(s)L(s) = C(s)G(s).

Writing the equations for the block diagram, we have:

y=Le+de=r(y+n)\begin{aligned} y &= Le + d \\ e &= r - (y + n)\\ \end{aligned}

Eliminating ee and solving for yy in terms of rr, dd, and nn, we have:

y=(L1+L)Tr  +  (11+L)Sd    (L1+L)Tny = \underbrace{\left(\frac{L}{1+L}\right)}_T r \;+\; \underbrace{\left(\frac{1}{1+L}\right)}_S d \;-\; \underbrace{\left(\frac{L}{1+L}\right)}_T n

The transfer function S(s)S(s) is called the sensitivity function and the transfer function T(s)T(s) is called the complementary sensitivity function. Note that TT is same closed-loop transfer function we defined in Eq. (1). Meanwhile, SS is the transfer function from dd to yy. It is also the transfer function from rr to ee, as we saw in the section on steady-state error.

In most systems, we want the following:

Therefore, the ideal (closed-loop) magnitude Bode plot looks something like this:

Ideal closed-loop Bode magnitude plot.

Figure 2:Ideal closed-loop Bode magnitude plot.

What happens in the intermediate frequency range? This brings us to the concept of bandwidth, which we will now discuss.

Bandwidth

The frequency at which the closed-loop Bode plot starts to roll off is called the bandwidth of the system. The technical definition is the frequency at which T(jω)|T(j\omega)| drops to 3 dB below the low-frequency magnitude. We labeled it ωb\omega_b in Figure 2.

A nice property of bandwidth is that for a first-order system, the bandwidth is the same as the corner frequency. To see why, assume a first-order system Kτs+1\frac{K}{\tau s + 1}. The corner frequency is ω=1/τ\omega = 1/\tau. At this frequency, the magnitude is

Kjωτ+1=Kj+1=K2\left|\frac{K}{j\omega \tau + 1}\right| = \left|\frac{K}{j + 1}\right| = \frac{|K|}{\sqrt{2}}

So at ω=1/τ\omega = 1/\tau, the magnitude has dropped by a factor of 2\sqrt{2} compared to its DC gain.

Bandwidth is an important concept because it gives us a single number that captures the trade-off between tracking and noise rejection.

Open-loop performance

Now that we know what we want the closed-loop Bode plot to look like, let’s think about how to achieve it. We start by looking at the relationship between the loop gain L(s)=C(s)G(s)L(s) = C(s)G(s) and the closed-loop transfer functions T(s)T(s). We have:

T(s)=L(s)1+L(s)T(s) = \frac{L(s)}{1+L(s)}

The relationship between the magnitudes L(jω)|L(j\omega)| and T(jω)|T(j\omega)| is most clear when we separate the cases where L(jω)1|L(j\omega)| \gg 1 or L(jω)1|L(j\omega)| \ll 1 or L(jω)1|L(j\omega)| \approx 1. So let’s look at these three cases separately.

Finally, the slope at the gain crossover also matters.

So the slope shouldn’t be too shallow or too steep. A good rule of thumb is to aim for a slope of -20 dB/decade at the gain crossover. This ensures a healthy PM\PM of around 90° and that the bandwidth is robust to small changes in gain. We can summarize all of our design goals in the following open-loop Bode magnitude plot:

Ideal open-loop Bode magnitude plot.

Figure 3:Ideal open-loop Bode magnitude plot.

We can easily tune the gain crossover frequency (and hence the bandwidth) by adjusting our proportional gain. A larger gain moves the magnitude plot up, which tends to increase the gain crossover frequency and hence the bandwidth. If the slope is -20 dB/decade at the gain crossover, then increasing KK by 20 dB will increase the bandwidth by one decade. In other words, increasing proportional gain by a factor α\alpha will increase the bandwidth by a factor of α\alpha.

Time domain performance

We can draw useful parallels (and equations!) between time-domain and frequency-domain performance. As an approximation, let’s assume that our closed-loop system has a DC gain of 1 (as in Figure 2) and is governed by a pair of dominant poles, so its response is approximately that of a first-order or second-order system.

Bandwidth and settling time

Settling time is related to the real part of the dominant poles. For a first-order system, we have ts4τ=4ωbt_s \approx 4\tau = \frac{4}{\omega_b}, where ωb\omega_b is the corner frequency (and bandwidth!). For a second-order system, we have ts4ζωnt_s \approx \frac{4}{\zeta\omega_n}. We also know that ωn\omega_n is the corner frequency for the Bode plot of a second-order system, which isn’t exactly the bandwidth, but is a decent approximation for underdamped systems. So we can write:

ωb4ts(first-order system)ωb4ζts(second-order system)\boxed{\begin{aligned} \omega_b &\approx \frac{4}{t_s} && \textsf{(first-order system)} \\ \omega_b &\approx \frac{4}{\zeta t_s} && \textsf{(second-order system)} \end{aligned}}

So bandwidth governs speed of response. There is a more exact relationship between bandwidth and settling time for a second-order system, which we derive in Exercise 1.

This means that if we know a desired settling time for our system, this gives us an approximate target for our bandwidth.

Phase margin and damping

Both phase margin and damping ratio (or percent overshoot) are measures of how close a system is to instability. The instability threshold is when the closed-loop system has a purely imaginary pole. With root locus, we observed this as poles “crossing into the RHP”.

It turns out there is an approximate relationship between phase margin and damping ratio. If the closed-loop system has a DC gain of 1 and a dominant pair of complex poles, then the damping ratio ζ\zeta of these dominant poles is related to the phase margin PM\PM (measured in degrees on the open-loop Bode plot) as:

ζPM100°\boxed{ \zeta \approx \frac{\PM}{100\degree} }

So phase margin governs damping of response. If you’re curious about where this relationship comes from, expand the derivation below for more details.

This means that in many cases, phase margin can directly tell us about damping ratio and hence percent overshoot. For example, using the plot relating MpM_p and ζ\zeta, see that:

We can also combine the formulas (8) and (9) to obtain for example formulas for required bandwidth and phase margin as a function of desired settling time and percent overshoot.

Summary of design goals

Now that we know what the Bode plot of the loop gain L(s)=C(s)G(s)L(s) = C(s)G(s) should look like to achieve desirable closed-loop performance, the next step is to design C(s)C(s) so that L(s)L(s) has the desired Bode plot.

Frequency-domain PID

We already have a solid intuition for how PID control affects the time-domain response of a system. Now let’s revisit PID control in the context of frequency response and loop-shaping. Compensator design is a game of trade-offs, so for each case, we will indicate which properties are benefits (🟢), neutral (⚪), or drawbacks (🔴).

P control

Increasing the proportional gain simply shifts the magnitude plot of G(s)G(s) upwards. This typically has the following effects:

The net result is typically a faster system with increased sensitivity to noise, delays, and unmodeled dynamics. This is a common trade-off in control design: increasing bandwidth typically reduces robustness. Reducing the proportional gain has the opposite effect: it reduces bandwidth and improves robustness.

PI control

A PI controller takes the form C(s)=K(s+a)sC(s) = \frac{K(s+a)}{s}. Here is its Bode plot:

This Bode plot will get added to the Bode plot of G(s)G(s) to obtain L(s)L(s). This can affect the loop gain in several ways:

PD control

A PD controller takes the form C(s)=K(s+b)bC(s) = \frac{K(s+b)}{b}. We normalized by bb so that the DC gain would be KK. Here is what the Bode plot looks like:

This can affect the loop gain in several ways:

PID control

A PID controller takes the form C(s)=K(s+a)(s+b)sbC(s) = K\frac{(s+a)(s+b)}{s\cdot b}. This is just the product of the PI and PD controllers with a common KK value. It’s also possible to make a PID controller with complex zeros, but we’ll stick with this simpler form for now. Here is the Bode plot (assuming a<ba < b):

The PID controller combines the effects of P, I, and D control, so it can have both benefits and drawbacks. The integrator can improve low-frequency tracking and disturbance rejection, but it can also reduce phase margin. The derivative term can increase phase margin, but it can also amplify noise at high frequencies.

In the next section, we look at lead and lag compensators, which are yet another design choice when it comes to shaping the Bode plot of L(s)L(s).


Test your knowledge

Solution to Exercise 1 #

We calculated the magnitude of the frequency response for a second-order system in the section on second-order Bode plots. The bandwidth is where the magnitude drops to -3 dB compared to the DC gain. Since our DC gain is 1, this means a magnitude of 12\frac{1}{\sqrt{2}}. This leads us to the equation:

14ζ2(ωωn)2+(1(ωωn)2)2=12\frac{1}{\sqrt{4\zeta^2 \bigl(\frac{\omega}{\omega_n}\bigr)^2 + \Bigl(1 - \bigl(\frac{\omega}{\omega_n}\bigr)^2\Bigr)^2}} = \frac{1}{\sqrt{2}}

We can tackle the second part first; when is ωn\omega_n a good approximation for ωb\omega_b? Substituting in ω=ωn\omega=\omega_n, we have:

14ζ2+0=12ζ=12\frac{1}{\sqrt{4\zeta^2 + 0}} = \frac{1}{2\zeta} = \frac{1}{\sqrt{2}}

So ωn\omega_n is a good approximation for ωb\omega_b when 2ζ=22\zeta = \sqrt{2}, or ζ=120.707\zeta = \frac{1}{\sqrt{2}} \approx 0.707. This is precisely the damping ratio at which the system loses its resonant peak! Let’s now solve for the exact formula for ωb\omega_b in general.

Let’s define x=(ωωn)2x = \left(\frac{\omega}{\omega_n}\right)^2. Then we can rearrange the equation to get:

(1x)2+4ζ2x=2(1-x)^2 + 4\zeta^2 x = 2

Rearranging further, we have:

x22(12ζ2)x1=0x^2 - 2(1-2\zeta^2)x - 1 = 0

Using the quadratic formula, we have:

x=(12ζ2)±(12ζ2)2+1x = (1-2\zeta^2) \pm \sqrt{(1-2\zeta^2)^2 + 1}

We should ignore the negative solution, since xx is positive based on how it was defined. Substituting back in, we have:

ωb=ωn12ζ2+4ζ44ζ2+2\omega_b = \omega_n \sqrt{1-2\zeta^2 + \sqrt{4\zeta^4-4\zeta^2 + 2}}

We can check that the big square root simplifies to 1 when ζ=12\zeta = \frac{1}{\sqrt{2}}, as we previously determined. In general, the approximation ωbωn\omega_b \approx \omega_n is decent for underdamped systems, but not great for overdamped systems. Here is a plot showing how the true bandwidth varies as a function of damping ratio:

Bandwidth of a second-order system as a function of damping ratio

Figure 8:Bandwidth of a second-order system as a function of damping ratio

Therefore, if we want a more accurate estimate of the relationship between bandwidth and settling time than the one from Eq. (8), we can write:

ωb4ζts12ζ2+4ζ44ζ2+2\omega_b \approx \frac{4}{\zeta \, t_s}\cdot \sqrt{1-2\zeta^2 + \sqrt{4\zeta^4-4\zeta^2 + 2}}