Handout 1 PDF
Handout 1 PDF
Handout 1 PDF
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
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 ) + δx 1 + δx2
∂x1 (xe1 ,xe2 ,ue ) ∂x2 (xe1 ,xe2 ,ue )
∂f2
+ δu + H.O.T.
∂u (xe1 ,xe2 ,ue )
After computing partial derivatives we obtain the formulae
δ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
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
1.4. A TWO LINK INVERTED PENDULUM 7
The definitions of the variables qi , ℓ1 , ℓci can be deduced from Figure 1.4.
q
2
l c2
q
1
x
lc1
l1
x (t)
1
+ - + -
C
L
+
u(t)
R
-
x2 (t)
u x2 x1
1 1
∑ ∑
L C
- -
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.
x1 + Lẋ2 = +u,
10 CHAPTER 1. STATE SPACE MODELS
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 1
− RC C 0
ẋ = x+ u
− L1 0 1
L
where the coefficients {ai , bi } are arbitrary real numbers. The corresponding
transfer function description is
Y (s) B(s) b2 s 2 + 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
... .. .
u w w w w
∑
- - -
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
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 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
b2
b1
b0
u w
∑ ∑
-
- -
y
a2
a1
a0
a0
a1
a2
u
- - - y
b0 ∑ ∑ ∑
b1
b2
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.
1.6. TRANSFER FUNCTIONS & STATE SPACE MODELS 15
x1
k1 ∑
p1
x2 y
k2 ∑ ∑
u
p2
x3
k3 ∑
p3
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
RLOCUS calculates the root locus. e.g. rlocus(num,den), or rlocus(A,B,C,D).
STEP computes the step response of a linear system.
BODE computes the Bode plot.
NYQUIST produces the Nyquist plot.
TF2SS gives the CCF state space representation of a transfer function
model, but in a different form than given here.
SS2TF computes the transfer function of a model, given any state space
representation.
16 CHAPTER 1. STATE SPACE MODELS
ẋ = 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
- -
y(t)
u(t) = f(t)
k2 k1
m1 m2
k1 b
p
ẋ = 1 − x2 , x(0) = 1.
Show that this differential equation with the given initial condition
has at least two solutions: One is x(t) ≡ 1, and another one is x(t) =
cos(t).
1.7.7 Consider a satellite in planar orbit about the earth. The situation is
modeled as a point mass m in an inverse square law force field, as
sketched below. The satellite is capable of thrusting (using gas jets,
for example) with a radial thrust u1 and a tangential (θ direction)
thrust u2 . Recalling that acceleration in polar coordinates has a radial
component (r̈ − r θ̇ 2 ), and a tangential component (r θ̈ + 2ṙ θ̇), Newton’s
Law gives
k
m(r̈ − r θ̇ 2 ) = − + u1
r2
m(r θ̈ + 2ṙ θ̇) = u2 ,
r
θ
1.7.8 Using Matlab or Simulink, simulate the nonlinear model for the mag-
netically suspended ball.
s+4
G(s) =
(s + 1)(s + 2)(s + 3)
s3 + 2
G(s) =
(s + 1)(s + 3)(s + 4)
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:
α + β = β + α, α · β = β · α.
(α + β) + γ = α + (β + γ), (α · β) · γ = α · (β · γ).
25
26 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 27
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
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 31
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
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.5.1. 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
34 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 35
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 VECTORS39
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 , xi hv , v i · · · hv 1 , v n i α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
40 CHAPTER 2. VECTOR SPACES
hr i , v j i = δij , i = 1, . . . , n, j = 1, . . . , n. (2.10)
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 43
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 .
2.11.8 Is the set I, A, A2 linearly dependent or independent in (R2×2 , R),
1 1
with A = ?
0 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.
46 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 47
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.