Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
16 views

Control Notes

This document provides notes on state space models adapted from an MIT course. It begins by defining state space models and using the example of a mass-spring system to illustrate converting a second order system to first order. It then defines the general state space model and key concepts like linearity, time-invariance, and states. The document continues by explaining how to create state space models and define equilibrium points for linearization of nonlinear systems.

Uploaded by

tilahuntenaye4
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views

Control Notes

This document provides notes on state space models adapted from an MIT course. It begins by defining state space models and using the example of a mass-spring system to illustrate converting a second order system to first order. It then defines the general state space model and key concepts like linearity, time-invariance, and states. The document continues by explaining how to create state space models and define equilibrium points for linearization of nonlinear systems.

Uploaded by

tilahuntenaye4
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 47

2/14/2019 Title Page - Google Docs

Notes adapted from MIT


OpenCourseware
“Aeronautics and Astronautics:
Feedback Control Systems”
Fall 2010 lecture series

https://docs.google.com/document/d/1MF801M78D8tGq5r0PPp8SeLkfPJemhx0khpWyY1qMIU/edit 1/1
Fall 2010 16.30/31 5–2

SS Introduction

• State space model: a representation of the dynamics of an N th order


system as a first order differential equation in an N -vector, which is
called the state.
• Convert the N th order differential equation that governs the dy­
namics into N first-order differential equations

• Classic example: second order mass-spring system


mp̈ + cṗ + kp = F
• Let x1 = p, then x2 = ṗ = ẋ1, and
ẋ2 = p̈ = (F − cṗ − kp)/m
= (F − cx2 − kx1)/m
� � � �� � � �
ṗ 0 1 p 0
⇒ = + u
p̈ −k/m −c/m ṗ 1/m
• Let u = F and introduce the state
� � � �
x1 p
x= = ⇒ ẋ = Ax + Bu
x2 ṗ
• If the measured output of the system is the position, then we have
that
� � � �
� � p � � x1
y=p= 1 0 = 1 0 = Cx
ṗ x2

September 21, 2010


Fall 2010 16.30/31 5–3

• Most general continuous-time linear dynamical system has form


ẋ(t) = A(t)x(t) + B(t)u(t)
y(t) = C(t)x(t) + D(t)u(t)
where:
• t ∈ R denotes time
• x(t) ∈ Rn is the state (vector)
• u(t) ∈ Rm is the input or control
• y(t) ∈ Rp is the output

• A(t) ∈ Rn×n is the dynamics matrix


• B(t) ∈ Rn×m is the input matrix
• C(t) ∈ Rp×n is the output or sensor matrix
• D(t) ∈ Rp×m is the feedthrough matrix

• Note that the plant dynamics can be time-varying.


• Also note that this is a multi-input / multi-output (MIMO) system.

• We will typically deal with the time-invariant case


⇒ Linear Time-Invariant (LTI) state dynamics
ẋ(t) = Ax(t) + Bu(t)
y(t) = Cx(t) + Du(t)
so that now A, B, C, D are constant and do not depend on t.

September 21, 2010


Fall 2010 16.30/31 5–4

Basic Definitions

• Linearity – What is a linear dynamical system? A system G is linear


with respect to its inputs and output
u(t) → G(s) → y(t)
iff superposition holds:
G(α1u1 + α2u2) = α1Gu1 + α2Gu2
So if y1 is the response of G to u1 (y1 = Gu1), and y2 is the
response of G to u2 (y2 = Gu2), then the response to α1u1 + α2u2
is α1y1 + α2y2

• A system is said to be time-invariant if the relationship between the


input and output is independent of time. So if the response to u(t)
is y(t), then the response to u(t − t0) is y(t − t0)

• Example: the system


ẋ(t) = 3x(t) + u(t)
y(t) = x(t)
is LTI, but
ẋ(t) = 3t x(t) + u(t)
y(t) = x(t)
is not.
• A matrix of second system is a function of absolute time, so re­
sponse to u(t) will differ from response to u(t − 1).

September 21, 2010


Fall 2010 16.30/31 5–5

• x(t) is called the state of the system at t because:


• Future output depends only on current state and future input
• Future output depends on past input only through current state
• State summarizes effect of past inputs on future output – like the
memory of the system

• Example: Rechargeable flashlight – the state is the current state of


charge of the battery. If you know that state, then you do not need
to know how that level of charge was achieved (assuming a perfect
battery) to predict the future performance of the flashlight.
• But to consider all nonlinear effects, you might also need to know
how many cycles the battery has gone through
• Key point is that you might expect a given linear model to ac­
curately model the charge depletion behavior for a given number
of cycles, but that model would typically change with the number
cycles

September 21, 2010


Fall 2010 16.30/31 5–6

Creating State-Space Models

• Most easily created from N th order differential equations that describe


the dynamics
• This was the case done before.
• Only issue is which set of states to use – there are many choices.

• Can be developed from transfer function model as well.


• Much more on this later

• Problem is that we have restricted ourselves here to linear state space


models, and almost all systems are nonlinear in real-life.
• Can develop linear models from nonlinear system dynamics

September 21, 2010


Fall 2010 16.30/31 5–7

Equilibrium Points

• Often have a nonlinear set of dynamics given by


ẋ = f (x, u)
where x is once gain the state vector, u is the vector of inputs, and
f (·, ·) is a nonlinear vector function that describes the dynamics
• First step is to define the point about which the linearization will be
performed.
• Typically about equilibrium points – a point for which if the
system starts there it will remain there for all future time.

• Characterized by setting the state derivative to zero:


