Upload
fred
View
129
Download
5
Tags:
Embed Size (px)
DESCRIPTION
State transition matrix: e At. e At is an nxn matrix e At = ℒ -1 ((sI-A) -1 ), or ℒ (e At )=(sI-A) -1 e At = Ae At = e At A e At is invertible: (e At ) -1 = e (-A)t e A0 =I e At1 e At2 = e A(t1+t2). I/O model to state space. Controller canonical form is not unique - PowerPoint PPT Presentation
Citation preview
State transition matrix: eAt
• eAt is an nxn matrix • eAt =ℒ-1((sI-A)-1), or ℒ (eAt)=(sI-A)-1
• eAt= AeAt= eAtA
• eAt is invertible: (eAt)-1= e(-A)t
• eA0=I• eAt1 eAt2= eA(t1+t2)
dt
d
...!
1...
!3
1
!2
1
)0( :solution
3322
nnAt
At
tAn
tAtAAtIe
xex(t)
Axx
I/O model to state space• Controller canonical form is not unique
• This is also controller canonical form
1
1 1 01
1
1 1 01
1 2 1 0
1 2 1 0
1
1 0 0 0 0
0
0 1 0 0 0
0 0 1 0 0
[0]
n n
nn n
n
n n
n n
n n
d d dy a y a y a y
dt dt dtd d
b u b u b udt dta a a a
x x u
y b b b b x u
Solution of state space model
Recall: sX(s)-x(0)=AX(s)+BU(s)
(sI-A)X(s)=BU(s)+x(0)
X(s)=(sI-A)-1BU(s)+(sI-A)-1x(0)
x(t)=(ℒ-1(sI-A)-1))*Bu(t)+ ℒ-1(sI-A)-1) x(0)
x(t)= eA(t-τ)Bu(τ)d τ+eAtx(0)
y(t)= CeA(t-τ)Bu(τ)d τ+CeAtx(0)+Du(t)
DuCxy
BuAxx
t
0
t
0
Eigenvalues, eigenvectors
Given a nxn square matrix A, nonzero vector p is called an eigenvector of A if Ap p∝
i.e. λ s.t. Ap= λpλ is an eigenvalue of AFirst solve: det(λI-A)=0 for λThen solve: (λI-A)p=0 for p.
If λ1 ≠λ2 ≠λ3⋯Let P=[p1 p⋮ 2 p⋮⋯ n] P-1AP= D =diag(λ1, λ2, ⋯)
In Matlab: >> [P,D]=eig(A)Or better: >>[P,J]=jordan(A)
More Matlab Examples
>> s=sym('s');>> A=[0 1;-2 -3];>> det(s*eye(2)-A) ans = s^2+3*s+2 >> factor(ans)ans =(s+2)*(s+1)
22
I
>> [P,D]=eig(A)P = 0.7071 -0.4472 -0.7071 0.8944
D = -1 0 0 -2
>> [P,D]=jordan(A)P = 2 -1 -2 2
D = -1 0 0 -2
2,1 21
2
1
toscale
8944.0
4472.0
1
1
toscale
7071.0
7071.0
2
2
1
1
P
P
P
P
A = 0 1 -2 -3
>> exp(A)ans = 1.0000 2.7183 0.1353 0.0498
>> expm(A)ans = 0.6004 0.2325 -0.4651 -0.0972
>> t=sym('t') >> expm(A*t) ans = [ -exp(-2*t)+2*exp(-t), exp(-t)-exp(-2*t)][ -2*exp(-t)+2*exp(-2*t), 2*exp(-2*t)-exp(-t)]
32
10
ee
ee
32
10
e
At
tttt
tttt
eeeee
eeee
22
22
222
2
≠
tttt
tttt
tt
tt
tt
tt
tttt
At
tttt
ttttAt
eeee
eeee
ee
ee
ee
eeeeee
e
eeee
eeeee
dt
d
22
22
2
2
2
2
22
22
22
442
222
)}2(3
)(2{
)}22(3
)2(2{222
)(32
10
442
222)(
10
01
1222
1121 :0 t:check √
√
Similarity transformation
DDCPCBPBAPPA
uDxCy
DuxCPy
uBxAx
BuPxAPPx
BuxAPxP
xPxxPx
DuCxy
BuAxx
,,,
,let weIf
)(#
11
11
same
system
as(#)
Example
21
22
11
2
22
12
2
1
20
01
22
12,let
01
1
0
32
10
xxy
uxx
uxx
xy
uxx
PxPx
xy
uxx
diagonalized
decoupled
Invariance:
changednot seigenvalue & valueschar.
sformationafter tran changednot eq. char.or poly char.
)det(
)det()det()det(
))(det(
)det(
)det()det(
1
1
11
1
AsI
PAsIP
PAsIP
APPPsP
APPsIAsI
changed rseigenvectoBut
))((
)(
)(
)()(
])([
)(
)(
)()(
:functionTransfer
111
1
11111
111
1111
111
1
ABAB
sH
BAsICD
BPPAsICPPD
BPPAsIPCPD
BPAPPPsPCPD
BPAPPsICPD
BAsICDsH
Controllability:
n
nBBAABB
nABAABB
x
txtu
x
DuCxy
BuAxx
n
n
)BA-Irank(or
)1 is (if 0]|det[or
B])|||[rank( iff c.c. :Thm
time.finitein 0
to)( bringcan which )( control
,)0(any if lecontrollab completely is
1
12
Example:
01)det(or
2rank ind.linearly
231
10rank
3
1
|
|
1
0
1
0
32
10
|
|
1
0][
2
1
0 ,
32
10
ABB
ABB
n
BA
In Matlab:
>> S=ctrb(A,B)
>> r=rank(S)
If S is square (when B is nx1)
>> det(S)
122
11rank e.g.
]||[ 2 BAABBS
Observability
,)C
A-Irank(or
)1 is (if 0detor ,rank iff c.o. :Thm
0set can ,generality of lossWithout
(0). determine tous enablecan timefinite aover
)(),( of knowledge theif obserrable completely is
11
n
nC
CA
CA
C
n
CA
CA
C
u
x
tytu
DuCxy
BuAxx
nn
Example:
c.o.
01det(
10
01
32
1001
01
2
01 ,32
10
CA
C
CA
C
n
CA
In Matlab:
>> V=obsv(C,A)>> r=rank(V) rank must = n
Or if single output (ie V is square), can use>> det(V) det must be nonzero
2CA
CA
C
V
Lookfor controllability
Lookfor observability
Theorem• A state space model with A, B, C, D
matrices is both controllable and observable if and only if:
no pole/zero cancellation in D+C(sI-A)-1B
• If there is pole/zero canvellation– Either controllability is lost– Or observability is lost– Or both lost
)1
)(()0()()(;
0
0
1
)0()
))(()
0001output
1
0
0
331
100
010
)
3333
;;,,
33
11
11
1
3
2
1
3
2
1
3213
32
21
321
2
2
3
3
sBAsIxttxxc
AsIb
DC
uxxyy
BA
r
x
x
x
x
x
x
dt
da
rxxxyyyrydt
dx
xydt
dxx
dt
dxyxyxyx
rydt
dy
dt
yd
dt
yd
-
-
L
L
• (A, B) in controller canonical form, cntr
• (C, A) in observer canonical form, obsv
• But if we change C to [1 1 0]– H(s) = (s+1)/(s^3+3s^2+3s+1) = 1/(s+1)^2– Pole/zero cancellation.– But (A, B) still in contr canonical form, cntr– (C, A) no longer in obsv canonical form– Must have lost observability
– Can check obs. Matrix to verify.
• Controllability is invariant under similar transf.
)(rank
)(rank,min
)(rank),(rankmin)(rank
]|||[
]|||[
]|||[
]|||[after
]|||[ before :Proof
1
1
121
112111
111111
12
12
C
C
CC
CC
n
n
nC
nC
Q
Qn
QPQ
QPQ
BABAABBP
BAPBAPABPBP
BAPPAPPPBAPPPBP
BABABABQ
BABAABBQ
changednot ility Controllab
)(rank)(rank
)(rank)(rank
)(rank,min
)(rank),(rankmin
)(rank)(rank
But
)(rank)(rank1
CC
CC
C
C
CC
CC
CC
CC
Qn
QP
QPQ
QPQ
QPQ
• Observability is invariant under similar transf.
1
22
11
1
2
2
after
, before :Proof
PQQPQQ
PCA
CA
C
PCA
CAP
CP
APAPPCPP
APCPP
CP
AC
AC
C
Q
CA
CA
C
Q
OOOO
O
O
changednot ity Observabil
)(rank)(rank
)(rank),(rankmin
)(rank)(rank
)(rank
)(rank),(rankmin)(rank
1
1
OO
O
OO
O
OO
PQ
PQQ
Q
PQQ
State Feedback
law controlfeedback state a called is
:law the
Given
rkxu
DuCxy
BuAxx
B 1
s C
D
A
K
r u x xy
+ +
+ +
+
-
feedback from state x to control u
BkA
BkAA
DuCxy
BrxBkAx
BrBkxAx
rkxBAx
BuAxx
of thoseofeedback t state
by changed valuess/char.eigenvalue
tochangedMatrix only the
)(
)(
equation space state loop-closed
k
BkAnQC of choiceby any tochanged
becan of seigenvalue)(rank
i.e.
true.also is converse The
location.arbitrary
any toeigenvalueor valueschar.
thechangecan feedback statethen
lecontrollab completely is system theIf :Thm
In Matlab:
Given A,B,C,D
①Compute QC=ctrb(A,B)
②Check rank(QC)
If it is n, then
③Select any n eigenvalues(must be in complex conjugate pairs)
ev=[λ1; λ2; λ3;…; λn]
④Compute:
K=place(A,B,ev)
A+Bk will have eigenvalues at
Thm: Controllability is unchanged after state feedback.
But observability may change!