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.

Feedback and P-control

In this section, we make our first foray into feedback control. We have looked at first and second order systems and developed qualitative and quantitative measures of performance (settling time, overshoot, etc.). Now we will see how feedback control can be used to improve performance.

Standard feedback configuration

A general feedback configuration is shown in the block diagram below. The system we want to control has transfer function G(s)G(s).

General feedback configuration. The closed-loop system G_{\textsf{CL}}(s) is the system that maps the reference input r(t) to the output y(t).

Figure 1:General feedback configuration. The closed-loop system GCL(s)G_{\textsf{CL}}(s) is the system that maps the reference input r(t)r(t) to the output y(t)y(t).

The blocks of the diagram are as follows:

The transfer function from rr to yy is called the closed-loop transfer function and is denoted by GCL(s)G_{\textsf{CL}}(s). We can derive an expression for GCL(s)G_{\textsf{CL}}(s) by manipulating the block diagram as we saw in our earlier section on block diagrams. We just need to remember that block diagrams are nothing more than a visual representation of algebraic equations. We will drop the “(s)(s)” for brevity in the equations below.

E=FRHYU=CEY=GU\begin{aligned} E &= F R - H Y \\ U &= C E \\ Y &= G U \end{aligned}

Substituting the first equation into the second and the second into the third, we get:

Y=GC(FRHY).Y = G C (F R - H Y).

Now rearrange to find the closed-loop transfer function:

GCL=YR=GCF1+GCH.\boxed{ G_{\textsf{CL}} = \frac{Y}{R} = \frac{G C F}{1 + G C H}. }

Unity feedback

The most common feedback configuration is the one where F(s)=1F(s)=1 and H(s)=1H(s)=1, which is called unity feedback. In this case, the block diagram is

The standard unity feedback architecture. The closed-loop system G_{\textsf{CL}}(s) is the system that maps the reference input r(t) to the output y(t).

Figure 2:The standard unity feedback architecture. The closed-loop system GCL(s)G_{\textsf{CL}}(s) is the system that maps the reference input r(t)r(t) to the output y(t)y(t).

and the closed-loop transfer function simplifies to:

GCL=GC1+GC.\boxed{ G_{\textsf{CL}} = \frac{G C}{1 + G C}. }

Example: closed-loop system

Let’s find the closed-loop transfer function of the plant G(s)=s+2s2+s+1G(s) = \frac{s+2}{s^2+s+1} in unity feedback with compensator C(s)=1s+3C(s) = \frac{1}{s+3}.

Solution: The closed-loop transfer function is given by:

GCL=GC1+GC=s+2s2+s+11s+31+s+2s2+s+11s+3=s+2(s+3)(s2+s+1)+s+2=s+2s3+4s2+5s+5.\begin{aligned} G_{\textsf{CL}} &= \frac{G C}{1 + G C} = \frac{\frac{s+2}{s^2+s+1} \cdot \frac{1}{s+3}}{1 + \frac{s+2}{s^2+s+1} \cdot \frac{1}{s+3}} \\ &= \frac{s+2}{(s+3)(s^2+s+1) + s+2} \\ &= \frac{s+2}{s^3 + 4 s^2 + 5 s + 5}. \end{aligned}

P-control of a first-order system

Let’s suppose we have a first-order plant in canonical form and that the DC gain is K=1K=1. This assumption just simplifies the analysis and does not affect the generality of our conclusions. The plant is given by:

G(s)=1τs+1.G(s) = \frac{1}{\tau s + 1}.

The simplest type of controller is a proportional (P) controller, which has the form:

C(s)=kp,C(s) = k_p,

where kpk_p is a constant called the proportional gain. The intuition behind P-control is that our compensator measures the error and applies an input that is proportional to the error. If we use standard unity feedback as in Figure 2, the closed-loop transfer function for a P-controller applied to a first-order system is given by:

