Sunteți pe pagina 1din 22

Chapter 9

Controller Design
Two Independent Steps:
1)

Feedback Design Control Law u=-Kx


assumes all states are accessible (a lot of sensors are necessary)

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

state vector estimate

COMPENSATION

Control Law Design


Assumed system for control law design
x& = Ax + Bu

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:

Undamped oscillator with freq. 0


1
y(s)
= 2
u(s) s + 02

state space description


x&1 0
x& = 2
2 0

1 x1 0
+
u
0 x 2 1

REVIEW

let's place the roots both at -20

j
j n 1 2

j0

-20

-j0

we want to double the natural frequency and increase


damping from =0 to =1

desired characteristic equation is

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

equating same coefficients:

K1 = 3 02
K 2 = 4 0

K 2 = 4 0

02 + K1 = 4 02

K = [K1

K 2 ] = 302

40

]
2

Use of Canonical Forms


A simple way of calculating the gains when order is greater than three is to use special
canonical forms of the state equations.
The special structure of the system matrix is referred to as companion form.
Example:

Third order case:

The characteristic equation is

s 3 + a1s2 + a2 s + a3
Recall the phase variable form (a lower companion form)

G(s) =

b1s n1 + ....+ bn1s + bn


s n + a1s n1 + ....+ an

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]

The closed loop system matrix is

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

if the desired pole locations result in the characteristic equation

d (s) = s3 + 1s2 + 2 s + 3 = 0

(2)

equating like coefficients of (1) and (2)


K 3 = a1 + 1

Example:

K 2 = a2 + 2
K1 = a3 + 3

Drill problem D9.1 page 635 of text


1
0 x1 0
x&1 0
x& = 0
0
1 x 2 + 0u
2
x& 3 3 6 7 x 3 1
u = [ k1

k2

x1
k 3 ] x 2 + r
x3

x1
u = [2 0 1] x 2
x3

Find ki to place the closed-loop system poles at


s= -3, -4, -5
ANS

desired characteristic polynomial

d (s) = (s + 3)(s + 4)(s + 5)


= s3 + 12s2 + 47s + 60

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

control canonical (companion) form


i.e. phase variable form

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

A 2 B ... A n 1 B (controllability matrix)

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

i ' s are the coefficients of the desired characteristic polynomial

d (s) = sn + 1sn1 + ...+ n


Example
Apply the formula for the undamped oscillator

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

which is the same as the result previously obtained.


Tracking Problems
For step input: Will find N to ensure zero steady-state error to step inputs

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

to get zero steady state error

N=

1
C(A BK)1 B

Integral Control (used to get zero steady state error)

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

The design now proceeds as before.


Example
Double Integrator

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]

Steady state output to a unit step input can be derived as follows

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

For the example

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

only term of interest


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)

We will estimate states rather than measure them

PLANT

U(s)

B
1
s

Y(s)
+

L
-

1
s

X (s)

+
A

Observer simulates the original system


Original System

x& = Ax + Bu
y = Cx

x(0) = x 0

x& = Ax + Bu + L( y Cx )

x (0) = x 0

Observer

10

Error between states and their estimates


x = x x

~
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)

a system is detectable if the unstable modes are observable

2)

a system is stablizable if the unstable modes are controllable

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

Ackermanns formula to find observer gains


0
0
L = e ( A) M o1
:

1
DERIVATION USING DUALITY
Ackermanns Formula for control problem

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) =

Note the system is completely observable


Design the observer with poles at {2 j2}
Actual characteristic equation:
1 0 0 1 l1
sI ( A LC ) = s

+ [1 0]
0 1 0 0 l 2
= s 2 + l1 s + l 2

12

Desired characteristic equation:

(s + 2 + j2)(s + 2 j2) = s 2 + 4s + 8
l1 = 4
l2 = 8

Equating coefficients

4
L=
8

The observer equations are

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

Control Using Observers


x& = Ax + Bu

Plant:

x(0) = x 0

y = Cx
x& = Ax + Bu + L( y Cx )

Observer:

Estimated state feedback:

x (0) = x 0

u = Kx

closing the loop


x& = Ax BKx
x& = ( A LC ) x BKx + Ly
= ( A LC BK ) x + LCx
x& A
& =
x LC

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

Compensator Transfer Function


Compensator output, which is the plant input

U(s)
H(s) =
Y (s)

Compensator input, which is the plant output

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

Reduced-Order Observer Design


If system has n states and m measurements, then an observer of order (n-m) will be sufficient.
If y = Cx we will assume C has the structure:
C = [I

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

x& u = A22 xu + ( A21 x m + B2 u )


14243
known input

also

x& m = y& = A11 y + A12 xu + B1u


y& A11 y B1u = A12 xu
144244
3

dynamics of the
measured state

known measurement

Summarizing:
x& u = A22 xu + ( A21 x m + B2 u )
14243
known input

y& A y B1u = A12 xu


14411244
3
known measurement

(1a )

(1)
(1b)

Recall for full-order observer:


Plant:

Observer:

x& = Ax + Bu
y = Cx

x ( 0) = x 0
( 2)

x& = Ax + Bu + L( y Cx )

x (0) = x 0

} (3)

comparing (1) and (2) shows the correspondence

17

x xu

A A22

Bu A21 x m + B2 u (4)
y y& A11 y B1u

C A12

substituting (4) into (3) we get the reduced order equation


12 xu

644A7
44
8

x& u = A22 x u + A21 x m + B2 u + L( y& A11 y B1u A12 xu ) (5)


1444
424444
3

A12 ~
xu

let us now define the estimator error


x u = x u x u

therefore subtracting (5) from (1a) and using (1b) (i.e. y& A11 y B1u = A12 xu )
we get
~
x& u = ( A22 LA12 ) ~
xu

} ( 6)

the error dynamics


are given by this
equation

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

The block diagram of the reduced order observer is shown below

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

Dynamics of reduced order observer ~


x& u = ( A22 LA12 ) ~
xu
19

Require observer pole at s = 2

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

Reduced-Order Transfer Function


u = [K 1

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)

When C is not of the form [I

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

S-ar putea să vă placă și