Professional Documents
Culture Documents
ST 11 StateSpace
ST 11 StateSpace
XI
1.1. Case A
th
Consider the following n -order differential equation:
y ( n ) ( t ) + a ⋅ y ( n − 1 ) ( t ) + K + a n − 1 ⋅ y ' ( t ) + a n ⋅ y ( t ) = u( t ) ,
123 1 1 424 3 123 123 (1.)
= x'n = xn = x2 = x1
x1 = y x1' = y
xn = y ( n − 1 ) x'n = y (n )
x1' = x2
'
x2 = x3
M . (3.)
x' = x
n −1 n
x'n = − a1 ⋅ xn − a2 ⋅ xn −1 − K − an −1 ⋅ x2 − an ⋅ x1 + u
Subsequently we rewrite the set of differential equations in matrix-vector form. To do so, let us define:
X = x1 A = 1 0 0 K 0 B = 0
x2 0 1 0 K 0 0
M , M M M K M , M . (4.)
xn − 1 0 0 0 K 1 0
x − a − a n −1 − an − 2 K
− a1 1
n n
ST/DA/Rev2009 1
State Space Representation of Dynamic Systems
⋅
X = A ⋅ X + B ⋅u . (5.)
y = C⋅ X . (6.)
Fig. 1: Liquid-Level with Interaction System.
Where: C = [1 0 0 0 ] .
th
In conclusion, the n -order differential equation (1.) is equivalent to a system of first-order differential
equations given by:
⋅
X = A ⋅ X + B ⋅u
. (7.)
y = C⋅ X
Example 1: The differential equation for the liquid-level system with interaction in Figure 1 is:
( )
R1 ⋅ C1 ⋅ R2 ⋅ C2 ⋅ q"2 + R1 ⋅ C1 + R2 ⋅ C2 + R2 ⋅ C1 ⋅ q'2 + q2 = q . (8.)
Where: R1 , R2 - the resistance for liquid flow of the valves 1 and 2, C1 ,C2 - the capacitance of the tank
1 and tank 2, respectively, q 2 - the deviation of the outflow rate of the liquid, and q 2 - the deviation of the
inflow rate of the liquid. Compute a state-space representation of the liquid-level system.
(i) input: u = q,
output: y = q2 ,
x1 = q 2 ,
state variables:
x 2 = q '2 = x1' ,
R1 ⋅ C1 + R2 ⋅ C2 + R2 ⋅ C1 ' 1 1
(ii) q{"2 = − ⋅ q{2 − ⋅ q{2 + ⋅q ⇒
R1 ⋅ C1 ⋅ R2 ⋅ C2 =x
R1 ⋅ C1 ⋅ R2 ⋅ C 2 = x1 R1 ⋅ C1 ⋅ R2 ⋅ C 2
{
= x'2 2 =u
x1' = x2
' R1 ⋅ C1 + R2 ⋅ C2 + R2 ⋅ C1 1 1 ,
x2 = − ⋅ x2 − ⋅ x1 + ⋅u
R1 ⋅ C1 ⋅ R2 ⋅ C2 R1 ⋅ C1 ⋅ R2 ⋅ C2 R1 ⋅ C1 ⋅ R2 ⋅ C2
(iii)
ST/DA/Rev2009 2
th
The n -order Differential Equations
' = 0 ⋅ x +
1 0 ⋅u
x1 1
1 R1 ⋅ C1 + R2 ⋅ C2 + R2 ⋅ C1 1
x'2 − R ⋅ C ⋅ R ⋅ C −
R1 ⋅ C1 ⋅ R2 ⋅ C2 x
1 1 2 2 2 R1 ⋅ C1 ⋅ R2 ⋅ C2
y = [1 0 ] ⋅ x1
x2
1.2. Case B
th
a. The notation of the n -order differential equation.
y (n )( t ) + a1 ⋅ y (n −1)( t ) + K + an −1 ⋅ y' ( t ) + an ⋅ y ( t ) =
. (9.)
(n ) ( n −1 )
= b0 ⋅ u ( t ) + b1 ⋅ u ( t ) + K + bn −1 ⋅ u ( t ) + bn ⋅ u ( t )
'
th
b. To convert the n -order differential equation (8.) into a set of first-order differential equations let us
introduce the state variables as linear combinations between the output, the input and their
derivatives.
x1 = y − β0 ⋅ u
(
x2 = x1' − β1 ⋅ u = y' − β0 ⋅ u' − β1 ⋅ u
14243
)
= x1'
2 (
x3 = x − β 2 ⋅ u = y − β0 ⋅ u" − β1 ⋅ u ' − β 2 ⋅ u
'
14442444
"
3
) . (10.)
= x'2
M
(
14444444 4244444444 3
)
xn = x'n −1 − β n −1 ⋅ u = y (n−1) − β0 ⋅ u (n −1) − β1 ⋅ u (n − 2 ) − K − β n − 2 ⋅ u ' − β n −1 ⋅ u
= x'n−1
β0 = b0 , (11.)
β1 = b1 − a1 ⋅ β0 ,
β 2 = b2 − a1 ⋅ β1 − a2 ⋅ β0 ,
β 3 = b3 − a1 ⋅ β 2 − a2 ⋅ β1 − a3 ⋅ β0 ,
β n = bn − a1 ⋅ β n −1 − K − an−1 ⋅ β1 − an ⋅ β0 .
Proof:
y ( n ) − β0 ⋅ u ( n ) − β 1 ⋅ u ( n − 1 ) − K − β n − 2 ⋅ u " − β n − 1 ⋅ u ' − β n ⋅ u ⋅ 1 ,
ST/DA/Rev2009 3
State Space Representation of Dynamic Systems
y' − β 0 ⋅ u ' − β 1 ⋅ u ⋅ a n − 1
y − β0 ⋅ u ⋅ a n
{
(
14243
) n−2
− β0 ⋅ u (n ) − β1 + a1 ⋅ β0 ⋅ u (n −1) − K − ∑ β k ⋅a(n − 2 )− k ⋅ u" −
=b0 =b1
1 442443
k =0
=bn−2
n −1 n
− ∑ β k ⋅a(n −1)− k ⋅ u' − ∑ β k ⋅an −k ⋅ u = 0
1 442443
k =0 1k =0
42
4 43 4
=bn−1 = bn
x1' = x2 + β1 ⋅ u , (12.)
x'2 = x3 + β 2 ⋅ u ,
x'n −1 = xn + β n −1 ⋅ u .
To obtain the last state equation we must express x'n with respect to the other state variables and the
command u . In the first place, let us compute x'n from the last equation in notation (9.),
Thirdly, the other derivatives of the response in the expression above may be expressed from the
notation (9.),
x'n = − a1 ⋅ xn − a2 ⋅ xn−1 − K − an ⋅ x1 + β n ⋅ u .
ST/DA/Rev2009 4
th
The n -order Differential Equations
x1' = 0 1 0 K 0 ⋅ x1 + β1 ⋅ u
'
x2 0 0 1 K 0 x2 β 2
M M M M K M M M . (13.)
'
xn −1 0 0 0 K 1 xn −1 β n −1
x' − a − an −1 − an − 2 K − a1 xn β n
n n
y = [1 0 K 0 0 ] ⋅ x1 + β0 ⋅ u
x2
M . (14.)
xn − 1
x
n
In condensed form, the expressions (12.) and (13.) may be written as follows.
⋅
X = A ⋅ X + B ⋅ u
. (15.)
y = C⋅ X + D ⋅u
Example 2: Compute a state-space representation for the simplified suspension system in Figure 2, with
the differential equation given in notation (16.).
Where: m - the automobile's body mass, D - the dumper constant, k - the spring constant, h0 - the
automobile body's displacement, and hi - the suspension rod displacement.
Proof: Rewrite the differential equation (16.) to emphasize the input/output variables.
D ' k D k
h0" + ⋅ h0 + ⋅ h0 = ⋅ hi' + ⋅ hi .
(i) m m m m
{ { { {
= a1 = a2 =b1 =b2
input variable: u = hi
ST/DA/Rev2009 5
State Space Representation of Dynamic Systems
output variable: y = h0
x1 = y − β0 ⋅ u
state variables:
x2 = x1' − β1 ⋅ u
β0 = b0 = 0
D
β1 = b1 − a1 ⋅ β0 =
coefficients: m
2
k D
β 2 = b2 − a1 ⋅ β1 − a2 ⋅ β0 = − 2
m m
D
x1' = x2 + ⋅u
m
D k k D2
x = − ⋅ x2 − ⋅ x1 + − 2 ⋅ u
'
2
m m m m
(iii)
y = [1 0 ] ⋅ x1
x2
ST/DA/Rev2009 6