Date post: | 14-Jul-2016 |
Category: |
Documents |
Upload: | mayank-kumar |
View: | 229 times |
Download: | 5 times |
Chapter 3 State-Variable Models
1
•State-Variable Models• State equations• State Variables of a Dynamic System• The concept of State• Form of the State Equations• The State Differential Equation• Transfer Function of a State Space Model• The State Transition Matrix• Characteristic Equation and Eigenvalues• Controllability & Observability
• The time-domain is the mathematical domain that incorporates the response and description of a system in terms of time, t.
State-Variable Models
Differential equations
Modeling
Nonlinear&Time Varying
LTI Transfer Function
Lapalce Transform
Inverse Lapalce Transform
Physicalsystem
State-VariableModels
State-VariableModels
(cause) (effect)
2
State-Variable Models
3
1 2
1 0 2 0 0
Consider this system shown in the above Figure. A set ofstate variables ( , , , ) for system is a set such that knowledge of the initial values of the state variables[ ( ), ( ), , ( )] at the
n
n
x x x
x t x t x t
…
… 0
1 2 0
initial time t and of the input signals ( ) and ( ) for will be sufficient to determine the future values of the outputs and state variables.
u t u t t t>
System (x)u(t)
Input
x(0) Initial conditions
y(t)
Output
The general form of a dynamic system is schematically shown as
State-Variable Models• State differential equations are an alternative way to describe
a dynamic system (i.e. time-domain method).
• The state-variable model, or state-space model is a particular differential equation model.
• Equations are expressed as n first-order coupled differential equations, but the choice of states is not unique
• All choices of state variables preserve the system’s input-output relationship (that of the transfer function)
4
State Equations
• Any nth order differential equation can easily be converted into a set of 1st order state equations for nonlinear or time-varying systems, the transfer function approach often breaks down.
• Most multivariable and many stochastic design methods are based on state equations
5
• For LTI systems, it is routine to move between state and transfer function representations i.e. between frequencyand time domains
The Concept of State
•Because the choice of states for a given system is not unique, we often choose states that represent physical measurements – voltages, velocity, position, etc.
• However, it may also be convenient to choose states that simplify the mathematical form of the state equations – for example the output and its derivatives – but are not easily measurable.
6
Form of the State EquationsThe state description always consists of two sets of equations, normally written in matrix form. The first set of equations describes the dynamics, and is a set of first order differential equations, each expressing the first derivative of a state as a function of all the (n) states and the (m) inputs (with no derivatives):
))(),(()(or
))(),(),()(),(()(
))(),(),()(),(()())(),(),()(),(()(
m121
m12122
m12111
tutxftx
tututxtxtxftx
tututxtxtxftxtututxtxtxftx
m
nnn
n
n
=
=
==
7
Form of the State Equations
))(),(()())(),(()(
tutxgtytutxftx
==
The second set of equations has no dynamics, and expresses the outputs as a function of the states and inputs:
))(),(()(or
))(),(),()(),(()(
))(),(),()(),(()())(),(),()(),(()(
m121
m12122
m12111
tutxgty
tututxtxtxgty
tututxtxtxgtytututxtxtxgty
npp
n
n
=
=
==
8
Linear Time Invariant Case
In this case, the functionsf and g become linearcombinations of x and ugiving the familiar form:
• If the are n states, m inputs, and p outputs, then A is square (nxn), B is (nxm), C is (pxn) and D is (pxm)
• For a single input, single output system, we have A square (nxn), B=b and is a (nx1) column vector, C=c is a (1xn) row vector, and D=d is a (1x1) scalar (often zero)
))()(()())()(()(
tu,txgtytu,txftx
==
DuCxyBuAxx
+=+=
9
1 11 1 12 2 1 11 1 1
2 21 1 22 2 2 21 1 2
1 1 2 2 1 1
n n m m
n n m m
n n n nn n n nm m
x a x a x a x b u b ux a x a x a x b u b u
x a x a x a x b u b u
= + +… + += + +… + +
= + +… + +
Form of the State Equations
1 2
The state of a linear time in-varying system is described by the set of firstorder differential equations written in terms of the state variables [ ... ]and can be written in general form as:
nx x x
1 11 12 1 111 1 1
2 21 22 2 2
11 2
nm
n
n nm mn n n nn n
x a a a xb b u
x a a a x
b b ux a a a x
= +
or in matrix form as follows:
Form of the State Equations1 11 12 1 1
11 1 12 21 22 2 2
11 2
nm
n
n nm mn n n nn n
x a a a xb b u
x a a a x
b b ux a a a x
= +
n: number of state variables, m: number of inputs.
The column matrix consisting of the state variables is called thestate vector and is written as
1
2
n
xx
x
x
=
Form of the State Equations1 11 12 1 1
11 1 12 21 22 2 2
11 2
nm
n
n nm mn n n nn n
x a a a xb b u
x a a a x
b b ux a a a x
= +
x A x Bu= +
1 11 12 111 1 1
2 21 22 2
11 2
, , ,
nm
n
n nm mn n n nn
x a a ab b u
x a a ax A B u
b b ux a a a
= = = =
Example:
State variables=?
)()()()(2
2tutky
dttdyb
dttydM =++
)()()()(12
2 tutkxtbxdt
tdxM =++
Thus the following two first-order DE’s
13
Mtutx
Mktx
Mb
dttdx
txdt
tdx
)()()()(
)()(
122
21
+−−=
=
1 1
2 2
0 1 0( )1
x xu tk bx x
M M M
= + − −
Example:how about ? )()()()()(
011
1
1 tutyadt
tdyadt
tydadt
tyda n
n
nn
n
n =++++ −
−
−
14
12
1
1 1 0 1
1 ( ( ))
nn
nn n
n
dx xdt
dx xdt
dx a x a x u tdt a
−
− −
=
=
= − + + +
111 2Let , , , .n
ndxdxx y x x
dt dt−= = =
1 1
2 2
0 1 1 1
0 1 00
0 0 0
1// / / n
n n n n n n
x xx xd u
dta
x a a a a a a x−
= +
The State Differential Equation
=
=
=
=
yy
xx
xyy
xx
x
2
1
2
1
)(2 2 tuyyyyy
+−−=
=
ωως
)(10
210
2 tuyy
yy
+
−−
=
ωςω
CxyBuAxx
=+=
)(2 2 tuyyy =++ ωως
[ ]01 10
210
2 =
=
−−
= CBAωςω
• Consider the second-order system:
Its state-space description is
With
15
Series RLC Circuit)()()( )( : 0v i tvtvtvtv CRL ++∑ ==
)()( )( tvRtidtdiLtv C++=
Cti
dtdv
dtdvCti CC )()( =⇔=
cvxix == 21 let
)()()( tvtvRtidtdiL C +−−=
Cti
dtdvC )( =
)(11 211 tv
Lx
Lx
LR
dtdx
+−−=
Cx
dtdx 12 =
ODE:
16
) : that(Notice 12 dt
dxx ≠
Series RLC Circuitcvxix == 21 let
11 2
2 1
1 1 ( ) dx R x x v tdt L L Ldx xdt C
= − − +
=
1 1
2 2
1 1( )
1 00 ux x
BA
Rx xL L v tLx x
C
− − = +
17
[ ] [ ] 12
2
If we let as the output, then = 0 1 , 0 1C C
xv C y x v
x
= = =
[ ] [ ] 11
2
If we let ( ) as the output, then = 1 0 , 1 0 ( ).x
i t C y x i tx
= = =
x Ax Bu= +
An RLC circuit. :0∑ =ii
RivdtdiL
itudt
dvCi
LcL
Lc
c
−=
−== )(
∑ = : 0v i
LcL
Lc
RiLRv
Ldtdi
tuC
iCdt
dv
−=
+−=
1
)(11
Lc ixvx == 21 let 21
2
21
1
)(11
xLRx
Ldtdx
tuC
xCdt
dx
−=
+−=
)( Lc iitu +=
RidtdiLvvv L
LoLc +=+=
18
An RLC circuit.Lc ixvx == 21 let
212
21
1
)(11
xLRx
Ldtdx
tuC
xCdt
dx
−=
+−=
19
1 1
2 2
1 10( )
1 0 ux x
BA
x xC u tCx xR
L L
− = + −
2( ) ( )oy t v t Rx= = ⇒
x Ax Bu= +
[ ]0c R=
[ ] 12 0
2
0 L
xy R Rx Ri v
x
= = = =
An RLC circuit.Lc ixvx == 21 let
212
21
1
)(11
xLRx
Ldtdx
tuC
xCdt
dx
−=
+−=
20
1 1
2 2
1 10( )
1 0 ux x
BA
x xC u tCx xR
L L
− = + −
2If we want ( ) ( )oy t v t Rx= = ⇒
x Ax Bu= +
[ ]0c R=
[ ] 12 0
2
0 L
xy R Rx Ri v
x
= = = =
What happen if is the output?Lv
An RLC circuit.Lc ixvx == 21 let
21
1 1
2 2
1 10( )
1 0 ux x
BA
x xC u tCx xR
L L
− = + −
What happen if is the output?Lv
1 1
2 1 1 2
let
c
L c o L
v x xv x v v x Ri x Rx
∗
∗
= =
= = − = − = −
*1 1
* * *2 1 2 1 2
1 1( ) ( )
x x
x x x x xR R
= ⇔
= + = +
[ ] 11 2 0
2
1 c L
xy R x Rx v v v
x
= − = − = − = ⇒
[ ]1c R= −
State Equation to SFG
LcL
Lc
RiLRv
Ldtdi
tuC
iCdt
dv
−=
+−=
1
)(11
1
2
let
c
L
x vx i
==
1 2
2 1 2
1 1 ( )
1
x x u tC C
Rx x xL L
= − +
= −
Output: .Rxtvty o 21 )()( ==
U(s) Vo(s)1x 2x
1x 2xs1
s1
RC1
C1
−
L1
LR
−
22
Inverted Pendulum on a Cart
State variables?
θMgLT =
23
Inverted Pendulum on a Cart
2 2
2 2( ) cosθ ( ) 0d y d θM m mL u tdt dt
+ + − =
The sum of the forces in the horizontal direction:
The sum of the torques about the pivot point:2 2
22 2 0d y d θmL mL mLg θ
dt dt+ − =
dttdxtx
dttdyxtyx )( )( )( )( 4321
θθ ====
mg
2
2
dtdlm θ
2 2
2 2( )d θ d ymLdt dt
← +
2 2
2 2( ) ( ) 0 for small d y d θM m m L u t θdt dt
+ + − =
24
Inverted Pendulum on a Cart
2 4( ) ( ) 0dx dxM m m l u tdt dt
+ + − =
The state variable for the second-order equations are:
The sum of the torques about the pivot point:
0 342 =−+ xg
dtdxl
dtdx
)()( 4321 dtd,,
dtdy,yx,x,x,x θθ=
25
Inverted Pendulum on a Cart2 4( ) ( ) 0dx dxM m m l u t
dt dt+ + − =
0342 =−+ xg
dtdxl
dtdx
)(32 tuxgm
dtdxM =+
23
1 ( )
1 ( ) (for )
dx m g x u tdt M M
u t M mM
= − +
≈ >>
dtdxgx
dtdxl 2
34 −=
26
(horizontal direction)
(about the pivot point)
2 4( ) ( ) 0dx dxM m m l u tdt dt
+ + − =
Inverted Pendulum on a Cart2 4( ) ( ) 0dx dxM m m l u t
dt dt+ + − =
0342 =−+ xg
dtdxl
dtdx
)(32 tuxgm
dtdxM =+
23
1 ( )
1 ( ) (for )
dx m g x u tdt M M
u t M mM
= − +
≈ >>
dtdxgx
dtdxl 2
34 −=
27
(horizontal direction)
(about the pivot point)
2 4( ) ( ) 0dx dxM m m l u tdt dt
+ + − =
(horizontal direction)
Inverted Pendulum on a Cart
0342 =−+ xg
dtdxl
dtdx
)(32 tuxgm
dtdxM =+
2 1 ( ) (for )dx u t M mdt M
≈ >>
28
(horizontal direction)
(about the pivot point)
43
1 ( ) 0dxu t l g xM dt
+ − =
0)(34 =+− tuxgM
dtdxlM
Inverted Pendulum on a Cart
)t(ulM
xlg
dtdx
xdt
dx
)t(uM
xM
gmdt
dx
xdtdx
1
1
34
43
32
21
−=
=
+−=
=
The four first-order differential equations:
CxyBuAxx
=+=
[ ]0100 =C29
0 1 0 00 0 00 0 0 10 0 0
mgM
gl
A−
=
1
1
0
0M
Ml
B
−
=
Transfer Function of a State Space Model
)()(A)( sBUsXssX +=
)()(C)()()(A)(
tDutxtytButxtx
+=+=
[ ] )()( sBUsXsI-A =
Taking the Laplace transform (assume zero initial conditions)
So,
[ ] 1( ) ( )X s sI A BU s−= −
)()(C)( sBUsXsY +=
30
)( ωσ js +=
Transfer Function of a State Space Model[ ] )()( 1 sBUsI-AsX −=
)()(C)( sBUsXsY +=Substituting into the output equation
Therefore, for single variable case, the transfer function of the system is
For multivariable case,
yields [ ] )()()(}{)( 1 sUsGsUDBsI-ACsY =+= −
)()()( sU/sYsG =
)()()( sU/sYsG jiij =
31
TF from State Space Model Example
3410
)()()( 2 ++
==sssU
sYsG
(a)
?)( =sG
A,B,C and D √
[ ] )()()(}{)( 1 sUsGsUDBsI-ACsY =+= −
[ ]xy
uxx
01010
4310
=
+
−−
=
32
TF from State Space Model Example
uxxx +−−= 212 43
110xy =
uyyy 1034 =++
10/10/
10/
12
12
1
yxxyxx
yx
====
=
3410
)()()( 2 ++
==sssU
sYsG
21 xx =
)(10)()34()(10)(3)(4)(
2
2
sUsYsssUsYssYsYs
=++
=++
(b)
?)( =sG[ ]xy
uxx
01010
4310
=
+
−−
=
Dynamics equation:
33
uxxx +−−= 212 43
TF from State Space Model Example
11
1
1)()()(
asasasUsYsG n
nn
n ++== −
+
11 1( ) ( ) ( )n n
n na s a s a Y s U s−+ + + =
L.F:
)()()()()(121
11 tutya
dttdya
dttyda
dttyda n
nnn
nn =++++ −
−
+
[ ]
+
==
− equation State
eqaution dyanmic:LF)()(
)(1 DBsI-ACsUsY
sG
34
TF from State Space Model Example
1
2 1
3 2
1
1
Let
n
n n
x yx x yx x y
d yx xdt
−
−
== == =
= =
1 2
1 1 2 21
1
1 ( );n n nn
x x
x a x a x a x ua
y x+
=
= − − − +
=
−−−
=
+++ 11211 ///100000010
nnnn aaaaaa
A
=
+1/1
00
na
B
[ ]001 =C D=?
? )()()()()(121
1
1 tutyadt
tdyadt
tydadt
tyda n
n
nn
n
n =++++ −
−
+
[ ] 1( )( )( )
Y sG s C sI - A B DU s
−= = + ⇒35
11 1
1 ( ) n nn n
G sa s a s a−
+
=+ + +
Realization of a Transfer Function,x Ax Bu y Cx Du= + = +• A state description is a
realization of G(s) if 1[ ] ( )C sI A B D G s−− + =
• A realization of G(s) is minimal if there exists no realization of G(s) of less order
• An LTI systems is observable if the initial state x(0) can be uniquely deduced from knowledge of u(t) and y(t) fort Є [0 T]
• An LTI system is controllable if for every x(t0) and every T >0, there exist u(t0+t), 0<t ≤ T such that x(t0+T) =0
36
From Transfer Function to State Space• For a given transfer function, there is no unique state
space realization
• Engineering dictates the use of a realization of leastorder, a minimal realization (A realization of G(s) is minimal if there exists no realization of G(s) of less order)
• A minimal realization is both controllable and observable
• All the possible A matrices for the different space realizations should have the same eigenvalues
37
[ ])()()( 1
sDsNDBsI-ACsG =+= −
0) Det( 0)( :Pole =⇒= sI-AsD
From Transfer Function to State Space
3)(1)( )()(1
)(63
6131
1
6)( ==⇔+
=+
=+
= sH,s
sGsGsH
sGs
s
ssT
2)(1)( )()(1
)(2
1121
1
)( ==⇔+
=+
=+
= sH,s
sGsGsH
sGs
s
ssT
Why & How?
1 2 1 2
15 5Δ 5( 1) 1 1( ) 5, 5 ,Δ Δ 1,Δ 1 51Δ 51 5
k kkP ssT s P P
s s ss
+ += = = = = = = = +
++
∑
1
1
5155
5)1(5)( −
−
+
+=
++
=ss
sssGc
38
From Transfer Function to State Space
1
1
5155
5)1(5)( −
−
+
+=
++
=ss
sssGc
39
1
1
12 1 2
ss s
−
−=+ +
1
1
6 63 1 3
ss s
−
−=+ +
From Transfer Function to State Space
1x
1x2x
2x
3x
3x
3211 063 xxxx ++−=
[ ]Xy
trxxx
xxx
X
001
)(150
5002020063
3
2
1
3
2
1
=
+
−−−
−=
=
State-variable differential equation:
]5)([5520 33212 xtrxxxx −++−=
)(500 3213 trxxxx +−−=
1xy =40
From Transfer Function to State Space
))()(()(
)3)(2)(5()1(30)(
)()(
321 sssssssq
sssssT
sRsY
−−−=
++++
==)3()2()5(
)()()( 321
++
++
+==
sk
sk
sksT
sRsY
1x
2x
3x
30 10 20 321 =−=−= kkk
State-variable differential equation:
)(111
300020005
3
2
1
3
2
1
trxxx
xxx
+
−−
−=
diagonal canonical form[ ]
=
3
2
1
3010-20- xxx
y41
The State Transition Matrix Φ(t)
How to compute this matrix?
nRtx ∈)(
42
The State Transition Matrix (u=0)
0)0()()(
)(
000
1
==−=∫=∫
==∈=⇒=
txetxttAx/xlnAdtx
dx
Adtx
dxAx
dt/dxRxifAxxAxx
At
• The state transition matrix satisfies the homogenous (i.e. zero-input) state equation.
• It represents the evolution of the system’s free response to non-zero initial conditions:
“zero input response”
x(0) is initial condition. Hence it is a constant.
Atet =)(φ
=?
)()( tAxtx =
)0((t))( xtx φ=
BuAxx += u=0
43
The State Transition Matrix (u=0)
• If , there is another way to find x(t) using Taylor series expansion
• Successive differentiation of gives:
0 At time
)(
32)3(
==
==
txAx
xAxAx
kk
nRtx ∈)(
Axx =
44
xAxAx 2==
)0()()( xttx φ=
The State Transition Matrix
+
+
++++=
++++=
kk
kk
txA!k
txA!
tAxx
tx!k
tx!
txxtx
)0(1)0(21)0()0(
)0(1)0(21)0()0()(
22
)(2
This series converges for all finite t. It is called the matrix exponential
)0()121( 22 xtA
!ktA
!AtI kk
+++++=
+++++= kkAt tA!k
tA!
AtIe 121 22
+++++= kkAt tA!k
tA!
AtIe 121 22
)0()( xetx At=45
The Matrix Exponential
122121 )( AtAtAtAtttA eeeee ==+
IeA =0
AtAt ee −− =1)( i.e. the matrix exponentialbehaves very much like thefamiliar scalar exponentialfunction. Note that A mustbe square.
T)( AttA eeT
=
AeAe AtAt =
AtAt Aeedtd
=
46
State Transition Matrix (u≠0) Φ(t)BuAxx +=
Buexedtd AtAt −− =)(
=∫ −t A dxe
dtd
0)( ττ
BueAxxe AtAt −− =− )(
∫ −+=∫+= −−tt tAAt dButxtBudexetx00
)( )()Φ()0()Φ()0()( τττττ
Atet =)Φ( 47
BuAxx =−
)0()( 0xetxe AAt −− − ∫= −t A dBue0
)( τττ
∫ −+=t
dButxttx0
)()Φ()0()Φ()( τττ
State transition Matrix (u≠0) –Φ(s)
Which compares with the time domain solution:
Let
BuAxx +=)()()0()( sBUsAXxssX +=−
)()()0()()( 11 sBUAsIxAsIsX -- −+−=
)()0()()( sBUxsXAsI +=−
1)()( -AsIs −=Φ)()()0()()( sBUsxssX ΦΦ +=
∫ −+=t
dτButxttx0
)()()0()()( ττΦΦ
Atet =)Φ( 48
)( ωσ js +=Can it exist?
State Transition Matrix
• Note that the system response has twocomponents:
• Natural response – “zero input response”due to initial conditions
• Forced response – “zero state response”due to input
• Overall response is the sum of the two components
BuAxx +=
∫ −+=t
dτButxttx0
)()()0()()( ττΦΦAtet =)Φ(
1)()( -AsIs −=Φ
49
Example
The time-domain state transition matrix can be obtained using the inverse Laplace transform
−−
=3120
A
+−
=−31
2 then
ss
AsI
−+=−=
ss
sAsIsΦ -
123
)Δ(1][ )( 1
)3)(1(232)3()Δ( with 2 ++=++=++= sssssss
50
Example
0,3 2211 == ααa=1,b=2
( ) ( 1)( 2)s s s∆ = + +
−+=−=
ss
sAsIsΦ -
123
)Δ(1][ )( 1
{ }
+−−+−−
== −−−−
−−−−
tttt
tttt-
eeeeeeeest 22
221
2222)( L)( Φφ
is response free the then11
)0( conditions inital Assuming
=x
)0()()( 2
2
== −
−
t
t
eexttx φ ttttt
ttttt
eeeeeeeeee
222
222
2222
−−−−−
−−−−−
=+−−
=+−−51
Example
Note that for otherinitial conditions,the phase planeplot will not be astraight line.
52
Characteristic Equation and Eigenvalues• Recall that, for a transfer function G(s)=N(s)/D(s),
the roots of the characteristic equation D(s)=0 are the poles of the system.
• Recall that the denominator of the transfer functionof a state-space representation is det(sI-A)
• The characteristic equation is then det(sI-A)=0• The roots of this equation are the eigenvalues of
the matrix A.
[ ] )()()(}{)( 1 sUsGsUDBsI-ACsY =+= −
For the stable system, the real parts of all the eigenvalues must be negative.
For the stable system, what must the egenvialues be ?
53
)( ωσ js +=
Controllability
DuCxyBuAxx
+=+= Theorem: This system is controllable if
and only if the following controllability matrix has rank n:
Note that for a single input system S will be an [n × n] square matrix and the rank test is that
][ 12 BABAABBS n−=
∆[S]≠0
54
Controllability Example
1 20 0
−?
=
−
−=
01
10
12BA
[ ]
:matrixility controllab
== ABBS
det S= 055
Observability
DuCxyBuAxx
+=+=
Theorem: This system is observable if and only if the following observability matrix has rank n:
TnCACACACV ][ 12 −=
56
Observability Example
1 02 0−
det V=
?
[ ]01 01
10
02=
=
−
−= CBA
:matrixity observabil
=
=CAC
V
057
Uncontrollable System
The state x2 cannot be affected by input u and henceis uncontrollable
58
Unobservable System
The state x2 does not affecte y and hence is unobservable
59
Controllability and Observability
60
Basic Idea of State Feedback
Consider the state feedback controller where is a constant feedback gain matrix
Then one can write
Whereas the poles of the open-loop system are given by the eigenvalues of A, the poles of the closed-loop systemare given by the eigenvalues of (A-BK).
BuAxx +=
rKxu +−=
BrxBKAr-KxBAxx
+−=++=
)( )(
61
State Feedback Design
-
Control system with state feedback
•The poles of the closed-loop system can be arbitrarily assigned if and only if the system is controllable
BrxBKAr-KxBAxx
+−=++=
)( )(
62
State Feedback Design•Often, states are not all measurable. Hence, it is
necessary to design an observer to construct them from the output vector.
• Such an observer can be designed if and only if the system is observable.
• The observed state is then used instead of the true state to generate the feedback.
63
State Variable Feedback
• Choice of feedback matrix gains allows the eigenvalues (or poles) to be assigned as we choose.
• Note that we have not addressed (yet) the issue of a reference input r.
• We shall be returning to state variable design later.
………and now back to transfer functions............
64