0% found this document useful (0 votes)
3 views

MEEN651-Notes4-distribution

This document provides lecture notes on state space models and solutions for control system design, focusing on definitions, representations, and solutions for linear time-invariant systems. It covers key concepts such as state variables, state vectors, and the general form of state space models, along with examples like the mass-spring-damper system. Additionally, it discusses the state transition matrix and methods for solving state equations using Laplace transforms.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

MEEN651-Notes4-distribution

This document provides lecture notes on state space models and solutions for control system design, focusing on definitions, representations, and solutions for linear time-invariant systems. It covers key concepts such as state variables, state vectors, and the general form of state space models, along with examples like the mass-spring-damper system. Additionally, it discusses the state transition matrix and methods for solving state equations using Laplace transforms.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 26

MEEN 651:

Control System Design

Lecture Notes 4 :
State Space Models and Solutions

Prabhakar R. Pagilla
[email protected]

Mechanical Engineering
Texas A&M University
College Station, TX 77843-3123
Phone: (979) 458-4829

1
Introduction

• Definitions of state, state variables, state vector, state


space, state trajectory, input and output
1
• State space representation of dynamic system model
• Solution for linear time-invariant (LTI) systems
• State transition matrix
• Transfer function from a state space model

Definitions

• State: The state of a dynamic system is a smallest set


of variables (called state variables) such that the
knowledge of these variables at initial time t = t0 ,
together with the knowledge of the input for t ≥ t0 ,
2 completely determines the behavior of the system for
t ≥ t0 .
• State Variables: The variables that make up the state
of the dynamic system. If n variables are required to
completely describe the behavior of the system, then
such n variables are a set of state variables
(x1 , x2 , . . . , xn ).

MEEN 651, Notes 4, Pagilla, Texas A&M University 2


• State Vector: The n-dimensional column vector, x,
composed of the state variables.
 
x1
 
x 
 2
x= . 
 .. 
 
3 xn
• State Space: The n-dimensional space whose
coordinate axes consist of x1 -axis, x2 -axis, . . .,
xn -axis.
Example: Second-order systems, n = 2, the
state-space is a two-dimensional space with x1 as the
abscissa and x2 as the ordinate.

• State Trajectory: The path representing the evolution


of the state in a state space.
• Inputs: Inputs describe the external excitation of the
4 dynamics, and are extrinsic to the system dynamics.
• Outputs: Outputs are functions of the state variables
and inputs; outputs are not independent variables;
outputs are often directly measured variables;

MEEN 651, Notes 4, Pagilla, Texas A&M University 3


General Form of State Space Model

• Assume that a system has n state variables, m


inputs and r outputs. Then the general form of the
state space model for the system is
ẋ1 (t) = f1 (x1 , x2 , . . . , xn ; u1 , u2 , . . . , um ; t)
5
ẋ2 (t) = f2 (x1 , x2 , . . . , xn ; u1 , u2 , . . . , um ; t)
..
.
ẋn (t) = fn (x1 , x2 , . . . , xn ; u1 , u2 , . . . , um ; t)
• The above first-order differential equations in the
state variables are called state differential equations
or state space equations.

• The outputs y1 (t), y2 (t), . . . , yr (t) are given by

y1 (t) = g1 (x1 , x2 , . . . , xn ; u1 , u2 , . . . , um ; t)
y2 (t) = g2 (x1 , x2 , . . . , xn ; u1 , u2 , . . . , um ; t)
..
.
yr (t) = gr (x1 , x2 , . . . , xn ; u1 , u2 , . . . , um ; t)
6
• In compact form, we can write the state differential equations
and outputs as

ẋ(t) = f (x, u, t)
y(t) = g(x, u, t)

where x(t) is the state vector, u(t) is the input vector, and
y(t) is the output vector.

MEEN 651, Notes 4, Pagilla, Texas A&M University 4


Linear Time-Invariant (LTI) State Space Model

• If the system dynamics is linear and time-invariant, then the


continuous-time state space model is of the form:

ẋ(t) = Ax(t) + Bu(t)


y(t) = Cx(t) + Du(t)

7 A: n × n state matrix
x: n × 1 state vector
B: n × m input matrix
u: m × 1 input vector
C: r × n output matrix
y: r × 1 output vector
D: m × m direct transmission matrix

• State space representation of LTI discrete-time systems:

x(k + 1) = Gx(k)+Hu(k)
y(k) = Cx(k)+Du(k)

Remarks

• State models are not unique. One can choose many different sets of
state variables to describe the system in state space form.
8
• Commonly used variables include:
– variables associated with energy storage elements;
– sets including one variable and its successive derivatives;
– variables that give a canonical form for the state space
representation.