ẋ = f (x, u) = 0
• Result is an algebraic set of equations that must be solved for both
xe and ue
• Note that ẋe = 0 and u̇e = 0 by definition
• Typically think of these nominal conditions xe, ue as “set points”
or “operating points” for the nonlinear system.

• Example – pendulum dynamics: θ¨ + rθ̇ + gl sin θ = 0 can be written


in state space form as
� � � �
ẋ1 x2
=
ẋ2 −rx2 − gl sin x1
• Setting f (x, u) = 0 yields x2 = 0 and x2 = − rlg sin x1, which
implies that x1 = θ = {0, π}

September 21, 2010


Fall 2010 16.30/31 5–8

Linearization
• Typically assume that the system is operating about some nominal
state solution xe (possibly requires a nominal input ue)
• Then write the actual state as x(t) = xe + δx(t)
and the actual inputs as u(t) = ue + δu(t)
• The “δ” is included to denote the fact that we expect the variations
about the nominal to be “small”

• Can then develop the linearized equations by using the Taylor series
expansion of f (·, ·) about xe and ue.

• Recall the vector equation ẋ = f (x, u), each equation of which


ẋi = fi(x, u)
can be expanded as
d
(xei + δxi) = fi(xe + δx, ue + δu)
dt � �
∂fi �� ∂fi ��
≈ fi(xe, ue) + δx + δu
∂x �0 ∂u �0
where � �
∂fi ∂fi ∂fi
= ···
∂x ∂x1 ∂xn
and ·|0 means that we should evaluate the function at the nominal
values of xe and ue.

• The meaning of “small” deviations now clear – the variations in δx


and δu must be small enough that we can ignore the higher order
terms in the Taylor expansion of f (x, u).

September 21, 2010


Fall 2010 16.30/31 5–9

d
• Since dt xe i = fi(xe, ue), we thus have that
� �
d ∂fi �� ∂fi ��
(δxi) ≈ δx + δu
dt ∂x �0 ∂u �0

• Combining for all n state equations, gives (note that we also set “≈”
→ “=”) that
⎡ � ⎤ ⎡ � ⎤
∂f1 �
� ∂f1 ��
⎢ ∂x � ⎥ ⎢ ∂u � ⎥
⎢ 0
� ⎥ ⎥ ⎢ �0 ⎥
⎢ ∂f2 �� ⎥ ⎢ ∂f2 �� ⎥
⎢ ⎢ ⎥
d ⎢
⎢ ∂x �0 ⎥
⎥ ⎢
⎢ ∂u �0 ⎥

δx = ⎢ ⎥ δx + ⎢ ⎥ δu
dt ⎢ ... ⎥ ⎢ ... ⎥
⎢ ⎥ ⎢ ⎥
⎢ ⎥ ⎢ ⎥
⎢ � ⎥ ⎢ � ⎥
⎣ ∂fn � ⎦ ⎣ ∂fn � ⎦
� �
∂x 0� ∂u �0

= A(t)δx + B(t)δu
where
⎡ ∂f1 ∂f1 ∂f1
⎤ ⎡ ∂f1 ∂f1 ∂f1

∂x1 ∂x2 ··· ∂xn ∂u1 ∂u2 ··· ∂um
⎢ ⎥ ⎢ ⎥
⎢ ∂f2 ∂f2 ∂f2 ⎥ ⎢ ∂f2 ∂f2 ∂f2 ⎥

∂x1 ∂x2 ··· ∂xn
⎥ ⎢
∂u1 ∂u2 ··· ∂um

A(t) ≡ ⎢


⎥ and B(t) ≡ ⎢



⎢ ... ⎥ ⎢ ... ⎥
⎣ ⎦ ⎣ ⎦
∂fn ∂fn ∂fn ∂fn ∂fn ∂fn
∂x1 ∂x2 ··· ∂xn ∂u1 ∂u2 ··· ∂um
0 0

September 21, 2010


Fall 2010 16.30/31 5–10

• Similarly, if the nonlinear measurement equation is y = g(x, u) and


y(t) = ye + δy, then
⎡ � ⎤ ⎡ � ⎤
∂g1 �
� ∂g1 ��
⎢ ∂x � ⎥ ⎢ ∂u � ⎥
⎢ . 0⎥ ⎢ . 0⎥
.
δy = ⎢ . � ⎥ δx + ⎢ . ⎥
⎢ . � ⎥ δu
⎢ ⎥
⎣ ∂gp � ⎦ ⎣ ∂gp � ⎦
� �
∂x 0
� ∂u �0
= C(t)δx + D(t)δu

• Typically drop the “δ” as they are rather cumbersome, and (abusing
notation) we write the state equations as:
ẋ(t) = A(t)x(t) + B(t)u(t)
y(t) = C(t)x(t) + D(t)u(t)
which is of the same form as the previous linear models

• If the system is operating around just one set point then the partial
fractions in the expressions for A–D are all constant → LTI lin­
earized model.

September 21, 2010


Fall 2010 16.30/31 5–13

Linearization Example

• Example: simple spring. With a mass at the end of a linear spring


(rate k) we have the dynamics
mẍ = −kx
but with a “leaf spring” as is used on car suspensions, we have a
nonlinear spring – the more it deflects, the stiffer it gets. Good model
now is
mẍ = −k1x − k2x3
which is a “cubic spring”.

Fig. 1: Leaf spring from http://en.wikipedia.org/wiki/Image:Leafs1.jpg

• Restoring force depends on deflection x in a nonlinear way.

Fig. 2: Response to linear k = 1 and nonlinear (k1 = k, k2 = −2) springs (code at


the end)

September 21, 2010


