You are on page 1of 11

ELEN90055 Control Systems

Workshop 2

Open-loop and closed-loop control


Prepared by Sei Zhen Khong and Michael Cantoni, March 22 2011 (Revised 09/03/15)

1 Introduction

A mathematical model is used describe the relationship between signals that carry quantities of
interest in a dynamical system, as these vary over time. Some signals are free to impose (i.e. input
signals) and others are of interest in terms of the influence of the inputs on performance objectives
(i.e. output signals). Model based control of single-input single-output systems is the theme of
this workshop. Both open-loop (model inversion) and closed-loop (feedback) design approaches are
explored and contrasted, on the basis of a physical system example — tank level control. Simulink,
an interactive graphical environment integrated with MATLAB, is used as the tool for simulation,
implementation, and validation.

Note: You should complete the analytical Exercises 1, 5, 8, 9, 11 and re-familiarise yourself
with the Simulink environment before your scheduled workshop.

2 Tank level modeling

qo

Figure 1: Tank level system.

Figure 1 illustrates a tank system, in which u denotes the input flow rate (m3 /s), qo the
output flow rate (m3 /s), and y the tank level (m). The tank is a cylinder of radius ρ (m) and
water escapes through a circular hole of radius ξ (m) at the bottom of the tank. We are interested
in the relationship between the input flow rate u and the fluid level y in the tank.

1
2 2 Tank level modeling

Note that the output flow rate and the fluid level are related by Torricelli’s law:
p
qo (t) = k1 y(t),


where k1 := πξ 2 2g and g denotes gravitational acceleration. Substituting this into

ẏ(t) = k2 [u(t) − qo (t)]

for the fluid level in the tank, where k2 = 1/(πρ2 ), gives the following nonlinear differential
equation relating the input u to the output y:
p
ẏ(t) + k1 k2 y(t) = k2 u(t). (1)

Exercise 1. Suppose it is required that the fluid level only make small deviations about an equilib-
rium value yQ . Find the corresponding input uQ and linearise (1) to arrive at a linear incremental
. .
model for the relationship between δy = y − yQ and δu = u − uQ in the vicinity of the equilibrium
(yQ , uQ ).

√ p
Answer. By setting ẏ = 0 in (1), one gets uQ = k1 yQ . Let f (y, u) := k1 k2 y(t) − k2 u(t) so
that ẏ + f (y, u) = 0. We have

∂f k1 k2 ∂f
= √ and = −k2 ,
∂y (yQ ,uQ ) 2 yQ ∂u (yQ ,uQ )

whereby the resulting linear incremental model is

k1 k2
δ̇y (t) + √ δy (t) − k2 δu (t) = 0.
2 yQ

Your answer to Exercise 1 should lead to

∆y (s) k2
G(s) := = , (2)
∆u (s) s + 2k√1 ky2Q

where ∆y := L[δy ], ∆U := L[δu ], and L[·] denotes the Laplace transform of the argument. A
model of the linearised system is shown below in Figure 2.

incremental model

P P δ̇y δy P
+
R
u k2 y
− − +

uQ k√
yQ
1 k2
2 yQ

Figure 2: Linear approximation of the plant.


3 Open-loop control 3

We examine the accuracy of the linearisation for the following system parameters:

ρ = 1.128m, ξ = 0.1896m, and yQ = 1m. (3)

For these parameters, it can be calculated that k1 = 0.5, k2 = 0.25, and uQ = 0.5 m3 /s.

Exercise 2. Create a Simulink block diagram for the nonlinear and linearised tank level models.
Simulate responses of both to a set of signals that reveal how the responses may differ; consider
inputs of different magnitudes, frequency content, etc.. Hint: To build a Simulink model for the
non-linear system use a structure like the one shown for the incremental model in Figure 2.

If you have done Exercise 2 correctly, you should see that the response of the tank level
system takes the form of Figure 3. Observe that for the given input, the approximation of the
nonlinear model appears to be a reasonably accurate approximation of the behaviour around the
equilibrium point (yQ , uQ ) = (1, 0.5). You are encouraged to explore what happens as the the
input flow deviates by larger amounts from the equilibrium value.

Input
1
Flow rate (m3s−1)

0.8

0.6

0.4

0.2
0 20 40 60 80 100 120 140 160 180 200
Time (s)
Plant response
2
Nonlinear
Water level (m)

1.5 Linear

0.5

0
0 20 40 60 80 100 120 140 160 180 200
Time (s)

Figure 3: Open-loop plant response.

3 Open-loop control

