State Space Analysis
State Space Analysis
Introduction
• State space analysis is an powerful and modern approach for the design
and analysis of control systems.
• The conventional or old methods for the design and analysis of control
systems is based on transfer function method.
• The transfer function method for design and analysis had many drawbacks
such as..
– Transfer function is defined under zero initial conditions
– Applicable to LTI systems
– SISO systems
– Does not provide the information regarding internal state of
the system
• Initial conditions can be incorporated in the system design
• State equations are highly compatible for simulation on analog or digital
computers
Advantages of state variable analysis.
This can be applicable to
• Linear systems
• Non-linear system
• Time variant systems
• Time invariant systems
• Multiple input multiple output systems
• This gives idea about the internal state of the
system
Concept
Input Output
SYSTEM
r(t) y(t)
u1(t) y1(t)
u (t) y (t)
Input vector U(t) = 2 ; Output vector Y(t) = 2
.. ..
um(t) yp(t)
x1(t)
x (t)
State variable vector X(t) = 2
..
xn(t)
State Equations
The state variable representation can be arranged
in the form of n number of first order differential
equations as shown below:
dx1
= x1ሶ = f1(x1,x2,….xn ; u1,u2…..um)
dt
dx2
= x2ሶ = f1(x1,x2,….xn ; u1,u2…..um)
dt
……
……
dxn
= xnሶ = f1(x1,x2,….xn ; u1,u2…..um)
dt
ሶ f(X(t),U(t))
In vector notation, X(t)=
Similarly the output vector Y(t) = f(X(t),U(t))
State Model of Linear System
The state model of a system consist of state equation and output
equation.
The state equation of a system is a function of state variables
and inputs.
For LTI systems, the first derivatives of state variables can be
expressed as a linear combination of sate variables and inputs
x1ሶ = a11x1+a12x2+----+a1nxn + b11u1+b12u2+---+b1mum
x2ሶ = a21x1+a22x2+----+a2nxn + b21u1+b22u2+---+b2mum
---
---
xnሶ = an1x1+an2x2+----+annxn + bn1u1+bn2u2+---+bnmum
where the coefficients aij and bij are constants
In the matrix form,
x1ሶ a11 a1n x1 b11 b1m u1
x2ሶ a21 ⋯ a2n x2 b21 ⋯ b2m u2
. = . . .. + . . ..
. ⋮ ⋱ ⋮ .. ⋮ ⋱ ⋮ ..
xnሶ an1 ⋯ ann xn bn1 ⋯ bnm um
Ẋ(t) = A X(t) + B U(t)……… state equation
where, A is state matrix of size (n×n)
B is the input matrix of size (n×m)
X(t) is the state vector of size (n×1)
U(t) is the input vector of size (m×1)
Output equation
The output at any time are functions of state
variables and inputs.
output vector, Y(t) = f(x(t), U(t))
Hence the output variables can be expressed as a
linear combination of state variables and inputs.
y1= c11x1+c12x2+----+c1nxn + d11u1+d12u2+---+d1mum
y2 = c21x1+c22x2+----+c2nxn + d21u1+d22u2+---+d2mum
---
---
yp = cp1x1+cp2x2+----+cpnxn + dp1u1+dp2u2+---+dpmum
where the coefficients cij and dij are constants
In the matrix form,
𝑦1 c11 c1n x1 d11 d1m u1
𝑦2 c21 ⋯ c2n x2 d21 ⋯ d2m u2
.. = . . .. + . . ..
.. ⋮ ⋱ ⋮ .. ⋮ ⋱ ⋮ ..
𝑦𝑝 cp1 ⋯ cpn xn dp1 ⋯ dpm um
di(t)
i(t) dt
State vector, X = ; Differential state vector, Xሶ =
vc(t) dvc(t)
dt
Arrange the differential equations and output equation into standard
form of state space model as,
di(t) −R −1
1
dt L L i(t)
Xሶ = = 1 + L vi(t)
dvc(t)
0 vc(t) 0
dt C
i(t)
Y= 0 1
vc(t)
d2y dẏ 𝑑𝑥2
𝑥3 = = =
dt2 dt 𝑑𝑡
⋮⋮⋮
d𝑛−1𝑦 𝑑𝑥𝑛−1
𝑥𝑛 = 𝑛−1 =
dt 𝑑𝑡
From the above equations we can write
x1ሶ = 𝑥2
xሶ 2 = 𝑥3
⋮⋮
xሶ 𝑛−1 = 𝑥𝑛
xሶ 𝑛 + 𝑎1𝑥𝑛 + …..+ 𝑎 𝑛−1𝑥2 +𝑎𝑛𝑥1 = 𝑢
xሶ 𝑛 = − 𝑎𝑛𝑥1 − 𝑎 𝑛−1𝑥2……..−𝑎1𝑥𝑛 + 𝑢
writing the above state equation in vector matrix form,
ሶ = AX(t) + Bu(t)
X(t)
x1ሶ 0 0 x1 0
x2ሶ ⋯ x2 0
= 0 0 + [u]
⋮ ⋱ ⋮ .
.
.
x𝑛ሶ −𝑎𝑛 ⋯ −𝑎1 x𝑛 1
x1(t) = y(t)
x1ሶ (t) = x2(t) = y(t)
ሶ -----(1)
x2ሶ (t) = x3(t) = 𝑦(t)
ሷ -----(2)
x3ሶ (t) = 𝑦ഺ(t)
ഺ
y(t) + 9y(t)ሷ + 26y(t) ሶ + 24 y(t) = 24u(t)
x3ሶ (t) + 9x3(t) + 26x2(t) + 24x1(t) = 24u(t)
x3ሶ (t) = - 24x1(t) - 26x2(t) - 9x3(t) + 24u(t)------(3)
Putting equations 1, 2 and 3 in matrix form,
x1ሶ 0 1 0 x1 0
x2ሶ = 0 0 1 x2 + 0 [u]
x3ሶ −24 −26 −9 x3 24
The output expression is y(t) = x1(t)
x1
= 1 0 0 x2
x3
Matlab
Obtain the state model of the system whose
Y(s) 24
transfer function is given by =
U(s) 𝑠3+9𝑠2+26𝑠+24
using Matlab
Problem
Obtain the state model of the system whose transfer function is
Y(s) 1
given by =
U(s) s2+s+1
Y(s) 1
Solution: =
U(s) s2+s+1
Let y(t) = x1
𝑑𝑦(𝑡)
= x2 = x1ሶ and u(t) = u
𝑑𝑡
Then the state equation is, x2ሶ = -x1-x2+u
The output equation is, y(t) = y = x1
The state space model is
x1ሶ 0 1 x1 0
xሶ = == + [u]
x2ሶ −1 − 1 x2 1
x1
Y= 1 0
x2
Problem
Obtain the state model of the system whose
s2+7s+2
transfer function is given by 3 2
s +9s +26s+24
Solution:
Y(s) s2+7s+2
=
U(s) s3+9s2+26s+24
Y(s) Y(s) C(s)
= x
U(s) C(s) U(s)
Y(s)
= s2 + 7s + 2 --------(1)
C(s)
C(s) 1
= -------(2)
U(s) s3+9s2+26s+24
C(s) 1
Consider equation (2), =
U(s) s3+9s2+26s+24
= e−t 0
e−t − e−2t e−2t
(iii) State Diagram:
The state equation is,
xሶ 1 = - x1 + u(t)
xሶ 2 = x1 – 2x2
The output equation is y = x1 + x2
Matlab
Find the transfer function using Matlab
Problem
The state equation of a LTI system is given as
0 5 1
xሶ = X+ u and y = [1 1] X
−1 −2 1
Determine (i) State transition matrix
(ii) The transfer function
(iii) State diagram
Solution
From the given system,
0 5 1
A= B= C= [1 1]
−1 −2 1
(i) The State transition matrix ,
∅(t) = L-1 [sI-A]-1
1 0 0 5 s −5
[sI – A] = s - =
0 1 −1 −2 1 s+2
s+2 5
s+2 5 1 s s+2 +5 s s+2 +5
[sI-A]-1 = = −1 s
−1 s s s+2 +5
s s+2 +5 s s+2 +5
s+1+1 5
s+1 2+22 s+1 2+22
= −1 s
s+1 2+22 s+1 2+22
s+1+1 5
s+1 2+22 s+1 2+22
= L-1 −1 s+1−1
s+1 2+22 s+1 2+22
1 5
e−t cos 2t + e−t sin 2t e−t sin 2t
2 2
= 1 1
− e−t sin 2t e−t cos 2t − e−t sin 2t
2 2
(ii) The transfer function
Y(s)
= C [SI-A]-1 B
U(s)
s+2 5 1 1
= [1 1]
−1 s s s+2 +5 1
1 S+7
= [1 1]
s s+2 +5 S−1
2S+6
=
s s+2 +5
Matlab
Find the transfer function using Matlab
Problem
Find the transfer function of a state model of a
system given by ,
0 1 0 0 0 u
xሶ = 0 0 1 X + 1 0 u1
2
−1 −2 −3 0 1
y1 1 0 0
and y = X
2 0 0 1
Solution
From the given system,
0 1 0 0 0
1 0 0
A= 0 0 1 ; B= 1 0 ;C =
0 0 1
−1 −2 −3 0 1
1 0 0 0 1 0
[sI-A] = s 0 1 0 - 0 0 1
0 0 1 −1 −2 −3
s −1 0
= 0 s −1
1 2 s+3
(s + 2)(s + 1) s+3 1
1
∴ [sI-A]-1 = −1 s(s + 3) s
s3+3s2+2s+1
−s −(2s + 1) s2
The transfer function of the system is given by
Y(s)
= C [SI-A]-1 B
U(s)
(s + 2)(s + 1) s+3 1 0 0
1 0 0 −1 s(s + 3) s
1
= 1 0
0 0 1 s3+3s2+2s+1
−s −(2s + 1) s2 0 1
s+3 1
1 0 0 s(s + 3) s 1
=
0 0 1 s3+3s2+2s+1
− 2s + 1 s2
s+3 1 1
=
− 2s + 1 s2 s3+3s2+2s+1
Matlab
Find the transfer function using Matlab
Problem
A linear time-invariant system is characterized
xሶ 1 1 0 x1
by state equation = . Compute
xሶ 2 1 1 x2
the solution of the state equation , assuming the
1
initial vector X0 =
0
Solution
1 0
From the given system, A =
1 1
The solution of state equation is,
X(t) = L-1 [sI-A]-1 X(0) + L-1 [SI-A]-1 B U(s)
Here U= 0
∴ X(t) = L-1 [sI-A]-1 X(0)
1 0 1 0 s−1 0
[sI – A] = s - =
0 1 1 1 −1 s−1
s−1 0 1
[sI-A]-1 = 2
1 s−1 s−1
s−1 0 1
[sI-A]-1 = 2
1 s−1 s−1
1
0
s−1
= 1 1
s−1 2 s−1
1. ∅(0) = I
2. ∅-1(t) = ∅(-t)
3. ∅(t2-t1) ∅(t1-t0) = ∅(t2-t0) for any t2, t1, t0
4. [∅(t)]k = ∅(kt)
5. ∅(t1+t2) = ∅(t1) ∅(t2) = ∅(t2) ∅(t1)
Problem
Compute the State transition matrix by infinite
0 1
series method A =
−1 −2
Solution: For the given system matrix A, the state
transition matrix is,
2 3
At At
∅ (t) = eAt = I + At + + +------
2! 3!
0 1
A=
−1 −2
2 0 1 0 1 −1 −2
A = A. A = . =
−1 −2 −1 −2 2 3
3 2 −1 −2 0 1 2 3
A = A .A = . =
2 3 −1 −2 −3 −4
2 3
At At
∅(t) = I + At + + +---
2! 3!
1 0 0 1 −1 −2 t2 2 3 t3
= + t+ + +- -
0 1 −1 −2 2 3 2! −3 −4 3!
t2 t3 t3
1 − + +⋯ t − t2 + + ⋯
2 3 2
= t 3
3t2
−t + t2 − + ⋯ 1 − 2t + + ⋯
2 2
−t −t
= e + te te−t
−te−t e−t − te−t
Problem
Find the state transition matrix by infinite series
1 1
method for the system matrix A =
0 1
Solution: For the given system matrix A, the
state transition matrix is,
2 3
At At
∅ (t) = eAt = I + At + + +------
2! 3!
1 1
A=
0 1
1 1 1 1 1 2
A2 = A.A = . =
0 1 0 1 0 1
1 2 1 1 1 3
A3 = A2. A= . =
0 1 0 1 0 1
2 3
At At
∅(t) = I + At + + + ---
2! 3!
1 0 1 1 1 2 t2 1 3 t3
= + t+ + + ---
0 1 0 1 0 1 2! 0 1 3!
t2 t3 t3
1+t+ + + ⋯ t + t2 + +⋯
2! 3! 2
= t2 t3
0 1+t+ + +. .
2! 3!
t
= e tet
0 et
References
1. Control Engineering by Nagrath & Gopal, New
Age International Publishers
2. Engineering control systems - Norman S. Nise,
John WILEY & sons , fifth Edition
3. Modern control Engineering-Ogata, Prentice
Hall
4. Automatic Control Systems- B.C Kuo, John
Wiley and Sons