GCL=GC1+GC=kpτs+11+kpτs+1=kpτs+1+kp.\begin{aligned} G_{\textsf{CL}} &= \frac{G C}{1 + G C} = \frac{\frac{k_p}{\tau s + 1}}{1 + \frac{k_p}{\tau s + 1}} \\ &= \frac{k_p}{\tau s + 1 + k_p}. \end{aligned}

This is still a first-order system, but, its DC gain and time constant have changed. To see this, rewrite the closed-loop transfer function in canonical form:

GCL=kp1+kpτ1+kps+1\boxed{G_{\textsf{CL}} = \frac{\frac{k_p}{1+k_p}}{\frac{\tau}{1+k_p} s + 1}}

The time constant is now τ1+kp\frac{\tau}{1+k_p}, which is smaller than the original time constant τ\tau for any kp>0k_p > 0. This means that the closed-loop system will have a faster transient response (smaller settling time) than the open-loop system.

However, the DC gain is now kp1+kp\frac{k_p}{1+k_p}, which is less than 1 for any finite kpk_p. This means that the closed-loop system will have a steady-state error to a step input: It will not track the reference input perfectly. Here are plots of the step response of the closed-loop system for different values of kpk_p.

Step response of a first-order system with proportional control for different values of the proportional gain k_p. The dashed curve is the step response of the open-loop system. As k_p increases, the transient response gets faster (smaller settling time), but there is always a steady-state error (the final value is less than 1).

Figure 3:Step response of a first-order system with proportional control for different values of the proportional gain kpk_p. The dashed curve is the step response of the open-loop system. As kpk_p increases, the transient response gets faster (smaller settling time), but there is always a steady-state error (the final value is less than 1).

Pole-zero plot for first-order system

We can also look at how the pole location changes as we increase kpk_p. The closed-loop system (12) has a single pole at s=1+kpτs = -\frac{1+k_p}{\tau}. Therefore:

We can show this visually on the pole-zero plot by plotting the set of all possible locations of the closed-loop pole as we vary kp>0k_p > 0. This is called a root locus and will be covered in more detail in a later section. Here it is:

Root locus of a first-order system with proportional control. The blue \times shows the open-loop pole. The blue arrow shows how the closed-loop pole moves as k_p increases from 0 to \infty.

Figure 4:Root locus of a first-order system with proportional control. The blue ×\times shows the open-loop pole. The blue arrow shows how the closed-loop pole moves as kpk_p increases from 0 to \infty.

Eliminating steady-state error

We saw that proportional feedback control helps improve the transient response of the system, but it comes at the price of steady-state error. There are two simple ways to eliminate steady-state error, but both have serious drawbacks. The first way is to add a feedforward compensator F(s)F(s) as in Figure 1 that cancels the DC gain of the closed-loop system. The second is to simply make the gain kpk_p very large so the error goes to zero. This is known as a high-gain controller. We will see that both of these methods have serious drawbacks.

Feedforward compensation

One simple way to apparently eliminate steady-state error is to add a feedforward compensator F(s)F(s) as in Figure 1 that cancels the DC gain of the closed-loop system. For example, if we choose F(s)=1+kpkpF(s) = \frac{1+k_p}{k_p}, then the closed-loop transfer function becomes:

GCL=GCF1+GC=kpτs+11+kpkp1+kpτs+11+kpkp=1τ1+kps+1.\begin{aligned} G_{\textsf{CL}} &= \frac{G C F}{1 + G C} = \frac{\frac{k_p}{\tau s + 1} \cdot \frac{1+k_p}{k_p}}{1 + \frac{k_p}{\tau s + 1} \cdot \frac{1+k_p}{k_p}} \\ &= \frac{1}{\frac{\tau}{1+k_p} s + 1}. \end{aligned}

Now the DC gain is 1, so there is no steady-state error to a step input! However, this feedforward compensator is not very practical for two reasons:

We will see a more practical way to eliminate steady-state error in a later section when we introduce integral control. Integral control does not require perfect knowledge of the plant model and can also eliminate steady-state error caused by constant disturbances.

High-gain control

Based on our previous analysis, we can eliminate steady-state error by making kpk_p very large. This also has the benefit of making our transient response arbitrarily fast (settling time goes to zero). Alas, this is one of those “seems too good to be true” situations that is indeed too good to be true.

