Control Systems - uniroma1.itlanari/ControlSystems/CS - Lectures... · 2014. 12. 11. · Friday,...

34
Control Systems Structural properties & State space design L. Lanari preliminary version Friday, December 12, 2014

Transcript of Control Systems - uniroma1.itlanari/ControlSystems/CS - Lectures... · 2014. 12. 11. · Friday,...

Page 1: Control Systems - uniroma1.itlanari/ControlSystems/CS - Lectures... · 2014. 12. 11. · Friday, December 12, 2014. Lanari: CS - State space design 15 alternatively we can say that

Control Systems

Structural properties&

State space designL. Lanari

prelim

inary

versio

n

Friday, December 12, 2014

Page 2: Control Systems - uniroma1.itlanari/ControlSystems/CS - Lectures... · 2014. 12. 11. · Friday, December 12, 2014. Lanari: CS - State space design 15 alternatively we can say that

Lanari: CS - State space design 2

Outline

• introduce the controllability and observability matrices

• define controllable and observable system

• solve an eigenvalue placement problem for a controllable system (Ackermann formula)

• study the non fully controllable case and define stabilizable systems

Friday, December 12, 2014

Page 3: Control Systems - uniroma1.itlanari/ControlSystems/CS - Lectures... · 2014. 12. 11. · Friday, December 12, 2014. Lanari: CS - State space design 15 alternatively we can say that

Lanari: CS - State space design 3

rank�A− λiI B

�= n

What we know

rank

�A− λiI

C

�= n

¸i controllable

¸i observable

if all the eigenvalues are controllable, the system is controllable

if all the eigenvalues are observable, the system is observable

rank�B AB A2B . . . An−1B

�= n

rank

CCACA2

...CAn−1

= n

system is controllable

system is observable

equivalent conditions (Kalman)

(A, B ) controllable

(A, C ) observable

input-state interactiondoes not depend on C

state-output interactiondoes not depend on B

Friday, December 12, 2014

Page 4: Control Systems - uniroma1.itlanari/ControlSystems/CS - Lectures... · 2014. 12. 11. · Friday, December 12, 2014. Lanari: CS - State space design 15 alternatively we can say that

Lanari: CS - State space design 4

P =�B AB A2B . . . An−1B

�controllability matrix

we define the matrix

rank(P ) = n

and study the two cases rank (P ) = n and rank (P ) = m < n

if 1 input case P non-singular square matrix

P−1 exists

let ° be the last row of P−1 and define the matrix T as T =

γγA...

γAn−1

T is non-singular

T is such that TAT−1 = Ac TB = Bc

Bc =

0...01

Ac =

0 1 . . . 0...

. . . 00 0 . . . 1

−a0 −a1 . . . −an−1

controller

canonical

form

pA(λ) = λn + an−1λn−1 + · · ·+ a1λ+ a0with

Friday, December 12, 2014

Page 5: Control Systems - uniroma1.itlanari/ControlSystems/CS - Lectures... · 2014. 12. 11. · Friday, December 12, 2014. Lanari: CS - State space design 15 alternatively we can say that

Lanari: CS - State space design 5

w = Tx

w = Acw +Bcu

u = Fcw + v = FcTx+ v = Fx+ v

w = (Ac +BcFc)w +Bcv

+

+

v u

F

x

S

effect of a state feedback

Acl = Ac +BcFc

Fc =�f0 f1 . . . fn−1

Ac +BcFc =

0 1 . . . 0...

. . . 00 0 . . . 1

−a0 −a1 . . . −an−1

+

0...01

�f0 f1 . . . fn−1

state feedback

in w in x

Friday, December 12, 2014

Page 6: Control Systems - uniroma1.itlanari/ControlSystems/CS - Lectures... · 2014. 12. 11. · Friday, December 12, 2014. Lanari: CS - State space design 15 alternatively we can say that

Lanari: CS - State space design 6

Ac +BcFc =

0 1 . . . 0...

. . . 00 0 . . . 1

f0 − a0 f1 − a1 . . . fn−1 − an−1

