Control System Theory and Design: ECE 515 Class Notes
Control System Theory and Design: ECE 515 Class Notes
Control System Theory and Design: ECE 515 Class Notes
Lecture Notes on
arXiv:2007.01367v1 [math.OC] 2 Jul 2020
December, 2010
Preface
This is a collection of the lecture notes of the three authors for a first-
year graduate course on control system theory and design (ECE 515, for-
merly ECE 415) at the ECE Department of the University of Illinois at
Urbana-Champaign. This is a fundamental course on the modern theory
of dynamical systems and their control, and builds on a first-level course
in control that emphasizes frequency-domain methods (such as the course
ECE 486, formerly ECE 386, at UIUC). The emphasis in this graduate
course is on state space techniques, and it encompasses modeling, analysis
(of structural properties of systems, such as stability, controllability, and ob-
servability), synthesis (of observers/compensators and controllers) subject
to design specifications, and optimization. Accordingly, this set of lecture
notes is organized in four parts, with each part dealing with one of the issues
identified above. Concentration is on linear systems, with nonlinear systems
covered only in some specific contexts, such as stability and dynamic opti-
mization. Both continuous-time and discrete-time systems are covered, with
the former, however, in much greater depth than the latter.
The notions of “control” and “feedback”, in precisely the sense they will
be treated and interpreted in this text, pervade our everyday operations,
oftentimes without us being aware of it. Leaving aside the facts that the
human body is a large (and very complex) feedback mechanism, and an
economy without its build-in (and periodically fine-tuned) feedback loops
would instantaneously turn to chaos, the most common examples of control
systems in the average person’s everyday life is the thermostat in one’s living
room, or the cruise control in one’s their automobile. Control systems of a
similar nature can be found in almost any of today’s industries. The most
obvious examples are the aerospace industry, where control is required in
fly by wire positioning of ailerons, or in the optimal choice of trajectories in
space flight. The chemical industry requires good control designs to ensure
safe and accurate production of specific products, and the paper industry
requires accurate control to produce high quality paper. Even in applications
iii
iv
where control has not found any use, this may be a result of inertia within
industry rather than lack of need! For instance, in the manufacture of
semiconductors currently many of the fabrication steps are done without
the use of feedback, and only now are engineers seeing the difficulties that
such open-loop processing causes.
There are only a few fundamental ideas that are required to take this
course, other than a good background in linear algebra and differential equa-
tions. All of these ideas revolve around the concept of feedback, which is sim-
ply the act of using measurements as they become available to control the
system of interest. The main objective of this course is to teach the student
some fundamental principles within a solid conceptual framework, that will
enable her/him to design feedback loops compatible with the information
available on the “states” of the system to be controlled, and by taking into
account considerations such as stability, performance, energy conservation,
and even robustness. A second objective is to familiarize her/him with the
available modern computational, simulation, and general software tools that
facilitate the design of effective feedback loops.
Preface iii
2 Vector Spaces 23
2.1 Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
2.2 Vector Space . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
2.3 Bases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
2.4 Change of basis . . . . . . . . . . . . . . . . . . . . . . . . . . 27
2.5 Linear Operators . . . . . . . . . . . . . . . . . . . . . . . . . 29
2.6 Linear operators and matrices . . . . . . . . . . . . . . . . . . 31
2.7 Eigenvalues and Eigenvectors . . . . . . . . . . . . . . . . . . 32
2.8 Inner Products . . . . . . . . . . . . . . . . . . . . . . . . . . 35
2.9 Orthogonal vectors and reciprocal basis vectors . . . . . . . . 37
2.10 Adjoint transformations . . . . . . . . . . . . . . . . . . . . . 38
2.11 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
v
vi CONTENTS
4 Stability 65
4.1 Stability in the sense of Lyapunov . . . . . . . . . . . . . . . 66
4.2 Lyapunov’s direct method . . . . . . . . . . . . . . . . . . . . 71
4.3 Region of asymptotic stability . . . . . . . . . . . . . . . . . . 74
4.4 Stability of linear state space models . . . . . . . . . . . . . . 76
4.5 Stability subspaces . . . . . . . . . . . . . . . . . . . . . . . . 79
4.6 Linearization of nonlinear models and stability . . . . . . . . 80
4.7 Input-output stability . . . . . . . . . . . . . . . . . . . . . . 82
4.8 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
5 Controllability 89
5.1 A preview: The LTI discrete-time case . . . . . . . . . . . . . 92
5.2 The general LTV continuous-time case . . . . . . . . . . . . . 92
5.3 Controllability using the controllability matrix . . . . . . . . 95
5.4 Other tests for controllability . . . . . . . . . . . . . . . . . . 97
5.5 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
Index 224
List of Figures
6.1 If the input does not affect the internal temperature... . . . . 105
6.2 If the input to this circuit is zero... . . . . . . . . . . . . . . . 106
6.3 The Kalman Controllability Canonical Form . . . . . . . . . . 111
6.4 The Kalman Observability Canonical Form . . . . . . . . . . 113
ix
LIST OF FIGURES 1
3
Chapter 1
After a first course in control system design one learns that intuition is a
starting point in control design, but that intuition may fail for complex
systems such as those with multiple inputs and outputs, or systems with
nonlinearities. In order to augment our intuition to deal with problems as
complex as high speed flight control, or flow control for high speed commu-
nication networks, one must start with a useful mathematical model of the
system to be controlled. It is not necessary to “take the system apart” -
to model every screw, valve, and axle. In fact, to use the methods to be
developed in this book it is frequently more useful to find a simple model
which gives a reasonably accurate description of system behavior. It may
be difficult to verify a complex model, in which case it will be difficult to
trust that the model accurately describes the system to be controlled. More
crucial in the context of this course is that the control design methodology
developed in this text is model based. Consequently, a complex model of
the system will result in a complex control solution, which is usually highly
undesirable in practice.
Although this text treats nonlinear models in some detail, the most
far reaching approximation made is linearity. It is likely that no physical
system is truly linear. The reasons that control theory is effective in practice
even when this ubiquitous assumption fails are that (i) physical systems can
frequently be approximated by linear models; and (ii) control systems are
designed to be robust with respect to inaccuracies in the system model. It
is not simply luck that physical systems can be modeled with reasonable
accuracy using linear models. Newton’s laws, Kirchoff’s voltage and current
laws, and many other laws of physics give rise to linear models. Moreover,
in this chapter we show that a generalized Taylor series expansion allows
1
2 CHAPTER 1. STATE SPACE MODELS
ẋ = Ax + Bu
(1.1)
y = Cx + Du
where x is a vector signal in Rn , y and u are the output and input of the
system evolving in Rp and Rm , respectively, and A, B, C, D are matrices
of appropriate dimensions. If these matrices do not depend on the time
variable, t, the corresponding linear system will be referred to as linear
time invariant (LTI), whereas if any one of these matrices has time-varying
entries, then the underlying linear system will be called linear time varying
(LTV). If both the input and the output are scalar, then we refer to the
system as single input-single output (SISO); if either a control or output are
of dimension higher than one, then the system is multi input-multi output
(MIMO).
Our first example now is a simple nonlinear system which we approxi-
mate by a linear state space model of the form (1.1) through linearization.
u(t)
y(t)
Reference
Height r
u2
ma = mÿ = mg − c ,
y2
where g is the gravitational constant and c is some constant depending on
the physical properties of the magnet and ball. This input-output model
can be converted to (nonlinear) state space form using x1 = y and x2 = ẏ:
c u2
ẋ1 = x2 , ẋ2 = g −
m x21
where the latter equation follows from the formula ẋ2 = ÿ. This pair of
equations forms a two-dimensional state space model
ẋ = f (x, u).
x(0)
f(x(t),u(t))
x(t)
where δx1 (t), δx2 (t), and δu(t) are small-amplitude signals. From the state
equations (1.2) and (1.3) we then have
Applying a Taylor series expansion to the right hand side (RHS) of the
second equation above gives
∂f2 ∂f2
δ ẋ2 = f2 (xe1 , xe2 , ue ) + δx1 + δx2
∂x1 (xe1 ,xe2 ,ue ) ∂x2 (xe1 ,xe2 ,ue )
∂f2
+ δu + H.O.T.
∂u (xe1 ,xe2 ,ue )
δx˙ 1 = δx2 .
c u2e 2c ue
δ ẋ2 = 2 3 δx1 − δu + H.O.T.
m xe1 m x2e1
1.3. LINEARIZATION ABOUT A TRAJECTORY 5
x (t)
Letting x denote the bivariate signal x(t) = x12 (t) we may write the lin-
earized system in state space form:
0 1 0
δ ẋ = δx + δu
α 0 β
δy = δx1 ,
where
c u2e c ue
α=2 , β = −2 .
m x3e1 m x2e1
Since we must have ẋn = f (xn , un , t), this gives the state space description
δ ẋ = A(t)δx + B(t)δu,
Link 1
Encoder 1
Motor
Table
Link 1
Encoder 2
Encoder 2
Link 2
Link 2
Motor
and
Encoder 1
Since the pendubot is a two link robot with a single actuator, its dynamic
equations can be derived using the so-called Euler-Lagrange equations found
in numerous robotics textbooks [11]. Referring to the figure, the equations
1.4. A TWO LINK INVERTED PENDULUM 7
of motion are
The definitions of the variables qi , `1 , `ci can be deduced from Figure 1.4.
q
2
l c2
q
1
x
lc1
l1
from the above equations. For a range of different constant torque inputs τ ,
this model admits various equilibria. For example, when τ = 0, the vertical
downward position xe = (−π/2, 0, 0, 0) is an equilibrium, as illustrated in
the right hand side of Figure 1.3. When τ = 0 it follows from the equations
of motion that the upright vertical position xe = (+π/2, 0, 0, 0) is also an
equilibrium. It is clear from the photograph given in the left hand side of
Figure 1.3 that the upright equilibrium is strongly unstable in the sense
that with τ = 0, it is unlikely that the physical system will remain at rest.
Nevertheless, the velocity vector vanishes, f (xe , 0) = 0, so by definition the
upright position is an equilibrium when τ = 0. Although complex, we may
again linearize these equations about the vertical equilibrium. The control
design techniques introduced later in the book will provide the tools for
stabilization of the pendubot in this unstable vertical configuration via an
appropriate controller.
x1 (t)
+ - + -
C
L
+
u(t)
R
-
x2 (t)
1
RC
Figure 1.7: A simulation diagram for the corresponding state space model
with x1 = the voltage across the capacitor, and x2 = the current through
the inductor.
1
x2 = C ẋ1 + x1 ,
R
which may be written as
1 1
ẋ1 = − x1 + x2 (1.6)
RC C
From Kirchoff’s Voltage Law (KVL) we have
x1 + Lẋ2 = +u,
or,
1 1
ẋ2 = − x1 + u. (1.7)
L L
Equations (1.7) and (1.6) thus give the system of state space equations
1
− RC C1
0
ẋ = 1 x+ 1 u
−L 0 L
10 CHAPTER 1. STATE SPACE MODELS
where the coefficients {ai , bi } are arbitrary real numbers. The corresponding
transfer function description is
Y (s) B(s) b2 s2 + b1 s + b0
G(s) = = = 3
U (s) A(s) s + a2 s2 + a1 s + a0
where Y and U are the Laplace transforms of the signals y and u, respec-
tively. The numerator term B(s) = b2 s2 + b1 s + b0 can create complexity
in determining a state space model. So, as a starting point, we consider the
“zero-free system” where B(s) ≡ 1, which results in the model
...
w + a2 ẅ + a1 ẇ + a0 w = u
- - -
a2
a1
a0
With zero initial conditions one has the relation Y (s) = B(s)W (s), so
that the signal y can be obtained by adding several interconnections to
the above simulation diagram, yielding the simulation diagram depicted in
1.6. TRANSFER FUNCTIONS & STATE SPACE MODELS 11
Figure 1.8. Letting the outputs of the integrators form states for the system
we obtain the state space model
x1 = w ẋ1 = x2
x2 = ẇ ẋ2 = x3
x3 = ẅ ẋ3 = −a2 x3 − a1 x2 − a0 x1 + u
and
y = b0 x1 + b1 x2 + b2 x3
This may be written in matrix form as
0 1 0 0
ẋ = 0 0 1 x + 0 u
−a0 −a1 −a2 1
y = [b0 b1 b2 ]x + [0]u.
This final state space model is called the controllable canonical form (CCF)
- one of the most important system descriptions from the point of view of
analysis.
Several alternative descriptions can be obtained by manipulating the
transfer function G(s) before converting to the time domain, or by defining
states in different ways. One possibility is to take the description
(s3 + a2 s2 + a1 s + a0 )Y (s) = (b0 + b1 s + b2 s2 )U (s) (1.9)
and divide throughout by s3 to obtain
a2 a1 a0 b0 b1 b2
1+ + 2 + 3 Y (s) = + + U (s)
s s s s3 s2 s
Rearranging terms then gives
1 1
Y = 3 (b0 U − a0 Y ) + 2 (b1 U − a1 Y )
s s
1
+ (b2 U − a2 Y )
s
We may again describe this equation using a simulation diagram, as given
in Figure 1.9. As before, by letting x1 , x2 , x3 denote the outputs of the
integrators we obtain a state space model which now takes the form
ẋ1 = x2 − a2 x1 + b2 u
ẋ2 = x3 − a1 x1 + b1 u
ẋ3 = −a0 x1 + b0 u
y = x1
12 CHAPTER 1. STATE SPACE MODELS
b2
b1
b0
u w
∑ ∑
-
- -
y
a2
a1
a0
u
- - - y
b0 ∑ ∑ ∑
b1
b2
or in matrix form
−a2 1 0 b2
ẋ = −a1 0 1 x + b1 u
−a0 0 0 b0
y = [1 0 0]x + [ 0 ]u.
The observable canonical form, on the other hand, will have the following
A, B, and C matrices:
T
−an−1 1 0 0 ··· 0 bn−1 1
−an−2 0 1 0 ··· 0 .. 0
A= .. .. .. ; B= . ; C= .. .
..
. . . . b1 .
−a0 0 0 0 ··· 0 b0 0
where {pi : 1 ≤ i ≤ n} are the poles of G, which are simply the roots of
a. A partial expansion of this form is always possible if all of the poles are
distinct. In general, a more complex partial fraction expansion must be em-
ployed. When a simple partial fraction expansion is possible, as above, the
system may be viewed as a parallel network of simple first order simulation
diagrams; see Figure 1.10.
The significance of this form is that it yields a strikingly simple system
description:
ẋ1 = p1 x1 + k1 u
..
. decoupled dynamic equations.
ẋn = pn xn + kn u
This is often called the modal form, and the states xi (t) are then called
modes. It is important to note that this form is not always possible if the
roots of the denominator polynomial are not distinct. Exercises 12 and 13
below address some generalizations of the modal form.
Matlab Commands
Matlab is not well suited to nonlinear problems. However, the Matlab pro-
gram Simulink can be used for simulation of both linear and nonlinear
models. Some useful Matlab commands for system analysis of linear
systems are
x1
k1 ∑
p1
x2 y
k2 ∑ ∑
u
p2
x3
k3 ∑
p3
SS2TF computes the transfer function of a model, given any state space
representation.
ẋ = f (x, u)
y = g(x, u)
ẋ = Ax + Bu
y = Cx + Du.
1.7 Exercises
1.7.1 You are given a nonlinear input-output system which satisfies the non-
linear differential equation:
ÿ(t) = 2y − (y 2 + 1)(ẏ + 1) + u.
1.7.3 Obtain state equations for the following circuit. For the states, use the
voltage across the capacitor, and the current through the inductor.
i L (t)
vC (t)
+ - + -
C
+ L +
u (t) u2 (t)
1
- R -
+ +
R
(a) Lead network u(t) R y(t)
- -
+ +
R
(b) Lag network u(t) R y(t)
- C -
C C
+ +
R R
(c) Notch network u(t) y(t)
R/3 3C
- -
u(t) = f(t)
k2 k1
m1 m2
k1 b
r
θ
20 CHAPTER 1. STATE SPACE MODELS
1.7.8 Using Matlab or Simulink, simulate the nonlinear model for the mag-
netically suspended ball.
(a) Using proportional feedback u = −k1 y + k2 r, can you stabilize
the ball to a given reference height r? Interpret your results by
examining a root locus diagram for the linearized system.
(b) Can you think of a better control law? Experiment with other
designs.
1.7.12 This exercise generalizes modal form to the case where some eigenval-
ues are repeated. For each of the following transfer functions, obtain a
state-space realization for the corresponding LTI system by breaking
H into simple additive terms, and drawing the corresponding simula-
tion diagrams for the sum. Choose the outputs of the integrators as
state variables.
2s2
(a) H(s) =
s3 − s2 + s − 1
s2 + s + 1
(b) H(s) = 3
s + 4s2 + 5s + 2
1.7.13 This exercise indicates that a useful generalization of the modal form
may be constructed when some eigenvalues are complex.
(a) Use partial fractions to obtain a diagonal state space representa-
tion for a SISO LTI system with transfer function
s+6
G(s) = .
s2+ 2s + 2
Note that complex gains appear in the corresponding all-integrator
diagram.
(b) Given a transfer function in the form
s+β
G(s) =
(s − λ1 )(s − λ2 )
and a corresponding state space realization with A matrix Com-
pute the eigenvalues λ1 , λ2 of the matrix
σ ω
A =
−ω σ
where σ ≥ 0, ω > 0, find the relationships between λ1 , λ2 , β
and σ, ω. In view of this, complete the state space realization
by obtaining the B and C matrices, and draw the corresponding
simulation diagram.
s2 + s + 1
(c) For the transfer function H(s) = 3 , obtain a state-
s + 4s2 + 5s + 2
space realization for the corresponding LTI system by breaking
H into simple additive terms, and drawing the corresponding
simulation diagrams for the sum.
(d) Apply your answer in (b) to obtain a state space realization of
G(s) in (a) with only real coefficients.
22 CHAPTER 1. STATE SPACE MODELS
Chapter 2
Vector Spaces
Vectors and matrices, and the spaces where they belong, are fundamental to
the analysis and synthesis of multivariable control systems. The importance
of the theory of vector spaces in fact goes well beyond the subject of vectors
in finite-dimensional spaces, such as Rn . Input and output signals may be
viewed as vectors lying in infinite dimensional function spaces. A system is
then a mapping from one such vector to another, much like a matrix maps
one vector in a Euclidean space to another. Although abstract, this point of
view greatly simplifies the analysis of state space models and the synthesis
of control laws, and is the basis of much of current optimal control theory. In
this chapter we review the theory of vector spaces and matrices, and extend
this theory to the infinite-dimensional setting.
2.1 Fields
A field is any set of elements for which the operations of addition, subtrac-
tion, multiplication, and division are defined. It is also assumed that the
following axioms hold for any α, β, γ ∈ F
(a) α + β ∈ F and α · β ∈ F.
(b) Addition and multiplication are commutative:
α + β = β + α, α · β = β · α.
(α + β) + γ = α + (β + γ), (α · β) · γ = α · (β · γ).
23
24 CHAPTER 2. VECTOR SPACES
(α + β) · γ = α · γ + β · γ
Fields are a generalization of R, the set of all real numbers. The next
example is the set of all complex numbers, denoted C. These are the only
examples of fields that will be used in the text, although we will identify
others in the exercises at the end of the chapter.
(x1 + x2 ) + x3 = x1 + (x2 + x3 )
α(βx) = (αβ)x.
2.3. BASES 25
Below is a list of some of the vector spaces which are most important in
applications
(Lnp [a, b], R) – the vector space of functions on the interval [a, b], taking
values in Rn , which satisfy the bound
Z b
|f (t)|p dt < ∞, f ∈ Lp [a, b].
a
b(s)
(R(C), R) – the vector space of rational functions a(s) of a complex variable
s, with real coefficients.
2.3 Bases
A set of vectors S = (x1 , . . . , xn ) in (X , F) is said to be linearly independent
if the following equality
α1 x1 + α2 x2 + · · · + αn xn = 0
x1n xnn
where ϑ ∈ C[0, 1] is the function which is identically zero on [0, 1]. We have
thus shown that the dimension of (C[0, 1], R) is infinite.
A set of linearly independent vectors S = {e1 , . . . , en } in (X , F) is said
to be a basis of X if every vector in X can be expressed as a unique linear
combination of these vectors. That is, for any x ∈ X , one can find {βi , 1 ≤
i ≤ n} such that
x = β1 e1 + β2 e2 + · · · + βn en .
Because the set S is linearly independent, one can show that for any vector
x, the scalars {βi } are uniquely specified in F. The n-tuple {β1 , . . . , βn } is
often called the representation of x with respect to the basis {e1 , . . . , en }.
We typically denote a vector x ∈ Rn by
x1
x = ... .
xn
x = β1 e1 + · · · + βn en ,
where {βi } are all real scalars. This expression may be equivalently written
as x = Eβ, where
x1 e11 · · · e1n β1
.. .. .
.. , β = ...
x = . , E = . ,
xn en1 · · · enn βn
β = E −1 x (2.1)
or,
n
X
x = β̄1 ē1 + · · · β̄n ēn = β̄k ēk . (2.3)
k=1
Since {ei } ⊂ X , there exist scalars {pki : 1 ≤ k, i ≤ n} such that for any i,
n
X
ei = p1i ē1 + · · · + pni ēn = pki ēk .
k=1
β = P −1 β̄.
2.5. LINEAR OPERATORS 29
For the special case where (X , F) = (Rn , R), the vectors {ei } can be
stacked to form a matrix to obtain as in (2.1),
x = Eβ = Ē β̄.
R(A)
A(x)
X x Y
xn
1 n
= x1 a + · · · + xn a ,
the range of A is the set of all possible linear combinations of the columns
{ai } of A. That is, the space spanned by the columns of A. The dimension
of R(A) is then the maximum number of linearly independent columns of
A.
Theorem 2.2. For a linear operator A, the set R(A) is a subspace of Y.
Proof To prove the theorem it is enough to check closure under addition
and scalar multiplication. Suppose that y 1 , y 2 ∈ R(A), and that α1 , α2 ∈ F.
Then by definition of R(A) there are vectors x1 , x2 such that
A(x1 ) = y 1 , A(x2 ) = y 2 ,
A(x1 ) = A(x2 ) = ϑ.
But for any i we have that A(v i ) ∈ W, which implies that for some scalars
{aji },
m
X
i
A(v ) = aji wj , 1 ≤ i ≤ n.
j=1
From this we see how the representations of v and w are transformed through
the linear operator A:
β1 a11 . . . ain α1
β = ... = ... .. .. = Aα
. .
βm ami . . . amn αn
32 CHAPTER 2. VECTOR SPACES
β = Aα β̄ = Āᾱ.
To see how A and Ā are related, recall that there is a matrix P such that
ᾱ = P α β̄ = P β
P Aα = P β = β̄ = Āᾱ = ĀP α.
Ā = P AP −1
A = P −1 ĀP
When these relationships hold, we say that the matrices A and Ā are similar .
(A − λI)x = 0,
2.7. EIGENVALUES AND EIGENVECTORS 33
M := [v 1 . . . v n ]
Λ = M −1 AM. (2.8)
Unfortunately, not every matrix can be diagonalized, and hence the eigen-
vectors do not span Cn in general. Consider the matrix
1 1 2
A = 0 1 3
0 0 2
(A − λ1 I)k x = 0
(A − λ1 I)y = (A − λ1 I)2 x = 0.
Ax1 = λ1 x1
Ax2 = Ax = y + λ1 x = x1 + λ1 x2
Ax3 = λ3 x3
where
λ1 1 0
J = 0 λ1 0 = M −1 AM
0 0 λ3
hx, yi = x∗ y
3. kx + yk ≤ kxk + kyk.
which we will henceforth write as |x|, and reserve the notation k · k for norm
of an infinite-dimensional vector. This Euclidean norm can also be defined
using the inner product: p
|x| = hx, xi (2.9)
In fact, one can show that the expression (2.9) defines a norm in an arbitrary
(finite- or infinite-dimensional) inner product space.
We define the norm of a vector f ∈ Lp [a, b] as
Z b 1/p
kf kLp := |f (t)|p dt .
a
In the case p = 2, this norm is derived from the inner product on L2 [a, b],
but for general p this norm is not consistent with any inner product.
2.9. ORTHOGONAL VECTORS AND RECIPROCAL BASIS VECTORS37
hv 1 , xi = α1 hv 1 , v 1 i + α2 hv 1 , v 2 i + · · · + αn hv 1 , v n i
..
.
hv n , xi = α1 hv n , v 1 i + α2 hv 1 , v 2 i + · · · + αn hv n , v n i
or in matrix form
1 1 1
hv , v i · · · hv 1 , v n i
hv , xi α1
.. .. ..
=
. . .
hv n , xi hv n , v 1 i · · · hv n , v n i αn
| {z }
G
The n × n matrix G is called the Grammian. Its inverse gives a formula for
the representation α:
1
hv , xi
α = G−1
..
.
hv n , xi
If the basis is orthogonal, then G is diagonal, in which case the computation
of the inverse G−1 is straightforward.
A basis is said to be orthonormal if
j i 1, i = j
hv , v i = δij =
0, i 6= j
38 CHAPTER 2. VECTOR SPACES
From the defining property (2.10) of the dual basis, we must have RM = I,
so that R = M −1 .
A∗ : Y → X .
To illustrate this concept, let us begin with the finite dimensional case
X = Cn , Y = Cm
A∗ (y) = ĀT y = A∗ y
Matlab Commands
Matlab is virtually designed to deal with the numerical aspects of the vector
space concepts described in this chapter. Some useful commands are
Good surveys on linear algebra and matrix theory may be found in Chapter 2
of [6], or Chapters 4 and 5 of [5].
2.11. EXERCISES 41
2.11 Exercises
2.11.1 Determine conclusively which of the following are fields:
(a) The set of integers.
(b) The set of rational numbers.
(c) The set of polynomials of degree less than 3 with real coefficients.
(d) The set of all n × n nonsingular matrices.
(e) The set {0, 1} with addition being binary “exclusive-or” and mul-
tiplication being binary “and”.
2.11.2 Define rules of addition and multiplication such that the set consist-
ing of three elements {a, b, c} forms a field. Be sure to define the zero
and unit elements.
2.11.3 Let (X, F) be a vector space, and Y ⊂ X a subset of X. If Y satisfies
the closure property y1 , y2 ∈ Y, α1 , α2 ∈ F =⇒ α1 y1 + α2 y2 ∈ Y , show
carefully using the definitions that (Y, F) is a subspace of (X, F).
(a) Briefly verify that R2×2 is a vector space under the usual matrix
addition and scalar multiplication.
(b) What is the dimension of R2×2 ?
(c) Find a basis for R2×2 .
Representations of vectors
1 2 1
2.11.9 Given the basis v 1 = 1 , v 2 = 0 , v 3 = 0 and the vector
1 0 1
3
x = 2 = α1 v 1 + α2 v 2 + α3 v 3
1
2.11.14 Consider the set Pn of all polynomials of degree strictly less than
n, with real coefficients, where x ∈ Pn may be written x = a0 + a1 t +
· · · + an−1 tn−1 .
(a) Verify that Pn is a vector space, with the usual definitions of poly-
nomial addition, and scalar multiplication.
(b) Explain why {1, t, . . . , tn−1 } is a basis, and thus why Pn is n-
dimensional.
44 CHAPTER 2. VECTOR SPACES
where k·k is the norm induced by the inner product. This is called
the Parallelogram law. Can you give a geometric interpretation
of this law in R2 ?
Adjoint operators
2.11.16 If A : X → Y where X and Y are inner product spaces, the adjoint
A∗ is a mapping A∗ : Y → X . Hence, the composition Z = A∗ ◦ A is
a mapping from X to itself. Prove that N (Z) = N (A).
2.11.17 ForR 1 ≤ p < ∞, let Lp denote functions f : (−∞, ∞) → C such
∞
that −∞ |f (s)|p ds < ∞. For p = ∞, Lp denotes bounded functions
f : (−∞, ∞) → C. The set Lp is a vector space over the complex field.
Define the function A : Lp → Lp as A(f ) = a ∗ f , where “∗” denotes
convolution. We assume that for some constants C < ∞, c > 0, we
have the bound |a(t)| ≤ Ce−c|t| for all t ∈ R. This is sufficient to
ensure that A : Lp → Lp for any p.
(a) First consider the case where p = ∞, and let fω (t) = ejωt , where
ω ∈ R. Verify that fω ∈ L∞ is an eigenvector of A. What is the
corresponding eigenvalue?
2.11. EXERCISES 45
Eigenvectors
2.11.19 Find the eigenvalues of the matrix
1 1 0 0
0 1 0 0
A= 4 5 1
5
1 2 0 1
A = A∗ = ĀT ,
x∗ Ax > 0.
2.11.21 For a square matrix X suppose that (i) all of the eigenvalues of X
are strictly positive, and (ii) the domain of X possesses an orthogonal
basis consisting entirely of eigenvectors of X. Show that X is a pos-
itive definite matrix (and hence that these two properties completely
characterize positive definite matrices).
Hint: Make a change of basis using the modal matrix M = [v 1 · · · v n ],
where {vi } is an orthonormal basis of eigenvectors.
2.11.22 Left eigenvectors {ω i } of an n × n matrix A are defined by ω i A =
λi ω i , where {ω i } are row vectors (1 × n matrices) and the {λi } are the
eigenvalues of A. Assume that the eigenvalues are distinct.
In this chapter we investigate solutions to the linear state space model (1.1)
in the general setting with x ∈ Rn , y ∈ Rp and u ∈ Rm . We begin with
the linear, time-invariant (LTI) case where the matrices (A, B, C, D) do not
depend upon time.
Letting
we finally obtain
X(s) = Φ(s)x0 + Φ(s)BU (s). (3.2)
To convert this into the time domain, we will take inverse Laplace trans-
forms. First define
47
48 CHAPTER 3. SOLUTIONS OF STATE EQUATIONS
G(s) = CΦ(s)B + D,
and the impulse response is the inverse Laplace transform of the transfer
function:
is given by the formula (3.4). We also know that in the scalar case where
n = 1, the solution of (3.5) is given by the exponential x(t) = eAt x0 , so that
φ(t) = eAt in this special case. In the multivariable case, define the matrix
exponential through the power series
∞ k
X t t2 2
eAt := Ak = I + tA + A ··· ,
k! 2
k=0
x(0) = eA 0 x0 = Ix0 = x0 .
1. eA0 = I.
−1
2. eAt = e−At .
x̄ = P x x = P −1 x̄
ẋ = Ax + Bu
Hence for any invertible matrix P , we can form a new state space model
To show how (3.7) may be applied, suppose that the eigenvalues of A are
distinct, so that the modal matrix M = [v 1 · · · v n ] exists and is non-singular.
Defining P = M −1 , we have seen in equation (2.8) that
Ā = P AP −1 = Λ
3.4. NUMERICAL EXAMPLES 51
The point is, when Ā is diagonal, the state transition matrix is given by the
direct formula
λt
e 1 0
φ̄(t) = eΛt =
..
.
0 e λn t
φ(t) = M φ̄(t)M −1 ,
We will compute φ(t) for the system (3.5) using the various methods de-
scribed in the previous sections. The simple-minded approach is to write
down the formula
t2
At 1 0 0 1 8 −2
φ(t) = e := +t + + ··· ,
0 1 8 −2 2 −16 12
but this does not give a closed form expression unless the infinite series can
be computed.
In the transform domain, we have
s+2 1
−1
8 s
−1 s −1
Φ(s) := (sI − A) = = 2
−8 s + 2 s + 2s − 8
1 −4t 2 2t 1 −4t 1 2t
e + e , − e + e
φ(t) = 3 4 3
4 2
6
1
6 (3.8)
− e−4t + e2t , e−4t + e2t
3 3 3 3
Observe that φ(0) = I, as it should be.
52 CHAPTER 3. SOLUTIONS OF STATE EQUATIONS
The roots of ∆, which are also the eigenvalues of A, are λ = −4, 2. Hence the
eigenvalues are distinct, and a modal form does exist. Solving the equation
Ax = λx for the eigenvector x in this example gives for λ = −4,
0 1 x1 x1
= −4
8 −2 x2 x2
After computing the matrix inverse and products, one again obtains the
expression (3.8).
∆(x) = xn + α1 xn−1 + · · · + αn
Proof We provide a proof for the case of distinct eigenvalues only - for
the general case, see [5], pages 286, 294-5.
When the eigenvalues are distinct, we can work with the transformed
matrix
λ1 0
Λ=
.. −1
= M AM
.
0 λm
A = M ΛM −1 ,
Ak = M Λk M −1
λ1 = −1, λ2 = −2
and since eAt = [β0 (t)I + β1 (t)A], this gives the system of equations
Rewriting this as
t
u
Proof The proof of (a) is outside of the scope of this book. To see (b),
let {xi0 } be a basis for Rn , and define for each 1 ≤ i ≤ Pn thei function ψ i to
be the solution to (3.11) with i n
P x0i = x0 . For any x0 = αi x0 ∈ R one may
easily verify that x(t) = αi ψ (t) is the unique solution to (3.11). Hence
the span of {ψ i } contains all solutions to (3.11). We now show that the {ψ i }
are linearly independent, and hence provide a basis for the solution set.
To show that the {ψ i (t)} are linearly independent time functions, assume
that there exist α1 , . . . , αn such that
α1 ψ 1 (t) + · · · + αn ψ n (t) = ϑ, t ∈ R.
just as the state transition matrix does in the LTI case. To proceed, we need
to invert the fundamental matrix.
Lemma 3.3. The inverse U −1 (t) exists for all −∞ < t < ∞.
Proof Fix t0 , and suppose that for some vector x ∈ Rn ,
U (t0 )x = ϑ ∈ Rn .
We will show that x is necessarily equal to ϑ, and from this it will follow
that U (t0 ) is invertible as claimed.
xi ψ i (t) is evidently a solution to (3.11)
P
The function x(t) = U (t)x =
with x(t0 ) = ϑ. By uniqueness of solutions, we must then have x(t) = ϑ ∈
3.8. PEANO-BAKER SERIES 57
The matrix valued function φ is again called the state transition matrix
of the differential equation ẋ = A(t)x. The state transition matrix shares
many of the properties of the matrix eAt defined earlier, although we do not
have φ(t) = eA(t)t in the LTV case! We do have, however, the following
properties, which hold even in the LTV case: For any t0 , t1 , t2 ,
1. φ(t0 , t0 ) = I.
To see this, use property (1) above, and the matrix differential equation
(3.13). The state transition matrix also gives the solution to the controlled
system (1.1) in the time varying case. We have that for any control u, initial
time t0 , and any initial condition x(t0 ) = x0 ,
Z t
x(t) = φ(t, t0 )x0 + φ(t, τ )B(τ )u(τ )dτ
t0
This suggests the following iterative scheme for finding φ: Set φ0 (t, t0 ) ≡ I,
and
Z t
φk+1 (t, t0 ) = I + A(σ)φk (σ, t0 ) dσ, k ≥ 0.
t0
φ0 (t, t0 ) = I
Z t
φ1 (t, t0 ) = I + A I dσ = I + A(t − t0 )
t0
Z t
φ2 (t, t0 ) = I + A (I + A(σ − t0 )) dσ
t0
(t − t0 )2 2
= I + (t − t0 )A + A
2
Thus, we see again that in the LTI case,
k
X (t − t0 )k
φ(t, t0 ) = Ak .
k!
i=0
Matlab Commands
3.9 Exercises
3.9.1 Use the (matrix) exponential series to evaluate eAt for
0 1 1 0 0 π
(a) A = (b) A = (c) A = .
0 0 1 1 −π 0
Hint: This is easy once you realize that both functions of t solve the
same differential equation.
Using this result, obtain the solution to the linear time-invariant equa-
tion
ẋ = Ax + B ū , x(0) = x0 ,
(a) Evaluate φ(t, s) using the transfer function approach (i.e. (sI −
A)−1 ).
(b) Evaluate φ(t, s) by transforming the system into diagonal form
(i.e. using modal decomposition).
(c) With u(t) ≡ 1, compute y(1).
find the conditions on the initial state vector x0 such that only the
mode corresponding to the smaller (in absolute value) eigenvalue is
excited.
3.9. EXERCISES 61
is
3.9.8 Suppose that A and Q are n × n matrices, and consider the differential
equation
Ż = AZ + ZA∗ , Z(0) = Q. (3.14)
(a) Show using the product rule that the unique solution to (3.14) is
∗t
Z(t) = eAt QeA
AP + P A∗ + Q = 0.
This fact will be very useful when we study stability, and it will
come up again in our study of optimization.
3.9.9 If φ denotes the state transition matrix for the system ẋ (t) = A(t)x(t),
show that V (t) = φ(t, t0 )Qφ∗ (t, t0 ) is a solution to the equation
d
V (t) = A(t)V (t) + V (t)A∗ (t), V (t0 ) = Q.
dt
62 CHAPTER 3. SOLUTIONS OF STATE EQUATIONS
3.9.10 Associated with the control free differential equation (3.11) is the
so-called adjoint equation
ż = −A∗ z,
where A∗ = ĀT . Show that the state transition matrix φa for the
adjoint equation satisfies
φa (t1 , t0 ) = φ∗ (t0 , t1 ) ,
ż = −A∗ z + C ∗ v
w = B∗z .
(i) Show that the impulse response matrix ga for the adjoint model
satisfies
ga (t1 , t0 ) = g ∗ (t0 , t1 ).
ga (s) = g ∗ (−s).
3.9.12 Derive the three properties of the state transition matrix given on
page 57,
63
Chapter 4
Stability
Depicted in Figure 4.1 are results from several simulations conducted using
Matlab. Three different linear state space models of the form (1.1) have been
simulated using three different initial conditions.
1
Initial Conditions:
0.8
0
0 1
0.6
(a) x = x x01 =
1
-2 -3
0.4
0.5
0.2 x02 =
1
0
1
-0.2 x03 =
15 1
-0.4 4 x 10
3.5
0.2 0.4 0.6 0.8 1 1.2
3
2.5
1 2
0 1
0.8
1.5 (b) x = x
0.6
2 3
1
0.4
0.2 0.5
0
2 4 6 8 10 12
-0.2 14
-0.4 x 10
-1 4
-0.6 (c) x = x
-4 -1
-0.8
One can see in these plots three substantially different modes of behavior.
In (a) the solutions are attracted to the origin along the line x2 = −x1 , while
65
66 CHAPTER 4. STABILITY
in (c) solutions are also attracted to the origin, but they move there in a
cyclical fashion. In (b) solutions explode to infinity approximately along a
straight line.
These simulations suggest that some solidarity among different states ex-
ists, but this is not true in general. Consider for example the interconnection
shown in Figure 4.2. From the state equations
ẋ1 = x2
ẋ2 = 2x1 + x2 + u
we have, in the Laplace transform domain,
1 s
X1 (s) = U (s) X2 (s) = U (s)
s2 − s − 2 s2 − s − 2
Thus the output may be expressed in terms of the input as
s−2 1
Y (s) = X2 (s) − 2X1 (s) = U (s) = U (s)
s2 −s−2 s+1
Since the single pole p = −1 is in the left hand plane, this is a BIBO
stable model, as defined in any undergraduate signals and systems course.
However, the state equations also give
0 1
A=
2 1
Solving for the eigenvalues of A yields
det(sI − A) = 0 =⇒ λ1 = −1, λ2 = 2
Thus, we have an unstable root λ2 = 2, but it is cancelled by the numerator
of the transfer function due to the feed forward of x2 . For certain initial
conditions one would expect the state to diverge to infinity, even if the input
and output remain bounded.
In this chapter we present an introduction to stability theory for non-
linear models, and in the process we give a complete characterization of the
types of behavior possible for a linear state space model.
∑
y
-
x2 x1
u
∑ 2
n
IR
ε
x(t)
δ
xo
xe
L
.. g
θ=- mL
sin(θ)
θ
In Figure 4.5 some sample trajectories of x(t) are illustrated. As Figure 4.5
shows, the equilibrium xe = ( π0 ) is not stable in any sense, which agrees with
physical intuition. Trajectories which begin near the equilibrium xe = ϑ will
remain near this equilibrium thereafter. Consequently, the origin is stable
in the sense of Lyapunov. t
u
lim ϕ(t; x0 ) = xe .
t→∞
Consider now the case where f is linear, so that ẋ = Ax. When is this
LTI model asymptotically stable? First note that by the homogeneity prop-
erty of linear systems, asymptotic stability and global asymptotic stability
are equivalent concepts. In the linear case, xe is an equilibrium if and only
4.1. STABILITY IN THE SENSE OF LYAPUNOV 69
.
x2 = θ
−π π
x1 = θ
0
0
x = 0 stable
π
x = 0 unstable
so that the state transition matrix becomes φ1 (t) = I. Since state trajec-
tories are constant, it follows that every state is an equilibrium, and that
every equilibrium is stable in the sense of Lyapunov.
However for A2 ,
1/s 1/s2
−1
(sI − A2 ) =
0 1/s
70 CHAPTER 4. STABILITY
Therefore,
1 t
φ2 (t) =
0 1
which is growing with time. This implies that x(t) → ∞ for certain initial
conditions, and so this system is not stable in any sense.
Thus, the eigenvalues alone do not foretell stability in the sense of Lya-
punov. Looking at the eigenvectors, we see in the first instance from the
equation
0 0 x1 x1
=0
0 0 x2 x2
Theorem 4.2. The LTI model is stable in the sense of Lyapunov if and
only if
V(x(t))
x(t)
Rn
Figure 4.6: V (x(t)) represents the height of the ‘lifted’ trajectory from the
state space Rn
∆ V(x(t))
x(t)
f(x(t))
A level set of V:
{ x : V(x) = V(x(t)) }
x(0) A solution to
Rn the state equations
d
V (x(t)) < 0 for all x(t), x(t) 6= xe .
dt
where is small. If || < 1, the function V is then positive definite. The
derivative is now
T
x1 + x2
∇V (x) =
x2 + x1
and the equation to be analyzed is
{x : V(x) = 1/2}
x2 x2
∆
∆ V(x)
x V(x) x
f(x) f(x)
Figure 4.8: The vectors ∇V (x) and f (x) meet at ninety degrees when x =
(γ, 0)T , and V (x) = |x|2 . By distorting V , and hence also its level set
{x : V (x) = 1/2}, one can increase this angle beyond ninety degrees.
1
If we take x21 < 2 this then gives
1
− x22 + |x1 x2 | − x21
∇V (x) f (x) ≤ − 2
than `:
Suppose that, within Ω` , V (x(t)) is always decreasing. This will be the case
if and only if
∇V (x) f (x) ≤ 0 for all x ∈ Ω` . (4.3)
Since under (4.3) we have V (x(t)) < ` for all t if V (x(0)) < `, it follows
that the set Ω` is invariant: if x0 ∈ Ω` , then x(t) ∈ Ω` for all t > 0. Under
a stronger set of conditions, the set Ω` becomes a region of asymptotic
stability.
Theorem 4.4. Suppose that V : Rn → R is C 1 , and that the nonlinear
model (4.1) satisfies for some ` > 0,
S = {x : v0 ≤ V (x) ≤ `}.
Hence, from this bound, the bound V (x(0)) ≤ `, and the fundamental the-
orem of calculus, for any T > 0,
Z tf
−` ≤ V (x(tf )) − V (x(0)) = ∇V (x(t)) f (x(t)) dt ≤ −εtf .
0
ẋ1 = −x1 − x2
ẋ2 = x1 − x2 + x32
With the Lyapunov function V (x) = x21 + x22 , we have for all x 6= ϑ
which will be negative for x 6= ϑ so long as x22 < 1. Considering Figure 4.9,
it follows from Theorem 4.4 that Ω1 = {x : x21 + x22 < 1} is a region of
asymptotic stability. t
u
x2
Ω1
x1 V(x) = | x |
2
Ω 1 = { x : V(x) < 1 }
{x : x < 1}
2
2
Figure 4.9: The sub-level set of V shown as a grey disk in the figure is a
region of asymptotic stability
where Q > 0 is given. Given the form of the state transition matrix φ, it
follows that the matrix P has the following interpretation:
Z ∞
xT P x = x(t)T Qx(t) dt when x(0) = x.
0
T
To see that P solves the Lyapunov equation, let F (t) = eA t QeAt , and
apply the product rule for differentiation:
d T T
F (t) = AT eA t QeAt + eA t QeAt A = AT F (t) + F (t)A.
dt
So, by the Fundamental Theorem of Calculus,
Z s Z s Z s
d T
F (s) − F (0) = F (t) dt = A F (t)dt + F (t) dt A.
0 dt 0 0
Rs
We have F (0) = Q, and letting s → ∞ we have F (s) → 0, and 0 F (t)dt →
P . In the limit we thus see that the identity −Q = AT P + P A holds, so the
Lyapunov equation is satisfied. t
u
Example 4.4.1. Consider the two-dimensional model
0 1
ẋ = Ax = x.
−2 −2
To see if this model is stable we will attempt to solve the Lyapunov equation
with Q = ( 10 01 ):
0 −2 p11 p12 p11 p12 0 1 −1 0
+ =
1 −2 p12 p22 p12 p22 −2 −2 0 −1
4.5. STABILITY SUBSPACES 79
−2p11 − 2p12 = −1
−2p22 + p11 − 2p12 = 0
2p12 − 4p22 = −1,
5/4 1/4
which has the solution P = .
1/4 3/8
To see if the system is stable, we must now check to see if the matrix P
is positive definite. The principle minors can be computed as
eAt x → 0 as t → ∞.
In the special case where the matrix A has distinct eigenvalues, the stable
subspace is easily characterized using the modal form. Letting {λi } denote
the distinct eigenvalues, and {v i } the corresponding eigenvectors, we may
write any solution x as
n
X
x(t) = αi eλi t v i
i=1
where {αi } is the representation of x(0) with respect to the basis {v i }. From
this equation it is evident that
where k̄ denotes the complex conjugate of k. The formula for the stable
subspace may be equivalently expressed as
1 0
Σs = Span 0 , 2 .
0 1
In the first instance, using the Lyapunov function V (x) = x2 we see that
∇V (x) f1 (x) = −2x4 , and we conclude that the model is globally asymptot-
ically stable. In the second case, we have ∇V (x) f2 (x) = +2x4 , which shows
that trajectories explode to infinity from any initial condition. Although
the behavior of these two models is very different, both have the same lin-
earization with A = 0. t
u
We can now revisit the Van der Pol equations defined in (4.2). The
corresponding matrix A can be computed as
d 0 1
A= f (x)
=
dx x=ϑ
−1 −1
82 CHAPTER 4. STABILITY
s −1
= s2 + s + 1, which gives λi =
Taking determinants, |Is − A| = det 1 s+1
√ √
−1± 1−4
2 = − 12 ± 23 j. So, the origin is asymptotically stable. Previously
we found that the Lyapunov function
V (x) = 21 x21 + 12 x22 + x1 x2
is effective for the nonlinear model. The function V may be written
1 1
T
V (x) = x P x where P = 12 21
2 2
This also works for the linearized model, as can be seen from the following
Lyapunov equation:
0 −1 1 1 0 1
AT P + P A = 12 + 12
1 −1 1 1 −1 −1
− −1 − 1 −
= 12 + 12
1− −1 −1 − 1
1
2
= − 1 = −Q.
2 1 −
Since the matrix Q is positive definite for < 4/5, we again see that the
origin is an asymptotically stable for the linearized model.
Although this is obviously a powerful method, it does not in general
tell the complete story about the stability of a nonlinear system. In some
applications we are in the situation of part (c) where the linearized model is
not asymptotically stable, and in this case the nonlinear equations must be
tackled directly. Another shortcoming of this method is that when using a
linearized model it is not possible to estimate a region of asymptotic stability
for the nonlinear model.
f (t)
-M
This model is BIBO stable if and only if each pole of every entry of G(s)
has a strictly negative real part.
For an LTI model, we see that asymptotic stability of ẋ = Ax implies
BIBO stability. The converse is false since pole-zero cancellations may occur.
The connections between BIBO stability and asymptotic stability may be
strengthened, but first we must develop controllability and observability for
LTI models.
Matlab Commands
(a) Criteria for stability and instability of nonlinear state space models.
(b) Strong connections between stability of a nonlinear state space model,
and stability of its linearization.
(c) An algebraic characterization of stability for linear systems, based on
the matrix Lyapunov equation.
There are many excellent texts on stability and the Lyapunov function ap-
proach. See in particular [9]. A historical development of stability and the
Lyapunov equation is contained in [8].
4.8. EXERCISES 85
4.8 Exercises
4.8.1 Explain the behavior exhibited in Figure 4.1.
4.8.2 This exercise shows how to use state space methods to solve numerical
equations and optimization problems.
ẋ = −P ∇V (x)T ,
4.8.3 Consider the pendulum described in Figure 4.4, with the addition of
an applied torque u. This is a nonlinear system which is described by
the differential equation θ̈ = − sin(θ) + u.
Find a PD controller (state feedback) which stabilizes the system
about θ = π. That is, for controlled state space model with x = θθ̇ ,
the equilibrium ( π0 ) is asymptotically stable.
Is ( π0 ) globally asymptotically stable with your control law?
4.8.4 Suppose that V (x) = xT Ax for a real matrix A, and suppose that the
function V is positive definite. Prove that the matrix M = 21 (A + AT )
is positive definite. Can you find an example in which the matrix A is
not symmetric?
4.8.5 Study the stability of the equilibrium state xe = 0 (x := (y ẏ)T ) for
the nonlinear system
ÿ + ẏ + y 3 = 0
AT P + P A = −Q with Q = I.
ẏ = α0 u.
(b) Obtain a nonlinear state space model for the closed-loop system,
with states y and α̂.
(c) Show that y = r0 ; α̂ = β is an equilibrium for any β 6= 0. Deduce
that the equilibrium ( αr00 ) cannot be asymptotically stable.
(d) Linearize the nonlinear model about an equilibrium. What can
r0
you conclude about the stability of an equilibrium β ?
(e) Show that V (y, α̂) = 21 (y−r0 )2 + 21 (α̂−α0 )2 is a Lyapunov function
for this model. Can you conclude that the equilibrium (r0 , α0 ) is
stable in the sense of Lyapunov?
(a) Compute V (x(t)) for t > 0, and simplify using properties of the
state transition function, e.g.,
d
(b) Using (a), show that dt V (x(t))|t=0 = −x(0)T Qx(0). Conclude
that V is an effective Lyapunov function for this model.
Chapter 5
Controllability
and as a special case its LTI version. Our interest lies in the effectiveness
of the input u to control the state x to arbitrary points in Rn . Consider for
example the two-dimensional LTI model illustrated in Figure 5.1.
From the state equation
0 1 b
ẋ = x + 1 u.
−2 −3 b2
we see that when b1 = b2 = 0, this is the example illustrated in Figure 4.1 (a)
at the beginning of the previous chapter. Obviously, in this case the control
cannot affect the state, so when b = ϑ the model is uncontrollable in the
strongest sense. Consider now b = ( 01 ), and suppose that it is desired to
choose a control which takes the initial state x0 = ( 11 ) to a final state
xf = ( 0.5
0.5 ) at some time tf . One approach is illustrated in Figure 5.1:
Simply follow the control-free trajectory until a time ts at which the state
is nearly “below” the desired final state xf . Then, apply a large positive
value so that the vector bu dominates the state derivative Ax + bu. This
procedure will place x(tf ) at xf for some tf , and a similar strategy can be
used to drive any state to any other state.
A substantially different situation occurs with b = −1
1 . In this case the
vector b is parallel to the subspace indicated by the dotted line Span {v 1 } =
Span {b}, where v 1 is an eigenvector for A. It can be shown in this case that
no control will take a state from one side of this line to the other, and that if
89
90 CHAPTER 5. CONTROLLABILITY
1 1
x0 = 1
0.8
0.6
0 1
0.4 x = x
-2 -3
0.2
0
(control-free)
-0.2
-0.4
0.8
0.6
0 1 0
0.5
0.4 xf = 0.5
x = x + u
-2 -3 1
0.2
0
0 ; t < ts
u(t) =
-0.2 10 15 ; t s < t < ts + ε
-0.4 ts
Figure 5.1: The controlled model can be steered to any state in Rn using
impulsive control.
the initial state x0 lies on this line, then it will stay there forever, regardless
of the control.
The general LTV model (5.1) is called controllable at time t0 if there
exists a finite time, tf , such that for any initial state x0 , and any final
state xf , there is a control u defined on [t0 , tf ] such that x(tf ) = xf . This
concept is not obviously directly useful in control design, except possibly in a
ballistics problem where xf denotes a target! However, we will see that this
is a central idea in the theory of state space models, and that controllability
will be an underlying assumption in many of the control design methods to
be developed. The purpose of this chapter is to characterize controllability
to better understand examples such as these simple models. We will see in
Theorem 5.6 that the pathology illustrated in Figure 5.2 is the only way
that a lack of controllability can occur for an LTI model.
91
1
x0 = 1
0.6
0.4
0.2
-0.2
-0.4
0.6 0 1 -1
0.4 x = x + u
-2 -3 1
0.2
0
(any control)
-0.2
-0.4
Span {v 1 = 1 }
-1
Figure 5.2: If the initial condition satisfies x1 = −x2 , so that the state lies on
the indicated diagonal line, then the state can never leave this line, regardless
of the control. If the initial condition does not start on the diagonal, then
it may never reach it, though it will come arbitrarily close to it for large t.
92 CHAPTER 5. CONTROLLABILITY
The input space D[t0 , tf ] is the set of all piecewise continuous time functions
on [t0 , tf ]. We leave the proof of the following as an exercise.
Theorem 5.1. The following are equivalent for the LTV model (5.1)
The controllability grammian W (t0 , tf ) for the LTV model (5.1) is the
positive definite matrix
Z tf
W (t0 , tf ) := φ(t0 , τ )B(τ )B ∗ (τ )φ∗ (t0 , τ ) dτ. (5.3)
t0
Theorem 5.2. The LTV model (5.1) is controllable at time t0 if and only
if there exists a finite time tf > t0 such that W (t0 , tf ) is nonsingular.
Proof
(i) Assume W (t0 , tf ) is nonsingular, so that W (t0 , tf )−1 exists. We will
show that the model is controllable by showing that it is possible to control
any x0 to ϑ at time tf . Consider the control
for the final value of the state, we may substitute the formula for the control
to give
Z tf
φ(tf , τ )B(τ ) −B ∗ (τ )φ∗ (t0 , τ )W −1 (t0 , tf )x0 dτ
x(tf ) = φ(tf , t0 )x0 +
t0
Z tf
= φ(tf , t0 )x0 − φ(tf , τ )B(τ )B ∗ (τ )φ∗ (t0 , τ ) dτ W −1 (t0 , tf )x0 .
t0
The term W −1 (t0 , tf )x0 is taken outside of the integral since it does not
depend on τ . By the semigroup property
Since the integral of the square norm is zero, and all of these functions are
assumed to be piecewise continuous, we must have B ∗ (τ )φ∗ (t0 , τ )α = ϑ and
hence
α∗ φ(t0 , τ )B(τ ) = ϑ∗ (5.5)
5.3. CONTROLLABILITY USING THE CONTROLLABILITY MATRIX95
From the property φ−1 (tf , t0 ) = φ(t0 , tf ), we can multiply this equation
through by by φ−1 to obtain
Z tf
ϑ=α+ φ(t0 , tf )φ(tf , τ )B(τ )u(τ ) dτ.
t0
C = [B | AB | A2 B | · · · | An−1 B].
Theorem 5.3. For the LTI model (5.6), the model is controllable if and
only if the n × (nm) matrix C has rank n.
Proof To begin, note that in the LTI case we have for t0 = 0,
Z tf
W (0, tf ) = φ(−τ )BB ∗ φ∗ (−τ ) dτ
0
Z tf
∗
= e−Aτ BB ∗ e−A τ dτ. (5.7)
0
(i) We first show that assuming rank (C) < n, we must also have that
W is singular.
If rank (C) < n, there exists α 6= ϑ such that
α∗ [B AB · · · An−1 B] = ϑ∗
α∗ Ak B = ϑ∗ , k = 0, . . . , n − 1.
From the Cayley-Hamilton Theorem 3.1, the state transition matrix can be
expressed as
n−1
X
φ(−τ ) = e−Aτ = βk (−τ )Ak
k=0
from which it follows that α∗ φ(−τ )B = ϑ∗ for all τ . From (5.7) we see that
α∗ W (0, tf ) = ϑ∗ , which shows that W is singular.
(ii) Assume now that W is singular. We will show that rank (C) < n.
We have seen in equation (5.5) that if W (0, tf ) is singular, then there
exists an α ∈ Rn such that
α∗ φ(0, τ )B(τ ) = ϑ∗ , 0 ≤ τ ≤ tf .
which shows that also −α∗ AB = ϑ∗ . Continuing this procedure, we see that
d2 ∗ −At
(α e B) = α ∗ A2 B = ϑ ∗ ,
dt2 t=0
(−1)k−1 α∗ Ak−1 B = ϑ∗ .
α∗ [B|AB|A2 B | · · · | An−1 B] = ϑ∗ ,
R(C) = R(A).
is equal to the set of all states which can be reached from the origin. The
set Σc is called the controllable subspace.
ẋ = Ax + Bu
1 x1
u
B1
s-p
1
1 x2
u
B2 s-p
2
1 xn
u
Bn s - pn
Figure 5.3: The modes of the model are decoupled, and hence the model
cannot be controllable if some B̄i is zero.
C¯ = [P B | P AB | P A2 B | · · · | P An−1 B],
Ā = Λ, P = M −1 ,
where the modes of the model are decoupled. Figure 5.3 illustrates the
structure of the transformed model. If some B̄i is zero, which means that
a row of the matrix B̄ is zero, it is apparent that the model cannot be
controllable. It turns out that the converse is also true:
Theorem 5.5. Suppose that the matrix A has distinct eigenvalues. Then,
(A, B) is controllable if and only if B̄ = M −1 B has no zero rows.
If none of the {B̄i } are zero, choose k such that αk 6= 0. We then have
n
1 X
e−λk τ = αi B̄k B̄i∗ e−λi τ .
αk B̄k B̄k∗ i=1
i6=k
The jth row of B̄ is rj∗ B. From Theorem 5.5 we see that (A, B) is control-
lable if and only if there is no rj within the null space of B ∗ .
Since rj∗ is also a left eigenvector (see Exercise 22 of Chapter 2), we
always have
rj∗ (λj I − A) = ϑ∗ .
rj∗ [ λj I − A| B] = ϑ∗ .
100 CHAPTER 5. CONTROLLABILITY
This final test was derived using a modal form, but it turns out to be true
in general:
Σc = {α ( 11 ) : α ∈ R}.
5.4. OTHER TESTS FOR CONTROLLABILITY 101
and again we conclude that the model is not controllable. Since the first
row is zero, it follows that the first mode (λ1 = −1) is not connected to the
input in modal form.
(iii) We have
s+2 0 1
[sI − A | B] = .
1 s+1 1
Since the rank of this matrix is one, we again see from the Hautus-Rosenbrock
test that the model is not controllable. t
u
102 CHAPTER 5. CONTROLLABILITY
5.5 Exercises
5.5.1 Investigate the controllability properties of the LTI model ẋ = Ax +
Bu, for the three pairs of (A, B) matrices given below.
−5 1 1
(a) A = , B= .
0 4 1
3 3 6 0
(b) A = 1 1 2 , B = 0
2 2 4 1
0 1 0 0
(c) A = 0 0 1 , B = 0
0 0 0 1
−5 1 1
5.5.2 For the system model corresponding to A = ,B= , obtain
0 4 1
a control that drives the system from x = (1 0)T at t = 0, to x =
(0 1)T at t = 1. Simulate your control using Simulink.
5.5.3 Given the linear time-invariant model
−7 −2 6 1 1
ẋ = 2 −3 −2 x + 1 −1 u = Ax + Bu
−2 −2 1 1 0
−1 −1 2
y = x = Cx ,
1 1 −1
5.5.4 Transform the state space model below into CCF, and from the re-
sulting equations compute its transfer function.
0 0 −2 1
ẋ = 1 0 1 x + 1 u
y = (0 0 1)x
0 1 2 1
5.5. EXERCISES 103
ẋ = Ax + Bu + k(t)
V = A ◦ A∗ : Rn → Rn
104 CHAPTER 5. CONTROLLABILITY
Figure 6.1: If the input to this plant does not affect the internal temperature,
another actuator is needed. If the temperature cannot be estimated based
on input-output measurements, another sensor is needed to directly measure
the temperature.
105
106 CHAPTER 6. OBSERVABILITY, DUALITY AND MINIMALITY
+ xc
+ -
u(t) y(t)
- C
Figure 6.2: If the input to this circuit is zero, then the output is zero. Hence
the charge across the capacitor is not observable.
a nuclear reactor given in Figure 6.1. Suppose that there is a state space
model for this plant with the input equal to the rod levels, the output equal
to the power generated, and one of the states equal to the rod temperature.
Suppose first that using this control it is not possible to influence the tem-
perature T . Then the system is not controllable, and for safe operation it
will be necessary to add another actuator to raise or lower the internal tem-
perature. This situation seems highly unlikely for a real reactor. Suppose
now that given the input-output measurements, it is not possible to estimate
the internal temperature T . We then say that the system is not observable.
This again is a highly undesirable situation, though it can be resolved by
adding another measurement - a sensor to directly measure T . Hence, an
uncontrollable or unobservable plant can be “repaired” by expanding the
number of inputs or outputs for the plant.
To take a more realistic example, consider the circuit given in Figure 6.2.
It is obvious here that if the input voltage is zero, then the output voltage
is zero, regardless of the voltage across the capacitor. Hence, the voltage xc
is not observable.
To give a formal definition of observability, consider the LTV model with
an output equation y of the form
Since we are assuming that the system is defined by a linear state space
model, to determine x(t) for all t it is sufficient to compute the initial state
x0 = x(t0 ).
6.1. THE OBSERVABILITY MATRIX 107
we see that the model is observable if, for some t1 , the operator B is one to
one.
˙
ȳ(t) = CAeAt x0
˙
ȳ(0) = CAx0 ,
108 CHAPTER 6. OBSERVABILITY, DUALITY AND MINIMALITY
and this process can be continued until sufficient information has been gen-
erated to find x0 :
ȳ(0) C
˙
ȳ(0) CA
¨
ȳ (0) CA2
= x0 .
..
..
. .
(n−1) n−1
ȳ (0) CA
rank O = n.
Proof If O is full rank, then we have seen that x0 can be computed using
y and its derivatives.
Conversely, suppose that there is an x0 ∈ Rn , x 6= ϑ, such that Ox = ϑ.
We then have CAk x0 = ϑ for any k, and hence also CeAt x0 = ϑ for all t.
Since x0 is indistinguishable from the state ϑ, it follows that the model is
not observable. t
u
The unobservable subspace Σō is defined to be the null space of the ob-
servability matrix. From the proof above, we see that for an initial condition
x(0) ∈ Σō , the output y is identically zero if the input is equal to zero.
ẋ = A(t)x, y = C(t)x
6.3. DUALITY 109
is observable at time t0 if and only if there exists a finite time t1 such that
the observability grammian H(t1 , t0 ) has rank n.
Proof We first prove that non-singularity of the observability grammian
is sufficient for observability:
(i) From (6.2) we have
Z t Z t
∗ ∗
φ (τ, t0 )C (τ )ȳ(τ ) dτ = φ∗ (τ, t0 )C ∗ (τ )C(τ )φ(τ, t0 ) dτ x0 .
t0 t0
Thus Z t1
φ∗ (τ, t0 )C ∗ (τ )ȳ(τ ) dτ = H(t1 , t0 ) x0 . (6.4)
t0
| {z } | {z }
known n × 1 vector known n × n
matrix
or equivalently
This implies that C(t)φ(t)α = 0 for all t0 ≤ t ≤ t1 . Since the two initial
conditions x(t0 ) = x0 + α and x(t0 ) = x0 yield the same output ȳ(t), we
conclude that the model is not observable. t
u
6.3 Duality
By exploiting the similarities between controllability and observability, we
can generate further tests for observability. This approach is known as
duality: observability and controllability are dual concepts. This can be
made precise by defining a model which is “dual” to the model under study.
Given two models
110 CHAPTER 6. OBSERVABILITY, DUALITY AND MINIMALITY
ẋ = A(t)x + B(t)u
(I)
y = C(t)x + D(t)u, x(t0 ) ∈ Rn .
ż =− A∗ (t)z + C ∗ (t)v
(II)
γ = B ∗ (t)z + D∗ (t)v, z(t0 ) ∈ Rn .
The second model is called the dual of the first.
In the LTI case we know that rank (CII ) = n if and only if (II) is con-
trollable, where
Since we have
C
∗
CA
CII = = observability matrix for model I,
CA2
..
.
(a) The LTV model (I) is controllable at t0 if and only if (II) is observ-
able at t0 .
(b) The model (I) is observable at t0 if and only if (II) is controllable at
t0 .
Hence the controllability grammian for I and the observability grammian for
II are identical:
Z tf
WI := φI (t0 , τ )BI (τ )BI∗ (τ )φ∗I (t0 , τ ) dτ
t0
Z tf
= φ∗II (τ, t0 )CII
∗
(τ )CII (τ )φII (τ, t0 ) dτ
t0
= HII .
6.4. KALMAN CANONICAL FORMS 111
u xc
Bc ∑
xc Ac
A 12
Ac
In view of Theorem 5.2 and Theorem 6.2 the proof of (a) is complete. t
u
As a direct application of Theorem 6.3 and Theorem 5.6 we have the
following dual of the Hautus-Rosenbrock test.
t
u
where the column ( 11 ) was taken as the first column of the controllability
matrix, and the column ( 10 ) was chosen to make P −1 full rank. Thus,
0 1
P =
1 −1
The Kalman controllability canonical form can be written as
−1 −2 −1 1
Ā = P AP = B̄ = P B =
0 −1 0
t
u
For general LTI models, the observability canonical form can be obtained
using duality: Using a state transformation, the transformed state may be
written x̄ = x̄x̄oō with
AO 0 x̄o Bo
ẋ = + u
A21 Aō x̄ō Bō
o
x̄
y = [Co 0]
x̄ō
xo y
u Bo ∑ Co
Ao
A 21
xo
Bo ∑
Ao
where in the MIMO case, the {ki } are p × m matrices. By considering the
modal form, the transfer function can also be written as
P (s) = D̄ + C̄(sI − Ā)−1 B̄ (6.6)
114 CHAPTER 6. OBSERVABILITY, DUALITY AND MINIMALITY
where
Ā = Λ B̄ = M −1 B
C̄ = CM D̄ = D
This latter form will allow us to compute the gains {ki } in (6.5). First break
up the matrices C̄, B̄ into their component columns and rows, respectively:
C̄ = [γ 1 · · · γ n ]
β 1T
B̄ = [β 1 · · · β n ]T = ...
β nT
s+1 s+1
P (s) = = .
s2 + 6s + 5 (s + 5)(s + 1)
The second order modal realization is not minimal, but the first order real-
ization is.
By examining each entry of the matrix P we see that there are no direct
pole-zero cancellations. Since there are two poles, one might expect that
a realization can be constructed of degree two. On the other hand, since
P consists of three first-order, and one second-order transfer functions, one
might suspect that a degree four state space model will be required. It turns
out that for this model both predictions are incorrect. The degree of any
minimal realization is three, as we now show.
1
s+1 Y1
2 ∑ ∑
-
1
U1 s+1
-1 ∑
-
1
U2 s+2 Y2
∑ ∑
-
Hence, using just three first order filters we may simulate this model using
the block diagram description shown in Figure 6.5. Taking the outputs of
the integrators as states, we obtain the following state space realization:
−1 0 0 1 2
ẋ = 0 −1 0 x + −1 0 u
0 1 −2 0 1
1 0 0
y = x.
0 0 1
The rank of R1 is two, and the rank of R2 is one. The sum of these ranks
gives the degree 3 of the minimal realization.
To compute the diagonal realization let
R1 = C1 B1 R2 = C2 B2
|{z} |{z} |{z} |{z}
2×2 2×2 2×1 1×2
6.7 Exercises
6.7.1 Consider the transfer function
s+1
P (s) =
s2 + 3s + 2
(a) Obtain a second-order state space realization in controllable canon-
ical form. Is your realization controllable? Observable?
(b) Obtain a second-order state space realization in observable canon-
ical form. Is your realization controllable? Observable?
ẋ = Ax + Bu, y = Cx + Du
Feedback
119
Chapter 7
Pole Placement
In this chapter, we discuss a number of feedback control issues for the LTI
state space model
ẋ = Ax + Bu
(7.1)
y = Cx + Du.
We consider initially the regulation problem: By translating the state space,
we may assume that we are regulating to the value x = ϑ. To perform this
translation we must assume that the DC gain of the plant is known exactly,
and that there are no disturbances. We will develop more “robust” designs
which work in spite of disturbances later in Section 8.1.
The following example serves to illustrate most of the concepts intro-
duced in this chapter. Consider the special case of (7.1),
1 0 0 1
ẋ = Ax + Bu = 0 2 0 x + 1 u
(7.2)
0 0 −1 0
y = Cx = 1 0 1 x
ẋ = (A − BK)x + Br = Acl x + Br
(7.3)
y = Cx
121
122 CHAPTER 7. POLE PLACEMENT
C = [B | Acl B | A2cl B]
Hence,
One eigenvalue is λ = −1, the other two depend on k1 and k2 . Since the two
terms k1 + k2 and 2k1 + k2 are linearly independent, these two eigenvalues
can be chosen arbitrarily (subject to the restriction that complex eigenvalues
can appear only as conjugate pairs) by proper choices of real scalars k1 and
k2 . Hence,
The LTI model (7.2) is stabilizable by linear state feedback, since the
uncontrollable mode is asymptotically stable.
u = −Kx,
ẋ = (A − BK)x = Acl x.
Recall that
We can assign the coefficients of this polynomial, and hence the closed-loop
poles can be assigned arbitrarily.
This analysis can be applied to any controllable SISO system. It is
performed on a system in CCF, but we can transform to CCF for any time
invariant SISO state space model, provided the model is controllable. The
question is, what is the state transformation P that is required to ensure
that x̄ = P x is described by a model in CCF? The controllability matrices
C and C¯ are related by the formula
C¯ = P C.
¯ −1 . The inverse exists if the original
Hence the matrix P is given by P = CC
state space model is controllable. System eigenvalues do not change with
7.1. STATE FEEDBACK 125
In other words, one can place the controllable modes arbitrarily, but the
uncontrollable modes remain unchanged.
The pair (A, B) is said to be stabilizable if there exists a K such that
(A − BK) is a Hurwitz matrix. From these arguments we see that
Theorem 7.2. If the eigenvalues are distinct, then (A, B) is stabilizable if
and only if the eigenvalues of the uncontrollable modes are in the strict LHP.
For a general LTI model, (A, B) is stabilizable if and only if the eigen-
values of Ac̄ lie in the strict LHP, where Ac̄ is the matrix defined in the
KCCF.
126 CHAPTER 7. POLE PLACEMENT
7.2 Observers
The state feedback approach can be generalized to the situation where only
partial measurements of the state are available. Consider again the LTI
model
ẋ = Ax + Bu,
y = Cx.
b˙ (t) = Ab
x x(t) + Bu(t).
e(t) = eAt x
x e(0).
Plant Observer
^
U Y X
P(s) O(s)
b˙ = Ab
x x + Bu + L(y − yb), b(0) ∈ Rn ,
x
7.3. OBSERVER FEEDBACK 127
where yb = C x
b. For any fixed n × p matrix L one obtains
b˙ = Ax + Bu − Ab
ė = ẋ − x x − Bu − L(Cx − C x
b) = (A − LC)e.
To ensure that x
e(t) → 0 as t → ∞, we must compute the eigenvalues of the
matrix (A − LC) as a function of L. But note:
We are thus exactly in the same position as when we considered pole place-
ment. It follows that the eigenvalues of (A − LC) can be placed arbitrarily,
provided that the matrix pair (A∗ , C ∗ ) is controllable. Based on duality, this
is simply observability of the pair (A, C). Thus, we can place the observer
poles arbitrarily if and only if (A, C) is observable.
This again raises the question, what do we do if this basic assumption
fails? The pair (A, C) is said to be detectable if there exists some L such that
(A − LC) is a Hurwitz matrix. This property is the dual of stabilizability,
in the sense that (A, C) is detectable if and only if (A∗ , C ∗ ) is stabilizable.
We then obtain the following dual statement to Theorem 7.2:
u(t) = −K x
b(t).
This control law is designed based on the faith that x e(t) will converge to
zero fast enough so that this control law is essentially equivalent to full state
feedback. To see if this faith is in vain, we must first see if the overall system
128 CHAPTER 7. POLE PLACEMENT
Plant Observer
+ ^
U Y X
∑ P(s) O(s)
-
Figure 7.2: The separation principle justifies the use of state estimates in
place of the true state values in the feedback control law. However, full state
feedback is not completely equivalent to feedback based on state estimation.
Thus, the closed-loop poles of the overall system are defined by the charac-
teristic polynomial
where
to construct an observer for x̄2 alone. To see how this can be accomplished,
write the transformed state equations as follows. The equation for x̄2 may
be written in the suggestive form,
We can now write down the corresponding observer to estimate x̄2 . The
only technicality is that ȳ contains the derivative ẏ, which strictly speaking
is not known. We will assume for now that we know ẏ, but through some
manipulations of the observer equations we will relax this assumption below.
An observer for x̄2 takes the form
b˙ 2 = A22 x
x b2 + ū + L(ȳ − ȳˆ) (7.9)
b˙ 2 = (A22 − LA12 )e
ė = x̄˙ 2 − x
So we can place the observer poles arbitrarily if and only if the pair (A22 , A12 )
is observable.
We now show that it is unnecessary to differentiate the output measure-
ments. First write the observer equations in the expanded form
b˙ 2 = A22 x
x b2 + A21 y + B2 u + L(ẏ − A11 y − B1 u − A12 x
b2 ).
Y d
A21 - LA11
dt
U ^
X2
B2 - LB1 ∑
A22 - LA12
Y
A21 - LA11
U ^
X2
B2 - LB1 ∑ ∑
A22 - LA12
Y ^
X
^ P -1
X2
If we define
A11 A12
Ā =
A21 A22
C̄ = [I 0]
This condition holds if (A22 , A12 ) is observable, since this is the Hautus
test on the reduced complexity observer problem. We conclude that the
condition for observability of the reduced order observer is equivalent to
observability of (Ā, C̄), which is equivalent to observability of the original
pair (A, C).
If the derivative cannot be measured directly, then there are several possi-
bilities:
7.4. REDUCED-ORDER (LUENBERGER) OBSERVERS 133
˙ `s
X̂2 (s) = Y (s),
s+`
where ` is a large constant. The trouble with this approach is that it
does not make use of the system model, and for this reason one cannot
expect that x̂2 (t) − ẏ(t) → 0 as t → 0.
(c) A reduced order observer can be constructed to estimate ẏ. If there is
noise, the observer can be designed to obtain a good trade off between
tracking of ẏ, and rejection of this noise. In the noise free case we have
that x̂2 (t) − ẏ(t) → 0, as long as the observer gain is chosen to give a
stable observer.
The reduced order observer is defined by the equations
Taking transforms gives a formula which is similar to the estimator (b) given
above:
˙ `s + 1 1
X̂2 (s) = X1 (s) + U (s).
`+s `+s
However, this observer does make use of system information, and hence does
exhibit desirable convergence properties.
The controller can be written in the frequency domain as
`s + 1 1
U (s) = −K1 X1 (s) − K2 X1 (s) − K2 U (s).
`+s `+s
Solving for U , it is readily seen that for large ` this is a lead compensator.
That is, the above expression may be written as
s−z
U (s) = −g Y (s)
s−p
where p < z < 0. In conclusion, we see that in simple models, observer
based feedback generalizes classical control design. t
u
134 CHAPTER 7. POLE PLACEMENT
Matlab Commands
In Matlab there are two methods for assigning eigenvalues. These can be
used to obtain the state feedback gain K, or in observer design by
placing the eigenvalues of (A∗ − C ∗ L∗ ) to compute the observer gain
L.
PLACE A more numerically robust algorithm which can be used for MIMO
systems. This command cannot be used with repeated roots.
7.5. EXERCISES 135
7.5 Exercises
7.5.1 For the LTI model
−1 2 1
ẋ = x+ u
0 3 2
u = (1 β)x + r
ẋ = Ax − [ a0 ] u
y = (1, b)x
−2
−2
AT [ 1c ] =
−2c , and A [ 11 ] = −2 ,
(a) Compute the left eigenvector and the right eigenvector of A corre-
sponding to the positive eigenvalue λ. Hint: left eigenvectors are
reciprocal basis vectors for the basis consisting of right eigenvec-
tors.
(b) For what values of (a, b) is the system observable?
(c) For what values of (a, b), if any, is this system BIBO (bounded-
input bounded-output) stable?
Suppose now that the initial condition of the model is not known, and
that x(t) is not observed directly. Is it possible to choose a control so
that y(t) = te−3t for t > 1?
7.5. EXERCISES 137
ẋ = (A − BHC)x + Bv; y = Cx
7.5.7 In this problem you will see that the feedback gain K may not be
unique for multivariate models. Consider the state space model defined
by the pair of matrices
0 1 0 0 0
A= 0 1 1 B= 1 0 C= 1 0 0
0 0 0 0 1
Ba = Bwa Bb = Bwb .
ua = −wa Ka x ub = −wb Kb x
Car M
u
Suspension
u
Wheel m
x 1 + x o1
x2 + x2o
yR
Road
7.5.10 In the previous problem, the ball position x1 can be measured using
a photocell, but the velocity x2 is more difficult to obtain. Suppose,
therefore, that the output is y = x1 .
7.5.11 You will now construct a reduced-order observer for the previous
model.
θ̈ = θ + u , ẍ = −βθ − u,
u = k1 θ + k2 θ̇ + k3 x + k4 ẋ
ẍ − 2ω ẏ − 9ω 2 x = 0
ÿ + 2ω ẋ + 4ω 2 y = u
u = k1 x + k2 ẋ + k3 y + k4 ẏ.
(a) Determine the range of values of the scalar real parameter β for
which we can place 2 poles arbitrarily, using static output feed-
back (as usual, we assume that if the two poles are complex then
they should be in conjugate pairs).
(b) for β = 1, determine static output feedback so that two of the
eigenvalues of the closed-loop system will be λ1,2 = −1 ± j1.
s + 28
P (s) =
(s + 27)(s + 29)
We would like to find a control law which places the poles at (−29, −28),
so that the zero is canceled.
(a) Place the system in modal canonical form, and apply the feedback
control law u = −Km x + r. Compute Km for the desired closed-
loop pole locations.
(b) Place the system in observable canonical form, and apply the feed-
back control law u = −Ko x + r. Compute Ko for the desired
closed-loop pole locations.
(c) Why do you think the gains are larger in the second case.
(s + a)
G(s) = K
(s + b)
142 CHAPTER 7. POLE PLACEMENT
θ2
θ1
τ
+
u(t)
-
(a) Make a Simulink model for this system and plot the open-loop
response θ2 (t) to a non-zero initial condition with θ1 (0) 6= θ2 (0).
(b) Design a full state feedback controller u = −Kx + gr to place the
poles in the region −10 ≤ σ ≤ −5, and choose the gain g so that
the DC gain of the closed-loop system from r to θ2 is one. Plot
step responses for your controlled system, with r = π/2 radians.
In one step response, use zero initial conditions, in the other,
choose the same initial conditions as in (a). Design K so that the
overshoot is less than 20%.
(c) Make a Simulink model for an observer, assuming only θ1 is avail-
able through direct measurements. Combine the observer, your
full state feedback controller, and plant as on page 129 of the
lecture notes. After designing appropriate observer gains, obtain
two step responses of the controlled system, as in (b).
(d) Repeat (c) with a reduced order observer, assuming only θ1 is
directly measured.
144 CHAPTER 7. POLE PLACEMENT
Chapter 8
u = −Kx + N r
where N is chosen based upon the DC gain of the system. Using the final
value theorem
ẋ = Ax + Bu + Ew
y = Cx + F w,
145
146 CHAPTER 8. TRACKING AND DISTURBANCE REJECTION
ż = Am z z(0) ∈ Rq ;
r
= Cm z
w
u = −K1 x − K2 η, η̇ = e = y − r.
we conclude that we can achieve arbitrary pole placement if and only if the
pair (A, e is controllable. If this is the case then the two gains (K1 , K2 ) =
e B)
K can be designed simultaneously using a single Matlab command.
e
We use the Hautus-Rosenbrock test to better understand the control-
lablility of (A, e We have for any complex s,
e B).
sI − A 0 B
rank (sI − A | B) = rank
e e .
−C sI 0
For controllability, we must have for all s,
sI − A 0 B
rank = n + p. (8.1)
−C sI 0
That is, all (n + p) rows must be linearly independent.
First suppose that s 6= 0. Then the bottom p rows (given by [−C sI |
0]) are linearly independent because of the presence of the rank p matrix
sI. The remaining upper n rows will be linearly independent if (A, B) is
controllable (the 0 term does not affect the rank of these rows). Thus if
(A, B) is controllable, the rank condition is met for s 6= 0. For s = 0, the
rank condition (8.1) becomes
−A 0 B
rank = n + p.
−C 0 0
To summarize, the following two conditions are equivalent to controllability
of the pair (A,
e B):
e
148 CHAPTER 8. TRACKING AND DISTURBANCE REJECTION
A B x0 ϑ
= .
C 0 u0 ϑ
ẋ = Ax0 + Bu0 = ϑ.
That is, the state x0 is an equilibrium when this constant input is applied.
The output equation is y = Cx0 = ϑ, so that the initial state/input signal
is invisible to the output. It is this complete lack of response to a DC input
that must be ruled out if integral control, or any other approach to DC
tracking is to be successful.
If the states are not available, we can still use an observer. If there are
disturbances then the estimates may not converge, but one can still show
that the unique equilibrium will satisfy e = 0. In Exercise 3 you will see
how the estimator behaves in the presence of a disturbance.
ẋ = −2x + u + w
y = x.
To regulate this system to track a constant reference r, the control law will
be of the form illustrated below.
8.1. INTERNAL MODEL PRINCIPLE 149
Plant
w
r - - u y
∑ k2 ∑ ∑
- -
k1
Observer
-K O(s)
b˙ = Ab
x x + Bu + L(y − C x
b) = (A − BK − LC)b
x + Ly
u = −K x
b.
Since there is no direct feedthrough term (no “D” matrix) in the formula
(8.2), the transfer function G is strictly proper.
This transfer function can be directly designed, without consideration of
a state space model. To see this, first write the plant and controller transfer
functions as a ratio of polynomials:
b(s)
Plant transfer function = P (s) =
a(s)
n(s)
Controller transfer function = G(s) = .
d(s)
If the control U (s) = −G(s)Y (s) + R(s) is applied, then the closed loop
transfer function becomes
b(s)
Y (s) a(s) b(s)d(s)
Pcl (s) = = n(s) b(s)
= .
R(s) 1 + d(s) a(s) a(s)d(s) + b(s)n(s)
Thus, if we let αc , αo denote the polynomials which define the state feedback
poles, and observer poles, respectively:
αc (s) = det(sI − (A − BK))
= known,
αo (s) = det(sI − (A − LC))
then the polynomials n(s), d(s) must satisfy the following Diophantine equa-
tion:
a(s)d(s) + b(s)n(s) = αc (s)αo (s). (8.3)
We assume that both a(s) and d(s) are monic, so that each of these
polynomials has degree n. We have already noted that G is strictly proper,
which means that the degree of n(s) is strictly less than n. The product
αc (s)αo (s) should also be monic. With this information, the unknown poly-
nomials d(s) and n(s) can be computed. However, some conditions must
be imposed. When we treated this problem using state space arguments
we found that the system must be controllable and observable to compute
the gains K and L. This is equivalent to minimality, which means that the
transfer function P (s) = C(Is − A)−1 B cannot have any common pole-zero
pairs, or that the polynomials a and b do not have common roots.
152 CHAPTER 8. TRACKING AND DISTURBANCE REJECTION
which gives four equations and four unknowns through equating of the co-
efficients. These equations are called the Sylvester equations. t
u
Since the left hand side of this equation vanishes when s = −1, obviously
this equation cannot be solved if neither αc nor αo have a root at −1. Pole
placement is not possible in this example because the transfer function P
does contain a common pole-zero pair.
8.3. EXERCISES 153
8.3 Exercises
8.3.1 Consider the servo motor with transfer function
1
Y (s) = U (s),
s(1 + s)
where u is the voltage input to the motor, and y is its position. In
this exercise you will compare closed-loop sensitivity with and without
integral control.
(a) Design a first order dynamic compensator
s−z
U (s) = k (gR(s) − Y (s))
s−p
so that the closed-loop poles are at −3, −2 ± j. Choose g so that
the closed-loop transfer function Y /R has unity gain at DC.
(b) Plot the step response, and a Bode plot of the sensitivity transfer
function S1 .
8.3.2 Consider the LTI system
ẋ1 = x2
y = x1 , (8.4)
ẋ2 = u + w
where w is a constant but unknown disturbance. Rather than intro-
duce integral control, if we could obtain estimates of w, then we could
design a control law to cancel the effect of this disturbance.
One way to attempt to do just this is to consider x3 = w as an addi-
tional state variable:
ẋ1 = x2
ẋ2 = u + x3 y = x1 .
ẋ3 = 0
(a) Carefully show that this third-order “augmented” system is ob-
servable.
(b) Design a full-order observer for this system. Draw the correspond-
ing all-integrator diagram of the observer in full detail, including
all integrators.
(c) Based upon this observer, design a controller for this system to
place the closed-loop poles at −1, −2, −3, −4, −5. Explain care-
fully why the poles will be placed, and the state estimates will
converge.
154 CHAPTER 8. TRACKING AND DISTURBANCE REJECTION
mÿ = mg − ci2 /y 2
i = k0 x0 + k1 x1 + k2 x2
9.1 Performance
Control can be broadly defined as the use of feedback to obtain satisfactory
performance in the presence of uncertainty. Feedback is simply the act of
incorporating measurements as they become available to define the inputs to
the plant. The definition of performance depends of course on the nature of
the particular control application, but there are some universal performance
issues. Among these are:
(i) Stability of the controlled system is of course the most basic goal. Any-
one who has held a microphone too close to its speaker system knows
that feedback can result in instability, but when properly designed,
feedback can prevent unstable behavior.
(ii) Frequently one desires reasonably accurate tracking of some desired tra-
jectory. If the trajectory is a constant reference value, this is known as
the regulation problem. In the production of chemicals, particularly in
the pharmacuetical industry, yields must be controlled within stringent
specifications. In the automatic control of an aircraft in flight, again
one objective is to keep the flight at a level altitude and a constant
speed.
155
156 CHAPTER 9. CONTROL DESIGN GOALS
All of these issues are typically addressed in the design of a control system in
the face of physical and economic constraints, and in most current industries,
time constraints as well!
One cannot expect good performance if the physical system is poorly
designed. In particular, it is important from the start that the measurement
devices be reasonably precise, and that actuation - the final synthesis of the
control action - be performed accurately. However, in this course we assume
that these issues were considered in the construction of the plant, so that
what is left for the control engineer can be largely completed with a pen,
paper, and a computer.
9.2 Measurements
This course concerns state space models, which in many of our examples are
naturally constructed based upon signals which have physical significance,
and which can be measured if sensors are adjoined to the plant. For instance,
in the pendubot illustrated in Figure 1.3, the states are the link angles, and
their velocities. The link angles can be measured with high precision using
an optical encoder. The velocities are more difficult to measure, but they
can be estimated using finite differences. If, as in this example, an accurate
state space model is available together with accurate state measurements,
then control based upon pole placement or optimal control is frequently
simple and very effective.
However, there are times when full state information is not feasible. For
instance, in many applications the state space model is constructed by first
finding a frequency domain model (i.e. a Bode plot) based upon input-output
measurements. A state space model can then be constructed so that its fre-
quency response accurately matches this empirical Bode plot. In this case,
the state has no physical significance, and the only information available
for controlling the system may be the input and output. In Section 7.2 we
circumvent this difficulty by constructing observers to estimate the state as
input-output measurements are collected. In principle at least, one can then
9.3. ROBUSTNESS AND SENSITIVITY 157
treat the estimates as if they are perfect measurements of the state, and then
apply one of the state feedback control techniques. This gives a mathemat-
ically elegant approach to control design which is also easily analyzed. In
particular, one can easily verify that the goals (i)–(iii) outlined above will be
met if the observer and state feedback controller are appropriately designed.
The fourth goal, robustness, can be easily forgotten in a state space de-
sign, and this can lead to absurd control designs! To see this, consider once
again the pendubot shown in Figure 1.3. With the input u taken as the
torque applied to the lower link, and with the output y taken to be the
lower link angle, the linearized plant in the vertical position is both control-
lable and observable. Theoretically then, it is easy to design a controller
which will keep the pendubot balanced in the vertical position based upon
measurements of the lower angle alone. Physically, this seems very unlikely,
and in fact such a controller has never been successfully implemented on this
plant. The reason for this divergence between theory and practice is that
when evaluating a controller one must also consider robustness to plant un-
certainty. Using a frequency domain analysis, one can more easily see that
any controller for this plant based upon the measurements u, y alone will
be highly sensitive to model inaccuracy. An insensitive design is possible if
both link angles are used in the feedback compensator.
a differential. The sensitivity is then the ratio of this differential, and the
corresponding differential in T :
dT /T P dT
S := = . (9.1)
dP/P T dP
For the error feedback configuration given in Figure 9.1, the derivative can
be computed to give
1 1
S= =
1 + PG 1+L
where L(s) is the loop gain P (s)G(s). The quantity 1 + L(s) is known as
the return difference.
In the MIMO case we can again write for the error feedback configuration
Y = (I + P G)−1 P G R,
S(jω) = (I + P (jω)G(jω))−1 .
Controller Plant
R + U Y
∑ G(s) P(s)
-
|S(jω)| < 1, ω ≥ 0,
there are also other constraints which are absolute. For instance, for the
error feedback configuration we will always have
S + T = 1.
Moreover, if the transfer function L is relative degree at least two, and all
poles lie in the left half plane in C, we have the constraint
Z ∞
log |S(jω)|dω = 0.
0
In this case it is impossible to make |S(jω)| < 1 for all ω, since then
log |S(jω)| is always negative.
(s − γ)(s + γ)
P (s) = k ,
(s − α)(s + α)(s − β)(s + β)
-1
Imag Axis
ω >0 0.2
15
Real Axis
Figure 9.2: The Nyquist plot of G(jω)P (jω). The compensated open-loop
system with transfer function GP possesses two poles in the right half plane.
The three encirclements of −1 ensure that the controlled system is asymp-
totically stable, from the Nyquist Stability Criterion, but this stability is
very fragile.
ẋ = Ax + Bu, y = Cx, x0 = ϑ
Assume that there are as many plant inputs as outputs (p = m), so that the
plant is square. A natural definition of a zero can be formulated as follows:
162 CHAPTER 9. CONTROL DESIGN GOALS
60
40
Gain dB
20
0 -1 0 1 2
10 10 10 10
Frequency (rad/sec)
Figure 9.3: The magnitude plot of the frequency response for the sensitivity
function S = 1/(1 + GP ). The controlled system is highly sensitive to plant
uncertainty at low frequencies.
At s0 , can I find a fixed U (s0 ) and X(s0 ) so that the resulting Y (s0 ) is zero?
That is,
s0 I − A −B X(s0 ) ϑ
= .
C 0 U (s0 ) ϑ
which does generalize the definition given in the SISO case. The complex
number s0 is called a transmission zero. If all of the transmission zeros lie
within the open left half plane in C then the model is called minimum phase.
In the multivariate case, the location of the transmission zeros can play an
important role in the achievable sensitivity of the controlled plant, just as
in the SISO case.
9.5. EXERCISES 163
9.5 Exercises
9.5.1 For the Pendubot described by the state space model (9.2), you will
design two controllers. The design can be done using the PLACE com-
mands within Matlab, and the formula (8.2).
n(s)
G(s) = ,
sd(s)
Optimal Control
165
Chapter 10
where
We assume that x0 , t0 , and t1 are known, fixed values, and x(t1 ) is free. Our
goal is to choose the control u[t0 ,t1 ] to minimize V .
A case which is typical in applications is where m and ` are quadratic
functions of their arguments. For an LTV model, the system description
167
168CHAPTER 10. DYNAMIC PROGRAMMING AND THE HJB EQUATION
Under very general conditions, the value function satisfies a partial differ-
ential equation (PDE) known as the Hamilton-Jacobi-Bellman (HJB) equa-
tion. To derive this result, let x and t be an arbitrary initial time and initial
state, and let tm be an intermediate time, t < tm < t1 . Assuming that x(τ ),
t ≤ τ ≤ t1 , is a solution to the state equations with x(t) = x, we must have
hZ tm Z t1 i
◦
V (x, t) = min `(x(τ ), u(τ ), τ ) dτ + `(x(τ ), u(τ ), τ ) dτ + m(x(t1 ))
u[t,t1 ] t tm
hZ tm Z t1 i
= min `(x(τ ), u(τ ), τ ) dτ + min `(x(τ ), u(τ ), τ ) dτ + m(x(t1 )) .
u[t,tm ] t u[t,t1 ] tm
| {z }
V ◦ (x(tm ),tm )
As a consequence, the optimal control over the whole interval has the prop-
erty illustrated in Figure 10.1: If the optimal trajectory passes through the
10.2. HAMILTON-JACOBI-BELLMAN EQUATIONS 169
state xm at time x(tm ) using the control u◦ , then the control u◦[tm ,t1 ] must
be optimal for the system starting at xm at time tm . If a better u∗ existed
on [tm , t1 ], we would have chosen it. This concept is called the principle of
optimality.
x(t m ) = xm x(t1 )
x(t)
Figure 10.1: If a better control existed on [tm , t1 ], we would have chosen it.
tm = t + ∆t
xm = x(tm ) = x(t + ∆t) = x(t) + ∆x.
∂V ◦ ∂V ◦
◦ ◦
V (x, t) = min `(x(t), u(t), t)∆t + V (x, t) + (x(t), t)∆x + (x(t), t)∆t
u[t,tm ] ∂x ∂t
+p(∆t).
∆t ∂V ◦ ∆x ∂V ◦
∆t
0 = min `(x, u(t), t) + (x, t) + (x, t) .
u[t,tm ] ∆t ∂x ∆t ∂t ∆t
∂V ◦ ∂V ◦
0 = min `(x, u, t) + (x, t)ẋ(t) +
u ∂x ∂t
where
∂V ◦ ∂V ◦ ∂V ◦
= ... = (∇x V ◦ )T .
∂x ∂x1 ∂xn
170CHAPTER 10. DYNAMIC PROGRAMMING AND THE HJB EQUATION
Thus, we have obtained the following partial differential equation which the
value function must satisfy if it is smooth. The resulting equation (10.5) is
the Hamilton-Jacobi-Bellman (HJB) equation,
∂V ◦ ∂V ◦
− (x, t) = min `(x, u, t) + (x, t)f (x, u, t) . (10.5)
∂t u ∂x
The terminal penalty term gives a boundary condition for the HJB equation
V ◦ (x(t1 ), t1 ) = m(x(t1 )). (10.6)
The term in brackets in (10.5) is called the Hamiltonian, and is denoted
H:
H(x, p, u, t) := `(x, u, t) + pT f (x, u, t), (10.7)
where p = ∇x V ◦ . We thus arrive at the following
Theorem 10.1. If the value function V ◦ has continuous partial derivatives,
then it satisfies the following partial differential equation
∂V ◦
− (x, t) = min H(x, ∇x V ◦ (x, t), u, t),
∂t u
and the optimal control u◦ (t) and corresponding state trajectory x◦ (t) must
satisfy
min H(x◦ (t), ∇x V ◦ (x◦ (t), t), u, t) = H(x◦ (t), ∇x V ◦ (x◦ (t), t), u◦ (t), t).
u
(10.8)
Conversely, if there exists a value function V ◦ (x, t) solving (10.5) subject to
(10.6), and a control u◦ obtained from (10.8), then u◦ is the optimal con-
troller minimizing (10.2) for the system (10.1) and V ◦ (x0 , t0 ) is the mini-
mum value of (10.2). t
u
An important consequence of Theorem 10.1 is that the optimal control
can be written in state feedback form u◦ (t) = ū(x◦ (t), t), where the function
ū is defined through the minimization in (10.8).
Proof Proof of Theorem 10.2.1 The first part of the statement of the
theorem has already been proved through the derivation that led to (10.5).
For the second part of the statement (the sufficiently part), let us first note
that for an arbitrary control u, from (10.5):
∂V ◦ ∂V ◦
− (x, t) = `(x, u◦ , t) + (x, t)f (x, u◦ , t)
∂t ∂x
∂V ◦
≤ `(x, u, t) + (x, t)f (x, u, t)
∂x
10.2. HAMILTON-JACOBI-BELLMAN EQUATIONS 171
which is equivalent to
0 = `(x, u◦ , t) + d ◦
dt V (x, y) ≤ `(x, u, t) + d ◦
dt V (x, t) (10.9)
H(x, p, u, t) = pu + u2 + x4 ,
This equation shows that the control forces the state to move in the direction
in which the “cost to go” V ◦ decreases.
Substituting the formula for u◦ back into the HJB equation gives the
PDE
2
∂V ◦ 1 ∂V ◦
− (x, t) = − (x, t) + x4 ,
∂t 4 ∂x
∇u H = 0 + 2Ru + B T p.
Setting this equal to zero, we see that the optimal control is given by
1
u◦ = − R−1 B T p (10.10)
2
where we recall that p = ∇x V ◦ . Hence the controlled state evolves according
to the equation
1
ẋ (t) = A(t)x(t) − BR−1 B T ∇x V ◦ (x, t).
2
10.3. A SOLUTION TO THE LQR PROBLEM 173
Since the matrix BR−1 B T is positive definite, we see once again that the
control tends to force x in a direction in which V ◦ is decreasing.
Equation (10.10) shows that the optimal control may be written in state
feedback form. However, we cannot compute the optimal control law unless
we can compute the value function. Substituting the formula for the optimal
control into the HJB equation gives
∂V ◦
− = H(x, ∇x V ◦ , u◦ , t)
∂t
1
= xT Qx + (∇x V ◦ )T BR−1 RR−1 B T ∇x V ◦
4
1
+(∇x V ◦ )T Ax − (∇x V ◦ )T BR−1 B T (∇x V ◦ ).
2
This yields the partial differential equation
∂V ◦ 1
− = xT Qx + (∇x V ◦ )T Ax◦ − (∇x V ◦ )T BR−1 B T (∇x V ◦ ). (10.11)
∂t 4
To solve this PDE, start at time t1 when the value function is known:
V ◦ (x, t1 ) = xT M x.
V ◦ (x, t) = xT P (t)x
−xT Ṗ x = xT Qx + xT (P A + AT P )x − xT P BR−1 B T P x.
Since this equation must hold for any x, the matrix P must satisfy the
following matrix differential equation:
− Ṗ = Q + P A + AT P − P BR−1 B T P. (10.12)
174CHAPTER 10. DYNAMIC PROGRAMMING AND THE HJB EQUATION
gives
P (t1 ) = M. (10.13)
Equation (10.12) is called the Riccati Differential Equation (RDE), and its
boundary condition is given by (10.13). Since the boundary condition is
given at the final time, the solution to this differential equation may be
viewed as starting at time t1 , and then traveling backwards in time until
time t0 . The Riccati equation possesses a unique solution, provided that the
matrices A, B, Q and R are piecewise continuous in t. Further note that
this unique solution is symmetric, because P T satisfies the same differential
equation (to see this simply take transpose of both side of (10.12)).
The solution to the LQR problem is now summarized in the following
Theorem 10.2. For the LQR optimal control problem (10.3), assuming
that A, B, Q and R are piecewise continuous in t, and that R(t) > 0 for all
t,
(a) The optimal control u◦ is given in linear state feedback form u◦ (t) =
−K(t)x◦ (t), where K(t) is a matrix of time-varying gains:
A −BR−1 B T
Ẋ(t) X(t) X(t1 ) I
= , = (10.14)
Ẏ (t) −Q −AT Y (t) Y (t1 ) M
| {z } | {z }
2n×2n 2n×n
Theorem 10.3. The solution to the RDE (10.12) with boundary condition
(10.13) is given by the formula
Proof To prove the theorem, observe that the desired initial conditions
are satisfied:
We next verify that the Riccati differential equation is also satisfied. Using
the product rule and the matricial quotient rule dt d
(X −1 ) = −X −1 ẊX −1 ,
we have
d d
(Y X −1 ) = Y (X −1 ) + Ẏ X −1 = −Y X −1 ẊX −1 + Ẏ X −1 .
dt dt
d
(Y X −1 ) = −Y X −1 (AX − BR−1 B T Y )X −1 + (−QX − AT Y )X −1
dt
= −(Y X −1 )A + (Y X −1 )BR−1 B T (Y X −1 ) − Q − AT (Y X −1 )
JHJ T = −HT .
Letting V ◦ denote the optimal cost for the infinite horizon problem, it follows
that xT P (0, t1 )x ≤ V ◦ (x) for all x and t1 , and hence
This gives a lower bound on the cost V ◦ (x), and this lower bound is attained
with the limiting controller.
Under certain conditions we can show that the limit does exist, and
thereby solve the infinite horizon control problem.
ẋ = x + u
Z t1
V (u) = (x2 + u2 ) dt + 5x(t1 )2 .
0
0 = 2P̄ + 1 − P̄ 2 .
√
Solving this equation gives P̄ = 1 + 2, which is consistent with the limiting
value shown
√ in the plots. We will see that the limiting control law u =
−(1 + 2)x is optimal for the infinite horizon cost with t1 = ∞. t
u
10.5. INFINITE HORIZON REGULATOR 179
P(t,2)
4.5
3.5
2.5
t
0 1 2
P(t,10)
5
4.5
3.5
2.5
t
0 2 4 6 8 10
Time (second)
Figure 10.2: Solutions to the ARE for a scalar model with t1 = 2 and
t1 = 10. It appears that for any fixed t, P (t, t1 ) converges to a constant P̄
as t1 → ∞.
180CHAPTER 10. DYNAMIC PROGRAMMING AND THE HJB EQUATION
Using the formula (10.16) it is easy to show that the limiting matrix
P̄ does exist in the special case where the eigenvalues of the Hamiltonian
are distinct. Because the matrix Λs is Hurwitz, in this case it follows from
(10.16) that
−1
lim P (t, t1 ) = U21 U11 := P̄ (10.18)
t1 →∞
Note that u◦ is given by a state feedback control law of the form u◦ = −Kx,
which is a form of pole placement. We will see in Section 10.6 that the
location of the closed-loop poles possess desirable properties.
We now use the Hamiltonian matrix to characterize the closed-loop poles
under optimal control. From the eigenvalue equation HU = U Λ we have
A −BR−1 B T
U11 U11 U11
H = = Λ . (10.19)
U21 −Q −AT U21 U21 s
(A − BK)U11 = U11 Λs .
The matrix U11 is thus a modal matrix for the optimal closed-loop system
matrix Acl = (A − BK). That is,
(a) The stable eigenvalues Λs for H are also the optimal closed-loop
poles.
10.5. INFINITE HORIZON REGULATOR 181
(b) The columns of U11 are the eigenvectors for Acl = A − BR−1 B T P̄ .
t
u
Using the Hamiltonian we now give a quadratic algebraic equation which
the matrix P̄ must satisfy. Considering both the first and second rows of
(10.19) gives
or
−1
P̄ A − P̄ BR−1 B T P̄ = U21 Λs U11 (10.22)
−1
Multiplying (10.21) by U11 on the right we obtain
−1 −1 −1
−QU11 U11 − AT U21 U11 = U21 Λs U11
or
−1
− Q − AT P̄ = U21 Λs U11 . (10.23)
Combining (10.22) and (10.23) gives P̄ A − P̄ BR−1 B T P̄ = −Q − AT P̄ , or
AT P̄ + P̄ A + Q − P̄ BR−1 B T P̄ = 0 (10.24)
ẋ = Z
x+u
∞
V = u2 dt.
0
Example 10.5.3. The difficulty in the previous example is that the cost is
not a good measure of the internal stability of the model. This is reminiscent
of detectability, a connection that we further explore in two more examples.
Consider first the LTI model with quadratic cost
−3 −2 0
ẋ = x+ u;
1 0 1
Z ∞ (10.25)
2 2
V (u) = (x1 + x2 ) + u dt
0
In this example
−3 −2 0 1 1
A= , B= , Q= ≥ 0, R = 1.
1 0 1 1 1
Consider a very special case where the initial condition x(0) belongs to the
unobservable subspace Σō . What then is the optimal control? Recall that
if u ≡ 0 then the output becomes
Since x(0) ∈ Σō we then have y ≡ 0. Obviously then, this is the optimal
control since it yields V (u) = 0! It follows from the definition of the optimal
cost that
This can be seen explicitly for this example by solving the ARE, and
computing Σō . The observability matrix for this example is
C 1 1
O= = .
CA −2 −2
Using the lqr command in Matlab, the solution to the ARE is approximately
1 1
P = 0.24
1 1
10.5. INFINITE HORIZON REGULATOR 183
The new state matrix has eigenvalues at +2, +1. Hence for any non-zero
initial condition the state explodes as t → ∞ when the input is set to zero.
For this system can we again conclude that a zero input is optimal? For
this cost criterion, the answer is yes, for precisely the same reason as before.
The observability matrix for this model is
C 1 1
O= = ,
CA 2 2
If the pair (A, C) is observable, then for any control u, and any initial state
x(0) 6= ϑ, the cost V is strictly positive. To see Rthis, note that R if u is
identically zero, then by observability we must have xT Qx dt = |y|2 dt >
0. If u is not identically zero, then V > 0 since R > 0. Since for an
initial condition x0 the value function may be expressed V ◦ (x0 ) = xT0 P̄ x0 ,
it follows that the matrix P̄ is positive definite (P̄ > 0). From the previous
example it is clear that P will be singular if the system is not observable.
If the system is not detectable, then the last example shows that we might
expect disaster. These results can be refined to give the following
Theorem 10.6. For the LTI system (10.17) with R > 0 and Q = C T C ≥ 0,
184CHAPTER 10. DYNAMIC PROGRAMMING AND THE HJB EQUATION
From these equations we may deduce that the weighting matrices are
4 2 1 0
Q = , R= .
2 1 0 1
The matrix Q has rank one, and Q ≥ 0. It follows from the spectral repre-
sentation of a positive definite matrix that there is a 1 × 2 matrix C such
that Q = C T C. In fact C = (2, 1), so we define y = Cx = 2x1 + x2 . Thus,
the controllability and observability matrices become
1 0 0 −1 2 1
C= O= .
0 1 0 0 0 −2
Since both of these matrices have rank 2, the conditions of Theorem 10.6 (ii)
are satisfied.
We now check directly to see if the controlled system is stable by com-
puting the closed-loop system poles. The Hamiltonian matrix for this model
is
0 −1 −1 0
0 0 0 −1
H = −4 −2
.
0 0
−2 −1 1 0
10.5. INFINITE HORIZON REGULATOR 185
0 −1
Thus, the matrices {Uij } may be computed:
1 1
U11 0 −1
= 2
.
U21 2
0 −1
Applying (10.18) we can compute the solution to the ARE:
−1
2 2 1 1 2 0
P̄ = = ,
0 −1 0 −1 0 1
and the optimal feedback gain matrix is
−1 T 2 0
K = R B P̄ = .
0 1
The resulting optimal control
◦ −2x1
u = .
−x2
places the closed-loop eigenvalues at (−2, −1), which are the stable eigen-
values of H. The closed-loop eigenvectors are contained in the columns of
U11 . t
u
Example 10.5.5. To show how the ARE can be solved directly without
constructing the Hamiltonian, consider the model
0 1 0
ẋ = x+ u; y = x1
0 −1 1
Z ∞ (10.26)
2 2
V = (x1 + u ) dt
0
186CHAPTER 10. DYNAMIC PROGRAMMING AND THE HJB EQUATION
Again we see that the conditions of Theorem 10.6 (ii) are satisfied, and it
follows that the solution P̄ to the ARE will be positive definite. We now
verify this directly.
The ARE for this model is
AT P̄ + P̄ A − P̄ BR−1 B T P̄ + Q = 0.
` m
Writing P̄ as P̄ = , this gives the equation
m n
m2 mn
0 0 0 `−m 1 0
+ − + = 0.
`−m m−n 0 m−n mn n2 0 0
Examining the (1, 2) entry of the ARE we see that ` − 1 − n = 0, and from
the (2, 2) entry n2 +2n−2 = 0. These equations result in the unique positive
definite solution
√
3 √ 1
P̄ =
1 −1 + 3
√
The optimal feedback control law is u◦ = −R−1 B T P x = −[1 3 − 1]x.
To find the closed-loop poles, we must compute the eigenvalues of
0 1 0 √ 0 0 √ 1
Acl = A − BK = − = .
0 −1 1 3−1 −1 − 3
√
3
The characteristic equation is ∆(s) = s2 + 2 2 s + 1 = 0, which gives
√
pi = − 12 ( 3 ± j).
K = R−1 B T P̄ .
The left hand side of (10.27) involves only the open-loop system, while the
right hand side depends on the feedback gain K. The return difference
equation is derived by simply expanding both sides of the equation, and
substituting the definition of K and the algebraic Riccati equation.
The return difference equation appears complex, but after the matrices
are given proper interpretation it has a relatively simple form. First, factor
the state weighting matrix as Q = C T C. By defining y = Cx we obtain the
controlled model illustrated in Figure 10.3. With P (s) = C(Is − A)−1 B,
the left hand side of (10.27) becomes
R + P T (−s)P (s).
From the feedback from u = −Kx we define the loop transfer function
described in Chapter 9 as L(s) = K(Is − A)−1 B, so that the right hand side
188CHAPTER 10. DYNAMIC PROGRAMMING AND THE HJB EQUATION
of (10.27) becomes
On the complex axis we have H T (−jω) = H ∗ (jω) for any transfer function
H, so that (10.28) may be written
r u x y
∑ B ∑ C
-
Figure 10.3: The loop transfer function of the LTI system under full state
feedback u = −Kx + r is L(s) = K(Is − A)−1 B.
In the SISO case with R = r > 0 a scalar, the return difference equation
becomes
r + P (−s)P (s) = r[1 + L(−s)][1 + L(s)]. (10.30)
The poles of the closed-loop system are found by solving the equation
1 + L(s) = 0.
In view of (10.30), the return difference equation gives the closed-loop poles
as a function of the weighting parameter r and the open-loop transfer func-
tion P (s) through the formula
1
1 + P (−s)P (s) = 0. (10.31)
r
The set of all solutions to (10.31), with r ranging from 0 to ∞, is called
the symmetric root locus. For fixed r, the roots of this equation are the
eigenvalues of the Hamiltonian matrix H with R = r. We have seen in
10.6. RETURN DIFFERENCE EQUATION 189
Section 10.5 that the stable (left hand plane) eigenvalues of the Hamiltonian
matrix are the poles of the closed-loop system.
As an illustration consider the general second order system with transfer
function P (s) = (s − z)/(s2 + 2ζs + 1), where z < 0, and ζ > 0. The
symmetric root locus is illustrated in Figure 10.5. Note the symmetry of
the poles and zeros with respect to the jω axis. It is seen here that when
r ≈ ∞, the closed-loop poles are approximately equal to the open loop poles
of the system. For small r, one closed-loop pole converges to ∞ along the
negative real axis, and the other converges to the zero z.
Imag Axis
p -p
1 1
z -z Real Axis
p -p
2 2
Figure 10.4: The symmetric root locus for the system with transfer function
P (s) = (s − z)/(s2 + 2ζs + 1). The roots of 1 + 1r P (−s)P (s) = 0 give the
optimal closed-loop poles, where r is the control weighting in the LQR cost.
As r varies from 0 to ∞, this gives the symmetric root locus.
Imag Axis
r=1
r=1
Figure 10.5: TheR symmetric root locus for the model ÿ = −ẏ + u, with cost
criterion V = y 2 + ru2 dt. A more highly damped closed-loop response can
be obtained by increasing r below the nominal value of 1, while decreasing
r will result in greater closed-loop bandwidth.
A sketch of the symmetric root locus is provided in Figure 10.5.√ When
r = 1 we have already seen that the optimal ◦
√ control is u = −[1, 3 − 1]x,
and that the closed-loop poles are − 12 ( 3 ± j). From Figure 10.5 it is
evident that a more highly damped closed loop response can be obtained by
increasing r, while reducing r will result in greater closed-loop bandwidth.
t
u
The return difference equation leads to an elegant approach to pole place-
ment. The resulting symmetric root locus gives the designer a ‘good’ set of
poles to choose from, which can then be narrowed down based upon other
constraints, such as closed-loop bandwidth or time domain specifications.
The most striking implication of the return difference equation is perhaps
its application to sensitivity analysis. In the SISO case, we have seen that
by letting s = jω we obtain
1
|1 + L(jω)|2 = 1 + |P (jω)|2 .
r
10.6. RETURN DIFFERENCE EQUATION 191
ω = 10
ω=1
-1 Real Axis
L(j ω)
Figure 10.6: The loop transfer function L(jω) = K(Ijω − A)−1 B for the
LTI system under optimal control cannot enter the shaded disk centered at
−1.
Imag Axis
(2) (2) (2) (2) Real Axis
Figure 10.7: The symmetric root locus for the Pendubot with Q = I. Each
of the poles and zeros in this diagram are indicated with crosses and zeros,
respectively. Each pole appears twice because of the symmetry of the open-
loop transfer function.
Imag Axis
L(j ω)
-1
Real Axis
Figure 10.8: The Nyquist plot for the Pendubot controlled with full state
feedback, based on an LQR design. If all of the states can be measured,
a far more robust design is possible compared with what is found using a
single output measurement.
194CHAPTER 10. DYNAMIC PROGRAMMING AND THE HJB EQUATION
This chapter has provided only a brief survey on the LQR problem. For a
more detailed discussion, see the book [1]. Some historic papers on the topic
are:
Another good source for survey/tutorial papers on the linear quadratic the-
ory is the December 1971 special issue of the IEEE Transactions on Auto-
matic Control.
Matlab Commands
RLOCUS Used together with the convolution command CONV, this can
be used to graph the symmetric root locus.
10.7. EXERCISES 195
10.7 Exercises
10.7.1 The purpose of this exercise is to review the derivation of the HJB
equation, and to provide an introduction to a general theory of infinite
horizon optimal control. Consider the time invariant nonlinear system
10.7.3 For the double integrator ÿ = u, what is the minimal value of the
cost
Z ∞
V (u) = y(t)2 + u(t)2 dt,
0
over all controls u(·), when y(0) = 1, ẏ(0) = 0? Explain why the
minimum exists.
196CHAPTER 10. DYNAMIC PROGRAMMING AND THE HJB EQUATION
10.7.4 For the scalar time-invariant plant ẋ = ax(t) + u(t), and under the
quadratic performance index
Z ∞
V = [x2 (t) + ru2 (t)]dt ,
0
(a) Obtain the feedback control u(x) that minimizes the infinite-horizon
quadratic performance index
Z ∞
V = (x21 + 2x1 x2 + x22 + 4u2 ) dt.
0
10.7.6 The following is the so-called generalized regulator problem: The sys-
tem equation is
10.7.7 In the previous problem, assume that all matrices and the vector c(·)
are time-invariant, and t1 → ∞. Obtain an expression for the steady-
state optimal feedback control under appropriate controllability and
observability assumptions. Is this a stabilizing control?
10.7.8 The Pendubot arranged in the vertical position may be approxi-
mately described by the linear system ẋ = Ax + Bu; y = x1 where
0 1.0000 0 0 0
42.0933 0 −4.3893 0 6.2427
A= B= .
0 0 0 1.0000 0
−29.4557 0 43.3215 0 −9.7741
Z ∞
V (u) = [x21 (t) + ρu̇2 (t)] dt.
0
Provide a root locus plot for 0 < ρ < ∞, and compute the optimal
control for ρ = 2.
Note: For this numerical example, your solution will be in the
form v ≡ u̇ = k1 x1 + k2 x2 + k0 u, where k1 , k2 , k0 are scalar
quantities, whose values will have to be determined as part of the
solution process.
10.7.10 This problem deals with optimal control problems in which the
closed-loop system is required to have a prescribed degree of stability.
Optimal control is an expression of the tradeoff between the desire
to place closed-loop poles deep into the left-half-plane and the desire
not to use excessive control (because of possible actuator saturation)
or have large excursions of the state trajectories (because of modeling
uncertainty). Sometimes we want to guarantee that the closed-loop
poles are stable by a “margin” of at least α. That is, the poles lie in
the region Ωα = {s : Re(s) ≤ −α}.
To this end, consider the plant ẋ = Ax+Bu, and the cost functional
Z ∞
e2αt xT Qx + uT Ru dt,
V (u) = α>0
0
√
where Q ≥ 0 and R > 0. Observe that if V (u◦ ) < ∞ then Qx◦ (t)
must decay faster than e−αt which, under appropriate conditions,
means the closed-loop poles lie in the left-half plane as desired. In
this problem you will rigorously establish this assertion.
10.7. EXERCISES 199
(a) Set z(t) = eαt x(t) and v(t) = eαt u(t), and denote the resulting
as a function v by Ṽ (v). Compute Ṽ (v) and the corresponding
state equations.
(b) Carefully write down a complete solution to this optimal control
problem including necessary and sufficient conditions under which
solutions exist and conditions under which these solutions are sta-
bilizing. In the case where the eigenvalues are distinct, interpret
your conditions using the Hautus-Rosenbrock criteria.
(c) Show that the closed-loop system has all its poles inside the left
hand plane as prescribed under appropriate conditions on the
open-loop system.
(d) With A = B = Q = R = x0 = 1 find the optimal control law and
the optimal cost, and observe that the poles are indeed placed
within Ωα .
10.7.11 Consider again the flexible structure defined in (7.10). The input
is the voltage to a DC motor, and the states of this model are
x1 = θ1 , x2 = θ̇1 , x3 = θ2 , x4 = θ̇2 .
(a) Plot the loop transfer function with your previous design. You
should use the Matlab command NYQUIST, as follows
nyquist(A-.00001*eye(4),B,K,0)
where K is the feedback gain. This will give a plot of L(jω) =
K(Ijω − A + I)−1 B. The term is needed since the open-loop
system has a pole at the origin. Does your plot enter the region
dist(s, −1) < 1?
(b) Plot the optimal closed-loop poles for the cost function
Z ∞
V (u) = θ22 + β(θ̇2 )2 + ρu2 dτ
0
10.7.13 In this problem you will design a controller for a model of a Boeing
747 aircraft.
A linearized model for the longitudinal motion of this plant when
operating shortly after take-off, at sea level, with a speed of 190 miles
per hour is given by
δV −0.0188 11.5959 0 −32.2 δV 0
δα = −0.0007 −0.5357
d 1 0 δα + 0
δe
dt q
0.000048 −0.4944 −0.4935 0 q −0.5632
δθ 0 0 1 0 δθ 0
where δV is the deviation from the nominal speed of 190 mph, δα is the
angle of attack, which is the longitudinal angle of the plane with respect
to the longitudinal velocity vector, δθ is the pitch angle, which is the
longitudinal angle of the plane with respect to the ground, and q = δ̇θ.
10.7. EXERCISES 201
(a) Adjoin the variable h to the state space model above to obtain a
fifth order system with state x. Obtain an LQR design to obtain
a feedback control u = −Kx + r for this system using symmetric
root locus. Plot the step response of both the altitude h and the
pitch angle θ of the controlled system. Try to obtain a rise time
of 250 seconds with reasonable undershoot.
Note that the response is always slow due to one closed-loop pole
close to the origin.
(b) Can you obtain a better controller with a more general choice of Q
and R? For your best design, where are the resulting closed-loop
poles?
(c) Using your best choice of K in (b), improve the response by modi-
fying the controller as follows: Pass the reference signal r through
a first order filter G(s). Hence, in the frequency domain, your
controller is of the form
s−z
U (s) = −KX(s) + k R(s).
s−p
You should place the zero z at the location of the slow pole (ap-
proximately), and place the pole p further from the origin. This
should cancel the effect of the slow closed-loop pole in the closed-
loop response. The gain k should be chosen to achieve good
steady state tracking for d.c. reference inputs.
Again plot the step response of both the altitude h and the pitch
angle θ of the controlled system. Can you choose k, z and p to
improve your response over that obtained in (b)?
202CHAPTER 10. DYNAMIC PROGRAMMING AND THE HJB EQUATION
Chapter 11
An Introduction to the
Minimum Principle
We now return to the general nonlinear state space model, with general cost
criterion of the form
We have already shown under certain conditions that if the input u mini-
mizes V (u), then a partial differential equation known as the HJB equation
must be satisfied. One consequence of this result is that the optimal control
can be written in state feedback form through the derivative of the value
function V ◦ . The biggest drawback to this result is that one must solve a
PDE which in general can be very complex. Even for the relatively sim-
ple LQR problem, the solution of the HJB equations required significant
ingenuity.
The minimum principle is again a method for obtaining necessary con-
ditions under which a control u is optimal. This result is based upon the
solution to an ordinary differential equation in 2n dimensions. Because it
is an ordinary differential equation, in many instances it may be solved
even though the HJB equation is intractable. Unfortunately, this simplicity
comes with a price. The solution u◦ to this ordinary differential equation is
in open-loop form, rather than state space form. The two view points, the
Minimum Principle and the HJB equations, each have value in nonlinear
optimization, and neither approach can tell the whole story.
203
204CHAPTER 11. AN INTRODUCTION TO THE MINIMUM PRINCIPLE
∂ ◦ ∂V ◦
− V (x, t) = min(`(x, u, t) + f (x, u, t))
∂t u ∂x
∂V ◦
u◦ (t) = arg min(`(x, u, t) + f (x, u, t)).
u ∂x
For x, t fixed, let ū(x, t) denote the value of u which attains the minimum
above, so that u◦ = ū(x◦ (t), t). In the derivation below we assume that ū
is a smooth function of x. This assumption is false in many models, which
indicates that another derivation of the Minimum Principle which does not
rely on the HJB equation is required to create a general theory. With ū so
defined, the HJB equation becomes
∂ ◦ ∂V ◦
− V (x, t) = `(x, ū(x, t), t) + (x, t)f (x, ū(x, t), t).
∂t ∂x
∂V ◦
Taking partial derivatives of both sides with respect to x gives the term ∂x
on both sides of the resulting equation:
∂2 ∂`
− V ◦ (x, t) = (x, ū(x, t), t)
∂x∂t ∂x
∂2V ◦
+ 2 (x, t)f (x, ū(x, t), t)
∂ x
∂V ◦ ∂f
+ (x, t) (x, ū(x, t), t)
∂x ∂x
∂ ∂V ◦ ∂ ū(x, t)
+ `+ f (x, ū(x, t), t) .
∂u ∂x ∂x
| {z }
derivative vanishes at ū
◦
As indicated above, since ū is the unconstrained minimum of H = ` + ∂V
∂x f ,
the partial derivative with respect to u must vanish.
This PDE holds for any state x and time t - they are treated as inde-
pendent variables. Consider now the optimal trajectory x◦ (t) with optimal
11.1. MINIMUM PRINCIPLE AND THE HJB EQUATIONS 205
(b) The pair (p, x◦ ) satisfy the 2-point boundary value problem:
ẋ◦ (t) = ∇p H(x◦ (t), p(t), u◦ (t), t) = f (x◦ (t), u◦ (t), t)
(11.4)
ṗ(t) = −∇x H(x◦ (t), p(t), u◦ (t), t)
with the two boundary conditions
x(t0 ) = x0 ; p(t1 ) = ∇x m(x(t1 ), t1 ).
t
u
g(x1 )
x1 g(x2 )
V(x1)
x2
{x : V(x) = -1}
{x : g(x) = 0} {x : V(x) = 0}
{x : V(x) = 1}
z(t)
From the definition of the derivative it then follows that an optimal solution
must be a stationary point, just as in the finite dimensional case!
The problem at hand can be cast as a constrained functional minimiza-
tion problem,
Z
Minimize V (x, u) = ` dτ + m
Subject to ẋ − f = ϑ, x ∈ Dn [t0 , t1 ], u ∈ Dm [t0 , t1 ].
Combining this with the formulas given in the previous steps gives
Z t1 Z t1
V (x, u) =
b H(x, p, u, t) dt + ṗT x dt
t0 t0
T T
+p (t0 )x(t0 ) − p (t1 )x(t1 ) + m(x(t1 )). (11.7)
This simpler expression is obtained because only the first term in (11.7)
depends upon u.
Step 5. We can choose η(t) freely in (11.9). From this it follows that
∂H
+ ṗT = ϑT ⇒ ṗ = −∇x H
∂x
and since η(t0 ) = ϑ, and η(t1 ) is free,
∂m
−pT (t1 ) + (t1 ) = ϑT ⇒ p(t1 ) = ∇x m(x(t1 )).
∂x
210CHAPTER 11. AN INTRODUCTION TO THE MINIMUM PRINCIPLE
by optimality,
Vbk (xk , uk ) ≤ Vbk (x◦ , u◦ ) = V ◦ .
Assuming ` and m are positive, this gives the following uniform bound
Z t1
2
|ẋ(t) − f (x(t), u(t), t)|2 dt ≤ V ◦ .
t0 k
Hence, for large k, the pair (xk , uk ) will indeed approximately satisfy the
differential equation ẋ = f .
If we perturb xk to form xk + η and define Vb () = Vb (xk + η, uk ) then
we must have d/d Vb () = 0 when = 0. Using the definition of V̂ gives
Z t1
V () =
b `(xk (t) + η(t), uk (t), t) dt + m(xk (t1 + η(t1 ))
t0
Z t1
k
+ |ẋk (t) + η̇(t) − f (xk (t) + η(t), uk (t), t)|2 dt.
2 t0
11.4. APPLICATION TO LQR 211
ẋ = Ax + Bu
Z t1
V = (xT Qx + uT Ru) dt + xT (t1 )M x(t1 ).
t0
212CHAPTER 11. AN INTRODUCTION TO THE MINIMUM PRINCIPLE
H = xT Qx + uT Ru + pT (Ax + Bu)
∇u H = 0 = 2Ru + B T p =⇒ u = − 12 R−1 B T p.
ẋ = Ax + Bu = Ax − 21 BR−1 B T p. (11.12)
Equations (11.12) and (11.13) form the coupled set of differential equations
− 12 BR−1 B T
ẋ A x
= T
ṗ −2Q −A p
x(t0 ) = x0
p(t1 ) = 2M x(t1 ).
A −BR−1 B T
ẋ x ẋ
= T H , (11.14)
λ̇ −Q −A λ λ̇
λ̇ = Ṗ x + P ẋ = Ṗ x + P (Ax + Bu),
λ̇ = −Qx − AT λ = −Qx − AT P x.
−Qx − AT P x = Ṗ x + P Ax − P BR−1 B T x
which yields the RDE given in (10.12). The boundary condition for λ is
λ = 12 p = 21 m0 (x1 ), which from the definitions of p and m implies that
P (t1 ) = M.
We then have
(b) The pair (p, x◦ ) satisfy the 2-point boundary value problem (11.4),
with the two boundary conditions
∂
x(t0 ) = x0 ; p(t1 ) = m(x(t1 ), t).
∂x
t
u
214CHAPTER 11. AN INTRODUCTION TO THE MINIMUM PRINCIPLE
Suppose that the goal is to make x large, while keeping the derivative of x
small on average. Then a reasonable cost criterion is
Z t1 Z t1
V (u) = ẋ(τ ) − x(τ ) dτ = [u(τ ) − 1]x(τ ) dτ.
0 0
and by the Minimum Principle, the optimal control takes the form
The costate variable and state variable satisfy the differential equations
∂H
ṗ = − = −(p + 1)u◦ + 1
∂x
∂H
x˙◦ = = u◦ x◦
∂p
with the boundary conditions
∂m
x◦ (0) = x0 , p(t1 ) = = 0.
∂x
How do we solve these coupled differential equations to compute u◦ ?
First note that if t = t1 then p(t) + 1 = 1 > 0 so u◦ (t) = 0. By continuity,
if t ≈ t1 , then p(t) > 0, so we still must have u◦ (t) = 0. Thus ṗ(t) = +1 for
t ≈ t1 , which implies
p(t) = t − t1 , t ≈ t1 .
11.5. NONLINEAR EXAMPLES 215
As we move backwards in time from time t1 , the costate variable will con-
tinue to have this form up until the first time that p(t) + 1 changes sign.
This will occur when 0 = t − t1 + 1, or t = t1 − 1.
For t < t1 − 1 we then have p(t) + 1 < 0 so that u◦ (t) = 1. For these
time values, the costate vector is described by the equation
ṗ = −(p + 1) + 1 = −p.
Since p(t1 − 1) = −1, we obtain
p(t) = −e−t+t1 −1 , t < t1 − 1.
The costate trajectory is sketched in Figure 11.3.
-1
t
t
t1 - 1 t1 t1 - 1 t1
x(t)
0
p(t)
Figure 11.3: The costate trajectory, optimal control, and optimal state tra-
jectory for the bilinear model.
The next example we treat has a hard constraint on the final state value,
so that t0 , t1 , x(t0 ) = x0 , and x(t1 ) = x1 are all fixed and prespecified. In this
situation the Minimum Principle is the same, but the boundary conditions
for differential equations must be modified.
(b) The pair (p, x◦ ) satisfy the 2-point boundary value problem (11.4),
with the two boundary conditions
x(t0 ) = x0 ; x(t1 ) = x1 .
t
u
The Minimum Principle again implies that the optimal control has the form
t
u
Our last extension concerns the case where the terminal time is not fixed.
At the same time, suppose that some components of x(t1 ) are specified. We
assume that t0 and x(t0 ) = x0 are fixed.
Theorem 11.4 (Minimum Principle with free terminal time). Suppose that
t0 and x(t0 ) = x0 are fixed, and that for some index set I ⊂ {1, . . . , n},
xi (t1 ) = x1i , if i ∈ I.
(b) The pair (p, x◦ ) satisfy the 2-point boundary value problem (11.4),
with the boundary conditions
xi (ti ) = x1i , i ∈ I
∂m ◦
pj (t1 ) = (x (t1 ), t1 ), i ∈ I c.
∂xj
The most common example in which the terminal time is free is a mini-
mum time problem. As an example consider a single input linear state space
model
ẋ = Ax + bu.
so that ` ≡ 1, and m ≡ 0.
The Hamiltonian for this problem is
H = ` + pT f = 1 + pT Ax + pT bu.
p(t)T b < 0
◦ 1
u (t) =
−1 p(t)T b > 0
If A, b are time invariant and the eigenvalues {λi } of A are real, distinct,
and negative, then since the modes are all decreasing, the quantity p(t)T b
changes sign at most n − 1 times. Hence, the number of switching times for
the optimal control is also bounded above by n − 1.
11.5. NONLINEAR EXAMPLES 219
ṗ = −∇x H = −AT p.
1 + pT (t1 )Ax◦ (t1 ) + pT (t1 )bu◦ (t1 ) = 1 + pT (t1 )Ax◦ (t1 ) − |pT (t1 )b| = 0.
We now show how these equations may be solved using a second order
example.
Example 11.5.3. Consider the special case where the model is the double
integrator ÿ = u, which is described by the state space model with
0 1 0
A= b=
0 0 1
so that ẋ1 = x2 , ẋ2 = u. The optimal control has the form u◦ = −sgn(pT b) =
−sgn(p2 (t)). From the costate equations
ṗ1 T ṗ1
= −A
ṗ2 ṗ2
we find that x◦1 (t) = 21 (x◦2 (t))2 + K1 for some constant K1 . If p2 (t) > 0
so that u◦ (t) = −1, then for another constant, x◦1 (t) = − 21 (x◦2 (t))2 + K2 .
Hence the optimal state trajectories follow the quadratic paths illustrated
in Figure 11.4. t
u
220CHAPTER 11. AN INTRODUCTION TO THE MINIMUM PRINCIPLE
x (t)
u >0
x0
u <0
y
x1
Figure 11.4: The optimal trajectories for the minimum time problem in this
two dimensional example follow quadratic paths, and may switch paths at
most once. A typical optimal path is illustrated as a union of two dark line
segments in this drawing.
11.6. EXERCISES 221
11.6 Exercises
11.6.1 Consider the system/performance index
T
1
Z
q
ẋ = u V (u) = x2 (T ) + u2 dt,
2 2 0
223
Index
224
INDEX 225
range, 29
rank, 29
realization, 10
reciprocal, 38
regulation, 155
return difference, 158
return difference equation, 187
Riccati Differential Equation, 174