Returning to our shower control example from the start of the course, a high-gain controller would allow the shower to respond instantly to changes in the desired temperature! We know from experience and from physics that this can’t be possible.

High-gain controllers have several practical drawbacks:

For these reasons, high-gain control is not a practical way to eliminate steady-state error. In practice, we typically make kpk_p as large as it needs to be to achieve acceptable performance, but no larger. The more practical integral control mentioned earlier can achieve zero steady-state error without using excessively large inputs. We will cover this topic soon!

P-control of a second-order system

Now let’s see what happens when we apply proportional control to a second-order system. Consider a second-order plant in canonical form, again with DC gain K=1K=1 for simplicity:

G(s)=ωn2s2+2ζωns+ωn2.G(s) = \frac{\omega_n^2}{s^2 + 2\zeta\omega_n s + \omega_n^2}.

The closed-loop transfer function with proportional control is given by:

GCL=GC1+GC=kpωn2s2+2ζωns+ωn21+kpωn2s2+2ζωns+ωn2=kpωn2s2+2ζωns+ωn2+kpωn2=kpωn2s2+2ζωns+(1+kp)ωn2\begin{aligned} G_{\textsf{CL}} &= \frac{G C}{1 + G C} = \frac{\frac{k_p \omega_n^2}{s^2 + 2\zeta\omega_n s + \omega_n^2}}{1 + \frac{k_p \omega_n^2}{s^2 + 2\zeta\omega_n s + \omega_n^2}} \\ &= \frac{k_p \omega_n^2}{s^2 + 2\zeta\omega_n s + \omega_n^2 + k_p \omega_n^2} \\ &= \frac{k_p \omega_n^2}{s^2 + 2\zeta\omega_n s + (1+k_p)\omega_n^2} \end{aligned}

Once again, proportional control preserves the order of the system; the closed-loop system is still second-order. However, all the parameters have changed. In particular, the new parameters (K^,ω^n,ζ^)(\hat K, \hat \omega_n, \hat\zeta) satisfy:

K^ω^n2s2+2ζ^ω^ns+ω^n2=kpωn2s2+2ζωns+(1+kp)ωn2\frac{\hat K \hat \omega_n^2}{s^2 + 2\hat\zeta\hat\omega_n s + \hat \omega_n^2} = \frac{k_p \omega_n^2}{s^2 + 2\zeta\omega_n s + (1+k_p)\omega_n^2}

Which implies that

K^=kp1+kp,ω^n=ωn1+kp,ζ^=ζ1+kp.\hat K = \frac{k_p}{1+k_p}, \quad \hat \omega_n = \omega_n\sqrt{1+k_p} , \quad \hat \zeta = \frac{\zeta}{\sqrt{1+k_p}}.

So as with the first-order case, there is a steady-state error to a step input that diminishes as we increase kpk_p. The other parameters change in a more complicated way. The natural frequency ω^n\hat \omega_n increases with kpk_p, and the damping ratio ζ^\hat \zeta decreases with kpk_p. It is easier to see what happens if compute the poles of the closed-loop system explicitly. If we assume the system is underdamped to begin with (0ζ<10\leq \zeta < 1), then the poles are given by

s=ζωn±jωn1ζ2+kp.s = -\zeta \omega_n \pm j\omega_n \sqrt{1-\zeta^2 + k_p}.

Therefore, as we vary kpk_p, we observe the following:

We already saw what increasing the imaginary part of the poles does to the step response; see the second panel of Figure 6. However now, the DC gain is also changing. Here are plots of root locus and the closed-loop step response for different values of kpk_p to illustrate these effects. We assumed ζ=0.5\zeta=0.5 for the open-loop system.

Left: Root locus of a second-order system with proportional control. The blue \times shows the open-loop poles. The blue arrows show how the closed-loop poles move as k_p increases from 0 to \infty.
Right: The closed-loop step response for different values of k_p. Peak time decreases, overshoot increases, steady-state error decreases, and settling time remains constant as k_p increases.