{λ∗1,λ

∗2, . . . ,λ

∗n}

p∗A(λ) = (λ− λ∗1) . . . (λ− λ∗

n) = λn + αn−1λn−1 + · · ·+ α1λ+ α0

closed-loop dynamic matrix

if desired eigenvalues

fi = ai − αi i = 0, . . . , n− 1

therefore in the original coordinates u = Fx with F = FcT

but things get even simpler

choosing we assign the n eigenvalues

Friday, December 12, 2014

Page 7: Control Systems - uniroma1.itlanari/ControlSystems/CS - Lectures... · 2014. 12. 11. · Friday, December 12, 2014. Lanari: CS - State space design 15 alternatively we can say that

Lanari: CS - State space design 7

Th. Caley-Hamilton

Let A have the characteristic polynomial

pA(λ) = λn + an−1λn−1 + · · ·+ a1λ+ a0

then A satisfies its own characteristic polynomial that is

pA(A) = An + an−1An−1 + · · ·+ a1A+ a0I = 0

equivalentto CHAn = −an−1A

n−1 − · · ·− a1A− a0I

p∗(A) = An + αn−1An−1 − · · ·− α1A− α0I this is not

equal to 0since CH

does not holdp*(¸) is not the characteristic polynomial of A

Friday, December 12, 2014

Page 8: Control Systems - uniroma1.itlanari/ControlSystems/CS - Lectures... · 2014. 12. 11. · Friday, December 12, 2014. Lanari: CS - State space design 15 alternatively we can say that

Lanari: CS - State space design 8

F = FcT

F =�a0 − α0 a1 − α1 · · · an−1 − αn−1

γγA...

γAn−1

= γ�a0I + a1A+ · · ·+ an−1A

n−1

−(α0I + α1A+ · · ·+ αn−1An−1)

= γ [−An − (p∗(A)−An)]

= −γp∗(A)

F = −γp∗(A) Ackermannformula

Friday, December 12, 2014

Page 9: Control Systems - uniroma1.itlanari/ControlSystems/CS - Lectures... · 2014. 12. 11. · Friday, December 12, 2014. Lanari: CS - State space design 15 alternatively we can say that

Lanari: CS - State space design 9

what happens when the system is not controllable?

rank(P ) = m < n dim Range (P ) = dim Image (P ) = m

Im (P ) = subspace generated by m independent vectors

(we can choose as base m linearly independent columns of P)

Im (P ) = gen{v1, v1, ..., vm}

define a change of coordinates T such that

T−1 =�v1 v2 · · · vm vm+1 · · · vn

base of P completion(such that all the columnsare linearly independent)

Friday, December 12, 2014

Page 10: Control Systems - uniroma1.itlanari/ControlSystems/CS - Lectures... · 2014. 12. 11. · Friday, December 12, 2014. Lanari: CS - State space design 15 alternatively we can say that

Lanari: CS - State space design 10

under this change of coordinates z = Tx

A = TAT−1 =

�A11 A12

0 A22

�B = TB =

�B1

0

�m

m m

n - m

n - m n - m

C = CT−1 =�C1 C2

�no special structure

controllable

rank�B1 A11B1 A2

11B1 . . . Am−111 B1

�= m

(A11, B1)

eig�A�= eig

�A11

� �eig

�A22

Kalman decomposition w.r.t. controllability

Friday, December 12, 2014

Page 11: Control Systems - uniroma1.itlanari/ControlSystems/CS - Lectures... · 2014. 12. 11. · Friday, December 12, 2014. Lanari: CS - State space design 15 alternatively we can say that

Lanari: CS - State space design 11

partition z

z = Tx =

�z1

z2

z1 = A11z1 + A12z2 + B1u

z2 = A22z2

y = C1z1 + C2z2

m

n - m

z1 = · · ·

z2 = · · ·

controllablesubsystem

uncontrollablesubsystem

input output

Friday, December 12, 2014

