Download as pdf or txt
Download as pdf or txt
You are on page 1of 16

AL3:1

436-433 Mechanical Systems


Part A: State-Space Systems
Lecture AL3

• Solution of state-space equations


AL3:2

Solution of state-space equations


x (t ) = Ax(t ) + Bu (t )

• First, recall results for scalar equation:


x (t ) = ax(t ) + bu (t )

• Laplace transforming:
sX ( s ) − x(0) = aX ( s ) + bU ( s )

(s − a ) X ( s ) = x(0) + bU ( s)

• Solve for transformed variable:


x(0) b
X (s) = + U ( s)
s−a s−a
AL3:3

• Hence, (transformed) solution is:


X ( s ) = (s − a ) x(0) + (s − a ) bU ( s )
−1 −1
(1)

• Now, {
L -1 (s − a )
−1
}= e at
exponential
a 2 t 2 a 3t 3 function
= 1 + at + + +L
2! 3!
• and L −1
{F1 ( s) F2 ( s)} = ò0 f1 (t − τ) f 2 (τ)dτ
t
convolution
integral
= f1 (t ) ∗ f 2 (t )

• Taking inverse Laplace transform of (1):


t
x(t ) = e x(0) + ò e a ( t − τ )bu ( τ) dτ
at
0

zero input solution zero state solution


AL3:4

• Now return to vector-matrix equation:


x (t ) = Ax(t ) + Bu (t )

• Laplace transforming as before:


sX( s ) − x(0) = AX( s ) + BU ( s )

(sI − A )X( s) = x(0) + BU( s)

• Solve for transformed state vector:


X( s ) = (sI − A ) x(0) + (sI − A ) BU ( s )
−1 −1
( 2)
AL3:5

X( s ) = (sI − A ) x(0) + (sI − A ) BU ( s )


−1 −1
( 2)

• It is easy to verify that:


I A A 2 A3
( sI − A ) = + 2 + 3 + 4 + L
−1

s s s s
{ } A A
2 2 3 3
t t
• Hence: L (sI − A ) = I + At +
−1
-1
+ +L
2! 3!

• By analogy with the scalar relationship


2 2 3 3
a t a t
e at = 1 + at + + +L
2! 3!
we introduce the notation
A 2t 2 A 3t 3
e At = I + At + + +L
2! 3!
AL3:6
At At 2 2 3 3
e At
= I + At + + +L
2! 3!
• If A is an (n × n) square matrix,
then eAt is also an (n × n) matrix,
called the matrix exponential.
• Note that: L {e } = ( sI − A )
At −1

• We have: X( s ) = (sI − A )−1 x(0) + (sI − A )−1 BU( s ) (2)

• Taking inverse Laplace transform of (2):


t
x(t ) = e x(0) + ò e A ( t − τ ) BU ( τ)dτ
At
0

zero input solution zero state solution


AL3:7

State transition matrix


• The matrix exponential eAt is also called the state
transition matrix Φ(t):
Φ(t ) = e At
• It describes the transition of the states from
initial conditions x(0) to those at time t, when
there is no input:
x(t ) = Φ(t )x(0)

• Note that Φ(t) satisfies:  (t ) = AΦ(t )


Φ
• Other properties of Φ(t):
Φ(0) = e A⋅0 = I Φ −1 (t ) = e − At = Φ(−t )
Φ(t1 + t 2 ) = e A ( t1 +t2 ) = Φ(t1 )Φ(t2 ) = Φ(t 2 )Φ(t1 )
[Φ(t )]n = e nAt = Φ(nt )
AL3:8

Computation of state transition matrix


• In principle, we can compute
A 2 2
t
Φ(t ) = e At = I + At + +L
2!
as a series, terminating when no significant change
observed
• Very simple example: double-integrator plant
– control orientation of satellite with thrusters
 Θ( s ) 1 θ, ω
EoM: Jθ = F ⋅ d = u , =
U ( s ) Js 2 F
States: x1 = θ, x2 = ω
J d
é0 1 ù é 0 ù
S-S eqns: x = ê ú x + ê 1 úu F
ë0 0 û ë J û
AL3:9
é0 1ù é0 1 ù é0 1 ù é 0 0 ù
Here: A = ê ú , A =ê
2
ú ê ú =ê ú
ë0 0û ë 0 0 ûë 0 0 û ë 0 0 û
é0 0ù
A =ê
n
ú ; n≥2
ë0 0û
Hence: Φ(t ) = I + At + 0
é1 0 ù é 0 1 ù é1 t ù
=ê ú +ê ú t =ê ú
ë0 1 û ë0 0 û ë0 1û
• Then, solution to homogeneous equation x (t ) = Ax(t )
with initial conditions x0 = [θ0 ω0]T is
é1 t ù é θ0 ù In practice, more
x(t ) = Φ(t )x(0) = ê ú êω ú
ë 0 1ûë 0 û sophisticated numerical
algorithms are employed to
é θ 0 + ω0 t ù compute the state transition
=ê ú
ë ω 0 û matrix
AL3:10
Laplace transform solution for state
transition matrix
• To illustrate method, consider example plant with
transfer function
Y ( s) 1 1
= 2 =
U ( s ) s + 3s + 2 ( s + 1)( s + 2)
• A state-space realisation is
é − 3 1 ù é0 ù
x = ê ú x + ê úu
ë − 2 0 û ë1 û
y = [1 0]x
• For this system
é1 0ù é − 3 1ù é s + 3 − 1ù
sI − A = s ê ú −ê ú =ê ú
ë 0 1 û ë − 2 0 û ë 2 s û
AL3:11