Fall 2010 16.30/31 5–14

• Consider the nonlinear spring with (set m = 1)


ÿ = −k1y − k2y 3
gives us the nonlinear model (x1 = y and x2 = ẏ)
� � � �
d y ẏ
= ⇒ ẋ = f (x)
dt ẏ −k1y − k2y 3

• Find the equilibrium points and then make a state space model

• For the equilibrium points, we must solve


� �

f (x) = =0
−k1y − k2y 3
which gives
ẏe = 0 and k1ye + k2(ye)3 = 0

• Second condition corresponds to ye = 0 or ye = ± −k1/k2,
which is only real if k1 and k2 are opposite signs.

• For the state space model,


∂f1 ∂f1
⎡ ⎤
⎡ ⎤
⎢ ∂x1 ∂x2 ⎥ 0 1
A=⎢ ⎣ ∂f2 ∂f2 ⎦ =
⎥ ⎣ ⎦
−k1 − 3k2(y)2 0 0
∂x1 ∂x2 0 ⎡ ⎤
0 1
= ⎣ ⎦
−k1 − 3k2(ye)2 0
and the linearized model is δ˙x = Aδx
September 21, 2010
Fall 2010 16.30/31 5–15

• For the equilibrium point ye = 0, ẏe = 0


⎡ ⎤
0 1
A0 = ⎣ ⎦
−k1 0
which are the standard dynamics of a system with just a linear spring
of stiffness k1
• Stable motion about y = 0 if k1 > 0

• Assume that k1 = −1,√k2 = 1/2, then we should get an equilibrium


point at ẏ = 0, y = ± 2, and since k1 + k2(ye)2 = 0 then
⎡ ⎤
0 1
A1 = ⎣ ⎦
−2 0
which are the dynamics of a stable oscillator about the equilibrium
point

Fig. 3: Nonlinear response (k1 = −1, k2 = 0.5). The figure on the right shows the
oscillation about the equilibrium point.

September 21, 2010


Fall 2010 16.30/31 7–1

Time Response

• Can develop a lot of insight into the system response and how it is
modeled by computing the time response x(t)
• Homogeneous part
• Forced solution

• Homogeneous Part
ẋ = Ax, x(0) known
• Take Laplace transform
X(s) = (sI − A)−1x(0)
so that
−1 −1
� �
x(t) = L (sI − A) x(0)
• But can show
−1 I A A2
(sI − A) = + 2 + 3 + ...
s s s
1
so L−1 (sI − A)−1 = I + At + (At)2 + . . .
� �
2!
At
= e

⇒ x(t) = eAtx(0)

• eAt is a special matrix that we will use many times in this course
• Transition matrix or Matrix Exponential
1
• Calculate in MATLAB using expm.m and not exp.m
• Note that e(A+B)t = eAteBt iff AB = BA

1 MATLAB is a trademark of the Mathworks Inc.

September 23, 2010


Fall 2010 16.30/31 7–3

SS: Forced Solution

• Forced Solution
• Consider a scalar case:
ẋ = ax + bu, x(0) given
� t
⇒ x(t) = eatx(0) + ea(t−τ )bu(τ )dτ
0
where did this come from?
1. ẋ − ax = bu

2. e−at [ẋ − ax] = d −at


dt (e x(t)) = e−atbu(t)
�t d −aτ
�t
3. 0 dτ e x(τ )dτ = e−atx(t) − x(0) = 0 e−aτ bu(τ )dτ

• Forced Solution – Matrix case:


ẋ = Ax + Bu
where x is an n-vector and u is a m-vector

• Just follow the same steps as above to get


� t
x(t) = eAtx(0) + eA(t−τ )Bu(τ )dτ
0
and if y = Cx + Du, then
� t
At
y(t) = Ce x(0) + CeA(t−τ )Bu(τ )dτ + Du(t)
0

• CeAtx(0) is the initial response


• CeA(t)B is the impulse response of the system.

September 23, 2010


Fall 2010 16.30/31 7–4

• Have seen the key role of eAt in the solution for x(t)
• Determines the system time response
• But would like to get more insight!
• Consider what happens if the matrix A is diagonalizable, i.e. there
exists a T such that
⎡ ⎤
λ1
T −1AT = Λ which is diagonal Λ = ⎣ ... ⎦
λn
Then
eAt = T eΛtT −1
where
eλ1t
⎡ ⎤

eΛt = ⎣ ... ⎦
e λn t

• Follows since eAt = I + At + 2!1 (At)2 + . . . and that A = T ΛT −1, so


we can show that
1
eAt = I + At + (At)2 + . . .
2!
1
= I + T ΛT −1t + (T ΛT −1t)2 + . . .
2!
Λt −1
= Te T

• This is a simpler way to get the matrix exponential, but how find T
and λ?
• Eigenvalues and Eigenvectors

September 23, 2010


Fall 2010 16.30/31 7–8

Dynamic Interpretation

• Since A = T ΛT −1, then


⎤⎡ λ t
− w1T −
⎡ ⎤⎡ ⎤
| | e1
eAt = T eΛtT −1 = ⎣ v1 · · · vn ⎦ ⎣ ... ⎦⎣ ... ⎦
| | eλnt − wnT −
where we have written
− w1T −
⎡ ⎤

T −1 =⎣ ... ⎦
− wnT −
which is a column of rows.
• Multiply this expression out and we get that
n

eAt = eλitviwiT
i=1

• Assume A diagonalizable, then ẋ = Ax, x(0) given, has solution


x(t) = eAtx(0) = T eΛtT −1x(0)
�n
= eλitvi{wiT x(0)}
i=1
�n
= eλitviβi
i=1