A common problem in control is one of steering the output of a system according to a given
reference by manipulation of the input. A simple, but naive approach to this problem is model
inversion. This is often called open-loop control. We illustrate this concept using the plant model
for the fluid level in the tank. The goal is to control the tank level to a desired operating point.
The full model, as described by (1), is fundamentally nonlinear and difficult to work with. Under
control, it is required that the fluid level make only small deviations from desired equilibrium
operating point. In light of this, one approach is to base controller design on a linear approximation
of the nonlinear plant model, about the desired equilibrium, as is common in practice.
4 3 Open-loop control

Consider the stable linear incremental model of the tank system. The inverse of the corre-
sponding frequency-domain transfer function G in (2) is given by

k√
1 k2
s+ 2 yQ
−1
G (s) = .
k2

This is not a proper transfer function and hence it is not physically realisable. We can approximate
G−1 by multiplying it by a filter with a stable fast pole and unity D.C. gain (i.e. a low-pass filter
with high cutoff frequency). Doing this gives

k√
1 k2
s+ 2 yQ
G−1
ap (s) = ,
k2 (τ s + 1)

where τ should be set to be a small positive number. The inversion-based control may be imple-
mented as shown in Figure 4, where it can be seen that the fluid level y approximately follows the
reference r.

r U
Gap1 (s) G(s) Y
− + − +

YQ UQ UQ YQ

incremental model increment al approximation


linear model of the nonlinear plant

Figure 4: Open-loop control via inversion.

Exercise 3. Implement in Simulink the open-loop control scheme described above on both the
linearised model and the nonlinear model with the parameter values given in (3). Simulate the
step responses. Note that for the input to the non-linear plant is the signal with Laplace transform
U = L[u] shown in Figure 4.

Figure 5 shows the step responses of the controlled linear and nonlinear systems. As expected,
a very close correspondence between the desired and actual outputs is achieved for the linear
plant (indeed the linear model output is obscured by the reference). On the other hand, for the
nonlinear plant, there is an error between the reference and actual response which increases with
the deviation from the operating point (i.e. with the size of the step input).

We now consider the effect of uncertain system parameters on the control performance. Suppose
that during operation the opening in the tank floor is obstructed so that ξ = 0.17m instead of the
nominal value of 0.1896m.

Exercise 4. Simulate the step response of the controlled nonlinear system with the new value
for ξ. What can you conclude about the robustness of the system against modeling errors?

Answer. The step response is illustrated below. Clearly the open-loop control system does not
respond well to modeling errors. The reason for this is the controller is no longer an accurate
4 Closed-loop control 5

Open−loop control with perfect plant model


2
Ref

Water level (m)


Linear
1.5 Nonlinear

0.5
0 2 4 6 8 10 12 14 16 18 20
Time (s)

Figure 5: Open-loop control step response.

inverse of the plant.

Open−loop control with disturbed plant model


2.5
Ref
Actual nonlinear
2
Water level (m)

1.5

0.5
0 2 4 6 8 10 12 14 16 18 20
Time (s)

In general, for the open-loop control methodology to work satisfactorily, it is necessary that
the model on which the design of the controller is based be a highly accurate representation of
the plant, which is rarely the case in reality. Furthermore, it is implicitly required that both the
model and the inverse (or its approximation) are stable.

4 Closed-loop control

In open-loop control scheme shown in Figure 4), the control signal u is independent of the output
of the plant y. A alternative strategy is to exploit this information (assumed measurable) in a
feedback loop. This gives rise to a so-called closed-loop control scheme, which when properly
designed, can be desensitised to modeling errors and disturbances. This point is illustrated below
using the tank system again.

Figure 6 shows a feedback control system comprised of a proportional controller with gain
K > 0 and the linear approximation of the fluid level plant model from above.

Exercise 5. Let R := L[r], U := L[u], Y := L[y], UQ := L[uQ ], and YQ := L[yQ ], derive an


expression relating Y to R, UQ , and YQ . Using the system parameters specified in (3), find the
range of values of K for which the closed-loop system stable.
6 4 Closed-loop control

incremental model

P U P P
R K G(s) Y
− − +

UQ YQ

Figure 6: Closed-loop control of tank fluid level.

Answer. We have from Figure 13 that

Y (s) = YQ (s) + G(s) (K (R(s) − Y (s)) − UQ (s))


KG(s) 1 G(s)
=⇒ Y (s) = R(s) + YQ (s) − UQ (s) (4)
1 + KG(s) 1 + KG(s) 1 + KG(s)