MEEN 651, Notes 4, Pagilla, Texas A&M University 5


Mass-Spring-Damper System

x
k
9 m u(t)
b

• The state space model will depend on the set of state


variables that are chosen.

Variables Associated with Energy Storage Elements

• The variables associated with the energy storage elements are


the force in the spring Fk (t) and the velocity of the mass v(t).
10 • Elemental equations:

Fb (t) = bẋ(t) (1)


dFk (t)
= kv(t) (Fk (t) = kx(t)) (2)
dt
dv(t)
m = u(t) − Fb (t) − Fk (t) (3)
dt

MEEN 651, Notes 4, Pagilla, Texas A&M University 6


Choose state variables as

x1 = F k
x2 = v

State variable equations:

11 ẋ1 = kx2 (4)


1 b 1
ẋ2 = − x1 − x2 + u (5)
m m m
Output equation: Assuming that the displacement of the mass is
measured, the output equation is
1
y= x1 (6)
k

The matrix form of the state space model is


(with state variables associated with energy storage elements)
      
ẋ 0 k x 0
 1 =    1 +   u (7)
ẋ2 −m −m
1 b
x2 1
m
12 | {z } | {z } | {z } | {z }
ẋ A x B
 
h i x
0   + [0] u
1 1
y= (8)
k
| {z } x2 |{z}
C | {z } D
x

MEEN 651, Notes 4, Pagilla, Texas A&M University 7


Another Set of State Variables

• Choose state variables as

x1 = displacement of the mass,


x2 = velocity of the mass,
13
and assume the output is the displacement of the mass.
• Then the state variable and output equations are

ẋ1 = x2 (9)
k b 1
ẋ2 = − x1 − x2 + u (10)
m m m
y = x1 (11)

• The matrix form of the state space model is


(with displacement and velocity of the mass as state variables)
      
ẋ 0 1 x 0
 1 =    1 +   u (12)
ẋ2 −mk
−mb
x2 1
14 | {z } | {z
m
} | {z } | {z }
ẋ A x B
 
h i x
y = 1 0   + [0] u
1
(13)
| {z } x2 |{z}
C | {z } D
x

MEEN 651, Notes 4, Pagilla, Texas A&M University 8


Solution of State Equations

• Consider the first-order system given by:

ẋ(t) = ax(t) + bu(t), x(t0 ) = x0 (14)


15
• Solution: Multiply both sides by an integrating factor e−at
and rearrange to obtain

e−at ẋ(t) − e−at x(t) = e−at bu(t)


d  
e−at x(t) = e−at bu(t)
dt

• This may be integrated to obtain:


Z t Z t
d  −aτ 
e x(τ ) = e−aτ bu(τ )
t0 dτ t0
Z t
e−at x(t) − e−at0 x(t0 ) = e−aτ bu(τ )dτ
t0

• Rearranging will give the solution:


16 Z t
a(t−t0 )
x(t) = e x(t0 ) + ea(t−τ ) bu(τ )dτ (15)
t0

• Notice that the solution consists of two parts: the first part is
due to the initial state x(t0 ) and the second part is due to the
external input u(t).
• Also, the solution procedure does not restrict b to be
time-invariant. Therefore, b can be time-varying.

MEEN 651, Notes 4, Pagilla, Texas A&M University 9


• The development for the general system follows the same
procedure. For example,

ẋ(t) = Ax(t) + B(t)u(t), x(t0 ) = x0 (16)

where x(t) is the n-dimensional state vector.


• Solution:
17 Z t
A(t−t0 )
x(t) = e x(t0 ) + eA(t−τ ) B(τ )u(τ )dτ (17)
t0

• For higher-order systems (n > 1), eA(t−t0 ) is a n × n matrix


called the State Transition Matrix.
• The state transition matrix is denoted by Φ(t, t0 ), that is,

Φ(t, t0 ) := eA(t−t0 ) (18)

• The solution vector can be written as


Z t
x(t) = Φ(t, t0 )x0 + Φ(t − τ )B(τ )u(τ )dτ (19)
t0

• Properties of the state transition matrix:


– eAt is nonsingular for any t

18 – eA0 = I
– eAt1 eAt2 = eA(t1 +t2 )
– (eAt )−1 = e−At
• How does one compute eAt ?
• Consider the infinite series expansion of eat , that is,
(at)2 (at)3
e at
= 1 + at + + + ··· (20)
2! 3!

MEEN 651, Notes 4, Pagilla, Texas A&M University 10


• For the matrix case we have
(At)2 (At)3
eAt = In + At + + + ··· (21)
2! 3!
where In denotes the n × n identity matrix.
• If A is diagonal, for example
 
