Control Theory, Tsrt09, TSRT06 Exercises & Solutions: 23 Mars 2021
Control Theory, Tsrt09, TSRT06 Exercises & Solutions: 23 Mars 2021
TSRT06
Exercises & solutions
23 mars 2021
Reading instructions
• The names and numbers of the chapters in this exercise collection are
consistent with the names and numbers of the chapters in the textbook.
• Starred (∗) exercises deals with discrete-time systems and are optional.
1 Introduction
1.1
Consider the linear feedback control system given by the figure below.
Σ G(s)
−F (s)
1.2
1
1.3
2
Y (s) = G(s)U(s) G(s) =
s2 + 2s + 2
The system is controlled using proportional feedback, i.e. u(t) = −Ky(t). For
what values of K is the closed-loop system guaranteed to be stable according
to the small gain theorem?
1.4
(a)
a sin(t), t > 0
y(t) =
0, t≤0
(b)
1
t
,t>1
y(t) =
0, t ≤ 1
(c)
e−t (1 − e−t ), t > 0
y(t) = .
0, t≤0
2
1.5
ω02
G(s) = 2 .
s + 2ζω0s + ω02
Compute the system gain kGk for all values of ω0 > 0 and ζ > 0.
1.6
Analyze the stability of the following system, first by using the small gain
theorem and then by computing the poles of the closed-loop system. Explain
possible differences.
a
Σ
s+a
1.7
Σ G(s)
−f (·)
3
|G(iω)|
1.5
1
10 ω [rad/s]
f (x)
0.5
1 x
1.8
ẋ1 = x2
ẋ2 = −ax2 + au
y = x1
a = 1 + ρ, |ρ| < δ.
4
1.9
Once again consider the DC motor in exercise 1.8, but now assume that the
parameter a can vary arbitrarily fast with time
(a) Introduce a new, artificial input signal w and a new artificial output sig-
nal z such that the system can be described by the feedback connection
below
−K
u y
G
w z
ρ(t)
Show that the gain of this system (according to Definition 1.1 in the
textbook) is at most δ.
5
6
2 Representation of Linear Systems
2.1
J ω̇ = M − Me
where
Me = Ke · ω · If
is the electrical torque due to the emf. If is the current in the stator winding,
given by the relationship
e = R · If
where the voltage e is generated in the stator winding according to
e = C e · Im · ω
and R is the load resistance applied to the stator winding. Consider e and ω
as output signals, M, Im and R as input signals. Set Ke = Ce = J = 1 and
find a state-space representation for this sytem.
ω0 = R0 = Im0 = M0 = 1
7
2.2
Consider the system consisting of two coupled tanks described in the figure
below.
u1 u2
h1
h2
y
The flow of water into the left and right halves of the tank are denoted u1
and u2 respectively. These flows are the input signals. The water levels in the
two halves are denoted h1 and h2 respectively. The flow y out from the tank
is assumed to be proportional to the water level in the right half of the tank
The flow between the two halves is proportional to the difference between
the levels
f (t) = β(h1 (t) − h2 (t))
(b) Compute the maximum and minimum singular values of G(0) and give
an intuitive explanation to the corresponding input signals.
8
2.3
2.4
2.5
2.6
9
10
3 Properties of Linear Systems
3.1
Derive the pole and the zero polynomials of the system? What is the dimen-
sion of a minimal state-space realization?
3.2
3.3
3.4
11
(b) Consider the system
s+5 1
!
s2 +3s+2 s+2
G(s) = 1 1
s+4 s+4
3.5
Find a matrix fraction description , y(t) = A(p)−1 B(p)u(t), and compute the
poles and zeros of the system.
3.6
12
3.7
Y (s) = G(s)U(s)
where
1 3
G(s) = s+1 s+2
2 1
s+3 s+4
(a) Determine the maximum and minimum singular value of the frequency
reponse at the frequency ω = 2 rad/s.
(b) Determine also the input vectors, in terms of their Fourier transforms,
corresponding to the largest and smallest gain of the system at ω = 2.
(d) Verify that the obtained output signals correspond to largest gain of
the system.
3.8
13
14
5 Disturbance Models
5.1
a2
(a) Φu (ω) =
ω 2 + a2
a2 b2
(b) Φu (ω) =
(ω 2 + a2 )(ω 2 + b2 )
5.2
900
(ii) N(s) = V (s)
s2 + 6s + 900
25
(iii) N(s) = V (s)
s2 + s + 25
15
5.3
f = k1 · ż + v
5.4
(a)
Φn (ω) = 0.1
(b)
ω2
Φn (ω) = 0.1 .
ω 2 + b2
(c)
1
Φn (ω) = 0.1 .
ω 2 + b2
16
5.5
ẋ = Ax + Bu + Nw
y = Cx + n
We assume that the system disturbance w changes stepwise and that the
measurement noise is periodical with a frequency of about 2 Hz.
5.6
(a) Derive a state-space model for the speed and acceleration. Let the me-
asured speed and acceleration be output signals and assume that the
derivative of the acceleration is white noise. Furthermore, assume that
the measurement errors in speed and acceleration are white noises, in-
dependent of each other.
(b) Discuss how we can get better estimates of the speed and acceleration
using Kalman filtering.
5.7
17
x(t)
v(t)
E v(t) = 0
E v(t)v(s) = δ(t − s)
We want to estimate the position x(t) and speed ẋ(t) at every time instant.
We have sensors for both speed and position but for economical reasons we
only want to use one sensor. We can choose between
The measurement errors are e1 (t) and e2 (t). For simplicity we assume that
they are both white noises with
18
5.8
Θ
Antenna
Motor
Technical data:
B/J = 4.6 s−1
k/J = 0.787 rad /Vs 2
J = 10 kg m2
E τd (t)τd (s) = vd δ(t − s) = 10 N 2 m2 · δ(t − s)
E em (t)em (s) = vm δ(t − s) = 10−7 rad 2 · δ(t − s)
19
5.9
(i)
y(t) = G(p)(u(t) + w(t))
(ii)
y(t) = G(p)u(t) + w(t)
1
In both cases we have w(t) = p
v(t) where v(t) is a unit disturbance, for
example an impulse.
(a) Realize both cases on state-space form. For case (ii) it is assumed that
the states caused by the disturbance are separate from the ones descri-
bing the motor dynamics.
(b) For both cases, give examples of physical phenomena that can be mo-
deled with the disturbance w(t) .
(c) Study the two state-space realizations. Are all states controllable? Can
states corresponding to w(t) be made unobservable? Can the influence
of w(t) on y(t) be eliminated?
5.10
Consider the movement of a swing due to the wind. The swing is descibed
by the transfer operator
1
y(t) = u(t)
p2 +p+1
20
where the output signal y(t) is the angular displacement and the input signal
u(t) is the torque about the point of suspension. The influence of the wind
can be modeled as
u(t) = Kv(t)
where v(t) is a Gaussian distributed disturbance with the spectrum
2α
Φv (ω) = , α > 0.
α2 + ω2
K quantifies the strength of the wind and α quantifies the gustiness of the
wind.
(a) Does α increase or decrease when the gustiness increases, i.e. when the
wind changes direction more frequently?
(b) Derive and interprete conditions on α and K such that the swing has
an angular displacement of more than 1.15 at least a quarter of the
time. This is equivalent to the output having a variance greater than
1.
Hint:
Z ∞
1 |b2 (iω)2 + b1 iω + b0 |2
dω
2π −∞ |(iω)3 + a2 (iω)2 + a1 iω + a0 |2
b2 a0 a1 + (b21 − 2b0 b2 )a0 + b20 a2
= 2
2a0 (−a0 + a1 a2 )
21
22
6 The Closed-Loop System
6.1
For a given system G and a given controller F we have defined four transfer
functions as
Gwu u = (I + F G)−1 , Gwu = −(I + F G)−1 F
Gwu y = (I + GF )−1 G, Gwy = (I + GF )−1
All four transfer functions have to be stable for the closed-loop system to be
internally stable.
6.2
The system
s−1
G(s) =
s+1
and the controller
s+2
F (s) =
s−1
are are used in the feedback connection depicted below.
Σ G(s)
−F (s)
23
24
7 Limitations in Control Design
7.1
7.2
7.3
Give an example of a system for which there exists no controller having all
three properties: a stable closed-loop system, small magnitude of the sen-
sitivity function at low frequencies and small amplification of measurement
errors at high frequencies.
25
7.4
7.5
log |S(iω)|
A2
0
A1
What can be stated about the open-loop system if the surface A2 is larger
than the surface A1 ?
26
7.6
|∆G| ≤ 100|G|
7.7
(b) Trying to find a controller fulfilling the design criteria, for example
using the methods presented in Chapter 10 in the textbook, we fail.
Should this have been anticipated from the very beginning?
27
28
8 Controller Structure and Control Design
8.1
Let !
1 10
s+2 s+1
G(s) = 1 5
.
s+5 s+3
8.2
Assume that we want the controller to be diagonal and that we use the
relative gain array (RGA) to decide what input should control what output.
Furthermore, assume that we want a crossover frequency of ωc = 10 rad/s.
Decide how the signals should be paired.
8.3
(a) Decide, using RGA analysis, which input signal should control which
output signal.
29
(b) Assume that we want to use decentralized control, i.e. we want a con-
troller on the form
diag diag F11 (s) 0
F = W1 F (s)W2 , where F (s) = .
0 F22 (s)
8.4
Design a controller, using the IMC method, for a stable first order process
K
G(s) = , τ > 0.
τs + 1
What type of controller do we get? Compute the sensitivity function and the
complementary sensitivity function and sketch the Bode plot of the sensitivity
function. What does Bode’s integral theorem state for this case?
8.5
8.6
30
Compute an IMC based controller for this system. Write the controller on
the form u = −Fy (p)y, and sketch the Bode plot for Fy (p). Approximately
what type of controller do we get when we want a high bandwidth for the
closed-loop system?
8.7
8.8
Show how an IMC based controller can be computed for this system. Give
an explicit expression for the corresponding sensitivity function.
8.9
Y (s) = G(s)U(s)
31
where
2 3
s+1 s+2
G(s) =
α 1
s+1 s+1
and α > 0.
(a) Determine the zero of the multivariable system. How does the zero
depend on the value of α?
(b) Assume that one would like to achive complete decouple of the system
G(s) such that
1
0
(s + 1)2
G(s)F (s) = 1
0
(s + 1)2
Are there any cases when this is not a good idea? Motivate!
(c) Assume that one instead chooses to use a static decoupling such that
G(s)F (s) is decoupled for ω = 0. Are there any values of α for which
this is not a good idea? Motivate!
8.10
Y (s) = G(s)U(s)
where
1 2
s+2 s+4
G(s) =
1 1
s+1 s+2
32
(b) Assume that the system is going to be controlled by a diagonal regulator
where
K 0
F (s) =
0 K
Use the result from a) the judge how successful this will be. Determine
also the poles of the closed loop system for the case K = 5.
(c) How can the problem be modified such that a diagnonal F (s) can be
used? Verify that the closed loop system is stable for K = 5 for the
modified problem.
33
34
9 Minimization of Quadratic Criteria: LQG
9.1
9.2
35
(a) Compute the loop gain of the feedback connection.
(b) How do r1 and q1 influence the loop gain?
(c) Sketch the magnitude of the frequency response. What happens when
r1 → ∞ and when q1 → ∞ respectively?
9.3
Where are the poles of the optimal closed-loop system located? How is the
control signal affected when η is decreased?
9.4
9.5
36
We want to use the motor together with a system that has a resonance
peak at approximately 0.5 rad/s. Other than that, we do not know much
about the system. Describe how we can compute an LQG controller with
good robustness qualities, i.e. small complementary sensitivity gain, at this
frequency.
9.6
9.7
37
(b) Use output-LTR (LTR(y)) to compute L. What is the static gain of
the sensitivity function?
9.8
ϕ1 ϕ2
Motor
where
k
ω02 =
50
The Bode plot, when k = 1, is shown in the figure below. There is a resonance
peak at the frequency ω0 . The spring rate is not exactly known, but has a
value close to 1. We want to design a controller that yields a stable closed-loop
system despite variations in k.
How can the above model be extended with a model for the noise to assure
robustness for an uncertain value of k when we use LQG controller design?
Give an actual example of such an extended system.
38
1
10
0
10
|G(iω)|
-1
10
-2
10
-3
10 -2 -1 0
10 10 10
ω rad/s
9.9
Show that
u(t) = − 2 −3 x(t)
cannot be an optimal state feedback for any quadratic criterion on the form
Z
min (xT (t)Q1 x(t) + Q2 u2 (t)) dt
9.10
39
We want to minimize the criterion
Z T
V (T ) = xT (t)x(t) + u2 (t)dt
0
9.11
VC [V]
i [A]
u [V]
R L
C
R = 5 Ω, L = 0.1 H, C = 1000 µF
This criterion aims at limiting the power loss without getting too large sig-
nals.
40
9.12
9.13
A simplified model for how the elevator angle affects the movements of an
airplane is given by
−0.01 0.03 −10 4
ẋ = 0 −1 300 x + −20 u
0 0 −0.5 −10
where
roll angle
x = yaw angle
pitch-angle velocity
In particular we are interested in the control of the pitch-angle velocity and
choose the controlled variable to be
z= 0 0 1 x
y =x+e
41
We want to design a feedback from reconstructed states using LQG metho-
dology. It is especially important that the sensitivity function has a small
gain for frequencies around 1 rad/s. Show how to modify the model of the
airplane to achieve such a sensitivity function.
9.14
is minimized.
9.15
42
where x1 (t) = y(t) and x2 (t) = ẏ(t). The gain vector L is determined by
minimizing the criterion
Z ∞
J= xT (t)Q1 x(t) + Q2 u2 (t)dt
0
Figure 1 shows the simulation results when the system starts in the initial
condition x(0) = (1 1)T for some different choices of Q1 and Q2 . Combine
the figures with the choices of matrices.
(i)
1 0
Q1 = Q2 = 0.1
0 0
(ii)
1 0
Q1 = Q2 = 1
0 10
(iii)
0.1 0
Q1 = Q2 = 0.1
0 0
(iv)
1 0
Q1 = Q2 = 1
0 0
43
A B
1.5 1.5
1
1
0.5
0.5
0
0
−0.5
−0.5 −1
0 5 10 0 5 10
C D
1.5 1.5
1 1
0.5 0.5
0 0
−0.5 −0.5
0 5 10 0 5 10
Figur 1:
9.16
α v
θ
h
δ
44
x1 (t) = α(t) angle of attack (rad)
x2 (t) = θ̇(t) pitch rate (rad/s)
x3 (t) = θ(t) pitch angle (rad)
x4 (t) = h(t) height (deviation from an operating point)
0 0 0 1
Determine the poles of the closed loop system. Simulate the closed loop
system.
45
(c) Assume that Q2 is varied. How does that affect the location of the
closed loop poles and the properties of x and u?
9.17
and torque is the input signal u(t). The state space model is
46
where
0 1 0 0 0
0 0 −7 0 0
A=
0
B= C= 1 0 0 0
0 0 1 0
0 0 0 0 1
i.e. the ball is positioned to the right of the center, and the plane leans
downwards on the right side. Assume that all state variables can be
measured. Determine a state feedback such that the following require-
ments are fulfilled:
– | x(t) |→ 0 when t → ∞.
– | x1 (t) |≤ 0.2 ∀ t.
– | u(t) |≤ 2.5 ∀ t
Determine also the absolute value of the poles of the closed loop system.
(b) Verify that all sensors that measure the states have to work in order to
obtain a stable closed loop system.
Hint: The characteristic equation of the closed loop system is given by
λ4 + l4 λ3 + l3 λ2 − 7l2 λ − 7l1 = 0
47
48
10 Loop Shaping
10.1
10.2
10.3
10.4
10.5
50
A B
1 1
10 10
0
0 10
10
−1
10
−1
10
−2 −1 0 1 −2 −1 0 1
10 10 10 10 10 10 10 10
C
1
10
0
10
−1
10
−2 −1 0 1
10 10 10 10
10.6
The system
1
Y (s) =
U(s)
s+1
is going to be controlled by the proportional feedback
(a) Derive S(s), T (s) and Gru (s) respectively, i.e. the sensitivity function,
the complementary sensitivity function and the transfer function from
reference to input signal.
(b) The properties of the control system are specified using the weight
function according to
51
The figures below show three suggestions for weight functions WS , WT
and WU . Two of the alternatives are unrealistically or incorrectly spe-
cified. Which are the two incorrect alternatives? Motivate the answer.
1/WS 1/WT
1 0
10 10
0
10
−1 −1
10 10
−2 0 2 −1 0 1 2
10 10 10 10 10 10 10
1/WU
2
10
1
10
0
10
−2 0 2
10 10 10
Figur 4: Alternative I
52
1/WS 1/WT
1 1
10 10
0 0
10 10
−1 −1
10 10
−2 0 2 −2 0 2
10 10 10 10 10 10
1/WU
2
10
1
10
0
10
−2 0 2
10 10 10
Figur 5: Alternative II
1/WS 1/WT
0 1
10 10
0
10
−1 −1
10 10
−1 0 1 2 −2 0 2
10 10 10 10 10 10 10
1/WU
2
10
1
10
0
10
−2 0 2
10 10 10
53
54
12 Stability of Nonlinear Systems
12.1
ÿ + 0.2(1 + ẏ 2 )ẏ + y = 0
let the state variables be x1 = y and x2 = ẏ. Try to show that the origin is
a stable equilibrium by using the Lyapunov function candidate
1
V = (x21 + x22 ).
2
12.2
1 1
V (x1 , x2 ) = − x21 + x42
2 4
to prove Lyapunov stability for the above system? Motivate your answer.
12.3
55
Slope 3
Slope 0.5
According to the circle criterion, what circle in the complex plane corresponds
to this nonlinearity?
12.4
r
Σ G(s)
−1 f
where G(s) is a linear system and the static nonlinearity f is given in the
figure below (the saturations at −1 and 1 extends to −∞ and ∞).
56
f
1
−1 −0.5 0.5 1
−1
What assumptions on G(s) must be fulfilled in order to prove that the feed-
back system is stable according to the circle criterion?
12.5
r u1 u2 1
Σ K f
s(s + 1)
−1
The nonlinearity f is such that u2 has the same sign as u1 but is otherwise
not known. For what values of K > 0 is the feedback system stable according
to the circle criterion?
57
12.6
Center of gravity
d2 Φ
J 2 + mgℓ sin Φ = 0
dt
where m is the mass and J is the moment of inertia. The swing can be
controlled by alternating between bending and stretching the knees while
standing on the swing. The control signal is the location of the center of
gravity ℓ. We assume that J is constant.
ℓ = ℓ0 + εΦΦ̇, ε>0
12.7
58
Relay
r=0 1
Σ G(s)
−1
−1 Σ
b H(s)
We have that
1
H(s) = s and G(s) = .
(s + 1)(s + 2)
12.8
y = u + arctan(u)
What requirements on the linear part of the servo system must be fulfilled
in order to prove stability using the circle criterion?
59
12.9
ũ = −Lx + r̃
for Q1 = 10 · I
The requested control signal ũ is different from the actual u, due to the
hydraulic servo dynamics. The relationship between ũ and u is
u
2.5
0.75
1 2 ũ
60
13 Phase Plane Analysis
13.1
(c) Compute linearizations around the stationary points and analyze sta-
bility.
13.2
K
Σ
s(s + B)
−a
−1 a
61
13.3
Relay
1 1
Σ
−1 s2
−1
(a) With zero input signal the output of the relay is +1 or −1, depending
on the history of the input signal. The relay does not switch until the
input signal has changed polarity.
Draw a phase portrait of the system.
−a −1
a
13.4
Linus is on his way home after an exam. On the highway outside of Linkı̈¿ 12 ping
a gust of wind makes the car drift from the desired path. Your task is to,
62
using phase plane analysis, decide how the movement of the car will pro-
gress. Will it return to the desired path? If the car has a constant speed in
the direction of travel the system can be described by the following block
diagram
u 1 −1 1
y
Σ s 1 s
−G(s)
The torque applied to the steering wheel is u. The backlash comes from a gear
unit in the steering. The output signal y is the deviation from the desired
path. G(s) is the transfer function from Linus’ visual perception to the torque
he applies to the steering wheel.
13.5
A simple ecological system consists of two species of fish. The first kind eats
algae and the second kind eats the first kind. Let x1 denote the number of
algae eating fish and x2 denote the number of predatory fish. Then we have
x1 x2
ẋ1 = 2x1 − − 0.2x21
1 + 61 x1
x1 x2
ẋ2 = −3x2 +
1 + 61 x1
63
(a) From these equations, calculate the stationary points.
(b) Classify the stationary points and sketch the phase portraits in a sur-
rounding of them. It is sufficient to consider a linearised version of the
equations.
(c) Without any further calculations, merge the phase portraits you have
made around the stationary points in a fashion that seems reasonable.
Only consider x1 > x2 > 0.
If the algae eating fish have an infinite amount of food and lack enemies,
their number will grow exponentially as
ẋ1 = 2x1
If there are predatory fish x2 present the algae eaters will be devoured at the
rate
x1 x2
1 + 61 x1
The interpretation of this term is that if x1 is large every predatory fish can
eat until it is full. This corresponds to 6 algae eating fish per time unit. On
the other hand, if the number x1 is relatively small the predatory fish will
eat less.
The second equation says that if the supply of food is unlimited (x1 = ∞)
the predatory fish will multiply according to
ẋ2 = 3x2 .
ẋ2 = −3x2
64
13.6
A mass is suspended from a spring. Its position y(t) satisfies the differential
equation
ÿ(t) + y(t) = f (t)
where f (t) is an external force acting on the mass. Draw a phase portrait of
the system when
−1 if ẏ(t) > 0
f (t) =
+1 if ẏ(t) < 0
Will the system reach an equilibrium?
13.7
u = f (x1 , x2 )
65
66
14 Oscillations and Describing Functions
14.1
1 u 10
Σ
1 s(s + 1)2
−1
(b) Build a simulation model of the control system and investigate the
validity of the results from a).
14.2
−1
67
1
G0 (s) = s(1+s) 2 , ±D is the width of the dead zone and ±H is the output
level of the relay. The values of the dead zone and output level are such that
a stable oscillation just barely can exist. If H is increased or if D is decreased
an oscillation will not be possible.The amplitude of the oscillation is 2.5 units.
Compute D, H and the frequency of the oscillation. The describing function
for a relay with dead zone is
4H p
Re{YN (C)} = 1 − D 2 /C 2 , C≥D
πC
Im{YN (C)} ≡ 0
14.3
θref u K θ
Σ
s(s + 1)2
−L(s)
(a) The feedback used is L(s) = 1. Show that there is an oscillation for all
values of K.
(b) To avoid too much wear on the system we do not want the amplitude
of the oscillation in θ to be greater than 0.1. For what values of K is
this fulfilled?
(c) We want to use a gain K that is larger than what is possible in (b). State
a feedback L(s) with L(0) = 1 that makes this feasible. No details are
necessary. Just motivate why the feedback should solve the problem.
68
14.4
u 1 y
Σ
s(s + 1)(s + 2)
−H(s)
14.5
θr = 0 1
u(t) 1 θ
Σ
−0.5
−1
0.5
s(s + 1)
−1
(a) Investigate the stability of the system using the describing function
method. If a periodical solution exists, determine its frequency and
amplitude.
69
(b) Build a simulation model of the control system and investigate the
validity of the results from a).
(c) Introduce suitable state variables and sketch a phase portrait.
14.6
r=0 e ũ u 1 y
Σ K(1 + 1
TI s
+ TD s)
s2
PID controller amplifier motor
−1
(a) The tuning of the controller was done assuming that the amplifier has
the transfer function 1. Show that, if this assumption is true, this results
in an asymptotically stable closed-loop system.
−1 1 ũ
−1
70
State the amplitude, frequency and stability properties of possible oscil-
lations.
(c) Discuss, based on the results from (b), under what circumstances the
servo system will function as intended. Especially investigate the influ-
ence of different signal amplitudes.
14.7
r(t)=0 u y(t)
Σ G0(s)
-1
When the system is simulated a limit cycle occurs. Determine the amplitude
and frequency of the limit cycle. The Bode diagram for the linear part GO (s)
of the control system is given in the figure below.
G
|G| 20log|G| dB
20
10 20
90
5
|G0|
2
.1 2 5 1 2 5 1
1 0 0
Radianer/s
0.5 arg G0
0.2
0.1 -20 -90
0.05
0.02
-180
0.01 -40
71
The describing function of a relay with deadzone is given by
4 p
Yf (C) = 1 − 1/C 2 C≥1
πC
72
17 To Compensate Exactly for Nonlinearities
17.1
linear.
17.2
ẋ1 = x3 + 8x2
ẋ2 = −x2 + x3
ẋ3 = −x3 + x41 − x21 + u
y = x1
linear.
17.3
ẋ1 = x21 + x2
ẋ2 = u
y = x1
linear.
73
17.4
x1
x2
17.5
m
F
74
The force F is generated by the control signal u fed through an actuator such
that
1
F = u
s+1
The position of the mass is y. The spring rate and the viscous damping are
nonlinear. Thus the force is
−k(y) − d(ẏ).
(a) Realize this system on state-space form. The input signal is u and the
output signal is y.
(b) Can the system in (a) be made linear using feedback? If so, compute
such a feedback.
75
76
Solutions
77
78
1 Introduction
1.1
The small gain theorem for linear systems can be stated as follows: Assume
that both G(s) and F (s) are stable transfer functions, and interconnected
according to the figure below.
Σ G(s)
−F (s)
G(s)
Gc (s) =
1 + G(s)F (s)
Gc (s) is stable according to the Nyquist criterion if the Nyquist curve for
G(iω)F (iω) does not encircle the point −1. Since we know from the small
gain theorem that
the Nyquist curve can not encircle the point −1, and hence the Nyquist
criterion is fulfilled.
79
1.2
We have that y(t) = f (u(t)) where f (·) is the function describing the ideal
relay. The gain is defined as
kyk2
kf k = sup
u6=0 kuk2
for all choices of u(t) 6= 0 such that 0 < kuk2 < ∞. Take for example
u(t) = 1t . This means that an ideal relay has infinite gain.
1.3
S
z }|1 {
ũ
Σ f (u) G(s)
−K
| {z }
S2
The system is stable according to the small gain theorem if kS1 k · kS2 k < 1.
kS1 k ≤ kf (u)k · kGk
We have that:
kS2 k = |K|
where
2 1
kGk = sup |G(iω)| = sup p = 1 (fı̈¿ r ω = 0)
ω ω (2 − ω 2)2 + 4ω 2 2
80
R∞
2 kũk22 −∞
(f (u(t))2 dt 1
kf (u)k = = ≤ |f (u(t))| ≤ |u(t)|
kuk22 kuk22 2
1 2
kuk 1 1
≤ 4 22 = ⇒ kf (u)k ≤
kuk2 4 2
1
kS1 k · kS2 k ≤ · |K| < 1
2
i.e. , we must choose |K| < 2 to be able to guarantee input-output stability.
1.4
1 1√
(c) kyk∞ = , kyk2 = 3
4 6
1.5
ω02
kGk = sup |G(iω)| = sup p
ω ω (ω02 − ω 2 )2 + 4ζ 2 ω02ω 2
By differentiating |G(iω)| we see that the magnitude of G(iω) has its maxi-
mum at ω = 0 if ζ > √12 . This results in the gain
kGk = 1
p
If 0 < ζ < √12 the maximum of |G(iω)| is attained at ω = ω0 1 − 2ζ 2. This
results in the gain
1
kGk = p
2ζ 1 − ζ 2
81
1.6
One has to distinguish between the cases a > 0 and a < 0 respectively.
(i) For a > 0 the system G(s) is stable and the small gain theorem is
applicable. The system G(s) has gain one, and the small gain theorem
hence gives the condition | K |< 1. The characteristic equation of the
closed loop system is given by (Note: positive feedback)
(s + a) − Ka = 0
which imples the pole s = (K − 1)a, which is located in the left half
plane for K < 1.
(ii) For a < 0 the system G(s) is not stable and the small gain theorem
is not applicable. The pole s = (K − 1)a is in the left half plane for
K > 1.
1.7
The linear part, represented by G(s), has gain 1.5 according to the figure.
For the nonlinear part we assume that f (x) is an odd function, such that
f (−x) = −f (x). The nonlinearity can hence be bounded by
| f (x) |≤ 0.5 | x |
and hence the gain is 0.5. Since 1.5 · 0.5 < 1 the closed loop system is stable
according to the small gain theorem.
1.8
82
1.9
ẋ1 = x2
ẋ2 = −a(Kx1 + x2 ) = −Kx1 − x2 − ρ(Kx1 + x2 )
| {z }
w=ρz
The open system with input signal w and output signal z is given by
0 1 0
ẋ = x+ w
−K −1 −1
z = K 1 x,
that is
s+K
Gwz (s) = − .
s2 +s+K
(b) The relationship
w(t) = ρ(t)z(t)
gives Z ∞
kw(t)k22 = ρ2 (t)z 2 (t)dt < δ 2 kz(t)k22
∞
and
kw(t)k2
<δ
kz(t)k2
which implies that the gain is at most δ.
w z
Gwz (s)
ρ(t)
83
The magnitude, of the linear systems frequency response, squared is
ω2 + K 2
|Gwz (iω)|2 =
(K − ω 2 )2 + ω 2
84
2 Representation of Linear Systems
2.1
∆x = x − x0 ∆u = u − u0 ∆y = y − y0
85
2.2
(a)
y = αh2 , f = β(h1 − h2 )
1 1
ḣ1 = (u1 − f ), ḣ2 = (u2 + f − y)
A1 A2
1 1 1
− A1 β A1
β 0
ḣ = 1 1 h + A1 1 u
A2
β − A2
(β + α) 0 A2
y= 0 α h
1
G(s) = αβ α(s + β)
s2 + (2β + α)s + αβ
which gives the steady state output signal y = 2, while the minumim
singular value corresponds the input signal vector
1
umin =
−1
86
2.3
2.4
2.5
87
The system on observer canonical form is
−a1 1 b11 b21
ẋ(t) = x(t) + u(t)
−a2 0 b12 b22
y(t) = 1 0 x(t)
2.6
where
s 1 s+2
A(s) = B(s) =
1 (s + 1) 1
Multiplication by A−1 (s) results in
i.e.
s2 +3s+1 2s+2
s2 +s−1 s2 +s−1
+ 1
Y (s) = −2 U(s) = −2 U(s)
s2 +s−1 s2 +s−1
88
3 Properties of Linear Systems
3.1
when the third column is deleted. In addition, the elements of the transfer
function are themselves minors. The pole polynomial, i.e. the least common
denominator to all minors is thus
p(s) = (s + 2)
The system has a pole in s = −2. Hence, the system can be realized as a
state-space sytem of order one.
89
3.2
The pole polynomial, i.e. the least common denominator of the minors, is
Hence the poles are −1, −3 and −3. The maximal minor is
2
(s + 3)2
2(s + 1)
.
(s + 1)(s + 3)2
n(s) = (s + 1)
3.3
Minors:
1−s 2−s 1/3 − s 1/3
, , ,
(s + 1)2 (s + 1)2 (s + 1)2 (s + 1)3
| {z }
2 st
90
3.4
3.5
91
The transfer function matrix, G(s), has the determinant
(2s + 1)2 1 2
det G(s) = 2 2
+ 2 2
= 2
(2s + 2s + 1) (2s + 2s + 1) (2s + 2s + 1)
and the minors
(2s + 1) −1 1
(2s2 + 2s + 1) (2s2 + 2s + 1) (2s2 + 2s + 1)
This results in the pole polynomial
p(s) = 2s2 + 2s + 1
Hence, the poles are located at − 12 ± i 12 .
3.6
92
y2
1 1
u1 s+1 Σ s+2 y1
u2
3.7
(a) The singular values at ω = 2 can be determined in two ways, and for
both alternatives we start by entering the transfer function matrix in
Matlab.
>> s=tf(’s’);
>> G=[1/(s+1) 3/(s+2); 2/(s+3) 1/(s+4)];
>> G2 = freqresp(G,2)
G2 =
>> [V,D]=eig(G2’*G2)
V =
93
D =
0.1579 0
0 1.5248
√
The smallest singular value
√ is hence σ(G(i2)) = 0.1579 ≈ 0.40 and
the largest is σ̄(G(i2)) = 1.5248 ≈ 1.24.
Alternative (ii): The singular values can be detemined graphically using
the command
>> sigma(G)
1
10
0
10
Singular Values (abs)
−1
10
−2
10
−2 −1 0 1 2
10 10 10 10 10
Frequency (rad/sec)
(b) The second column of the matrix V defines the Fourier transform of the
input vector that corresponds to the largest gain of the system, i.e. the
input vector is such that the input components fulfill
√
| U1 (iω) |= 0.4862 + 0.14032 ≈ 0.51
arg U1 (iω) = arctan(0.1403/0.486) ≈ 0.28 rad
and
| U2 (iω) |≈ 0.86 arg U2 (iω) = 0
94
(c) Using the hints an input vector can be generated using the command
sequence
>> t=(0:0.01:50).’;
>> u12=0.51*sin(2*t+0.28);
>> u22=0.86*sin(2*t);
This gives the result below showing that the output components have
amplitudes 1.14 and 0.48.
1.5
0.5
−0.5
−1
−1.5
0 5 10 15 20 25 30 35 40 45 50
(d) Using the fact that the Fourier transform at the studied frequency
are proportional to the signal amplitude the ratio of the norms of the
output and input vectors becomes
√
1.142 + 0.482
√ ≈ 1.24
0.512 + 0.862
95
3.8
and the poles are therefore −1, −2, −2, 1. The maximal minors, normalized
with the pole polynomial, are then given by
and the gcd of the numerators is thus z(s) = s − 1 and the only zero is 1.
96
5 Disturbance Models
5.1
(a)
a2 a a
Φu (ω) = 2 2
Φe (ω) = ·
ω +a iω + |a| −iω + |a|
Thus the linear filter is
a
G(s) = , a 6= 0.
s + |a|
a2 b2
Φu (ω) = Φe (ω)
(ω 2 + a2 )(ω 2 + b2 )
ab ab
= ·
(iω + |a|)(iω + |b|) (−iω + |a|)(−iω + |b|)
ab
⇒ G(s) =
(s + |a|)(s + |b|)
5.2
where V denotes white noise. In (i) the transfer function is of low pass charac-
ter, which means that N will be of low frequency character. The disturbance
is located around 5 Hz, i.e. 10π rad/s. The magnitude curve of model (ii) has
a peak around this angular frequency, which means that this model is the
most appropriate one. In model (iii) the peak is located around 5 rad/s.
97
5.3
k1 1
z̈ + ż = (u − v)
m m
1 1
ẋ2 = (u − f ) = (u − k1 x2 − v)
m m
That is
0 1 0 0
ẋ = x+ u+ v
0 − km1 1
m
− m1
z= 1 0 x
(b) Description of v:
Φv (ω) = |H(iω)|2Φe (ω)
√
k0
√
Thus H(s) = s+|a| , i.e. v̇+|a|v = k0 e. Introduce an extra state x3 = v
which results in a new state-space form with ẋ3 = −|a|x3 + e:
0 1 0 0 0
ẋ = 0 − km1 − m1 x + m1 u + √0 e
0 0 −|a| 0 k0
z= 1 0 0 x
98
5.4
ẋ = Ax + Bu + Ne
y = Cx + n
(b) A noise signal with the desired spectral density can be generated by a
s
system with transfer function Gn (s) = s+|b| . The input is white noise
with spectral density Φwn = 0.1. On state-space form we get
ẋ4 + |b|x4 = wn .
5.5
99
(2) A model for n: Use a second order system with a resonance peak at
ω0 = 2π · 2 = 4π rad/s and damping ξ = 0.01
ω02
n= 2 e
p + 2ξω0 p + ω02
Introduce the states xn1 = n and xn2 = ṅ
ẋn1 0 1 0
ẋn = = x + e
ẋn2 −ω02 −2ξω0 n 1
| {z } |{z}
An Bn
5.6
(a) Choose the states x1 = acceleration and x2 = speed. This results in the
state-space form
0 0 1
ẋ = x+ e
1 0 0
1 0 v1
y= x+
0 1 v2
(b)
0 0 k11 k12 k11 k12
x̂˙ = − x̂ + y
1 0 k21 k22 k21 k22
The matrix K is determined from the algebraic Riccati equation.
5.7
100
where x1 = x, x2 = ẋ.
5.8
101
and denote α = B/J, H = k/J and γ = 1/J. A state space model of the
system is
0 1 0 0
ẋ(t) = x(t) + µ(t) + τ (t)
0 −α H γ d
| {z } | {z } | {z }
A B N
y(t) = 1 0 x(t) + em (t)
| {z }
C
102
q
vd
Define β = γ vm
This results in
p
p′ 11 = −α + α2 + 2β
The solution is
p p
−α + α2 p + 2β α2 + β − α α2 + 2β p
P = vm
α2 + β − α α2 + 2β −α3 − 2αβ + (α2 + β) α2 + 2β
The steady state Kalman gain K = P C T R2−1 becomes
p
−α + α2 p + 2β
K=
α2 + β − α α2 + 2β
and using the numerical values given we get
40.36
K=
814.3
The covariance matrix for the estimation error is
40.36 · 10−7 814.3 · 10−7
P =
814.3 · 10−7 366.1 · 10−5
Hence the filter for estimating Θ is
˙x̂ = 0 1 0
x̂ + µ(t) + K y − 1 0 x̂
0 −α H
with K as above.
5.9
(i)
1
p
w
u 1
Σ y
p(p + 1)
103
(ii)
1
p
w
u 1
Σ y
p(p + 1)
(a) (i)
A B
z
}| { z}|{
0 1 0 0 0
ẋ = 0 −1 1 x + 1 u + 0 v
0 0 0 0 1
y = 1 0 0 x.
| {z }
C
(ii)
A B
z
}| { z}|{
0 1 0 0 0
ẋ = 0 −1 0 x + 1 u + 0 v
0 0 0 0 1
y = 1 0 1 x.
| {z }
C
(b) (i) Offset in the motor voltage, step disturbance in the load
(ii) Measurement disturbance – error in the sensor for angular displa-
cement
104
(c) (i)
0 1 −1
S = B AB A2 B = 1 −1 1 not full rank
0 0 0
(ii)
0 1 −1
S = 1 −1 1 not full rank
0 0 0
5.10
(a) The spectrum of the wind has low pass characteristics with bandwidth
α. When α increases v(t) behaves more and more like white noise, i.e.
the gustiness increases. This can also be seen by studying the covariance
function
Z ∞
1
Rv (τ ) = Φv (ω)eiωτ dω = e−α|τ | , α > 0.
2π −∞
The covariance function gets more narrow when α increases, i.e. the
correlation with neighboring values of v(t) decreases and the gustiness
increases.
(b) Using spectral factorization, the influence from the wind can be descri-
bed as white noise e(t) with intensity 1 filtered through a linear system
with transfer function
p
2/α
H(s) =
1 + s/α
105
The variance of the output signal is
Z ∞
1
Var(y) = |G(iω)H(iω)|2dω
2π −∞
Z ∞ √ 2
1 K 2α
= dω
2π −∞ (iω)3 + (1 + α)(iω)2 + (1 + α)iω + α
K 2 (1 + α)
= .
1 + α + α2
K 2 (1+α)
Thus the requirement can be formulated as 1+α+α2
> 1.
106
6 The Closed-Loop System
6.1
✓✏
w✲
u u✲
Σ G
✒✑
✻
y ✓✏
❄ w
−F ✛ Σ
✒✑
Alternative solution: Show that the matrix product is the identity matrix.
107
6.2
r Σ G Σ y
Σ n
−F
s−1 s+2
G= , F =
s+2 s−1
we get
Y = G(R − F (Y + N)) + W ⇒ (1 + GF )Y = GR − GF N + W
The closed-loop system, the sensitivity function and the comlementary sen-
sitivity function are
s−1
Gc = Gry = (1 + GF )−1 G =
2s + 3
s+1
S = Gwy = (1 + GF )−1 =
2s + 3
s+2
T = 1−S =
2s + 3
Internal stability?
108
Check the following transfer functions
s+1
Gwu u = (1 + F G)−1 =
2s + 3
(s + 2)(s + 1)
Gwu = −(1 + F G)−1 F = −
(s − 1)(2s + 3)
s−1
Gw u y = (1 + GF )−1 G =
2s + 3
s +1
Gwy = (1 + GF )−1 =
2s + 3
The systemet is not internally stable as Gwu is unstable.
109
7 Limitations in Control Design
7.1
(b) We can get a bandwidth of 5 rad/s if we keep the right-half plane zero
and add a pole in s = −3, i.e.
5 3−s
T (s) = ·
s+5 3+s
In this case, the relationship
T (s)
F (s) = G−1 (s)
1 − T (s)
yields
5(s + 1)
F (s) = −
s(s + 13)
No pole-zer cancellation occurs and all closed-loop system transfer fun-
ctions are stable.
110
(c) With Fr = Fy = F we get
5 3−s
Gc (s) = T (s) = ·
s+5 3+s
s(s + 13)
S(s) = 1 − T (s) =
(s + 3)(s + 5)
The Bode diagrams for those transfer functions are shown in the figure
below.
Bode Diagrams
From: U(1)
10
−10
−20
Phase (deg); Magnitude (dB)
−30
−40 T
S
−50
100
50
−50
To: Y(1)
−100
−150
−200
−250 T
S
−300
−2 −1 0 1 2
10 10 10 10 10
Frequency (rad/sec)
111
7.2
or
(3 − s)
G(s) = e−s (3 + s)Ḡ(s)
(3 + s)
The argument of the frequency response is
ω
arg G(iω) = −ω − 2 arctan + arg((3 + iω)Ḡ(iω))
3
According to the assumptions the magnitude curve decreases monotonically
and according to Bode’s relation we get
arg((3 + iω)Ḡ(iω)) ≤ 0
112
7.3
Assume that we have a zero close to the origin and a pole far from the origin
in, both in the right-half plane. For example, we could have (ǫ << 1)
−ǫ + s
G(s) =
− 1ǫ + s
According to Theorem 7.4 in the textbook, the magnitude of the sensitivity
function must have a peak in a neighborhood of ǫ. In addition, Theorem 7.6
says that the magnitude of the complementary sensitivity function must have
a peak in the neighborhood of 1/ǫ.
7.4
(a) The requirements on |S(iω)| = σ̄(S(iω)) and |T (iω)| = σ̄(T (iω)) can
be formulated as
1 1
|S(iω)| ≤ 10
, ω ≤ 0.1, |T (iω)| ≤ 10
, ω≥2
1
|S(0)| ≤ 100
G(iωc )Fy (iωc )
|T (iωc )| =
≈ 1.4
1 + G(iωc )Fy (iωc )
kT k∞ = sup |T (iω)| ⇒ kT k∞ ≥ |T (iω)|, ∀ω
ω
⇒ kT k∞ ≥ 1.4
(e)
|T (iωc )| = 1.4
r
W (iωc ) = 0.14
−1 0.452
T 1+ = 0.32
0.45 22
It is impossible to find a feasible solution using this choice of weighting
functions. Try weighting functions of higher order.
7.5
R∞
If the surface A2 is greater than the surface A1 we have that 0 log |S(iω)|dω >
0. According to Theorem 7.3, the loop gain G(s)Fy (s) has unstable poles.
114
7.6
115
7.7
8.1
(a) !
− 57 12
7
RGA(G(0)) = G(0) . ∗ G−T (0) = 12
7
− 57
8.2
3 s+1
!
s+4 s+4
RGA(G(s)) = s+1 3
s+4 s+4
As all elements in the RGA(G(0)) are positive all combinations are possible.
At the crossover frequency we get
12−30i 104+30i
!
116 116
RGA(G(10i)) = 104+30i 12−30i
.
116 116
8.3
(a) s−1
2
RGA(G(s)) = s+1 s+1
2 s−1
s+1 s+1
116
yields
−1 2
RGA(G(0)) = .
2 −1
As we want to avoid pairing corresponding to negative elements in the
RGA(0) we have to choose u1 ↔ y2 and u2 ↔ y1 .
(b) As
1 −2
G(0) =
1 −1
we choose W1 = G−1 (0) and W2 = I. A controller that decouples the
system in steady state is
diag −F11 (s) 2F22 (s)
F (s) = W1 F (s)W2 = .
−F11 (s) F22 (s)
8.4
117
8.5
8.6
1 p(p + 1)
Q(p) = G−1 (p) 2
=
(λp + 1) (λp + 1)2
p+1 1 1+p
Fy (p) = (1 − Q(p)G(p))−1 Q(p) = 2 = · p
λ p + 2λ 2λ 1 + 2/λ
1 1+p
⇒ u=− · p y
2λ 1 + 2/λ
|Fy (iω)|
1
λ2
1
2λ
1 ω
2/λ
1+p
High bandwidth ⇒ λ small ⇒ Fy (p) ≈ ⇒ PD controller
2λ
118
8.7
9
!
1 s+1
2
G(s) = .
s/20 + 1 6 4
This results in the poles −20, −20 and −1. The zeros are given by
det G(s) normalized with the pole polynomial. This yields a zero located
at s = 2. We have to take proper care of the right-half plane zero in
the IMC design.
(b)
9
!−1
s+1
2
G−1 (s) = (s/20 + 1)
6 4
!
(s/20 + 1)(s + 1) 4 −2
= 9
24(−s/2 + 1) −6 s+1
Mirror the right-half plane zero of G(s) in the imaginary axis and add
the factor (λs + 1).
!
(s/20 + 1)(s + 1) 4 −2
Q(s) = 9
24(λs + 1)(s/2 + 1) −6 s+1
119
8.8
8.9
(a) Since system is quadratic, i.e the number of inputs equals the number
of outputs, the zeros can be determined as the poles of G−1 (s). This
gives
1 −3
1 s+1 s+2
G−1 (s) =
=
det G(s) −α 2
s+1 s+1
(s + 1)(s + 2) −3(s + 1)2
1
=
s(2 − 3α) + 4 − 3α
−α(s + 1)(s + 2) 2(s + 1)(s + 2)
The pole polynomial becomes
s(2 − 3α) + 4 − 3α
and hence the zero polynomial is given by
3α − 4
n(α) = .
2 − 3α
The location of the zero is shown in the figure below.
120
10
n(α) 2
−2
−4
−6
−8
−10
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2
α
(b) In order to obtain that F (s)G(s) is diagonal, F (s) has to contain the
inverse of G(s). For 2/3 < α < 4/3 we have n(α) > 0, i.e. the zero is
located in the right half plane. This means that F (s) is unstable, which
should be avoided if possible.
8.10
>> s = tf(’s’);
G = [1/(s+2) 2/(s+4); 1/(s+1) 1/(s+2)];
G0 = freqresp(G,0);
RGA = G0.*inv(G0).’
RGA =
-1 2
2 -1
121
Negative elements in the diagonal of the RGA indicate that it will not
be possible the control system using a diagonal regulator.
(b) The transfer function matrix of the closed loop system is given by
ans =
-14.4265
-2.3060 + 1.3712i
-2.3060 - 1.3712i
0.0385
-14.4265
-2.3060 + 1.3712i
-2.3060 - 1.3712i
0.0385
which means that the poles of the closed loop system are −14.4, −2.3 ±
1.37i and 0.04. Since there is a pole in the right half plane the system
is unstable.
Note: G(s) has 4 poles and a constant regulator does not add any
poles. The number of poles are doubled by the functions feedback and
tf. The extra poles are removed by using state space representation
and the command minreal.
>> pole(minreal(ss(Gc)))
ans =
-14.4265
0.0385
-2.3060 + 1.3712i
-2.3060 - 1.3712i
122
(c) The problem can be modified by renumbering the output signals, i.e.
switch the columns in G(s). This gives the modified transfer function
matrix
1 1
Ḡ(s) = s+1 s+2
1 2
s+2 s+4
RGA =
2 -1
-1 2
>> Gc = feedback(Gb*F,eye(2));
pole(Gc)
ans =
-16.2449
-4.8756
-1.4398 + 0.9522i
-1.4398 - 0.9522i
-16.2449
-4.8756
-1.4398 + 0.9522i
-1.4398 - 0.9522i
123
9 Minimization of Quadratic Criteria: LQG
9.1
(b) The poles of the transfer functions of the closed loop system are given
by the eigenvalues of A − BL and A − KC respectively. Thus, the poles
are
√ p
− 1 + α and − 1 + β.
124
9.2
As M = 1, Q1 = q1 and Q2 = 1 we get
p
L = S = −1 + 1 + q1 .
The loop gain is
1 1
G(s)Fy (s) = L K=
s + 1 1√ +s+L+K
√
(−1 + 1 + r1 )(−1 + 1 + q1 )
= √ √
(s + 1)(s − 1 + 1 + r1 + 1 + q1
125
(b) The parameters r1 and q1 influence the loop gain in the same way due
to symmetry.
(c)
√ √
(−1 + 1 + r1 )(−1 + 1 + q1 )
G(s)Fy (s) = √ √
(s + 1)(s − 1 + 1 + r1 + 1 + q1 )
What happens when r1 or q1 → ∞?
√ √
(−1 + 1 + q1 ) −1 + 1 + q1
r1 → ∞ ⇒ G(s)Fy (s) = √ √ → .
(s + 1) (s−1+−1+
1+r1 + 1+q1 )
√ s+1
1+r1
Analogously we get
√
−1 + 1 + r1
lim G(s)Fy (s) =
q1 →∞ s+1
|GFy |
1 ω
9.3
State-space form:
0 1 0
ẋ = x+ u
0 0 1
z = 1 0 x
1 0
y= x
0 1
126
The weighting matrices are Q1 = 1 and Q2 = η. The Riccati equation is:
AT S + SA + M T Q1 M − SBQ−1 T
2 B S = 0
Define
s1 s2
S= ,
s2 s3
This results in
2
0 0 0 s1 1 0 1 s2 s2 s3
+ + − · =0
s1 s2 0 s2 0 0 η s2 s3 s23
−1/4
The poles
√ are
the eigenvalues of A − BL. Define µ = η ⇒ L =
2
µ 2 · µ . This results in
s −1 √
0 = det 2
√ = s2 + 2µs + µ2 ,
µ s+ 2·µ
i.e. r
µ µ2 µ µ
s = −√ ± − µ2 = − √ ± i · √ =
2 2 2 2
µ 1
= − √ · (1 ± i) = − √ · (1 ± i)
2 2 · η 1/4
If η decreases the poles will be placed further away from the origin. This
results in an increased input signal u(t). Compare this result to the criterion.
127
9.4
The separation theorem states that it is optimal to use the estimated states
in the feedback. Thus, the optimal feedback is
s !!
1 1 2H
µ(t) = − √ −α + α2 + √ x̂
ρ H ρ
128
9.5
We want good robustness properties around the frequency ω = 0.5 rad/s, i.e.
we want the magnitude of the complementary sensitivity function T (s) to be
small at this frequency. As T (s) is the transfer function from the measurement
noise n(t) to the output signal y(t) we can proceed as follows:
If we estimate x̂(t) using the Kalman filter we will minimize the covariance
matrix of the estimation error. The model we use for n(t) will tell us for
which frequencies the measurments of y(t) are inaccurate. The Kalman filter
will suppress measurements at those frequencies, i.e |T (iω)| will be small.
As the Kalman gain K does not influence the closed-loop system Gc (s), we
can choose Q1 and Q2 to get a desired Gc (s).
If we study the transfer function of the Kalman filter, i.e. the transfer function
from y(t) to ŷ(t), we get an indication of how the mesurement noise affects
the suppression.
We want the noise model to have much energy around the frequency ω = 0.5
rad/s. One such model is n(t) = H(p)w(t) where w(t) is white noise, the
poles of H(s) are located at s = −0.01 ± 0.5i and there is a zero at s = 0,
i.e.
Kn s
H(s) = 2 .
s + 0.02s + 0.2501
Using controllable canonical form we get
−0.02 −0.2501 1
ẋn (t) = xn (t) + w(t)
1 0 0
n(t) = Kn 0 xn (t)
129
Extending the original state-space form with the noise model yields
0 1 0 0 0 0
0 −1 0 0 x̄(t) + 1 u(t) + 0 w(t)
˙
x̄(t) = 0 0 −0.02 −0.2501 0 1
0 0 1 0 0 0
y(t) = 1 0 Kn 0 x̄(t).
If this model, with an appropriate value of Kn , is used to compute the Kalman
gain K, the magnitude curve of the transfer function from y(t) to ŷ(t) = x̂1 (t)
will look as in the figure below. Signals at frequencies around ω = 0.5 rad/s
are heavily attenuated.
1
10
0
10
Amplitude
−1
10
−2
10 −2 −1 0 1 2
10 10 10 10 10
ω [rad/s]
9.6
Let G be the system, F the controller, y the output signal and v the distur-
bance. This results in
1
y= v = Sv
1 + GF
F
u= v
1 + GF
where S is the sensitivity function.
130
is minimized given that Φv (ω) = δ(ω).
9.7
Furthermore, we have
131
The Kalman filter is given by: K = P C T R2−1 with P according to
AP + P AT + NR1 N T − P C T R2−1 CP = 0
p1 p2
Define P = .
p2 p3
√
3 − 1 √1
This results in limǫ→0 P = and
1 3
√
3−1
K = P CT R2−1 =
1
(ii) Compute L such that
Z ∞ Z ∞
2 2
min x1 (t) + u (t) dt = min y T Q1 y + uT Q2 u dt
L 0 L 0
where Q1 = Q2 = 1.
The optimal L is given by: L = Q−1 T
2 B S where S is the positive
semidefinite solution of
AT S + SA + C T Q1 C − SBQ−1 T
2 B S = 0.
s1 s2
Define S = .
s2 s3
√ !
2 − 1 1 − √12
This results in limǫ→0 S = and
1 − √12 ∗
√
L = Q−1 B T
S = 2 − 1 1 − √1
2 2
The LQG controller is
x̂˙ = Ax̂ + Bu + K(y − C x̂)
u = −Lx̂
1 1 1
S(0) = = = .
1 + Fy (0)G(0) 1+1 2
132
(b) Compute L using LTR(y):
Lltr = Q−1 T
2 B S
S : AT S + SA + C T ρQ2 C − SBQ−1 T
2 B S = 0
√ √ !
1+ρ−1 √1+ρ−1 √ √
⇒S= √ 1+ρ+ǫ
⇒ Lltr = 1+ρ−1 √1+ρ−1
√1+ρ−1 ∗ 1+ρ+ǫ
1+ρ+ǫ
9.8
where
k
w 20 =
.
50
The Bode plot for k = 1 is given. There is a resonance peak at w0 ≈ 0.14.
z = Gc r − T v2 + s̃v1 .
The robustness criterion implies that |T (iω0 )| should be small to handle large
errors in k. A large spectrum for v2 at w = w0 will force T to be small at this
133
frequency. Let v2 be colored noise with a peak in the spectrum at w0 . This
can be achieved by chosing poles in −0.01 ± 0.14i and a zero in 0, i.e.
k2 p
v2 = w,
p2 + 0.021p + 0.02
State-space representation of v2 :
−0.02 −0.02 1
ẋv = xv + w
1 0 0
| {z } |{z}
Av Bv
v2 = (k2 0) xv
| {z }
Cv
y = (M Cv ) x̄
z = (M 0) x̄
v2 = (0 Cv ) x̄
with A, B, M, Av , Bv , Cv as above.
9.9
The Nyquist curve will approach the origin with the angle −180◦ . An LQ
controller always approaches the origin with −90◦ .
134
9.10
9.11
9.12
9.13
9.14
L = Q−1 T
2 B S
where
0 = AT S + SA + M T Q1 M − SBQ−1 T
2 B S
135
(b) Using the result from above gives for the case α = 1
p
L = 1 + 1 + 1/ρ
i.e. L → 2, while the case α = −1 gives
p
L = −1 + 1 + 1/ρ
9.15
The choices (iii) and (iv) give the same gain vector L since J(iii) = 0.1 J(iv) .
The L that minimizes J(iii) will also minimize J(iv) . The figures (A) and (C)
show the same simulation results. The matrices in (i) put less weight on the
input u which implies a faster settling, i.e. (B). The choice (ii) puts a weight
on the velocity which implies a slower response, i.e. (D).
9.16
Since the system has two poles in the origin the system is not asymp-
totically stable.
(b) The feedback gain becomes
136
x’ = Ax+Bu
y = Cx+Du
State−Space Auto−Scale
Graph2
K
Matrix
Gain
Auto−Scale
Graph1
1.5
1
x4
0.5
−0.5
0 5 10 15 20 25 30 35 40 45 50
Sekunder
0.5
−0.5
u
−1
−1.5
−2
0 5 10 15 20 25 30 35 40 45 50
Sekunder
The closed loop system can be simulated using the model. The state
x4 and u are given by the figure and it can be seen that all signals
tend to zero. The other states are given in the figure below, where
x1 ↔ solid line
x2 ↔ dashed line
x3 ↔ dash-dotted line
0.6
0.4
0.2
−0.2
x
−0.4
−0.6
−0.8
−1
0 5 10 15 20 25 30 35 40 45 50
Sekunder
137
(c) Increasing Q2 reduces u and decreasing Q2 increases u.
(d) An example of matrices that gives a feedback such that the conditions
are fulfilled is given by
250 0 0 0
0 0 0 0
Q1 =
0 0
, Q2 = 1
0 0
0 0 0 1
9.17
u(t) = −Lx(t)
where
L = −4.4721 −4.9405 19.1028 6.1811
which is achieved from LQ-minimization using
20 0 0 0
0 0 0 0
0 0 0 0 Q2 = 1
Q1 =
0 0 0 0
The poles of the closed loop system, i.e the eigenvalues of A − BL, all
have the absolute value 2.36.
λ4 + l4 λ3 + l3 λ2 − 7l2 λ − 7l1 = 0
The closed loop system is stable if all roots are located (strictly) in the
left half of the complex plane. A necessary condition (but not sufficient)
is that all coefficients in the polynomial are strictly positive. A loss of
a measurement of state variable can be interpreted as li = 0 for some
i, and this violates the condition.
138
10 Loop Shaping
10.1
ẋ1 = −x1 + u
y = x1
Weighting functions
1
Wu (s) = 5, WT (s) = 0.5, WS (s) =
s
Form the extended system G0 :
z1 = Wu u = 5u
z2 = WT Gu = 0.5x1
z3 = WS (Gu + w) = x2
This yields
−1 0 1 0
ẋ = x+ u+ w
1 0 0 1
0 0 5
z = 0.5 0 x + 0 u
0 1 0
y = 1 0 x+w
Check M and D
0 0 5
DT M D = 5 0 0 0.5 0 0 = 0 0 25 6= 0 0 1
0 1 0
139
Hence, define a new input signal ũ as
1
ũ = (D T D)1/2 u + (D T D)−1/2 D T Mx = 5u ⇔ u = ũ
5
This is just a scaling of the original input signal. Thus we get a new B matrix
1
B̃ = B
5
Define
s1 s2
S=
s2 s3
which yields
−s1 + s2 −s2 + s3 −s1 + s2 0
+
0 0 −s2 + s3 0
2
0.25 0 1 s1 s1 s2
+ − =0
0 1 25 s1 s2 s22
Hence,
1 2
−2s1 + 2s2 + 0.25 − 25 s1 = 0
1
−s2 + s3 − 25 s1 s2 = 0
1 2
1 − 25 s2 = 0
52
which has the positive semidefinite solution s1 = 4.686, s2 = 5 and s3 ≥ 4.686
.
Thus, the state feedback for the scaled system is
L̃ = B̃ T S = 1
s
5 1
1
s
5 2 = 0.937 1
1
L = L̃ = 0.187 0.2
5
The controller is
140
10.2
The criterion to minimize is the H∞ norm of Gec . The extended system is the
same as in the previous exercise. The controller is L = B T S, for the smallest
value of γ for which
AT S + SA + M T M + S(γ −2 NN T − BB T )S = 0
has a positive semidefinite solution. If we solve this numerically using Mat-
lab we see that γ ≥ 5.12 produce positive definite solutions. For γ = 5.2 we
get
L = 2.6873 2.7632
10.3
1
(a) The frequency weights WS = s
and WT = Wu = 1 result in
z1 = Wu u = u
z2 = WT Gu = Cx
z3 = WS (Gu + w) ⇔ ż3 = Cx + w = y
and
ẋ A 0 x B 0
= + u+ w
ż3 C 0 z3 0 1
x
y= C 0 +w
z3
Controllers for the H2 and H∞ cases can be computed using the ex-
pressions in the textbook.
(b) The observer is given by
x̂˙ = Ax̂ + Bu ⇔ x̂ = (pI − A)−1 Bu
R
ẑ˙3 = C x̂ + (y − C x̂) = y ⇔ ẑ3 = y dτ
The state feedback is
x̂ R
u = − L −α = −Lx̂ + αẑ3 = −L(pI − A)−1 Bu + α y dτ
ẑ3
By solving for u we get the desired controller structure
α R
u= y dτ
1 + L(pI − A)−1 B
141
(c) If the system contains an integrator we have det(pI − A) = p · ξ(p)
which implies that
α 1 αξ(p)
u= 1 · y= y
1+ pξ(p)
L(pI − A)a B p pξ(p) + L(pI − A)a B
10.4
10.5
10.6
142
– Alternative I is realistically specified with small S for low frequen-
cies and small T for high frequencies.
143
12 Stability of Nonlinear Systems
12.1
and
V̇ = Vx f (x) = x1 ẋ1 + x2 ẋ2 = −0.2x22 (1 + x22 ).
Hence, V̇ < 0 except when x2 = 0. If x2 ≡ 0 we have that x1 = constant = 0.
Thus the zero solution is asymptotically stable.
12.2
12.3
The slopes
k1 = 0.5
⇒
k2 = 3
result in a circle going through the points −1/3 and −2.
12.4
144
12.5
The circle criteria applies to a model with one nonlinear static block, and
one linear dynamic block. Here, we have two linear blocks, so our first step
is to convert it to the standard case.
To begin with, we note that we cannot simply move the constant K straight
through the nonlinear block and put it next to the linear dynamics, since
Kf (u1 ) 6= f (Ku1 ). Nevertheless, we can move it to the linear dynamics
block, but we have to go the other way around.
Let z denote the output from the linear dynamics and call the linear dynamics
H(s). We have Z(s) = H(s)U2 (s), u1 = K(r − z), u2 = f (u1 ). This can be
written as u1 = Kr − Kz, i.e., u1 = r̃ − y if we define r̃ = Kr and Y (s) =
KZ(s) = (KH(s))U2 (s) = G(s)U2 (s). In this form, we have u2 = f (r̃ − y),
Y (s) = G(s)U2 (s) which is exactly the type of loop analyzed using the circle
criteria.
This was just a long-winded way of proving that you can pull K along the
loop backwards and multiply it with the linear dynamics, remembering that
when you pull it through the loop, you are redefining the external variable.
K
Re G(iω) = − < 0, ∀ω
ω2 + 1
Notice that there is really no need to simplify as far as done here, as you
know the denominator is a positive real number as it is an absolute value
zz ∗ = |z|2 . All you have to do is to study the real part of the numerator after
having multiplied with the conjugate of the denominator, since all you need
is the sign of this term.
145
12.6
ẋ1 = x2
mg
ẋ2 = − sin x1 l
J
The controller
l = l0 + εΦΦ̇
results in
ẋ1 = x2
mg
ẋ2 = − sin x1 (l0 + εΦΦ̇)
J
As a candidate Lyapunov function we use
1
V (x) = Jx22 + mgl0 (1 − cos x1 )
2
which corresponds to the energy of the system. We get
V̇ = Jx2 ẋ2 + mgl0 sin x1 ẋ1 = −εmgx22 x1 sin x1 ≤ 0 (−π/2 < x1 π/2)
12.7
u = − sgn(ax1 + bx2 )
yield
ẋ1 = x2
ẋ2 = −2x1 − 3x2 − sgn(ax1 + bx2 )
146
The Lyapunov function candidate
α β
V (x) = ( x21 + x22 )
2 2
results in
V̇ = (α − 2β)x1 x2 − 3βx22 − βx2 sgn(ax1 + bx2 )
Take, for example, α = 2, β = 1, a = 0, b = 1, which result in
V̇ = −3x22 − |x2 | ≤ 0
12.8
The nonlinearity is
f (u) = u + arctan(u)
The derivative of f (u) is
1
f ′ (u) = 1 +
1 + u2
and has its maximum f ′ (0) = 2 for u = 0. f ′ (u) → 1 dı̈¿ 21 u → ∞. This
implies
u + arctan(u)
1≤ ≤2
u
which means that the Nyquist curve of the linear part of the system must lie
outside and not encircle the circle passing through −1 and −1/2.
12.9
According to the circle criterion the system is stable if the Nyquist curve lies
outside and does not encircle the circle passing through−4/3 and −4/7.
According to the textbook the loop gain for an LQ controller lies outside
and does not encircle the circle passing through 0 and −2. As this circle
encompasses the above smaller circle the system is stable.
147
13 Phase Plane Analysis
13.1
a) From
10 2
ẏ )ẏ + y + y 2 = 0
ÿ − (0.1 −
3
a reasonable guess is to try the states x1 = y and x2 = ẏ. With these,
we can write the system on state-space form
ẋ1 = x2 = f1 (x1 , x2 )
ẋ2 = −x1 (1 + x1 ) + x2 (0.1 − 10x22 /3) = f2 (x1 , x2 )
148
i.e. we have unstable dynamics since we have postive real part on both
eigenvalues. √
λ = 0.05 ± 0.052 − 1
SP II:
Linear approximation ż = Bz, where
0 1
B=
1 0.1
The eigenvalues of B,
d) SP I :
linear
0.5
0.4
0.3
0.2
0.1
−0.1
−0.2
−0.3
−0.4
−0.5
−0.5 −0.4 −0.3 −0.2 −0.1 0 0.1 0.2 0.3 0.4 0.5
nonlinear
149
0.5
0.4
0.3
0.2
0.1
−0.1
−0.2
−0.3
−0.4
−0.5
−0.5 −0.4 −0.3 −0.2 −0.1 0 0.1 0.2 0.3 0.4 0.5
SP II:
The linearized approximation has a saddle point at (−1, 0). This is
true for the nonlinear differential equation too. The eigenvector cor-
responding to the stable eigenvalue is (1, −0.95), and the eigenvalue
corresponding to the unstable eigenvalue is (1, 1.05).
0.4
0.3
0.2
0.1
x2
−0.1
−0.2
−0.3
−0.4
−1.3 −1.2 −1.1 −1 −0.9 −0.8 −0.7 −0.6
x1
150
3
1
x2
−1
−2
−3
−4 −3 −2 −1 0 1 2 3 4
x1
13.2
i.e.
ẍ + B ẋ = Ke
In addition we have that
e = u − f (x) = −f (x)
which yields
ẍ + B ẋ + Kf (x) = 0
151
Introduce the states x1 = x and x2 = ẋ. The state-space form is
ẋ1 = x2 (4)
ẋ2 = −Kf (x1 ) − Bx2 (5)
−3a −2a −a 0 a
2. The region−a ≤ x1 ≤ a:
The stationary points are line segments : −a ≤ x1 ≤ a and x2 = 0. The
dynamic equations are
ẋ1 = x2
ẋ2 = −Bx2
152
Form the derivative
dx2 ẋ2
= = −B
dx1 ẋ1
In the entire region the trajectories have the slope −B.
−a 0 a
To get the phase portrait we need to join the three partial solutions found
in 1, 2 and 3.
x2
−a 0 a
x1
153
13.3
ẋ1 = x2
ẋ2 = −sgn x1
1.5
0.5
x2
−0.5
−1
−1.5
−2
−1.5 −1 −0.5 0 0.5 1 1.5
x1
(b) For x1 > a we have 21 x22 + x1 = konst and for x1 < −a we have
1 2
x − x1 = konst. For the case |x1 | ≤ a the relay will have the same
2 2
output as before it entered teh region, i.e. the parabola is continuing.
The phase portrait when a = 0.5:
154
4
x2 0
−1
−2
−3
−4
−6 −4 −2 0 2 4 6 8
x1
13.4
(a) Let x1 = y and let x2 be the input to the nonlinearity. This results in
the state-space form
ẋ1 = f (x2 )
ẋ2 = −x1
where
x + 1, x < −1
f (x) = 0, −1 ≤ x ≤ 1
x − 1, x>1
We get centers in the stationary points x = (0, −1) (for x2 ≤ −1) and
x = (0, 1) (for x2 ≥ 1 ). When −1 < x2 < 1 we have x1 = constant.
This results in the phase portrait
155
x2
0
0
x1
The car will not return to the desired position with proportional con-
trol.
ẋ1 = f (x2 )
ẋ2 = −x1 − f (x2 )
The difference from (a) is that the stationary points are stable focuses.
Hence, we get the phase portrait
x2
0
x1
156
13.5
1 1
ẋ2 = 0 ⇒ 0 = −3x2 (1 + x1 ) + x1 x2 = (x1 − 6)x2
6 2
i.e.
x1 = 6 or x2 = 0.
Two cases:
1 1
0 = 2 · 6(1 + · 6) − 6 · x2 − 0.2 · 62 (1 + · 6) = 24 − 6x2 − 14.4
6 6
x1 = 0 x1 = 10 x1 = 6
SP I : , SP II : , SP III :
x2 = 0 x2 = 0 x2 = 1.6
The Jacobian is
2 − 0.4x1 − x2 /(1 + x1 /6)2 −x1 /(1 + x1 /6)
H(x) = fx (x) = 2
x2 /(1 + x1 /6) −3 + x1 /(1 + x1 /6)
SP I:
x1 = x2 = 0 yield
2 0
H1 =
0 −3
157
1
0.8
0.6
0.4
0.2
x2
−0.2
−0.4
−0.6
−0.8
−1
−2 −1.5 −1 −0.5 0 0.5 1 1.5 2
x1
SP II:
When x1 = 10 and x2 = 0 the Jacobian is
−2 −3.75
H2 =
0 0.75
This is also a saddle point. The eigenvector corresponding to the unstable
eigenvalue is (3.75, −2.75), and the eigenvalue corresponding to the stable
eigenvalue is (1, 0). The phase portrait is
0.8
0.6
0.4
0.2
x2
−0.2
−0.4
−0.6
−0.8
9 9.2 9.4 9.6 9.8 10 10.2 10.4 10.6 10.8 11
x1
SP III:
x1 = 6, x2 = 1.6 yield
−0.8 −3
H3 =
0.4 0
158
The eigenvalues are −0.4 ± 1.02i. We have a stable focus with the phase
portrait
1.9
1.8
1.7
x2
1.6
1.5
1.4
1.3
1.2
5 5.2 5.4 5.6 5.8 6 6.2 6.4 6.6 6.8 7
x1
1.8
1.6
1.4
1.2
x2
0.8
0.6
0.4
0.2
0
0 2 4 6 8 10 12
x1
13.6
159
For x2 > 0 we have
ẋ1 = x2
⇒ stationary point (−1, 0)
ẋ2 = −x1 − 1
The Jacobian is
0 1
−1 0
For x2 < 0 we get analogously that x = (1, 0) is a center. If we join the phase
portraits together we get
1
x2
−1
−2
−3
−4 −3 −2 −1 0 1 2 3 4
x1
The system will tend to a point on the x1 -axis, i.e. ẏ will tend to zero.
13.7
(a) We have stationary points for x1 = 0, i.e. the entire x2 -axis, when
u = 0. The trajectories are described by
dx2 1 1
=− 2 ⇔ x2 = + C.
dx1 x1 x1
160
u=0
5
x2
0
−1
−2
−3
−4
−5
−5 −4 −3 −2 −1 0 1 2 3 4 5
x
1
(b)
1
V̇ = Vx ẋ = −2x41 + 2x1 u + 2x1 x2 ⇒ Vı̈¿ lj u = −x1 − x2
2
√
−1 −1 1 3
ẋ = x, with the eigenvalues λ = − ± i .
1 0 2 2
u = −x −x
1 2
1
0.8
0.6
0.4
0.2
2
0
x
−0.2
−0.4
−0.6
−0.8
−1
−1 −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8 1
x
1
161
14 Oscillations and Describing Functions
14.1
1. Apply the signal e(t) = C sin Φ, where Φ = ωt, to the input of the
saturation. If C ≤ 1 the output signal after the saturation will beu(t) =
e(t). If C > 1 the output signal u(t) will be the solid curve in the figure
below:
1
u(Φ)
Φ1
−1
0 π 2π
Φ
Here Φ1 is given by C sin Φ1 = 1, i.e. Φ1 = arcsin(1/C).
2. Compute the Fourier coefficients a1 and b1 as
Z Z
1 2π 1 2π
a1 = u(Φ) cos Φ dΦ , b1 = u(Φ) sin Φ dΦ
π 0 π 0
As u(Φ) is an odd function and cos Φ is even a1 = 0. Utilizing symmetry
we can write b1 as
Z
4 π/2
b1 = u(Φ) sin Φ dΦ
π 0
Z Φ1 Z π/2 !
4
= C sin2 Φ dΦ + sin Φ dΦ
π 0 Φ1
4C Φ1 sin 2Φ1 cos Φ1
= − +
π 2 4 C
162
√
As sin 2Φ1 = 2 sin Φ1 cos Φ1 , sin Φ1 = 1/C and cos Φ1 = C 2 − 1/C we
get √
2C 1 C2 − 1
b1 = arcsin +
π C C2
3. The describing function is given by Yf (C) = (b1 + ia1 )/C
√
2 1 C2 − 1
Yf (C) = arcsin +
π C C2
(a) The problem can be solved either by hand or by using Matlab and both
alternatives will be presented here.
Alternative (i): According to the calculations above the describing fun-
ction of the satuaration is real, starts in 1 for C ≤ 1 and tends to zero
when C tends to infinity. This means that −1/Yf will start in −1 and
tend to −∞ when C grows.
The transfer function of the linear part is
10
G(s) =
s(s + 1)2
Since the system contains an intergrator the argument of G(iω) will
start at −90◦ for low frequencies, and since the system has relative
degree three the argument will tend to −270◦ . This implies that G(iω)
will cross the negative axis and there is a possibility that it will cross
−1/Yf . Using the fact that
we find that arg G(iω) = −180◦ (i.e. it crosses the negative real axis)
for ω = 1. Using also that
we find that | G(i1) |= 5, i.e. G(iω) crosses the negative real axis in the
point −5, and there will hence be an intersection with −1/Yf . In order
to find the corresponding value of C we need to solve the equation
√
2 1 C2 − 1
arcsin + = 0.2
π C C2
163
which has the approximate solution C = 6.3. For oscillations with
C < 6.3 the curve G(iω) will encircle −1/Yf and hence the amplitude of
the oscillations will grow. Correspondingly, for oscillations with C > 6.3
the curve G(iω) will not encircle −1/Yf and hence the amplitude of the
oscillations will decay. Hence the describing function method predicts
that there will be a limit cycle with angular frequency ω = 1 and
amplitude C = 6.3.
Alternative (ii): The Nyquist curve can be plotted in Matlab using
>> s=tf(’s’);
>> G=10/(s*(s+1)^2);
>> nyquist(G)
>> axis([-8 0 -2 2])
1.5
0.5 System: G
Imaginary Axis
Real: −4.92
Imag: −0.00704
Frequency (rad/sec): −1.01
0
−0.5
−1
−1.5
−2
−8 −7 −6 −5 −4 −3 −2 −1 0
Real Axis
Note: The curve does not pass exactly through −5, which is the correct
value according to the analytical calculation, and this is caused by the
automaticaly selection of frequency points in the Matlab function.
The describing function is real and can hence be plotted according to
>> C=1:0.01:10;
>> Yf=2/pi*(asin(1./C)+1./C.*sqrt(1-C.^(-2)));
>> plot(C,Yf)
which gives
164
1
0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
1 2 3 4 5 6 7 8 9 10
10
Step s3 +2s2 +s
Add Saturation Transfer Fcn Scope
165
14.2
The Nyquist curve and the describing function are plotted below
1.5
0.5
Im
A B
0
−0.5
−1
−1.5
−2
−2 −1 0 1 2
Re
14.3
166
The curve −1/Yf (C) covers the entire negative real axis. The frequency
response is
K K(1 − iω)2 · (−iω)
G(iω) = =
iω(iω + 1)2 ω 2(1 + ω 2 )2
K(1 − ω 2 − 2iω)(−iω) −2Kω − iK(1 − ω 2)
= =
ω 2(1 + ω 2 )2 ω(1 + ω 2 )2
arg G(iω) = arg(K) − arg(iω) − 2 arg(1 + iω)
= 0 − π/2 − 2atan(ω)
Nyquist curve
4
1 . .
. . . .
.
. .
. .
. .
. .
. .
Im
0 .
. .
.
. .
. .
. .
. .
. . .
-1 . . . .
-2
-3
-4
-4 -3 -2 -1 0 1 2 3 4
Re
167
such controller is a PD-controller 1 + TD s which will have the phase
atan(TD ) at ω = 1. Note that the phase of L(iω)G(iω) now asymptoti-
cally tends to −π instead of −3π/2 when w → ∞, and for sufficiently
large TD the Nyquist curve does not even cross the real axis.
>> s = tf(’s’);
>> G = 1/(s*(1+s)^2);
>> L1 = 1;L2 = 1 + 0.1*s; L3 = 1 + 0.25*s;L4 = 1+2*s;
>> nyquist(L1*G,L2*G,L3*G,L4*G);
>> axis([-1 0 -1 1]);
>> figure
>> bode(L1*G,L2*G,L3*G,L4*G);
14.4
4 1 π
Yf (C) = ⇒ − =− ·C
π·C Yf (C) 4
168
Nyquist curve
2
1.5
1 . . . . .
. .
. .
. .
0.5 . .
. .
. .
Im
0 . .
. .
. .
-0.5 . .
. .
. .
. .
. . . .
-1 .
-1.5
-2
-2 -1.5 -1 -0.5 0 0.5 1 1.5 2
Re
If the point −1/YN (C) is encircled by the Nyquist curve the amplitude
of the oscillation will increase and otherwise it will decrease. This results
in a stable oscillation. The frequency and amplitude can be determined
from the intersection
√ of the curves
√ which occurs when Im G(iω) = 0,
i.e. when ω = 2. As Re G(i 2) = −1/6, we get
πC 2
−1/6 = − ⇒ C=
4 3π
Hence, the oscillation has the amplitude 2/(3π) and the frequency ω =
√
2.
−2 + ω 2 − 3Kω 2 < 0 ⇒
ω2 − 2
K>
3ω 2
As (ω 2 − 2)/(3ω 2 ) < 1/3, ∀ω we can choose any K > 1/3.
169
Nyquist curve
0.4
0.3
0.2
0.1
Im
-0.1
-0.2
-0.3
-0.4
-0.4 -0.3 -0.2 -0.1 0 0.1 0.2 0.3 0.4
Re
14.5
170
Putting the real and imaginary parts of G(iω) and −1/Yf equal to each
other gives
1 π
=
ω(1 + ω 2 ) 8
πC p 1
1 − 1/(2C)2 =
4 1 + ω2
The first equation has the approximate solution ω = 1.125, which in-
serted in the second equation implies the solution C = 0.75.
Plot the Nyquist curve and the describing function.
1.5
0.5
Im
−0.5
−1
−1.5
−2
−2 −1.5 −1 −0.5 0 0.5 1 1.5 2
Re
(c) x1 = θ, x2 = θ̇ yield
(
ẋ1 = x2 1, x1 < −0.5
, u=
ẋ2 = −x2 + u −1, x1 > 0.5
171
2
1.5
0.5
x2
−0.5
−1
−1.5
−2
−1.5 −1 −0.5 0 0.5 1 1.5
x1
172
14.6
Inserting the numerical values for the PID coefficients gives the transfer fun-
ction
s2 + 2s + 1
G(s) =
s3
for the controller together with the motor. Evaluating G for s = iω gives
−2ω + i(1 − ω 2 )
G(iω) =
ω3
It follows that G crosses the negative real axis at ω = ±1 with G(i) = −2.
A plot of the Nyquist curve is given below.
Nyquist Diagram
1.5
0.5
Imaginary Axis
−0.5
−1
−1.5
−2
−4 −3.5 −3 −2.5 −2 −1.5 −1 −0.5 0
Real Axis
(a) Since the point −1 is not encircled by the Nyquist curve the closed loop
system is asymptoticaldly stable when the amplifier is linear.
173
has un unstable amplitude. This is confirmed by simulation. Below
the output of the linear part is plotted for different initial amplitudes,
showing a decreasing and an increasing oscillation.
3 4
3
2
2
1
1
0
y
y
0
−1
−1
−2
−2
−3 −3
0 2 4 6 8 10 0 2 4 6 8 10
t t
It is clear that the control system will work well as long as there is
no disturbance large enough to start an oscillation with an amplitude
above the critical limit. (The growing oscillations that are created by
large disturbances can be seen as a windup phenomenon of the integ-
rator part of the regulator. When controlling a double integrator using
a PID controller it is therefore very important to have some form of
anti-windup compensation of the integral part.)
14.7
The describing function is real. The Bode diagram shows that arg GO (iω) =
−180◦ and | GO (iω) |= 2 at ω = 2. This implies that the Nyquist curve
crosses the negative real axis in the point −2 for ω = 2. We hence have to
solve the equation
−1
−2 =
Yf (C)
which implies r
4 1 1
Yf (C) = 1− 2
=
πC C 2
and
64 2 64
C4 − C + 2 =0
π2 π
This gives
+ +
C =(−) 2.29 resp (−) 1.11
By inserting some values of C one realizes that Yf (C) looks like the figure
174
0.8
0.6
0.4
0.2
0
0 2 4 6 8 10 12 14 16 18 20
The function −1/Yf (C) thus moves along the real axis from −∞ towards 0
when C increases, but stops at rougly −1/.6 and starts moving back towards
−∞. Hence, the curve −1/Yf (C) will intersect the Nyquist curve twice, as
the computations indicate.
Im
Re
-2 -1
(I). C=1.11. For fixed amplitudes smaller than this value, when we think of
the nonlinearity as a static gain with gain Yf (C), the point −1/Yf (C) will
act as the point −1 in linear stability analysis, and tells us that the closed-
loop system in a linear analysis would be asymptotically stable since it is
not encircled. That means that any oscillation would decay, and C would
not be constant as assumed. Instead it must decrease, and a new thought
fixed value of C would once again indicate asymptotic stability. Hence, if
initial oscillations are small, we suspect they will die out. (The relay here
has a dead-zone which zeroes out everything between −1 and 1 so the result
is reasonable, as a sinusoidal with amplitude 1.1 will almost completely be
175
zeroed out and almost no energy enters the system. If the open-loop system
G0 is stable it is reasonable that the output will go to zero if the input almost
always is zero)
Im
Re
minskande ökande
c
c
(II). C=2.29. For fixed amplitudes larger than this value, when we think of
the nonlinearity as a static gain with gain Yf (C), the point −1/Yf (C) will
act as the point −1 in linear stability analysis, and tells us that the closed-
loop system in a linear analysis would be asymptotically stable. That means
that any oscillation would decay, and C would not be constant as assumed.
Instead it would decrease, and a new thought fixed value of C would once
again indicate asymptotic stability and C would decrease. However, if it
decreases below 2.29, the point −1/Yf (C) is encircled by the Nyquist curve,
and linear analysis tells us the system would be unstable and C would have
to increase. At 2.29, we reach a stationary case were we neither increase nor
decrease C according to linear theory, and we should suspect we will have
oscillations with this amplitude. The limit cycle will have amplitude C = 2.29
Im
Re
ökande
minskande c
c
176
17 To Compensate Exactly for Nonlinearities
17.1
If we let
u = r − cos x1
17.2
u = −y 4 + y 2 + r = −x41 + x21 + r
17.3
This results in
ż1 = ẏ = z2
177
d
ż2 = ÿ = (ẋ1 )
dt
d 2
= x1 + x2
dt
= 2x1 ẋ1 + ẋ2 = [according to (∗)]
= 2x1 x21 + x2 + u
(∗) ⇒ x2 = ẋ1 − x21
= x1 = y = z1
ẋ1 = ẏ = z2
= 2z1 z12 + z2 − z12 + u
= 2z1 z2 + u = α(z) + β(z)u
2
r ū u x1 + x2 x y
✲ +✐ ✲ +✐ ✲ ẋ = u ✲ T (x) ✲
✻ ✻ y = x1
z
−2z1 z2 ✛ q
−L ✛
17.4
178
√
1 1 1 + x1 u
= √ −√ + √
2 1 + x1 1 + x2 2 1 + x1
ż1 = z2
√
1 1 1 + x1 u
ż2 = /from above/ = √ −√ + √ =
2 1 + x1 1 + x2 2 1 + x1
√
1 1 z2 + 1 + z1 1 1
= √ − √ + √ u=
2 z2 + 1 + z1 1 + z1 2 z2 + 1 + z1
= α(z) + β(z)u
1
Choose u = β(z) (ū − α(z)) to get an exact feedback linearization. What are
the poles of the system?
17.5
ẋ1 = x2
1
ẋ2 = (−k(x1 ) − d(x2 ) + x3 )
m
ẋ3 = −x3 + u
y = x1
ẏ = ẋ1 = x2
1
ÿ = ẋ2 = (−k(x1 ) − d(x2 ) + x3 )
m
1
y (3) = (−k ′ (x1 )ẋ1 − d′ (x2 )ẋ2 + ẋ3 )
m
1
= (−k ′ (x1 )ẋ1 − d′ (x2 )ẋ2 − x3 + u)
m
179
As ν = n = 3 we can make an exact feedback linearization. Make the
change of variables
z1 = y x1 = z1
z2 = ẏ ⇔ x2 = z2
z3 = ÿ x3 = k(z1 ) + d(z2 ) + mz3
ż1 = z2
ż2 = z3
1
ż3 = (−k ′ (z1 )z2 − d′ (z2 )z3 − k(z1 ) − d(z2 ) − mz3 + u)
m
y = z1
180