4
Substituting in the parameters in (3) yields the nominal system G(s) = 16s+1 . Correspondingly,
KG(s) 1 K G(s)
the closed-loop transfer functions 1+KG(s) , 1+KG(s) , 1+KG(s) , and 1+KG(s) all share the same
pole s = − 4K+1
16 . It follows that the closed-loop system is stable for all K > 0.

Exercise 6. Implement in Simulink the proportional gain feedback controller on the nonlinear
model of the tank system and simulate the closed-loop unit step response for K = 5 and K = 25.
Change the plant parameter as in Exercise 4 to reflect modeling errors and simulation again.

Closed−loop control
2
Ref
Nonlinear
Water level (m)

1.5 Mismatched nonlinear

0.5
0 2 4 6 8 10 12 14 16 18 20
Time (s)

Figure 7: Closed-loop step response for K = 5.

Closed−loop control
2
Ref
Nonlinear
Water level (m)

1.5 Mismatched nonlinear

0.5
0 2 4 6 8 10 12 14 16 18 20
Time (s)

Figure 8: Closed-loop step response for K = 25.

In Exercise 6, your simulation results should take the form shown in Figures 7 and 8. The
4 Closed-loop control 7

example illustrates the increased robustness of the feedback control scheme compared to open-
loop control. In particular, modeling errors or disturbances due to un-modeled nonlinearities
and parameter errors have little effect on the closed-loop performance; contrast this with your
simulation result in Exercise 4.

Notice from Figures 7 and 8 that a higher controller gain K results in a better closed-loop
performance, in terms of speed of response and the steady-state offset from the reference value.
This is examined analytically via the linearised plant model in the following two exercises.

Exercise 7. Using the knowledge gained from Workshop 1 and your answer to Exercise 5, ana-
lytically describe the relationship between K and the system response speed.

Answer. Recall from Workshop 1 that a strictly proper first-order transfer function of the form
a
τ s+1 is such the rise time of the step response is proportional to the time constant τ . For our
KG(s) 4K 16
closed-loop transfer function 1+KG(s) = 16s+1+4K , we have τ = 4K+1 , from which it can be
concluded that a larger K leads to a shorter rise time (i.e. faster system response).

Exercise 8. Let R(s) = β/s, the Laplace transform of a step input of magnitude β. Suppose
UQ (s) = uQ /s = 0.5/s and YQ (s) = yQ /s = 1/s. Using your answer to Exercise 5, derive an
analytic expression for Y (s) in terms of K and β. By applying the final-value theorem, find the
relationship between the steady-state error (i.e. ess := lim (r(t) − y(t))) and the parameters β and
t→∞
K. Relate this to your simulation results.

Answer. From (4), one obtains

4K β 16s + 1 1 4 0.5
Y (s) = + −
16s + 1 + 4K s 16s + 1 + 4K s 16s + 1 + 4K s
16s + 4Kβ − 1
= .
s(16s + 1 + 4K)

β+1
Consequently, the steady-state error is ess = lims→0 s (R(s) − Y (s)) = 1+4K . In other words,
increasing K decreases ess , as confirmed by simulation; see Figures 7 and 8.

In practice, however, it is not possible to increase K indefinitely. In part, this is because


measurements are often corrupted by high-frequency noise. For instance, consider the case where
we have an additive measurement disturbance with Laplace transform Dm = L[dm ] as shown in
Figure 9.

Exercise 9. Find the transfer function mapping from Dm := L[dm ] to Y .

Answer. We have

Y (s) = −KG(s)(Y (s) + Dm (s))


KG(s)
=⇒ Y (s) = − Dm (s). (5)
1 + KG(s)

Note that the transfer function is the negative of the complementary sensitivity transfer function
mapping from R to Y .
8 4 Closed-loop control

incremental model

P U P ∆u ∆y P
R K G(s) Y
− − +

UQ YQ
P

Dm

Figure 9: Closed-loop control with measurement disturbance.

Exercise 10. Simulate the step response of the closed-loop system with a sinusoidal measurement
disturbance dm (t) := 0.1 sin(ωt), with ω = 15 rad/s. You should see that increasing K increases
the system’s sensitivity to the measurement disturbance, as in Figures 10 and 11, even though
the steady-state error and response speed improve. Explain this using your answer to Exercise 9.
What happens if the frequency of the disturbance is increase to ω = 100 rad/s.
KG(s) 4K 4K+1
Answer. The bandwidth of the low-pass transfer function 1+KG(s) = 16s+1+4K is ωc = 16 .
As such, when K is such that ωc ≪ 15 rad/s, the measurement disturbance is highly attenuated
at the output Y ; see (5). On the other hand, when K is such that ωc > 15 rad/s, the effect of the
disturbance on the output is significant.

