23
    M     E     T     R     4     2     0     2     /     7     2     0     2       A     A     d    v    a    n    c    e     d     C    o    n    t    r    o     l     &     R    o     b    o    t     i    c    s  ,     S    e    m    e    s    t    e    r     2  ,     2     0     0     5    :     P    a    g    e    :     1 METR4202 – Advanced Cont rol & Robotic s Lecture 4 Review of Controller Design Frequency Domain PD Controller Design State-Space Feedback Control Design Introduction to State-Space Observer Design G. Hovland 2004-2006     M     E     T     R     4     2     0     2     /     7     2     0     2       A     A     d    v    a    n    c    e     d     C    o    n    t    r    o     l     &     R    o     b    o    t     i    c    s  ,     S    e    m    e    s    t    e    r     2  ,     2     0     0     5    :     P    a    g    e    :     2 Solutions: Tutorial week 4, Q5

Adv Control & Robotic Lec 4

  • Upload
    key3hse

  • View
    225

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Adv Control & Robotic Lec 4

8/14/2019 Adv Control & Robotic Lec 4

http://slidepdf.com/reader/full/adv-control-robotic-lec-4 1/23

    M    E    T    R    4    2    0    2    /    7    2    0    2  –    A    A    d   v   a   n   c   e    d    C   o   n   t   r   o

    l    &    R   o    b   o   t    i   c   s ,

    S   e   m   e   s   t   e   r    2 ,

    2    0    0    5   :    P   a   g   e   :    1

METR4202 – Advanced Control & Robotics

Lecture 4

Review of Controller DesignFrequency Domain PD Controller Design

State-Space Feedback Control Design

Introduction to State-Space Observer Design

G. Hovland 2004-2006

    M    E    T    R    4    2    0    2    /    7    2    0    2  –    A    A    d   v   a   n   c   e    d    C   o   n   t   r   o    l    &    R   o    b   o   t    i   c   s ,

    S   e   m   e   s   t   e   r    2 ,

    2    0    0    5   :    P   a   g   e   :    2

Solutions: Tutorial week 4, Q5

Page 2: Adv Control & Robotic Lec 4

8/14/2019 Adv Control & Robotic Lec 4

http://slidepdf.com/reader/full/adv-control-robotic-lec-4 2/23

    M    E    T    R    4    2    0    2    /    7    2    0    2  –    A    A    d   v   a   n   c   e    d    C   o   n   t   r   o

    l    &    R   o    b   o   t    i   c   s ,

    S   e   m   e   s   t   e   r    2 ,

    2    0    0    5   :    P   a   g   e   :    3

Step 1a: Find Phase Margin and Frequency

o

 M 

 p

n

aa

T w

6.587219.0

1823.1tan

412

2tan

90.33495.010.11