• State solution is linear combination of the system modes vieλit

eλit – Determines nature of the time response


vi – Determines how each state contributes to that mode
βi – Determines extent to which initial condition excites the mode

September 23, 2010


Fall 2010 16.30/31 7–9

• Note that the vi give the relative sizing of the response of each part
of the state vector to the response.
� �
1 −t
v1(t) = e mode 1
0
� �
0.5 −3t
v2(t) = e mode 2
0.5
• Clearly eλit gives the time modulation
• λi real – growing/decaying exponential response
• λi complex – growing/decaying exponential damped sinusoidal

• Bottom line: The locations of the eigenvalues determine the pole


locations for the system, thus:
• They determine the stability and/or performance & transient be­
havior of the system.

• It is their locations that we will want to modify when we start the


control work

September 23, 2010


Fall 2010 16.30/31 7–7

EV Mechanics
� �
−1 1
• Consider A =
−8 5
� �
s+1 −1
(sI − A) =
8 s−5
det(sI − A) = (s + 1)(s − 5) + 8 = s2 − 4s + 3 = 0
so the eigenvalues are s1 = 1 and s2 = 3
• Eigenvectors (sI − A)v = 0
� �
−1
� �
s+1 v11
(s1I − A)v1 = =0
8 s−5 v21
s=1
� ��
2 −1