Closed−loop control with measurement noise


2
Ref
Water level (m)

Nonlinear
1.5

0.5
0 2 4 6 8 10 12 14 16 18 20
Time (s)

Figure 10: Closed-loop step response with measurement disturbance (K = 20).

Closed−loop control with measurement noise


2
Ref
Water level (m)

Nonlinear
1.5

0.5
0 2 4 6 8 10 12 14 16 18 20
Time (s)

Figure 11: Closed-loop step response with measurement disturbance (K = 100).

The sequence of exercises above illustrates an important point. The bandwidth of a well-
5 Open-loop vs. closed-loop control 9

designed closed-loop system should lie far below the frequencies where measurement noise is of
concern. However, recall that the smaller the bandwidth is, the slower the system’s response speed
will be. This trade-off needs to be taken into account in control system design.

5 Open-loop vs. closed-loop control

In this section we investigate the difference between open-loop and closed-loop control from a more
general analytical perspective. Figures 12 and 13 illustrate the general set-ups of open-loop and
closed-loop control, respectively, with G0 as the nominal plant model.

+ u
r K G(s) yol

plant

G0 (s)

approximate plant inverse

Figure 12: Open-loop control.

+ u
r K G(s) ycl

plant

Figure 13: Closed-loop control.

Exercise 11. Find the transfer functions Tol mapping from R := L[r] to Yol := L[yol ] in Figure 12
and Tcl mapping from R to Ycl := L[ycl ] in Figure 13. Suppose that G depends on an uncertain
parameter λ whose nominal value is λ0 , i.e. G(λ0 ) = G0 , derive the expressions for T1ol dT

ol
dλ λ=λ0
and T1cl dT

dλ λ=λ (hint: use chain rule). They respectively denote the relative errors of Tol and Tcl
cl
0
as λ varies around λ0 . What can you conclude from this sensitivity analysis?

Answer. We have:

Yol (s) = G(s)U (s) = KG(s)[R(s) − G0 (s)U (s)]


= KG(s)R(s) − KG0 (s)Yol (s))
Yol (s) KG(s)
=⇒ Tol (s) := =
R(s) 1 + KG0 (s)
10 6 Summary of main points

and

Ycl (s) = KG(s)[R(s) − Ycl (s)]


Ycl (s) KG(s)
=⇒ Tcl (s) := = .
R(s) 1 + KG(s)

Notice that when G0 = G, i.e. there is no modeling error, the transfer functions above are identical.
If |KG(s)| ≫ 1 then Tol (s) = Tcl (s) ≈ 1, so that the plant output follows the reference input.
Now,

1 dTol 1 dTol dG
=
Tol dλ λ=λ0 Tol λ=λ0 dG G=G0 dλ λ=λ0

1 + KG0 K dG
=
KG0 1 + KG0 dλ λ=λ0

1 dG
=
G0 dλ λ=λ0

and

1 dTcl 1 dTcl dG
=
Tcl dλ λ=λ0 Tcl λ=λ0 dG G=G0 dλ λ=λ0

1 + KG0 1 2 dG
= [K(1 + KG0 ) − K G0 ]
KG0 (1 + KG0 )2 dλ λ=λ0

1 1 dG
= .
1 + KG0 G0 dλ λ=λ0

From these, we may conclude that when |KG(s)| ≫ 1, the closed-loop system is much less sensitive
than the open-loop to model parameter variation about the nominal value, as we would expect
based on the simulations performed in the preceding sections.

6 Summary of main points

• Open-loop control is a scheme that does not make use of any measurable information re-
garding the plant (i.e. controlled) output in determining the control action. This simple
scheme comes with serious drawbacks:

– open-loop control systems cannot compensate for unknown disturbances;


– the plant model used in the control design is required to be highly accurate inasmuch
as the performance of an open-loop system is sensitive to modeling mismatch;
– the plant model and its inverse (or approximate inverse) need to be stable for the scheme
to be implementable.

• By contrast, closed-loop (feedback) control exploits measurements of the plant output in


determining the control signal. A well-designed feedback control system has the following
desirable properties:
6 Summary of main points 11

– the performance of the system is reasonably robust to modeling uncertainty;


– the effect of any unmeasured disturbances acting on the system can be significantly
reduced.

You might also like