19 λ1 0 0
 
A=  0 λ2 0 ,
0 0 λ3

then  
eλ1 t 0 0
 
eAt = 
 0 eλ2 t 0 .

0 0 eλ3 t

• The closed-form of the state transition matrix is useful for


obtaining explicit analytical solutions of higher-order state
space models.
• The following is one method of obtaining the state transition
matrix in closed-form.
• Consider the Laplace transform of the Equation (16), which is

20 sX(s) − x(t0 ) = AX(s) + BU (s)

• Solving for X(s), we get

X(s) = (sIn − A)−1 x(t0 ) + (sIn − A)−1 BU (s) (22)

• If we take inverse Laplace transform of the above equation, we


get the solution as
{ } { }
x(t) = L−1 (sI − A)−1 x(t0 ) + L−1 (sI − A)−1 BU (s) .
(23)

MEEN 651, Notes 4, Pagilla, Texas A&M University 11


• Each term of Equation (23) must be equal to Equation (19) as
they represent the same solution.
• Comparing the first term of Equation (23) and Equation (19),
21 we obtain

eAt = L−1 (sI − A)−1 (24)

• Therefore, to compute the state transition matrix, we have to


first obtain the inverse of the matrix (sI − A) and then
compute the inverse Laplace transform.

Example

• Consider the second-order system with the following


system matrices:
" # " #
0 1 0 h i
A= , B= , C = 1 0 , D = 0 (25)
−1 0 1
22
Find the solution for the following cases:
" #
1
(1) x(0) = and u(t) = 0
1
" #
0
(2) x(0) = and u(t) = 1
0

MEEN 651, Notes 4, Pagilla, Texas A&M University 12


• First, we must obtain the state transition matrix
Φ(t, 0) for the system.
" # " #
1 0 0 1
sI − A = s −
0 1 −1 0
" # " # " #
s 0 0 1 s −1
23 = − =
0 s −1 0 1 s

• The inverse of the matrix (sI − A) is


 s 
" # 1
1 s 1  2+1 s2 + 1 
(sI − A)−1 = 2 =  s −1 s 
s + 1 −1 s
s2 + 1 s2 + 1

• The state transition matrix is given by



Φ(t, 0) = L−1 (sI − A)−1
    
−1
s 1
L L−1 
=  s + 1 
2 2
s + 1
 −1 −1 −1
s 
L L
24 s2 + 1 s2 + 1
" #
cos t sin t
=
− sin t cos t
• For the first case, the solution is
    
cos t sin t 1 cos t + sin t
x(t) = Φ(t, 0)x(0) =    =   (26)
− sin t cos t 1 cos t − sin t

MEEN 651, Notes 4, Pagilla, Texas A&M University 13


• For the second case, the solution is
Z t
x(t) = Φ(t − τ, 0)Bu(τ )dτ
0
Z t" #" #
cos(t − τ ) sin(t − τ ) 0
= dτ
25 0− sin(t − τ ) cos(t − τ ) 1
Z t" #
sin(t − τ )
= dτ
0 cos(t − τ )
"R t # " #
sin(t − τ )dτ 1 − cos t
= R 0t = (27)
0
cos(t − τ )dτ sin t

State Space Model to the Transfer Function

• Consider the state space model

ẋ = Ax + Bu, x(0) = x0
y = Cx + Du

26 • Taking the Laplace transform on both sides, and simplifying,


we have
−1 −1
X(s) = [sI − A] x0 + [sI − A] BU (s)
Y (s) = CX(s) + DU (s)

Therefore,
h i
−1 −1
Y (s) = C [sI − A] x0 + C [sI − A] B + D U (s)

MEEN 651, Notes 4, Pagilla, Texas A&M University 14


• Recall that the transfer function is the ratio of the Laplace
transform of the output to the Laplace transform of the input,
with all initial condition set to zero.
Therefore,
27 Y (s) −1
G(s) := = C [sI − A] B+D (28)
U (s)

• To compute the transfer function from the state space model,


one has to first compute the inverse of the matrix (sI − A),
and then multiply matrices as given by Equation (28).

Solution of LTI Discrete-Time State Equations

Consider the discrete-time system given below:

x(k + 1) = Gx(k) + Hu(k), x(0) = x0 (29)

Given x(0) and {u(0), u(1), · · · , u(k − 1)}, repeated application


28 of (29) gives

x(1) = Gx(0) + Hu(0)


x(2) = Gx(1) + Hu(1)
= G2 x(0) + GHu(0) + Hu(1)
..
.
x(k) = Gk x(0) + Gk−1 Hu(0)
+Gk−1 Hu(1) + · · · + Hu(k − 1)