5912.0)1.0(ln

)1.0ln(

100

%ln

100

%ln

42

2

2222

  

 =

 

 

 

 

++−

=−

=

=

=

+

−=

 

  

 +

 

  

 −

=

ζ ζ 

ζ 

π ζ 

π 

π π 

ζ 

Desired Closed-Loop Frequency Response:

Desired Open-Loop Frequency Response:

22

2

2)(

)(

nn

n

sssU 

sY 

ω ζω 

ω 

++

=

sssU 

sY 

n

n

ζω 

ω 

2)(

)(2

2

+=

    M    E    T    R    4    2    0    2    /    7    2    0    2  –    A    A    d   v   a   n

   c   e    d    C   o   n   t   r   o    l    &    R   o    b   o   t    i   c   s ,

    S   e   m   e   s   t   e   r    2 ,

    2    0    0    5   :    P   a   g   e   :    4

Step 1b: Desired Frequency Response

ss n

n

ζω 

ω 

22

2

+-

r(t) y(t)

= 22

2

2 nn

n

ss ω ζω 

ω 

++

r(t) y(t)

Bode Plots: (wc = 2.8 rad/sec) and Phase Margin = 58.6o

Page 3: Adv Control & Robotic Lec 4

8/14/2019 Adv Control & Robotic Lec 4

http://slidepdf.com/reader/full/adv-control-robotic-lec-4 3/23

    M    E    T    R    4    2    0    2    /    7    2    0    2  –    A    A    d   v   a   n   c   e    d    C   o   n   t   r   o

    l    &    R   o    b   o   t    i   c   s ,

    S   e   m   e   s   t   e   r    2 ,

    2    0    0    5   :    P   a   g   e   :    5

Tutorial Q5: Step 2a, Actual Response

Start with Kp=1 and Kd=0

Must increase gainby 32dB to get wc at2.8 rad/sec

Convert dB to gain:

32 dB = 10(32/20)

≈ 40 = Kp

 

 

 

 +=+= 1)( s

K K sK K sG

 p

d  pd  pc

    M    E    T    R    4    2    0    2    /    7    2    0    2  –    A    A    d   v   a   n

   c   e    d    C   o   n   t   r   o    l    &    R   o    b   o   t    i   c   s ,

    S   e   m   e   s   t   e   r    2 ,

    2    0    0    5   :    P   a   g   e   :    6

Tutorial Q5: Step 2b, Actual Response

Phase Curve

Phase margin only15o. Needs to be liftedapprox. 45o.

Kp / Kd is the locationof the zero. The zerowill lift the phase curve.Approximately 45o liftwhere zero is.

Choose Kd = Kp /2.8 = 14.3,which gives a zero at2.8 rad/sec

 

 

 

 += 1)( s

K K K sG p

d  pc

Page 4: Adv Control & Robotic Lec 4

8/14/2019 Adv Control & Robotic Lec 4

http://slidepdf.com/reader/full/adv-control-robotic-lec-4 4/23

    M    E    T    R    4    2    0    2    /    7    2    0    2  –    A    A    d   v   a   n   c   e    d    C   o   n   t   r   o

    l    &    R   o    b   o   t    i   c   s ,

    S   e   m   e   s   t   e   r    2 ,

    2    0    0    5   :    P   a   g   e   :    7

Tutorial Q5, Step 2c: Actual Response

Bode plots with Kp = 40 and Kd = 14.3

Phase margin now okThe zero has also increased the

crossover frequency wc.

Some fine-tuning required, but simply reduce gain while keeping zero.Kp = 30 and Kd = Kp / 2.8 = 10.7 gives desired result.

    M    E    T    R    4    2    0    2    /    7    2    0    2  –    A    A    d   v   a   n

   c   e    d    C   o   n   t   r   o    l    &    R   o    b   o   t    i   c   s ,

    S   e   m   e   s   t   e   r    2 ,

    2    0    0    5   :    P   a   g   e   :    8

Tutorial Q5, Step 3: Verification

Peak time exactly1.0 seconds.

Overshoot slightly higherthan 10%.

Design is not accurate, sincethe PD controller and G(s)

do not match exactly

ss n

n

ζω 

ω 

22

2

+

Page 5: Adv Control & Robotic Lec 4

8/14/2019 Adv Control & Robotic Lec 4

http://slidepdf.com/reader/full/adv-control-robotic-lec-4 5/23

    M    E    T    R    4    2    0    2    /    7    2    0    2  –    A    A    d   v   a   n   c   e    d    C   o   n   t   r   o

    l    &    R   o    b   o   t    i   c   s ,

    S   e   m   e   s   t   e   r    2 ,

    2    0    0    5   :    P   a   g   e   :    9

Bode plots of (s+a) = a (s/a + 1)

Figure 10.6

a. magnitudeplot;b. phase plot.

Review from Lecture 1b. Asymptotic Bode plots

    M    E    T    R    4    2    0    2    /    7    2    0    2  –    A    A    d   v   a   n

   c   e    d    C   o   n   t   r   o    l    &    R   o    b   o   t    i   c   s ,

    S   e   m   e   s   t   e   r    2 ,

    2    0    0    5   :    P   a   g   e   :    1    0

Gain and Phase Margin via Nyquist (10.6)

Figure 10.35Nyquist diagramshowing gainand phasemargins

Review from Lecture 1b. The Nyquist plot explains whywe look at 0dB and -180o for the open-loop transferfunction.

Page 6: Adv Control & Robotic Lec 4

8/14/2019 Adv Control & Robotic Lec 4

http://slidepdf.com/reader/full/adv-control-robotic-lec-4 6/23

    M    E    T    R    4    2    0    2    /    7    2    0    2  –    A    A    d   v   a   n   c   e    d    C   o   n   t   r   o

    l    &    R   o    b   o   t    i   c   s ,

    S   e   m   e   s   t   e   r    2 ,

    2    0    0    5   :    P   a   g   e   :    1    1

Tutorial w4, Q6

roots([1 6 11 6]))3)(2)(1(

1)(

+++=

ssssG

us

1

1

-1

s

1

1

-2

s

1

1

-3

y

    M    E    T    R    4    2    0    2    /    7    2    0    2  –    A    A    d   v   a   n

   c   e    d    C   o   n   t   r   o    l    &    R   o    b   o   t    i   c   s ,

    S   e   m   e   s   t   e   r    2 ,

    2    0    0    5   :    P   a   g   e   :    1    2

Tutorial w4, Q6b

us

1

1

-1

s

1

1

-2

s

1

1

-3

y

z1z2z3dz1 /dtdz2 /dtdz3 /dt

[ ]

 Du

 z

 z

 z

C  y Bu

 z

 z

 z

 A

 z

 z

 z

 DC  B A

u z z

 z z z z z z

 z z z z

+

=+

=

==

=

=

+−=

+−=

+−=

3

2

1

3

2

1

3

2

1

33

322

211

0001

1

0

0

100

120

013

23

Page 7: Adv Control & Robotic Lec 4

8/14/2019 Adv Control & Robotic Lec 4

http://slidepdf.com/reader/full/adv-control-robotic-lec-4 7/23

    M    E    T    R    4    2    0    2    /    7    2    0    2  –    A    A    d   v   a   n   c   e    d    C   o   n   t   r   o

    l    &    R   o    b   o   t    i   c   s ,

    S   e   m   e   s   t   e   r    2 ,

    2    0    0    5   :    P   a   g   e   :    1    3

Tutorial w4, Q7

    M    E    T    R    4    2    0    2    /    7    2    0    2  –    A    A    d   v   a   n

   c   e    d    C   o   n   t   r   o    l    &    R   o    b   o   t    i   c   s ,

    S   e   m   e   s   t   e   r    2 ,

    2    0    0    5   :    P   a   g   e   :    1    4

Tutorial w4, Q7: Step 1. Desired Polynomial

We already have the desired polynomial from Q1

90.33495.010.11

5912.0)1.0(ln

)1.0ln(

100

%ln

100

%ln

2

2222

=−

=

=

=

+

−=

 

  

 +

 

  

 −

=

π 

ζ 

π 

π π 

ζ 

 p

n

T w

2.156.41

2

1

2

22

++=

++

ss

ss nn ω ζω 

6082.1996.44

1

)2.156.4)(40(

1232

+++=

+++ ssssss

The system is 3rd order. We have no zeros to cancel. Hence, weadd another pole at 40 (a decade above wn) where it has littleeffect on overshoot and peak time.

Page 8: Adv Control & Robotic Lec 4

8/14/2019 Adv Control & Robotic Lec 4

http://slidepdf.com/reader/full/adv-control-robotic-lec-4 8/23

    M    E    T    R    4    2    0    2    /    7    2    0    2  –    A    A    d   v   a   n   c   e    d    C   o   n   t   r   o

    l    &    R   o    b   o   t    i   c   s ,

    S   e   m   e   s   t   e   r    2 ,

    2    0    0    5   :    P   a   g   e   :    1    5

Tutorial w4, Q7: Step 2. Phase Variable-Form

u

 x

 x

 x

 x

 x

 x

asasasssssG

u

 x

 x

 x

aaa x

 x

 x

+

−−−

=

+++=

+++=

+

−−−

=

1

0

0

6116

100

010

1

6116

1)(

1

0

0

100

010

3

2

1

3

2

1

01

2

2

323

3

2

1

2103

2

1

Ax Bx

    M    E    T    R    4    2    0    2    /    7    2    0    2  –    A    A    d   v   a   n

   c   e    d    C   o   n   t   r   o    l    &    R   o    b   o   t    i   c   s ,

    S   e   m   e   s   t   e   r    2 ,

    2    0    0    5   :    P   a   g   e   :    1    6

Tutorial w4, Step 3: Controller Gains by Inspection

+−+−+−

=−

)6()11()6(

100

010

321 k k k 

K  B A  x x x

6.38

2.188

602

6082.1996.44

1

3

2

1

23

=

=

=

+++

sss

Desired Polynomial:

Controller gains inphase-variable form

Page 9: Adv Control & Robotic Lec 4

8/14/2019 Adv Control & Robotic Lec 4

http://slidepdf.com/reader/full/adv-control-robotic-lec-4 9/23

    M    E    T    R    4    2    0    2    /    7    2    0    2  –    A    A    d   v   a   n   c   e    d    C   o   n   t   r   o

    l    &    R   o    b   o   t    i   c   s ,

    S   e   m   e   s   t   e   r    2 ,

    2    0    0    5   :    P   a   g   e   :    1    7

Tutorial w4, Q7: Step 4. Transformation Matrix

The transformation matrix P to convert from cascade tophase-variable form

==

−==

−==

156

013

001

*

2561

610

100

][

111

310

100

][

1

2

2

 MX  MZ 

 x x x x x MX 

 z z z z z MZ 

C C P

 B A B A BC 

 B A B A BC 

    M    E    T    R    4    2    0    2    /    7    2    0    2  –    A    A    d   v   a   n

   c   e    d    C   o   n   t   r   o    l    &    R   o    b   o   t    i   c   s ,

    S   e   m   e   s   t   e   r    2 ,

    2    0    0    5   :    P   a   g   e   :    1    8

Tutorial w4, Q7: Step 5. Final Controller Gains

[ ]6.388.48.384

159

013

001

]6.382.188602[

1

−=

−=

=−PK K   x z

Page 10: Adv Control & Robotic Lec 4

8/14/2019 Adv Control & Robotic Lec 4

http://slidepdf.com/reader/full/adv-control-robotic-lec-4 10/23

    M    E    T    R    4    2    0    2    /    7    2    0    2  –    A    A    d   v   a   n   c   e    d    C   o   n   t   r   o

    l    &    R   o    b   o   t    i   c   s ,

    S   e   m   e   s   t   e   r    2 ,

    2    0    0    5   :    P   a   g   e   :    1    9

Tutorial w4, Q7: Verification

Peak time exactly 1.0 seconds

Overshoot exactly 10%.

    M    E    T    R    4    2    0    2    /    7    2    0    2  –    A    A    d   v   a   n

   c   e    d    C   o   n   t   r   o    l    &    R   o    b   o   t    i   c   s ,

    S   e   m   e   s   t   e   r    2 ,

    2    0    0    5   :    P   a   g   e   :    2    0

Limitations of state-feedback control

In practice, all the states x are not measured andavailable for feedback.

For mechanical systems, such as robots, the jointangles are typically measured but the velocities not.

Reducing the number of sensors reduces the cost of theoverall control system.

Hence, we need to develop methods for state-spacecontroller design when the only measurement is thescalar y.

Page 11: Adv Control & Robotic Lec 4

8/14/2019 Adv Control & Robotic Lec 4

http://slidepdf.com/reader/full/adv-control-robotic-lec-4 11/23

    M    E    T    R    4    2    0    2    /    7    2    0    2  –    A    A    d   v   a   n   c   e    d    C   o   n   t   r   o

    l    &    R   o    b   o   t    i   c   s ,

    S   e   m   e   s   t   e   r    2 ,

    2    0    0    5   :    P   a   g   e   :    2    1

State-feedback design using observers

A) Unforced observer B) Forced observer

