11 - State Space
11 - State Space
11 - State Space
Space
Modeling
STATE SPACE MODELING
Mathematical Model
Differential Equation
5
DEFINITIONS
State of a system: The state of a system at time t0 is 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.
State Variable: The state variables of a dynamic system are the smallest
set of variables that determine the state of the dynamic system.
D EFINITIONS
State of a system: The state of a system at time t is the amount of information
0
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.
State Variable: The state variables of a dynamic system are the smallest set of
variables that determine the state of the dynamic system.
State (t=t1)
State (t=t0)
State
State
Time ‘t’ to t1
State variable 7
State of system
DEFINITIONS
𝑑𝑥
𝑥2 𝑑𝑡
State
Vector 𝑥1
𝑥
Position
11
DEFINITIONS
State-Space Equations.
In state-space analysis three types of variables are involved in the
modeling of dynamic systems:
input variables,
output variables, and
state variables.
The state-space representation for a given system is not unique, except that the
number of state variables is the same for any of the different state-space
representations of the same system.
The dynamic system must involve elements that memorize the values of the input for t
….t1 .
Assume also that there are r inputs u1(t), u2(t), p , ur(t) and
m outputs y1(t), y2(t), …., ym(t).
Eq. 1
where
.
STATE DIFFERENTIAL EQUATION
Eq. 2
Eq. 3
The differential equation (3) is also commonly called the state equation.
The matrix A is an n x n square matrix, and B is an n x m matrix.
STATE DIFFERENTIAL EQUATION
Eq. 4
𝑑 2 𝑦(𝑡) 𝑑𝑦(𝑡)
𝑚 + 𝑏 + 𝑘𝑦(𝑡) = 𝑢(𝑡) . . . . . . . . . . . (1)
𝑑𝑡 2 𝑑𝑡
This system is of second order. This means that the system involves two
integrators.
EXAMPLE-1 (Mass Spring Damper system)
𝑑 2 𝑦(𝑡) 𝑑𝑦(𝑡)
𝑚 + 𝑏 + 𝑘𝑦(𝑡) = 𝑢(𝑡) . . . . . . . . . . . (1)
𝑑𝑡 2 𝑑𝑡
Step 2:Transforming the 2nd order differential equation into a set of two 1st
order differential state variable equations.
𝑑(𝑥1 ) 𝑥ሶ 1 = 𝑥2 = 𝑣 . . . . . . . . . (2)
=𝑣
𝑑𝑡
𝑑(𝑥2 ) 𝑑𝑣 𝑥ሶ 2 = 𝑣ሶ
=
𝑑𝑡 2 𝑑𝑡
𝑑2 𝑦(𝑡) 𝑏 𝑑𝑦(𝑡) 𝑘 1 𝑘 𝑏 1
= − − 𝑦(𝑡) 𝑢(𝑡) 𝑥ሶ 2 = − 𝑥1 − 𝑥2 + 𝑢(𝑡) . . . . . . . (3)
𝑑𝑡 2 𝑚 𝑑𝑡 𝑚 𝑚 𝑚 𝑚 𝑚
EXAMPLE-1 (Mass Spring Damper system)
Step 3: To elaborate the coefficient of state variable the equation (2) and equation (3) can be
rewritten as
𝑘 𝑏 1 𝑘 𝑏 1
𝑥ሶ 2 = − × 𝑥1 + − × 𝑥2 + × 𝑢(𝑡) . . . . . . . (3) 𝑥ሶ 2 = −
𝑚
𝑥1 − 𝑥2 + 𝑢(𝑡)
𝑚 𝑚
. . . . . . . (3)
𝑚 𝑚 𝑚
Step 4: rewritten the equation (2) and equation (3) in state space form
0 1 𝑥1 0
𝑥ሶ 1
= 𝑘 𝑏
𝑥 + 1 𝑢(𝑡) . . . . . . . . . . (4)
𝑥ሶ 2 − − 2
𝑚 𝑚 𝑚
𝑥1
𝑦= 1 0 𝑥 . . . . . . . . . . . . . . (5)
2
EXAMPLE-1 (Mass Spring Damper system)
𝑋ሶ = 𝐴𝑋 + 𝐵𝑈. . . . . . . . . . (6)
𝑌 = 𝐶𝑋 + 𝐷𝑈. . . . . . . . . . (7)
where
0 1
𝑋 = 𝑥1 𝑥2 ′
𝐴= 𝑘 𝑏 0
− − 𝐵= 1 𝑈 =u(t)
𝑚 𝑚
𝑚
𝐶= 1 1 𝐷=0
STATE SPACE MODELING
Consider again the mechanical system shown in Figure.
State-space equations for the system are given by Equations (6) and (7).
𝑋ሶ = 𝐴𝑋 + 𝐵𝑈. . . . . . . . . . (6)
𝑌 = 𝐶𝑋 + 𝐷𝑈. . . . . . . . . . (7)
STATE SPACE MODELING TO TRANSFER FUCCTION MODEL
We can obtain the transfer function for the system from the state-space equations.
By substituting A, B, C, and D into Equation (8), we obtain
det transpose
----------(8)
RLC STATE SPACE MODEL
Step-1: Select the state variables.
𝑣𝑐
𝑖𝐿
𝑖𝐿 = 𝑖𝑅 + 𝑖𝐶 𝑖𝐶 = −𝑖𝑅 + 𝑖𝐿
Applying KCL at Node-1
𝑑𝑣𝑐 1
𝐶 = − 𝑣𝐶 + 𝑖𝐿
𝑑𝑡 𝑅
𝑑𝑣𝐶 1 1
𝑑𝑡
= − 𝑅𝐶 𝑣𝐶 + 𝐶 𝑖𝐿 . . . . . . . . . (1)
RLC STATE SPACE MODEL
Step-2: Apply network theory, such as Kirchhoff's voltage and current
laws, to obtain ic and vL in terms of the state variables, vc and iL.
𝑑𝑖𝐿
𝑣(𝑡) = 𝐿 + 𝑣𝐶
𝑑𝑡
𝑑𝑖𝐿
𝐿 = −𝑣𝐶 + 𝑣(𝑡). . . . . . . . . . . (2)
𝑑𝑡
𝑣𝑐
𝑖𝐿
Step-3: Write equation (1) & (2) in standard form.
𝑑𝑣𝐶 1 1
=− 𝑣𝐶 + 𝑖𝐿
𝑑𝑡 𝑅𝐶 𝐶
𝑑𝑖𝐿 1 1 State
= − 𝑣𝐶 + 𝑣 𝑡 … … … . (2)
𝑑𝑡 𝐿 𝐿 Equations
RLC STATE SPACE MODEL
𝑑𝑣𝐶 1 1
= − 𝑅𝐶 𝑣𝐶 + 𝐶 𝑖𝐿 . . . . . . . . . (1) 𝑑𝑖𝐿 1 1
𝑑𝑡
= − 𝑣𝐶 + 𝑣 𝑡 … … … . (2)
𝑑𝑡 𝐿 𝐿
𝑑𝑣𝑐 1 1 𝑑𝑖𝐿 1 1
=− 𝑣𝐶 + 𝑖𝐿 + 0 𝑣(𝑡) = − 𝑣𝐶 + 0 𝑖𝐿 + 𝑣 𝑡 … … … . (2)
𝑑𝑡 𝑅𝐶 𝐶 𝑑𝑡 𝐿 𝐿
1 1
𝑑 𝑣𝑐 0
= 𝑅𝐶 𝐶 𝑣𝑐 + 1 𝑣(𝑡)
𝑑𝑡 𝑖𝐿 1 𝑖𝐿 𝑣𝑐
− 0 𝐿 𝑖𝐿
𝐿
1 1
𝑣ሶ𝑐 𝑅𝐶 𝐶 𝑣𝑐 0
= 1 𝑖 + 1 𝑣(𝑡)…………. (3)
𝑖ሶ𝐿 −𝐿 0 𝐿 𝐿
EXAMPLE-2
Step-4: The output is current through the resistor therefore, the output
equation is
1
𝑖𝑅 = 𝑣
𝑅 𝐶
1
𝑖𝑅 = × 𝑣𝐶 + 0 × 𝑖𝐿
𝑅
1 𝑣𝑐
𝑖𝑅 = 0 𝑖
𝑅 𝐿
EXAMPLE-2
1 1
𝑣𝑐 0
𝑣ሶ𝑐 𝑅𝐶 𝐶 1 𝑣 . . . . . . . (3)
= 𝑖𝐿 +
𝑖ሶ𝐿 1
− 0 𝐿
𝐿
Where,
𝑋ሶ = 𝐴𝑋 + 𝐵𝑈
X is state vector
A (nxn) is system matrix
B (nxp) is input matrix
1 𝑣𝑐 U is input vector
𝑖𝑅 = 0 𝑖 . . . . . . . . . (4)
𝑅 𝐿
Where,
𝑌 = 𝐶𝑋 + 𝐷𝑈 Y is output vector
C (qxn) is output matrix
D is Feed forward Matrix