Page 12: Control Systems - uniroma1.itlanari/ControlSystems/CS - Lectures... · 2014. 12. 11. · Friday, December 12, 2014. Lanari: CS - State space design 15 alternatively we can say that

Lanari: CS - State space design 12

controllablesubsystem

uncontrollablesubsystem

input m controllableeigenvalues ¸i

n - m uncontrollableeigenvalues ¸j

+ state feedback

u = F z + v = F Tx+ v =�F1 F2

� �z1z2

�+ v

hidden dynamics(hidden modes)

Friday, December 12, 2014

Page 13: Control Systems - uniroma1.itlanari/ControlSystems/CS - Lectures... · 2014. 12. 11. · Friday, December 12, 2014. Lanari: CS - State space design 15 alternatively we can say that

Lanari: CS - State space design 13

closed-loop system

+

+

v u

F

x

S

z = Az + Bu = (A+ BF )z + Bv

F2 = 0we can set since it does not affect the eigenvalues

(A+ BF ) =

�A11 A12

0 A22

�+

�B1

0

��F1 F2

=

�A11 + B1F1 A12 + B1F2

0 A22

eig�A+ BF

�= eig

�A11 + B1F1

� �eig

�A22

Friday, December 12, 2014

Page 14: Control Systems - uniroma1.itlanari/ControlSystems/CS - Lectures... · 2014. 12. 11. · Friday, December 12, 2014. Lanari: CS - State space design 15 alternatively we can say that

Lanari: CS - State space design 14

controllable(A11, B1)

the eigenvalues of the uncontrollable subsystem are fixed, no state-feedback is able

to move them

if we want to make the closed-loop system asymptotically stable (stabilize) with a

state feedback, either the eigenvalues of the uncontrollable subsystem (if any) are

already with negative real part (the system is said to be stabilizable) or the

problem has no solution

applying the result for controllable systems, we can

arbitrarily assign the m eigenvalues of the

controllable subsystem with

F1 = −γ1p∗1(A11)

in the original coordinates F = F T =�−γ1 p∗1(A11) 0

�T

Friday, December 12, 2014

Page 15: Control Systems - uniroma1.itlanari/ControlSystems/CS - Lectures... · 2014. 12. 11. · Friday, December 12, 2014. Lanari: CS - State space design 15 alternatively we can say that

Lanari: CS - State space design 15

alternatively we can say that a system (or a pair (A,B )) is stabilizable if every eigenvalue with

positive or null real part is controllable i.e.

rank�A− λiI B

�= n ∀λi / Re[λi] ≥ 0

note that stabilizability is a weaker requirement w.r.t. controllability (we need controllability

only for those eigenvalues which do not have negative real part)

Friday, December 12, 2014

Page 16: Control Systems - uniroma1.itlanari/ControlSystems/CS - Lectures... · 2014. 12. 11. · Friday, December 12, 2014. Lanari: CS - State space design 15 alternatively we can say that

Lanari: CS - State space design 16

ObservabilityGiven a system S with state x described by (A,B,C ) we want to find a dynamical system So with state » which reconstructs asymptotically the system’s state x that is, defining the error as e = » - x, we want

limt→∞

e(t) = limt→∞

[ξ(t)− x(t)] = 0

t

x (0)

» (0)

e (t)

x = Ax+Bu

y = CxPlant

Friday, December 12, 2014

Page 17: Control Systems - uniroma1.itlanari/ControlSystems/CS - Lectures... · 2014. 12. 11. · Friday, December 12, 2014. Lanari: CS - State space design 15 alternatively we can say that

Lanari: CS - State space design 17

x = Ax+Bu

y = CxPlant

First idea: since we know (A,B,C ) we just use a copy of the plant driven by the same input

Copy

How does the reconstruction error e = » - x change in time?

e = ξ − x = Aξ +Bu−Ax−Bu = A(ξ − x) = Ae

• either I know the initial state of the plant and I initialize the copy

in » (0) = x (0) so that e (0) = 0

• or the plant is asymptotically stable and therefore the error tends

to zero

ξ = Aξ +Bu

unsatisfactory solution