Details offorced observer

    M    E    T    R    4    2    0    2    /    7    2    0    2  –    A    A    d   v   a   n

   c   e    d    C   o   n   t   r   o    l    &    R   o    b   o   t    i   c   s ,

    S   e   m   e   s   t   e   r    2 ,

    2    0    0    5   :    P   a   g   e   :    2    2

Unforced Observer

)ˆ(ˆ

)ˆ(ˆ

ˆˆˆˆ

xxC

xxAxx

xC

BxAx

Cx

BAxx

−=−

−=−

=

+=

=

+=

 y y

 yu

 y

u

The plant dynamics

The observer dynamics

The error dynamics.Note that the errorapproaches zero given by the

transient dynamics of A

xxe ˆ−=

This is not a particularly good observer; we want the error dynamicsto be much faster than the system dynamics.

Page 12: Adv Control & Robotic Lec 4

8/14/2019 Adv Control & Robotic Lec 4

http://slidepdf.com/reader/full/adv-control-robotic-lec-4 12/23

    M    E    T    R    4    2    0    2    /    7    2    0    2  –    A    A    d   v   a   n   c   e    d    C   o   n   t   r   o

    l    &    R   o    b   o   t    i   c   s ,

    S   e   m   e   s   t   e   r    2 ,

    2    0    0    5   :    P   a   g   e   :    2    3

Forced Observer

)ˆ)((ˆ

)ˆ(ˆ

)ˆ()ˆ(ˆ

ˆˆ

)ˆ(ˆˆ

xxLCAxx

xxC

LxxAxx

xC

LBxAx

Cx

BAxx

−−=−

−=−

−−−=−

=

−++=

=

+=

 y y

 y y

 y

 y yu

 y

u The plant dynamics

The forced observerdynamics

Forced error dynamics. Wecan now design the transientresponse of the error byplacing the poles of A-LC

    M    E    T    R    4    2    0    2    /    7    2    0    2  –    A    A    d   v   a   n

   c   e    d    C   o   n   t   r   o    l    &    R   o    b   o   t    i   c   s ,

    S   e   m   e   s   t   e   r    2 ,

    2    0    0    5   :    P   a   g   e   :    2    4

Observer Design vs. Controller Design

In controller design we placed the poles of A-BK

The phase-variable or the controller canonical formsmade feedback gain selection easy: by inspection

In observer design we will place the poles of A-LC

The observer canonical form will turn out to be ideal forobserver feedback gain selection: also by inspection

Page 13: Adv Control & Robotic Lec 4

8/14/2019 Adv Control & Robotic Lec 4

http://slidepdf.com/reader/full/adv-control-robotic-lec-4 13/23

    M    E    T    R    4    2    0    2    /    7    2    0    2  –    A    A    d   v   a   n   c   e    d    C   o   n   t   r   o

    l    &    R   o    b   o   t    i   c   s ,

    S   e   m   e   s   t   e   r    2 ,

    2    0    0    5   :    P   a   g   e   :    2    5

3rd Order Observer: Observer Canonical Form

Signal-flow chart forthe unforced observer

Signal-flow chart forthe forced observer

01

2

2

3

12

2

3)(asasas

bsbsbsG

+++

++=

    M    E    T    R    4    2    0    2    /    7    2    0    2  –    A    A    d   v   a   n

   c   e    d    C   o   n   t   r   o    l    &    R   o    b   o   t    i   c   s ,

    S   e   m   e   s   t   e   r    2 ,

    2    0    0    5   :    P   a   g   e   :    2    6

Observer Design Procedure

Desired Poles:

ObserverCanonicalForm

Here you see why

this form has the

advantage

Page 14: Adv Control & Robotic Lec 4

8/14/2019 Adv Control & Robotic Lec 4

http://slidepdf.com/reader/full/adv-control-robotic-lec-4 14/23

    M    E    T    R    4    2    0    2    /    7    2    0    2  –    A    A    d   v   a   n   c   e    d    C   o   n   t   r   o

    l    &    R   o    b   o   t    i   c   s ,

    S   e   m   e   s   t   e   r    2 ,

    2    0    0    5   :    P   a   g   e   :    2    7

Example 12.5: Observer Design

From Lecture Notes 3

Desired poles:

20136)4)(52(

))(2(

232

22

+++=+++=

+++

ssssss

 pswsws nnζ 

    M    E    T    R    4    2    0    2    /    7    2    0    2  –    A    A    d   v   a   n

   c   e    d    C   o   n   t   r   o    l    &    R   o    b   o   t    i   c   s ,

    S   e   m   e   s   t   e   r    2 ,

    2    0    0    5   :    P   a   g   e   :    2    8

Observer Canonical Form

1ˆˆˆ

)ˆ(ˆˆ

xxC

LBxAx

==

−++=

 y

 y yu

Page 15: Adv Control & Robotic Lec 4

8/14/2019 Adv Control & Robotic Lec 4

http://slidepdf.com/reader/full/adv-control-robotic-lec-4 15/23

    M    E    T    R    4    2    0    2    /    7    2    0    2  –    A    A    d   v   a   n   c   e    d    C   o   n   t   r   o

    l    &    R   o    b   o   t    i   c   s ,

    S   e   m   e   s   t   e   r    2 ,

    2    0    0    5   :    P   a   g   e   :    2    9

Ex 12.5: Characteristic Polynomial

    M    E    T    R    4    2    0    2    /    7    2    0    2  –    A    A    d   v   a   n

   c   e    d    C   o   n   t   r   o    l    &    R   o    b   o   t    i   c   s ,

    S   e   m   e   s   t   e   r    2 ,

    2    0    0    5   :    P   a   g   e   :    3    0

Ex 12.5: Desired Polynomial

20136)4)(52(

))(2(

232

22

+++=+++=

+++

ssssss

 pswsws nnζ 

Desired Poles from Example 12.4:

10 Times Faster wn:

500002500120)100)(50020(232

+++=+++= ssssss

This is the pole selection in the book,

alternatively cancel the zero at 4.

By inspection:

= 112,

= 2483,

= 49990

Page 16: Adv Control & Robotic Lec 4

8/14/2019 Adv Control & Robotic Lec 4

http://slidepdf.com/reader/full/adv-control-robotic-lec-4 16/23

    M    E    T    R    4    2    0    2    /    7    2    0    2  –    A    A    d   v   a   n   c   e    d    C   o   n   t   r   o

    l    &    R   o    b   o   t    i   c   s ,

    S   e   m   e   s   t   e   r    2 ,

    2    0    0    5   :    P   a   g   e   :    3    1

Observer Response

A) With observer feedbackgains L

B) With observer feedbackgains disconnected

    M    E    T    R    4    2    0    2    /    7    2    0    2  –    A    A    d   v   a   n

   c   e    d    C   o   n   t   r   o    l    &    R   o    b   o   t    i   c   s ,

    S   e   m   e   s   t   e   r    2 ,

    2    0    0    5   :    P   a   g   e   :    3    2