é1 0ù é − 3 1ù é s + 3 − 1ù
sI − A = s ê ú −ê ú =ê ú
ë 0 1 û ë − 2 0 û ë 2 s û
• Hence: é s 1 ù
ê− 2 s + 3ú
Φ ( s ) = ( sI − A ) = ë 2 û
−1

s + 3s + 2

é s 1 ù é −1 2 1 −1 ù
ê ( s + 1)( s + 2) ( s + 1)( s + 2) ú ês +1 + s + 2 +
s +1 s + 2ú
=ê ú =ê
−2 s+3 −2 2 2 −1 ú
ê ú ê + + ú
êë ( s + 1)( s + 2) ( s + 1)( s + 2) úû ës +1 s + 2 s +1 s + 2û

• Thus: {
Φ(t ) = L −1 (sI − A )
−1
}
é − e −t + 2e − 2t e −t − e − 2 t ù
=ê −t −2t ú
ë − 2 e + 2e 2e −t − e − 2t û
AL3:12
Computation of matrix exponential with
MATLAB Symbolic Math Toolbox
>> A = [-3 1; -2 0]; {
Φ(t ) = L −1 (sI − A )
−1
}
>> syms t é − e −t + 2e − 2t e −t − e − 2 t ù
=ê −t −2t ú
>> Phi = expm(A*t) ë − 2 e + 2e 2e −t − e − 2t û
Phi =
[ 2*exp(-2*t)-exp(-t), exp(-t)-exp(-2*t)]
[ -2*exp(-t)+2*exp(-2*t), -exp(-2*t)+2*exp(-t)]
• Can also compute numerical value with MATLAB fn
>> t = 1; expm(A*t) Type
ans = >> help expm
-0.0972 0.2325 to see remarks about
-0.4651 0.6004 numerical algorithm
AL3:13

Total system response


• Suppose a unit step input u(t) = 1(t)
é − 3 1 ù é0 ù
[U(s) = 1/s] is applied to the system x = ê ú x + ê úu
ë − 2 0 û ë1 û
• Total response is:
{
x(t ) = Φ(t )x(0) + L −1 (sI − A ) BU ( s )
−1
}
é s 1 ù
ê ( s + 1)( s + 2) ( s + 1)( s + 2) ú é0ù 1
(sI − A ) BU( s) = ê
−1
−2 s+3 úê ú
ê ú ë1û s
êë ( s + 1)( s + 2) ( s + 1)( s + 2) úû

N.B. é 1 ù é 1
− 1 2 ù
1
2
+
ê s ( s + 1)( s + 2) ú ê s s + 1 s + 2 ú +
y(t) = x1(t) =ê ú = ê3 − 2 1 ú
s+3
ê ú ê2 + + 2 ú
êë s ( s + 1)( s + 2) úû ë s s + 1 s + 2 û
é − e −t + 2e − 2t e −t − e − 2t ù é x1 (0) ù é 12 − e −t + 12 e −2t ù
Hence: x(t ) = ê −t − 2t −t −2t ú ê ú + ê3 −t 1 − 2t ú
ë − 2e + 2 e 2 e − e ûë 2 û ë2
x ( 0) − 2 e + 2e û
AL3:14

System responses using MATLAB


• Given an LTI object
G = ss(A,B,C,D)

• Initial condition response:


[y, t, x] = initial(G, x0, Tfinal);

• Impulse response:
[y, t, x] = impulse(G, Tfinal);

• Step response:
[y, t, x] = step(G, Tfinal);

• General input response:


[y, t, x] = lsim(G, u, t, x0);
AL3:15
MATLAB LTI Viewer
>> A=[-3 1;-2 0]; B=[0;1]; C=[1 0]; D=0;
>> G = ss(A, B, C, D);
>> ltiview(G)

customise layout

display response
characteristics
AL3:16
Total system response with Symbolic Math TB
é − e −t + 2e − 2t e −t − e − 2t ù é x1 (0) ù é 12 − e −t + 12 e −2t ù
x(t ) = ê −2t ú ê ú + ê3 ú
ë − 2e −t
+ 2 e − 2t
2e − e û ë x2 (0)û ë 2 − 2e −t + 12 e − 2t û
−t

{
x(t ) = Φ(t )x(0) + L −1 (sI − A ) BU ( s )
−1
}
• Zero input >> syms s, syms x10 x20 real
response: >> xZI = Phi*[x10; x20]
xZI =
[ (2*exp(-2*t)-exp(-t))*x10+(exp(-t)-exp(-2*t))*x20]
[ (-2*exp(-t)+2*exp(-2*t))*x10+(-exp(-2*t)+2*exp(-t))*x20]

• Zero state U=1/s;


response: xZS = ilaplace(inv(s*eye(2)-A)*B*U)
xZS =
[ 1/2-exp(-t)+1/2*exp(-2*t)]
[ 3/2+1/2*exp(-2*t)-2*exp(-t)]

You might also like