Friday, December 12, 2014

Page 18: Control Systems - uniroma1.itlanari/ControlSystems/CS - Lectures... · 2014. 12. 11. · Friday, December 12, 2014. Lanari: CS - State space design 15 alternatively we can say that

Lanari: CS - State space design 18

A

� xB C

+

+

yu

A

�B

+

+

»

Plant

Copy

we haven’t used the measured output y yet

Friday, December 12, 2014

Page 19: Control Systems - uniroma1.itlanari/ControlSystems/CS - Lectures... · 2014. 12. 11. · Friday, December 12, 2014. Lanari: CS - State space design 15 alternatively we can say that

Lanari: CS - State space design 19

we add a term which is proportional to the reconstructed output error (Cx - C»)

A

� xB C

+

+

yu

A

�B

+

+

»

K

Cyo

+-

+

asymptotic observer ξ = Aξ +Bu+K(Cx− Cξ)

yo = Cξ

Friday, December 12, 2014

Page 20: Control Systems - uniroma1.itlanari/ControlSystems/CS - Lectures... · 2014. 12. 11. · Friday, December 12, 2014. Lanari: CS - State space design 15 alternatively we can say that

Lanari: CS - State space design 20

the error now evolves as

e = ξ − x = Aξ +Bu+K(Cx− Cξ)−Ax−Bu

= (A−KC)(ξ − x) = (A−KC)e

and therefore the error converges asymptotically to zero if and only if all the eigenvalues of

the matrix (A - KC) have negative real part

• the plant S is asymptotically stable and we can choose K = 0 but then

convergence rate is fixed

• we can use K to assign the eigenvalues of (A - KC) and therefore

choose the convergence rate at which the error tends to zero. We need

to understand under which conditions this is possible and then how to

choose K

Friday, December 12, 2014

Page 21: Control Systems - uniroma1.itlanari/ControlSystems/CS - Lectures... · 2014. 12. 11. · Friday, December 12, 2014. Lanari: CS - State space design 15 alternatively we can say that

Lanari: CS - State space design 21

remember that in general

∃?K / eig(A−KC) = {λ∗1,λ

∗2, . . . ,λ

∗n}

eig(M) = eig(MT )

eig((A−KC)) = eig((A−KC)T ) = eig(AT − CTKT )

therefore

and definingA = AT B = CT F = −KT

eig(A−KC) = eig(A+ BF )

∃? F / eig(A+ BF ) = {λ∗1,λ

∗2, . . . ,λ

∗n}∃?K / eig(A−KC) = {λ∗

1,λ∗2, . . . ,λ

∗n} ⇔

arbitrarily iff controllable(A, B)

Friday, December 12, 2014

Page 22: Control Systems - uniroma1.itlanari/ControlSystems/CS - Lectures... · 2014. 12. 11. · Friday, December 12, 2014. Lanari: CS - State space design 15 alternatively we can say that

Lanari: CS - State space design 22

controllable is equivalent to(A, B)

rank(M) = rank(MT )since in general

∃K / eig(A−KC) = {λ∗1,λ

∗2, . . . ,λ

∗n}

if and only if

(A,C ) is observable or equivalently the plant is observable

rank�B AB · · · An−1B

�= rank

�CT ATCT · · · A(n−1)TCT

= rank

CCA...

CAn−1

= rank

�O�= n

is the observability matrixO

Friday, December 12, 2014

Page 23: Control Systems - uniroma1.itlanari/ControlSystems/CS - Lectures... · 2014. 12. 11. · Friday, December 12, 2014. Lanari: CS - State space design 15 alternatively we can say that

Lanari: CS - State space design 23

how do we choose K s.t. eig(A−KC) = {λ∗1,λ

∗2, . . . ,λ

∗n}

F = −γp∗(A)

γ the last row of �B AB · · · An−1B

�−1=

�CT ATCT · · · A(n−1)TCT

�−1= O

−T

being p∗(A) = p∗(AT ) = [p∗(A)]T

F = −γp∗(A) = −KT = −γ [p∗(A)]T