Observable and Non-Observable Systems

All the states influencethe output

The state x1 does notinfluence the output

Observability by inspection:Convert to parallel form by eigenvectors

Page 17: Adv Control & Robotic Lec 4

8/14/2019 Adv Control & Robotic Lec 4

http://slidepdf.com/reader/full/adv-control-robotic-lec-4 17/23

    M    E    T    R    4    2    0    2    /    7    2    0    2  –    A    A    d   v   a   n   c   e    d    C   o   n   t   r   o

    l    &    R   o    b   o   t    i   c   s ,

    S   e   m   e   s   t   e   r    2 ,

    2    0    0    5   :    P   a   g   e   :    3    3

The Observability Matrix: Analytic Approach

An nth-order plant whose state and output

dynamics are:

is completely observable if the matrix

is of rank n.

Cx

BAxx

=

+=

 yu

=

−1n

 M O

CA

CA

C

Compare

withcontrollability

matrix

    M    E    T    R    4    2    0    2    /    7    2    0    2  –    A    A    d   v   a   n

   c   e    d    C   o   n   t   r   o    l    &    R   o    b   o   t    i   c   s ,

    S   e   m   e   s   t   e   r    2 ,

    2    0    0    5   :    P   a   g   e   :    3    4

Example 12.6: Observability

