Automatic Control - Exercises
Automatic Control - Exercises
Exercises
1
1. Model Building and Linearization
1.1 Many everyday situations may be described and analyzed using con-
cepts from automatic control. Analyze the scenarios below and try
to give a description that captures the relevant properties of the
system:
• What should be controlled?
• What control signals are used?
• What measurement signals are available?
• Is the system affected by any disturbances?
• Is feedback or feedforward used for control?
• Draw a block diagram that describes the system. The block di-
agram should show how the measurement signals, control sig-
nals, and the disturbances are connected to the human (which
here is the controller), and to the process.
a. You take a shower and try to get desired temperature and flow of
the water.
b. You drive a car.
1.2 A car drives on a flat road and we assume that friction and air
resistance are negligible. We want to study how the car is affected
by the gas pedal position u. We assume that u varies between 0
and 1, and that the acceleration of the car is proportional to the gas
pedal position, a = ku.
u y
Bil
a. Write down the differential equation that describes the relation be-
tween the gas pedal position u and the velocity of the car.
b. Let the output of the system be the velocity of the car, y = v. Write
the system on state-space form.
c. Let the output of the system be the position of the car, y = p. Write
the system on state-space form.
d. Assume that the car is affected by air resistance that gives a counter
force that is proportional to the square of the velocity of the car. With
the gas pedal position as control signal and the velocity of the car
as measurement signal, the system may now be written as
ẋ = −mx2 + ku
y= x
3
Chapter 1. Model Building and Linearization
m ÿ = − ky − c ẏ + f
a. Introduce the states x1 = y and x2 = ẏ and write down the state
space representation of the system.
di
vin − Ri − vout − L =0
dt
Cv̇out = i
Introduce the states x1 = vout and x2 = v̇out and give the state space
representation of the system.
4
Chapter 1. Model Building and Linearization
where u(t) and y(t) are the input and output, respectively. Choose
states x1 = y, x2 = ẏ and x3 = ÿ.
1.7 A process with output y(t) and input u(t) is described by the differ-
ential equation
√
ÿ + y + yẏ = u2
a. Introduce states x1 = y, x2 = ẏ and give the state space representa-
tion of the system.
b. Find all stationary points ( x10 , x20 , u0 ) of the system.
c. Linearize the system around the stationary point corresponding to
u0 = 1.
5
Chapter 1. Model Building and Linearization
u(t)
r(t)
6
2. Dynamical Systems
d2 y dy
J 2
+D =u
dt dt
where yis the angle of the telescope to the earth surface, and u is
the torque from the motor that controls the telescope. Determine the
transfer function from u to y and write the system on state-space
form.
7
Chapter 2. Dynamical Systems
a.
− 2 0 5
ẋ =
x+
u
0 −3 2
y = −1 1 x + 2u
b.
−7 2 3
ẋ =
x+
u
−15 4 8
y = −2 1 x
c.
−1 0 3
ẋ =
x+
u
0 −4 2
y = 1 0 x + 5u
d.
1 4 −1
ẋ =
x+
u
−2 −3 1
y = 1 2 x + 3u
2.3 Determine the impulse and step responses of the systems in assign-
ment 2.2.
2.4 Derive the formula G (s) = C(sI − A)−1 B + D for a general system
ẋ = Ax + Bu
y = Cx + Du
1
G (s) =
s2 + 4s + 3
a. Calculate the poles and zeros of the system. Is the system stable?
c. Calculate the initial value and final value of the step response of
the system.
d. Calculate the initial value and final value of the impulse response
of the system.
0.25
G (s) =
s2 + 0.6s + 0.25
8
Chapter 2. Dynamical Systems
2.7 Determine the transfer function and poles of the oscillating mass in
assignment 1.3. Explain how the poles move if one changes k and c,
respectively. Can the poles end up in the right half plane?
s+4
G (s) =
s3 + 2s2 + 3s + 7
0.1 4
G1 (s) = G2 (s) =
s + 0.1 s2
+ 2s + 4
0.5 −0.5
G3 (s) = 2 G4 (s) = 2
s − 0.1s + 2 s + 0.1s + 2
1 4
G5 (s) = G6 (s) = 2
s+1 s + 0.8s + 4
2
G7 (s) = 2
s +s+3
9
Chapter 2. Dynamical Systems
y y
A B
1 1
1 t 1 t
y y
C D
1 1
1 t 1 t
y
E
1
1 t
2.12 Pair each of the four pole-zero plots with the corresponding step
responses A–G.
1 2
1 1
−3 −2 −1 1 −3 −2 −1 1
−1 −1
3 4
1 1
−3 −2 −1 1 −3 −2 −1 1
−1 −1
10
Chapter 2. Dynamical Systems
y A y B
1 1
1 t 1 t
y C y D
1 1
1 t 1 t
y E y F
1 1
1 t 1 t
y G
1 t
Figure 2.1
a. Figure 2.2 shows the impulse response from food intake to glucose
level for two types of food: whole grain pasta with low GI (solid line)
and lemonade with high GI (dashed line). Which of the following
transfer functions may be used to model the uptake of whole grain
pasta and lemonade, respectively?
11
Chapter 2. Dynamical Systems
1 1
G1 (s) = s+ 1 G2 (s) = s/3+1
1 1
G3 (s) = (s+1)2
G4 (s) = (s/3+1)2
1 1
G5 (s) = s(s+1)
G6 (s) = s(s/3+1)
1.5
pasta
lemonade
glucose level
0.5
0
0 1 2 3 4 5 6
Time (h)
Figure 2.2
2.14 Determine the transfer function from U to Y for the systems below.
a.
U + G1 Y
G2
b.
H1
U G1 + G2 Y
H2
c.
G3 +
U + G1 G2 Y
12
Chapter 2. Dynamical Systems
d.
U + G1 + G2 Y
− H2
− H1
D (s)
−1
Figure 2.3
s2 + 6s + 7
G (s) =
s2 + 5s + 6
a. diagonal form,
13
3. Frequency Analysis
0.01(1 + 10s)
G (s) =
(1 + s)(1 + 0.1s)
b. The Bode plot of the system is shown in Figure 3.1. Determine the
output y(t) by using the Bode plot instead.
−1
10
Magnitude
−2
10
−3
10
−3 −2 −1 0 1 2 3
10 10 10 10 10 10 10
90
45
Phase
−45
−90
−3 −2 −1 0 1 2 3
10 10 10 10 10 10 10
Frequency [rad/s]
3.2 We analyze the two systems in Figure 3.2; the sea water in Öresund
and the water in a small garden pool. The input signal to the systems
is the air temperature and the output is the water temperature.
14
Chapter 3. Frequency Analysis
Figure 3.2
c. During a summer day we assume that the air temperature has si-
nusoidal variations with a period time T = 1 day. The greatest
temperature of the day (at 13.00) is 27○ C, and the lowest tempera-
ture (at 01.00) is 14○ C. At what time during the day is the water in
the garden pool the warmest?
1
10
0
10
p G (iω )p
−1
10
−2
10
−3
10
0
arg( G (iω ))
−45
−90
−4 −3 −2 −1 0 1
10 10 10 10 10 10
ω (rad/h)
15
Chapter 3. Frequency Analysis
3.3 Assume that the oscillating mass in assignment 1.3 has m = 0.1 kg,
c = 0.05 Ns/cm and k = 0.1 N/cm. The transfer function is then
given by
10
G (s) = 2
s + 0.5s + 1
a. Let the mass be subject to the force f = sin ω t, −∞ < t < ∞.
Calculate the output for ω = 0.2, 1 and 30 rad/s.
b. Instead, use the Bode plot of the system in Figure 3.4 to determine
the output for ω = 0.2, 1 and 30 rad/s.
2
10
1
10
Magnitude
0
10
−1
10
−2
10
−3
10
−2 −1 0 1 2
10 10 10 10 10
−45
Phase
−90
−135
−180
−2 −1 0 1 2
10 10 10 10 10
Frequency [rad/s]
Figure 3.4 The Bode plot of the oscillating mass in assignment 3.3.
3.4 Draw the Bode plots corresponding to the following transfer func-
tions
a. 3
G (s) =
1 + s/10
b. 10
G (s) =
(1 + 10s)(1 + s)
c. e−s
G (s) =
1+s
d. 1+s
G (s) =
s(1 + s/10)
e. 2(1 + 5s)
G (s) =
s(1 + 0.2s + 0.25s2 )
16
Chapter 3. Frequency Analysis
3.5 Exploit the results from the previous assignment in order to draw
the Nyquist curves of
a. 3
G (s) =
1 + s/10
b. 10
G (s) =
(1 + 10s)(1 + s)
c. e−s
G (s) =
1+s
3.6 The Bode plot below was obtained by means of frequency response
experiments, in order to analyze the dynamics of a stable system.
What is the transfer function of the system?
0
10
−1
10
Magnitude
−2
10
−3
10
−4
10
−2 −1 0 1 2 3 4
10 10 10 10 10 10 10
−30
Phase
−60
−90
−2 −1 0 1 2 3 4
10 10 10 10 10 10 10
Frequency [rad/s]
3.7 Measurements resulting in the Bode plot below have been conducted
in order to analyze the dynamics of an unknown system. Use the
Bode plot to determine the transfer function of the system. Assume
that the system is stable and lacks complex poles and zeros.
17
Chapter 3. Frequency Analysis
1
10
0
Magnitude 10
−1
10
−2
10
−3
10
−1 0 1 2 3
10 10 10 10 10
90
0
Phase
−90
−180
−270
−1 0 1 2 3
10 10 10 10 10
Frequency [rad/s]
18
4. Feedback Systems
a. Let u be the input and y the output and determine the transfer
function G P (s) of the oven.
r e u y
Σ GR GP
−1
c. Choose K such that the closed loop system obtains the characteristic
polynomial
s + 0.1
4.2 The below figure shows a block diagram of a hydraulic servo system
in an automated lathe.
f
r e u y
Σ GR Σ GP
−1
1
G P (s) =
ms2 + ds
where m is the mass of the piston and tool mount, and d is the
viscous damping of the tool mount. In the assignment it is assumed
that r(t) = 0.
a. How large does the deviation e(t) = r(t)− y(t) between the reference-
and measured tool head position become in stationarity if the shear
force f (t) is a unit step? The controller is assumed to have a constant
gain G R (s) = K .
19
Chapter 4. Feedback Systems
−1
4.4 The below figure shows a block diagram of a gyro stabilized plat-
form. It is controlled by an motor which exerts a momentum on the
platform. The angular position of the platform is sensed by a gyro-
scope, which outputs a signal proportional to the platform’s devia-
tion from the reference value. The measurement signal is amplified
by an amplifier with transfer function G R .
M
θ ref 1 θ
Σ G R (s) K Σ Js2
−1
4.5 When heating a thermal bath, one can assume that the tempera-
ture increases linearly with 1○ C/s. The temperature is measured by
means of a thermocouple with transfer function
1
G (s) =
1 + sT
with time constant T = 10 s.
After some initial oscillations, a stationary state, in the sense that
the temperature measurement increases with constant rate, is reached.
At a time instant, the temperature measurement reads 102.6○ C. Cal-
culate the actual temperature of the bath.
20
Chapter 4. Feedback Systems
4.6 Consider the system G0 (s) with the following asymptotic gain curve.
Assume that the system lacks delays and right half plane zeros.
log G0
incline: −2
G0 =1
incline: −1
ω =1 ω =5 log ω
a. r(t) = a
b. r(t) = bt
c. r(t) = ct2
d. r(t) = a + bt
e. r(t) = sin(t)
4.7 In a simple control circuit, the process and controller are given by
1
G P (s) = and G R (s) = 6.5, respectively.
(s + 1)3
a. Determine the sensitivity function S(s).
The gain plot of the sensitivity function is given below.
c. At which angular frequency does the control circuit exhibit the largest
sensitivity towards disturbances and by how much are disturbances
amplified at most?
1
10
Magnitude
0
10
−1
10
−1 0 1
10 10 10
21
Chapter 4. Feedback Systems
4.8 The below figure shows the gain curves of the sensitivity function
S and complementary sensitivity function T for a normal control
circuit.
1
10
0
10
Magnitude
−1
10
−2
10
−3
10
−4
10
−2 −1 0 1
10 10 10 10
Frequency [rad/s]
1
10
Magnitude
0
10
−1
10
−2
10
−2 −1 0 1
10 10 10 10
Frequency [rad/s]
c. Give the frequency ranges where the output exhibits good tracking
of the reference signal.
d. What is the minimal distance between the Nyquist curve of the open
loop system and the point −1 in the complex plane? What does this
say about the gain margin?
4.9 In a simple control loop, the open loop transfer function is given by
K
Go (s) = G R (s) G P (s) =
s(s + 2)
Draw the root locus of the characteristic equation of the closed loop
system, with respect to the gain parameter K .
4.10 A simple control loop has the open loop transfer function
K (s + 10)(s + 11)
Go (s) = G R (s) G P (s) =
s(s + 1)(s + 2)
22
Chapter 4. Feedback Systems
r y
K 1
Σ
s+2 s(s + 1)
−1
4.12 Consider the Nyquist curves in Figure 4.1. Assume that the corre-
sponding systems are controlled by the P controller
u = K (r − y)
In all cases the open loop systems lack poles in the right half plane.
Which values of K yield a stable closed loop system?
1
G p (s) =
(s + 1)3
u = K (r − y)
Use the Nyquist criterion to find the critical value of the gain K (i.e.
the value for which the system transits from stability to instability).
4.14 The Nyquist curve of a system is given in Figure 4.2. The system is
stable, i.e. lacks poles in the right half plane.
Assume that the system is subject to proportional feedback
u = K (r − y)
23
Chapter 4. Feedback Systems
24
Chapter 4. Feedback Systems
Σ GR GP
-1
Find the maximal value of the controller gain K , such that the closed
loop system remains stable? The transfer function from fuel flow to
burn zone temperature is given by
e−9s
G P (s) =
(1 + 20s)2
e−sL
G P (s) =
1 + 10s
25
Chapter 4. Feedback Systems
r y
Σ K G P (s)
−1
a. How much can the the gain of the controller or process be increased
without making the closed loop system unstable?
4.19 A Bode plot of the open loop transfer function of the controlled lower
tank in the double tank process is shown in Figure 4.6. What is the
delay margin of the system?
26
Chapter 4. Feedback Systems
1
10
Magnitude
0
10
−1
10
−1 0
10 10
−90
−135
Phase
−180
−225
−270
−1 0
10 10
Frequency [rad/s]
Figure 4.5 Bode plot of the open loop system in Figure 4.18.
2
10
1
10
Magnitude
0
10
−1
10
−2
10
−2 −1 0
10 10 10
−90
−135
Phase
−180
−225
−270
−2 −1 0
10 10 10
Frequency [rad/s]
Figure 4.6 Bode plot of the open loop transfer function of the controlled lower
tank in the double tank process in problem 4.19.
27
5. State Feedback and Kalman Filtering
a. Is it controllable?
c. Assume that the two inputs are coupled, so that u1 + 2u2 = 0. Is the
system controllable in this case?
28
Chapter 5. State Feedback and Kalman Filtering
5.7 A linear dynamical system with transfer function G (s) is given. The
system is controllable. Which of the following statements are un-
questionably true?
a. The poles of the closed loop system’s transfer function can be arbi-
trarily placed by means of feedback from all states.
b. The zeros of the closed loop system’s transfer function can be arbi-
trarily placed by means of feedback from all states.
c. If the state variables are not available for measurements, they can
always be estimated by diffrentiating the system output.
x̂˙ = A x̂ + Bu + K ( y − C x̂)
such that the poles of the closed loop system are placed in −4 and
the stationary gain is 1.
5.9 The position of a hard drive head is described by the state space
model
dx −0.5 0 3
= x+
u
dt 1 0 0
y = 0 1 x
29
Chapter 5. State Feedback and Kalman Filtering
5.10 Figure 5.1 shows the lunar lander LEM of the Apollo project. We
will study a possible system for controlling its horizontal movement
above the moon surface.
θ
steer rockets
direction of motion
Assume that the lander floats some distance above the moon surface
by means of the rocket engine. If the angle of attack (the angle of
the craft in relation to the normal of the moon surface) is nonzero, a
horizontal force component appears, yielding an acceleration along
the moon surface.
Study the block diagram in Figure 5.2 showing the relation between
the control signal u of the rocket engine, the angle of attack, θ , and
the position z. The craft obeys Newton’s law of motion in both the θ
uref
.. . .. .
u θ θ θ z z z
Σ K1 1/s 1/s K2 1/s 1/s
feedback m1 m2 m3
Figure 5.2 Block diagram of the lander dynamics along the z-axis.
30
Chapter 5. State Feedback and Kalman Filtering
x1 = θ˙
x2 = z̈
x3 = ż
and write the system on state-space form. Let the velocity in the z
direction be the output signal of the system.
5.11 A conventional state feedback law does note guarantee integral ac-
tion. The following procedure is a way of introducing integral action.
Let the nominal system be
dx
= Ax + Bu
dt
y = Cx
where
x
xe =
x n+1
31
Chapter 5. State Feedback and Kalman Filtering
A state feedback law for this system results in a control law of the
form
u = − Lx − ln+1 xn+1 = − L e x e
This controller, which steers y towards r, obviously has integral ac-
tion. Use this methodology in order to determine a state feedback
controller with integral action for the system
dx 0 1 0
= x+
u
dt 0 0 1
y = 1 0x
such that the closed loop system obtains the characteristic polyno-
mial
(s + α ) s2 + 2ζ ω s + ω 2 = 0
d x̂
= A x̂ + Bu + K ( y − C x̂)
dt
Determine K such that the poles of the Kalman filter are placed in
s = −4.
a. Assign feedback gains to all states such that the closed loop system
obtains the desired feature.
32
Chapter 5. State Feedback and Kalman Filtering
b. Give the output feedback (state space) equations which are obtained
when the Kalman filter is combined with the state feedback.
c. Introduce the state variable x and x̃ = x − x̂. Write down the char-
acteristic equation of the closed loop system.
d2 x
= kϕ
dt2
33
Chapter 5. State Feedback and Kalman Filtering
dx3
=0
dt
(s + α )(s2 + 2ζ ω s + ω 2 ) = 0
Give the equations of the Kalman filter and try to interpret their
meaning intuitively.
34
6. Design methods
b. At which frequency does the controller have its minimal gain? What
is the gain and phase shift for this frequency?
dr
J + Dr = Cδ
dt
where r is the yaw rate [rad/s] and δ is the rudder angle [rad].
Further, J [kgm2 ] is the momentum of inertia wrt the yaw axis of
the boat, D [Nms] is the damping constant and C [Nm/rad] is a
constant describing the rudder efficiency. Let the rudder angle δ be
the control signal. Give a PI controller for control of the yaw rate,
such that the closed loop system obtains the characteristic equation
s2 + 2ζ ω s + ω 2 = 0
35
Chapter 6. Design methods
2
10
1
Magnitude
10
0
10
−1
10
−2
10
−3
10
−2 −1 0 1 2
10 10 10 10 10
0
−45
Phase
−90
−135
−180
−225
−2 −1 0 1 2
10 10 10 10 10
Frequency [rad/s]
1.5
1
y
0.5
0
0 5 10 15 20 25 30 35 40
t [s]
Figure 6.1 Bode plot and step response for the case when the PID parameters
in sub-assignment 6.2b have been multiplied by four. The solid curves correspond
to the nominal case.
2
10
1
Magnitude
10
0
10
−1
10
−2
10
−3
10
−2 −1 0 1 2
10 10 10 10 10
0
−45
Phase
−90
−135
−180
−225
−2 −1 0 1 2
10 10 10 10 10
Frequency [rad/s]
1.5
1
y
0.5
0
0 5 10 15 20 25 30 35 40
t [s]
Figure 6.2 Bode plot and step response for the case when the PID parameters
in sub-assignment 6.2b have been divided by two. The solid curves correspond to
the nominal case.
36
Chapter 6. Design methods
Σ GR GP
-1
1
G R (s) = K (1 + )
sTi
37
Chapter 6. Design methods
6.7 Martin has heard that the optimal effect from training is obtained
when the pulse is 160 beats per minute (bpm). By feeding back the
signal from his heart rate monitor to a treadmill, he wants to control
the speed such that the pulse is exactly at the optimal value.
y PI
1 1
ẋ = − x+ u
30 15 (6.1)
y= x
Bode Diagram
1
10
Magnitude (abs)
0
10
−1
10
−2
10 0
−45
−90
−135
Phase (deg)
−180
−225
−270
−315
−360
−405
−450
−2 −1 0
10 10 10
Frequency (rad/sec)
38
Chapter 6. Design methods
Step Response
1.2
0.8
Amplitude
0.6
0.4
0.2
0
0 2 4 6 8 10 12
Time [s]
Nyquist Curve
ω =1
0
Im
−0.5
−1
−1 −0.5 0 0.5 1
Re
Figure 6.5 Step response and Nyquist curve of the system in assignment 6.8.
a. Draw the step response of the system and use Ziegler-Nichol’s step
response method to determine the parameters of a PID controller.
Write down the values of the obtained controller parameters K , Ti
and Td .
39
Chapter 6. Design methods
a. Use the step response method for the process with the solid step
response curve in Figure 6.6.
1.2
0.8
0.6
0.4
0.2
−0.2
0 5 10 15 20 25 30 35 40
Figure 6.6
b. The Nyquist curve of the same system is shown in Figure 6.7. The
point marked ’o’ corresponds to the frequency ω = 0.429 rad/s. Apply
the frequency method to the process.
0.4
0.2
0 ο
−0.2
−0.4
−0.6
−0.8
−1
−0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8 1
Figure 6.7
40
Chapter 6. Design methods
1.5
0.5
−0.5
0 10 20 30 40 50 60 70 80
Figure 6.8
6.11 A second order system has the Bode plot shown in Figure 6.9. We
would like to connect a link G2 in series with the system, in order
to increase the speed of the closed loop system. The cross-over fre-
quency, ω c , (the angle for which p G p = 1) is used as a measure of the
system’s speed. Which of the following G2 -candidates yield a faster
system?
A G2 = K , K > 1
1
B G2 =
s+1
s+1
C G2 =
s+2
D G2 = e−sT , T > 0
1
G P (s) =
s(s + 1)(s + 2)
41
Chapter 6. Design methods
1.1
G P (s) =
s(s + 1)
1
G1 (s) =
s(s + 1)(s + 2)
42
Chapter 6. Design methods
Figure 6.10 Step response of the closed loop servo system in assignment 6.15.
43
7. Controller Structures
7.1 Figure 7.1 shows a block diagram of the temperature control system
in a house. The reference temperature (the thermostat set point) is
given by r, the output y is the indoor temperature and the distur-
bance d is due to the outdoor temperature. The transfer function
G1 (s) represents the dynamics of the heating system and G2 (s) rep-
resents the dynamics of the air inside the house. The controller G R
is a P controller with gain K = 1.
Assume that the influence d of the outdoor temperature can be ex-
actly measured. Determine a feedforward link H, such that the in-
door temperature becomes independent of the outdoor temperature.
What is required in order to obtain a good result from the feedfor-
ward?
d
H
r u y
Σ GR Σ G1 Σ G2
−1
7.2 Figure 7.2 shows a block diagram of a level control system for a
tank. The inflow x(t) of the tank is determined by the valve position
and the outflow v(t) is governed by a pump. The cross section of
the tank is A = 1 m2 . The assignment is to control the system so
that the level h in the tank is held approximately constant despite
variations in the flow v. This is done by adjusting the valve at the
outflow from the buffer tank.
feedforward
v
G
F
−1
−1
Figure 7.2 Block diagram of the level control system in assignment 7.2.
44
Chapter 7. Controller Structures
1
Gv (s) =
1 + 0.5s
7.3 Consider the system in Figure 7.3. The transfer function of the pro-
cess is given by
1
G P (s) =
s+3
and G R (s) is a PI controller with transfer function
1
G R (s) = K (1 + )
STi
Kf
r u y
Σ G R (s) Σ G P (s)
−1
45
Chapter 7. Controller Structures
y y
r
H Σ G
ff
H
fb
tions Hff (s) and Hfb (s). Discuss the result and consider the effect of
the feedforward when the controller contains a D term.
7.5 The block diagram in Figure 7.5 shows cascade control of a tank. The
v1 v2
e y
Σ
1
yr G R2 Σ G R1 Σ G1 Σ G2 y
−1
−1
2
7.6 Consider Figure 7.5 and assume that G1 (s) = s+ 2 describes a valve
whereas G2 (s) = 1s describes a tank.
46
Chapter 7. Controller Structures
by the model
10−3 s − 0.01
Y (s) = M (s) + 10−3 F (s)
s s(s + 0.1)
where Y is the dome level [m], M is the feed water flow [kg/s] and
F is the steam flow [kg/s].
a. Assume a constant steam flow. Design a P controller, controlling the
feed water flow by measuring the dome level. Choose the controller
parameters such that the control error caused by a step in the dome
level goes down to 10 % of its initial value after 10 seconds.
b. Consider the closed loop system. Write down the stationary level
error Y caused by a step disturbance of 1 kg/s in the steam flow F.
c. Consider the initial system. Determine a feedforward link H (s) from
steam flow F (s) to feed water flow M (s), such that the level Y
becomes independent of changes in the steam flow.
7.9 Consider the same process and controller as in the previous assign-
ment. Now the process is controlled over a very slow network which
introduces a one second delay in the control loop. In order to deal
with this problem an Smith predictor is utilized, see Figure 7.7.
47
Chapter 7. Controller Structures
a. Assume that the model and the process are identical. What are the
transfer functions for the blocks (Controller, Process, Model, Model
with no delay) in our example?
b. The block diagram of the Smith predictor can be redrawn according
to Figure 7.8. What is the transfer function of the Smith predictor
(from e to u) in our example?
c. Use the approximation ex ( 1 + x in order to simplify the transfer
function of the controller. Compare the controller to compensation
links.
r u y
Σ controller process
−
y1 −
model Σ
y2
model with
no delay
Smith predictor
r e u y
Σ Σ GR GP
Ĝ P − Ĝ 0P
−1
7.10 Figure 7.9 shows the result of a frequency analysis carried out on
the beam (a part of the ’ball on the beam’ process). One sees that
the process dynamics can be well approximated by an integrator, for
low frequencies. One also sees that for high frequencies, the phase
curve diverges in a way which resembles a delay. Consequently, it
would be possible to describe the process by
k −sL
G (s) = e
s
Use the Bode plot in order to determine approximate values of the
gain k and delay L.
48
Chapter 7. Controller Structures
1
10
0
10
Magnitude
−1
10
−2
10
−3
10
0 1 2 3
10 10 10 10
−100
Phase
−200
−300
−400
0 1 2 3
10 10 10 10
Frequency [rad/s]
49
8. Design Examples
Purpose
This assignment deals with depth control of a submarine from the
forties. Two control methods are tested – PD and state feedback.
The latter method was used in reality.
Background
Depth control of submarines can be achieved by means of varying the
rudder angle β according to Figure 8.1. The depth h is measured by
h
β
Specifications
In this case no specifications were given except "Make it as good as
possible".
Problem Formulation
Assume that the speed is v = 3 knots. The problem lies in computing
a control law which gives a satisfactory settling of the depth h for
the given speed. This does not guarantee equally satisfactory results
at other speeds.
In an initial approach one wanted to control the depth h of the
submarine, solely based on measurements of h.
50
Chapter 8. Design Examples
10 3
10 2
Magnitude
10 1
10 0
10 −1
10 −2
10 −3 10 −2 10 −1 10 0
−50
−100
Phase [deg]
−150
−200
−250
−300
10 −3 10 −2 10 −1 10 0
Frequency [rad/s]
Figure 8.2 Bode plot of the estimated transfer function G (s) from β [deg] to h
[m] in assignment 8.1 for the speeds v = 3 (solid curves), 5 (dashed curves) and 7
knots (dotted curves).
51
Chapter 8. Design Examples
β kv α h
v
2 s
s
Figure 8.3 Block diagram of a submarine model which is valid for ω > 0.05 rad/s.
kvv
Ghβ (s) =
s3
(s + γ ω 0 )(s2 + 2ζ ω 0 s + ω 02 ) = 0
ur = L r href
8.2
52
Chapter 8. Design Examples
Purpose
The aim of the assignment is to control the angular speed of a fly-
wheel which is connected to another flywheel by a weak axis. The
second flywheel is driven by a motor. Different control strategies are
evaluated and compared with respect to performance.
Background
Figure 8.4 shows a simplified model of an elastic servo. It could
also constitute a model of a weak robot arm or an elastic antenna
system mounted on a satellite. The turn angles of the flywheels
M = km ⋅ I = km ki u
y = kω 2 ⋅ ω 2
53
Chapter 8. Design Examples
J1 = 22 ⋅ 10−6 kgm2
J2 = 65 ⋅ 10−6 kgm2
k f = 11.7 ⋅ 10−3 Nm/rad
d f = 2e − 5
d1 = 1 ⋅ 10−5 Nm/rad/s
d2 = 1 ⋅ 10−5 Nm/rad/s
km = 0.1 Nm/A
ki = 0.027 A/V
kω 1 = kω 2 = 0.0167 V/rad/s
Problem Formulation
The input is the voltage u over the motor and we want to control
the angular speed ω 2 of the outer flywheel.
It is desired to quickly be able to change ω c , while limiting the con-
trol system’s sensitivity against load disturbances and measurement
noise. The system also requires active damping, in order to avoid an
excessively oscillative settling phase.
Specifications
1. The step response of the closed loop system should be fairly well
damped and have a rise time of 0.1-0.3 s. The settling time to
±2% shall be at most 0.5 s. A graphical specification of the step
response is given in Figure 8.5.
2. Load disturbances must not give rise to any static errors.
3. Noise sensitivity should not be excessive.
Ziegler-Nichols Method
The Bode plot of the transfer function from u to ω 2 is shown in
Figure 8.6.
a. Use Ziegler-Nichols frequency method in order to determine suitable
PID parameters.
Ziegler-Nichols method often gives a rather oscillative closed loop
system. However, the obtained parameters are often a reasonable
starting point for manual tuning.
54
Chapter 8. Design Examples
1.4
1.2
0.8
0.6
0.4
0.2
0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
Figure 8.5 The step response of the closed loop system shall lie between the
dashed lines.
10 0
10 −1
10 −2
10 −3
10 −4
10 −5
10 0 10 1 10 2 10 3
−50
−100
−150
−200
−250
−300
10 0 10 1 10 2 10 3
Frequency [rad/s]
55
Chapter 8. Design Examples
b. The gain L r is chosen such that the stationary gain of the closed
loop system becomes 1, i.e. y = yr in stationarity. The coefficient L r
can hence be expressed in L and kω 2 . Do this.
In order to meet specification 2, one must introduce integral action
in the controller. One way to achieve this it thorough the control law
Z t
u(t) = − Lx(t) + L r yr (t) − L i ( y(s) − yr (s))ds
−∞
Lr
y −x u y
r 1
Σ
i
L Σ process
s i
x
−L
−1
Figure 8.7 Block diagram of the state feedback control system in assignment 8.2.
c. How does the augmented state space model look like? Introduce the
notion x e for the augmented state vector.
Since the states are not directly measurable, they must be recon-
structed in some way. A usual way is to introduce a Kalman filter
x̂˙ = A x̂ + Bu + K ( y − C x̂)
u = − L x̂ + L r yr − L i xi
56
Chapter 8. Design Examples
Lr
y −x u y
r 1
Σ
i
L Σ process
s i
^
x
Kalman
−L
filter
−1
Figure 8.8 Block diagram showing the Kalman filter and state feedback in as-
signment 8.2.
In order not to end up with too many free parameters, we place the
poles in a Butterworth pattern. I.e. the poles are equally distributed
on a half circle in the left half plane. We place the eigenvalues of
A′ − B ′ L′ on a half circle with radius ω m , whereas the eigenvalues of
A − K C are placed on a half circle with radius ω o (see Figure 8.9).
A suitable ω m can be obtained from Specification 1, i.e. that the
15
ωo
10
5 ωm
−5
−10
−15
−25 −20 −15 −10 −5 0 5
ln ǫ
Ts ( −
ζω
where ǫ is the maximal deviation from the final value. Since we have
a 4th degree system, we cannot use this approximation directly.
57
Chapter 8. Design Examples
If we, however, only consider the least damped pole pair (ζ = 0.38
and ω = ω m ) in Figure 8.9 we obtain
ln ǫ
ωm ( − (8.2)
Tsζ
1.6
1.4
1.2
0.8
0.6
0.4
0.2
0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
Figure 8.10 Step response of the closed loop system for ω m = 20 rad/s. Choosing
Lr according to sub-assignment b yields the system with the larger overshoot. The
other curve is the step response corresponding to Lr = 0.
58
Chapter 8. Design Examples
1.5
1
r and y
0.5
Time [s]
0
0 0.5 1 1.5 2 2.5 3 3.5 4
30
20
10
u
−10
Time [s]
−20
0 0.5 1 1.5 2 2.5 3 3.5 4
59
9. Interactive Comparison Between
Model Descriptions
There are many ways to describe the dynamics of processes and control
systems, e.g., step responses, transfer functions, state-space descriptions,
pole-zero diagrams, Bode diagrams, and Nyquist diagrams. A good way of
learning the correspondence between different descriptions is to use inter-
active tools. On the web page
http://aer.ual.es/ilm/
there are several interactive programs that may be downloaded for free.
The module Modeling is convenient to use to study model descriptions.
The interface of this module is shown in the figure below.
The model structure that you want to study is entered by "dragging"
poles and zeros in the pole-zero diagram. Parameters and dead time may
then be changed by dragging points or lines in the different diagrams, or
by entering numerical values for the transfer function. The best way of
learning to use the tool and examine its possibilities is to try things out by
experimenting with the different menus. More information is available on
the web page.
The gradation of the axes in the different diagrams can be changed by
clicking at the small triangles by the gradations. It is also possible to zoom
in and out.
Under the tab File you find the useful command “Reset data”, which
resets all values to default.
60
Chapter 9. Interactive Comparison Between Model Descriptions
ω2
G (s) =
s2 + 2ζ ω s + ω 2
61
Chapter 9. Interactive Comparison Between Model Descriptions
62
Solutions to Chapter 1. Model Building
and Linearization
1.1 a. A block diagram of the system is shown in Figure 1.1. The person
that takes a shower senses the temperature and the flow (measure-
ment signals), and adjusts the shower handle (control signal) to get
desired temperature and flow. Feedback is primarily used. Distur-
bances may be variations in water pressure and temperature in the
water pipes.
Temp Hot
Person Shower
Cold
Flow
b. A car driver uses several control signals: the gas pedal, the brake,
the steering wheel. The driver wants to control the car such that
it keeps on the road with desired velocity, and keeps safe distance
to other vehicles. Measurement signals are the speedometer, and
visual feedback of how the car turns, the distance to the car in front,
and other road conditions. The uses feedforward, e.g., to adjust the
velocity in advance before a curve, but also feedback, by looking at
the speedometer to keep desired velocity. A block diagram of the
system is shown in Figure 1.2.
c. The control signal is the heat from the stove plate. Measurement
signals from the systems are obtained by observing how intensively
the water boils, and sensing how soft the potatoes are. Feedback
is used, e.g., when adjusting the power of the stove plate when the
water boils too intensively. Feedforward is used when following a
given recipe, e.g., "the potatoes are done after 20 minutes" or "when
the water boils, decrease the heat of the stove plate to half of full
power". A block diagram is shown in Figure 1.3.
1.2 a.
v̇ = ku
The system is linear.
63
Solutions to chapter 1. Model Building and Linearization
Heat
Stove Heat
Stove Pot & Water Potatoes
handle
Audio / Visual
Human Sensing (softness)
b.
ẋ = ku
y= x
ṗ = v
ẋ1 = ku
ẋ2 = x1
y = x2
d. The term mx2 makes the system nonlinear. The stationary point is
given by
−0.001( x0 )2 + u0 = 0
which for u0 = 0.1 gives x0 = ±10. The stationary velocity thus
becomes y0 = 10 m/s.
ẋ = f ( x, u) = −mx2 + ku
y = ( x, u) = x
f
= −2mx
x
f
=k
u
=1
x
=0
u
64
Solutions to chapter 1. Model Building and Linearization
1
k
1.5 a. We can choose e.g. the height h as state variable. The volume change
in the tank is given by
65
Solutions to chapter 1. Model Building and Linearization
b.
ap 1
ḣ = − 2h + qin ( = f (h, qin ))
pA A
qout = a 2h ( = (h, qin ))
c. The outlflow must equal the inflow q0out = q0in . The level is calculated
by letting ḣ = 0, which yields
2
0 1 q0in
h =
2 a
1.6
ẋ1 0 1 0 x1 0
ẋ2
=
0 0 1
x2
0
+ u
ẋ3 −1 −2 −3 x3 1
x1
y = 1 0 0
x2
x3
1.7 a.
ẋ1 = x2
√
ẋ2 = − x1 − x1 x2 + u2
y = x1
66
Solutions to chapter 1. Model Building and Linearization
f1 ( x1 , x2 , u) = x2
√
f2 ( x1 , x2 , u) = − x1 − x1 x2 + u2
( x1 , x2 , u) = x1
f1 f1 f1
=0 =1 =0
x1 x2 u
f2 1 f2 f2
= − √ − x2 = − x1 = 2u
x1 2 x1 x2 u
=1 =0 =0
x1 x2 u
f1 f1 f1
=0 =1 =0
x1 x2 u
f2 1 f2 f2
=− = −1 =2
x1 2 x2 u
=1 =0 =0
x1 x2 u
0 = x12 x2 + 1
0 = x1 x22 + 1
x2 π 2
y = arctan +
x1 8
2
which yields x10 = −1, x20 = −1 and y0 = π
4 + π8 . Computation of the
partial derivatives now yields
f1 f1 f1 √
= 2x1 x2 = x12 = 2 cos u
x1 x2 u
f2 f2 f2 √
= x22 = 2x1 x2 = − 2 sin u
x1 x2 u
− x2 x1
= 2 = 2 = 4u
x1 x1 + x22 x2 x1 + x22 u
67
Solutions to chapter 1. Model Building and Linearization
ẋ1 = x2 = f1 ( x1 , x2 , u)
β
ẋ2 = ω 2 x1 − +u = f2 ( x1 , x2 , u)
x12
y = x1 = ( x1 , x2 , u)
β
r̈(t) = ω 2 r0 − +0=0
r20
68
Solutions to Chapter 2. Dynamical
Systems
2.1 a. The transfer function for a linear system on state-space form is given
by
1
Y (s) = U (s)
(s − 10)(s + 1) + 1
ÿ − 9 ẏ − 9y = u
We get
1
Y (s) = U (s)
Js2 + Ds
and thus the transfer function is
1
G (s) =
Js2 + Ds
ẋ1 = ẏ = x2
1 1
ẋ2 = ÿ = (− D ẏ + u) = (− D x2 + u)
J J
The system on state-space form is given by
0 1
ẋ = 0
D x + 1 u
0 −J J
y= 1 0 x
69
Solutions to chapter 2. Dynamical Systems
1
G (s) = C(sI − A)−1 B + D = 1(s − −1/ k)−1 1/ k =
1 + sk
d. The transfer function gives the following relation between Y (s) and
U (s)
(s3 + α s2 + β s) Y (s) = γ U (s)
Inverse Laplace transform gives
...
y + α ÿ + β ẏ = γ u
x1 = y
x2 = ẏ
x3 = ÿ
We may also use any of the "standard forms" for state-space descrip-
tions given in the collection of formulae (diagonal form, observable
canonical form, controllable canonical form). To write the system on
diagonal form we must factorize the transfer function, which is hard
when we don’t know the values of α and β . Thus, the controllable
or observable canonical forms are more convenient to choose. We
compare the coefficients in our transfer function to the structure in
the collection of formulae and get
a1 = α , a2 = β , a3 = 0, b1 = 0, b2 = 0, b3 = γ
70
Solutions to chapter 2. Dynamical Systems
5s + 8
c. G (s) = , ẏ + y = 5u̇ + 8u
s+1
3s2 + 7s + 18
d. G (s) = , ÿ + 2 ẏ + 5y = 3ü + 7u̇ + 18u
s2 + 2s + 5
2 5
G (s) = 2 + −
s+3 s+2
and by applying the inverse Laplace transform, one obtains the im-
pulse response
Comment. Because the system matrix was given in diagonal form, another
possibility would have been to compute the impulse response as
e−2t
0 5
h(t) = CeAt B + Dδ (t) = −1
1
+ 2δ (t), t ≥ 0.
0 e−3t 2
71
Solutions to chapter 2. Dynamical Systems
1 1
G (s) = +
s+1 s+2
sX = AX + B U
Y = CX + DU
Solve for X
(sI − A) X = B U
X = (sI − A)−1 B U
This gives
Y = C(sI − A)−1 B U + D U = C(sI − A)−1 B + D U
2.5 a. The poles are the solutions of the characteristic equation s2 + 4s+ 3 =
0, i.e. s = −1 and s = −3. The system lacks zeros. Since all poles
have negative real part, the system is stable.
72
Solutions to chapter 2. Dynamical Systems
c. At a step response, the input signal u(t) is a step, that has the
Laplace transform U (s) = 1s . The output becomes
1 1
Y (s) = G (s) U (s) =
s2 + 4s + 3 s
The final value can be calculated using the final value theorem
1 1 1
lim y(t) = lim sY (s) = lim s =
t→∞ s→0 s→0 s2 + 4s + 3 s 3
The final value theorem may be used only if we know that the final
value exists (i.e., that y(t) does not go to infinity). Since we have
shown that the system is stable, we know that the final value exists.
The initial value may, in the same manner, be computed using the
initial value theorem
1 1
lim y(t) = lim sY (s) = lim s =0
t→0 s→∞ s→∞ s2 + 4s + 3 s
1
Y (s) =
s2 + 4s + 3
1
lim y(t) = lim sY (s) = lim s =0
t→0 s→∞ s→∞ s2 + 4s + 3
e. The step response of the system is given by
1 1
Y (s) =
s2 + 4s + 3 s
1
Z (s) = sY (s) =
s2 + 4s + 3
We see that the derivative of the step response is the same as the
impulse response, and from the previous subproblem we thus get
lim z(t) = 0
t→0
2.6 a. The poles are the solutions the characteristic equation s2 + 0.6s +
0.25 = 0, i.e. s = −0.3 ± 0.4i. The system lacks zeros.
73
Solutions to chapter 2. Dynamical Systems
c. The input (a step) has the Laplace transform U (s) = 1s . The output
becomes
0.25
Y (s) = G (s) U (s) = 2
s(s + 0.6s + 0.25)
Because this system has complex poles, we first rewrite it as
ω2
Y (s) =
s(s2 + 2ζ ω s + ω 2 )
0.8
Amplitude
0.6
0.4
0.2
0
0 5 10 15 20
Time [s]
1
2.8 a. G (s) =
LCs2 + RCs + 1
s
1 A 2h0
b. G (s) = , T=
Ts + 1 a
74
Solutions to chapter 2. Dynamical Systems
det(λ I − A) = 0
b. If all the eigenvalues of A lie strictly within the LHP, we are guar-
anteed stability. If any eigenvalue lies strictly in the RHP we have
an unstable system. If, on the other hand, there are eigenvalues on
the imaginary axis, the system can be either stable or unstable.
In this example there are no eigenvalues in the RHP. Additionally,
all eigenvalues on the imaginary axis are distinct. This tells us that
the system is stable.
s3 + 2s2 + 3s + 7 = 0
2.11 First and second order systems are stable if and only if the coeffi-
cients in the denominator polynomial of the transfer function are
positive. All transfer functions except for G3 are stable. All step re-
sponses except for E corresponds to stable systems. Thus, G3 = E.
All transfer functions except G3 , G4 , and G7 have a static gain of
Gi (0) = 1, which means that the final value of the step response is
one. G7 has a static gain of G7 (0) = 2/3, which gives G7 = C.
Step response D has a derivative that is not equal to 0 at t = 0.
Checking the initial derivative of the transfer functions gives that
this only is true for G1 and G5 . G1 has a time constant of 10s while
G5 has a time constant of 1s. Thus, G5 = D.
Now two step responses remain, A and B, which corresponds to
second order systems with complex poles and a static gain of one.
The transfer functions that fulfills these specifications are G2 and
G6 . The relative damping ζ is less for G6 than for G2 , which gives
G2 = A and G6 = B.
2.12 1 The system has the poles in −1/4 ± i and a zero in −1. The
transfer function is thus
s+1 s+1
G (s) = K (K .
(s + 41 )2 + 1 s2 + 12 s + 1
75
Solutions to chapter 2. Dynamical Systems
76
Solutions to chapter 2. Dynamical Systems
2.13a. For the impulse response, u(t) = δ (t) (Dirac function). We have
U (s) = 1
Y (s) = G (s) U (s) = G (s)
Initial value:
lim y(t) = lim sY (s) = lim sG (s)
t→0 s→∞ s→∞
Final value:
lim y(t) = lim sY (s) = lim sG (s)
t→∞ s→0 s→0
All transfer functions have stable poles, and thus we may use the
final and initial value theorems.
y(0) limt→∞ y(t)
G1 (s) 1 0
G2 (s) 3 0
G3 (s) 0 0
G4 (s) 0 0
G5 (s) 0 1
G6 (s) 0 1
Both impulse responses in the figure have initial value 0 and final
value 0. Thus, they correspond to G3 (s) and G4 (s). The poles of
G3 (s) are located in s = −1, and the poles of G4 (s) in s = −3.
G4 (s) is thus a faster system, which corresponds to the impulse
response for lemonade. G3 (s) is slower, which corresponds to the
impulse response for whole grain pasta.
b. Normally, you eat a certain amount of food in a relatively short time,
and then do not eat for a longer period of time. Thus, you may model
food intake as an impulse, that occurs instantaneously compared to
the time it takes for the body to digest the food.
A step response in food intake would correspond to eating contin-
uously during a longer time. Feeding through intravenous therapy
could be described by a step response.
2.14a.
Y = G1 ( U + G2 Y )
Y (1 − G1 G2 ) = G1 U
G1
Y= U
1 − G1 G2
b.
Y = G2 ( H 1 U + G1 U + H 2 Y )
Y (1 − G2 H2 ) = ( G2 H1 + G2 G1 ) U
G2 H 1 + G2 G1
Y= U
1 − G2 H 2
77
Solutions to chapter 2. Dynamical Systems
Z = G1 ( U + G3 ( Z + G2 Z ))
Z (1 − G1 G3 − G1 G3 G2 ) = G1 U
G1
Z= U
1 − G1 G3 − G1 G3 G2
G2 G1
Y= U
1 − G1 G3 − G1 G3 G2
d.
Y = G2 (− H2 Y + G1 ( U − H1 Y ))
Y (1 + G2 H2 + G2 G1 H1 ) = G2 G1 U
G2 G1
Y= U
1 + G2 H 2 + G2 G1 H 1
The system has two input signals, R(s) and D (s). The transfer func-
tion from R(s) to Y (s) is
G P (s) G R (s)
G yr (s) =
1 + G P (s) G R (s)
G P (s)
G yd (s) =
1 + G P (s) G R (s)
1 G P (s)
E(s) = R(s) − D (s)
1 + G P (s) G R (s) 1 + G P (s) G R (s)
1
G er (s) =
1 + G P (s) G R (s)
78
Solutions to chapter 2. Dynamical Systems
G P (s) G R (s)
Gud (s) = −
1 + G P (s) G R (s)
s2 + 6s + 7 s+1 −1 2
G (s) = 2
= 2 +1= + +1
s + 5s + 6 s + 5s + 6 s+2 s+3
b0 s + b1 s+1
G (s) = +d= 2 +1
s2 + a1 s + a2 s + 5s + 6
The controllable canonical form can be directly read from the trans-
fer function
dx −5 −6 1
= x+
u
dt 1 0 0
y = 1 1 x + 1u
79
Solutions to Chapter 3. Frequency
Analysis
where √
0.01 1 + 100ω 2
p G (iω )p = √ √
1 + ω 2 1 + 0.01ω 2
and
arg G (iω ) = arctan 10ω − arctan ω − arctan 0.1ω
b. Reading from the plot yields p G (3i)p ( 0.09 and arg G (3i) ( 0. We
obtain
y(t) = 0.09 sin 3t
3.2 a. The air temperature will affect the water temperature much faster
in the small garden pool than in the sea. Faster influence means
that the gain is greater for higher frequencies. Thus, the solid line
represents the garden pool – G2 (s), and the dashed line the sea
water – G1 (s).
b. The time scale in the Bode diagram is hours. Thus, we convert the
period time to hours:
2π 2π
ω= = rad/h = 7 ⋅ 10−4 rad/h.
T 8760
We read off the dashed amplitude curve at this frequency and get
p G (iω )p ( 0.5
This means that the oscillation in the output (the water tempera-
ture) has half as big amplitude as the oscillation in the input (the
air temperature) at this frequency. The difference between the maxi-
mum and minimum temperature in the air is ∆ Tlu f t = 19○ C−(−5○ C
) = 24○ C. The difference between the maximum and minimum tem-
perature in the water thus becomes ∆ Tvatten = 0.5 ⋅ 24○ C = 12○ C.
80
Solutions to chapter 3. Frequency Analysis
2π 2π
ω= = rad/h = 0.26 rad/h.
T 24
We read off the solid phase curve at this frequency and get
30 ○
This means that the peak of the output signal will be 360 ○ ( 0.08
period = 0.08 ⋅ 24 h = 1.92 h later than the peak of the input signal.
Thus, the pool is as warmest around 15.00.
where
10 10
p G (iω )p =
2
= p
(iω ) + 0.5iω + 1 (1 − ω )2 + (0.5ω )2
2
and
10 2
arg G (iω ) = arg = − arg (1 − ω ) + 0.5ω i
(iω )2 + 0.5iω + 1
0.5ω
− arctan 1 − ω 2 , ω <1
= −π /2, ω =1
− arctan 0.5ω − π ,
ω >1
1 −ω2
10.4 sin (0.2t − 5.9○ ), 20.0 sin (t − 90.0○ ), 0.011 sin (30t − 179.0○ )
b. For ω = 0.2 one reads p G (iω )p ( 10 and arg G (iω ) ( −5○ . For ω = 1
one reads p G (iω )p ( 20 and arg G (iω ) ( −90○ . For ω = 30 one reads
p G (iω )p ( 0.01 and arg G (iω ) ( −180○ . The output is approximately
81
Solutions to chapter 3. Frequency Analysis
• Draw the asymptotes of the gain curve from low to high fre-
quencies, aided by the following rules of thumb
– A pole decreases the slope of the gain curve by 1 at the
corner frequency.
– A zero increases the slope of the gain curve by 1 at the
corner frequency.
• Draw the asymptotes of the phase curve from low to high fre-
quencies, aided by the following rules of thumb
– A (stable) pole decreases the value of the phase curve by
90○ at the corner frequency.
– A (stable) zero increases the value of the phase curve by
90○ at the corner frequency.
• Draw the real gain- and phase curves, aided by the asymptotes
and sample curves in the collection of formulae.
82
Solutions to chapter 3. Frequency Analysis
1
10
Magnitude
0
10
−1
10
0 1 2
10 10 10
−30
Phase
−60
−90
0 1 2
10 10 10
Frequency [rad/s]
3
Figure 3.1 The Bode plot of G (s) = 1+s/10
.
1
10
Magnitude
0
10
−1
10
−2
10
−2 −1 0 1
10 10 10 10
−45
Phase
−90
−135
−180
−2 −1 0 1
10 10 10 10
Frequency [rad/s]
10
Figure 3.2 Bode plot of G (s) = (1+10s)(1+s)
.
83
Solutions to chapter 3. Frequency Analysis
the phase curve of e−s , which can be obtained from the collection of
formulae or by computing some points and interpolating between
these.
Anyway, we see that the phase curve starts at 0○ and that the phase
then decreases both due to the pole (at ω = 1 rad/s) and the delay.
The delay causes the phase to approach −∞ for large ω .
The finished plot is shown in Figure 3.3.
0
10
Magnitude
−1
10
−1 0 1
10 10 10
−90
Phase
−180
−270
−360
−1 0 1
10 10 10
Frequency [rad/s]
e−s
Figure 3.3 Bode plot of G (s) = 1+s
.
1
Low frequency asymptote: G (s) ( .
s
Corner frequencies: ω = 1 rad/s (zero), ω = 10 rad/s (pole).
The gain curve starts with slope −1. The slope increases by 1 at
ω = 1 rad/s, due to the zero, and at ω = 10 rad/s the slope decreases
by 1, due to the pole. Consequently, the final slope is −1.
The phase curve starts at −90○ . The phase increases by 90○ at ω =
1 rad/s, due to the zero, and decreases by 90○ at ω = 10 rad/s, due
to the pole. Consequently, the final phase is −90○ .
The finished plot is shown in Figure 3.4.
where ζ = 0.2.
84
Solutions to chapter 3. Frequency Analysis
1
10
Magnitude
0
10
−1
10
−1 0 1 2
10 10 10 10
−30
Phase
−60
−90
−1 0 1 2
10 10 10 10
Frequency [rad/s]
1+s
Figure 3.4 Bode plot of G (s) = s(1+s/10)
.
2
Low frequency asymptote: G (s) ( .
s
Corner frequencies: ω = 0.2 rad/s (zero), ω = 2 rad/s (complex
conjugated pole pair).
The gain curve starts with slope −1. The slope is increased by 1 at
ω = 0.2 rad/s, due to the zero, and decreased by 2 at ω = 2 rad/s,
due to the pole pair. Consequently, the final slope is −2.
The phase curve starts at −90○ . The phase is increased by 90○ at
ω = 0.2 rad/s, due to the zero, and decreased by 180○ at ω = 2 rad/s,
due to the pole pair. Consequently, the final phase is −180○ .
The low damping (ζ = 0.2) of the complex conjugated pole pair gives
the gain curve a resonance peak at ω = 2 rad/s. Additionally, the
phase decreases rapidly at this frequency, cf. the sample curves in
the collection of formulae. The finished plot is shown in Figure 3.5.
3.5 a. The Nyquist curve start in 3 (the static gain) for ω = 0 rad/s. Both
the gain and phase are strictly decreasing, which makes the curve
turn clockwise while its distance to the origin decreases. The gain
and phase approach 0 and −90○ , respectively, for large values of ω .
The curve is thus bound to the fourth quadrant and approaches the
origin along the negative imaginary axis as ω → ∞.
85
Solutions to chapter 3. Frequency Analysis
2
10
Magnitude
1
10
0
10
−2 −1 0 1
10 10 10 10
−45
Phase
−90
−135
−180
−2 −1 0 1
10 10 10 10
Frequency [rad/s]
2(1+5s)
Figure 3.5 Bode plot of G (s) = s(1+0.2s+0.25s2 )
.
Aided by this analysis, one can now sketch the Nyquist curve by
choosing a few frequencies (e.g. ω = 1, 10 and 100 rad/s) and draw-
ing the corresponding points in the complex plane. The finished
curve is shown in Figure 3.6.
0.5
−0.5
Im
−1
−1.5
−2
−0.5 0 0.5 1 1.5 2 2.5 3 3.5
Re
3
Figure 3.6 Nyquist curve of G (s) = 1+s/10
.
86
Solutions to chapter 3. Frequency Analysis
−2
Im
−4
−6
−2 0 2 4 6 8 10 12
Re
10
Figure 3.7 Nyquist curve of G (s) = (1+10s)(1+s)
.
c. The Nyquist curve starts in 1 (the static gain) for ω = 0 rad/s. Both
the gain and phase are strictly decreasing, which makes the curve
turn clockwise while its distance to the origin decreases. The gain
and phase approach 0 and −∞, respectively, for large values of ω .
The curve will thus rotate infinitely many times as it approaches
the origin. The first intersections with the axis can be drawn by
reading off the magnitude when the phase is −90○ , −180○ , −270○
and −360○ , respectively. The finished curve is shown in Figure 3.8.
0.5
0
Im
−0.5
−1
87
Solutions to chapter 3. Frequency Analysis
3.6 Let the sought transfer function be G (s). The gain curve starts with
slope −1, which indicates that G (s) contains a factor 1s (an inte-
grator). We observe that there are two corner frequencies: ω 1 = 1
and ω 2 = 100 rad/s. The gain curve breaks upwards once at ω 1 and
downward once at ω 2 . Hence, the nominator hosts a factor 1 + s,
whereas the denominator contains a factor 1 + s/100. In addition,
G (s) contains a constant gain K . We thus have
K (1 + s)
G (s) =
s(1 + s/100)
3.7 Let the sought transfer function be G (s). The gain curve has two
corner frequencies: ω 1 = 2 and ω 2 = 100 rad/s. The gain curve
breaks downwards once at ω 1 and three times at ω 2 . Thus the de-
s 3
nominator of G (s) contains the factors (1 + 2s ) and (1 + 100 ) . The
slope of the low frequency asymptote is 1. Thus G (s) has a factor s
in the nominator. Additionally, G (s) contains a constant gain K . We
have
Ks
G (s) = s s 3
(1 + 2 )(1 + 100 )
p G L F (iω )p = K ω = 4
K =2
(Observe that one should use the LF asymptote rather than the
actual gain curve, when computing K .)
Finally we verify by checking that the phase curve matches this
system.
88
Solutions to Chapter 4. Feedback
Systems
0.01
Y (s) = G P (s) U (s) = U (s)
s + 0.01
4.2 Since r(t) = 0, the control error becomes e(t) = − y(t). Further, the
closed loop system has to be asymptotically stable.
G P (s)
Y (s) = G P (s)( F (s)− G R (s) Y (s)) \ Y (s) = F (s)
1 + G R (s) G P (s)
1 1 1
y(∞) = lim sY (s) = lim s =
s→0 s→0 (ms2 + ds + K ) s K
The function sY (s) has all poles in the left-half plane when the
parameters m, d and K are positive.
1 1
y(∞) = lim s K2
s→0 (ms2
+ ds + K 1 + s )
s
s
= lim 3 2
=0
s→0 ms + ds + K 1 s + K 2
under the assumption of stability, which is the case for m > 0, d > 0
and K 1 > md K 2 > 0. Rule: If the disturbance is a step, one needs
at least one integrator before the point in the block diagram where
the disturbance is introduced, in order to make the stationary error
zero.
89
Solutions to chapter 4. Feedback Systems
1
b. Inserting G P (s) = s+ 1 into (4.1) yields the relations
− K (s + 1)
U (s) = N (s)
s+1+ K
s+1
Y (s) = G P (s) U (s) + N (s) = N (s) =: G yn (s) N (s)
s+1+ K
In stationarity it holds that
Au ( 0.5
A y ( 0.5
Au ( 1
Ay ( 1
90
Solutions to chapter 4. Feedback Systems
1
0
1 θ re f Js2 M0
E(s) = ⋅ − ⋅ d
Q(s) s Q(s) s
1+K 2 1+ K 2
Js P(s) Js P(s)
0
s2 J P(s) θ re f P(s) M0
= 2 ⋅ − 2 ⋅ d
s J P(s) + K Q(s) s s J P(s) + K Q(s) s
P(0) P(0)
=0− Md0 = − M0
K Q(0) K Q(0) d
where we have assumed that Q(0) ,= 0 and that the conditions for
the final value theorem are fulfilled. We see that P(0) = 0 yields
e∞ = 0. In order to eliminate persistent angular errors caused by
disturbance momenta, it is consequently required to utilize a con-
troller G R (s) with at least one pole in the origin ( P(0) = 0).
4.5 The input of the thermocouple is the temperature u(t) of the bath,
which gives
1
u(t) = t [ U (s) = 2
s
The output y(t) is the reading of the temperature sensor. Thus
1 1
Y (s) = G (s) U (s) = ⋅ 2
1 + sT s
s2 T 1
e(∞) = lim sE(s) = lim = T = 10
s→0 s→0 1 + sT s2
91
Solutions to chapter 4. Feedback Systems
K
G L F (s) =
s2
K
p G L F (iω )p = ; p G L F (i)p = 1 [ K =1
ω2
At the corner frequency ω 1 = 1 rad/s the slope changes from −2
to 0, and at ω 2 = 5 rad/s it changes from 0 to −1. The transfer
function for the open loop system is thus
(1 + sT1 )2
Go (s) = 2
s (1 + sT2 )
Go (s)
G (s) =
1 + Go (s)
The output is Y (s) = G (s) R(s) and the error E(s) becomes
1 s2 (1 + 0.2s)
E(s) = R(s) − Y (s) = R(s) = 2 R(s)
1 + Go s (1 + 0.2s) + (1 + s)2
a.
a
R(s) = [ e∞ = lim e(t) = lim sE(s)
s t→∞ s→0
as2 (1 + 0.2s)
= lim =0
s→0 s2 (1 + 0.2s) + (1 + s)2
The system can thus track inputs r(t) = a without a stationary
error.
b.
b
R(s) = [ e∞ = lim e(t) = lim sE(s)
s2 t→∞ s→0
−
bs(1 + 0.2s)
= lim 2 =0
s→0 s (1 + 0.2s) + (1 + s)2
c.
2c
R(s) = [ e∞ = lim e(t) = lim sE(s)
s3 t→∞ s→0
2c(1 + 0.2s)
= lim = 2c ,= 0
s→0 s2 (1 + 0.2s) + (1 + s)2
The input r(t) = ct2 , however, yields a stationary error.
92
Solutions to chapter 4. Feedback Systems
1
R(s) = [ lim sE(s)
1 + s2 s→0
s2 (1 + 0.2s)
= lim s =0
s→0 (s2 (1 + 0.2s) + (1 + s)2 )(1 + s2 )
but the input r(t) = sin(t) yields the output y(t) = yo sin(t + φ ),
where
yo = p G (i)p , φ = ar G (i)
once transients have decayed. The error e(t) = r(t) − y(t) is thus
also a sinusoid and the limit
lim e(t)
t→∞
does not exist. This shows that the final value theorem should not be
used without caution. It is only valid for cases where a limit really
exists. The criterion is that all poles of sE(s) must have negative
real parts. (The factor s2 + 1 in the denominator yields two poles on
the imaginary axis.)
1 1 s3 + 3s2 + 3s + 1
S(s) = = =
1 + G P (s) G R (s) 1 + (s6.5
+1)3
s3 + 3s2 + 3s + 7.5
4.8 a. The left curve shows the complementary sensitivity function, whereas
the sensitivity function is given by the right curve.
93
Solutions to chapter 4. Feedback Systems
Go K
G (s) = = 2
1 + Go s + 2s + K
The poles of the closed loop system are given by the characteristic
equation √
s2 + 2s + K = 0 [ s = −1 ± 1 − K
For K = 0 the roots s1,2 = 0, −2, i.e. the poles of the open loop
system, are obtained. The closed loop system G (s) has a double pole
in s = −1 for K = 1. And as K → ∞ the roots become
s1,2 = −1 ± i∞
94
Solutions to chapter 4. Feedback Systems
Go (s) K Q(s)
G (s) = =
1 + Go (s) P(s) + K Q(s)
P(s) + K Q(s) = 0
\s(s + 1)(s + 2) + K (s + 10)(s + 11) = 0
\s3 + (3 + K )s2 + (2 + 21K )s + 110K = 0
15 2
K2 − K+ >0
7 7
It is fulfilled for K > 2 and K < 1/7. The closed loop system is
hence stable for
1
0<K <
7
and
K >2
b. Find the root locus for the characteristic equation, P(s)+ K Q(s) = 0
Let n = the degree of P(s) and m = the degree of Q(s). The root
locus has a maximum of max(n, m) = 3 branches.
Starting points:
P(s) = 0 [ s = 0, −1, −2
Ending points:
95
Solutions to chapter 4. Feedback Systems
have negative real parts. This is the case if all coefficients are pos-
itive and if
3⋅2 > K
The system is thus asymptotically stable if 0 < K < 6.
96
Solutions to chapter 4. Feedback Systems
The signal sE(s) has all poles in the left-half plane when 0 < K < 6,
according to sub-assignment a. For this case we can utilize the final
value theorem
0.1(s + 1)(s + 2) 0.2
e(∞) = lim s =
s→0 s(s(s + 1)(s + 2) + K ) K
In order to obtain a stationary error less than 5 mV for the given
reference, it is required that K > 40. For such large values of K
the system is, however, not stable. It it hence impossible to meet the
specification.
4.12 According to the Nyquist theorem, the closed loop system is stable
exactly for those K > 0, which are also
a. K < 2
b. K < 1/1.5 = 2/3
c. K < 1/1.5 = 2/3
d. K < 1/(2/3) = 1.5
4.13 The Nyquist curve intersects the negative real axis when arg( G P (iω )) =
−π , i.e. when
−3 arctan(ω ) = −π
This is fulfilled when
π √
ω = tan = 3
3
The intersection point is given by
√ 1
p G P (i 3)p =
8
This means that the system is stable for K < 8.
97
Solutions to chapter 4. Feedback Systems
4.15 The easiest way to solve the problem is through the Nyquist theorem.
The transfer function of the process is
e−9s
G P (s) =
(1 + 20s)2
−9ω − 2 arctan(20ω ) = −π
ω 0 ( 0.1
The next step is to determine the process gain for the given fre-
quency.
1
p G (iω 0 )p = = 0.2
1 + 400ω 02
This gives us the gain margin
1
Am = =5
0.2
The gain K = 5 is thus the maximal admissible gain.
25(1 + 4ω 2c ) = ω 2c (1 + 100ω 2c )
ω 4c − 0.99ω 2c − 0.25 = 0
ω 2c ( 1.199
ω c ( 1.1 rad/min
98
Solutions to chapter 4. Feedback Systems
60 π
L≤ ⋅ = 1 min
ω c 180
4.17a. True. Am = 1/p K G P (iω 0 )p, where ω 0 is the frequency for which the
Nyquist curve intersects the negative real axis.
d. True. The system is stable for K = 1 and all poles of G P (s) lie in the
left half plane. Consequently, the simplified Nyquist criterion can
be applied. For K = 2, the point −1 lies to the right of the Nyquist
curve, when it is traversed as ω increases. The closed loop system
is thus stable.
4.18a. This is the definition of the gain margin. From the plot one sees
that the phase −180○ corresponds to the gain ∼ 0.4. This yields the
gain margin 1/0.4 = 2.5.
b. This is the definition of the phase margin. From the plot one sees
that for gain 1, the phase is approximately −140○ . This yields a
phase margin of approximately 180○ − 140○ = 40○ .
4.19 The cross-over frequency and phase margin are read to be ω c = 0.07
and ϕ m = 40○ , respectively. The delay margin becomes
π
ϕm 40○ ⋅ 180○
Lm = = = 10
ωc 0.07
99
Solutions to Chapter 5. State Feedback
and Kalman Filtering
The controllable states are described by the vector (4, −2, 1)T .
5.3
C 1 1
Wo =
=
CA −1 −1
We see that Wo is singular (det Wo = 0). The state x is non-observable
if and only if (iff)
Wo x = 0
We obtain a non-observable x iff x1 + x2 = 0. The non-observable
states are thus given by
1
x =α
−1
where α is a number ,= 0.
100
Solutions to chapter 5. State Feedback and Kalman Filtering
x2
x1
101
Solutions to chapter 5. State Feedback and Kalman Filtering
5.6 a. 5 −10
Ws = B AB =
0 0
Ws has rank 1, i.e. the system is not controllable. The states which
can be reached in finite time from the origin are determined by the
columns of Ws . The controllable states can be parametrized by t as
x = t ⋅ (1 0)T .
5.7 a. True. Since the system is controllable, one can place the poles of the
closed loop system arbitrarily by means of linear feedback from all
state variables.
b. False. A linear state feedback does not affect the zeros of the closed
loop system.
lr
G (0) = C(− A + B L)−1 Blr = =1
4
yielding lr = 4.
(s + 4 + 4i)(s + 4 − 4i) = s2 + 8s + 32
102
Solutions to chapter 5. State Feedback and Kalman Filtering
3
G yr (0) = C(− A + B L)−1 Blr = lr = 1
32
which yields lr = 32/3.
(s + 8)(s + 8) = s2 + 16s + 64
1
X1 = K1 U
s
1
X 2 = K2 X 1
s
1
X3 = X2
s
which gives
ẋ1 = K 1 u
ẋ2 = K 2 x1
ẋ3 = x2
y = x3
103
Solutions to chapter 5. State Feedback and Kalman Filtering
u = ure f − Lx
The poles of the closed loop system are given by the eigenvalues of
A − B L, i.e. the roots of the closed loop characteristic equation
We seek L e = l1 l2 l3 such that
s3 + l2 s2 + l1 s − l3 " s3 + (α + 2ζ ω )s2 + (ω 2 + 2ζ ωα )s + α ω 2
104
Solutions to chapter 5. State Feedback and Kalman Filtering
l1 = ω 2 + 2ζ ωα
l2 = α + 2ζ ω
l3 = −α ω 2
T
5.12 The estimation error x̃ fulfills x̃˙ = ( A− K C) x̃. where K = k1 k2 .
The characteristic equation of the estimation error becomes
(s + 4)2 = s2 + 8s + 16 = 0
(s + 4)2 = s2 + 8s + 16 = 0
d x̂
= A x̂ + Bu + K ( y − C x̂)
dt
For x̃ we have
d x̃
= ( A − K C) x̃
dt
Determine K such that all eigenvalues of the matrix A − K C are
placed in λ = −6.
105
Solutions to chapter 5. State Feedback and Kalman Filtering
( (
4 + k1 + 3k2 = 6 k1 + 3k2 = 2
[
3 + 3k1 + 9k2 = 9 k1 + 3k2 = 2
This leaves only one equation, which implies that there exists in-
finitely many solutions, e.g. k1 = 2, k2 = 0 or k1 = 0, k2 = 23 etc.
The drawback of the proposed observer pole placement is that it
yields an estimation slower than the closed loop system. This does
not affect the response to reference changes, which is governed by
the poles of the closed loop system. However, the handling of process
disturbances becomes slower.
Comment
An inspection of the system’s observability shows that
C 1 3
det Wo = = =0
C A −1 −3
I.e. the system is not observable. The transfer function of the system
is given by
s+3 1
G (s) = C(sI − A)−1 B = =
s2 + 4s + 3 s+1
The eigenvalue −3 corresponds to a non-observable mode. The mode
is, however, controllable, which follows from the canonical control-
lable form realization of the system. The characteristic equation of
A − K C can be written
This means that the Kalman filter has to estimate the non-observable
mode with its own speed. I.e. (at least) one of the eigenvalues of
A − K C must be placed in −3. This explains the failure to compute
a Kalman filter when the eigenvalues were to be placed in −6 and a
success when they were to be placed in −3. Note that in cases such
as this one, the result is either that there does not exist a solution K
to the Kalman filter problem, or that it exists infinitely many solu-
tions. When the system is observable, there exists a unique solution
K to the Kalman filter.
106
Solutions to chapter 5. State Feedback and Kalman Filtering
5.14a.
s −1
det(sI − ( A − B L)) = det
= s2 + l2 s + l1
l1 s + l2
" s2 + 2ζ ω s + ω 2
I.e. l1 = ω 2 , l2 = 2ζ ω . The transfer function from r to y is given by
1
Y= lr R
s2 + l2 s + l1
This transfer function has static gain 1 if
l r = l1 = ω 2
b.
s + k1 −1
det(sI − ( A − K C)) = det
= s2 + k1 s + k2
k2 s
" s2 + 2as + a2
which yields k1 = 2a, k2 = a2 .
c. We have
x̂˙ = A x̂ + Bu + K ( y − C x̂) = ( A − B L − K C) x̂ + K y + Blr r
u = − L x̂ + lr r
Thus
d x A − BL BL x Blr
=
+
r
dt x̃ 0 A− KC x̃ 0
The characteristic equation is given by
A − BL BL
det sI −
0 A− KC
= det(sI − ( A − B L)) det(sI − ( A − K C))
= s2 + 2ζ ω s + ω 2 s2 + 2as + a2 = 0
− 1
A − BL
BL Blr
C 0 sI −
=
0 A− KC 0
= C(sI − ( A − B L))−1 Blr
i.e. the same transfer functions when the states are measured di-
rectly rather tan estimated by means of a Kalman filter.
107
Solutions to chapter 5. State Feedback and Kalman Filtering
5.15
C 1 0 0
Wo =
CA
=
0 1 0
2
CA 0 0 1
the observability matrix is non-singular (has full rank), i.e. the sys-
tem is observable.
det (sI − ( A − K C)) = s3 + k1 s2 + k2 s+ k3 = (s + α ) s2 + 2ζ ω s + ω 2
Note that x̂3 , our estimation of the zero error, is a pure integration
of y − x̂1 .
108
Solutions to Chapter 6. Design methods
The gain and phase shift for a frequency ω are directly obtained
from the gain function A(ω ) and phase function φω of the controller,
respectively.
s
1
A(ω ) = p G R (iω )p = K 1 + (ω Td − )2
ω Ti
1
φ (ω ) = arg G R (iω ) = arctan(ω Td − )
ω Ti
1
ω min = √
Ti Td
A(ω min ) = K
φ (ω min ) = 0
Note that the phase shift is negative for ω < ω min (phase lag) and
positive for ω > ω min (phase lead).
6.2 a. The dashed gain curve is identical to the nominal one, except that
it is raised by a factor 4. This is thus the case where K has been
multiplied by 4. Observe that the dashed phase curve is not visible in
the plot since it coincides with the solid phase curve. The dotted gain
curve differs from the nominal (solid) curve at low frequencies, for
which it is lower. This indicates that Ti has been increased, resulting
in decreased low frequency gain. Also note that the phase curve
has been raised for low frequencies. The last (dash-dotted) curve
apparently corresponds to the case where Td has been increased.
This is further indicated by the factor 4 raise of the gain curve for
high frequencies. Also for this case, one can notice a certain increase
in the phase, although for somewhat higher frequencies.
The dashed step response is faster and less damped than the nom-
inal (solid) one. This is a characteristic sign of an increased gain
K . The corresponding Bode plot confirmingly shows that the cut-
off frequency, ω c , has increased (faster), while the phase margin
has decreased (less damped. The dotted step response features a
slow mode both in the reference- and load disturbance responses.
Observe the relatively fast increase in the reference response to ap-
proximately 0.8, followed by a slow convergence to 1. This must be
109
Solutions to chapter 6. Design methods
due to decreased integral action. The integral time Ti has thus in-
creased in this case. The corresponding Bode plot shows that ω c is
virtually unchanged. This is seen in the step response by the fact
that the first part has approximately the same speed as the nomi-
nal case, whereas the following slow settling is due to the decreased
low frequency gain. The last (dash-dotted) step response obviously
corresponds to an increase of the derivative time Td . The reference
response is subject to an fast initial increase, followed by a some-
what slower settling. This is seen in the Bode plot by the fact that
the high frequency gain has increased, while the low frequency gain
has remained unchanged. The load response is somewhat slower and
more damped than in the nominal case.
b. The dashed gain curve is lowered by a factor 2 in comparison to the
nominal one, corresponding to a decreased value of K . The dashed
phase curve consequently coincides with the nominal (solid) case.
The dotted gain curve has been increased for low frequencies, i.e. Ti
has decreased. The dash-dotted gain curve has been lowered at high
frequencies, i.e. Td has decreased.
The dashed step response is slower and more damped than the nom-
inal one. This indicates that K has decreased, since neither a de-
crease in Ti nor Td would yield a more damped step response. This
is further confirmed by the Bode plot. The only case where ω c has
decreased is when K has decreased. It is also the only case for which
the phase margin has increased. The two remaining step responses
are both less damped than the nominal one. In order to determine
which of these corresponds to a decrease of Ti , we look at the corre-
sponding Bode plot (the dotted one). This shows that the cutoff fre-
quency ω c has increased somewhat compared to the other nominal
case. The dash-dotted Bode plot, however, shows that the decrease
of Td has not changed ω c . The dotted step response is initially some-
what faster than the nominal (solid) one, whereas the dash-dotted
one is initially approximately as fast as the nominal one. This im-
plies that the dotted step response corresponds to a decrease in Ti ,
while the dash-dotted one corresponds to a decrease in Td .
110
Solutions to chapter 6. Design methods
s2 + 2ζ ω s + ω 2
ki
Θ = GP I = I
Js2 + Ds
and the transfer function of the PID controller, G R , is given by
1
I = G R (Θ re f − Θ) = K 1 + + sTd (Θ re f − Θ)
sTi
GR GP
Θ = G Θ re f = Θ re f
1 + GR GP
111
Solutions to chapter 6. Design methods
1
Gr (s) (
s
I.e. the gain curve is a straight line with slope = -1 and arg Gr (iω ) =
−90○ . The slope of the gain curve increases to 0 at the corner fre-
quency ω 1 = 1.
The high frequency asymptote is Gr (s) ( 1 with p Gr (iω )p = 1, i.e.
slope = 0 and arg Gr (iω ) = 0. The corresponding Bode plot is shown
in Figure 6.1.
Gr (s) = K (1 + Td s) = 1 + s
The low frequency asymptote becomes Gr (s) ( 1, i.e. the gain curve
is a straight line with magnitude 1 and slope = 0 and the phase
curve is described by arg Gr (iω ) = 0○ . The slope of the gain curve
increased to +1 at the corner frequency ω 1 = 1.
The high frequency asymptote is given by Gr (s) ( s, i.e. the slope of
the gain curve is +1 and the phase curve is described by arg Gr (iω ) =
+90○ . The corresponding Bode plot is shown in Figure 6.2.
−2 arctan 20ω 0 − 9ω 0 = −π
112
Solutions to chapter 6. Design methods
1
Kc = =5
0.2
and the period time is
2π
To = = 63
ωo
The controller parameters become
(
K = 0.45K c = 2.25
Ti = To /1.2 = 53
1 1
sX = − X + U
30 15
Y=X
1 Ti s + 1
G R = K (1 + )= K
Ti s Ti s
113
Solutions to chapter 6. Design methods
2K + 1 K
s2 + s+
30 Ti 15
This is true if the coefficients for the polynomials are equal, i.e.,
2K + 1
= 0.2
30
K
= 0.01
Ti 15
K = 2.5
Ti = 16.7
K0 = 5
2π
T0 = = 20.9
0.3
we get the controller parameters K = 2.25 and Ti = 17.4.
114
Solutions to chapter 6. Design methods
1 L/2 + T
K = =1
K p L/2 + λ
Ti = T + L/2 = 2.2s
TL
Td = = 0.33s
L + 2T
6.9 a. The step response of the system is shown in Figure 6.3.
115
Solutions to chapter 6. Design methods
6.10a. The figure does not allow for any greater precision. Draw the tan-
gent of the step response where the derivative attains a maximum
and study the intersection of the tangent and the two coordinate
axis. The parameter a is given by the distance between 0 and the
intersection with the vertical axis, whereas b is given by the dis-
tance between 0 and the intersection with the horizontal axis. In
our example we have a = 0.65 and b = 4. From the table we obtain
the following controller parameters: K = 1.9, Ti = 8 and Td = 2.
b. The critical gain K c is the gain which causes the Nyquist curve to
pass through -1. In our case we have K c = 1/0.55 = 1.8. The critical
period T0 corresponds to the frequency at ’o’, i.e. T0 = 2π /ω = 14.6.
This yields the controller parameters: K = 1.1, Ti = 7.3 and Td =
1.8.
c. The value of K obtained from the last method is smaller than the
values obtained through Ziegler-Nichol’s methods.
116
Solutions to chapter 6. Design methods
ωc Mω c
arg G k (iω c ) = arctan − arctan
a a
s + 0.04 s + 0.04
G k (s) = 10 =
10s + 0.04 s + 0.004
In Figure 6.4 Bode plots for both the uncompensated open loop sys-
tem K G P (s) and the compensated open loop system K G k (s) G P (s)
are shown.
The compensation link alters the transient behavior of the system.
Figure 6.5 shows how the overshoot of the step response has in-
creased, compared to the uncompensated system. Also the settling
time has increased, partly due to the slow mode in the compensa-
tion link. The purpose of introducing the compensation link was to
decrease the ramp error. Figure 6.6 shows the error e = r − y for
both the uncompensated and compensated systems, with r = t.
As seen from the figure, the compensated system fulfills the crite-
rion of a ramp error less than 0.2.
s+b
G k (s) = K N
s + bN
117
Solutions to chapter 6. Design methods
Figure 6.4 Bode plot of the uncompensated open loop system (solid line) and
compensated open loop system (dash-dotted line) in assignment 6.12. K = 1 for
both cases.
Figure 6.5 Step responses of the uncompensated closed loop system (solid line)
and the compensated closed loop system (dashed line) in assignment 6.12.
1.1
p G P (iω c )p = p =1
ω c ω 2c + 1
118
Solutions to chapter 6. Design methods
Figure 6.6 Ramp error of the uncompensated system (solid line) as well as the
compensated system (dashed line) in assignment 6.12.
Figure 6.7 Bode plot of the uncompensated open loop system (solid line) as well
as the compensated open loop system (dash-dotted line) in assignment 6.13.
We have
119
Solutions to chapter 6. Design methods
s + 1.2
G k (s) = 4.2
s + 2.4
Figure 6.7 shows the Bode plot of the uncompensated open loop sys-
tem G P (s) as well as the compensated open loop system G k (s) G P (s).
Figure 6.8 shows the step responses of the uncompensated and com-
pensated systems.
Figure 6.8 Step response of the uncompensated closed loop system (solid line)
as well as the compensated closed loop system (dashed line) in assignment 6.13.
s+b
G k (s) = K K ⋅ N
s + bN
The specification implies that the low frequency gain shall not de-
crease (which would increase the stationary error). The cross-over
frequency shall increase by a factor 3 and the phase margin shall
remain unchanged.
The open loop transfer function is
s+b 1
G0 (s) = G k (s) G1 (s) = K K ⋅ N ⋅
s + bN s(s + 1)(s + 2)
120
Solutions to chapter 6. Design methods
Figure 6.9 Bode plot of the uncompensated system G1 (solid line) and compen-
sated system G k G1 (dash-dotted line) in assignment 6.14.
p G k (iω ∗c )p ⋅ p G1 (iω ∗c )p = 1
√
The magnitude of the compensator is p G k (iω ∗c )p = K K N. Numeri-
cal calculations give p G1 (iω ∗c )p = 0.183. Hence
1
KK = √ = 1.9
N ⋅ 0.183
The step response of the uncompensated and compensated systems,
respectively, are shown in Figure 6.10 and the ramp response is
shown in Figure 6.11. Since K K > 1 the stationary errors become
smaller than before, thus fulfilling the specifications.
6.15 From the Bode plot of Go (s) (see Figure 6.12) we obtain φ m = 20○
and ω c = 0.7 rad/s. Unchanged speed necessitates a compensation
link which does not affect the cross-over frequency. We hence need a
phase lead of ∆φ m = 30○ at ω = ω c = 0.7 rad/s. We utilize a phase
lead compensation link
s+b
G k (s) = K N
s + bN
1. The sample curves in the collection of formulae yield N = 3.
√ 0.7
2. b N = ω c [ b = √ 3
= 0.40
√ 1
3. p G k (iω c ) Go (iω c )p = K N ⋅ 1 gives K = √ = 0.58
N
121
Solutions to chapter 6. Design methods
Figure 6.10 The step response of the uncompensated closed loop system (solid
line) as well as the compensated closed loop system (dashed line) in assign-
ment 6.14.
Figure 6.11 The ramp response of the uncompensated system (solid line) as well
as the compensated system (dashed line) in assignment 6.14.
s + 0.4
G k (s) = 0.58 ⋅ 3
s + 1.2
1.5
lim sE(s) = = 1.29
s→0 2K
which fulfills the specification. Figure 6.13 shows the step response
of the system before and after the compensation. The ramp error is
shown in Figure 6.14. The fact that the ramp error is increased by
the compensation is due to K < 1.
122
Solutions to chapter 6. Design methods
y(t)
Figure 6.13 Step response of the uncompensated closed loop system (solid line)
and compensated system (dashed line) in assignment 6.15.
123
Solutions to chapter 6. Design methods
Figure 6.14 Ramp error of the uncompensated closed loop system (solid line) as
well as the compensated closed loop system (dashed line) in assignment 6.15.
Figure 6.15 Bode plot of the uncompensated open loop system (solid line) as well
as the compensated open loop system (dash-dotted line) in assignment 6.16.
124
Solutions to chapter 6. Design methods
Figure 6.16 shows the step response before and after the compensa-
tion. The ramp errors of the uncompensated closed loop system and
Figure 6.16 Step response of the uncompensated closed loop system (solid line)
as well as the compensated closed loop system (dashed line) in assignment 6.16.
Figure 6.17 Ramp error of the uncompensated closed loop system (solid line) as
well as the compensated closed loop system (dashed line) in assignment 6.16.
Comment:
Since we have decreased the open loop gain we obtain a decreased
cross-over frequency and hence a somewhat slower system. In Fig-
ure 6.16 one especially notes the slow mode which appears as the
process settles. It is caused by the slow pole of the controller in com-
bination with the low gain. The rise time and damping are, however,
virtually unaffected. An alternative to decreasing the open loop gain,
in order to maintain the desired phase margin, would be to introduce
a phase lead compensation link.
125
Solutions to Chapter 7. Controller
Structures
1
G1 (s) H (s) + 1 = 0 \ H (s) = −
G1 (s)
7.2 A block diagram for the system is shown in Figure 7.1. Mass balance
feedforward
v
G
F
−1
−1
Figure 7.1 Block diagram of the level controlling system in assignment 7.2.
1
H (s) = ( X (s) − V (s))
s
The transfer function of the tank is thus
1
GT (s) =
s
GT G V K K
G (s) = = 2
1 + GT G V K 0.5s + s + K
126
Solutions to chapter 7. Controller Structures
s2 + 2s + 2K
(s + ω )2 = s2 + 2ω s + ω 2
GT 1 + 0.5s
H (s) = − V (s) = − V (s)
1 + GT G V K s(1 + 0.5s) + K
0.1
h(∞) = lim sH (s) = −
s→0 K
given that the limit exists and that the final value theorem is ap-
plicable.
GT G V G R K (1 + sTi )
G (s) = =
1 + GT G V G R s(1 + 0.5s)sTi + K (1 + sTi )
2K
s3 + 2s2 + 2K s +
Ti
(s + ω )3 = s3 + 3ω s2 + 3ω 2 s + ω 3
2
ω=
3
2
K =
3
9
Ti =
2
127
Solutions to chapter 7. Controller Structures
c. The relation between the flow disturbance v and the level h is given
by
GT ( G V G F − 1)
H (s) = V (s)
1 + GT G V G R
To eliminate the influence of v, we choose
1
G F (s) = = 1 + 0.5s
GV
s2 + (3 + K )s + K /Ti = 0
(s + 2 − 2i)(s + 2 + 2i) = s2 + 4s + 8 = 0
b. The feedforward K f affects the zeros of the closed loop system, but
leaves the poles unaffected. The poles can be placed by means of
the controller H in order to obtain adequate supression of distur-
bances, cf. sub-assignment a above. One can subsequently translate
the zeros by means of K f in order to e.g. reach a desired over-
shoot in the reference step responses. The zero of the closed loop
system is eliminated by choosing K f = − K . With the pole place-
ment in√sub-assignment a, which corresponds to a relative damping
ζ = 1/ 2 ( 0.7, the overshoot of the closed loop system becomes
approximately 5%.
7.5 The system has three inputs: the reference yr and the two distur-
bances v1 and v2 . The transfer functions between these three signals
and the output y are given by
G1 G2 G R1 G R2 G1 G2
Y= Yr + V1
1 + G1 G R1 + G1 G2 G R1 G R2 1 + G1 G R1 + G1 G2 G R1 G R2
(1 + G1 G R1 ) G2
+ V2
1 + G1 G R1 + G1 G2 G R1 G R2
128
Solutions to chapter 7. Controller Structures
Kf
Yr H + + G(s)
H –1
Let us call the three transfer functions G yr , Gv1 and Gv2 , respec-
tively. Ideally we would have G yr = 1 and Gv1 = Gv2 = 0 for all
frequencies. This is, however, not achievable. Nonetheless, we can
assure that it holds in stationarity, i.e. for s = 0. For a P controller
we have G R (0) = K , where K is the gain of the controller. For a PI
controller it holds that G R (0) = ∞.
The transfer function G yr becomes unity if G R2 is a PI controller.
The transfer function Gv1 becomes 0 if any of the controllers are
PI. The transfer function Gv2 , however, is only zero if G R2 is a PI
controller.
Consequently G R2 must contain an integral part in order to guaran-
tee 0 stationary control error. The controller G R1 can then be chosen
to be a P controller. (If we furthermore want the internal signal y1
to coincide with its reference, also this controller would need an
integral part.)
K 1 G1 (s) 2K 1
Ginner (s) = =
1 + K 1 G1 (s) s + 2 + 2K 1
In order to make the system 5 times as fast, the pole of the closed
loop system must be placed in s = −10, calling for K 1 = 4.
129
Solutions to chapter 7. Controller Structures
10(2s + 1)
Gouter (s) =
s3 + 10s2 + 20s + 10
and has poles in approximately −7.516, −1.702 and −0.7815 where the
slower pole (s = −0.7815) will be the one essentially determining the
speed of the system. This corresponds fairly well to the specified speed.
10−3
Y (s) = M (s)
s
K
Y (s) = Yr (s)
K + 103 s
K s − 0.01
Y (s) = Yr (s) + F (s)
K + 1000s (s + 0.1)(1000s + K )
1
Let Yr (s) = 0. A step disturbance in the steam flow F (s) = s thus
gives
s − 0.01 1
Y (s) =
(s + 0.1)(1000s + K ) s
The final value theorem yields
s − 0.01 1 −0.1
lim y(t) = lim sY (s) = lim s =
t→∞ s→0 s→0 (s + 0.1)(1000s + K ) s K
0.1
e = yr − y = − y =
K
130
Solutions to chapter 7. Controller Structures
10−3 s − 0.01
Y (s) = ( M (s) + H (s) F (s)) + 10−3 F (s)
s s(s + 0.1)
10−3 10−3 s − 0.01
= M (s) + + H (s) F (s)
s s s + 0.01
ϕm
Lm =
ωc
π
ϕ m = π + arg G0 (iω c ) = π − − arctan ω c = 0.675
2
7.9 a. The one second delay e−s is considered part of the process.
Controller G R (s) = K
1
Process G P (s) = e−s
s(s + 1)
1
Model Ĝ P (s) = G P (s) = e−s
s(s + 1)
1
Model without delay Ĝ 0P (s) =
s(s + 1)
131
Solutions to chapter 7. Controller Structures
1
10
Magnitude 0
10
−1
10
−2 −1 0 1 2
10 10 10 10 10
60
50
40
Phase
30
20
10
−10
−2 −1 0 1 2
10 10 10 10 10
Frequency [rad/s]
The Bode plot of the controller is shown in Figure 7.3. One notes
that the Smith predictor gives a large phase lead at the cross-over
frequency of the initial system.
c.
2s(s + 1) 2s(s + 1)
U (s) = E(s) ( E(s)
s(s + 1) + 2 − 2e−s s(s + 1) + 2 − 2(1 − s)
2(s + 1)
= E(s)
s+3
This is a phase lead link with N = 3.
k
p G (iω )p =
ω
It is sufficient to read the value of the gain curve at a single fre-
quency in order to determine k. The gain is e.g. 1 at approximately
ω = 4.5. This yields
k
1= \ k = 4.5
4.5
132
Solutions to chapter 7. Controller Structures
arg G (iω ) = −π /2 − ω L
−π = −π /2 − 120L \ L = 0.013
133
Solutions to Chapter 8. Design Examples
8.1 a. The phase curve for v = 3 knots cuts −180○ at ω o ( 0.03 rad/s. At
this frequency we have p G (i0.03)p ( 2. The gain K must hence be
smaller than 0.5 in order to yield a stable closed loop system.
kvv
Ghβ (s) =
s3
From the Bode plot one sees that p Ghβ (i ⋅ 0.1)p ( 0.04 for v = 3 knots
= 3 ⋅ 1.852/3.6 ( 0.5144 ⋅ 3 m/s, which yields
0.13 ⋅ 0.04
kv ( ( 2.6 ⋅ 10−5
3 ⋅ 0.5144
134
Solutions to chapter 8. Design Examples
10 2
10 1
Magnitude
10 0
10 −1
10 −2
10 −3
10 −3 10 −2 10 −1 10 0
0
0
Phase [deg]
−50
-50
−100
-100
−150
-150
−200
-200
10 −3 10 −2 10 −1 10 0
Frequency [rad/s]
Figure 8.1 Bode plot of the PD compensated open loop system in assignment 8.1.
The solid curves show the case v = 7 knots. Note that the latter case yields an
unstable closed loop system.
s3 + K kv v = 0
Since not all coefficients are positive, the closed-loop system is not
asymptotically stable for any value of K . In sub-assignment a it
was concluded through the measured frequency response that the
closed loop system was stable for K < 0.5. The explanation to this
apparent contradiction is found in the Bode plot which was used in
sub-assignment a: The approximation only holds for high frequen-
cies (ω > 0.05). For low gains, such as K < 0.5, the cross-over
frequency ω c < 0.03 lies outside the valid range of the model.
For e.g. ω < 0.03 the Bode plot shows a phase above −180○ while
the simplified model features the phase −270○ for all frequencies.
p(s) = (s+γ ω 0 )(s2 +2ζ ω 0 s+ω 02 ) = s3 +(γ +2ζ )ω 0 s2 +(2γ ζ +1)ω 02 s+γ ω 03
135
Solutions to chapter 8. Design Examples
0 = L r href − l1 ⋅ 0 − l2 ⋅ 0 − l3 href
136
Solutions to chapter 8. Design Examples
1.6
1.4
1.2
0.8
0.6
0.4
0.2
0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
Figure 8.2 The step response with PID control according to Ziegler-Nichols.
1.6
1.4
1.2
0.8
0.6
0.4
0.2
0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
Figure 8.3 The step response of the closed loop system with a second order
integrating controller.
ln 0.02
ωm ( − ( 20
0.5 ⋅ 0.38
137
Solutions to chapter 8. Design Examples
138
Solutions to Chapter 9. Interactive
Comparison Between Model
Descriptions
9.1
a. The amplitude of the step response is affected, but not the time
constant. The pole is not affected. The Nyquist diagram keeps its
shape, but each point on the curve moves radially from the origin.
In the Bode diagram, the gain curve changes in the y direction while
the phase curve is unchanged.
Since the control signal is a unit step, K is given by the stationary
value of the measurement signal in the step response. In the Nyquist
diagram, K is given from the starting point on the positive real axis.
In the Bode diagram, K is given from the gain curve where ω → ∞.
b. The amplitude of the step response is not affected, but the time
constant is given by T. The pole is in s = −1/T, which means that
a large time constant gives a pole close to the origin, whereas a
short time constant gives a pole far away from the origin. In the
Bode diagram, the corner frequencty is 1/T, and it thereby varies
when T varies. No change is visible in the Nyquist diagram, but the
frequency varies along the curve.
Suppose that we have two processes with different values of T. Then,
we can always find two frequencies such that
K K
G (iω 1 T1 ) = = G (iω 2 T2 ) =
1 + iω 1 T1 1 + iω 2 T2
i.e., all points that are on the first Nyquist curve are also on the
second one, but at another frequency.
c. A variation in L corresponds to a translational movement of the
step response. We can not represent a dead time in a singularity
diagram. The gain curve in the Bode diagram is not affected, since
p e−iω L p = 1, but the phase is reduced. For each frequency point in
the Nyquist diagram, the distance to the origin remains unchanged,
but the phase decreases. Since the phase goes towards −∞ when
ω → ∞, the Nyquist curve has the spiral shape.
9.2
a. The changes are the same as in problem 1a.
b. The changes are analogous to the ones in problem 1b. When T1 ≫
T2 , the step response is similar to the one in problem 1a, with T (
T1 . The Bode and Nyquist diagrams are also similar to the ones
in problem 1a for low frequencies. Thus, you can in many cases
approximate the transfer function by
K K
G (s) = (
(1 + sT1 )(1 + sT2 ) (1 + sT1 )
139
Solutions to chapter 9. Interactive Comparison Between Model Descriptions
c. If the zero is far away from the origin, the representations are not
significantly affected. If the zero is negative and is close to the ori-
gin, there is a large overshoot in the step response. If the zero is
positive and close to the origin, the step response will initially go
in the wrong direction. If the zero is positive it will give a positive
contribution to the phase.
When T3 < 0, e.g., when the zero is in the right half plane, the
process is hard to control. You can imagine that it is hard for a con-
troller to act in the right way when a control signal change makes
the measurement signal go in the wrong direction initially. The phe-
nomenon could be understood by writing the transfer function in the
following way
K (1 + sT3 ) K sK T3
G (s) = = +
(1 + sT1 )(1 + sT2 ) (1 + sT1 )(1 + sT2 ) (1 + sT1 )(1 + sT2 )
Thus, the transfer function consists of two terms, one that is the
transfer function that we had in problem 2a, and one that is the
same transfer function, but multiplied with sT3 . Thus, the second
term is proportional to the derivative of the measurement signal we
would have obtained if we did not have any zero. If T3 < 0, this
term will give a negative contribution, which explains that the step
response initially goes in the wrong direction.
9.3
a. The frequency ω affects the speed of the system, but not the shape
of the step response. Variations in ω moves the poles radially from
the origin. In the Bode diagram, ω does not affect the shape, but
only the location of the corner frequency. The shape of the Nyquist
curve is not affected, but the frequencies are moved along the curve.
b. The relative damping ζ does not affect the speed of the step re-
sponse, but the shape. A small value of ζ gives an oscillatory and
poorly damped response. A small value of ζ gives a large resonance
peak in the Bode diagram. In the Nyquist diagram, you get a big
increase of gain and fast phase shift around ω .
140