Figure 5:Left: Root locus of a second-order system with proportional control. The blue ×\times shows the open-loop poles. The blue arrows show how the closed-loop poles move as kpk_p increases from 0 to \infty. Right: The closed-loop step response for different values of kpk_p. Peak time decreases, overshoot increases, steady-state error decreases, and settling time remains constant as kpk_p increases.

Interpretation of P-control error

We saw that first and second-order systems with proportional control have a steady-state error to a step input. What is the physical interpretation of this phenomenon? Here are two examples:

Shower control: The error e(t)e(t) is the difference between the desired temperature r(t)r(t) and the actual temperature y(t)y(t). The controller applies an input u(t)=ke(t)u(t) = k e(t) to the shower valve. Assuming a positive angle corresponds to more hot water, this will behave as intended; increasing temperature when it’s too cold and reducing temperature when it’s too hot. However, if we ever reach our desired temperature, the error goes to zero, so the controller chooses a knob angle of zero. If this angle happens to correspond to the temperature we want, then we are in luck. But if zero angle corresponds to a medium temperature and our reference is hot, then we will have a steady-state error and our shower will always run a bit cold.

Drone altitude control: The error e(t)e(t) is the difference between the desired altitude r(t)r(t) and the actual altitude y(t)y(t). The controller applies an input u(t)=ke(t)u(t) = k e(t) to the drone’s motors. Assuming a positive input corresponds to more thrust, this will behave as intended; increasing altitude when it’s too low and reducing altitude when it’s too high. However, if we ever reach our desired altitude, the error goes to zero, so the controller chooses an input of zero and the drone drops due to gravity. Again, we can never reach our desired altitude.


Test your knowledge

Solution to Exercise 1 #

We can find the closed-loop transfer function in steps. First, consider the inner loop. Its transfer function is given by:

Ginner=(forward path)1+(loop gain)=1s+41+1s+4k2=1s+4+k2.\begin{aligned} G_{\textsf{inner}} &= \frac{\textsf{(forward path)}}{1 + \textsf{(loop gain)}} \\ &= \frac{\frac{1}{s+4}}{1 + \frac{1}{s+4} \cdot k_2} = \frac{1}{s+4+k_2}. \end{aligned}

Now we can treat the inner loop as a single block with transfer function GinnerG_{\textsf{inner}}. The resulting block diagram is:

Simplification of  found by collapsing the inner loop.

Figure 7:Simplification of Figure 6 found by collapsing the inner loop.

The closed-loop transfer function of the system is given by:

GCL=(forward path)1+(loop gain)=k11s+4+k21s+11+k11s+4+k21s+1=k1(s+4+k2)(s+1)+k1=k1s2+(5+k2)s+(4+k2+k1)\begin{aligned} G_{\textsf{CL}} &= \frac{\textsf{(forward path)}}{1 + \textsf{(loop gain)}} \\ &= \frac{k_1 \cdot \frac{1}{s+4+k_2} \cdot \frac{1}{s+1}}{1 + k_1 \cdot \frac{1}{s+4+k_2} \cdot \frac{1}{s+1}} \\ &= \frac{k_1}{(s+4+k_2)(s+1) + k_1} \\ &= \frac{k_1}{s^2 + (5+k_2)s + (4+k_2 + k_1)} \end{aligned}

To place the closed-loop poles at s=2±2js=-2 \pm 2j, the characteristic polynomial must be (s+2)2+(2)2=s2+4s+8(s+2)^2 + (2)^2 = s^2 + 4s + 8. Therefore, we need to match coefficients:

5+k2=44+k2+k1=8\begin{aligned}5 + k_2 &= 4 \\ 4 + k_2 + k_1 &= 8 \end{aligned}

which implies that k2=1k_2 = -1 and k1=5k_1 = 5. The resulting closed-loop transfer function is:

GCL=5s2+4s+8.G_{\textsf{CL}} = \frac{5}{s^2 + 4s + 8}.

The DC gain is therefore 5/85/8.