MEEN 651, Notes 4, Pagilla, Texas A&M University 15


X
k−1
⇒ x(k) = G x(0) +
k
Gk−j−1 Hu(j) (30)
| {z }
j=0
xf ree (k) | {z }
xf orced (k)
29
• The first term in (30) is called the free response and shows how the
initial condition affects the state at time k.

• The second term in the right-hand-side of (30) is called the forced


response, which is the response due to the input.

State Transition Matrix (Discrete-Time Case)

The state transition matrix of a discrete-time system is


given by
Φ(k, j) = Gk−j
The free response can be written as
30

xf ree (k) = Φ(k, 0)x0


The forced response can be written as

X
k−1
xf orced (k) = Φ(k, j + 1)Hu(j)
j=0

MEEN 651, Notes 4, Pagilla, Texas A&M University 16


Properties of the state transition matrix:

Φ(k, k) = I
Φ(k, j) · Φ(j, l) = Φ(k, l)

31 Φ(k, j) = Φ−1 (j, k)

The last property holds only when det(G) ̸= 0.


Remark: Notice that when the initial state is xj (0) = 1
and xl (0) = 0, l ̸= j, the (i, j) element of
Φ(k, 0) = Gk is the i-th state variable, xi , at time k.

Explicit Computation of Gk

• G is diagonal
 
g11 0 0
32  
G =  0 g22 0 


0 0 g33
 
k
g11 0 0
 
Gk = 
 0
k
g22 0 
k
0 0 g33

MEEN 651, Notes 4, Pagilla, Texas A&M University 17


• G is in Jordan canonical form
 
λm 1 0
 
G=
 0 λm 1 

0 0 λm

33 Consider the state equation