K = p∗(A)γT

where being

γT is the last column of the observability matrix inverse O−1

Friday, December 12, 2014

Page 24: Control Systems - uniroma1.itlanari/ControlSystems/CS - Lectures... · 2014. 12. 11. · Friday, December 12, 2014. Lanari: CS - State space design 15 alternatively we can say that

Lanari: CS - State space design 24

We can build an asymptotic observer So

{λ∗1,λ

∗2, . . . ,λ

∗n}

such that the observation error e = » - x decays exponentially to zero with assigned rate given

by the set of desired eigenvalues

if and only if the plant S is observable

The matrix K is given by K = p∗(A)γT

γT being the last column of the observability matrix inverse O−1

plant S

observer»

yu

ξ = Aξ +Bu+K(Cx− Cξ) = (A−KC)ξ +Bu+Ky

Friday, December 12, 2014

Page 25: Control Systems - uniroma1.itlanari/ControlSystems/CS - Lectures... · 2014. 12. 11. · Friday, December 12, 2014. Lanari: CS - State space design 15 alternatively we can say that

Lanari: CS - State space design 25

What happens if the plant S is not observable?

S is not observable the observability matrix is singular

rank(O) = m

the kernel or nullspace has dimension n - m

ker(M) = {v |Mv = 0}recall that

T−1 =�w1 · · · wm v1 v2 · · · vn−m

choose T such that

base of

completion(such that all the columnsare linearly independent)

subspaceker(O) = gen {v1, v2, . . . , vn−m}

ker(O)

Friday, December 12, 2014

Page 26: Control Systems - uniroma1.itlanari/ControlSystems/CS - Lectures... · 2014. 12. 11. · Friday, December 12, 2014. Lanari: CS - State space design 15 alternatively we can say that

Lanari: CS - State space design 26

under this change of coordinates z = Tx

m n - m

Kalman decomposition w.r.t. observability

A = TAT−1 =

�A11 0

A21 A22

�B = TB =

�B1

B2

C = CT−1 =�C1 0

rank

C1

C1A11

. . .C1A

m−111

= m (A11, C1)

no specialstructure

eig�A�= eig

�A11

� �eig

�A22

n - m

m

m n - m

observable⇔

Friday, December 12, 2014

Page 27: Control Systems - uniroma1.itlanari/ControlSystems/CS - Lectures... · 2014. 12. 11. · Friday, December 12, 2014. Lanari: CS - State space design 15 alternatively we can say that

Lanari: CS - State space design 27

z = Tx =

�z1

z2

�m

n - m

z1 = A11z1 + B1u

z2 = A21z1 + A22z2 + B2u

y = C1z1

z1 = · · ·

z2 = · · ·

observablesubsystem

unobservablesubsystem

input output

Friday, December 12, 2014

Page 28: Control Systems - uniroma1.itlanari/ControlSystems/CS - Lectures... · 2014. 12. 11. · Friday, December 12, 2014. Lanari: CS - State space design 15 alternatively we can say that

Lanari: CS - State space design 28

observablesubsystem

unobservablesubsystem

m observableeigenvalues ¸i

n - m unobservableeigenvalues ¸j

output

hidden dynamics(hidden modes)

what happens if we try to built an observer?

note that since now we are in the z coordinates, the observer built with the matrices obtained in this decomposition will try to reconstruct z so the new error will be

e = ξ − z

Friday, December 12, 2014

Page 29: Control Systems - uniroma1.itlanari/ControlSystems/CS - Lectures... · 2014. 12. 11. · Friday, December 12, 2014. Lanari: CS - State space design 15 alternatively we can say that

Lanari: CS - State space design 29

(A− KC) =

�A11 0

A21 A22

�−�K1

K2

��C1 0

=

�A11 − K1C1 0

A21 − K2C1 A22

eig�A− KC

�= eig

�A11 − K1C1

� �eig

�A22

we can set since it does not affect the eigenvaluesK2 = 0

˙ξ = Aξ + Bu+ K(Cz − C ξ) = (A− KC)ξ + Bu+ Ky

