Chap 10 T
Chap 10 T
e u
r K plant y
+ +
Note that we are taking the scalar output variable and
feeding it back, through a gain factor.
By using standard control techniques, we can choose
K for various performance criteria. We could also
make the controller into a transfer function itself,
and use root-locus, Bode plots, or another design
tool to place the closed-loop poles.
u = Kx + Ev
new "reference" input
"feedforward" gain (usually I)
state vector (nx1)
state feedback gain matrix (1xn)
K
+u
v E
+
b
+ +
∫ x c + +
y
d
There is a special case when we can easily find a gain
matrix K in order to choose any eigenvalues we want
for the "closed-loop" system: the controllable
canonical form.
0 1 0
0 1 M
A= 0 O b = M
O 1 0
− a 0 − a1 L − an−2 − a n −1 1
c = [ arbitrary ]
n−1
Characteristic Polynomial: φ(λ) = λn
+ an−1λ + L+ a1 + a0
λ1
Consider the controllability matrix for this system:
P= b [ Ab L An−1b ]
0 0 L 0 1
M M N − a n −1
= M 0 1 − a n −1
0 1 N
1 − a n −1 ( ≠ 0)
[
PCL = b ( A + bK )b L ( A + bK ) n −1 b ]
Giving:
0 1 0 L
M O O 0
A + bK =
0 L 0 1
− a + k − a1 + k1 L − a n −1 + k n −1
0 0
So that the characteristic equation of this closed loop
matrix is:
φ( λ ) = λn + ( a n − 1 − k n − 1 ) λn − 1 + L + ( a 0 − k 0 )
1 3 1
x& = Ax + bu , where A = b= 1
4 2
1 + k0 3 + k1
=
4 + k0 2 + k1
λ − k 0 − 1 − 3 − k1
φ(λ ) = = A BIG MESS TO DEAL WITH!!
− 4 − k0 λ − 2 − k1
To make the algebra easier, we compute the
controllable canonical form:
The inverse of the controllability matrix is:
−1 3 − 2
P =
− .5 .5
−1 − .5 .5
U =
1.5 − .5
Then
−1 0 1 −1 0
A =U AU = and b =U b=
10 3 1
0 1 0 0 0 1
A + bK = + =
10
3 k 0 k1 10 + k 0 3 + k1
φ ( λ ) = λ2 + ( − k 1 − 3 ) λ + ( − k 0 − 10 )
φ ( λ ) = λ2 + ( − k 1 − 3 ) λ + ( − k 0 − 10 )
So by inspection we get:
K = [k 0 k1 ] = [− 40 − 14 ]
u = Kx
But because of the similarity transformation we
performed,
x = U −1 x
−1
So u = K x = KU x = Kx
−1
where K = KU
F
Note that
So Transformation is
U = P P −1 related to the two
system’s P matrices
Now for the derivation of Ackermann's formula:
When we applied state feedback to the controllable
canonical form, we got a closed-loop matrix of the
form:
0 1 L 0
M O O M
ACL = A + bK =
0 L 0 1
− a + k − a1 + k1 L − a n −1 + k n −1
0 0
So
φ( λ ) = λn + ( a n − 1 − k n − 1 )λn − 1 + L + ( a1 − k 1 ) λ + ( a 0 − k 0 )
For ACL
Denote the desired closed-loop characteristic
polynomial as:
n −1
φ des ( λ ) = λ n + a ndes
−1λ + L + a 1des λ + a 0des
φ (λ ) = λ + a n −1λ n −1
+ L + a1 A + a0 For A
n des des
I
We know from the Cayley-Hamilton Theorem that:
n −1 solve for A n
A + a n −1 A
n
+ L + a1 A + a 0 I = 0
substitute into
Substituting into φ ( A ) :
des
n −1
φ des ( A ) = ( a ndes
−1 − a n −1 ) A + L + ( a1
des
− a 1 ) A + ( a des
0 − a0 )I
T n −1
e1T φdes ( A ) = ( a ndes
−1 − a )
n −1 1e A + L + ( a1
des
− a )
1 1e T
A + ( a des
0 − a )
0 1e T
= ( a ndes
−1 − a )
n −1 ne T
+ L + ( a1
des
− a )
1 2e T
+ ( a des
0 − a )
0 1e T
Recall that A = U −1 AU
Substitute this into the formula at the top of the page:
K = − e1T P P − 1 φ des ( A)
1
= [0 L 0 1] = en
T
M N
0 1 O
1
So finally,
formula for
K= −enT P −1φdes ( A) calculations
Ackermann's Formula
Note that for this formula, we need only the open-loop
A-matrix, the controllability matrix P, and the desired
characteristic polynomial.
However, it does require the inverse of a matrix, which
is not always advisable for numerical accuracy
reasons; especially when the system is "weakly"
controllable. In fact, MATLAB offers the ACKER
command, but advises against ever using it!
Define f T = − enT P −1
Then f T P = − enT or
P T f = − en
K = f T φ des ( A)
Note: One can show that the numerator of the
transfer function is the same before and after
state-feedback. This implies that
The
The zeros
zeros of
of aa system
system are
are not
not affected
affected by
by state
state
feedback.
feedback.
u b
+ +
∫ x
c
+ +
y
d
To get around this problem, we can show how to
build another system, called an observer (or
estimator) that re-constructs the state vector from
the system input and output, and allows us to use
its output for state feedback.
Begin with the system
x& = Ax + Bu (this procedure holds for
y = Cx + Du multivariable systems )
x&ˆ = Axˆ + Bu
yˆ = Cxˆ + Du, xˆ ( 0) = x(0)
{
To do this, we must have the pair AT , C T being }
controllable, which is the same as saying {A, C } is
observable!!
Now that the error system is stable,
x ( t ) → 0 as t → ∞
~
so
xˆ (t ) → x ( t ) as t → ∞
We then use these estimated state-variables to
construct the state-feedback control law as before:
u = K xˆ + v (E = I) assume E=I
D
u
v x& x y
+ B + ∫ C +
A
Kx$ +
x&$ x$
K + ∫ C + y$
A
y − y$
L
How would you simulate the entire system, controller,
( u = K xˆ + v), observer and all? Create an
"augmented-state" system:
First notice the "observer dynamics":
x&ˆ = ( A − LC ) xˆ + ( B − LD ) u + Ly
= ( A − LC ) xˆ + ( B − LD )( K xˆ + v ) + L ( Cx + D ( K xˆ + v ))
= [ A − LC + BK ]xˆ + LCx + Bv simplify substitute for
u(t) and y(t)
x& A BK x B
x&ˆ = LC + v
A − LC + BK xˆ B
necessary for
external input
So together:
x& A + BK − BK x
~ =
x& 0 A − LC ~
x
x& A + BK − BK x
~ =
&
x 0 A − LC ~
x
A + BK − BK A + BK − λI − BK
det − λI =
0 A − LC 0 A − LC − λI
= A + BK − λI A − LC − λI
So we see that part of the eigenvalues are
determined by choice of K alone (the closed-loop
plant eigenvalues), and the others are
determined by L alone (observer eigenvalues).
x1
y = [I 0]
x2
either naturally or through a similarity transformation
to make it that way.
If this is the case, then we can save time and money by
using a reduced-order observer, that just estimates
the missing part of the state vector, x2 .
Unfortunately, it will be more complex to derive.
Step one: How to transform the system such that the
C-matrix has the form I 0
First augment the C-matrix to create a nonsingular
matrix:
I q×q 0 C
WV = I = = [V1 V2 ]
0 I ( n − q )× ( n − q ) R
factor out x1
This is the second equation to simulate (with the x1
equation) in order to find an estimate of x2 .
= ( A22 − L A12 )( x2 − z − L x1 )
e& = ( A22 − L A12 )e
e
The eigenvalues of A22 − L A12 are placed to adjust
the rate at which z + L y approaches x2 .
Step five: Now the estimate for the whole state is:
xˆ1 y − Du
xˆ = = z + L x
xˆ2 1
y − Du
xˆ = Vx = [V1 V2 ]
ˆ
z + L x1
REMARKS:
Except for the similarity transformation, the reduced
order observer requires fewer computations and
integrations.
In the reduced order observer, the output variable y
appears directly as an estimate for part of the
state. This means that sensor noise appears in
the state variable that is fed back. In the full-order
observer, the state variable estimates are all the
result of at least one integration which tends to
smooth out any noise.
On the other hand, the reduced order observer can
often have smaller transients, dur to part of the
estimate being “perfect”.
How would one simulate the whole system??
x & x&
ξ= ξ = =L
z z&
y= C 0ξ
To compute estimates of the state variables,
y − Du
xˆ = V
z + L x1
And then when you want to apply state-feedback, use
u = K xˆ
or
u = K xˆ + v
x& = Ax + Bu
and
but
x1 = y = C x = (CV )(V −1 x ) = Cx
so
x& = Ax + Bu = Ax + B( Kxˆ + v )
= Ax + BKxˆ + Bv
Cx
= Ax + BK [V1 V2 ] + Bv
z + L Cx
= Ax + BK [V1Cx + V2 L Cx + V2 z ] + Bv
= [ A + BK (V1 + V2 L )C ]x + BKV 2 z + Bv
= [( A22 − LA12 ) + ( B2 − L B1 ) KV 2 ]z
+ [( A22 − L A12 ) L + ( A21 − L A11 ) + ( B2 − L B1 ) K (V1 + V2 L )]Cx
+ ( B2 − L B1 )v
x
xaug =
z
α : aileron command
u = [α ρ]Τ ρ : rudder command
0.277 0 − 32.9 9.81 0 − 5.543 0 0 0
− 0.103 − 8.325 3.75 0 0 0 − 28.640 0 0
0.365 0 −.639 0 0 − 9.49 0 0 0
A= 0 1 0 0 0 0 0 B= 0 0
0 0 1 0 0 0 0 0 0
0 0 0 0 0 −10 0 20 0
0 0 0 0 0 0 −15 0 10
0 0 0 1 0 0 0 0 0
C= D=
0 0 0 0 1 0 0 0 0
outputs vs. time x1 & x1hat vs. time
0.05 10
0
0
-10
-0.05
-20
-0.1 -30
-0.15 -40
0 0.5 1 0 0.5 1
0.5 0.5
0 0
-0.5 -0.5
-1 -1
0 0.5 1 0 0.5 1
x4 & x4hat vs. time x5 & x5hat vs. time
0.1 0.05
0.05 0
0 -0.05
-0.05 -0.1
-0.1 -0.15
0 0.5 1 0 0.5 1
1
1
0.5
0
0
-1
-0.5
-2 -1
0 0.5 1 0 0.5 1
MORE REMARKS:
We have less flexibility if we try to feedback not the
entire state, but just the output (as in classical
controller design); i.e., not all eigenvalues can be
placed if we use:
u = Ky = KCx