x(k + 1) = Gx(k) (#)
or
x1 (k + 1) = λm x1 (k) + x2 (k) (31)
x2 (k + 1) = λm x2 (k) + x3 (k) (32)
x3 (k + 1) = λm x3 (k) (33)

• Recall the solution of (#): x(k) = Gk x(0).

• If we know the solution x(k) for some known x(0)


then we can find Gk .

34 • Recall that the (i, j) element of Gk is the i-th state


variable, xi (k), for xj (0) = 1 and xl (0) = 0 for
l ̸= j.

• The following procedure finds elements of the matrix


Gk by assuming specific initial conditions and finding
the solution of equations (31) to (33).

MEEN 651, Notes 4, Pagilla, Texas A&M University 18


• Case 1:
Consider the initial conditions:
x1 (0) = 1, x2 (0) = 0, and x3 (0) = 0, for the
equations (31) to (33).

35 x2 (k) and x3 (k) are zero for all k, which means that
the (2, 1) and (3, 1) element of Gk are zero for all k.

The (1,1) element of Gk = x1 (k).

x1 (k) = λkm x1 (0) = λkm .

• Case 2: For x1 (0) = 0; x2 (0) = 1; and x3 (0) = 0


x3 (0) = 0 for all k
x2 (k) = λkm x2 (0) = λkm

Considering x2 (k) as an input to the equation


x1 (k + 1) = λm x1 (k) + x2 (k)
36
The solution of the above difference equation is
X
k−1
k−j−1 j
x1 (k) = λm λm = kλk−1
m
j=0

Therefore, the (1,2) element of Gk is kλk−1


m , the (2,2)
element of G is λm , and the (3,2) element of Gk is
k k

zero.

MEEN 651, Notes 4, Pagilla, Texas A&M University 19


• Case 3: For x1 (0) = 0; x2 (0) = 0; and x3 (0) = 1

x3 (k) = λkm
x2 (k) = kλk−1
m
X
k−1
k(k − 1)
37 x1 (k) = λk−j−1
m jλj−1
m = λk−2
m
j=0
2
 
k(k−1) k−2
λkm kλk−1 λm
 m 2

Gk = 
 0 λkm kλk−1
m


0 0 λkm

G is not in diagonal or Jordan canonical form

How do we compute Gk if G is not in diagonal or Jordan


canonical form?
38 One way of finding Gk is to transform G matrix to a
diagonal or Jordan form.
• Consider the linear transformation of the states

x(k) = Tx∗ (k) or x∗ (k) = T−1 x(k)

where T is a nonsingular transformation matrix.

MEEN 651, Notes 4, Pagilla, Texas A&M University 20


Then

x(k + 1) = Gx(k) + Hu(k)


Tx∗ (k + 1) = GTx∗ (k) + Hu(k)
⇒ x∗ (k + 1) = T−1 GTx∗ (k) + T−1 Hu(k)

39 • Suppose we use a T such that T−1 GT is diagonal,


i.e.,
 
λ1 0 · · · 0
 
 0 λ ··· 0  λi ̸= λj
 2 
T−1 GT = Λ =  . .. . . 
.. 
 .. . . .  for i ̸= j

0 0 · · · λn

 
λk1 0 ··· 0
 
  λk2 · · · 
−1 k  0 0 
T GT = Λ = 
k
.. .. ... .. 
 . . . 
 
0 0 ··· λkn
Notice that
40
k   
T−1 GT = T−1 GT T−1 GT · · · T−1 GT
= T−1 Gk T

=⇒ T−1 Gk T = Λk
=⇒ Gk = TΛk T−1
• To find Gk , we have to find both λi´s and T.

MEEN 651, Notes 4, Pagilla, Texas A&M University 21


• λi´s are the eigenvalues of Λ, or roots of
Y
n
det(zI − Λ) = (z − λi ) = 0
i=1

Also,
 
41 det(zI − Λ) = det T (zI − Λ) T−1
 
= det zI − TΛT−1
= det [zI − G]

⇒ the eigenvalues of G and Λ are the same.


• T can be determined as follows:

TΛT−1 = G or TΛ = GT

Let  
| | |
 
T=
 v1 v2 · · · vn 

| | |
⇒ Gvi = λi vi

42 which implies that the i-th column of T is the


eigenvector vi of G.
• Eigenvectors of G can be computed using
(λi I − G) vi = 0, i = 1, 2, · · · , n (34)
Note that since det (λi I − G) = 0, vi cannot be
determined uniquely, that is, if vi satisfies (34), so
does αvi where α ̸= 0.

MEEN 651, Notes 4, Pagilla, Texas A&M University 22


Gk using inverse z-transformation:

Recall,
X(z) = (zI − G)−1 zx0 + (zI − G)−1 HU (z)

Also
43 X
k−1
x(k) = Gk x0 + Gk−j−1 Hu(j)
j=0

Comparing these two equations,


n o
−1 −1
G =Z
k
(zI − G) z

Sylvesters Expansion:


If f (G) is a polynomial function of G, f (G) = ck Gk , and eig(G)
k=0
are distinct, then f (G) can be expressed as

n
f (G) = f (λi )Fi
i=1

44 where λi is the i-th eigenvalue of G and



n
G − λj I
Fi =
λi − λj
j=1,j̸=i

Applying this theorem for Gk ,



n
Gk = λki Fi
i=1

MEEN 651, Notes 4, Pagilla, Texas A&M University 23


Examples

" #
0.7 0.3
G=
0.1 0.5

det(zI − G) = (z − 0.7) (z − 0.5) − (0.1) (0.3)


45
= z 2 − 1.2z + 0.32 = 0

⇒ λ1 = 0.8; λ2 = 0.4
• v1 corresponding to λ1 = 0.8 is given by
" #
0.1 −0.3
[0.8I − G] v1 = v1 = 0
−0.1 0.3

" #
3
⇒ v1 = α
1
• v2 corresponding to λ2 = 0.4 is given by
" #
46 −0.3 −0.3
[0.4I − G] v2 = v2 = 0
−0.1 −0.1
" #
1
⇒ v2 = β
−1

where α, β are arbitrary scaling constants.

MEEN 651, Notes 4, Pagilla, Texas A&M University 24


" #
h i 3α β
⇒T= v1 v2 =
α −β
" #
0.25/α 0.25/α
47 T−1 =
0.25/β −0.75/β

Gk = TΛk T−1
 
(0.75) (0.8)k + (0.25) (0.4)k (0.75) (0.8) − (0.75) (0.4)
k k
=  
(0.25) (0.8)k − (0.25) (0.4)k (0.25) (0.8)k + (0.75) (0.4)k

" #
σ ω
G=
−ω σ

det(zI − G) = (z − σ)2 + ω 2
= z 2 − 2σz + σ 2 + ω 2 = 0
48
λ1,2 = σ ± jω
= r · e±jθ

where
p  
ω
r = σ2 + ω2; θ = arctan
σ

MEEN 651, Notes 4, Pagilla, Texas A&M University 25


Normalized eigenvectors:
" # " #
1 1
v1 = √12 ; v2 = √12
j −j
" # " #
1 1 1 1 1 −j
49 T= √ and T−1 = √
2 j −j 2 1 j

Gk = TΛk T−1
" #
cos (kθ) sin (kθ)
= rk
− sin (kθ) cos (kθ)

MEEN 651, Notes 4, Pagilla, Texas A&M University 26

You might also like