yo = C ξ

˙e = · · · = (A− KC)e

Friday, December 12, 2014

Page 30: Control Systems - uniroma1.itlanari/ControlSystems/CS - Lectures... · 2014. 12. 11. · Friday, December 12, 2014. Lanari: CS - State space design 15 alternatively we can say that

Lanari: CS - State space design 30

observable

the eigenvalues of the unobservable subsystem are fixed in the observer

applying the result for observable systems, we can

arbitrarily assign the m eigenvalues of the matrix

in the original coordinates, since z = T x, we also have

(A11, C1)

K1 = p∗(A11)γT1

A11 − K1C1

by choosing

ξ = T ξ

˙ξ = Aξ + Bu+ K(Cz − C ξ) = (A− KC)ξ + Bu+ Ky

ξ = T−1 ˙ξ = T−1(TAT−1 − KCT−1)T ξ + T−1TBu+ T−1Ky

= (A− T−1KC)ξ +Bu+ T−1Ky

= (A−KC)ξ +Bu+Ky

K = T−1Kwith and therefore

K = T−1

�p∗(A11)γT

1

0

Friday, December 12, 2014

Page 31: Control Systems - uniroma1.itlanari/ControlSystems/CS - Lectures... · 2014. 12. 11. · Friday, December 12, 2014. Lanari: CS - State space design 15 alternatively we can say that

Lanari: CS - State space design 31

if we want to reconstruct asymptotically the state of the plant, either the

eigenvalues of the unobservable subsystem (if any) are already with negative real

part (the system is said to be detectable) or the problem has no solution

alternatively we can say that a system (or a pair (A,C )) is detectable if every eigenvalue with

positive or null real part is observable i.e.

rank

�A− λiI

C

�= n ∀λi / Re[λi] ≥ 0

note that detectability is a weaker condition w.r.t. observability

Friday, December 12, 2014

Page 32: Control Systems - uniroma1.itlanari/ControlSystems/CS - Lectures... · 2014. 12. 11. · Friday, December 12, 2014. Lanari: CS - State space design 15 alternatively we can say that

Lanari: CS - State space design 32

We have seen that for a controllable and observable system we can

• design a state feedback u = F x which assigns the eigenvalues to A + BF

• design a dynamic system, the observer, which asymptotically reconstructs the

plant’s state at a desired rate since we can assign the eigenvalues to the matrix

A - KC which governs the observation error dynamics

the state is usually not measurable (at least not all its components) so we could

try to use the state estimate » instead of the real state in the feedback law, that is

u = F xu = F » instead of

with

ξ = (A−KC)ξ +Bu+Ky

What happens?

Friday, December 12, 2014

Page 33: Control Systems - uniroma1.itlanari/ControlSystems/CS - Lectures... · 2014. 12. 11. · Friday, December 12, 2014. Lanari: CS - State space design 15 alternatively we can say that

Lanari: CS - State space design 33

plant S

observer»

yuF

dynamic compensator

closed-loop system

x = Ax+BF ξ

ξ = KCx+ (A+BF −KC)ξ

�A BF

KC A+BF −KC

dynamics matrix no helpful structure

Friday, December 12, 2014

Page 34: Control Systems - uniroma1.itlanari/ControlSystems/CS - Lectures... · 2014. 12. 11. · Friday, December 12, 2014. Lanari: CS - State space design 15 alternatively we can say that

Lanari: CS - State space design 34

we do a change of coordinates, from (x, ») to (x, e) with e = » - x

x = Ax+BF (x+ e)

e = ξ − x = KCx+ (A+BF −KC)(x+ e)− [Ax+BF (x+ e)]

x = (A+BF )x+BFe

e = (A−KC)e

�A+BF BF

0 A−KC

eig(A+BF )�

eig(A−KC)

the dynamic output feedback controller can be designed by separately choosing F as if we

were solving a state feedback stabilization problem and K to make the estimation error decay

with a prescribed rate: this is the separation principle

Friday, December 12, 2014