Determine if the system above is observable!

32

3213

32

21

5

234

 x x y

u x x x x

 x x

 x x

+=

+−−−=

=

=

Page 18: Adv Control & Robotic Lec 4

8/14/2019 Adv Control & Robotic Lec 4

http://slidepdf.com/reader/full/adv-control-robotic-lec-4 18/23

    M    E    T    R    4    2    0    2    /    7    2    0    2  –    A    A    d   v   a   n   c   e    d    C   o   n   t   r   o

    l    &    R   o    b   o   t    i   c   s ,

    S   e   m   e   s   t   e   r    2 ,

    2    0    0    5   :    P   a   g   e   :    3    5

Example 12.6: A and C Matrices

[ ]150

234

100

010

=

−−−

= CA

The observability matrix:

−−−

−−=

=

91312

334

150

2

CA

CA

C

 M O

det(OM) = -344 ≠ 0 Hence, the system is observable

    M    E    T    R    4    2    0    2    /    7    2    0    2  –    A    A    d   v   a   n

   c   e    d    C   o   n   t   r   o    l    &    R   o    b   o   t    i   c   s ,

    S   e   m   e   s   t   e   r    2 ,

    2    0    0    5   :    P   a   g   e   :    3    6

Example 12.7: Unobservability

This system looksas if it could beobservable.

