EEE 3153-Control System: Lecture-On State Space Modeling & Analysis
EEE 3153-Control System: Lecture-On State Space Modeling & Analysis
EEE 3153-Control System: Lecture-On State Space Modeling & Analysis
1
Introduction
• A modern complex system may have many inputs and
many outputs, and these may be interrelated in a
complicated manner.
• To analyze such a system, it is essential to reduce the
complexity of the mathematical expressions, and to
resort to computers for most of the tedious
computations necessary in the analysis.
• To overcome the aforesaid complexities, the state-space
approach is one of the best suited methods to analyze a
system.
State-Space Analysis
State-space analysis is a modern method to analyze control
systems, just like the transfer function approach. However, it has
several advantages over the transfer function approach, which
are given below:
• It is applicable for both linear time invariant and nonlinear
time variant systems.
• It takes the initial value into account.
• It is easy to analyze MIMO systems.
• Controllability and observability can be determined.
State-Space Analysis
The state and output equations can be expressed as follows:
x(t ) Ax(t ) Bu(t )
y(t ) Cx(t ) Du(t )
where 𝑥(𝑡) and 𝑥(𝑡) are state vector and differential state vector,
respectively, 𝑢(𝑡) and 𝑦(𝑡) are input vector and output vector,
respectively, A is the system matrix, B is the input matrix, C is the
output matrix, and D is the feed-forward matrix.
B C
A
Definitions
• State of a system: We define the state of a system at time t0 as the
amount of information that must be provided at time t0, which, together
with the input signal u(t) for t t0, uniquely determine the output of the
system for all t t0. (It is a group of variables which summarizes the
history of the system to predict the future values (outputs) )
• State Variable: The state variables of a dynamic system are the smallest
set of variables that determine the state of the dynamic system.
Example: Current flowing through the inductor, voltage across the
capacitor.
From the circuit, it can be seen that there are two storage elements. So, the number of state
variables is equal to two and these state variables are the current flowing through the
inductor i(t) and the voltage across the capacitor, 𝑣𝑐 (𝑡). From the circuit, it can also be seen
that the output voltage is equal to the voltage across the capacitor. So,
𝑣𝑜 (𝑡) = 𝑣𝑐 (𝑡)
Now, by applying KVL, we can write
𝑑𝑖(𝑡)
𝑣𝑖 (𝑡) = 𝑅𝑖 𝑡 + 𝐿 + 𝑣𝑐 (𝑡)
𝑑𝑡
which can be rewritten as follows:
𝑑𝑖 𝑡 1
= ,𝑣𝑖 𝑡 − 𝑅𝑖 𝑡 − 𝑣𝑐 (𝑡)-
𝑑𝑡 𝐿
1
The voltage across the capacitor is 𝑣𝑐 (𝑡) = 𝑐 𝑖 𝑡 𝑑𝑡.
Example-1
1
The voltage across the capacitor is 𝑣𝑐 (𝑡) = 𝑐 𝑖 𝑡 𝑑𝑡.
After differentiating above equation, it can be written as
𝑑𝑣𝑐 (𝑡) 1
= 𝑖(𝑡)
𝑑𝑡 𝑐
𝑑𝑖(𝑡)
𝑖(𝑡) 𝑑𝑡
State vector, 𝑋 = and Differential state vector, 𝑋 = .
𝑣𝑐 (𝑡) 𝑑𝑣𝑐 (𝑡)
𝑑𝑡
Therefore,
𝑑𝑖(𝑡)
𝑑𝑡 −𝑅/𝐿 −1/𝐿 𝑖(𝑡) 1/𝐿
𝑋= = + ,𝑣𝑖 (𝑡)-
𝑑𝑣𝑐 (𝑡) 1/𝑐 0 𝑣𝑐 (𝑡) 0
𝑑𝑡
𝑖(𝑡)
𝑦 = ,0 1-
𝑣𝑐 (𝑡)
Note: To convert a transfer function into state equations in phase variable form, we
first convert the transfer function to a differential equation by cross-multiplying and
taking the inverse Laplace transform, assuming zero initial conditions.
State Space Model from a Transfer Function
Now, let consider the following condition
𝑦 𝑡 = 𝑥1
𝑑𝑦(𝑡)
= 𝑥1 = 𝑥2
𝑑𝑡
𝑑 2 𝑦(𝑡)
= 𝑥2 = 𝑥3
𝑑𝑡 2
⋮
𝑑 𝑛−1 𝑦(𝑡)
= 𝑥𝑛−1 = 𝑥𝑛
𝑑𝑡 𝑛−1
𝑑 𝑛 𝑦(𝑡)
= 𝑥𝑛
𝑑𝑡 𝑛
Then from equation (A), it can be written as:
𝑥𝑛 + 𝑎𝑛−1 𝑥𝑛 + ⋯ 𝑎1 𝑥2 + 𝑎0 𝑥1 = 𝑏0 𝑢
It can be rewritten as:
𝑥𝑛 = −𝑎0 𝑥1 − 𝑎1 𝑥2 ⋯ − 𝑎𝑛−1 𝑥𝑛 + 𝑏0 𝑢
𝑠 2 + 𝑠 + 1 𝑌 𝑠 = 𝑈(𝑠)
Apply inverse Laplace transform on both sides
𝑑 2 𝑦(𝑡) 𝑑𝑦(𝑡)
+ + 𝑦 𝑡 = 𝑢(𝑡) (1)
𝑑𝑡 2 𝑑𝑡
Now, let consider the following conditions
𝑦 𝑡 = 𝑥1
𝑑𝑦(𝑡)
= 𝑥1 = 𝑥2
𝑑𝑡
𝑑 2 𝑦(𝑡)
2
= 𝑥2
𝑑𝑡
Then from equation (1), it can be written as: 𝑥2 = −𝑥1 − 𝑥2 + 𝑢
Example-2
The output equation is 𝑦 𝑡 = 𝑦 = 𝑥1
𝑥1 0 1 𝑥1 0
𝑋= = 𝑥 + ,𝑢-
𝑥2 −1 −1 2 1
𝑥1
𝑌= 1 0 𝑥
2
Example-3a: Transfer function having polynomial function of ‘s’ in Numerator
Find the state-space representation for the following transfer function
𝑌(𝑠) 𝑠+2
=
𝑈(𝑠) 𝑠 3 + 3𝑠 2 + 2𝑠 + 10
Solution: Let consider,
𝑋1 (𝑠) 𝑌(𝑠) 𝑠+2
× = 3
𝑈(𝑠) 𝑋1 (𝑠) 𝑠 + 3𝑠 2 + 2𝑠 + 10
Now consider,
𝑋1 (𝑠) 1
=
𝑈(𝑠) 𝑠 3 + 3𝑠 2 + 2𝑠 + 10
which can be written as follows:
(𝑠 3 +3𝑠 2 + 2𝑠 + 10)𝑋1 𝑠 = 𝑈(𝑠)
Taking inverse Laplace transform, it will yield
𝑋1 𝑡 + 3𝑋1 𝑡 + 2𝑋1 𝑡 + 10𝑋1 𝑡 = 𝑢(𝑡)
Select the state variables as:
𝑋1 𝑡 = 𝑥2 (𝑡) (a)
𝑋1 𝑡 = 𝑥2 𝑡 = 𝑥3 (𝑡) (b)
𝑋1 𝑡 = 𝑥2 𝑡 = 𝑥3 𝑡 = 𝑢 𝑡 − 3𝑥3 𝑡 − 2𝑥2 𝑡 − 10𝑥1 (𝑡) (c)
Example-3a: Transfer function having polynomial function of ‘s’ in Numerator
Find the state-space representation for the following transfer function
𝑌(𝑠) 𝑠+2
=
𝑈(𝑠) 𝑠 3 + 3𝑠 2 + 2𝑠 + 10
Solution: Let consider,
𝑋1 (𝑠) 𝑌(𝑠) 𝑠+2
× = 3
𝑈(𝑠) 𝑋1 (𝑠) 𝑠 + 3𝑠 2 + 2𝑠 + 10
Now consider,
𝑋1 (𝑠) 1
=
𝑈(𝑠) 𝑠 3 + 3𝑠 2 + 2𝑠 + 10
which can be written as follows:
(𝑠 3 +3𝑠 2 + 2𝑠 + 10)𝑋1 𝑠 = 𝑈(𝑠)
Taking inverse Laplace transform, it will yield
𝑋1 𝑡 + 3𝑋1 𝑡 + 2𝑋1 𝑡 + 10𝑋1 𝑡 = 𝑢(𝑡)
Select the state variables as:
𝑦(𝑡) = 𝑥1 (𝑡) (a)
𝑦(𝑡) = 𝑥2 (𝑡) (b)
𝑦 𝑡 = 𝑥3 (𝑡) (c)
Example-3a: Transfer function having polynomial function of ‘s’ in Numerator
Differentiating of equations (a)-(c), it will yield
𝑥1 𝑡 = 𝑦(𝑡) = 𝑥2 (𝑡) (d)
𝑥2 𝑡 = 𝑦 𝑡 = 𝑥3 (𝑡) (e)
𝑥3 𝑡 = 𝑦 𝑡 = 𝑢 𝑡 − 3𝑥3 𝑡 − 2𝑥2 𝑡 − 10𝑥1 (𝑡) (f)
Again,
𝑌(𝑠)
=𝑠+2
𝑋1 (𝑠)
which can be written as follows:
𝑌(𝑠) = (𝑠 + 2)𝑋1 𝑠
Taking inverse Laplace transform, it will yield
𝑦 𝑡 = 𝑋1 𝑡 + 2𝑋1 𝑡 = 𝑥2 (𝑡) + 2𝑥1 𝑡
The state-space model is
𝑥1 0 1 0 𝑥1 0
𝑥2 = 0 0 1 𝑥2 + 0 ,𝑢(𝑡)-
𝑥3 −10 −2 −3 𝑥3 1
𝑥1
𝑌 = 2 1 0 𝑥2
𝑥3
𝒀(𝒔) 𝒔𝟐 +𝟖𝒔+𝟓
Home work: Find A, B, C for =
𝑼(𝒔) 𝒔𝟑 +𝟏𝟎𝒔𝟐 +𝟐𝟎𝒔+𝟑𝟎
Example-3a: Transfer function having polynomial function of ‘s’ in Numerator
Again,
𝑌(𝑠)
=𝑠+2
𝑋1 (𝑠)
𝑌(𝑠) 5 5 20
Then = + −
𝑈(𝑠) 3𝑠 𝑠+2 3(𝑠+3)
Example-3b
From the figure, we can write
1
𝑈 𝑠 × = 𝑋1 𝑠 , ⇒ 𝑠𝑋1 𝑠 = 𝑈(𝑠)
𝑠
After taking inverse Laplace transform, we can write
𝑥1 (𝑡) = 𝑢(𝑡)
Again,
1
𝑈 𝑠 × = 𝑋2 𝑠 , ⇒ 𝑠 + 2 𝑋2 𝑠 = 𝑈(𝑠)
𝑠+2
𝑥2 𝑡 = −2𝑥2 𝑡 + 𝑢(𝑡)
Similarly,
𝑥3 𝑡 = −3𝑥2 𝑡 + 𝑢(𝑡)
The output equation is
5 20
𝑦 𝑡 = 𝑥1 + 5𝑥2 − 𝑥3
3 3
The state-space model is
𝑥1 0 0 0 𝑥1 1
𝑥2 = 0 −2 0 𝑥2 + 1 ,𝑢(𝑡)-
𝑥3 0 0 −3 𝑥3 1
𝑥1
𝑌 = 5/3 5 −20/3 𝑥2
𝑥3
Example-4
Example-4
Example-4
Relationship between Transfer Functions and State Equations
We know, the state-space model is
𝑥 = 𝐴𝑥 + 𝐵𝑢
𝑦 = 𝐶𝑥 + 𝐷𝑢
By taking Laplace transform, first equation can be written as:
𝑠𝑋 𝑠 = 𝐴𝑋 𝑠 + 𝐵𝑈 𝑠 ⇒ 𝑋 𝑠 = 𝑠𝐼 − 𝐴 −1 𝐵𝑈(𝑠) (1)
Again,
𝑌 𝑠 = 𝐶𝑋 𝑠 + 𝐷𝑈(𝑠) (2)
𝑠 −1
𝑌(𝑠) 1 𝑠+1 1 1
= 0 1 = 2
𝑈(𝑠) 𝑠 + 1 𝑠 − 1(−1) 0 𝑠 +𝑠+1
Example-6
Example-6
Example-6
Example-6
State matrix and solution of the LTI state equation
State transition matrix: The state-transition matrix is a matrix whose
product with the state vector x at the time t0 gives x at a time t, where t0
denotes the initial time. It is used to obtain the general solution of linear
dynamical systems.
Again, if x(0) is the initial value of x(t) and 𝜑(𝑡) is the state transition matrix then definitely
it will satisfy the following equation:
𝑥 𝑡 = 𝜑 𝑡 𝑥(0) (3)
Comparing equations (3) and (4), the state transition matrix can be expressed as follows:
𝜑 𝑡 = 𝐿−1 * 𝑆𝐼 − 𝐴 +−1 = 𝑒 𝐴𝑡 (5)
Solution of Homogeneous State Equation
From equation (5), it can be seen that the state-transition matrix is dependent only upon
the matrix A and, therefore, is sometimes referred to as the state-transition matrix of A.
3. φ −t = e−At = (eAt )−1 = (φ(t))−1 (It means that the state-transition process
can be considered as bilateral in time. That is, the transition in time can take place in
either direction.)
4. φ t1 + t 2 = eA(t1 +t2 ) = eAt1 eAt2 = φ t1 φ t 2
Solution of Non-Homogeneous State Equation
Solution of Non-Homogeneous State Equation
Example-8
Example-8
State-space modeling from differential equations
State-space representation of nth-order system for linear differential equations
Consider the following nth-order system:
𝑦 𝑛 + 𝑎1 𝑦 𝑛−1 + ⋯ + 𝑎𝑛−1 𝑦 + 𝑎𝑛 𝑦 = 𝑢 𝑡
where 𝑦(𝑡) is the output , 𝑢 𝑡 is the input of the system. Since the system is nth-order, then
it has n-integrators (state variables). Now, let us define n-state variable as follows:
𝑥1 = 𝑦
𝑥2 = 𝑦
⋮
𝑥𝑛 = 𝑦 𝑛−1
The output equation is 𝑦 𝑡 = 𝑥1 , then it can be written as
𝑥1 = 𝑥2
𝑥2 = 𝑥3
⋮
𝑥𝑛−1 = 𝑥𝑛
𝑥𝑛 = −𝑎𝑛 𝑥1 − ⋯ − 𝑎1 𝑥𝑛 + 𝑢
Above equations can be expressed as follows:
Example-2
• Consider the mechanical system shown in figure. We assume that
the system is linear. The external force u(t) is the input to the
system, and the displacement y(t) of the mass is the output. The
displacement y(t) is measured from the equilibrium position in the
absence of the external force. This system is a single-input, single-
output system.
𝑥1 𝑡 = 𝑦(𝑡)
𝑥2 𝑡 = 𝑦(𝑡)
Example-2
• Then we obtain
𝑥1 𝑡 = 𝑥2 (𝑡)
𝑏 𝑘 1
𝑥2 𝑡 = − 𝑦 𝑡 − 𝑦 𝑡 + 𝑢 (𝑡)
𝑚 𝑚 𝑚
• Or
𝑥1 𝑡 = 𝑥2 (𝑡)
𝑏 𝑘 1
𝑥2 𝑡 = − 𝑥2 𝑡 − 𝑥1 𝑡 + 𝑢 (𝑡)
𝑚 𝑚 𝑚
• The output equation is
𝑦 𝑡 = 𝑥1 𝑡
Example-2
𝑏 𝑘 1
𝑥1 𝑡 = 𝑥2 (𝑡) 𝑥2 𝑡 = − 𝑥2 𝑡 − 𝑥1 𝑡 + 𝑢 (𝑡) 𝑦 𝑡 = 𝑥1 𝑡
𝑚 𝑚 𝑚
• In a vector-matrix form,
x1 (t ) 0 1 x (t ) 0
x (t ) k b 1 1 u (t )
x2 (t )
2 m m m
x1 (t )
y (t ) 1 0
2
x (t )
Example-3
• State space representation of an armature Controlled DC Motor.
Ra La
B
ia
ea eb T J
dia
ea Ra ia La eb
dt
T J B
Example-3
T K t ia eb K b
J B-K t ia 0
dia
La Ra ia K b ea
dt
• Choosing 𝜃, 𝜃 𝑎𝑛𝑑 𝑖𝑎 as state variables
0
1 0
𝐵 𝐾𝑡 0
𝑑 𝜃 0 − 𝜃
0
𝜃 = 𝐽 𝐽 𝜃 + 1 𝑒𝑎
𝑑𝑡 𝑖 𝐾𝑏 𝑅𝑎 𝑖𝑎
𝑎
0 − − 𝐿𝑎
𝐿𝑎 𝐿𝑎
• Since 𝜃 is output of the system therefore output equation is given as
𝜃
𝑦 𝑡 = 1 0 0 𝜃
𝑖𝑎