Basics - Kevin J. Kircher

Control Theory Basics
Kevin Kircher
—
Cornell MAE
—
January 2014
These are some minimal notes on classical and modern methods for controlling linear,
time-invariant, deterministic systems in continuous time. There are many books on this
material (Modern Control Engineering by Katsuhiko Ogata is a good one) with lots of
discussion, exercises, and rigorous proofs. These notes have none of those things, just a
summary of the core results.
The basic problem: how to design u(t) to make the physical system modeled by
n
X
i=0
m
di y X dj u
bj j
ai i =
dy
du
j=0
(m ≤ n)
do what you want it to do.
It’s worth noting that much of the material in these notes is outdated, in the sense that
more coherent, more systematic, and more broadly applicable approaches exist for solving
this problem. For an introduction to those tools, see Linear Controller Design: Limits of
Performance by Stephen Boyd and Craig Barratt.
It’s also worth noting that every single procedure in these notes – whether it’s solving an
equation, computing an integral, or drawing a plot – can be done instantly and accurately
in software.
So why should anyone care about this material? Good question. Possible answers:
• because you have to take a test on it
• because you want a job someday, and classical methods are widely used in industry
• because understanding simple methods can build intuition that’s valuable when working with more abstract tools
The main goal of these notes is the last one – to help build intuition.
1
Contents
I
Introduction
3
1 History & scope
3
2 Working with LTI ODEs
5
II
Analysis
24
3 Open and closed loop
25
4 Stability
27
5 Transient response
30
6 Steady-state response
34
7 Root locus
55
8 Controllability & observability
59
III
Design
61
9 Objectives
63
10 Building blocks
67
11 Design process
70
12 Root locus
72
13 Frequency response
74
14 State feedback
76
2
Part I
Introduction
1
History & scope
• Dynamics uses laws of physics to derive equations of motion (EoM). EoM are typically
ordinary differential equations (ODEs), usually nonlinear, that describe a system’s
evolution given some initial conditions (ICs).
• Control theory manipulates these ODEs, represented either in transfer function (TF)
or state space (SS) form, to elicit desired system behavior. A first step is usually to
linearize the ODE, because nonlinear control is hard.
• No dynamics in these notes. We start with the (linearized) ODE, analyze the system’s
behavior, compare to our goals, add a controller if necessary, analyze the modified
system’s behavior, compare to our goals, . . .
• This process has two important parts: analysis (figure out how a given system behaves) and design (create a controller to make a bad system better). These notes are
broken up accordingly.
• SISO means “single input, single output.” MIMO means “multiple input, multiple
output.”
• LTI systems have linear, time-invariant dynamics.
• Classical control (1750-1950) uses Laplace transforms to study LTI SISO systems.
Classical methods tend to be iterative and depend on the designer’s experience and
intuition.
– root locus methods were developed by Walter Evans around 1950, when he was a
master’s student at UCLA. Evans worked for Rockwell, G.E. and others
– frequency response methods were developed at Bell Labs by Hendrik Bode and
Harry Nyquist. Bode plots originated around 1938, Nyquist’s plots and theorems
somewhat earlier. Nyquist mostly worked on communications problems arising
from telegraph applications. Bode mostly worked on missile guidance systems
and on automation of radar-guided anti-aircraft guns.
• Modern control (1960-present) uses linear algebra to study LTI SISO or MIMO
systems. Modern methods tend to be more systematic than their classical cousins.
– state feedback methods, as well as the fundamental notions of controllability and
observability, were developed by Rudolf Kalman in the late 1950’s and 1960’s at
Columbia, Stanford and the Research Institute for Advanced Studies in Baltimore
3
– the Kalman filter (a method for estimating a system’s state based on noisy measurements; not discussed in these notes) made its way from Kalman’s brain to the
Apollo moon landing in about nine years
• Robust control (1980-present) uses time and frequency domain methods to control
SISO or MIMO systems in the presence of uncertainty (modeling error, state disturbance, measurement noise).
• These notes cover classical and modern control. No robust control here.
• These notes deal only with LTI SISO systems. These methods are often applied to nonlinear systems, however, through the magic of Taylor series. Modern control methods
extend easily to MIMO systems.
• A plant is a physical system (rigid object, circuit, vat of chemicals) to be controlled.
• A control or input is an action (pushing or pulling, twiddling a knob, changing a
price) taken by the controller.
• In open loop or feedforward control, we act with no influence from the thing we’re
controlling. Our actions can depend on time or a reference, though.
examples: a washing machine, or eating lunch every day at noon
• In closed loop or feedback control, we compare a measurement to a reference and
act on the difference between them.
examples: a thermostat, or eating lunch when you’re hungry
• Feedback is useful when there’s uncertainty. If all inputs are known ahead of time
(no nonlinearities, no modeling error, no disturbances to the plant dynamics, no sensor
noise), then open loop controllers are generally easier, cheaper, and more stable than
feedback controllers.
4
2
Working with LTI ODEs
This section describes how to work with linear dynamic systems in their ODE, TF and SS
representations.
Consider the general nth order LTI ODE
dn y
dn−1 y
dm u
dm−1 u
a0 n + a1 n−1 + · · · + an y = b0 m + b1 m−1 + · · · + bm u
dt
dt
dt
dt
(1)
where m ≤ n. We think of y as the output (something we measure) and u as the input (our
control action).
Loosely speaking, ODE (1) is linear because it involves only linear combinations of y, u
and their derivatives. No terms like ẏy, yu, y 2 or cos ü. It’s time invariant because none
of the coefficients ai or bj depend on time.
More formally, ODE (1) is linear iff “the output of the sum is the sum of the outputs,”
which is called the superposition principle:
(
u1 (t) → y1 (t)
=⇒
α1 u1 (t) + α2 u2 (t) → α1 y1 (t) + α2 y2 (t)
u2 (t) → y2 (t)
Similarly, ODE (1) is time invariant iff
u(t) → y(t)
⇐⇒
u(t − τ ) → y(t − τ )
A concrete example of an LTI ODE: pushing around a mass on a spring with friction. Here
we’re applying one force (m = 1) to a linear second-order system (n = 2). The EoM is
mÿ + cẏ + ky = F
where y is position, ẏ is velocity, ÿ is acceleration, k is the spring constant, c is the damping
constant, and F is the force with which we push the mass m. In vibration language, the
EoM becomes
ÿ + 2ζωn ẏ + ωn2 y = ωn2 u
(2)
p
√
where ζ = c/2 km is the damping ratio, ωn = k/m is the undamped natural frequency, and u = F/k (so u has units of meters). ODE (2) is important because it models
many, many other physical systems. We’ll keep referring back to it.
2.1
Linearization
Although linear ODEs are easy to work with, most physical systems are nonlinear. Linearization is the process of approximating a nonlinear function with a linear one.
The basic idea: if a function f : Rn → Rm is differentiable at a point x0 ∈ Rn , then
in the neighborhood of x0 , f (x) is well-approximated by the first-order terms in its Taylor
expansion:
f (x) ≈ f (x0 ) + Df (x0 )(x − x0 )
5
where


∇f1 (x)T


..
n×n
Df (x) = 
∈R
.
∇fn (x)T
is the Jacobian matrix.
As an example, consider a SMD system with the cubic spring shown in Figure 1, Fspring =
k(y − y 3 ).
0.8
ky
0.6
0.4
k ( y − y 3)
spr ing f or c e
0.2
0
−0.2
−0.4
−0.6
−0.8
−0.8
−0.6
−0.4
−0.2
0
y
0.2
0.4
0.6
0.8
Figure 1: the cubic spring is approximately linear for small displacements, but significantly
softer than a linear spring for large y.
The (nonlinear) EoM is
c
k
F
ẏ + (y − y 3 ) =
m
m
m
ÿ + 2ζωn ẏ + ωn2 (y − y 3 ) = ωn2 u
ÿ +
⇐⇒
Letting x = (y, ẏ)T and u = 0, the unforced dynamics are
f1 (x)
x2
ẋ = f (x) =
=
f2 (x)
−2ζωn x2 − ωn2 (x1 − x31 )
6
Setting f (x) = 0 and solving for x, we find an equilibrium point at x0 = 0. The Jacobian
matrix is
∇f1 (x)T
0
1
Df (x) =
=
∇f2 (x)T
−ωn2 (1 − 3x21 ) −2ζωn
Expanding f (x) about x0 , we have
f (x) ≈ f (x0 ) + Df (x)x0 (x − x0 )
0
1
x1
=
−ωn2 −2ζωn x2
which gives the linearized dynamics
ÿ + 2ζωn ẏ + ωn2 y = ωn2 u
So in the neighborhood of the origin, the cubic SMD is well-approximated by the linear ODE
(2).
The general linearization process is
linearization recipe.
1. write unforced dynamics as ẋ = f (x)
2. pick a point (typically an equilibrium) to linearize f (x) about
3. find Df (x) and f (x0 )
4. write f (x) ≈ f (x0 ) + Df (x)x0 (x − x0 )
2.2
Solution
The general solution y(t) to the nth order LTI ODE (1) is the sum of the homogeneous
solution yh (t) and any particular solution yp (t), i.e. y(t) = yh (t) + yp (t). We produce yh (t)
by setting the RHS of (1) to zero and rewriting the ith derivative of y(t) as the ith power of
λ. This results in an nth degree polynomial in λ, the roots of which define yh (t).
Applying this to our SMD example (2),
=⇒
=⇒
=⇒
ÿ + 2ζωn ẏ + ωn2 y = 0
λ2 + 2ζωn λ + ωn2 = 0
p
λ1 = −ζωn + ωn ζ 2 − 1,
(
c1 eλ1 t + c2 eλ2 t
yh (t) =
c1 eλt + c2 teλt
λ2 = −ζωn − ωn
p
ζ2 − 1
ζ=
6 1
ζ=1
7
where the constants c1 and c2 are determined by ICs yh (0) = y0 and ẏh (0) = ẏ0 . For the
ζ 6= 1 case,
y0 = c1 + c2 , ẏ0 = λ1 c1 + λ2 c2
ẏ0 − λ1 y0
ẏ0 − λ2 y0
, c2 = −
c1 =
λ1 − λ2
λ1 − λ2
=⇒
The roots λ1 and λ2 are imaginary for ζ = 0 (undamped), complex for 0 < ζ < 1
(underdamped), real and repeated for ζ = 1 (critically damped), and real and distinct
for ζ > 1 (overdamped).
Let’s look at the underdamped case:
=⇒
λ1 = −ζωn + iωd ,
yh (t) = e
−ζωn t
(c1 e
λ2 = −ζωn − iωd
iωd t
+ c2 e−iωd t )
p
where ωd = ωn 1 − ζ 2 ∈ R is the damped natural frequency. As long as ζωn > 0, we get
the damped oscillations that the name suggests.
How to produce the particular solution, yp (t)? Either make a clever guess based on the
form of u(t), or use Laplace transforms.
2.3
Laplace transform
The Laplace transform (LT) lets us move between the time and frequency domains. The LT
is an integral transform that can be used to convert an LTI ODE in t ∈ R into a polynomial
in s ∈ C.
The Laplace transform (laplace.m) of a function f : R → R is a function F : C → C,
defined by
Z
∞
L [f (t)] ≡ F (s) =
f (t)e−st dt
0
The inverse Laplace transform (ilaplace.m) of a function F : C → C is
Z c+i∞
1
−1
F (s)est ds
L [F (s)] ≡ f (t) =
2πi c−i∞
for some constant c > Re s.
Some properties:
• derivative
dn f
L
dtn
n
= s F (s) −
n
X
sn−k
k=1
dk−1 f dtk−1 t=0
assuming zero initial conditions gives
L [ẋ] = sx,
L [ẍ] = s2 x,
...
8
• integral
L
• linearity
Z
t
0
1
f (τ )dτ = F (s)
s
L [af (t) + bg(t)] = aF (s) + bG(s)
• initial value
lim = lim sF (s)
t→0+
• final value
s→∞
lim f (t) = lim sF (s)
t→∞
• units
[t] = seconds
2.4
=⇒
s→0
(
[s] = 1/seconds
[F (s)] = [f (t)] · seconds
Transfer function
The TF is the fundamental tool of classical control.
The transfer function of ODE (1) is the ratio of output to input LTs:
G(s) =
L [y(t)]
Y (s)
=
U (s)
L [u(t)]
ODE → TF recipe. (tf.m)
1. take the LT of both sides of the ODE, assuming zero ICs
2. factor Y (s) out of the LHS and U (s) out of the RHS
3. divide and simplify
Applying this recipe to our SMD example, we find the TF of ODE (2):
L ÿ + 2ζωn ẏ + ωn2 y = L ωn2 u
⇐⇒ s2 Y (s) + 2ζωn sY (s) + ωn2 Y (s) = ωn2 U (s)
Y (s)
ωn2
=⇒
G(s) =
= 2
U (s)
s + 2ζωn s + ωn2
9
2.4.1
TF notes
• When computing TFs, we assume zero initial conditions, i.e. y(0) = ẏ(0) = · · · = 0
and u(0) = u̇(0) = · · · = 0.
• The TF is defined only for LTI ODEs.
• The TF and ODE are equivalent.
• The same TF (or ODE) can represent many different systems under many different
types of control. The interpretation of a TF is context-dependent.
• TFs can be found empirically by mapping known inputs to measured outputs. Some
common inputs:
– impulse or Dirac delta
(
0,
if t =
6 0
δ(t) =
∞,
if t = 0
Z
∞
δ(t)dt = 1
s.t.
L [δ(t)] = 1
=⇒
−∞
– unit step or Heaviside
(
0,
δ(τ )dτ =
Θ1(t) =
1,
−∞
Z
t
if t ≤ 0
if t > 0
=⇒
L [Θ1(t)] =
if t ≤ 0
if t > 0
=⇒
L [ρ(t)] =
1
s
– unit ramp
(
0,
Θ1(τ )dτ =
ρ(t) =
t,
−∞
Z
t
1
s2
– sine wave, c sin(ωt)
• Since L [δ(t)] = 1, the impulse-response function g(t) = L−1 [G(s)(1)] gives the
system behavior when u(t) = δ(t).
• s-domain multiplication is equivalent to t-domain convolution
Z t
Y (s) = G(s)U (s)
⇐⇒
y(t) =
g(τ )u(t − τ )dτ
0
10
2.4.2
PFE
When working with TFs, we often want to take the inverse LT of a ratio of polynomials:
F (s) =
B(s)
K(s + z1 ) . . . (s + zm )
=
A(s)
(s + p1 ) . . . (s + pn )
(m ≤ n)
Partial fraction expansion (PFE) facilitates this by putting F (s) into a simpler form.
PFE recipe. (residue.m)
• no repeated poles:
F (s) =
B(s)
B(s)
= Qn
A(s)
i=1 (s + pi )
1. write F (s) as
F (s) =
an
a1
+ ··· +
s + p1
s + pn
2. for each residue ai , i ∈ {1, . . . , n}, solve
ai = (s + pi )
• repeated poles:
F (s) =
B(s) A(s) s=−pi
D(s)
D(s)
=
C(s)
(s + p)m
1. write F (s) as
F (s) =
D(s)
c1
cm
=
+ ··· +
C(s)
s+p
(s + p)m
2. for each residue ci , i ∈ {1, . . . , m}, solve
ci =
i
dm−i h
1
m D(s) (s
+
p)
(m − i)! dsm−i
C(s) s=−p
For our SMD example, the poles of G(s) are distinct in the underdamped and overdamped
cases:
ωn2
Y (s)
= 2
U (s)
s + 2ζωn s + ωn2
ωn2
=
(s − λ1 )(s − λ2 )
a1
a2
=
+
s − λ1 s − λ2
G(s) =
11
p
p
where λ1 = −ζωn + ωn ζ 2 − 1 and λ2 = −ζωn − ωn ζ 2 − 1 are the same as in our ODE
solution yh (t). The residues are
ωn2
Y (s) ωn2 =
=
U (s) s=λ1
s − λ2 s=λ1
λ1 − λ2
2 ωn2
Y (s) ωn =
= −a1
a2 = (s − λ2 )
=
U (s) s=λ2
s − λ1 s=λ2
λ2 − λ1
ωn2 1
1 G(s) =
−
λ1 − λ2 s − λ1 s − λ2
a1 = (s − λ1 )
=⇒
The impulse response of ODE (2) is therefore
1
1
ωn2 −1
−1
L
−L
g(t) = L [G(s)(1)] =
λ1 − λ2
s − λ1
s − λ2
2
ωn
eλ1 t − eλ2 t
=
λ1 − λ2
−1
which, not coincidentally, is yh (t) with ICs
y0 = 0,
ẏ0 = ωn2
This reflects the general idea that the impulse response is what happens to the undriven
system when we give it an initial whack (i.e. start it at the origin with some initial velocity).
2.5
State space
We can write any nth order LTI ODE as a (non-unique) system of n first-order linear ODEs,
and then put them in matrix form. This is called a state space representation of the ODE,
and it’s the fundamental tool of modern control theory. The SS representation lets us bring
the powerful tools of linear algebra to bear on the control problem.
Consider again the nth order LTI ODE:
dn y
dn−1 y
dn u
dn−1 u
+
a
+
·
·
·
+
a
y
=
b
+
b
+ · · · + bn u
1
n
0
1
dtn
dtn−1
dtn
dtn−1
(3)
where, without loss of generality, we’ve divided through by a0 and set p = n in ODE (1). (If
p = n − k for some k ∈ Z+ , then we recover (1) by setting b0 = · · · = bk−1 = 0 in (3).)
If ODE (3) contains no derivatives of u, then the SS representation is easy: just choose
x1 = y and xi = ẋi−1 for i ∈ {2, . . . , n}. If there are derivatives of u, then this won’t work.
The following recipe produces one possible SS representation for such cases.
12
ODE → SS recipe. (ss.m)
1. recursively define the constants
β0 = b0
βi = bi −
i
X
j=1
aj βi−j for i ∈ {1, . . . , n}
• if the RHS involves no derivatives of u, then β1 = · · · = βn−1 = 0 and βn = bn
• mnemonic: a counts up from 1 to i, β counts down to 0
2. recursively define the state variables
x1 = y − β 0 u
xi = ẋi−1 − βi−1 u
for i ∈ {2, . . . , n}
3. write the n first-order LTI ODEs
ẋi = xi+1 + βi u for i ∈ {1, . . . , n − 1}
n
X
ẋn = βn u −
an−j+1 xj
j=1
4. put the ODEs in SS form
ẋ = Ax + Bu
y = Cx + Du
(4)
where




A=



1
1
..
−an −an−1 . . .
C = 1 0 ...
.
−a2
0 ,



,

1 
−a1

β1
β2
..
.







B=
,


βn−1 
βn
D = β0 .
The general solution to (4) is
At
Z
x(t) = e x0 +
t
e−Aτ Bu(τ )dτ
(5)
0
13
which, just like its scalar sibling, requires an input u(t) to compute.
The term eAt in Equation (5), called the matrix exponential, is defined by
eAt =
∞
X
tk
k=0
k!
Ak
which looks just like the Taylor expansion of the scalar exponential. The matrix exponential
is also equal to the inverse Laplace transform of the resolvent (sI − A)−1 ,
eAt = L−1 (sI − A)−1
The matrix exponential can be calculated in many ways: series, diagonalization or other
matrix decompositions, or (my personal favorite) computer algebra.
Returning to our SMD example,
ÿ + 2ζωn ẏ + ωn2 y = ωn2 u
we have a1 = 2ζωn , a2 = ωn2 , b0 = b1 = 0, and b2 = ωn2 .
Thus,
β0 = β1 = 0,
=⇒ x1 = y,
=⇒ ẋ1 = ẏ,
β2 = ωn2
x2 = ẏ
ẋ2 = ωn2 u − ωn2 x1 − 2ζωn x2
and our SS representation is
x1
0
ẋ1
0
1
+ 2 u
=
2
ωn
ẋ2
−ωn −2ζωn x2
x1
y= 1 0
x2
2.6
SS → TF
Here’s how to convert a SS representation into a TF.
Taking the LT of the state equation in (4),
=⇒
=⇒
L [ẋ] = L [Ax + Bu]
sX(s) = AX(s) + BU (s)
X(s) = (sI − A)−1 BU (s)
combining this with the output equation in (4),
=⇒
=⇒
L [y] = L [Cx + Du]
Y (s) = CX(s) + DU (s)
Y (s) = (C(sI − A)−1 B + D)U (s)
14
Dividing by U (s) gives
G(s) = C(sI − A)−1 B + D
(6)
(This formula also works for MIMO systems.)
SS → TF recipe. (ss2tf.m)
1. compute the resolvent (sI − A)−1
2. write G(s) = C(sI − A)−1 B + D
For our SMD system,
0
1
,
A=
−ωn2 −2ζωn
=⇒
=⇒
(sI − A)
−1
0
B= 2 ,
ωn
C= 1 0 ,
1
s + 2ζωn 1
=
s
−ωn2
det(sI − A)
D=0
(Cramer’s rule)
s + 2ζωn 1
1
0
1 0
G(s) =
2
−ωn
s ωn2
det(sI − A)
ωn2
ωn2
=
= 2
det(sI − A)
s + 2ζωn s + ωn2
which is the TF we calculated earlier.
NB. The poles of G(s) are the roots of det(sI − A), i.e. the eigenvalues of A. This is an
important relationship between TF and SS forms, because poles and eigenvalues determine
stability.
2.7
TF → SS
A SS representation of an ODE (and therefore, of its TF) is not unique. There are infinitely
many such representations. Some are more useful than others for analysis or design. This
section presents two of the more useful: controllable and observable forms.
We again consider the general LTI ODE (1),
dn y
dn−1 y
dn u
dn−1 u
+ a1 n−1 + · · · + an y = b0 n + b1 n−1 + · · · + bn u
dtn
dt
dt
dt
with TF
G(s) =
Y (s)
b0 sn + b1 sn−1 + · · · + bn
= n
U (s)
s + a1 sn−1 + · · · + an
The following two SS representations can be read directly off of G(s).
15
2.7.1
Controllable form
ẋc = Ac xc + Bc u
y = Cc xc + Du


1

1


Ac = 


−an −an−1 . . .
..
.
−a2
 



,

1 
−a1
 
 

Bc = 
 ,
 
1
T
b n − an b 0
bn−1 − an−1 b0 




.
.
Cc = 
 ,
.


 b 2 − a2 b 0 
b 1 − a1 b 0

D = b0
A system that can be written in controllable form is guaranteed to be controllable (see
Section 8.1). Transforming the system into controllable form is an early step in the process
of pole placement, so it can save work to go there directly from the TF.
Applying this to our SMD example,
G(s) =
ωn2
s2 + 2ζωn s + ωn2
we have a1 = 2ζωn , a2 = ωn2 , b0 = b1 = 0 and b2 = ωn2 , so
0
1
0
Ac =
, Bc =
, Cc = ωn2 0
2
−ωn −2ζωn
1
In this representation, the state is
1 y
xc = 2
ωn ẏ
so the state variables are scaled versions of position and velocity.
2.7.2
Observable form
ẋo = Ao xo + Bo u
y = Co xo + Du

−an
1
−an−1 

.. 


. ,
Ao =  1


...

−a2 
1 −a1



b n − an b 0
bn−1 − an−1 b0 




.
.
Bo = 
,
.


 b 2 − a2 b 0 
b 1 − a1 b 0
 T
 
 

Co = 
  ,
 
1
D = b0
NB. The matrices in controllable and observable forms are related by Ao = ATc , Bo = CcT ,
Co = BcT , and Do = Dc . We’ll see that this ties into the notion of duality between
controllable and observable forms.
16
A system that can be written in observable form is guaranteed to be observable (see
Section 8.2).
Applying this to our SMD example, we have
2
0 −ωn2
ω
Ao =
, Bo = n , Co = 0 1
1 −2ζωn
0
In this representation, the state is
2ζωn y + ẏ
xo =
y
which is a somewhat less intuitive model than controllable form, because the state variables
aren’t so easily interpreted in terms of the physical states (position and velocity).
2.8
SS ↔ SS
It’s interesting to note that our SS model from Section 2.5 can be put into controllable or
observable form by redefining the state variables. Our original choice of state was the natural
one,
y
x=
ẏ
whereas in controllable form,
1 1 0 y
1 y
= 2
= Tc x
xc = 2
ωn ẏ
ωn 0 1 ẏ
and in observable form,
2ζωn y + ẏ
2ζωn 1 y
xo =
=
= To x
y
1
0 ẏ
So converting between SS representations boiled down to choosing a transformation matrix
Tc or To . It turns out that choosing any invertible matrix T produces a new, valid SS
representation.
To see this, suppose we have an SS representation (in no particular form)
ẋ = Ax + Bu
y = Cx + Du
(7)
Let A ∈ Rn×n and let T ∈ Rn×n be invertible. Then the transformation x̂ = T x is called a
similarity transformation. Plugging x̂ = T x into our SS representation, we have
x̂˙ = T ẋ = T (Ax + Bu) = T AT −1 x̂ + T Bu
y = CT −1 x̂ + Du
17
or, defining  = T AT −1 , B̂ = T B and Ĉ = CT −1 ,
x̂˙ = Âx̂ + B̂u
(8)
y = Ĉx̂ + Du
Systems (7) and (8) are called similar. Why? Because if we feed them both the same input
u(t), they produce the same output y(t). The SS representations only differ in their internal
state variables. In particular,
• systems (7) and (8) have the same TFs:
Ĝ(s) = Ĉ(sI − Â)−1 B̂ + D
= CT −1 (sI − T AT −1 )−1 T B + D
= CT −1 (sT T −1 − T AT −1 )−1 T B + D
= CT −1 (T (sI − A)T −1 )−1 T B + D
= CT −1 (T (sI − A)−1 T −1 )T B + D
= C(sI − A)−1 B + D
= G(s)
• A and  have the same the same eigenvalues:
det(λI − Â) = det(λI − T AT −1 )
= det(λT T −1 − T AT −1 )
= det(T (λI − A)T −1 )
= det T det(λI − A) det T −1
= det T T −1 det(λI − A)
= det(λI − A)
There are two particularly useful SS forms. Diagonal or modal form hugely facilitates
matrix computations. Jordan form is a purely conceptual tool, useless for calculations but
very handy for proving theorems.
2.8.1
Diagonal form
Suppose that G(s) has n distinct poles λ1 , . . . , λn . Then we can use PFE to write it as
G(s) = b0 +
c2
cn
c1
+
+ ··· +
s − λ1 s − λ2
s − λn
and the ODE may be put into diagonal SS form:
x̂˙ = Λx̂ + B̂u
y = Ĉx̂ + Du
18
where




Λ=



λ1
λ2



,


...
λn−1
λn
 
1
1
 
 
B̂ =  ...  ,
 
1
1

c1
c2
..
.
T






Ĉ = 
 ,


cn−1 
cn
D = b0
Diagonal form decouples the dynamics of the state variables. That is, it reduces an nth
order ODE system to a set of n independent scalar ODEs. This makes calculating stuff much
easier. Examples:
• matrix exponential
eAt = eT
−1 ΛT t

e λ1 t

...
= T −1 
• powers


e λn t

T

λ1 k
...

Ak = (T −1 ΛT )k = T −1 
λn k

T
(always valid for k ≥ 1, valid for k < 1 if A is invertible)
• resolvent


(sI − A)−1 = T −1 
1
s−λ1

...
1
s−λn

T
Most matrices can be diagonalized, but not all. The next few results tell us when
diagonalization is possible.
Theorem 1 (Diagonalizability) The matrix A ∈ Rn×n is diagonalizable if and only if A
has n linearly independent eigenvectors.
Aside: this means that we can find vectors v1 , . . . , vn such that
(i ) Avi = λi vi for i ∈ {1, . . . , n}
(ii ) there does not exist a set of scalars αi , not all zero, such that
Pn
i=1
α i vi = 0
19
Note that the eigenvalues λi need not be distinct.
If this condition is met, then we can write
Λ = P −1 AP
where
P = v1 v 2 . . .
vn ∈ Rn×n
is invertible, and

λ1

λ2


...
Λ=


λn−1




 ∈ Cn×n


λn
is diagonal.
NB. The similarity transformation that diagonalizes A, Λ = T AT −1 where T = P −1 , is
found by computing the eigenvectors of A.
Corollary 2 If A ∈ Rn×n has n distinct eigenvalues, then A is diagonalizable.
Note that the converse is not true: there are diagonalizable matrices that do not have full
sets of distinct eigenvalues.
This theorem and corollary give us some conditions to check. But what kinds of matrices
satisfy these conditions? It’s hard to tell, in general – we usually need to compute the
eigenstuff of A. An exception is if A is real and symmetric.
Lemma 3 (Principle axis theorem) If A ∈ Rn×n is real and symmetric, then A is orthogonally diagonalizable, i.e. we may write
Λ = P T AP
where P is orthogonal (P −1 = P T ) and Λ is diagonal.
NB. The eigenvalues of a real, symmetric matrix aren’t necessarily distinct, but they’re
always real. Additionally, the eigenvectors of a real, symmetric matrix are mutually orthogonal. This is the idea behind this lemma. It’s a nice result, because it guarantees us not
only that the matrix is diagonalizable, but it saves us the work of computing the inverse.
The transpose is much easier to work with.
The above results give us a recipe for diagonalization.
20
A → Λ recipe. (eig.m)
1. check diagonalizability
• A = AT and A ∈ Rn×n =⇒ P, Λ exist
• A has a full set of distinct eigenvalues =⇒ P, Λ exist
– if A is upper or lower triangular, read eigenvalues off main diagonal
– otherwise, solve det(λI − A) = 0 for λ
• for each λi with multiplicity mi , check if λi has mi linearly independent eigenvectors
– solve Avi = λi vi for vi . are vi1 , . . . , vimi linearly independent?
– if not, A is not diagonalizable
2. if A is diagonalizable, build P and Λ from vi and λi
3. find T = P −1 and write B̂ = T B, Ĉ = CT −1
Let’s apply this to our SMD example. Our original SS representation was
0
1
0
A=
, B= 2 , C= 1 0
2
−ωn −2ζωn
ωn
with state
y
x=
ẏ
Assuming the underdamped case, 0 < ζ < 1, A has distinct eigenvalues λ1 = −ζωn + iωd and
λ2 = −ζωn − iωd , so the system is diagonalizable. The (linearly independent) eigenvectors
of A are v1 = (1/λ1 , 1)T and v2 = (1/λ2 , 1)T , so
1/λ1 1/λ2
λ1 0
P = v 1 v2 =
and Λ =
1
1
0 λ2
λ1 λ2
1 −1/λ2
=⇒
T = P −1 =
−1
1/λ1
λ2 − λ1
ωn2 λ1 λ2 −1/λ2
=⇒
B̂ = T B =
, Ĉ = CT −1 = 1/λ1 1/λ2
λ2 − λ1 1/λ1
So we see that in the diagonal representation, the dynamics are clean but the control and
output matrices are more complicated. The new state is also more complicated, with each
state variable being a linear combination of position and velocity:
λ1 λ2
y −ẏ/λ2
x̂ = T x =
λ2 − λ1 −y ẏ/λ1
This is a typical compromise in diagonalization: the dynamics get clean, but the state gets
messy. This trade-off is basically always worthwhile.
21
Aside: eigentricks. For big, unstructured matrices, use eig.m to find the eigenstuff.
For small matrices (dimension 2 or 3), or matrices with some particular structure, solving
det(λI − A) directly is manageable. For other matrices, there are a couple of tricks that
come in handy for finding eigenstuff. Let λi be an eigenvalue of A with eigenvector vi . Some
facts:
P
1. tr(A) = i λi
Q
2. det(A) = i λi
3. αλi + β is an eigenvalue of αA + βI
4. the eigenvalues of the block triangular matrix
A B
0 C
are the eigenvalues of A and the eigenvalues of C
5. If every row of A sums to c, then c is an eigenvalue of A with eigenvector (1, . . . , 1)T
If every column of A sums to c, then c is an eigenvalue of A (no info about the
corresponding eigenvector)
2.8.2
Jordan form
Not all matrices can be diagonalized. For instance, when our SMD system is critically
damped, we have a repeated eigenvalue that produces only one linearly independent eigenvector:
1
λ1 = λ2 = −ωn , v =
−ωn
so, by the diagonalization theorem, the system is not diagonalizable.
In cases like these, we need a generalization of diagonal form that works for all matrices
A ∈ Rn×n . This is called Jordan form:
x̂˙ = J x̂ + T Bu
y = CT −1 x̂ + Du
where

J1

−1
...
J = T AT = 

Jq

n×n
∈C
22
is block diagonal, built from q Jordan blocks


λi 1
.


λi . .


Ji = 
 ∈ Cmi ×mi ,
.
.. 1 

λi
i ∈ {1, . . . , q}
q is thePnumber of distinct eigenvalues of A and mi is the algebraic multiplicity of eigenvalue
λi , so qi=1 mi = n.
The critically damped SMD has q = 1 Jordan block with dimension m1 = 2,
−ωn
1
J=
0
−ωn
The transformation matrix T may be hard to find, but that’s okay. Jordan form is mostly
used for proving theorems, not for computing numerical stuff. It’s usually enough to know
that any matrix can be put in Jordan form.
23
Part II
Analysis
In the analysis part of these notes we ask, “Given a physical system and its EoM ... ”
• is it stable?
– poles/eigenvalues
– Routh check
– gain/phase margins
• how does it respond to changing inputs?
– transient response
– steady-state response
∗ steady-state error
∗ frequency response
• can we drive it from any state to any other state?
– controllability
• can we infer all the internal states by watching the output?
– observability
We’ll learn how to answer these questions, though not necessarily in that order.
24
3
Open and closed loop
The analysis tools in these notes are mostly generic, in that they apply to an ODE (or,
equivalently, to its TF). An ODE can represent the behavior of many different physical
systems under many different types of control. The interpretation of an ODE or TF is
context-dependent.
It’s important to understand, however, that different analysis tools are traditionally applied to different types of systems. For instance, root locus methods are applied to closed-loop
systems, whereas Bode plots are applied to open-loop systems. Let’s clarify that distinction.
Figures 2 and 3 show a generic system under open and closed loop control.
Some vocab:
• r(t) = L−1 [R(s)] is a trajectory that we want our output to match: “design u(t) to
make y(t) track r(t)”
• r(t) = r0 for some constant r0 is called a regulator problem: “design u(t) to keep y(t)
at r0 .” It’s common to take r0 = 0.
A rule for reading TFs off of block diagrams:
block diagram → TF recipe.
1. multiply the TFs of the blocks between the two signals
2. divide by one plus the product of the whole loop
Using this rule, the open loop TF in Figure 2 is
Gol (s) =
Y (s)
= Gc (s)Gp (s)
R(s)
The closed loop TF in Figure 3 is
Gcl (s) =
R(s)
Y (s)
Gc (s)Gp (s)
=
R(s)
1 + Gc (s)Gp (s)
Y (s)
U (s)
Gc (s)
Gp (s)
Figure 2: open loop. The control depends on the reference R(s), but not the output Y (s).
25
R(s)
E(s)
Y (s)
U (s)
Gc (s)
Gp (s)
Figure 3: closed loop. The control is based on the error E(s) = R(s) − Y (s). This is unity
feedback, because there’s no block in the feedback section of the loop.
The OL and CL TFs are therefore related by
Gcl (s) =
1
1+
1
Gol (s)
⇐⇒ Gol (s) =
1
1
Gcl (s)
(9)
−1
Here’s an example of two different ways to interpret the same ODE.
So far, we’ve been viewing ODE (2) as the EoM for an open loop SMD system, but
Equation (9) gives us another way to look at it. Let’s plug in our SMD TF as Gcl (s):
Gol (s) =
1
2
s2 +2ζωn s+ωn
2
ωn
−1
=
ωn2
ωn2
=
s2 + 2ζωn s + ωn2 − ωn2
s2 + 2ζωn s
which gives the ODE
ÿ + 2ζωn ẏ = ωn2 u
which is the EoM for a driven mass-damper system (SMD without the S).
From one perspective, G(s) = ωn2 /(s2 + 2ζωn s + ωn2 ) looks an open loop transfer function
– pushing a SMD around with your eyes closed. Let’s call the force you push with Fol (t) =
kuol (t) .
From another perspective, G(s) looks like a closed loop transfer function. Of what
system? Of the same mass and damper, but no spring, and now you’re trying (with your
eyes open) to hit a moving target r(t) using proportional control in a unity feedback loop:
Fcl (t) = kucl (t) = k(r(t) − y(t)). Let’s plug this in to our MD ODE:
⇐⇒
⇐⇒
ÿ + 2ζωn ẏ = ωn2 ucl
ÿ + 2ζωn ẏ = ωn2 (r − y)
ÿ + 2ζωn ẏ + ωn2 y = ωn2 r
So if uol (t) = r(t), meaning our OL policy is proportional control with a gain of 1, then we
recover ODE (2).
26
What does this example tell us? It tells us that naively closing the loop on a massdamper system is like adding a spring. This is a disadvantage of feedback control: although
it improves the accuracy of a system, it tends to make things more oscillatory. If done poorly,
feedback can make a normally placid system go bonkers. Much of the art of feedback control
design boils down to finding a balance between accuracy and stability.
4
Stability
Loosely speaking, a stable system eventually settles into a steady state no matter what
(bounded) input we give it. This is called “bounded-input-bounded-output” (BIBO) stability. No runaway growth, no lasting vibrations.
Formally, a system with TF G(s) is stable iff all the poles of G(s), which are also the
eigenvalues of A, have strictly negative real parts. A system that’s not stable is unstable.
A special case of an unstable system is one with pure imaginary poles (see Figure 5), which
we call marginally stable, though marginally unstable would be a better term.
Why this definition? Consider the impulse response function g(t) of ODE (1). After
factorization and PFE, the TF G(s) of (1) can be written as
G(s) =
n
X
i=1
ai
s − pi
=⇒
g(t) =
n
X
ai epi t
i=1
where pi is the ith pole of G(s) and ai ∈ R for all i. This assumes no repeated poles of G(s),
but the analysis is similar with repeated poles.
If Re pi < 0 for all i, then all terms in g(t) will decay exponentially to zero as t → ∞.
If there exists an i such that Re pi > 0, then g(t) will grow exponentially forever, or at
least until something breaks in the physical system. If Re pi = 0, then g(t) will oscillate
indefinitely. This is why we call Re pi the attenuation of the ith term in g(t). The closer
Re pi is to zero, the longer the transients due to the ith term take to die out.
This motivates the related notion of dominant poles. If Re pj Re pi < 0, i.e. pi
is much closer to the imaginary axis than pj , then the transient response due to pi will last
much longer than that due to pj . This is a powerful idea that often lets us approximate
messy, higher-order systems as first- or second-order systems by neglecting poles pj with
Re pj 0. In fact, most of classical control theory is built around these reductions. This
is another reason why understanding our SMD example (2) is so important.
How to check if a system is stable? Given values of u, u̇, . . . , we can always check the
stability of ODE (1) by putting it into SS or TF form and finding the eigenvalues of A or
the poles of G(s). This can take a while – with either approach, it involves finding the roots
of the nth degree characteristic polynomial (roots.m).
An alternative is to apply Routh’s stability criteria, which avoid the root-finding problem.
The full stability check for high-order systems is rather involved (see Ogata 5e, p. 212), but
27
here’s the recipe for a system of order three or below:
G(s) =
B(s)
a0 s 3 + a1 s 2 + a2 s + a3
Routh’s stability recipe. (example: 3rd order system)
1. if at least one ai > 0 and any ai ≤ 0, then the system is unstable (possibly marginally)
2. if ai > 0 for all i, write the Routh array
s3
s2
s
1
column 1
a0
a1
(a1 a2 − a0 a3 )/a1
a3
column 2
a2
a3
3. count S, the number of sign changes in column 1, and define N , the number of unstable
poles in G(s)
4. theorem: N = S
The necessary and sufficient conditions for stability of G(s) are therefore: (1) all ai are
strictly positive and (2) no sign changes in column 1 of the Routh array. Sometimes step 1 is
as far as you need to go. If you get past step 1, you may not have to do all the calculations,
just figure out the signs of some terms. For example,
B(s)
a0 + a1 s + a2
B(s)
G(s) =
3
a0 s + a1 s 2 + a2 s + a3
G(s) =
s2
stable
⇐⇒
ai > 0 for all i ∈ {0, 1, 2}
stable
⇐⇒
a1 a2 > a0 a3
Routh’s recipe is occasionally applied with a variable in the array to determine how much
a parameter (like the controller gain) can be changed before a system goes unstable. This is
a measure of relative stability, which we’ll discuss more later.
Example: for what gain values is a SMD system under proportional feedback control
stable? Here our plant and controller are
ωn2
and Gc (s) = K
s2 + 2ζωn s + ωn2
Kωn2
Gcl (s) = 2
s + 2ζωn s + (1 + K)ωn2
Gp (s) =
=⇒
Let’s answer this with two approaches.
28
Approach 1: factor. By the quadratic formula, the poles of G(s) are
p
p1 = −ζωn + ωn ζ 2 − (1 + K)
p
p2 = −ζωn − ωn ζ 2 − (1 + K)
Since ωn > 0 and ζ ∈ [0, 1], the poles are complex when K ≥ ζ 2 − 1. In this case, Re pi =
−ζωn < 0, so Gcl (s) is stable.
On the other hand, for K < ζ 2 − 1 the poles are real. The system is unstable whenever
p1 ≥ 0:
p
p1 ≥ 0
⇐⇒ − ζωn + ωn ζ 2 − (1 + K) ≥ 0
⇐⇒ ζ 2 − (1 + K) ≥ ζ 2
⇐⇒ K ≤ −1
So G(s) is stable for all K > −1.
NB. K < 0 is called positive feedback, because the proportional control law u(t) =
K(r(t) − y(t)) tends to magnify errors. If K < 0, then y(t) < r(t) =⇒ u(t) < 0, i.e. we
push the mass away from the reference position.
Approach 2: Routh. The coefficients in Gcl (s) are a0 = 1, a1 = 2ζωn , a2 = ωn2 . The
Routh array is therefore
2
s
s
1
column 1
1
2ζωn
(1 + K)ωn2
column 2
(1 + K)ωn2
Since ζ > 0 and ωn > 0, the system is stable iff the third term in column 1 is strictly positive,
i.e. K > −1. Routh gets us to the same answer in fewer steps.
29
5
Transient response
We saw in the last section that y(t), the general solution to ODE (1), requires a particular
solution yp (t) that depends on the structure of u(t). This section looks at the behavior of y(t)
for first- and second-order systems driven by a few simple, non-oscillating inputs (impulse,
step and ramp). The next section will discuss frequency response, the behavior of y(t) under
sinusoidal inputs.
A system’s response to a sudden input change is often split into two regimes: transient,
when things are still bouncing around crazily, and steady state, when things have settled
down.
5.1
First-order systems
A typical first-order system is
=⇒
=⇒
τ ẏ + y = u
(τ s + 1)Y (s) = U (s)
1
G(s) =
τs + 1
Since the only pole is s = −1/τ , the system is stable for all τ > 0. (We call τ the time
constant).
Concrete example: open-loop velocity control of a mass with friction. The EoM for an
MD system is
⇐⇒
mẍ + cẋ = F
τ ẏ + y = u
where x is position, the output y is velocity, the input u = F/c also has units of velocity,
and the time constant τ = m/c has units of time.
Table 1 and Figure 4 show the first-order transient response when u(t) is δ(t), Θ1(t), and
ρ(t).
u(t)
δ(t)
Θ1(t)
ρ(t)
U (s)
1
1
s
1
s2
Y (s)
1
τ s+1
1
τ
− τ s+1
s
1
τ2
− τs + τ s+1
s2
y(t)
1 −t/τ
e
τ
−t/τ
1−e
t − τ (1 − e−t/τ )
Table 1: first-order time responses. The impulse response is the derivative of the step
d
d
response is the derivative of the ramp response. This is because δ(t) = dt
Θ1(t) = dt
ρ(t). A
general fact for LTI systems: if y(t) is the response to u(t), then ẏ(t) is the response to u̇(t).
30
G ( s) =
1
τs +1
2
δ (t)
1.5
1
0.5
0
0
0.5
1
1.5
2
2.5
3
3.5
4
4.5
5
0
0.5
1
1.5
2
2.5
3
3.5
4
4.5
5
0
0.5
1
1.5
2
2.5
3
3.5
4
4.5
5
1
1(t)
0.8
0.6
0.4
0.2
0
5
ρ(t)
4
3
2
1
0
t
Figure 4: impulse, step and ramp responses of a first-order system with τ = 0.5, 1, and 2.
If the time constant τ is large, the system responds sluggishly. Note that the system can’t
track a ramp for any τ , and for large τ is slow in tracking a step. This is why we call τ the
time constant. It encodes how long the system takes to settle into a steady state.
31
5.2
Second-order systems
Our SMD example (2) is the standard form for a second-order system:
=⇒
ÿ + 2ζωn ẏ + ωn2 y = ωn2 u
ωn2
G(s) = 2
s + 2ζωn s + ωn2
Figure 5 shows the transient response when u(t) is δ(t), Θ1(t), and ρ(t).
32
G ( s) =
10
s2
ω n2
+ 2ζ ω n s + ω n2
δ (t)
5
0
−5
−10
0
0.5
1
1.5
2
2.5
3
3.5
4
4.5
5
0
0.5
1
1.5
2
2.5
3
3.5
4
4.5
5
0
0.5
1
1.5
2
2.5
3
3.5
4
4.5
5
2
1(t)
1.5
1
0.5
0
5
ρ(t)
4
3
2
1
0
t
Figure 5: impulse, step and ramp responses of a second-order system with ωn = 2π and ζ =
0, 0.3, 0.6, . . . , 1.5. Smaller damping ratios give more oscillations and longer settling times.
An undamped system (ζ = 0) is marginally stable, and therefore rings forever.
33
6
Steady-state response
After the transients have died out, there are two basic questions to ask about a system’s
response to a change in input. For non-oscillating inputs, the output of a stable system will
settle into a steady motion that mirrors the reference input. In this case, it makes sense to
ask, “Did the system get where I wanted it to go? Is it moving how I wanted it to move?”
We answer this question by analyzing the system’s steady-state error.
If the input is oscillating, then the output will settle into steady oscillations at the same
frequency, but with different amplitude and a phase shift. In this case we ask, “How much
bigger are the oscillations? How big is the phase shift? And how do they change as we vary
the driving frequency?” We answer these questions by looking at a system’s frequency
response.
6.1
Steady-state error
In Figure 4, we see that a first-order system can’t track a ramp input for any value of τ . We
call this difference between the output and reference as t → ∞ the steady-state error ess .
This is a useful idea, because we’d like our systems not to have it – at least for the types of
inputs we expect to encounter.
Formally, the steady-state error is
ess = lim sE(s) = lim sS(s)R(s)
s→0
s→0
where the TF S(s) ≡ E(s)/R(s) is called the sensitivity function. The sensitivity function
is independent of the input R(s), but the error TF E(s) depends on the particular form of
R(s). The sensitivity function is an important tool in robustness analysis.
6.1.1
System classification
The steady-state error of a system in response to typical inputs is largely determined by
the number of integrators in the TF. Systems with more integrators are more sensitive to
accumulated error, so they’re better at minimizing it.
What’s an integrator? A 1/s term. Most TFs are ratios of polynomials which, when
factored appropriately, are of the form
Q
K m
j=1 (βj s + 1)
Gc (s)Gp (s) = N Qp
s
i=1 (αi s + 1)
We call a system with N integrators type N.
How does system type determine ess ? Consider the block diagram in Figure 6. For this
system, the sensitivity function is S(s) = 1/(1 + Gc (s)Gp (s)). The steady-state error in
34
R(s)
E(s)
Y (s)
U (s)
Gc (s)
Gp (s)
Figure 6: unity feedback control.
response to a step input r(t) = Θ1(t) ⇐⇒ R(s) = 1/s is
1 s
ess = lim sS(s)R(s) = lim
s→0
s→0 1 + Gc (s)Gp (s)
s
1
=
1 + Kp
where Kp ≡ lims→0 Gc (s)Gp (s) is called the position error constant. For a type 0 system
Kp is finite, so ess 6= 0. For a type N > 1 system Kp is infinite, so ess = 0.
We get similar results for a ramp input, r(t) = ρ(t) ⇐⇒ R(s) = 1/s2 , and for a
so-called acceleration input, r(t) = α(t) ⇐⇒ R(s) = 1/s3 . Table 2 summarizes these
results, using the following definitions.
Kv ≡ lim sGc (s)Gp (s)
s→0
Ka ≡ lim s2 Gc (s)Gp (s)
s→0
(velocity error constant)
(acceleration error constant)
NB. Despite the names, the velocity and acceleration error have the same dimension as the
output y(t). If we’re controlling an object’s position y(t), then the velocity error is an error
in the object’s position: at some time t1 after the transients have died out, we’d like the
object to be at position r(t1 ) = t1 meters, but instead it’s at y(t1 ) = t1 − ess meters.
35
type
step
0
ess = 1/(1 + Kp )
1
0
2
0
ramp
∞
ess = 1/Kv
0
acceleration
∞
∞
ess = 1/Ka
Table 2: system type and steady-state error. More integrators means better accuracy but
slower transient response and decreased stability margins. Rule of thumb: for N > 2
transient performance is poor.
6.2
Frequency response
In section 5, we looked at the transient response of y(t) to a few simple, non-oscillating
inputs. In this section we’ll see how y(t) responds to sinusoidal inputs u(t) = c sin(ωt), once
the transients have settled down and y(t) has relaxed into steady oscillations. This is called
the system’s frequency response.
A system’s frequency response is fully determined by the governing ODE (or, equivalently,
its TF). Depending on context, then, a frequency response plot or metric can represent the
behavior any number of physical systems. It’s customary, however, to directly analyze the
frequency response of the open-loop system. The open-loop frequency response can tell us
about the behavior of the system after you close the loop, but only indirectly.
We again consider the general LTI ODE (1):
dn−1 y
dp u
dp−1 u
dn y
a0 n + a1 n−1 + · · · + an y = b0 p + b1 p−1 + · · · + bp u
dt
dt
dt
dt
with TF
G(s) =
where p(s) =
Pp
j=0 bj s
j
and q(s) =
Pn
i=0
p(s)
Y (s)
=
U (s)
q(s)
ai s i .
Y (s)
U (s)
G(s)
Figure 7: frequency response answers the question, “What happens to y(t) as we vary ω in
u(t) = c sin(ωt)?”
36
How does y(t) respond to sinusoidal inputs? The transients can be complicated, but the
steady-state frequency response is easy. If G(s) is stable, then y(t) will eventually settle into
steady oscillations with the same frequency as the input, but possibly a different magnitude
and a phase shift.
u(t) = c sin ωt and G(s) stable
(10)
=⇒
yss (t) = c |G(iω)| sin(ωt + φ(ω))
where yss (t) = limt→∞ y(t) and φ(ω) = arg G(iω).
We call φ(ω) > 0 phase lead and φ(ω) < 0 phase lag. G(iω) is called the frequency
response function of g(t). Figures 8 and 9 show this tendency of y(t) to synch up with
u(t).
37
G ( s) =
1
τs +1
1
ω=π
0.5
0
−0.5
−1
0
0.5
1
1.5
2
2.5
3
3.5
4
4.5
5
0
0.5
1
1.5
2
2.5
3
3.5
4
4.5
5
0
0.5
1
1.5
2
2.5
3
3.5
4
4.5
5
1
ω = 2π
0.5
0
−0.5
−1
1
ω = 10π
0.5
0
−0.5
−1
t
Figure 8: input and first-order frequency response with τ = 0.5, 1, and 2. The input and
output tend to synch up after a few cycles.
38
G ( s) =
2
s2
ω n2
+ 2ζ ω n s + ω n2
ω=π
1
0
−1
−2
0
0.5
1
1.5
2
2.5
3
3.5
4
4.5
5
0
0.5
1
1.5
2
2.5
3
3.5
4
4.5
5
0
0.5
1
1.5
2
2.5
3
3.5
4
4.5
5
15
10
ω = 2π
5
0
−5
−10
−15
−20
1
ω = 10π
0.5
0
−0.5
−1
t
Figure 9: input and second order frequency response with ωn = 2π and ζ = 0, 0.3, 0.6,
. . . , 1.5. Increasing ω by an order of magnitude leads to big, qualitative changes in system
behavior. y(t) vs. t plots don’t capture this very well.
39
Where does Equation (10) come from?
1. PFE on Y (s):
p(s) cω p(s) cω
=
q(s) s2 + ω 2
q(s) (s + iω)(s − iω)
α1
αn
β1
β2
=
+ ··· +
+
+
s + p1
s + pn s + iω s − iω
Y (s) = G(s)U (s) =
(that’s assuming q(s) has no repeated poles; otherwise we get terms like γj /(s − p)j )
2. inverse LT:
y(t) = α1 e−p1 t + · · · + αn e−pn t + β1 e−iωt + β2 eiωt
(repeated poles =⇒ terms like tj e−pt )
3. if G(s) is stable, then the poles p, p1 , . . . have negative real parts
=⇒ yss (t) = β1 e−iωt + β2 eiωt
4. PFE again to find β1 and β2 :
β1 G(s) β2 G(s)
cωG(s)
=
+
(s + iω)(s − iω)
s + iω
s − iω
cωG(s)
=⇒ βi = (s ± iω)
(s ± iω)(s ∓ iω) s=∓iω
cG(iω)
=∓
2i
Y (s) =
5. write G(iω) ∈ C in polar form:
=⇒
6.2.1
G(iω) = |G(iω)| eiφ(ω)
cG(iω) −iωt cG(iω) iωt
yss (t) = −
e
+
e
2i
2i
ei(ωt+φ(ω)) − e−i(ωt+φ(ω)) = c |G(iω)|
2i
= c |G(iω)| sin(ωt + φ(ω))
2
Bode plots
Figures 8 and 9 show us that increasing ω by an order of magnitude can profoundly change
the steady-state system behavior. In control design, we often consider inputs that range in
40
frequency over several orders of magnitude. Output vs. time plots don’t handle this very
well. The Bode plot is a better tool.
A Bode plot is actually a pair of plots: a phase plot and a magnitude plot. The phase
plot shows φ(ω) vs. ω, with ω on a log scale. The magnitude plot shows |G(iω)| vs. ω, with
ω again on a log scale. The magnitude is plotted in units of decibels (dB). What’s a decibel?
A logarithmic unit that’s used for big ratios. If a quantity Q1 is 100, 000 times bigger than
Q2 , then z = Q1 /Q2 = 105 . If we convert z to decibels, then z has magnitude 20 log 105 dB
= (5)(20) log(10) dB = 100 dB.
Figures 10, 11, 12 and 13 show three ways of visualizing how the amplitude and phase of
yss (t) changes with ω. The bottom plot in each figure is the Bode plot.
41
G ( s) =
1
1
τs +1
|G ( iω ) |
0.8
0.6
0.4
0.2
0
0
10
20
30
40
50
ω
60
70
80
90
100
log|G ( iω ) |
1
0
−1
−2
−3
−2
−1.5
−1
−0.5
0
0.5
1
1.5
2
logω
|G ( iω ) | ( dB)
20
0
−20
−40
−60
−2
10
−1
10
0
10
1
2
10
10
ω ( log sc ale )
Figure 10: first-order magnitude plots with τ = 0.5, 1, and 2. For large ω, the slope in the
Bode plot (bottom) is −20 dB/decade.
42
G ( s) =
10
ω n2
s 2 + 2ζ ω n s + ω n2
|G ( iω ) |
8
6
4
2
0
0
10
20
30
40
50
ω
60
70
80
90
100
log|G ( iω ) |
2
1
0
−1
−2
−1
−0.5
0
0.5
1
1.5
2
logω
|G ( iω ) | ( dB)
40
20
0
−20
−40
−1
10
0
1
10
2
10
10
ω ( log sc ale )
Figure 11: second-order magnitude plots with ζ = 0, 0.3, 0.6, . . . , 1.5. p
The log plots are
much better √
at capturing the peak at the resonant frequency ωr = ωn 1 − 2ζ 2 (defined
for ζ ∈ [0, 1/
p 2]). Note that less damping means a higher resonant peak: the magnitude is
Mr = 1/2ζ 1 − ζ 2 . The log plots are also more sensitive to the subtle changes in magnitude
for ω 1. For large ω, the slope in the Bode plot (bottom) is −40 dB/decade.
43
G ( s) =
0
1
τs +1
−20
φ
−40
−60
−80
0
10
20
30
40
50
ω
60
70
80
90
100
0
−20
φ
−40
−60
−80
−2
−1.5
−1
−0.5
0
0.5
1
1.5
2
logω
0
−20
φ
−40
−60
−80
−2
10
−1
10
0
10
1
2
10
10
ω ( log sc ale )
Figure 12: first-order phase plots with τ = 0.5, 1, and 2. Since φ < 0, the systems all lag
the input by π/2 when driven at high frequencies.
44
G ( s) =
0
ω n2
s 2 + 2ζ ω n s + ω n2
φ
−50
−100
−150
0
10
20
30
40
50
ω
60
70
80
90
100
0
φ
−50
−100
−150
−1
−0.5
0
0.5
1
1.5
2
logω
0
φ
−50
−100
−150
−1
10
0
1
10
2
10
10
ω ( log sc ale )
Figure 13: second-order phase plots with ζ = 0, 0.3, 0.6, . . . , 1.5. Less damping means
a more drastic phase shift near the resonant frequency. At high driving frequencies, the
systems all lag the input by π.
45
6.2.2
Bode by hand
For an instant, accurate Bode plot of any TF, just use Matlab. That should be the end
of this section, really. Why isn’t it? Well, sometimes we’re required to draw Bode plots
by hand, like on an exam. Other times we just want a rough idea of a system’s frequency
response, and with asymptotic approximations this isn’t too hard to get. Mathematically,
plugging s = iω into any TF G(s) just results in a complex
p variable, which we can yconvert
iφ
from rectangular (x + iy) to polar (re ) form using r = x2 + y 2 and φ = tan−1 ( x ), then
plot |G(iω)| (in dB) and φ vs. ω on a log scale.
The process is simple, but for a complicated TF it can involve a lot of algebra. Thankfully,
there’s a quick-and-dirty recipe for sketching Bode plots using asymptotic approximations.
Bode plot recipe. (bode.m)
1. write G(s) as product of basic factors
2. sketch approximate plots for all factors
3. add
The Bode plots (both magnitude and phase) of 1/G(s) are the Bode plots of G(s), flipped
upside-down. For non-minimum phase systems (see Section 6.2.3), keep the magnitude plot
the same but flip the phase chart and start it from φ(ω) = −π rather than φ(ω) = 0.
Here are all the basic factors you need to know.
Let M (ω) = 20 log |G(iω)| and φ(ω) = arg G(iω).
• gain, G(s) = K
M (ω) = 20 log K
(
0,
K>0
φ(ω) =
−π,
K<0
• integral, G(s) = 1/s
M (ω) = −20 log ω
φ(ω) = −π/2
(reflect about ω-axis for derivative, G(s) = s)
• first order pole, G(s) = 1/(1 + τ s)
(
0
M (ω) ≈
−20(log ω + log τ )

1

ω < 10τ
0
1
φ(ω) ≈ line
≤ω<
10τ


−π/2
ω ≥ 10
τ
ω≤
ω>
1
τ
1
τ
10
τ
46
(reflect about ω-axis for first order zero, G(s) = 1 + τ s)
• second order pole, G(s) = ωn2 /(s2 + 2ζωn s + ωn2 )= 1/(1 + 2ζs/ωn + (s/ωn )2 )
(
0
ω ≤ ωn
M (ω) ≈
−40(log ω − log ωn )
ω > ωn


ω ≤ ω10n
0
φ(ω) ≈ −π/2
ω = ωn


−π
ω ≥ 10ωn
smaller ζ ∈ (0, 1) =⇒ higher resonant peak (see Figure 11), steeper phase swoop (see
Figure 13)
(reflect about ω-axis for second order zero, G(s) = (s2 + 2ζωn s + ωn2 )/ωn2 )
Correctness check. Let G(s) = p(s)/q(s), where p(s) and q(s) are polynomials of degrees
m and n. Then
d
M (ω) = −20(n − m)
ω→∞ d(log ω)
lim
dB
dec
i.e. the slope of the magnitude plot approaches −20(n − m) dB/decade for large ω.
6.2.3
Minimum and non-minimum phase
Consider the TF of LTI ODE (1)
G(s) =
p(s)
q(s)
where p(s) and q(s) are polynomials of degree m and n, respectively, with m ≤ n. Call zj
the j th root of p(s) (the j th zero of G(s)) and pi the ith root of q(s) (the ith pole of G(s)).
G(s) is called minimum phase (MP) if
Re zj ≤ 0 for all j ∈ {1, . . . , m} and Re pi ≤ 0 for all i ∈ {1, . . . , n}
i.e. G(s) is stable or marginally unstable, and all zeros of G(s) are in the closed left half
plane. A system that’s not minimum phase is non-minimum phase (NMP).
An unstable system is NMP, but a NMP system can be stable if zj > 0 for some j. For a
MP system, things are nice: the magnitude and phase plots uniquely determine one another,
and therefore the whole system. For NMP systems, that’s not true. A magnitude plot can
be paired with lots of phase plots, and therefore lots of different physical systems.
NMP systems have slow transient response, so they’re generally bad for control. Here’s
how to detect them on a Bode plot.
47
NMP check.
1. find limω→∞ φ(ω)
2. calculate − π2 (n − m) from p(s) and q(s)
3. if limω→∞ φ(ω) 6= − π2 (n − m), the system is NMP
6.2.4
Relative stability
In section 4, we defined a stable system as one that settles into a steady state for any bounded
input. Here we expand on that notion a bit.
The absolute stability of a system is the stability of the system “right now,” i.e. with
the current values of all system parameters. That means any model parameters – in the
plant, controller and observation models – and, in particular, the controller gain.
The relative stability of a system is the amount that a system can be changed before
it goes unstable. An example: our SMD system is stable in the absolute sense if ζ = 0.0001,
but its relative stability is awful because a tiny change in our model of ζ could turn the
system unstable.
In frequency response analysis, we typically think of G(s) as the TF for the open-loop
system. In control design, however, we’re mostly concerned with the stability of the closedloop system. It’d be nice to be able to learn about the relative stability of the closed-loop
system by looking at the open-loop Bode plot. There are two common metrics for this: gain
margin Km and phase margin φm .
The gain margin is the amount by which we can increase the controller gain before the
closed-loop system, when driven at the phase crossover frequency ωφ , goes unstable. If
Km > 0, then the closed-loop system is stable in the absolute sense.
The phase margin is the amount of phase lag that the closed-loop system can tolerate,
when driven at the gain crossover frequency ωK , before it goes unstable. If φm > 0, then
the closed-loop system is stable in the absolute sense.
Formally, the crossover frequencies are defined by
|G(iωK )| = 1
⇐⇒
arg G(iωφ ) = −π
20 log |G(iωK )| = 0
In terms of the crossover frequencies, the margins are
1
|G(iωφ )|
φm = π + φ(ωK )
Km =
Why these definitions? Let G(s) be the open-loop TF in Figure 7. If we close the loop on
48
this system with unity feedback, then the closed-loop TF is
Gcl (s) =
1
G(s)
=
1
1 + G(s)
1 + G(s)
so any pole p of Gcl (s) must solve G(p) = |G(p)| ei arg G(p) = −1, i.e. |G(p)| = 1 and
arg G(ip) = ±π. Assume p is stable for some initial gain. Then as the gain is increased, p
may cross the imaginary axis and become unstable. At this critical gain value, if it exists,
Re p = 0, so we can write p = iω for some ω ∈ R. The conditions for a stable pole going
unstable are therefore
(
|G(p)| = 1 and arg G(p) = ±π
(p is a pole of Gcl (s))
Re p = 0 ⇐⇒ p = iω
(p lies on the imaginary axis)
=⇒
|G(iω)| = 1 and arg G(iω) = ±π
which, if we assume our system has phase lag as most do (i.e. arg G(iω) < 0 for all ω > 0),
reduces to our crossover frequency definitions. This motivates the definition of Km : since
increasing a system’s gain moves the magnitude Bode plot upward, Km can be interpreted
as the amount of gain increase the system tolerates before both conditions |G(iω)| = 0 and
arg G(iω) = −π are met.
By Equation (10), the input-output relationships at the crossover frequencies are
u(t) = c sin(ωK t)
=⇒
u(t) = c sin(ωφ t)
=⇒
y(t) = c sin(ωK t − π + φm )
c
sin(ωφ t − π)
y(t) =
Km
When the open-loop system is driven at ω = ωφ , the output lags the input by π and the
amplitude of the output is 1/Km times larger than the amplitude of the input. A large Km
therefore means that the output amplitude is much smaller than the input amplitude. As
Km → 0, the amplitude of y(t) goes to infinity. Thus, the open-loop system (as well as the
closed-loop system) goes unstable as Km → 0.
The open-loop behavior at ω = ωK is less illustrative: the output lags the input by π,
which doesn’t raise any particular red flags. So phase margin is a fundamentally closed-loop
consideration.
Gain and phase margins are important aspects of frequency response analysis. For minimum phase systems, they’re easily read from the Bode plot, but for more complicated
systems they may not be obvious. This is where the Nyquist plot and the Nyquist stability
criterion come in handy.
49
6.2.5
Nyquist plots
A Nyquist plot is a graph of G(iω), parametrized by the driving frequency ω ∈ [0, ∞). The
parametric curve is plotted in the complex plane, Re G(iω) vs. Im G(iω). This is like
plotting a trajectory r(t) = (x(t), y(t)) in the xy-plane (think projectile motion).
The Nyquist plot of a TF G(s) contains the exact same information as the magnitude
and phase Bode plots of G(s). The Nyquist approach has some advantages:
• only one plot to look at
• better for NMP analysis
• enables use of the Nyquist stability criterion
and some disadvantages:
• harder to visualize
• can’t produce a plot from the sum of its basic factors
• no linear approximations
Figures 14 and 15 show the Nyquist plots of our first- and second-order systems.
50
G (s) =
0.5
1
τs +1
0.4
0.3
I m G ( iω )
0.2
0.1
0
−0.1
−0.2
−0.3
−0.4
−0.5
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
R e G ( iω )
Figure 14: first-order Nyquist plots with τ = 0.5, 1, and 2. The trajectory is the same
semicircle, ending at the origin, for all three systems. Systems with larger time constants
(less damping) traverse the curve “faster” in ω.
51
G ( s) =
0
s2
ω n2
+ 2ζ ω n s + ω n2
−0.2
−0.4
I m G ( iω )
−0.6
−0.8
−1
−1.2
−1.4
−1.6
−1.8
−0.8
−0.6
−0.4
−0.2
0
0.2
0.4
0.6
0.8
1
1.2
R e G ( iω )
Figure 15: second-order Nyquist plots with ζ = 0.3, 0.6, . . . , 1.5. Systems with less damping
trace out larger curves, reflecting their larger resonant peaks. Like the first-order trajectories,
these approach the origin as ω → ∞.
52
6.2.6
Nyquist by hand
For an instant, accurate Nyquist plot of any system, just use Matlab (nyquist.m).
Like Bode plots, though, sometimes it’s handy to be able to whip up an approximate
Nyquist plot by hand. Asymptotic analysis of Nyquist curves helps with that.
• all stable systems’ curves approach the origin tangent to one of the axes as ω → ∞
• type 0: curves start along −ĵ at G(iω) = ρ0 ∈ R+
• type 1: curves start along ĵ at G(iω) → −i∞
• type 2: curves start along î at G(iω) → ∞
• increasing the gain radially dilates the curve
The gain and phase margins (margins.m) are easy to read off of a Nyquist chart:
1. draw the unit circle on the Nyquist plot
2. 1/Km is the distance along the real axis between -1 and the real intercept of the Nyquist
curve, defined to be positive if the intercept lies within the unit circle
3. φm is the angle, with CCW defined as positive, between the negative real axis and the
line from the origin to the intersection of the Nyquist curve and the unit circle
6.2.7
Nyquist stability criterion
This is an application of conformal mapping. It’s a way of analyzing the stability of the
closed-loop system.
The boundary of the right half-plane in the s-domain (the union of the imaginary axis
and the right half of a gigantic circle) is mapped, via the open-loop TF Gc (s)Gp (s), into
another contour in the complex plane, Im Gc (s)Gp (s) vs. Re Gc (s)Gp (s). This is normally
easy, unless the open-loop TF has poles on the imaginary axis. Then you need to make little
infinitesimal bumps around the poles, in order for the argument principle to hold. These
tiny bumps actually get mapped to big curves, so they matter.
Let N be the number of times the Nyquist contour encircles the point (Re Gc (s)Gp (s),
Im Gc (s)Gp (s)) = (−1, 0) (taking CW encirclements as positive). Let Z be the number of
zeros zi of 1 + Gc (s)Gp (s) with Re zi > 0. These are the closed-loop poles. Let P be the
number of poles pi of Gc (s)Gp (s) with Re pi > 0. Then
Z = N + P.
A stable closed-loop system has no unstable poles, so Z = 0, which gives us the requirement N = −P . For CL stability of a system with P poles of Gc (s)Gp (s) in the right
half-plane, the Nyquist contour must make P net encirclements of -1 in the CCW direction.
So we need to:
53
1. draw the Nyquist path for Gc (s)Gp (s), making sure not to go through any poles
2. draw the transformation, under G(s), of the Nyquist curve
3. count P , the number of unstable open-loop poles
4. count N , the number of encirclements of -1
5. if N 6= −P , the closed-loop system is unstable
54
R(s)
E(s)
Y (s)
U (s)
Gc (s)
Gp (s)
B(s)
H(s)
Figure 16: root locus answers the question “Where do the poles of the closed-loop TF
Gcl (s) = Y (s)/R(s) go as we vary the gain in Gc (s)?”
7
Root locus
So far we’ve looked at three graphical representations of a system’s behavior. For simple,
non-oscillating inputs, we looked at transient response plots (output y(t) vs. t). For oscillating inputs, we looked at Bode and Nyquist plots of the steady-state frequency response
(magnitude scaling factor |G(iω)| vs. ω and phase shift φ(ω) vs. ω). Transient and frequency
response metrics can be applied either to open-loop or closed-loop systems, though it’s customary to look at the Bode and Nyquist plots of open-loop systems, which give indirect
information about the closed-loop system.
In this section, we develop a fourth graphical representation. It’s called the root locus
method. It locates the roots of the characteristic equation of the closed-loop system in Figure
17, as we vary a parameter of the open-loop system (usually the gain in Gc (s)). Because the
roots of the characteristic equation are the poles of the closed-loop system, a root locus plot
can tell us about both transient and frequency response.
A root locus plot is a set of curves, typically parameterized by the open-loop controller
gain K, plotted in the complex plane Im s vs. Re s. Formally, the root locus is the set
LR = {s(K) ∈ C | Gcl (s) → ±∞ for some K ∈ [0, ∞)}
Parameters in Gc (s) or Gp (s) other than K can also be used, but K is the most common
knob to twiddle. Figure 17 shows the root locus plots of a few common systems.
55
Typical Pole–Zero Configurations and Corresponding Root Loci. In summarizing, we show several open-loop pole–zero configurations and their corresponding
root loci in Table 6–1. The pattern of the root loci depends only on the relative separation of the open-loop poles and zeros. If the number of open-loop poles exceeds the
number of finite zeros by three or more, there is a value of the gain K beyond which root
loci enter the right-half s plane, and thus the system can become unstable. A stable system must have all its closed-loop poles in the left-half s plane.
Table 6–1
Open-Loop Pole–Zero Configurations
and the Corresponding Root Loci
jv
jv
jv
s
jv
jv
jv
s
s
jv
s
s
s
jv
s
s
jv
jv
jv
s
s
jv
s
s
Figure 17:Section
root6–2
loci/ for
some Plots
common, low-order systems. As the gain is increased,
the
Root-Locus
289
closed-loop poles move from the open-loop poles (X’s) to the open-loop zeros (O’s). Source:
Ogata, 5th edition.
56
7.1
Root locus by hand
So, how do we locate roots? As with most things in control theory, it’s fast and easy to do
in Matlab. An approximate root locus plot can be constructed by hand, though. It’s a nice
skill to have. It gives a quick intuition for system behavior and the associated challenges in
controller design.
Consider the system in Figure 17. The closed-loop TF is
G(s) =
Gc (s)Gp (s)
1
Y (s)
=
=
1
R(s)
1 + Gc (s)Gp (s)H(s)
H(s) + Gc (s)G
p (s)
The closed-loop poles satisfy
⇐⇒
1
H(s) +
=0
=⇒
H(s)Gc (s)Gp (s) = −1
Gc (s)Gp (s)
(
|H(s)Gc (s)Gp (s)| = 1
(magnitude criterion)
arg H(s)Gc (s)Gp (s) = (2k + 1)π, k ∈ Z
(angle criterion)
The magnitude and angle criteria are necessary and sufficient conditions for locating the
poles of Gcl (s). They motivate the following recipe for constructing the root locus plot.
57
root locus recipe. (rlocus.m)
1. draw open-loop poles and zeros
• OL poles → OL zeros (possibly at ∞) as K → ∞
2. draw real axis components of LR
• K>0
• K<0
=⇒
shade axis to the left of an odd # of poles and zeros
=⇒
shade axis to the left of an even # of poles and zeros
3. draw asymptotes
• find np and nz , the number of finite poles and zeros of H(s)Gc (s)Gp (s)
• number of asymptotes: na = np − nz
2k+1
π,
na
k ∈ {0, . . . , na − 1}
Pnp P
nz
• asymptote center: σa = n1a Re
i=0 pi
j=0 zj −
• asymptote angles: θa =
4. find real axis break-away points
• solve 1 + H(s)Gc (s)Gp (s) = 0 for K(s)
• solve d K(s)
= 0 for sb
ds
s=sb
• any sb ∈ LR ∩ R with K(sb ) > 0 is a break-away point
5. find imaginary axis crossings
(
|H(iω)Gc (iω)Gp (iω)| = 1
• solve
arg H(iω)Gc (iω)Gp (iω) = ±π
for K and ω
• or, apply Routh to find the K for which the system goes unstable
6. connect the dots
• LR is symmetric about real axis
• LR crosses asymptotes only along real axis
• for K 1, one CL pole approaches each asymptote
58
8
Controllability & observability
This section develops the concepts of controllability and observability, which are important in SS analysis and design. We consider the general SS system (4)
ẋ = Ax + Bu
y = Cx + Du
where x ∈ Rn , u ∈ R, y ∈ R, A ∈ Rn×n , B ∈ Rn×1 , C ∈ R1×n , and D ∈ R1×m . Recall that
the TF of system (4) is G(s) = C(sI − A)−1 B + D.
NB. Controllability and observability are properties of a particular SS representation,
not of the underlying ODE. An uncontrollable SS representation of an ODE can often be
made controllable by a similarity transformation.
8.1
Controllability
System (4) is controllable iff it can be driven from any initial state x0 to any final state xf with
finite control inputs in finite time. The necessary and sufficient condition for controllability
is that the controllability matrix Wc be full rank, where
Wc = B AB . . . An−1 B ∈ Rn×n
NB. A square matrix M is full rank iff all its rows (or, equivalently, all its columns) are
linearly independent. This is equivalent to det M 6= 0.
If no pole-zero cancellations occur in G(s), then the system is controllable. If some mode
in the TF is cancelled, however, then that mode is called uncontrollable. A system is
called stabilizable if all its uncontrollable modes are stable and all its unstable modes are
controllable.
controllability recipe. (ctrb.m)
1. compute Wc = B AB . . .
An−1 B
2. Wc full rank =⇒ (A, B) controllable
Let’s find out when our SMD system is controllable. In Section 2.5 we derived the SS
model
0
1
0
A=
, B= 2 , C= 1 0
2
−ωn −2ζωn
ωn
so
0
ωn2
Wc = 2
ωn −2ζωn3
=⇒
det Wc = −ωn4 6= 0
and the system is controllable.
59
8.2
Observability
System (4) is observable iff its initial state x0 can be inferred by observing y(t) for finite time.
The necessary and sufficient condition for observability is that the observability matrix
Wo be full rank, where


C
 CA 


Wo =  ..  ∈ Rn×n
 . 
CAn−1
If no pole-zero cancellations occur in G(s), then the system is observable. We call cancelled
modes unobservable. A system is called detectable if all its unobservable modes are stable
and all its unstable modes are observable.
observability recipe. (obsv.m)
1. compute Wo = C CA . . .
CAn−1
T
2. Wo full rank =⇒ (A, C) observable
For our SMD system,
1 0
Wo =
0 1
=⇒
det Wo = 1 6= 0
so the system is observable.
8.3
Duality
(A, C) is an observable pair iff (AT , C T ) is a controllable pair.
60
Part III
Design
In the design part of these notes we ask, “Given a physical system to control ... ”
• what should I make it do?
– stability
– accuracy
– speed
• what are my control options?
– building blocks
• how do I create one?
– root locus
– frequency response
– state feedback
61
D(s)
R(s)
E(s)
Y (s)
U (s)
Gc (s)
Gp (s)
B(s)
V (s)
N (s)
H(s)
Figure 18: the general SISO feedback control system.
The basic problem
The basic problem we consider is shown in Figure 18. We’re given some plant Gp (s) to
control. Our task is to design the controller Gc (s) so that the output Y (s) of the closedloop system responds in “a good way” to the reference R(s).
The disturbance D(s) is a generic random signal. It can represent modeling errors, like
nonlinearities in the plant dynamics that are unaccounted for in the linear model. It can also
represent a perturbation to the plant-controller dynamics. Examples: if we’re controlling a
car’s speed (cruise control), then a hill is a disturbance. If we’re controlling the bearing of
an airplane, then a sudden gust of wind is a disturbance.
The noise N (s) is another random signal, typically interpreted as sensor noise. The
feedback element H(s) encodes whatever modifications are made to the (possibly noisy)
output Y (s) before it’s subtracted from R(s) to calculate the error E(s). H(s) commonly
represents a unit conversion.
Very often, we consider deterministic systems, D(s) = N (s) = 0. Another common
simplification is to take H(s) = 1. This is called unity feedback.
62
9
Objectives
We’d like the things we’re controlling not to go bonkers or explode. We’d like them to get
where they’re supposed to go, and we’d like them to get there reasonably quickly. Most
control objectives are elaborations on these simple ideas of stability, accuracy and speed.
Time-domain specs such as rise time and overshoot are defined for second-order systems like our SMD example. In practice, these specs are applied haphazardly to all sorts
of higher-order systems. This is justifiable if the higher-order system is dominated by a pair
of complex conjugate poles. This is often the case because – rule of thumb – the “best”
closed-loop system behaves like a second-order system with ζ ∈ (0.3, 0.6).
The parameters ζ, ωn and ωd in the specs that follow can be found from the dominant
closed-loop poles p1 and p2 = p∗1 of a higher-order system (if they exist):
Re pi = −ζωn
Im pi = ±ωd
The damping ratio ζ can also be approximated by reading the phase margin φm off of a Bode
or Nyquist plot, then applying
ζ ≈ φm /100 (φm < 70 degrees)
9.1
Stability
• almost always, absolute stability is required
– Re pi < 0 for all poles pi of G(s) ⇐⇒ Re λi < 0 for all eigenvalues λi of A
• usually, stability margins are required. rules of thumb:
– Km > 6 dB
– π/6 ≤ φm ≤ π/3 ⇐⇒ ζ ∈ (0.3, 0.6)
• often, minimal resonance ⇐⇒ sufficient damping is required
– resonant peak
Mr =
1
1
p
≈
2 sin φ2m
2ζ 1 − ζ 2
– occurs at resonant frequency
ωr = ωn
p
1 − 2ζ 2
∗ no resonant peak for ζ > 0.707
63
9.2
Speed
• often, a fast response to a unit step reference R(s) = 1/s is required
– rise time: t2 − t1 , where y(t1 ) = 0.1 and y(t2 ) = 0.9
tr ≈
1 + 1.1ζ + 1.4ζ 2
ωn
– peak time: y(0) = 0 =⇒ y(tp ) = ymax
tp =
π
ωd
– settling time
(
ts ≈
4
,
ζωn
3
,
ζωn
to within 5% of yss
to within 2% of yss
• often, a bandwidth is specified
– def. the range of driving frequencies,
ω ∈ (0, ωb ), over which a sinusoidal input
√
is amplified by more than 1/ 2 = −3.1 dB
q
p
ωb = ωn 1 − 2ζ 2 + 2 − 4ζ 2 + 4ζ 4
– read ωb off magnitude Bode plot: M (ωb ) = −3 dB
– bigger ωb =⇒ increased sensitivity to low-frequency inputs =⇒ better tracking
– but, bigger ωb =⇒ increased sensitivity to high-frequency noise
• sometimes, a cutoff frequency ωc is specified
qp
ωc = ωn
1 + 4ζ 4 − 2ζ 2
– the frequency above which the magnitude Bode plot dives downward at −40
dB/decade or faster
9.3
Accuracy
• usually, ess = 0 is required for specified references R(s)
– poles of Gc (s)Gp (s) must mimic those of R(s)
∗ step input, R(s) = 1/s =⇒ need at least 1 integrator
∗ sine input, R(s) = ω/(s2 + ω 2 ) =⇒ need ω/(s2 + ω 2 ) term
64
– as a proxy for step, ramp or acceleration tracking, Kp , Kv or Ka may be specified
• bigger bandwidth also improves accuracy
• sometimes, small step-response overshoot is required
Mp =
9.4
ymax − yss
= e−ζωn tp
yss
Trade-offs
There are some unavoidable trade-offs embedded in the above specs.
• stability vs. speed
– bigger ζ =⇒ dominant poles farther left =⇒ bigger Km , smaller Mr
– but also =⇒ smaller ωb , longer tr
• speed vs. accuracy
– smaller ζ =⇒ smaller tr
– but also =⇒ bigger Mp
• speed vs. speed
– smaller ζ =⇒ smaller tr
– but also =⇒ bigger ts
65
p
reach
and stay
within a range about the final
value of sizecommonly
specified by absolute
quency vr , there are
other
frequency-domain
quantities
usedperin performance
centage of the final value (usually 2% or 5%). The settling time is related to the
specifications. They
aretime
theconstant
cutoff
frequency,
bandwidth,
and
the
cutoff
rate. These will
largest
of the
control system.Which
percentage
error
criterion
to use
be determined from the objectives of the system design in question.
be defined in whatmay
follows.
The time-domain specifications just given are quite important, since most control
systems are time-domain systems; that is, they must exhibit acceptable time responses.
Cutoff Frequency
and Bandwidth. Referring to Figure 7–76, the frequency vb at
(This means that, the control system must be modified until the transient response is
satisfactory.)
which the magnitude
of the closed-loop frequency response is 3 dB below its zero-fre-
quency value is called the cutoff frequency. Thus
c(t)
Allowable tolerance
C(jv)
C(j0)
2
2 - 3 dB,
Mp 2 6 2
1
R(jv)
R(j0)
for v 7 0.05
vb
or
0.02
td
For systems in which @ C(j0)!R(j0)@ = 0 dB,
0.5
2
Figure 5–8
Unit-step response
curve showing td , tr ,
tp , Mp , and ts .
0
C(jv)
2 6 -3 dB,
R(jv)
for v 7 vb
t
tr
The closed-loop system filterstp out the signal components whose frequencies are greater
than the cutoff frequency and transmits
those signal components with frequencies lower
ts
than the cutoff frequency.
170
Chapter 5 / Transient and Steady-State Response Analyses
The frequency
range
0!v!v
which specs.
the magnitude
of C(jv)!R(jv)
is greater
Figure
19: second-order
step
Source: Ogata,
5th edition.
b inresponse
than –3 dB is called the bandwidth of the system. The bandwidth indicates the frequency
where the gain starts to fall off from its low-frequency value. Thus, the bandwidth indicates
how well the system will track an input sinusoid. Note that for a given vn , the rise time increases with increasing damping ratio z. On the other hand, the bandwidth decreases with
the increase in z. Therefore, the rise time and the bandwidth are inversely proportional to
each other.
dB
0
–3
Bandwidth
ff
vb
v in log scale
Figure 20: bandwidth. Source: Ogata, 5th edition.
Chapter 7 / Control Systems Analysis and Design by the Frequency-Response Method
66
U (s)
E(s)
Gc (s)
Figure 21: the controller to be designed.
10
Building blocks
This section covers the basic controller building blocks and a few simple ways in which they
can be combined.
Consider the controller TF Gc (s) = U (s)/E(s), shown in Figure 21.
The atomic building blocks are proportional, integral, and derivative control action, along
with the pole-zero pair
s+z
Gc (s) = Kc
s+p
which is called a lag controller (basically PI) if z > p and a lead controller (basically PD) if
p > z.
• proportional, P
⇐⇒
u(t) = Kp e(t)
Gc (s) = Kp
– reduces rise time
– reduces (but doesn’t eliminate) step ess
– like adding a spring
• integral, I
Z
u̇(t) = Ki e(t) =⇒ u(t) = Ki
t
e(τ )dτ
0
⇐⇒
Gc (s) = Ki
1
s
– remembers: acts based on accumulated error
– eliminates step ess
67
– but decreases ζ =⇒ pulls LR right =⇒ more oscillations, longer ts , smaller
stability margins
• derivative, D
⇐⇒
u(t) = Kd ẏ(t)
Gc (s) = Kd s
– anticipates: acts based on the rate of change of the error
– increases ζ =⇒ pulls LR left =⇒ increases Km , reduces Mr
– like adding damping
• PI
Z
t
e(τ )dτ
u(t) = Kp e(t) + Ki
0
Ki
⇐⇒
s + 1
Kp
Gc (s) = Kp + Ki = Kp
s
s
⇐⇒
u(t) = Kp e(t) + Kd ė(t)
Kp Gc (s) = Kp + Kd s = Kd s +
Kd
• PD
• PID
Z
t
u(t) = Kp e(t) + Ki
e(τ )dτ + Kd ė(t)
0
⇐⇒
s2 + K p s +
1
Kd
Gc (s) = Kp + Ki + Kd s = Kd
s
s
Ki
Kd
– tunable for most purposes
– most commonly used industrial controller
• lead
Gc (s) = Kc
α=
s+z
s+p
z
<1
p
– almost always, p > z > 0
– “zero leads pole in a race to the origin”
68
– injects phase, increases φm
– improves transient response
– but adds sensitivity to high-frequency noise
– anticipates: approaches PD for p z
• lag
s+z
s+p
z
β= >1
p
Gc (s) = Kc
– almost always, z > p > 0
– “zero lags pole in a race to the origin”
– improves accuracy
– but decreases speed
– suppresses high-frequency noise
– remembers: approaches PI as p → 0
• lag-lead
Gc (s) = Kc
s + z s + z 1
2
s + p1 s + p2
z1
< 1 (lead)
p1
z2
β=
> 1 (lag)
p2
α=
– typically choose α = 1/β
– almost always, p1 > z1 z2 > p2 > 0
– balances effects of lag and lead
∗ improves both speed and accuracy
∗ decreases sensitivity to high-frequency noise
– but complicates transient response (and the design process)
69
11
Design process
When given a plant Gp (s) to control, a common design process looks like this.
• fire up Matlab
• start with proportional feedback control, Gc (s) = Kc , see what challenges Gp (s)
presents
– root locus is a good place to start for a quick, rough idea
– Bode plot also gives good rough information:
∗ low gain at low frequencies =⇒ poor accuracy
∗ slope at gain crossover frequency 6= -20 dB/decade =⇒ poor relative stability
∗ high gain at high frequencies =⇒ poor noise rejection
• choose the form of Gc (s) to match the challenges
– slow or unstable? try lead
∗ focus on injecting phase near ωk to improve φm
– inaccurate? noisy measurements? try lag
∗ focus on moving the Bode magnitude crossover frequency ωk left
– if either lead or lag will work, ask whether you care more about speed or noise
rejection
– slow and inaccurate? try lag-lead
• choose design approach
– low-order system? try root locus or frequency response
∗ more iterative, qualitative design process
∗ typically results in simpler/cheaper controllers
– high-order system? try state feedback
∗ more systematic design process
∗ typically results in more complex/expensive controllers
– only one of root locus or frequency response is needed
∗ they provide complementary information, though
∗ typically look at both plots in Matlab’s SISO tool GUI
– frequency response complements state feedback
∗ no robustness information built into state feedback design
∗ Km and φm easily quantified with frequency response
70
• using chosen approach, resolve Gc (s) parameters (pole/zero locations, gain)
• test performance of closed-loop system
– specs met?
– step response?
– frequency response?
71
12
Root locus
The root locus method is a bit like playing chess. You’re given a plant with some poles and
zeros, which are like your opponent’s pieces on the board. You draw the pole-zero plot, then
ponder your moves (control options).
Will simple proportional control do the trick?
• plot the root locus for Gcl (s) with Gc (s) = K
• check specs (stability, speed, accuracy)
If not, then it’s time for dynamic compensation (inserting some poles or zeros into Gc (s)).
• start with building block
Gc (s) = K
s+z
s+p
• need to increase stability?
– use lead (PD)
– p > z =⇒ pulls σa left by (p − z)/na
• need to increase accuracy?
– use lag (PI)
– z > p =⇒ pulls σa right by (z − p)/na
• check specs
If a single pole-zero block doesn’t get the job done, try combining two blocks.
• lead-lead: add even more stability
• lag-lag: add even more accuracy
• lead-lag: try to strike a balance
Alternative: if the specs are well-defined then you can choose a pair of dominant closedloop poles p1 and p2 = p∗1 that satisfy them. This reduces the design task to choosing the
parameters that place the poles where you want them. This typically amounts to solving
a system of algebraic equations, comprised of the characteristic equation and constraint
equations (specs).
This process is called pole placement. Arbitrary pole placement is possible iff the
system is controllable.
• choose dominant CL pole locations, which determines ζ and ωn
72
• find characteristic polynomial χ(s) from 1 + Gc (s)Gp (s) = 0
• write desired quadratic term, s2 + 2ζωn s + ωn2 s = (s + p1 )(s + p2 )
• write χ(s) = q(s)(s2 + 2ζωn s + ωn2 ), for a polynomial q(s) of appropriate degree
• compare terms, solve for variables in q(s)
root locus pros:
• easy for low-order systems
• easy to see time response specs on RL plot
• easy to identify the dominant poles =⇒ approximate system behavior
• good approach for fast/rough design
root locus cons:
• requires a TF model (poles and zeros)
• very time consuming for high-order systems
• hard to see frequency response specs in RL plot
• hard to see robustness margins in RL plot
73
13
Frequency response
Frequency response controller design mostly uses Bode plots, because logarithmic plots make
it easy to see the impact of multiplicative factors in Gc (s): you just add them to the Bode
plots of Gp (s). Nyquist plots, on the other hand, have to be redrawn from scratch for each
modification of Gc (s).
The basic rule of Bode design is to make the magnitude plot cross the ω-axis with slope
-20 dB/decade. The process boils down to striking a balance between accuracy and stability.
lead design recipe. (sisotool.m)
1. assuming Gc (s) = K, find K that satisfies accuracy spec (like Kv or Ka )
2. sketch Bode plots of KGp (s)
3. determine φlead , the phase to inject
p
◦
φlead = φspec
m − φm + ∼ 10
4. determine z and p
• recall
• solve
α=
z
∈ (0, 1)
p
sin(φlead ) =
α−1
α+1
for α
• read ωlead off of magnitude Bode plot
1
M (ωlead ) = −20 log √
α
• solve
z
ωlead = √
α
and
α=
z
p
for z and p
5. write
Gc (s) = Kc
s+z
s+p
where Kc = K/α
6. test closed-loop performance
74
lag design recipe. (sisotool.m)
1. assuming Gc (s) = K, find K that satisfies accuracy spec (like Kv or Ka )
2. sketch Bode plots of KGp (s)
3. choose ωk , the gain cross-over frequency for the compensated system, from
◦
φp (ωk ) = −π + φspec
m + ∼ 10
4. choose z ≈ ωk /10
• a little bigger is okay, but z too big =⇒ φm suffers
5. using
Kc =
K
β
=⇒
20 log Kc = 20 log K − 20 log β
choose β s.t. M (ωk ) = 0
6. find p = z/β and write
Gc (s) = Kc
s+z
s+p
7. test closed-loop performance
75
14
State feedback
State feedback is a modern method for controller design. It operates in the time domain and
uses linear algebra to directly place the closed-loop poles at desired locations. An advantage
of state feedback is that the design process is more systematic than classical methods, and
therefore more easily automated and more readily extended to high-order SISO systems and
to MIMO systems.
Classical methods complement state feedback in that they produce simpler, lower-order
(and therefore cheaper) controllers – typically 1st or 2nd order, if lead, lag or lead-lag is used.
Frequency response methods also give important information about robustness (Km and φm )
that state feedback design leaves out. Classical methods can also suggest good locations in
which to place the desired closed-loop poles.
State feedback starts with a SS model of the plant. We almost always ignore any
feedthrough from u to y, meaning we set D = 0, so the basic SS model is
ẋ = Ax + Bu
y = Cx
We call these methods state feedback because they employ a control law that depends on
all the internal state variables:
u = −Kx
These notes cover SISO control, meaning that only one output is measured. However, in the
control law u = −Kx we assume that all the internal states are accessible. To overcome this
disconnect, we use a state observer (or just observer), which is a facsimile of the plant, to
estimate the unknown states. Since our facsimile is an imperfect imitation of the true plant
dynamics, we use feedback to drive the error between the two to zero.
Organization of this section: first, we assume perfect state information (almost always
an unrealistic assumption) and show when and how we can place the closed-loop poles at
any desired location. Then we consider the more realistic case of incomplete observations,
which leads to observer-based controller design.
14.1
Full state information
Assume for now that we have access to the full state x. How to design a controller u = −Kx
that places the closed-loop poles where we want them?
With the controller Gc (s) in the feedforward loop, the closed-loop dynamics are
ẋ = (A − BK)x
so the closed-loop poles are the eigenvalues of A − BK. To place the poles at the desired
locations, then, we need to choose the matrix K such that the eigenvalues of A − BK land
76
where we want them. It turns out that arbitrary pole placement is possible iff the (A, B) is
a controllable pair.
pole placement recipe. (place.m or acker.m)
1. check controllability of (A, B)
2. choose closed-loop poles p1 , . . . , pn
3. expand the desired characteristic equation,
n
Y
Xd (s) =
(s − pi )
i=1
4. write K = k1 , . . . , kn and expand the actual characteristic equation
Xa (s) = det(sI − A + BK)
5. solve for K
• write Xd (s) = Xa (s)
• equate coefficients of like powers of s
• solve the n resulting equations for k1 , . . . , kn
NB. The above recipe is impractical for n > 3. For higher-order systems, pole placement
can be done by similarity transformation (place.m), which just involves putting the system
in controllable canonical form. It can also be done using Ackerman’s formula (acker.m),
which is based on the Cayley-Hamilton theorem (fact: a matrix solves its own characteristic
polynomial) and gives a direct expression for K in terms of A, B, and the minimal polynomial
φ(A).
14.1.1
Pole locations
An important question in the pole placement recipe is, “Where should I put the closedloop poles?” The answer will completely determine the closed-loop system’s performance.
Finding good pole locations boils down to balancing transient response speed vs. sensitivity
to disturbances and noise.
Here are two ways to choose pole locations.
1. use intuition built on classical methods
2. use the optimal LQ locations
77
Answer 2 is beyond the scope of these notes, since it’s an optimal control method, but
it’s easily done in Matlab with lqr.m. The punchline: if the system’s controllable, then
minimizing a quadratic cost on control effort is guaranteed to produce a stable closed-loop
system.
For lower-order systems, answer 1 usually gets the job done. The basic idea is to choose
a pair of dominant closed-loop poles with ζ ∈ (0.3, 0.6) and the other poles “pretty far left”
of the imaginary axis.
Whatever method is used, it’s important to check the transient and frequency response
of the closed-loop system once design is done. We typically try a few different pole locations,
then pick the one with the “best” performance (tr , ts , ess , Km , φm , ωb , . . . ).
14.2
Limited state information
In reality we seldom have access to all the internal states of a system. If we want to base
our control law on the full state, then we have to estimate1 x. This is the purpose of a state
observer.
A state observer is basically a copy of our mathematical model of the plant Gp (s). Since
the plant model is imperfect, and since we may not know the initial state of the system, we
use feedback to drive the error between the measured output y and the estimated output ỹ
to zero.
Let x̃ be our estimate of the true state x, and let the observer error be eo = x − x̃. Then
our output estimate is ỹ = Cx̃. The observer SS model is therefore
x̃˙ = Ax̃ + Bu + Ke (y − ỹ)
= (A − Ke C)x̃ + Bu + Ke y
The observer design task is to choose the matrix Ke so that the error convergence is sufficiently fast, without adversely effecting the performance of the closed-loop system with the
observer-based controller in the loop.
How to design Ke ? Consider the error dynamics
ėo = ẋ − x̃˙
= Ax + Bu − (A − Ke C)x̃ + Bu + Ke y
= Ax − (A − Ke C)x̃ − Ke y
= (A − Ke C)x − (A − Ke C)x̃
= (A − Ke C)eo
If A − Ke C is stable, then eo → 0 as t → ∞. For x̃ to converge quickly to x, we should
place the eigenvalues of A − Ke C “far enough” left of the imaginary axis to make the error
dynamics fast.
1
“State estimation” means different things in different contexts. In these notes, it means using an observer
to estimate unknown but deterministic state variables. In stochastic control, on the other hand, it means
estimating stochastic state variables.
78
That’s half the answer. For the other half, we need to know how the observer changes the
dynamics of the closed-loop system. Under the control law u = −Kx̃, the state dynamics
are
ẋ = Ax + Bu
= Ax − BKx̃
= Ax − BK(x − eo )
= (A − BK)x + BKeo
Combining the state and observer dynamics, the closed-loop dynamics are
ẋ
A − BK
BK
x
=
ėo
0
A − Ke C eo
The closed-loop poles are the eigenvalues of A − BK, which we’ll refer to as the controller
poles, along with the eigenvalues of A − Ke C, which we’ll call the observer poles.
The TF Gc (s) of the observer-based controller is
Gc (s) =
U (s)
= K(sI − A + BK + Ke C)−1 Ke
E(s)
If the observer poles are chosen too far left of the imaginary axis, then Gc (s) may be unstable.
Even if Gc (s) is stable, very fast observer poles can lead to large ωb and, therefore, heightened
sensitivity to high-frequency noise.
If the observer poles are chosen too close to the imaginary axis, however, then they’ll
play a significant role in determining the performance of the closed-loop system. This is bad,
since the design process often hinges upon choosing a set of dominant controller poles.
Rule of thumb: choose the observer poles 2-5 times faster (further left of the imaginary
axis) than the controller poles. Just like controller pole placement, the typical process is to
pick a few sets of observer poles, design a few candidate observers, test the performance of
the resulting closed-loop systems, and go with the best one.
observer design recipe. (place.m or acker.m)
1. check observability of (A, C)
2. choose observer poles q1 , . . . , qn
3. following pole placement recipe, place eigenvalues λ1 , . . . , λn of A − Ke C at q1 , . . . , qn
NB. Like pole placement, observer design for systems of order n > 3 is best done via
similarity transformation (place.m) or Ackerman’s formula (acker.m).
79
14.2.1
Observer-based control
observer-based controller design recipe.
1. derive SS model of plant
2. check controllability of (A, B) and observability of (A, C)
3. choose controller poles p1 , . . . , pn and observer poles q1 , . . . , qn
4. determine K and Ke
• place eigenvalues of A − BK at p1 , . . . , pn
• place eigenvalues of A − Ke C at q1 , . . . , qn
5. test performance of closed-loop system
NB. Nowhere in this recipe does there appear any information about robustness. It’s a
good idea in step 5 to test the closed-loop system’s frequency response. A Bode or Nyquist
plot will clearly show the stability margins. If Km or φm is too small, then a different set of
controller and/or observer poles need to be chosen.
80