x
e
w
y
H
+ K / s + K s
H
1
1( s) = K 1
2
3
2( s) = Ms 2 + Ds + C
!
PID controller
Plant
H
H =
1 H 2
1 + H 1 H 2
Figure 14.13: The mass-spring-damper system composed with a PID controller
in a feedback composition.
We can correct for the slow response and the large overshoot, using a PID controller.
The term ‘PID’ stands for proportional plus integral plus derivative. A PID controller
generalizes the P controller of the previous section by adding an integral and derivative
term.
The general form of the transfer function of a PID controller is
K
K
ˆ
2
3s2 + K1s + K2
H1(s) = K1 +
+ K3s =
.
(14.9)
s
s
We will compose this with the plant in a feedback loop, as shown in Figure 14.13. Here
K1, K2, K3 are constants to be selected by the designer. If K2 = K3 = 0, then we have a
P controller. If K1 = K3 = 0, ˆ
H1(s) = K2/s, we have an integral contoller, so called
because 1/s is the transfer function of an integrator. That is, if the input to the integral
controller is e, and the output is w, then
Z t
∀ t, w(t) = K2
e(τ)dτ.
−∞
If K1 = K2 = 0, ˆ
H2(s) = K3s, then we have a derivative controller, so called because s is
the transfer function of a differentiator. That is, if the input to the derivative controller is
e, and the output is w, then
∀ t, w(t) = K3 ˙e(t).
The following table offers guidelines for selecting the parameters of a PID controller.
Of course, these are guidelines only—the actual performance of the closed loop system
depends on the plant transfer function and must be checked in detail.
Lee & Varaiya, Signals and Systems
641
14.4. PID CONTROLLERS
Parameter
Response speed
Overshoot
Steady-state error
K1
Faster
Larger
Decreases
K2
Faster
Larger
Zero
K3
Minor change
Smaller
Minor change
Example 14.22:
We now evaluate a PID controller for the mass-spring-damper
system of Figure 14.11, using the feedback composition of Figure 14.6. We assume the parameters values M = 1, D = 1, and C = 1.25, as in example 14.21. The
closed-loop transfer function with the PID controller is
ˆ
H
K
ˆ
1(s) ˆ
H2(s)
3s2 + K1s + K2
H(s) =
=
.
1 + ˆ
H1(s) ˆ
H2(s)
s3 + (1 + K3)s2 + (1.25 + K1)s + K2
Suppose we provide as input a unit step. This means that we wish to move the mass
to the right one unit of distance, starting at time t = 0. The controller will attempt
to track this input. The response to a unit step input has Laplace transform
K
ˆ
3s2 + K1s + K2
Ypid(s) = ˆ
H(s) · 1 =
· 1 .
(14.10)
s
s3 + (1 + K3)s2 + (1.25 + K1)s + K2 s
We now need to select the values for the parameters of the PID controller, K1, K2,
and K3. We first try proportional control with K1 = 10, and K2 = K3 = 0. In this
case, the step response has the Laplace transform
10
ˆ
Yp(s) =
· 1 .
s2 + s + 11.25 s
The inverse Laplace transform gives the time response yp, which is plotted in Figure
14.14. The steady-state value is determined by the DC gain of the closed loop
transfer function,
10
10
=
≈ 0.89.
s2 + s + 11.25
11.25
s=0
This yields an error of 11 percent, and the overshoot of 50 percent is much worse
than that of the open-loop response yo, also shown in the figure. Thus, a P controller
with gain K = 10 is useless for this application.
Following the guidelines in the table above, we add derivative control to reduce the
overshoot. The result is a so-called PD controller, because it adds a proportional
642
Lee & Varaiya, Signals and Systems
14. COMPOSITION AND FEEDBACK CONTROL
1.5
yp
yo
ypid
1
ypd
0.5
00
2
4
6
8
10
12
14
16
18
20
Figure 14.14: The step response for open loop, yo, with P-control, yp, PD-control,
ypd, and PID-control, ypid .
Lee & Varaiya, Signals and Systems
643
14.5. SUMMARY
and a derivative term. For the PD controller we choose K1 = 10 and K3 = 10.
Substitution in (14.10) gives the Laplace transform of the step response,
10s + 10
ˆ
Ypd(s) =
· 1 .
s2 + 11s + 11.25 s
The steady-state value is given by the DC gain of the closed loop transfer function,
10s + 10
≈ 0.89,
s2 + 11s + 11.25 s=0
which is the same as the steady-state value for the P controller. The inverse Laplace
transform gives the time response ypd, which is plotted in Figure 14.14. The
overshoot is reduced to 10 percent—a large improvement. Also, the response is
quicker—the transient disappears in about 4 time units.
Finally, to eliminate the steady-state error we add integral control. For the PID
controller we choose K1 = 10, K2 = 5, K3 = 10. Substitution in (14.10) gives the
Laplace transform of the step response
10s2 + 10s + 5
ˆ
Ypid(s) =
· 1 .
s3 + 11s2 + 11.25s + 5 s
The steady-state value is again given by the DC gain of the closed loop transfer
function,
10s2 + 10s + 5
= 1.
s3 + 11s2 + 11.25s + 5 s=0
So the steady-state error is eliminated, as expected. The time response ypid is
plotted in Figure 14.14. It shows significant improvement over the other responses.
There is no overshoot, and the transient disappears in about 4 time units. Further
tuning of the parameters K1, K2, K3 could yield small improvements.
14.5
Summary
This chapter considers cascade, parallel, and feedback compositions of LTI systems de-
scribed by Z or Laplace transforms. Cascade composition is applied to equalization,
644
Lee & Varaiya, Signals and Systems
14. COMPOSITION AND FEEDBACK CONTROL
parallel composition is applied to noise cancellation, and feedback composition is applied
to control.
Because we are using Z and Laplace transforms rather than Fourier transforms, we are
able to consider unstable systems. In particular, we find that while, in principle, cas-
cade and parallel compositions can be used to stabilize unstable systems, the result is
not robust. Small changes in parameter values can result in the system being once again
unstable. Feedback composition, on the other hand, can be used to robustly stabilize
unstable systems. We illustrate this first with a simple helicopter example. The second
example, a DC motor, benefits from more sophisticated controllers. The third example, a
mass-spring-damper system, motivates the development of the well-known PID controller
structure. PID controllers can be used to stabilize unstable systems and to improve the
response time, precision, and overshoot of stable systems.
Lee & Varaiya, Signals and Systems
645
EXERCISES
Exercises
Each problem is annotated with the letter E, T, C which stands for exercise, requires some
thought, requires some conceptualization. Problems labeled E are usually mechanical,
those labeled T require a plan of attack, those labeled C usually have more than one
defensible answer.
1. E This exercise studies equalization when the channel is only known approximately.
Consider the cascade composition of figure 14.1, where ˆ
H1 is the channel to be
equalized, and ˆ
H2 is the equalizer. If the equalizer is working perfectly, then x = y.
For example, if
z
z − 0.5
ˆ
H1(z) =
and
ˆ
H2(z) =
,
z − 0.5
z
then x = y because ˆ
H1(z) ˆ
H2(z) = 1.
(a) Suppose that ˆ
H2(z) is as given above, but the plant is a bit different,
z
ˆ
H1(z) =
.
z − 0.5 − ε
Suppose that x = δ, the Kronecker delta function. Plot y − x for ε = 0.1 and
ε = −0.1.
(b) Now suppose that the equalizer is
z − 2
ˆ
H2(z) =
,
z
and the channel is
z
ˆ
H1(z) =
.
z − 2 − ε
Again suppose that x = δ, the Kronecker delta function. Plot y − x for ε =
0.1, −0.1.
(c) For part (b), show that equalization error y − x grows without bound whenever
ε = 0, |ε| < 1.
2. E This exercise studies equalization for continuous-time channels. Consider the
cascade composition of figure 14.1, where ˆ
H1 is the channel to be equalized, and
ˆ
H2 is the equalizer. Both are causal. If
s + 1
s + 2
ˆ
H1(s) =
and ˆ
H2(s) =
,
s + 2
s + 1
646
Lee & Varaiya, Signals and Systems
14. COMPOSITION AND FEEDBACK CONTROL
transmitted
channel
equalizer
reconstructed
binay signal
output
output
binary signal
w
x
v
y
1
w
H 1( z)
H 2( z)
y
0 0.5
Channel
Equalizer
Decision
Figure 14.15: Arrangement of decision-directed equalization of Exercise 3.
then x = y because ˆ
H1(s) ˆ
H2(s) = 1.
(a) Suppose ˆ
H2 is as above but
s + 1
ˆ
H1(s) =
.
s + 2 + ε
Suppose x = u, the unit step. Plot y −x for ε = 0.1 and ε = −0.1, and calculate
the steady state error.
(b) Now suppose the equalizer is
s − 1
ˆ
H2(s) =
,
s + 2
and the channel is
s + 2
ˆ
H1(s) =
.
s − 1 − ε
Again suppose that x = u. Plot y − x for ε = 0.1, −0.1.
(c) For part (b) show that the error y − x grows without bound for any ε = 0,
|ε| < 1.
3. T This exercise explores decision-directed equalization. The arrangement is shown
in Figure 14.15. The transmitted signal is a binary sequence x : Z → {0, 1}. The
causal channel transfer function is ˆ
H1 and the equalizer transfer function is ˆ
H2. The
channel output is the real-valued signal v : Z → R. The equalizer output is the real-
valued signal y : Z → R. This signal is fed to a decision unit whose binary output
at time n, w(n) = 0 if y(n) < 0.5 and w(n) = 1 if y(n) ≥ 0.5. Thus the decision unit
is a (nonlinear) memoryless system,
Decision : [Z → R] → [Z → {0, 1}],
Lee & Varaiya, Signals and Systems
647
EXERCISES
defined by a threshold rule
∀
0, y(n) < 0.5,
n,
(Decision(y))(n) =
1, y(n) ≥ 0.5
At each point in time, the receiver has an estimate ˆ
He of the true channel transfer
1
function, ˆ
H1. The equalizer is set at
ˆ
H2(z) = [ ˆ
He(z)]−1.
(14.11)
1
(a) Suppose that initially ˆ
H1(z) =
z
, and the estimate is perfect, ˆ
He = ˆ
H
z−0.2
1
1.
(This perfect estimate is achieved using a known training sequence for x.)
Determine the respective impulse responses h1 and h2.
Now suppose the signal x is
0, n < 0
∀n, x(n) =
1, n ≥ 0, n even
(14.12)
0, n ≥ 0, n odd
Calculate the channel output v(n) = (h1 ∗ x)(n), n ≤ 3. Then calculate the
equalizer output y(n) = (h2 ∗ v)(n), n ≤ 3, and check that y(n) = x(n), n ≤ 3.
Also check that w(n) = x(n), n ≤ 3.
(b) Now suppose the channel transfer function has changed to
z
ˆ
H1(z) =
,
z − 0.3
but the receiver’s estimate hasn’t changed, i.e.
z
ˆ
He(z) =
,
1
z − 0.2
so the equalizer (14.11) hasn’t changed either. For the same input signal again
calculate the channel and equalizer outputs v(n) and y(n) for n ≤ 3. Check
that y(n) = x(n) for n > 0. But show that the decision w(n) = x(n) for n ≤ 3.
So the equalizer correctly determines x.
(c) Since the receiver’s decision w = x, it can make a new estimate of the channel
using the fact that ˆ
Y = ˆ
H ˆ ˆ
ˆ ˆ
1H2X = ˆ
H1H2W . The new estimate is
ˆ
Y
ˆ
He =
.
(14.13)
1
ˆ
H ˆ
2W
648
Lee & Varaiya, Signals and Systems
14. COMPOSITION AND FEEDBACK CONTROL
Suppose time is 3, and the receiver has observed y(n), w(n), n ≤ 3. Since the
Z transforms ˆ
Y and ˆ
W also depend on values of y(n), w(n) for n > 3, these Z
transforms can not be calculated at time n = 3, and so the estimator (14.13)
cannot be used. The following approach will work, however.
Suppose the receiver knows that the unknown channel transfer function is of
the form
z
ˆ
H1(z) =
,
z − a
so that only the parameter a has to be estimated. Using this information, we
have
z
z − 0.2
z − 0.2
ˆ
Y (z) =
ˆ
W (z) =
W (z).
z − a
z
z − a
Now take the inverse Z transform and express the time-domain relation be-
tween y and w. Show that you can estimate a knowing y(0), y(1), w(0), w(1).
4. E This continues Exercise 3. It shows that if the channel estimate ˆ
He is not suf-
1
ficiently close to the true channel ˆ
H1, the decision may become incorrect. Sup-
pose the true channel is ˆ
H1(z) = z , the estimate is ˆ
He(z) =
z
, the equal-
z−a
1
z−0.2
izer is ˆ
H2(z) = [ ˆ
He(z)]−1 = z−0.2 , and the decision is as in Figure 14.15. As-
1
z
sume the input signal x to be the same as in (14.12) Show that if a = 0.6 then
w(0) = x(0), w(1) = x(1), w(2) = x(2), but w(3) = x(3).
5. E This exercise continues the discussion in examples 14.5, 14.6 for the continuous-time, causal and stable channel with impulse response h1 and transfer function
∀
s − 2
s ∈ RoC(h1) = {s | Re{s} > −1},
ˆ
H1(s) =
.
s + 1
(a) Calculate h1 and sketch it. (Observe how the zero in the right-half plane at
s = 2 accounts for the negative values.)
(b) The inverse of ˆ
H1,
s + 1
ˆ
H2(s) =
,
s − 2
has a pole at s = 2. So as a causal system, the inverse is unstable. But as a
non-causal system, it is stable with RoC = {s | Re{s} < 2} which includes
the imaginary axis. Evaluate the impulse response h2 of ˆ
H2 as an anti-causal
system, and give a sketch.
Lee & Varaiya, Signals and Systems
649
EXERCISES
(c) The impulse response h2 calculated in (a) is non-zero for t ≤ 0. Consider
the finite-duration, anti-causal impulse response h3 obtained by truncating h2
before time -5,
∀
h
t ∈
2(t ),
t ≥ −5
R,
h3(t) =
0,
t < −5
and sketch h3. Calculate the transfer function ˆ
H3, including its RoC, by using
the definition of the Laplace transform.
(d) Obtain the causal impulse response h4 by delaying h3 by time T , i.e.
∀t ∈ R, h4(t) = h3(t + T).
Sketch h4 and find its transfer function, ˆ
H4. Then ˆ
H4 is an approximate inverse
of ˆ
H1 with a delay of 5 time units. (Note: h3 has a delta function at 0.)
6. T The proportional controller of Figure 14.7 stabilizes the plant for K > 1. In this
exercise, we try to achieve the same effect by the cascade compensator of figure
(a) Assume that the plant ˆ
H2 is as given in Figure 14.7. Design ˆ
H1 for the cascade
composition of figure 14.1 so that ˆ
H ˆ
2H1 is the same as the closed-loop transfer
function achieved in Figure 14.7.
(b) Now suppose that the model of the plant is not perfect, and the plant’s real
transfer function is
1
ˆ
H2(s) =
,
M(s − ε)
for some small value of ε > 0. Using the same ˆ
H1 that you designed in part
(a), what is the transfer function of the cascade composition? Is it stable?
7. T Consider a discrete-time causal plant with transfer function
z
ˆ
H2(z) =
.
z − 2
(a) Where are the poles and zeros? Is the plant stable?
(b) Find the impulse response of the plant. Is it bounded?
(c) Give the closed-loop transfer function for the P controller for this plant.
(d) Sketch the root locus for the P controller for this plant.
650
Lee & Varaiya, Signals and Systems
14. COMPOSITION AND FEEDBACK CONTROL
(e) For what values of K is the closed-loop system stable?
(f) Find the step response of the closed-loop system. Identify the transient and
steady-state responses. For K = 10, what is the steady-state tracking error?
(g) Suppose that the plant is instead given by
z
ˆ
H2 =
,
z − 2 − ε
for some real ε ≥ 0. For what values of K is the P controller robust for plants
with |ε| < 0.5?
8. T Consider the feedback composition in Figure 14.6. Suppose that ˆ
H ˆ
1H2 is causal
and strictly proper, meaning that the order of the numerator is greater than the
order of the denominator.
(a) Show that if ˆ
H ˆ
1H2 is causal and strictly proper, then so is
ˆ
H, the transfer
function of the feedback composition given by (14.1).
(b) For the discrete-time case, show that we can write
ˆ
H1(z) ˆ
H2(z) = z−1 ˆ
G(z),
(14.14)
where G(z) is proper, and is the transfer function of a causal system. Intu-
itively, this means that there must be a net unit delay in the feedback loop,
because z−1 is the transfer function of a unit delay.
(c) Use the result of part (a) to demonstrate that the system ˆ
H ˆ
1H2 has state-
determined output.
(d) For the continuous-time case, show that we can write
ˆ
H1(s) ˆ
H2(s) = s−1 ˆ
G(s),
(14.15)
where G(s) is proper, and is the transfer function of a causal system. In-
tuitively, this means that there must be an integration in the feedback loop,
because s−1 is the transfer function of an integrator.
(e) Use the result of part (c) to demonstrate that the system ˆ
H ˆ
1H2 has state-
determined output, assuming that the input is bounded and piecewise con-
tinuous.
9. E Consider the mth order polynomial sN + am−1sm−1 + · · · + a1s + a0. Suppose
all its roots have negative real parts. Show that all coefficients of the polynomial