21

212

21

45

4

215

 x x y

u x x x

 x x

+=

+−−=

=

]45[

4

215

10=

−−= CA

−−=

=

1620

45

CA

C

 M O Rank is 1, not observable

Page 19: Adv Control & Robotic Lec 4

8/14/2019 Adv Control & Robotic Lec 4

http://slidepdf.com/reader/full/adv-control-robotic-lec-4 19/23

    M    E    T    R    4    2    0    2    /    7    2    0    2  –    A    A    d   v   a   n   c   e    d    C   o   n   t   r   o

    l    &    R   o    b   o   t    i   c   s ,

    S   e   m   e   s   t   e   r    2 ,

    2    0    0    5   :    P   a   g   e   :    3    7

Summary so far: Observers

We need observers for state-feedback control when notall the states x are measured.

First, check observability. If the system is observable,you can go on and design an observer.

Second, if the system is in observer canonical form, theobserver design is a simple gain matching by inspection.

If the system is not in observer canonical form, we needto first transform the model into this form.

    M    E    T    R    4    2    0    2    /    7    2    0    2  –    A    A    d   v   a   n

   c   e    d    C   o   n   t   r   o    l    &    R   o    b   o   t    i   c   s ,

    S   e   m   e   s   t   e   r    2 ,

    2    0    0    5   :    P   a   g   e   :    3    8

Transformation Matrix P

Original System: Transformed System:

Cz

BAzz

=

+=

 y

u

=

−1n

 MZ O

CA

CA

C

CPx

BPAPxPx

=

+=−−

 y

u11

P

APPCP

APPCP

CP

 MZ 

n

 MX  OO =

=

−−

11

1

)(

)(

Hence,

 MX  MZ  OO1−

=P

We now have two ways

of obtaining P: either via thecontrollability matrices orthe observability matrices

Page 20: Adv Control & Robotic Lec 4

8/14/2019 Adv Control & Robotic Lec 4

http://slidepdf.com/reader/full/adv-control-robotic-lec-4 20/23

    M    E    T    R    4    2    0    2    /    7    2    0    2  –    A    A    d   v   a   n   c   e    d    C   o   n   t   r   o

    l    &    R   o    b   o   t    i   c   s ,

    S   e   m   e   s   t   e   r    2 ,

    2    0    0    5   :    P   a   g   e   :    3    9

Transformation to Observer Canonical Form

[ ]001

000

100

010

001

0

1

2

1

=

=

 X 

n

n

 X 

a

a

a

a

CA

This is the observer canonical form (system X):

 MX  MZ  OO1−

=P

With this transformation matrixwe can transform any system Z

to the observer canonical form X

In Matlab: P = inv(obsv(Az,Cz)) * obsv(Ax,Cx)

Design gains in observer canonical form: Convert back to system ZLz = PLx

    M    E    T    R    4    2    0    2    /    7    2    0    2  –    A    A    d   v   a   n

   c   e    d    C   o   n   t   r   o    l    &    R   o    b   o   t    i   c   s ,

    S   e   m   e   s   t   e   r    2 ,

    2    0    0    5   :    P   a   g   e   :    4    0

Ex. 12.8: Observer Design by Transformation

Design an observer for the plant

represented in cascade form.

Let the closed-loop performance of the observer begoverned by the characteristic polynomial:

)5)(2)(1(

1)(

+++=

ssssG

50000250012023

+++ sss

Page 21: Adv Control & Robotic Lec 4

8/14/2019 Adv Control & Robotic Lec 4

http://slidepdf.com/reader/full/adv-control-robotic-lec-4 21/23

    M    E    T    R    4    2    0    2    /    7    2    0    2  –    A    A    d   v   a   n   c   e    d    C   o   n   t   r   o

    l    &    R   o    b   o   t    i   c   s ,

    S   e   m   e   s   t   e   r    2 ,

    2    0    0    5   :    P   a   g   e   :    4    1

Ex 12.8: Cascade Form

)5)(2)(1(

1)(

+++=

ssssG

u z z z z z

 z z z

+−=

+−=

+−=

33

322

211

2

5

[ ]001

100

120

015

=

= CA

    M    E    T    R    4    2    0    2    /    7    2    0    2  –    A    A    d   v   a   n

   c   e    d    C   o   n   t   r   o    l    &    R   o    b   o   t    i   c   s ,

    S   e   m   e   s   t   e   r    2 ,

    2    0    0    5   :    P   a   g   e   :    4    2

Ex 12.8: Observability Test

−=

=

1725

015

001

2CA

CA

C

 MZ O

Determinant equals 1Hence, observable

)5)(2)(1(

1)(

+++=

ssssG

Poles expanded:

1017823

+++ sss

Observer Canonical Form X

]001[

0010

1017

018

=

=  X  X  CA

−=

=

1847

018

001

2

 X  X 

 X  X 

 X 

 MX O

AC

AC

C

Page 22: Adv Control & Robotic Lec 4

8/14/2019 Adv Control & Robotic Lec 4

http://slidepdf.com/reader/full/adv-control-robotic-lec-4 22/23

    M    E    T    R    4    2    0    2    /    7    2    0    2  –    A    A    d   v   a   n   c   e    d    C   o   n   t   r   o

    l    &    R   o    b   o   t    i   c   s ,

    S   e   m   e   s   t   e   r    2 ,

    2    0    0    5   :    P   a   g   e   :    4    3

Ex 12.8: Observer Gains by Inspection

+−

+−

+−

=−

00)10(

10)17(

01)8(

3

2

1

l

l

l

 X  X  X  CLA

Characteristic Polynomial is:

)10()17()8(32

2

1

3 lslsls ++++++

50000250012023

+++ sss

Desired Polynomial is:

Observer design by coefficient matching

L1 = 112 L2 = 2483 L3 = 49990

    M    E    T    R    4    2    0    2    /    7    2    0    2  –    A    A    d   v   a   n

   c   e    d    C   o   n   t   r   o    l    &    R   o    b   o   t    i   c   s ,

    S   e   m   e   s   t   e   r    2 ,

    2    0    0    5   :    P   a   g   e   :    4    4

Example 12.8: Final Design

Convert observer gains back to original cascade form:Lorig = PLX = OMZ

-1 * OMX * LX = [ 112 2147 47619]T

Page 23: Adv Control & Robotic Lec 4

8/14/2019 Adv Control & Robotic Lec 4

http://slidepdf.com/reader/full/adv-control-robotic-lec-4 23/23

    M    E    T    R    4    2    0    2    /    7    2    0    2  –    A    A    d   v   a   n   c   e    d    C   o   n   t   r   o

    l    &    R   o    b   o   t    i   c   s ,

    S   e   m   e   s   t   e   r    2 ,

    2    0    0    5   :    P   a   g   e   :    4    5

Ex 12.8: Forced and unforced responses

Forced response

Response with observergains disconnected. This

response has the sametransient as the systemitself.

    0    2    /    7    2    0    2  –    A    A    d   v   a   n

   c   e    d    C   o   n   t   r   o    l    &    R   o    b   o   t    i   c   s ,

    S   e   m   e   s   t   e   r    2 ,

    2    0    0    5   :    P   a   g   e   :    4    6

Summary: Observer Design

The observer canonical form is used to find the observergains by inspection

As for state-space controller gains, the observer gainsneed to be transformed back to the original state-space

model using the transformation matrix P. For observer design, the transformation matrix P is

found from the observability matrices.

For controller design, the transformation matrix P isfound from the controllability matrices.

The observer poles should be typically designed 10times faster than the controller poles.

With the information in this lecture, you can nowproceed with the observer for the inverted pendulum