v11
=0 2v11 − v21 = 0, ⇒ v21 = 2v11
8 −4 v21
� 0), so set v11 = 1
v11 is then arbitrary (=
� �
1
v1 =
2

� ��
4 −1

v12
(s2I−A)v2 = =0 4v12−v22 = 0, ⇒ v22 = 4v12
8 −2 v22
� �
1
v2 =
4
• Confirm that Avi = λivi

September 23, 2010


Fall 2010 16.30/31 5–11

Stability of LTI Systems

• Consider a solution xs(t) to a differential equation for a given initial


condition xs(t0).
• Solution is stable if other solutions xb(t0) that start near xs(t0)
stay close to xs(t) ∀ t ⇒ stable in sense of Lyapunov (SSL).
• If other solutions are SSL, but the xb(t) do not converge to xs(t)
⇒ solution is neutrally stable.
• If other solutions are SSL and xb(t) → x(t) as t → ∞ ⇒ solution
is asymptotically stable.
• A solution xs(t) is unstable if it is not stable.

• Note that a linear (autonomous) system ẋ = Ax has an equilibrium


point at xe = 0
• This equilibrium point is stable if and only if all of the eigenvalues
of A satisfy Rλi(A) ≤ 0 and every eigenvalue with Rλi(A) = 0
has a Jordan block of order one.1
• Thus the stability test for a linear system is the familiar one of
determining if Rλi(A) ≤ 0

• Somewhat surprisingly perhaps, we can also infer stability of the orig­


inal nonlinear from the analysis of the linearized system model

1 more on Jordan blocks on 6–??, but this basically means that these eigenvalues are not repeated.

September 21, 2010


Fall 2010 16.30/31 5–12

• Lyapunov’s indirect method2 Let xe = 0 be an equilibrium point


for the nonlinear autonomous system
ẋ(t) = f (x(t))
where f is continuously differentiable in a neighborhood of xe. As­
sume �
∂f ��
A=
∂x �xe
Then:
• The origin is an asymptotically stable equilibrium point for the
nonlinear system if Rλi(A) < 0 ∀ i
• The origin is unstable if Rλi(A) > 0 for any i

• Note that this doesn’t say anything about the stability of the nonlinear
system if the linear system is neutrally stable.

• A very powerful result that is the basis of all linear control theory.

2 Much more on Lyapunov methods later too.

September 21, 2010


Fall 2010 16.30/31 9–2

State-Space Model Features

• There are some key characteristics of a state-space model that we


need to identify.
• Will see that these are very closely associated with the concepts
of pole/zero cancelation in transfer functions.

• Example: Consider a simple system


6
G(s) =
s+2
for which we develop the state-space model
Model # 1 ẋ = −2x + 2u
y = 3x

¯ = [x x2]T
• But now consider the new state space model x
� �
−2 0
� �
2
Model # 2 x̄˙ = ¯+
x u
0 −1 1
� �
y = 3 0 x̄
which is clearly different than the first model, and larger.

• But let’s looks at the transfer function of the new model:


Ḡ(s) = C(sI − A)−1B + D
� � ��−1 � �
� � −2 0 2
= 3 0 sI −
0 −1 1
� 2 �
� � s+2 6
= 3 0 1
= !!
s+2
s+1

September 30, 2010


Fall 2010 16.30/31 9–3

• This is a bit strange, because previously our figure of merit when


comparing one state-space model to another (page 6–??) was whether
they reproduced the same same transfer function
• Now we have two very different models that result in the same
transfer function
• Note that I showed the second model as having 1 extra state, but
I could easily have done it with 99 extra states!!

• So what is going on?


• A clue is that the dynamics associated with the second state of
the model x2 were eliminated when we formed the product
� 2 �
� � s+2
Ḡ(s) = 3 0 1
s+1
because the A is decoupled and there is a zero in the C matrix
• Which is exactly the same as saying that there is a pole-zero
cancelation in the transfer function G̃(s)
6 6(s + 1)
= � G̃(s)
s + 2 (s + 2)(s + 1)
• Note that model #2 is one possible state-space model of G̃(s)
(has 2 poles)

• For this system we say that the dynamics associated with the second
state are unobservable using this sensor (defines C matrix).
• There could be a lot “motion” associated with x2, but we would
be unaware of it using this sensor.

September 30, 2010


Fall 2010 16.30/31 9–4

• There is an analogous problem on the input side as well. Consider:


Model # 1 ẋ = −2x + 2u
y = 3x
¯ = [ x x 2 ]T
with x
� �
−2
� �
0 2
Model # 3 ¯˙ =
x x̄ + u
0 −1 0
� �
y = 3 2 x̄
which is also clearly different than model #1, and has a different
form from the second model.
� � ��−1 � �
ˆ
� � −2 0 2
G(s) = 3 2 sI −
0 −1 0
� �
� 3 2
� 2 6
= s+2 s+1 = !!
0 s+2

• Once again the dynamics associated with the pole at s = −1 are


canceled out of the transfer function.
• But in this case it occurred because there is a 0 in the B matrix

� �
• So in this case we can “see” the state x2 in the output C = 3 2 ,
but we cannot “influence” that state with the input since
� �
2
B=
0

• So we say that the dynamics associated with the second state are
uncontrollable using this actuator (defines the B matrix).

September 30, 2010


Fall 2010 16.30/31 9–5

• Of course it can get even worse because we could have


� �
−2 0
� �
2
¯˙ =
x x̄ + u
0 −1 0
� �
y = 3 0 x̄

• So now we have
� � ��−1 �
−2

� =
� � 0 2
G(s) 3 0 sI −
0 −1 0
� �
� 3 0
� 2 6
= s+2 s+1 = !!
0 s+2
• Get same result for the transfer function, but now the dynamics as­
sociated with x2 are both unobservable and uncontrollable.

• Summary: Dynamics in the state-space model that are uncon­


trollable, unobservable, or both do not show up in the transfer
function.

• Would like to develop models that only have dynamics that are both
controllable and observable
� called a minimal realization
• A state space model that has the lowest possible order for the
given transfer function.

• But first need to develop tests to determine if the models are observ­
able and/or controllable

September 30, 2010


Fall 2010 16.30/31 9–6

Observability

• Definition: An LTI system is observable if the initial state x(0)


can be uniquely deduced from the knowledge of the input u(t) and
output y(t) for all t between 0 and any finite T > 0.
• If x(0) can be deduced, then we can reconstruct x(t) exactly
because we know u(t) � we can find x(t) ∀ t.
• Thus we need only consider the zero-input (homogeneous) solution
to study observability.
y(t) = CeAtx(0)

• This definition of observability is consistent with the notion we used


before of being able to “see” all the states in the output of the de-
coupled examples
• ROT: For those decoupled examples, if part of the state cannot
be “seen” in y(t), then it would be impossible to deduce that part
of x(0) from the outputs y(t).

September 30, 2010


Fall 2010 16.30/31 9–7

• Definition: A state x� �= 0 is said to be unobservable if the


zero-input solution y(t), with x(0) = x�, is zero for all t ≥ 0
• Equivalent to saying that x� is an unobservable state if
CeAtx� = 0 ∀ t ≥ 0

• For the problem we were just looking at, consider Model #2 with
x� = [ 0 1 ]T �= 0, then
� �
−2 0
� �
2
x̄˙ = x̄ + u
0 −1 1
� �
y = 3 0 x̄
so
� −2t �� �
e 0 0
CeAtx� = 3 0
��
0 e−t 1
� �
� −2t � 0
= 3e 0 =0∀t
1

So, x� = [ 0 1 ]T is an unobservable state for this system.

• But that is as expected, because we knew there was a problem with


the state x2 from the previous analysis

September 30, 2010


Fall 2010 16.30/31 9–8

• Theorem: An LTI system is observable iff it has no unob­


servable states.
• We normally just say that the pair (A,C) is observable.

• Pseudo-Proof: Let x� �= 0 be an unobservable state and compute


the outputs from the initial conditions x1(0) and x2(0) = x1(0) + x�
• Then
y1(t) = CeAtx1(0) and y2(t) = CeAtx2(0)
but
y2(t) = CeAt(x1(0) + x�) = CeAtx1(0) + CeAtx�
= CeAtx1(0) = y1(t)

• Thus 2 different initial conditions give the same output y(t), so it


would be impossible for us to deduce the actual initial condition
of the system x1(t) or x2(t) given y1(t)

• Testing system observability by searching for a vector x(0) such that


CeAtx(0) = 0 ∀ t is feasible, but very hard in general.
• Better tests are available.

September 30, 2010


Fall 2010 16.30/31 9–9

• Theorem: The vector x� is an unobservable state iff


⎡ ⎤
C
⎢ CA ⎥
⎢ ⎥
2 ⎥ �
⎢ CA ⎥ x = 0


⎣ ... ⎥

CAn−1

• Pseudo-Proof: If x� is an unobservable state, then by definition,


CeAtx� = 0 ∀t≥0
But all the derivatives of CeAt exist and for this condition to hold, all
derivatives must be zero at t = 0. Then
Ce x t=0 = 0 ⇒ Cx� = 0
At � �


d At ���
= 0 ⇒ CAeAtx��t=0 = CAx� = 0

Ce x �
dt t=0

d2

At � � 2 At � � 2 �
� �
Ce x = 0 ⇒ CA e x t=0
= CA x =0
dt2 �
t=0

...

dk

At � � k At � � k �
� �
Ce x = 0 ⇒ CA e x t=0
= CA x =0
dtk �
t=0

• We only need retain up to the n − 1th derivative because of the


Cayley-Hamilton theorem.

September 30, 2010


Fall 2010 16.30/31 9–10

• Simple test: Necessary and sufficient condition for observability is


that ⎡ ⎤
C
⎢ CA ⎥
⎢ ⎥
2 ⎥
rank Mo � rank ⎢ CA ⎥ = n


⎣ ... ⎥

CAn−1

• Why does this make sense?


• The requirement for an unobservable state is that for x� =
� 0
Mox� = 0
• Which is equivalent to saying that x� is orthogonal to each row of
Mo .
• But if the rows of Mo are considered to be vectors and these span
the full n-dimensional space, then it is not possible to find an
n-vector x� that is orthogonal to each of these.
• To determine if the n rows of Mo span the full n-dimensional
space, we need to test their linear independence, which is equiv­
alent to the rank test1

Let M be a m × p matrix, then the rank of M satisfies:


1

1. rank M ≡ number of linearly independent columns of M


2. rank M ≡ number of linearly independent rows of M
3. rank M ≤ min{m, p}

September 30, 2010


Fall 2010 16.30/31 10–1

Controllability

• Definition: An LTI system is controllable if, for every x�(t) and


every finite T > 0, there exists an input function u(t), 0 < t ≤ T ,
such that the system state goes from x(0) = 0 to x(T ) = x�.

• Starting at 0 is not a special case – if we can get to any state


in finite time from the origin, then we can get from any initial
condition to that state in finite time as well. 1

• This definition of controllability is consistent with the notion we used


before of being able to “influence” all the states in the system in the
decoupled examples (page 9–??).

• ROT: For those decoupled examples, if part of the state cannot


be “influenced” by u(t), then it would be impossible to move that
part of the state from 0 to x�

• Need only consider the forced solution to study controllability.


� t
xf (t) = eA(t−τ )Bu(τ )dτ
0
• Change of variables τ2 = t − τ , dτ = −dτ2 gives a form that is a
little easier to work with:
� t
xf (t) = eAτ2 Bu(t − τ2)dτ2
0
• Assume system has m inputs.

1 This controllability from the origin is often called reachability.

October 13, 2010


Fall 2010 16.30/31 10–2

• Note that, regardless of the eigenstructure of A, the Cayley-Hamilton


theorem gives
n−1

At
e = Aiαi(t)
i=0
for some computable scalars αi(t), so that
n−1
� � t n−1

i
xf (t) = (A B) αi(τ2)u(t − τ2)dτ2 = (AiB)β i(t)
i=0 0 i=0

for coefficients β i(t) that depend on the input u(τ ), 0 < τ ≤ t.

• Result can be interpreted as meaning that the state xf (t) is a linear


combination of the nm vectors AiB (with m inputs).
• All linear combinations of these nm vectors is the range space of
the matrix formed from the AiB column vectors:
� 2 n−1

Mc = B AB A B · · · A B

• Definition: Range space of Mc is controllable subspace of the


system
• If a state xc(t) is not in the range space of Mc, it is not a linear
combination of these columns ⇒ it is impossible for xf (t) to ever
equal xc(t) – called uncontrollable state.

• Theorem: LTI system is controllable iff it has no uncontrol­


lable states.
• Necessary and sufficient condition for controllability is that
� 2 n−1

rank Mc � rank B AB A B · · · A B = n

October 13, 2010


Fall 2010 16.30/31 10–3

Further Examples

• With Model # 2:
� �
−2
� �
0 2
¯˙ =
x x̄ + u
0 −1 1
� �
y = 3 0 x ¯
� � � �
C 3 0
M0 = =
CA −6 0
� �
� � 2 −4
Mc = B AB =
1 −1
• rank M0 = 1 and rank Mc = 2
• So this model of the system is controllable, but not observable.

• With Model # 3:
� �
−2
� �
0 2
¯˙ =
x ¯+
x u
0 −1 0


y = 3 2 x̄
� � � �
C 3 2
M0 = =
CA −6 −2
� �
� � 2 −4
Mc = B AB =
0 0
• rank M0 = 2 and rank Mc = 1
• So this model of the system is observable, but not controllable.

• Note that controllability/observability are not intrinsic properties of


a system. Whether the model has them or not depends on the repre­
sentation that you choose.
• But they indicate that something else more fundamental is wrong. . .

October 13, 2010


Fall 2010 16.30/31 10–9

Weaker Conditions
• Often it is too much to assume that we will have full observability
and controllability. Often have to make do with the following. System
called:
• Detectable if all unstable modes are observable
• Stabilizable if all unstable modes are controllable

• So if you had a stabilizable and detectable system, there could be


dynamics that you are not aware of and cannot influence, but you
know that they are at least stable.

• That is enough information on the system model for now – will assume
minimal models from here on and start looking at the control issues.

October 13, 2010


Fall 2010 16.30/31 11–1

Full-state Feedback Controller

• Assume that the single-input system dynamics are given by


ẋ(t) = Ax(t) + Bu(t)
y(t) = Cx(t)
so that D = 0.
• The multi-actuator case is quite a bit more complicated as we
would have many extra degrees of freedom.

• Recall that the system poles are given by the eigenvalues of A.


• Want to use the input u(t) to modify the eigenvalues of A to
change the system dynamics.

r u(t) y(t)
A, B, C

x(t)

• Assume a full-state feedback of the form:


u(t) = r − Kx(t)
where r is some reference input and the gain K is R1×n
• If r = 0, we call this controller a regulator

• Find the closed-loop dynamics:


ẋ(t) = Ax(t) + B(r − Kx(t))
= (A − BK)x(t) + Br
= Acl x(t) + Br
y(t) = Cx(t)

October 17, 2010


Fall 2010 16.30/31 11–2

• Objective: Pick K so that Acl has the desired properties, e.g.,


• A unstable, want Acl stable
• Put 2 poles at −2 ± 2i
• Note that there are n parameters in K and n eigenvalues in A, so it
looks promising, but what can we achieve?

• Example #1: Consider:


� � � �
1 1 1
ẋ(t) = x(t) + u
1 2 0

• Then det(sI − A) = (s − 1)(s − 2) − 1 = s2 − 3s + 1 = 0 so the


system is unstable.

� �
• Define u = − k1 k2 x(t) = −Kx(t), then
� � � �
1 1 1 � �
Acl = A − BK = − k1 k2
1 2 0
� �
1 − k1 1 − k2
=
1 2
which gives
det(sI − Acl ) = s2 + (k1 − 3)s + (1 − 2k1 + k2) = 0

• Thus, by choosing k1 and k2, we can put λi(Acl ) anywhere in the


complex plane (assuming complex conjugate pairs of poles).

October 17, 2010


Fall 2010 16.30/31 11–3

• To put the poles at s = −5, − 6, compare the desired characteristic


equation
(s + 5)(s + 6) = s2 + 11s + 30 = 0
with the closed-loop one
s2 + (k1 − 3)s + (1 − 2k1 + k2) = 0
to conclude that

k1 − 3 = 11 k1 = 14
1 − 2k1 + k2 = 30 k2 = 57
� �
so that K = 14 57 , which is called Pole Placement.

• Of course, it is not always this easy, as lack of controllability might


be an issue.

• Example #2: Consider this system:


� � � �
1 1 1
ẋ(t) = x(t) + u
0 2 0
with the same control approach
� � � � � �
1 1 1 � � 1 − k1 1 − k2
Acl = A − BK = − k1 k2 =
0 2 0 0 2
so that
det(sI − Acl ) = (s − 1 + k1)(s − 2) = 0
So the feedback control can modify the pole at s = 1, but it cannot
move the pole at s = 2.

• System cannot be stabilized with full-state feedback.


• Problem caused by a lack of controllability of the e2t mode.

October 17, 2010


Fall 2010 16.30/31 11–4

• Consider the basic controllability test:


�� � � �� � �
� � 1 1 1 1
Mc = B AB =
0 0 2 0
So that rank Mc = 1 < 2.

• Modal analysis of controllability to develop a little more insight


� �
1 1
A= , decompose as AV = V Λ ⇒ Λ = V −1AV
0 2
where
� � � � � �
1 0 1 1 1 −1
Λ= V = V −1 =
0 2 0 1 0 1
Convert
z=V −1 x(t)
ẋ(t) = Ax(t) + Bu −→ ż = Λz + V −1Bu
� �T
where z = z1 z2 . But:
� ��
1 −1
� � �
1 1
V −1B = =
0 1 0 0
so that the dynamics in modal form are:
� � � �
1 0 1
ż = z+ u
0 2 0

• With this zero in the modal B-matrix, can easily see that the mode
associated with the z2 state is uncontrollable.
• Must assume that the pair (A, B) are controllable.

October 17, 2010


Fall 2010 16.30/31 11–5

Ackermann’s Formula
• The previous outlined a design procedure and showed how to do it by
hand for second-order systems.
• Extends to higher order (controllable) systems, but tedious.

• Ackermann’s Formula gives us a method of doing this entire design


process is one easy step.
� � −1
K = 0 . . . 0 1 Mc Φd(A)
� n−1

• Mc = B AB . . . A B as before
• Φd(s) is the characteristic equation for the closed-loop poles, which
we then evaluate for s = A.
• Note: is explicit that the system must be controllable because
we are inverting the controllability matrix.

• Revisit Example # 1: Φd(s) = s2 + 11s + 30


�� � � �� � � � �
� � 1 1 1 1 1 1
Mc = B AB = =
0 1 2 0 0 1
So
��−1 ⎛� �2 � � ⎞
� � 1 1 1 1 1 1
K = 0 1 ⎝ + 11 + 30I ⎠
0 1 1 2 1 2
�� ��
� � 43 14 � �
= 0 1 = 14 57
14 57

• Automated in Matlab: place.m & acker.m (see polyvalm.m too)

October 17, 2010


Fall 2010 16.30/31 11–8

Reference Inputs

• So far we have looked at how to pick K to get the dynamics to have


some nice properties (i.e. stabilize A)

• The question remains as to how well this controller allows us to track


a reference command?
• Performance issue rather than just stability.

• Started with
ẋ(t) = Ax(t) + Bu y = Cx(t)
u = r − Kx(t)

• For good tracking performance we want


y(t) ≈ r(t) as t → ∞

• Consider this performance issue in the frequency domain. Use the


final value theorem:
lim y(t) = lim sY (s)
t→∞ s→0

Thus, for good performance, we want



Y (s) ��
sY (s) ≈ sR(s) as s → 0 ⇒ =1
R(s) �s=0

• So, for good performance, the transfer function from R(s) to Y (s)
should be approximately 1 at DC.
October 17, 2010
Fall 2010 16.30/31 11–9

• Example #1 continued: For the system


� � � �
1 1 1
ẋ(t) = x(t) + u
1 2 0
� �
y = 1 0 x(t)
� �
• Already designed K = 14 57 so the closed-loop system is
ẋ(t) = (A − BK)x(t) + Br
y = Cx(t)
which gives the transfer function
Y (s)
= C (sI − (A − BK))−1 B
R(s)
� �−1 � �
� � s + 13 56 1
= 1 0
−1 s − 2 0
s−2
= 2
s + 11s + 30

• Assume that r(t) is a step, then by the FVT



Y (s) �� 2
= − �= 1 !!
R(s) � s=0 30
• So our step response is quite poor!

October 17, 2010


Fall 2010 16.30/31 11–10

• One solution is to scale the reference input r(t) so that


u = N r − Kx(t)
• N extra gain used to scale the closed-loop transfer function

• Now we have
ẋ(t) = (A − BK)x(t) + BN r
y = Cx(t)
so that
Y (s)
= C (sI − (A − BK))−1 BN = Gcl (s)N
R(s)

If we had made N = −15, then


Y (s) −15(s − 2)
= 2
R(s) s + 11s + 30
so with a step input, y(t) → 1 as t → ∞.

• Clearly can compute


−1
� −1
�−1
N = Gcl (0) = − C(A − BK) B

• Note that this development assumed that r was constant, but it could
also be used if r is a slowly time-varying command.

October 17, 2010


Fall 2010 16.30/31 12–2

Pole Placement Approach

• So far we have looked at how to pick K to get the dynamics to have


some nice properties (i.e. stabilize A)
λi(A) � λi(A − BK)

• Question: where should we put the closed-loop poles?

• Approach #1: use time-domain specifications to locate dominant


poles – roots of:
s2 + 2ζωns + ωn2 = 0
• Then place rest of the poles so they are “much faster” than the
dominant 2nd order behavior.
• Example: could keep the same damped frequency wd and then
move the real part to be 2–3 times faster than the real part of
dominant poles ζωn
� Just be careful moving the poles too far to the left because it
takes a lot of control effort

• Recall ROT for 2nd order response (4–??):

1 + 1.1ζ + 1.4ζ 2
10-90% rise time tr = ωn

Settling time (5%) ts = 3


ζωn
Time to peak amplitude tp = �π
ωn 1 − ζ 2

Peak overshoot Mp = e−ζωntp

• Key difference in this case: since all poles are being placed, the
assumption of dominant 2nd order behavior is pretty much guaranteed
to be valid.

October 17, 2010


Fall 2010 16.30/31 12–3

Linear Quadratic Regulator

• Approach #2: is to place the pole locations so that the closed-loop


system optimizes the cost function
� ∞
T T
� �
JLQR = x(t) Qx(t) + u(t) Ru(t) dt
0
where:
• xT Qx is the State Cost with weight Q
• uT Ru is called the Control Cost with weight R
• Basic form of Linear Quadratic Regulator problem.

• MIMO optimal control is a time invariant linear state feedback


u(t) = −Klqrx(t)
and Klqr found by solving Algebraic Riccati Equation (ARE)
0 = AT P + P A + Q − P BR−1B T P
Klqr = R−1B T P
• Some details to follow, but discussed at length in 16.323

• Note: state cost written using output xT Qx, but could define a
system output of interest z = Cz x that is not based on a physical
sensor measurement and use cost ftn:
� ∞
T ˜
� T T

⇒ JLQR = x (t)Cz QCz x(t) + ρ u(t) u(t) dt
0
˜ z)
• Then effectively have state penalty Q = (CzT QC
• Selection of z used to isolate system states of particular interest
that you would like to be regulated to “zero”.
• R = ρI effectively sets the controller bandwidth

October 17, 2010


Fall 2010 16.30/31 12–9

LQR Weight Matrix Selection

• Good ROT (typically called Bryson’s Rules) when selecting the weight­
ing matrices Q and R is to normalize the signals:

α12
⎡ ⎤
⎢ (x1)2 ⎥
max
2
⎢ ⎥

⎢ α 2


Q = ⎢ (x2)2max ⎥

⎢ ... ⎥

⎢ ⎥
⎣ αn2 ⎦
(xn)2max

β12
⎡ ⎤
⎢ (u1)2 ⎥
max
β22
⎢ ⎥
⎢ ⎥
⎢ ⎥
R = ρ⎢ (u2)2max ⎥

⎢ ... ⎥

⎢ 2

⎣ βm ⎦
(um)2max

• The (xi)max and (ui)max represent the largest desired response or


control input for that component of the state/actuator signal.

2
� � 2
• α
i i = 1 and i βi = 1 are used to add an additional relative
weighting on the various components of the state/control

• ρ is used as the last relative weighting between the control and state
penalties ⇒ gives a relatively concrete way to discuss the relative size
of Q and R and their ratio Q/R

October 17, 2010


Fall 2010 16.30/31 12–10

Regulator Summary

• Dominant second order approach places the closed-loop pole locations


with no regard to the amount of control effort required.
• Designer must iterate on the selected bandwidth (ωn) to ensure
that the control effort is reasonable.

• LQR selects closed-loop poles that balance between state errors and
control effort.
• Easy design iteration using R
• Sometimes difficult to relate the desired transient response to the
LQR cost function.
• Key thing is that the designer is focused on system performance
issues rather than the mechanics of the design process

October 17, 2010


Fall 2010 16.30/31 14–8

Regulator/Estimator Comparison

• Regulator Problem:
• Concerned with controllability of (A, B)

For a controllable system we can place the eigenvalues


of A − BK arbitrarily.
• Choose K ∈ R1×n (SISO) such that the closed-loop poles
det(sI − A + BK) = Φc(s)
are in the desired locations.

• Estimator Problem:
• For estimation, were concerned with observability of pair (A, C).

For a observable system we can place the eigenvalues of


A − LC arbitrarily.
• Choose L ∈ Rn×1 (SISO) such that the closed-loop poles
det(sI − A + LC) = Φo(s)
are in the desired locations.

• These problems are obviously very similar – in fact they are called
dual problems.

October 17, 2010

You might also like