Documente Academic
Documente Profesional
Documente Cultură
Controller Design
Two Independent Steps:
1)
2)
Design of Estimator (also called an Observer) which estimates the entire state vector
given the outputs and inputs
PLANT
x& = Ax + Bu
CONTROL LAW
-K
ESTIMATOR
+
matrix of constants
COMPENSATION
x
C
u=-Kx
u=-Kx
for an nth order system there are n feedback gains K1,,Kn. By choice of K the roots can
generally be placed anywhere
1
x& = Ax + Bu
u = Kx
x& = ( A BK ) x
characteristic equation is I (A BK) = 0
Placing Roots
Example:
1 x1 0
+
u
0 x 2 1
REVIEW
j
j n 1 2
j0
-20
-j0
j n 1 2
cos =
d ( s ) = ( s + 2 0 ) 2 = s 2 + 4 0 s + 4 0
s 0 0
det[sI ( A BK )] = det
0 s 02
or
1 0
[K1
0 1
K 2 ]
s 2 + K 2 s + 02 + K1 = 0
K1 = 3 02
K 2 = 4 0
K 2 = 4 0
02 + K1 = 4 02
K = [K1
K 2 ] = 302
40
]
2
s 3 + a1s2 + a2 s + a3
Recall the phase variable form (a lower companion form)
G(s) =
0
0
A=
a n
1
0
a n 1
0 ...
1 ...
..
..
0
0
0
:
: B = C = [bn
0
1
1
a1
bn 1 ... b1 ] D = [0]
A BK
Third order case:
0
A BK = 0
a3
1
0
a2
0 0
1 0[K1 K 2 K 3 ]
a1 1
144
42444
3
0
0
K 1
0
1
=
0
0
a3 K1 a2 K 2
0
0
K2
0
0
K 3
a1 K 3
Characteristic equation sI ( A BK ) = 0
s 3 + ( a1 + K 3 ) s2 + ( a2 + K 2 ) s + ( a3 + K1 ) = 0
(1)
3
d (s) = s3 + 1s2 + 2 s + 3 = 0
(2)
Example:
K 2 = a2 + 2
K1 = a3 + 3
k2
x1
k 3 ] x 2 + r
x3
x1
u = [2 0 1] x 2
x3
we have
1 = 12, 2 = 47, 3 = 60
k3 = a1 + 1
= 7 + 12 = 5
k2 = a2 + 2
= 6 + 47 = 41
k1 = a3 + 3
= 3 + 60 = 57
Design Procedure
Given (A,B) and desired d(s), transform to (Ac, Bc) and solve for gains
We then need to transform gain back to original state space
note: the poles can only be placed arbitrarily if the system is fully controllable
This procedure is encapsulated in Ackermanns formula
Ackermanns Formula
k = [0 ... 0 1]M C1 d ( A)
where
MC = B
AB
where n is the order of the system or the number of states and d (A) is defined as
d ( A) = An + 1 An 1 + 2 An 2 + ... + n I
where the
d ( s ) = ( s + 2 0 ) 2
= s 2 + 4 0 s + 4 0
recall
1 = 4 0 ,
0
A=
2
0
2 = 4 0 2
1
0
0
B=
1
0 2
0
0
d ( A) =
+
0
2
2
0
0
0
30 2
40
=
3
2
40 30
1
2 1 0
+ 40
0
0 1
also
M c = [B
Mc
0 1
=
1 0
K = [K 1
K = 3 0
0 1
AB ] =
1 0
2
0 1 3 0
K 2 ] = [0 1]
3
1 0 4 0
4 0
4 0
2
3 0
u = Kx + N r
x& = Ax + Bu
= ( A BK ) x + BN r
now
x& ss = 0 0 = ( A BK ) x ss + BN r
x ss = ( A BK ) 1 BN r
y ss = C ( A BK ) 1 BN r
A-BK is stable inverse exists
now
e ss = r y ss = r + C ( A BK ) 1 BN r
= 1 + C ( A BK ) 1 BN r
steady-state error
N=
1
C(A BK)1 B
R(s)
Xi(s)
E(s)
1
s
U(s)
K i
1
s
Y(s)
X(s)
-K
integrator in the
forward path
Integrator increases the system order by one, i.e. augment the plant model by an added state variable xi
xi = edt = (r y )dt = (r Cx)dt
x& i = r Cx
Augmented systems becomes
x& A 0 x B 0
x& = C 0 x + 0 u + 1 r
i
i
zero matrices (compatible dimensions)
Control law is u = Kx K i xi = [K
x
K i ]
xi
G(s) =
1
s2
0 1
0
x& =
x + u
0 0
1
y = [1 0]x
Augment the plant
x& 0 1 0 x 0
= 0 0 0 + 1 u
x& i 1 0 0 xi 0
x
y = [1 0 0]
xi
Select poles of the closed loop system to be at
{1 j,5}
N.B. 3 poles because of extra state
K = [12 7 10]
x& = Ax + Bu
x& i = Cx + r
Bu
Br
}
}
0
d x& A 0 x B
x& = C 0 x + 0 u + 1 r
dt i
i
x
K i ]
xi
u = [K
x& = A x + Bu u + Br r
u = Kx
y = Cx
y = [C
x
0]
xi
y = Cx
x& = A x Bu K x + Br r
x& = ( A Bu K ) x + Br r
in steady state x& ss = 0
x&ss = ( A Bu K ) 1 Br r
yss = C ( A Bu K ) 1 Br r
0 1
A=
0 0
0 1 0
A = 0 0 0
1 0 0
0
B=
1
C = [1 0]
0
Bu = 1
0
0
Br = 0
1
0 1 0 0
y ss = [1 0 0] 0 0 0 1[12 7 10]
1 0 0 0
C = [1 0 0]
0
0 r
1
1
0 0
0
= [1 0 0] 12 7 10 0 r
1
0
0 1
= 1 r
det = 1
12 10
1 0
= 10
adj ( A)13 =
1 0
7 10
= 10
Observer Design
x(t)
(A,B)
u(t)
y(t)
y (t)
x (t)
C
(A,B)
PLANT
U(s)
B
1
s
Y(s)
+
L
-
1
s
X (s)
+
A
x& = Ax + Bu
y = Cx
x(0) = x 0
x& = Ax + Bu + L( y Cx )
x (0) = x 0
Observer
10
~
x& = x& x&
= Ax + Bu Ax Bu L( y Cx )
~
= ( A LC ) ~
x
x ( 0) = ~
x
Observer error will go to zero asymptotically A-LC is stable (i.e. eigenvalues are in the LHP)
note:
the eigenvalues of A-LC are the observer poles, which can be placed arbitrarily if the
system is observable
this can be done by choice of the observer gains L (a column vector for single output
systems)
Definition:
1)
2)
Duality
Control
Estimation
Control
Estimation
A
B
C
AT
CT
BT
MC
K
MoT
LT
Example
MC = [B
AB .... A n1B]
duality
M oT = C T
AT C T
.... AT
= CT
(CA)T
.... (CAn 1 )T
C
CA
=
:
n 1
CA
n 1
CT
C
CA
Mo =
:
n 1
CA
11
K = [0 ..... 1]M C1 C ( A)
Duality
LT = [0 ..... 1]M oT e ( AT )
1
1
= e ( A) M o :
AT BT C T = (CBA)T
0
L = e ( A) M o :
1
1
Example
Design an observer for
1
s2
0 1
0
x& =
x + u
0 0
1
y = [1 0]x
G ( s) =
+ [1 0]
0 1 0 0 l 2
= s 2 + l1 s + l 2
12
(s + 2 + j2)(s + 2 j2) = s 2 + 4s + 8
l1 = 4
l2 = 8
Equating coefficients
4
L=
8
x&1 = x2 + 4( y x1 )
x& = 8( y x ) + u
2
PLANT
u
x& 2
1
s
x 2 = x&1
1
s
x1
y +
+
4
+
8
1
s
1
s
x1
x 2
+
STRUCTURE OF OBSERVER
13
Plant:
x(0) = x 0
y = Cx
x& = Ax + Bu + L( y Cx )
Observer:
x (0) = x 0
u = Kx
BK
x
A BK LC x
14
Separation Principle
Introduce transformation
x
z
x = P w
where
note
z I
= N
w I N
I
P= N
I N
P 1 = P
ON
I N
ON x x x
=
=
I N x x x ~
x
Therefore using this transformation the old augmented state vector comprising x (the plant
states) and x (the estimator sates) now becomes x and x (the estimator error). The new
system matrix A = P 1 AP
x& A BK
~& =
x 0
BK x
A LC ~
x
note A is block-triangular
Eigenvalues of a block-triangular matrix are equal to the eigenvalues of the diagonal blocks. So
the eigenvalues of the full system comprise the eigenvalues of the plant (i.e. eigenvalues of ABK) and the observer (i.e. eigenvalues of A-LC).
Alternative Approach
x& = Ax BKx
x& = LCx + ( A BK LC ) x
x& x& = Ax BKx LCx ( A BK LC ) x
= ( A LC ) x ( A LC ) x
~
x& = ( A LC ) ~
x
x& = Ax BKx
now
x = x x
x = x x
x& = Ax BK ( x ~
x)
= ( A BK ) x + BK~
x
15
U(s)
H(s) =
Y (s)
Compensator
Output
PLANT
-K
OBSERVER
Compensator Input
COMPENSATOR
we have
u = Kx
x& = Ax + Bu + L( y Cx ) = Ax BKx + Ly LCx
= ( A BK LC ) x + Ly
X ( s ) = ( sI A + BK + LC ) 1 LY ( s )
U ( s ) = K ( sI A + BK + LC ) 1 LY ( s )
14444244443
H (s)
Design Issues
1) Problem with pole placement is that there is no control over compenstor poles and zeros
2) Optimum choice for observer initial conditions is
x (0) = C'(CC')1 y(0)
3) Choice of observer poles:
i. Choose them to be faster than controller poles
ii. Alternatively, choose them to be at plant zeros (if the sytem has RHP zeros,
use their LHP images).
16
O]
I R mxm , O R mx ( n m )
measured states
y = [I
x
O ] m = x m
xu
x& A
m = 11
x& u A21
unmeasured states
A12 x m B1
+
u
A22 xu B2
dynamics of the
unmeasured state
also
dynamics of the
measured state
known measurement
Summarizing:
x& u = A22 xu + ( A21 x m + B2 u )
14243
known input
(1a )
(1)
(1b)
Observer:
x& = Ax + Bu
y = Cx
x ( 0) = x 0
( 2)
x& = Ax + Bu + L( y Cx )
x (0) = x 0
} (3)
17
x xu
A A22
Bu A21 x m + B2 u (4)
y y& A11 y B1u
C A12
644A7
44
8
A12 ~
xu
therefore subtracting (5) from (1a) and using (1b) (i.e. y& A11 y B1u = A12 xu )
we get
~
x& u = ( A22 LA12 ) ~
xu
} ( 6)
Design proceeds by, given an A22 and A12 we choose an L to place estimator poles.
Rewriting (5) we have
x& u = ( A22 LA12 ) x u + ( A21 LA11 ) y + ( B2 LB1 )u + Ly&
(7)
The presence of the derivative of the measurement (i.e. y& ) is not good since this amplifies the noise. To
get around this we introduce a new state z where
z = x u Ly
(8)
x u = z + Ly
(9)
substituting (9) into (7) leads to the final form of the reduced-order observer
z& = Dz + Fy + Gu
x u = z + Ly
where
z is the state of
the estimator
D = A22 LA12
F = DL + A21 LA11
G = B2 LB1
18
Example
Double integrator G(s) =
1
s
1
s2
x2
1
s
0 1
0
x& =
x + u
0 0
1
y = [1 0]x
x1 = y
A11 = 0 A21 = 1 B1 = 0
A21 = 0 A22 = 0 B2 = 1
1
s2
z& = Dz + Fy + Gu
x u = z + Ly
where
D = A22 LA12
F = DL + A21 LA11
G = B2 LB1
I A22 + LA12 = 0
where = 2
I + L = 0
L=2
D = 2
F = 4
G =1
Ackermans formula for reduced order observer gains
0
0
1
L = e ( A22 ) M 0 0
:
1
A12
A A
12 22
M 0 = A12 A22
A12 A22 n 2
for example:
e ( s) = s + 2
e ( A22 ) = 0 + 2
M 0 = A12 = 1
L = (2)(1)(1)
=2
20
now
y
z + Ly
}
}
xm
K 2 ] = K 1 x m K 2 x u
x u
z& = Dz + Fy + Gu
u = K 1 y K 2 ( z + Ly )
u = K 2 z ( K 1 + K 2 L) y
also
z& = Dz + Fy + G[ K 2 z ( K 1 + K 2 L) y ]
= ( D GK 2 ) z + ( F GK 1 GK 2 L) y
Transfer function:
where
U(s)
= C'(sI A')1 B'+D'
Y(s)
A'= D GK 2
B'= F GK1 GK 2 L
C'= K 2
D'= (K1 + K 2 L)
O]?
x& = Ax + Bu
y = Cx + Du
x = Qz Qz& = AQz + Bu z& = Q 1 AQz + Q 1 Bu
y = CQz + Du
so find a transformation Q so that CQ is of form [I O]
let
Q = [Q1 Q2 ]
so
CQ = [CQ1 CQ2 ] = [I O]
21
let
C
P=
T
be nonsingular
arbitrary matrix
if PQ = I
C
PQ = [Q1
T
CQ
Q2 ] = 1
TQ1
CQ2 I O
=
TQ2 O I
Q = P 1
22