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

03/01/2023

System Dynamics and Control 1 Modeling in Time Domain System Dynamics and Control 2 Modeling in Time Domain

Chapter Objectives
After completing this chapter, the student will be able to
• find a mathematical model, called a state-space representation,
for a linear, time invariant system
• model electrical and mechanical systems in state space
• convert a transfer function to state space
• convert a state-space representation to a transfer function
• linearize a state-space representation

HCM City Univ. of Technology, Faculty of Mechanical Engineering Nguyen Tan Tien HCM City Univ. of Technology, Faculty of Mechanical Engineering Nguyen Tan Tien

System Dynamics and Control 3 Modeling in Time Domain System Dynamics and Control 4 Modeling in Time Domain

§1.Introduction §1.Introduction
Two approaches are available for the analysis and design of - The modern, or time domain, state-space technique
feedback control systems • A unified method for modeling, analyzing, and designing a
- The classical, or frequency-domain, technique wide range of systems
Major disadvantage: can be applied only to linear, time- • Can be used to represent nonlinear systems that have
invariant systems or systems that can be approximated as such backlash, saturation, and dead zone
Major advantage: rapidly provide stability and transient • Can handle, conveniently, systems with nonzero initial
response information conditions
• Can be used to represent time-varying systems, (for example,
missiles with varying fuel levels or lift in an aircraft flying
through a wide range of altitudes)
• Can be compactly represented in state space for multiple-
input, multiple-output systems
• Can be used to represent systems with a digital computer in
the loop or to model systems for digital simulation
HCM City Univ. of Technology, Faculty of Mechanical Engineering Nguyen Tan Tien HCM City Univ. of Technology, Faculty of Mechanical Engineering Nguyen Tan Tien

System Dynamics and Control 5 Modeling in Time Domain System Dynamics and Control 6 Modeling in Time Domain

§1.Introduction §2.Some Observations


𝑅
• With a simulated system, system response can be obtained
for changes in system parameters - an important design tool 𝑣(𝑡) 𝐿
• The state space approach is also attractive because of the 𝑖(𝑡)

availability of numerous state-space software packages for Select the current 𝑖(𝑡) as a variable, write the loop equation
the personal computer 𝑑𝑖(𝑡)
𝐿 + 𝑅𝑖 𝑡 = 𝑣(𝑡)
𝑑𝑡
𝑑𝑖(𝑡) 𝑅 1
→ = − 𝑖 𝑡 + 𝑣(𝑡)
𝑑𝑡 𝐿 𝐿

HCM City Univ. of Technology, Faculty of Mechanical Engineering Nguyen Tan Tien HCM City Univ. of Technology, Faculty of Mechanical Engineering Nguyen Tan Tien

1
03/01/2023

System Dynamics and Control 7 Modeling in Time Domain System Dynamics and Control 8 Modeling in Time Domain

§2.Some Observations §2.Some Observations


𝐿 𝑅
𝑑𝑞 𝑡
= 𝑖(𝑡)
𝑣(𝑡) 𝐶 𝑑𝑡
𝑖(𝑡) 𝑑𝑖(𝑡) 1 𝑅 1
=− 𝑞 𝑡 − 𝑖 𝑡 + 𝑣(𝑡)
𝑑𝑡 𝐿𝐶 𝐿 𝐿
Select the current 𝑖(𝑡) as a variable, write the loop equation
The state equation can be written in vector-matrix form
𝑑𝑞(𝑡)
𝑖(𝑡) = 𝒙ሶ = 𝑨𝒙 + 𝑩𝑢
𝑑𝑡
𝑑𝑖(𝑡) 1 0 1 0
𝐿 + 𝑅𝑖 𝑡 + න 𝑖𝑑𝑡 = 𝑣(𝑡) where, 𝑥 = 𝑞(𝑡) , 𝑨 = 1 𝑅 , 𝑩 = 1 , 𝑢 = 𝑣(𝑡)
𝑑𝑡 𝐶 𝑖(𝑡) − −
𝐿𝐶 𝐿 𝐿
𝑑𝑞 𝑡 The output equation can be written in vector-matrix form
→ = 𝑖(𝑡)
𝑑𝑡 𝑦 = 𝑪𝒙 + 𝑫𝑢
𝑑𝑖(𝑡) 1 𝑅 1
= − 𝑞 𝑡 − 𝑖 𝑡 + 𝑣(𝑡) 1 𝑞 𝑡
𝑑𝑡 𝐿𝐶 𝐿 𝐿 where, 𝑦 = 𝑣𝐿 𝑡 , 𝑪 = − −𝑅 , 𝑥 = , 𝐷 = 1, 𝑢 = 𝑣(𝑡)
𝐶 𝑖 𝑡

HCM City Univ. of Technology, Faculty of Mechanical Engineering Nguyen Tan Tien HCM City Univ. of Technology, Faculty of Mechanical Engineering Nguyen Tan Tien

System Dynamics and Control 9 Modeling in Time Domain System Dynamics and Control 10 Modeling in Time Domain

§3.The General State-Space Representation §3.The General State-Space Representation


Review - State space: 𝑛-dimensional space whose
- Linear combination: A linear combination of 𝑛 variables, 𝑥𝑖 , for axes are the state variables
𝑖 = 1 ÷ 𝑛, is given by the following sum, 𝑆 In the figure
𝑆 = 𝐾𝑛 𝑥𝑛 + 𝐾𝑛−1 𝑥𝑛−1 + ⋯ + 𝐾1 𝑥1 𝐾𝑖 : constant • state variables: 𝑣𝑅 and 𝑣𝐶
- Linear independence: A set of variables is said to be linearly • state trajectory can be thought of
independent if none of the variables can be written as a linear as being mapped out by the state
combination of the others vector, 𝑥(𝑡), for a range of 𝑡
- System variable: Any variable that responds to an input or initial
conditions in a system - State equations: A set of 𝑛 simultaneous, first-order differential
- State variables: The smallest set of linearly independent equations with 𝑛 variables, where the 𝑛 variables to be solved
system variables such that the values of the members of the are the state variables
set at time 𝑡0 along with known forcing functions completely - Output equation: The algebraic equation that expresses the
determine the value of all system variables for all 𝑡 ≥ 𝑡0 output variables of a system as linear combinations of the state
- State vector: A vector whose elements are the state variables variables and the inputs
HCM City Univ. of Technology, Faculty of Mechanical Engineering Nguyen Tan Tien HCM City Univ. of Technology, Faculty of Mechanical Engineering Nguyen Tan Tien

System Dynamics and Control 11 Modeling in Time Domain System Dynamics and Control 12 Modeling in Time Domain

§3.The General State-Space Representation §4.Applying the State-Space Representation


- A system is represented in state space by the following equations In this section, the state-space formulation is applied to the
𝒙ሶ = 𝑨𝒙 + 𝑩𝒖 representation of more complicated physical systems. The first
𝒚 = 𝑪𝒙 + 𝑫𝒖 step in representing a system is to select the state vector, which
must be chosen according to the following considerations
for 𝑡 ≥ 𝑡0 and initial conditions, 𝒙(𝑡0 ), where
1.A minimum number of state variables must be selected as
𝒙 : state vector
components of the state vector. This minimum number of state
𝒙ሶ : derivative of the state vector with respect to time variables is sufficient to describe completely the state of the
𝒚 : output vector 𝒖 : input or control vector system
𝑨 : system matrix 𝑩 : input matrix 2.The components of the state vector (that is, this minimum
𝑪 : output matrix 𝑫 : feedforward matrix number of state variables) must be linearly independent

HCM City Univ. of Technology, Faculty of Mechanical Engineering Nguyen Tan Tien HCM City Univ. of Technology, Faculty of Mechanical Engineering Nguyen Tan Tien

2
03/01/2023

System Dynamics and Control 13 Modeling in Time Domain System Dynamics and Control 14 Modeling in Time Domain

§4.Applying the State-Space Representation §4.Applying the State-Space Representation


- Ex.3.1 Representing an Electrical Network Step 3 Apply network theory, such as Kirchhoff’s voltage and
𝐿 𝐿
node 1 Given the electrical network, find a state- node 1 current laws, to obtain 𝑖𝐶 and 𝑣𝐿 in terms of
𝑖𝐿 (𝑡) space representation if the output is the 𝑖𝐿 (𝑡) the state variables, 𝑣𝐶 and 𝑖𝐿 .
𝑣(𝑡) 𝑅 𝐶 𝑣(𝑡) 𝑅 𝐶
𝑖𝑅 (𝑡) 𝑖𝐶 (𝑡) 𝑖𝑅 (𝑡) 𝑖𝐶 (𝑡)
current through the resistor
Solution At Node 1,
Step 1 Label all of the branch currents in the network. These 1
𝑖𝐶 = −𝑖𝑅 + 𝑖𝐿 = − 𝑣𝐶 + 𝑖𝐿 (3.24)
include 𝑖𝐿 , 𝑖𝑅 , and 𝑖𝐶 𝑅
Step 2 Select the state variables by writing the derivative which yields 𝑖𝐶 in terms of the state variables, 𝑣𝐶 and 𝑖𝐿
equation for all energy storage elements, 𝐿 and 𝐶 Around the outer loop,
𝑑𝑣𝐶 𝑣𝐿 = −𝑣𝐶 + 𝑣(𝑡) (3.25)
𝐶 = 𝑖𝐶 (3.22)
𝑑𝑡 which yields 𝑣𝐿 in terms of the state variable, 𝑣𝐶 , and
𝑑𝑖𝐿 the source, 𝑣(𝑡)
𝐿 = 𝑣𝐿 (3.23)
𝑑𝑡

HCM City Univ. of Technology, Faculty of Mechanical Engineering Nguyen Tan Tien HCM City Univ. of Technology, Faculty of Mechanical Engineering Nguyen Tan Tien

System Dynamics and Control 15 Modeling in Time Domain System Dynamics and Control 16 Modeling in Time Domain

§4.Applying the State-Space Representation §4.Applying the State-Space Representation


Step 4 Substitute (3.24), (3.25) into (3.22), (3.23) to obtain - Ex.3.2 Representing an Electrical Network with a Dependent Source
𝐿 𝐶
node 1 𝑑𝑣𝐶 1 1 Find the state and output equations
=− 𝑣𝐶 + 𝑖𝐿 (3.27.a)
𝑣(𝑡)
𝑖𝐿 (𝑡)
𝑅 𝐶
𝑑𝑡 𝑅𝐶 𝐶 𝑖(𝑡)
𝑅1 𝐿 𝑅2
4𝑣𝐿 (𝑡) for the electrical network if the
𝑖𝑅 (𝑡) 𝑖𝐶 (𝑡) 𝑑𝑖𝐿 1 1 output vector is 𝑦 = 𝑣𝑅2 𝑖𝑅2 𝑇
= − 𝑣𝐶 + 𝑣(𝑡) (3.27.b)
𝑑𝑡 𝐿 𝐿 Solution
Step 5 Find the output equation. Since the output is 𝑖𝑅 (𝑡) Step 1 Label all of the branch currents in the network
𝑖𝑅 = 𝑣𝐶 /𝑅 (3.28) node 1
𝐶
node 2
The state-space representation is found by representing 𝑖𝑅1 (𝑡)
𝑖(𝑡) 𝑖𝐶 (𝑡) 4𝑣𝐿 (𝑡)
𝑅1 𝐿 𝑅2
Eqs. (3.27) and (3.28) in vector-matrix form 𝑖𝐿 (𝑡) 𝑖𝑅2 (𝑡)
𝑣ሶ 𝐶 −1/𝑅𝐶 1/𝐶 𝑣𝐶 0
= 𝑖𝐿 + 1/𝐿 𝑣(𝑡) Step 2 Select the state variables by listing the voltage-current
𝑖𝐿ሶ −1/𝐿 0
𝑣𝐶 relationships for all of the energy-storage elements
𝑖𝑅 = 1/𝑅 0 𝑖 𝑑𝑖𝐿 𝑑𝑣𝐶
𝐿 𝐿 = 𝑣𝐿 𝐶 = 𝑖𝐶 (3.30)
𝑑𝑡 𝑑𝑡
𝑑𝑣𝐶 𝑑𝑖𝐿 1
𝐶 𝑑𝑡
= 𝑖𝐶 (3.22), 𝐿 𝑑𝑡
= 𝑣𝐿 (3.23), 𝑖𝐶 = − 𝑅 𝑣𝐶 + 𝑖𝐿 (3.24), 𝑣𝐿 = −𝑣𝐶 + 𝑣(𝑡) (3.25) Select the state variables: 𝑥1 = 𝑖𝐿 and 𝑥2 = 𝑣𝐶 (3.31)
HCM City Univ. of Technology, Faculty of Mechanical Engineering Nguyen Tan Tien HCM City Univ. of Technology, Faculty of Mechanical Engineering Nguyen Tan Tien

System Dynamics and Control 17 Modeling in Time Domain System Dynamics and Control 18 Modeling in Time Domain

§4.Applying the State-Space Representation §4.Applying the State-Space Representation


Step 3 Using Kirchhoff’s voltage and current laws to find 𝑖𝐿 , 𝑣𝐶 Rewriting Eqs (3.35) and (3.36)
𝐶
node 1 node 2 in terms of the state variables 1 − 4𝑅2 𝑣𝐿 − 𝑅2 𝑖𝐶 = 𝑣𝐶
𝑖𝑅1 (𝑡)
𝑖(𝑡)
𝑅1 𝐿
𝑖𝐶 (𝑡)
𝑅2
4𝑣𝐿 (𝑡) −(1/𝑅1 )𝑣𝐿 − 𝑖𝐶 = 𝑖𝐿 − 𝑖
𝑖𝐿 (𝑡) 𝑖𝑅2 (𝑡)
Writing the result in vector-matrix form
Around the mesh containing 𝐿 and 𝐶 1
𝑣𝐿 = 𝑅2 𝑖𝐿 − 𝑣𝐶 − 𝑅2 𝑖 (3.38)
𝑣𝐿 = 𝑣𝐶 + 𝑣𝑅2 = 𝑣𝐶 + 𝑖𝑅2 𝑅2 ∆
1 1
At node 2, 𝑖𝑅2 = 𝑖𝐶 + 4𝑣𝐿 𝑖𝐶 = 1 − 4𝑅2 𝑖𝐿 + 𝑣𝐶 − 1 − 4𝑅2 𝑖 (3.39)
∆ 𝑅1
1 where,
𝑣𝐿 = 𝑣𝐶 + (𝑖𝐶 + 4𝑣𝐿)𝑅2 = (𝑣 + 𝑖 𝑅 ) (3.35) 𝑅2
1 − 4𝑅2 𝐶 𝐶 2 ∆= − 1 − 4𝑅2 +
𝑅1
At node 1
𝑣𝑅1 𝑣𝐿 𝑖𝐿ሶ 𝑅2/(𝐿∆) −1/(𝐿∆) 𝑖𝐿 −𝑅2/(𝐿∆)
𝑖𝐶 = 𝑖 − 𝑖𝑅1 − 𝑖𝐿 = 𝑖 − − 𝑖𝐿 = 𝑖 − − 𝑖𝐿 (3.36) = + 𝑖
𝑅1 𝑅1 𝑣𝐶ሶ 1 − 4𝑅2 /(𝐶∆) 1/(𝑅1𝐶∆) 𝑣𝐶 1 − 4𝑅2 /(𝐶∆)

1 𝑣
𝑣𝐿 = 1−4𝑅 (𝑣𝐶 + 𝑖𝐶 𝑅2 ) (3.35), 𝑖𝐶 = 𝑖 − 𝑅𝐿 − 𝑖𝐿 (3.36)
2 1

HCM City Univ. of Technology, Faculty of Mechanical Engineering Nguyen Tan Tien HCM City Univ. of Technology, Faculty of Mechanical Engineering Nguyen Tan Tien

3
03/01/2023

System Dynamics and Control 19 Modeling in Time Domain System Dynamics and Control 20 Modeling in Time Domain

§4.Applying the State-Space Representation §4.Applying the State-Space Representation


Step 4 Derive the output equation - Ex.3.3 Representing a Translational Mechanical System
𝐶 𝑥1 (𝑡) 𝑥2 (𝑡)
node 1 node 2 Find the state equations for the
𝑖𝑅1 (𝑡) 𝐷 𝐾 𝑓(𝑡)
𝑖(𝑡)
𝑅1 𝐿
𝑖𝐶 (𝑡)
𝑅2
4𝑣𝐿 (𝑡) 𝑀1 𝑀2 translational mechanical system
𝑖𝐿 (𝑡) 𝑖𝑅2 (𝑡)
frictionless

Since the specified output variables are 𝑣𝑅2 and 𝑖𝑅2 , Solution
note that around the mesh containing 𝐶, 𝐿, and 𝑅2 Find the Laplace-transformed equations of motion
𝑣𝑅2 = −𝑣𝐶 + 𝑣𝐿 (3.42.a)
𝑖𝑅2 = 𝑖𝐶 + 4𝑣𝐿 (3.42.b)
Substituting Eqs. (3.38) and (3.39) into Eq.(3.42) + 𝑀1 𝑠 2 + 𝐷𝑠 + 𝐾 𝑋1 − 𝐾𝑋2 = 0
𝑣𝑅2 𝑅2/∆ −(1 + 1/∆) 𝑖𝐿 −𝑅2/∆
𝑖𝑅2 = 1/∆ 1 − 4𝑅1 /(𝑅1∆) 𝑣𝐶
+
−1/∆
𝑖
−𝐾𝑋1 + 𝑀2 𝑠 2 + 𝐾 𝑋2 = 𝐹
1 1 1
𝑣𝐿 = ∆ 𝑅2 𝑖𝐿 − 𝑣𝐶 − 𝑅2 𝑖 (3.38), 𝑖𝐶 = ∆ 1 − 4𝑅2 𝑖𝐿 + 𝑅 𝑣𝐶 − 1 − 4𝑅2 𝑖 (3.39)
1

HCM City Univ. of Technology, Faculty of Mechanical Engineering Nguyen Tan Tien HCM City Univ. of Technology, Faculty of Mechanical Engineering Nguyen Tan Tien

System Dynamics and Control 21 Modeling in Time Domain System Dynamics and Control 22 Modeling in Time Domain

§4.Applying the State-Space Representation §4.Applying the State-Space Representation


Take the inverse Laplace transform assuming zero initial conditions 𝑑𝑥1
= + 𝑣1
𝑑2𝑥1 𝑑𝑥1 𝑑𝑡
𝑀1𝑠2 +𝐷𝑠 +𝐾 𝑋1 −𝐾𝑋2 = 0 → 𝑀1 2 +𝐷 +𝐾(𝑥1 −𝑥2) = 0 (3.44) 𝑑𝑣1 𝐾 𝐷 𝐾
𝑑𝑡 𝑑𝑡 =− 𝑥 − 𝑣 + 𝑥
𝑑 2
𝑥2
𝑑𝑡 𝑀1 1 𝑀1 1 𝑀1 2
−𝐾𝑋1 + 𝑀2𝑠2 + 𝐾 𝑋2 = 𝐹 → −𝐾𝑥1 + 𝑀2 2 + 𝐾𝑥2 = 𝑓(𝑡) (3.45) 𝑑𝑥2
𝑑𝑡 = +𝑣2
𝑑𝑥1 𝑑𝑥2 𝑑 2 𝑥1 𝑑𝑣1 𝑑 2 𝑥2 𝑑𝑣2 𝑑𝑡
Let ≡ 𝑣1 , ≡ 𝑣2 → = , = 𝑑𝑣2 𝐾 𝐾 1
𝑑𝑡 𝑑𝑡 𝑑𝑡 2 𝑑𝑡 𝑑𝑡 2 𝑑𝑡 =+ 𝑥 − 𝑥 + 𝑓(𝑡)
𝑑𝑥1 𝑑𝑡 𝑀2 1 𝑀2 2 𝑀2
State equations = +𝑣1 In vector matrix form
𝑑𝑡
𝑑𝑣1 𝐾 𝐷 𝐾 0 1 0 0
=− 𝑥 − 𝑣 + 𝑥 𝐾 𝐷 𝐾 0
𝑑𝑡 𝑀1 1 𝑀1 1 𝑀1 2 𝑥ሶ 1 𝑥
− − 0 1 0
𝑑𝑥2 𝑣ሶ 1 𝑀1 𝑀1 𝑀1 𝑣1
= +𝑣2 = + 0 𝑓(𝑡)
𝑑𝑡 𝑥ሶ 2 0 0 0 1 𝑥2 1
𝑑𝑣2 𝐾 𝐾 1 𝑣ሶ 2 𝐾 𝐾 𝑣
=+ 𝑥 − 𝑥 + 𝑓(𝑡) 0 − 0 2 𝑀2
𝑑𝑡 𝑀2 1 𝑀2 2 𝑀2 𝑀2 𝑀2
HCM City Univ. of Technology, Faculty of Mechanical Engineering Nguyen Tan Tien HCM City Univ. of Technology, Faculty of Mechanical Engineering Nguyen Tan Tien

System Dynamics and Control 23 Modeling in Time Domain System Dynamics and Control 24 Modeling in Time Domain

§4.Applying the State-Space Representation §4.Applying the State-Space Representation


Note: The equations of motion (3.44) and (3.45) can be derived Skill-Assessment Ex.3.1
𝑥1 (𝑡) 𝑥2 (𝑡) directly from the figure using Newton’s Problem Find the state-space representation of the electrical
𝐷 𝐾 𝑓(𝑡) laws of motion 𝐶1 𝑅 network with the output is 𝑣𝑜 (𝑡)
𝑀1 𝑀2
𝐶2 Solution
frictionless
𝑣𝑖 (𝑡) 𝐿 𝑣𝑜 (𝑡)
𝑑 2 𝑥1 𝑑𝑥1 Identifying appropriate variables on the
𝑀1 +𝐷 + 𝐾(𝑥1 − 𝑥2 ) = 0
𝑑𝑡 2 𝑑𝑡 circuit yields
𝑑2 𝑥2 𝐶1 𝑅
𝑀2 + 𝐾(𝑥2 − 𝑥1 ) = 𝑓(𝑡)
𝑑𝑡 2 𝑖𝐶1 𝑖𝑅 𝐶2
𝑑 2 𝑥1 𝑑𝑥1 𝑣𝑖 (𝑡) 𝐿 𝑣𝑜 (𝑡)
→ 𝑀1 2 + 𝐷 + 𝐾(𝑥1 − 𝑥2 ) = 0 (3.44) 𝑖𝐿 𝑖𝐶2
𝑑𝑡 𝑑𝑡
𝑑 2 𝑥2 Writing the derivative relations
−𝐾𝑥1 + 𝑀2 + 𝐾𝑥2 = 𝑓(𝑡) (3.45) 𝑑𝑣𝐶1 𝑑𝑖𝐿 𝑑𝑣𝐶2
𝑑𝑡 2 𝐶1 = 𝑖𝐶1 𝐿 = 𝑣𝐿 𝐶2 = 𝑖𝐶2
𝑑𝑡 𝑑𝑡 𝑑𝑡

HCM City Univ. of Technology, Faculty of Mechanical Engineering Nguyen Tan Tien HCM City Univ. of Technology, Faculty of Mechanical Engineering Nguyen Tan Tien

4
03/01/2023

System Dynamics and Control 25 Modeling in Time Domain System Dynamics and Control 26 Modeling in Time Domain

§4.Applying the State-Space Representation §4.Applying the State-Space Representation


Using Kirchhoff’s current and voltage laws 𝑑𝑣𝐶1 1 1 1 1
=− 𝑣 + 𝑖 − 𝑣 + 𝑣
1 𝑑𝑡 𝑅𝐶1 𝐶1 𝐶1 𝐿 𝑅𝐶1 𝐶2 𝑅𝐶1 𝑖
𝑖𝐶1 = 𝑖𝐿 + 𝑖𝑅 = 𝑖𝐿 + (𝑣𝐿 − 𝑣𝐶2 ) 𝑑𝑖𝐿 1 1
𝐶1 𝑅 𝑅
=− 𝑣 + 𝑣
𝑖𝐶 1
𝑖𝑅 𝐶2 𝑣𝐿 = −𝑣𝐶1 + 𝑣𝑖 𝑑𝑡 𝐿 𝐶1 𝐿 𝑖
𝑣𝑖 (𝑡) 𝐿 𝑣𝑜 (𝑡)
1 𝑑𝑣𝐶2 1 1 1
𝑖𝐿 𝑖𝐶
𝑖𝐶2 = 𝑖𝑅 = (𝑣𝐿 − 𝑣𝐶2 ) =− 𝑣 − 𝑣 + 𝑣
𝑅𝐶2 𝐶1 𝑅𝐶2 𝐶2 𝑅𝐶2 𝑖
2

𝑅 𝑑𝑡
Substituting and rearranging The output 𝑣𝑜 = 𝑣𝐶2 , the equations in vector-matrix form
𝑑𝑣𝐶1 1 1 1 1 1 1 1 1
=− 𝑣 + 𝑖 − 𝑣 + 𝑣 − −
𝑑𝑡 𝑅𝐶1 𝐶1 𝐶1 𝐿 𝑅𝐶1 𝐶2 𝑅𝐶1 𝑖 𝑅𝐶1 𝐶1 𝑅𝐶1 𝑣 𝑅𝐶1
𝑣ሶ 𝐶1 𝐶1
𝑑𝑖𝐿 1 1 1 1
= − 𝑣𝐶1 + 𝑣𝑖 𝒙ሶ = 𝑖ሶ𝐿 = − 0 0 𝑖𝐿 + 𝑣𝑖
𝑑𝑡 𝐿 𝐿 𝐿 𝑣𝐶2 𝐿
𝑑𝑣𝐶2 1 1 1 𝑣ሶ 𝐶2
1 1 1
=− 𝑣𝐶1 − 𝑣 + 𝑣 − 0 −
𝑑𝑡 𝑅𝐶2 𝑅𝐶2 𝐶2 𝑅𝐶2 𝑖 𝑅𝐶2 𝑅𝐶2 𝑅𝐶2
The output 𝑣𝑜 = 𝑣𝐶2 𝑦= 0 0 1𝒙
HCM City Univ. of Technology, Faculty of Mechanical Engineering Nguyen Tan Tien HCM City Univ. of Technology, Faculty of Mechanical Engineering Nguyen Tan Tien

System Dynamics and Control 27 Modeling in Time Domain System Dynamics and Control 28 Modeling in Time Domain

§4.Applying the State-Space Representation §4.Applying the State-Space Representation


Skill-Assessment Ex.3.2 Defining state variables
Problem Represent the translational mechanical system in state- 𝑧1 = 𝑥1 , 𝑧2 = 𝑥ሶ 1 , 𝑧3 = 𝑥2 , 𝑧4 = 𝑥ሶ 2 , 𝑧5 = 𝑥3 , 𝑧6 = 𝑥ሶ 3
𝑥1 (𝑡) 𝑥2 (𝑡) 𝑥3 (𝑡)
space, where 𝑥3 (𝑡) is the Write the state equations
1𝑁/𝑚 1𝑁𝑠/𝑚 1𝑁/𝑚 1𝑁𝑠/𝑚
1𝑘𝑔 1𝑘𝑔 1𝑘𝑔 output 𝑧1ሶ = 𝑧2
𝑓(𝑡)

Solution Writing the equations of motion 𝑧ሶ2 = 𝑥ሷ 1 = −𝑥ሶ 1 − 𝑥1 + 𝑥ሶ 2 + 𝑓


= −𝑧2 − 𝑧1 + 𝑧4 + 𝑓
𝑠 2 + 𝑠 + 1 𝑋1 − 𝑠𝑋2 =𝐹
𝑧ሶ3 = 𝑥ሶ 2 = 𝑧4
−𝑠𝑋1 + 𝑠 2 + 𝑠 + 1 𝑋2 − 𝑋3 = 0
𝑧ሶ4 = 𝑥ሷ 2 = 𝑥ሶ 1 − 𝑥ሶ 2 − 𝑥2 + 𝑥3
−𝑋2 + 𝑠 2 + 𝑠 + 1 𝑋3 = 0 = 𝑧2 − 𝑧4 − 𝑧3 + 𝑧5
Taking the inverse Laplace transform and simplifying 𝑧ሶ5 = 𝑥ሶ 3
𝑥ሷ 1 = −𝑥ሶ 1 − 𝑥1 + 𝑥ሶ 2 + 𝑓 = 𝑧6
𝑥ሷ 2 = +𝑥ሶ 1 − 𝑥ሶ 2 − 𝑥2 + 𝑥3 𝑧ሶ6 = 𝑥ሷ 3 = −𝑥ሶ 3 − 𝑥3 + 𝑥2
𝑥ሷ 3 = −𝑥ሶ 3 − 𝑥3 + 𝑥2 = −𝑧6 − 𝑧5 + 𝑧3
𝑥ሷ 1 = −𝑥ሶ 1 − 𝑥1 + 𝑥ሶ 2 + 𝑓, 𝑥ሷ 2 = +𝑥ሶ 1 − 𝑥ሶ 2 − 𝑥2 + 𝑥3 , 𝑥ሷ 3 = −𝑥ሶ 3 − 𝑥3 + 𝑥2
HCM City Univ. of Technology, Faculty of Mechanical Engineering Nguyen Tan Tien HCM City Univ. of Technology, Faculty of Mechanical Engineering Nguyen Tan Tien

System Dynamics and Control 29 Modeling in Time Domain System Dynamics and Control 30 Modeling in Time Domain

§4.Applying the State-Space Representation §5.Converting a Transfer Function to State-Space


𝑧1ሶ = +𝑧2 Consider the differential equation
𝑧ሶ2 = −𝑧1 − 𝑧2 + 𝑧4 +𝑓 𝑑𝑛 𝑦 𝑑 𝑛−1 𝑦 𝑑𝑦
𝑧ሶ3 = +𝑧4 + 𝑎𝑛−1 + ⋯ + 𝑎1 + 𝑎0 𝑦 = 𝑏0 𝑢
𝑑𝑡 𝑛 𝑑𝑡 𝑛−1 𝑑𝑡
𝑧ሶ4 = +𝑧2 − 𝑧3 − 𝑧4 + 𝑧5 𝑦 : output 𝑢 : input 𝑎𝑖 ’s, 𝑏0 : constant
𝑧ሶ5 = +𝑧6 Choose the output, 𝑦, and its derivatives as the state variables
𝑧ሶ6 = +𝑧3 − 𝑧5 − 𝑧6 𝑑𝑦 𝑑2𝑦 𝑑𝑛−1 𝑦
The output 𝑦 = 𝑧5, the equations in vector-matrix form 𝑥1 = 𝑦, 𝑥2 = ,𝑥 = , ⋯ , 𝑥𝑛 = 𝑛−1
𝑑𝑡 3 𝑑𝑡 2 𝑑𝑡
0 1 0 0 0 0 0
Differentiating both sides yields
−1 −1 0 1 0 0 1
0 0 0 1 0 0 0 𝑑𝑦 𝑑2𝑦 𝑑3𝑦 𝑑𝑛 𝑦
𝒛ሶ = 𝒛+ 𝑓(𝑡) 𝑥ሶ 1 = , 𝑥ሶ = , 𝑥ሶ = , ⋯ , 𝑥ሶ 𝑛 = 𝑛
0 1 −1 −1 1 0 0 𝑑𝑡 2 𝑑𝑡 2 3 𝑑𝑡 3 𝑑𝑡
0 0 0 0 0 1 0 Define the sate variables
0 0 1 0 −1 −1 0 𝑥ሶ 1 ≝ 𝑥2 , 𝑥ሶ 2 ≝ 𝑥3 , 𝑥ሶ 3 ≝ 𝑥4 , ⋯ , 𝑥ሶ 𝑛−1 ≝ 𝑥𝑛
𝑦= 0 0 0 0 1 0𝒛 𝑥ሶ 𝑛 ≝ −𝑎0 𝑥1 − 𝑎1 𝑥2 − ⋯ − 𝑎𝑛−1 𝑥𝑛 + 𝑏0 𝑢

HCM City Univ. of Technology, Faculty of Mechanical Engineering Nguyen Tan Tien HCM City Univ. of Technology, Faculty of Mechanical Engineering Nguyen Tan Tien

5
03/01/2023

System Dynamics and Control 31 Modeling in Time Domain System Dynamics and Control 32 Modeling in Time Domain

§5.Converting a Transfer Function to State-Space §5.Converting a Transfer Function to State-Space


The phase-variable form of the state equations - Ex.3.4 Converting a TF with Constant Term in Numerator
𝑥1ሶ 0 1 0 ⋯ 0 0 𝑥1 0 𝑅(𝑠) 24 𝐶(𝑠)
Find the state-space representation in
𝑥2ሶ 0 0 1 ⋯ 0 0 𝑥2 0 𝑉
𝑠 3 + 9𝑠 2 + 26𝑠 + 24
phase-variable form for the TF
𝑥3ሶ 0 0 0 ⋯ 0 0 𝑥3 0
= + 𝑢 Solution
⋮ ⋮ ⋮ ⋮ ⋱ ⋮ ⋮ ⋮ ⋮
𝑥𝑛−1
ሶ 0 0 0 ⋯ 0 1 𝑥𝑛−1 0 Step 1 Find the associated differential equation
𝑥𝑛ሶ −𝑎1 −𝑎2 −𝑎3 ⋯ −𝑎𝑛−2 −𝑎𝑛−1 𝑥𝑛 𝑏0 𝐶(𝑠) 24
=
𝑥1 𝑅(𝑠) 𝑠 3 + 9𝑠 2 + 26𝑠 + 24
𝑥2 → 𝑠 3 + 9𝑠 2 + 26𝑠 + 24 𝐶 𝑠 = 24𝑅(𝑠)
𝑥3
𝑦= 1 0 0 ⋯ 0 0 Take the inverse Laplace transform, assuming zero

𝑥𝑛−1 initial conditions
𝑥𝑛 𝑐ഺ + 9𝑐ሷ + 26𝑐ሶ + 24𝑐 = 24𝑟

HCM City Univ. of Technology, Faculty of Mechanical Engineering Nguyen Tan Tien HCM City Univ. of Technology, Faculty of Mechanical Engineering Nguyen Tan Tien

System Dynamics and Control 33 Modeling in Time Domain System Dynamics and Control 34 Modeling in Time Domain

§5.Converting a Transfer Function to State-Space §5.Converting a Transfer Function to State-Space


Step 2 Select the state variables An equivalent block diagram of the system
Choosing the state variables 𝑥1 = 𝑐, 𝑥2 = 𝑐,ሶ 𝑥3 = 𝑐ሷ 𝑥ሶ 1 0 1 0 𝑥1 0
𝑥ሶ 1 = + 𝑥2 𝑥ሶ 2 = 0 0 1 𝑥2 + 0 𝑟
𝑥ሶ 2 = + 𝑥3 𝑥ሶ 3 −24 −26 −9 3 𝑥 24
𝑥1
𝑥ሶ 3 = −24𝑥1 − 26𝑥2 − 9𝑥3 + 24𝑟
𝑦 = 1 0 0 𝑥2
𝑦 = 𝑐 = 𝑥1
𝑥3
In vector-matrix form
𝑟(𝑡) 𝑥ሶ 3 (𝑡) 𝑥3 (𝑡) 𝑥2 (𝑡) 𝑥1 (𝑡) 𝑦(𝑡)
𝑥ሶ 1 0 1 0 𝑥1 0 24 න න න 1
𝑥ሶ 2 = 0 0 1 𝑥2 + 0 𝑟 9
𝑥ሶ 3 −24 −26 −9 𝑥3 24
26
𝑥1
𝑦 = 1 0 0 𝑥2 24

𝑥3
𝑐ഺ + 9𝑐ሷ + 26𝑐ሶ + 24𝑐 = 24𝑟
HCM City Univ. of Technology, Faculty of Mechanical Engineering Nguyen Tan Tien HCM City Univ. of Technology, Faculty of Mechanical Engineering Nguyen Tan Tien

System Dynamics and Control 35 Modeling in Time Domain System Dynamics and Control 36 Modeling in Time Domain

§5.Converting a Transfer Function to State-Space §5.Converting a Transfer Function to State-Space


Run ch3p1 through ch3p4 in Appendix B - If a TF has a polynomial in 𝑠 in the numerator that is of order
Learn how to use MATLAB to less than the polynomial in the denominator
• represent the system matrix A, the input matrix B, 𝑅(𝑠) 𝑏2 𝑠 2 + 𝑏1 𝑠 + 𝑏0 𝐶(𝑠)
𝑎3 𝑠 3 + 𝑎2 𝑠 2 + 𝑎1 𝑠 𝑉
+ 𝑎0
and the output matrix C
• convert a transfer function to the state-space the numerator and denominator can be handled separately:
representation in phase-variable form separate the transfer function into two cascaded TFs
• solve Ex.3.4 𝑅(𝑠) 1 𝑋1 (𝑠) 𝐶(𝑠)
𝑎3 𝑠 3 + 𝑎2 𝑠 2 + 𝑎1 𝑠 𝑉
+ 𝑎0 𝑏2 𝑠 2 + 𝑏1 𝑠 + 𝑏0

HCM City Univ. of Technology, Faculty of Mechanical Engineering Nguyen Tan Tien HCM City Univ. of Technology, Faculty of Mechanical Engineering Nguyen Tan Tien

6
03/01/2023

System Dynamics and Control 37 Modeling in Time Domain System Dynamics and Control 38 Modeling in Time Domain

§5.Converting a Transfer Function to State-Space §5.Converting a Transfer Function to State-Space


𝑅(𝑠) 1 𝑋1 (𝑠) 𝐶(𝑠) - Ex.3.5 Converting a TF with Polynomial in Numerator
𝑎3 𝑠 3 + 𝑎2 𝑠 2 + 𝑎1 𝑠 𝑉
+ 𝑎0 𝑏2 𝑠 2 + 𝑏1 𝑠 + 𝑏0
𝑅(𝑠) 𝑠 2 + 7𝑠 + 2 𝐶(𝑠) Find the state-space representation of the
𝑠 3 + 9𝑠 2 + 26𝑠 + 24
𝑉
• The first TF with just the denominator is converted to the transfer function
phase-variable representation in state space, phase variable Solution
𝑥1 is the output, and the rest of the phase variables are the Step 1 Separate the system into two cascaded blocks
internal variables of the first block 𝑅(𝑠) 𝑋1 (𝑠) 𝐶(𝑠)
1
• The second TF with just the numerator yields 𝑠 3 + 9𝑠 2 + 26𝑠 + 24
𝑠 2 + 7𝑠 + 2

𝑌 𝑠 = 𝐶 𝑠 = (𝑏2 𝑠 2 + 𝑏1 𝑠 + 𝑏0 )𝑋1 (𝑠)


Step 2 Find the state equations for the block containing the
Taking the inverse Laplace transform with zeros initial conditions denominator
𝑑 2 𝑥1 𝑑𝑥1
𝑦 𝑡 = 𝑏2 + 𝑏1 + 𝑏0 𝑥1 𝑥ሶ 1 0 1 0 𝑥1 0
𝑑𝑡 2 𝑑𝑡 𝑥ሶ 2 = 0 0 1 𝑥2 + 0 𝑟
= 𝑏0 𝑥1 + 𝑏1 𝑥2 + 𝑏2 𝑥3 𝑥ሶ 3 −24 −26 −9 𝑥3 1
Hence, the second block simply forms a specified linear
combination of the state variables developed in the first block
HCM City Univ. of Technology, Faculty of Mechanical Engineering Nguyen Tan Tien HCM City Univ. of Technology, Faculty of Mechanical Engineering Nguyen Tan Tien

System Dynamics and Control 39 Modeling in Time Domain System Dynamics and Control 40 Modeling in Time Domain

§5.Converting a Transfer Function to State-Space §5.Converting a Transfer Function to State-Space


Step 3 Introduce the effect of the block with the numerator An equivalent block diagram of the system
The second block states that 𝑥ሶ 1 0 1 0 𝑥1 0
𝐶 𝑠 = 𝑏2𝑠2 + 𝑏1𝑠 + 𝑏0 𝑋1 𝑠 = 𝑠2 + 7𝑠 + 2 𝑋1 𝑠 𝑥ሶ 2 = 0 0 1 𝑥2 + 0 𝑟,
𝑥ሶ 3 −24 −26 −9 3 𝑥 1
Taking inverse Laplace transform with zero initial conditions
𝑥1
𝑐 = 𝑥ሷ 1 + 7𝑥ሶ 1 + 2𝑥1 = 𝑥3 + 7𝑥2 + 2𝑥1
𝑦 = 2 7 1 𝑥2
The output equation 𝑥3
𝑥1 𝑥1
𝑥3 (𝑡)
𝑦 = 𝑏0 𝑏1 𝑏2 𝑥2 = 2 7 1 𝑥2 1
𝑦(𝑡)
𝑥3 𝑥3 𝑥2 (𝑡)
7
𝑟(𝑡) 𝑥ሶ 3 (𝑡) 𝑥1 (𝑡)
An equivalent block diagram of the system 1 න න න 2
𝑥ሶ 1 0 1 0 𝑥1 0 9
𝑥ሶ 2 = 0 0 1 𝑥2 + 0 𝑟
𝑥 26
𝑥ሶ 3 −24 −26 −9 3 1
24
𝑦 = 2 7 1 𝑥1 𝑥2 𝑥3 𝑇
HCM City Univ. of Technology, Faculty of Mechanical Engineering Nguyen Tan Tien HCM City Univ. of Technology, Faculty of Mechanical Engineering Nguyen Tan Tien

System Dynamics and Control 41 Modeling in Time Domain System Dynamics and Control 42 Modeling in Time Domain

§5.Converting a Transfer Function to State-Space §5.Converting a Transfer Function to State-Space


Skill-Assessment Ex.3.3 Second TF
Problem Find the state equations and output equation for the The output equation
phase-variable representation of the TF 𝑐 = 2𝑥ሶ + 𝑥 = 𝑥1 + 2𝑥2
2𝑠 + 1 Putting all equation in vector-matrix form
𝐺 𝑠 = 2
𝑠 + 7𝑠 + 9 0 1 0
Solution 𝒙ሶ = 𝒙+ 𝑟
−9 −7 1
First TF 𝑐= 1 2𝒙
𝑋(𝑠) 1
= → 𝑠 2 + 7𝑠 + 9 𝑋 𝑠 = 𝑅(𝑠)
𝑅(𝑠) 𝑠 2 + 7𝑠 + 9
Taking inverse Laplace transform with zero initial conditions
𝑥ሷ + 7𝑥ሶ + 9𝑥 = 𝑟
Defining the state variables as 𝑥1 = 𝑥, 𝑥2 = 𝑥ሶ
𝑥ሶ 1 = 𝑥2
𝑥ሶ 2 = 𝑥ሷ = −7𝑥ሶ − 𝑥 + 𝑟 = −9𝑥1 − 7𝑥2 + 𝑟 𝑥ሶ 2 = −9𝑥1 − 7𝑥2 + 𝑟, 𝑐 = 𝑥1 + 2𝑥2
HCM City Univ. of Technology, Faculty of Mechanical Engineering Nguyen Tan Tien HCM City Univ. of Technology, Faculty of Mechanical Engineering Nguyen Tan Tien

7
03/01/2023

System Dynamics and Control 43 Modeling in Time Domain System Dynamics and Control 44 Modeling in Time Domain

§6.Converting from State Space to a Transfer Function §6.Converting from State Space to a Transfer Function
- Given the state and output equations Review of calculating the Inverse of a Matrix 3 0 2
𝒙ሶ = 𝑨𝒙 + 𝑩𝒖 Ex.: Find the inverse matrix of 𝐴 = 2 0 −2
𝒚 = 𝑪𝒙 + 𝑫𝒖 • Step 1: Create a Matrix of Cofactors 0 1 1
- Take the Laplace transform assuming zero initial conditions For the first row
3 0 2 2 0 2 2 0 2 2 −2 2 2 0 2 2 2 2
𝑠𝑿 𝑠 = 𝑨𝑿 𝑠 + 𝑩𝑼(𝑠) 2 0 −2 → 2 0 −2 → 2 0 −2 → 2 0 −2 → 2 0 −2 → 2 0 −2
𝒀 𝑠 = 𝑪𝑿 𝑠 + 𝑫𝑼(𝑠) 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1
For the second row
- After some arrangement 3 0 2 3 0 2 3 0 2 3 0 2 3 0 2 3 0 2
𝑿 𝑠 = (𝑠𝑰 − 𝑨)−1 𝑩𝑼(𝑠) 2 0 −2 → 2 0 −2 → −2 0 −2 → −2 3 −2 → −2 3 −2 → −2 3 −3
0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1
𝒀 𝑠 = 𝑪 𝑠𝑰 − 𝑨 −1 𝑩 + 𝑫 𝑼(𝑠)
For the third row
The matrix 𝑪 𝑠𝑰 − 𝑨 −1 𝑩 + 𝑫: the transfer function matrix 3 0 2 3 0 2 3 0 2 3 0 2 3 0 2 3 0 2
2 0 −2 → 2 0 −2 → 2 0 −2 → 2 0 −2 → 2 0 −2 → 2 0 −2
- If 𝑼 𝑠 = 𝑈(𝑠) and 𝒀 𝑠 = 𝑌(𝑠) are scalars, the TF 0 1 1 2 1 1 2 1 1 2 −10 1 2 −10 1 2 −10 0
𝑌(𝑠) 3 0 2 2 2 2
𝑇 𝑠 = = 𝑪 𝑠𝑰 − 𝑨 −1 𝑩 + 𝑫 (3.73)
2 0 −2 → −2 3 −3
𝑈(𝑠)
0 1 1 2 −10 0
HCM City Univ. of Technology, Faculty of Mechanical Engineering Nguyen Tan Tien HCM City Univ. of Technology, Faculty of Mechanical Engineering Nguyen Tan Tien

System Dynamics and Control 45 Modeling in Time Domain System Dynamics and Control 46 Modeling in Time Domain

§6.Converting from State Space to a Transfer Function §6.Converting from State Space to a Transfer Function
• Step 2: Adjugate - Ex.3.6 State-Space Representation to Transfer Function
Obtain the transpose of the matrix of cofactors, i.e. the adjoint Find the TF, 𝑇 𝑠 = 𝑌(𝑠)/𝑈(𝑠), for given the system
of the matrix, by writing the rows as columns 0 1 0 10
2 2 2 2 −2 2 𝒙ሶ = 0 0 1 𝒙 + 0 𝑢, 𝑦= 1 0 0𝒙
−2 3 −3 → 2 3 −10 −1 −2 −3 0
2 −10 0 2 −3 0 Solution
• Step 3: Calculate the inverse matrix Find (𝑠𝑰 − 𝑨)−1
2 −2 2 𝑠 0 0 0 1 0 𝑠 −1 0
3 0 2 −1 2 3 −10 𝑠𝑰 − 𝑨 = 0 𝑠 0 − 0 0 1 = 0 𝑠 −1
2 −3 0 1 2 −2 2
2 0 −2 = = 2 3 −10 0 0 𝑠 −1 −2 −3 1 2 𝑠+3
3 0 2 10
0 1 1 2 −3 0 𝑠 2 + 3𝑠 + 2 𝑠+3 1
𝑑𝑒𝑡 2 0 −2
−1 𝑠 2 + 3𝑠 𝑠
0 1 1
adj(𝑠𝑰 − 𝑨) −𝑠 −(2𝑠 + 1) 𝑠 2
(𝑠𝑰 − 𝑨)−1 = =
det(𝑠𝑰 − 𝑨) 𝑠 3 + 3𝑠 2 + 2𝑠 + 1

HCM City Univ. of Technology, Faculty of Mechanical Engineering Nguyen Tan Tien HCM City Univ. of Technology, Faculty of Mechanical Engineering Nguyen Tan Tien

System Dynamics and Control 47 Modeling in Time Domain System Dynamics and Control 48 Modeling in Time Domain

§6.Converting from State Space to a Transfer Function §6.Converting from State Space to a Transfer Function
𝑠 2 + 3𝑠 + 2 𝑠+3 1 Run ch3p5 in Appendix B
−1 𝑠 2 + 3𝑠 𝑠 Learn how to use MATLAB to
adj(𝑠𝑰 − 𝑨) −𝑠 −(2𝑠 + 1) 𝑠 2
−1
(𝑠𝑰 − 𝑨) = = • convert a state-space representation to a transfer
det(𝑠𝑰 − 𝑨) 𝑠 3 + 3𝑠 2 + 2𝑠 + 1 function
Then • solve Ex.3.6
𝑇 𝑠 = 𝑪 𝑠𝑰 − 𝑨 −1 𝑩 + 𝑫
𝑠2 + 3𝑠 + 2 𝑠+3 1
−1 𝑠2 + 3𝑠 𝑠
−𝑠 −(2𝑠 + 1) 𝑠2 10
= 1 0 0 0 + 0
𝑠3 + 3𝑠2 + 2𝑠 + 1
0
2
10(𝑠 + 3𝑠 + 2)
= 3
𝑠 + 3𝑠2 + 2𝑠 + 1
0 1 0 10
𝒙ሶ = 0 0 1 𝒙 + 0 𝑢, 𝑦= 1 0 0𝒙
−1 −2 −3 0
HCM City Univ. of Technology, Faculty of Mechanical Engineering Nguyen Tan Tien HCM City Univ. of Technology, Faculty of Mechanical Engineering Nguyen Tan Tien

8
03/01/2023

System Dynamics and Control 49 Modeling in Time Domain System Dynamics and Control 50 Modeling in Time Domain

§6.Converting from State Space to a Transfer Function §6.Converting from State Space to a Transfer Function
Run ch3sp1 in Appendix F Skill-Assessment Ex.3.4
Learn how to use the Symbolic Math Toolbox to Problem Convert the state and output equations to a TF
• write matrices and vectors −4 −1.5 2
𝒙ሶ = 𝒙+ 𝑢 𝑡 , 𝑦 = 1.5 0.625 𝒙 (3.78)
• solve Ex.3.6 4 0 0
Solution
1 0 −4 −1.5 𝑠 + 4 1.5
𝑠𝑰 − 𝑨 = 𝑠 − =
0 1 4 0 −4 𝑠
𝑠 −1.5
adj(𝑠𝑰 − 𝑨) 4 𝑠+4
(𝑠𝑰 − 𝑨)−1 = =
det(𝑠𝑰 − 𝑨) 𝑠 2 + 4𝑠 + 6
𝑠 −1.5
4 𝑠+4 2
𝐺 𝑠 = 𝑪 𝑠𝑰 − 𝑨 −1 𝑩 = 1.5 0.625 2
𝑠 + 4𝑠 + 6 0
3𝑠 + 5
= 2
𝑠 + 4𝑠 + 6
HCM City Univ. of Technology, Faculty of Mechanical Engineering Nguyen Tan Tien HCM City Univ. of Technology, Faculty of Mechanical Engineering Nguyen Tan Tien

System Dynamics and Control 51 Modeling in Time Domain System Dynamics and Control 52 Modeling in Time Domain

§6.Converting from State Space to a Transfer Function §7.Linearization

−4 −1.5 2
𝒙ሶ = 𝒙+ 𝑢 𝑡
4 0 0 (3.78)
𝑦 = 1.5 0.625 𝒙

Matlab A=[-4 -1.5; 4 0]; B=[2 0]';


C=[1.5 0.625]; D=0;
T=ss(A,B,C,D); T=tf(T)
Result T= Walking robots, such as Hannibal shown here, can be used
3s+5 to explore hostile environments and rough terrain, such as
that found on other planets or inside volcanoes
-----------------
s^2 + 4 s + 6
Continuous-time transfer function
HCM City Univ. of Technology, Faculty of Mechanical Engineering Nguyen Tan Tien HCM City Univ. of Technology, Faculty of Mechanical Engineering Nguyen Tan Tien

System Dynamics and Control 53 Modeling in Time Domain System Dynamics and Control 54 Modeling in Time Domain

§7.Linearization §7.Linearization
- Ex.3.7 Representing a Nonlinear System 𝑑 2 𝜃 𝑀𝑔𝐿
𝐽+ sin𝜃 = 𝑇
First represent the simple pendulum in state space 𝑑𝑡 2 2
𝐿
𝑇 2 (𝑀𝑔: weight, 𝑇: applied torque in the 𝜃 direction, and Letting 𝑥1 = 𝜃, 𝑥2 = 𝑑𝜃/𝑑𝑡, the state equation
𝜃 𝐿: length). Assume the mass is evenly distributed, 𝑥ሶ 1 = 𝑥2 (3.80.a)
𝐿
2 with the center of mass at 𝐿/2. Then linearize the 𝑀𝑔𝐿 𝑇
state equations about the pendulum’s equilibrium 𝑥ሶ 2 = − sin𝑥1 + (3.80.b)
𝑀𝑔 2𝐽 𝐽
𝑑2 𝜃 point - the vertical position with zero angular velocity
𝐽 2
𝑑𝑡
The nonlinear Eq. (3.80) represent a valid and complete model
Solution of the pendulum in state space even under nonzero initial
𝐿 1 𝑀𝑔𝐿sin𝜃
𝑇 2 2 Drawing the free body diagram conditions and even if parameters are time varying
𝜃
𝐿
Summing the torques To apply classical techniques and convert these state equations
2 𝑑 2 𝜃 𝑀𝑔𝐿 to a transfer function → The nonlinear must be linearized
𝐽 2+ sin𝜃 = 𝑇
𝑀𝑔 𝑑𝑡 2

HCM City Univ. of Technology, Faculty of Mechanical Engineering Nguyen Tan Tien HCM City Univ. of Technology, Faculty of Mechanical Engineering Nguyen Tan Tien

9
03/01/2023

System Dynamics and Control 55 Modeling in Time Domain System Dynamics and Control 56 Modeling in Time Domain

§7.Linearization §7.Linearization
Linearize the equation about the equilibrium point, 𝑥1 = 𝜃 = 0, Skill-Assessment Ex.3.5
𝑥2 = 𝑑𝜃/𝑑𝑡 = 0 . Let 𝑥1 and 𝑥2 be perturbed about the Problem Represent the translational mechanical system in state
equilibrium point, or space about the equilibrium displacement. The spring is
𝑥1 = 0 + 𝛿𝑥1 nonlinear 𝑓𝑠 𝑡 = 2𝑥𝑠2 (𝑡). The applied force is 𝑓 𝑡 =
𝑥2 = 0 + 𝛿𝑥2 10 + 𝛿𝑓(𝑡), where 𝛿𝑓(𝑡) is a small force about the 10𝑁
Using Eqs. (2.182) constant value. Assume the output to be the
𝑑(sin𝑥1 ) displacement of the mass, 𝑥(𝑡)
sin𝑥1 − sin0 = ቤ 𝛿𝑥 = 𝛿𝑥1 → sin𝑥1 = 𝛿𝑥1 nonlinear 𝑥(𝑡)
Solution
𝑑𝑥1 𝑥 =0 1 spring 𝑓(𝑡)
1 1𝑘𝑔
The equation of motion
The state equations now become
𝑑2𝑥
ሶ 1 = 𝛿𝑥2
𝛿𝑥 + 2𝑥 2 = 10 + 𝛿𝑓(𝑡) (1)
𝑀𝑔𝐿 𝑇 𝑑𝑡 2
𝛿𝑥ሶ 2=− 𝛿𝑥1 + Letting 𝑥 = 𝑥0 + 𝛿𝑥
2𝐽 𝐽
𝑑2 (𝑥0 + 𝛿𝑥)
𝑑𝑓 𝑀𝑔𝐿 𝑇 + 2(𝑥0 + 𝛿𝑥)2 = 10 + 𝛿𝑓(𝑡) (2)
𝑓 𝑥 − 𝑓(𝑥0 ) ≈ ቚ
𝑑𝑥 𝑥=𝑥0
(𝑥 − 𝑥0 ) (2.182), 𝑥ሶ 1 = 𝑥2 (3.80.a), 𝑥ሶ 2 = −
2𝐽
sin𝑥1 +
𝐽
(3.80.b) 𝑑𝑡 2
HCM City Univ. of Technology, Faculty of Mechanical Engineering Nguyen Tan Tien HCM City Univ. of Technology, Faculty of Mechanical Engineering Nguyen Tan Tien

System Dynamics and Control 57 Modeling in Time Domain System Dynamics and Control 58 Modeling in Time Domain

§7.Linearization §7.Linearization
Linearize 𝑥 2 at 𝑥0 𝑑 2 𝛿𝑥
+ 4 5𝛿𝑥 = 𝛿𝑓(𝑡)
𝑑 𝑥2 𝑑𝑡 2
(𝑥0 + 𝛿𝑥)2 −𝑥02 = อ 𝛿𝑥 = 2𝑥0 𝛿𝑥 ሶ
Selecting the state variables 𝑥1 = 𝛿𝑥, 𝑥2 = 𝛿𝑥
𝑑𝑥
𝑥0
The state and output equations
→ (𝑥0 + 𝛿𝑥)2 = 𝑥02 + 2𝑥0 𝛿𝑥 (3) 𝑥ሶ 1 = 𝑥2
Substituting Eq.(3) into Eq.(1) ሷ = −4 5𝑥1 + 𝛿𝑓 𝑡
𝑥ሶ 2 = 𝛿𝑥
𝑑 2 𝛿𝑥 𝑦 = 𝑥1
+ 4𝑥0 𝛿𝑥 = −2𝑥02 + 10 + 𝛿𝑓(𝑡) (4)
𝑑𝑡 2 Converting to vector-matrix form
2
The force of the spring at equilibrium 𝐹 = 10 = 2𝑥0 → 𝑥0 = 5 0 1 0
𝒙ሶ = 𝒙+ 𝛿𝑓(𝑡)
Substituting this value of 𝑥0 into Eq.(4) −4 5 0 1
𝑑 2 𝛿𝑥 𝑦= 1 0𝒙
+ 4 5𝛿𝑥 = 𝛿𝑓(𝑡)
𝑑𝑡 2
𝑑𝑓 𝑑2 𝑥
𝑓 𝑥 − 𝑓(𝑥0 ) ≈ 𝑑𝑥 ቚ (𝑥 − 𝑥0 ) (2.182), 𝑑𝑡 2
+ 2𝑥 2 = 10 + 𝛿𝑓(𝑡) (1)
𝑥=𝑥0
HCM City Univ. of Technology, Faculty of Mechanical Engineering Nguyen Tan Tien HCM City Univ. of Technology, Faculty of Mechanical Engineering Nguyen Tan Tien

System Dynamics and Control 59 Modeling in Time Domain System Dynamics and Control 60 Modeling in Time Domain

§8.Case Studies §8.Case Studies


1.Antenna Control: State-Space Representation
Problem Find the state-space representation in phase-variable
form for each dynamic subsystem in the antenna azimuth
position control. By dynamic, we mean that the system does
not reach the steady state instantaneously. A pure gain, on the
other hand, is an example of a non dynamic system, since the
steady state is reached instantaneously

HCM City Univ. of Technology, Faculty of Mechanical Engineering Nguyen Tan Tien HCM City Univ. of Technology, Faculty of Mechanical Engineering Nguyen Tan Tien

10
03/01/2023

System Dynamics and Control 61 Modeling in Time Domain System Dynamics and Control 62 Modeling in Time Domain

§8.Case Studies §8.Case Studies


The transfer function of the power amplifier is given on the front 2.Pharmaceutical Drug Absorption
endpapers as 𝐺 𝑠 = 100/(𝑠 + 100). We will convert this transfer Problem In the pharmaceutical industry we want to describe
function to its state-space representation. Letting 𝑣𝑝 (𝑡) represent the distribution of a drug in the body. A simple model divides the
the power amplifier input and 𝑒𝑎 (𝑡) represent the power amplifier process into compartments: the dosage, the absorption site, the
output blood, the peripheral compartment, and the urine. The rate of
𝐸𝑎 (𝑠) 100 change of the amount of a drug in a compartment is equal to
𝐺 𝑠 = = (3.85)
𝑉𝑝 (𝑠) 𝑠 + 100 the input flow rate diminished by the output flow rate. Figure
Cross-multiplying, 𝑠 + 100 𝐸𝑎 𝑠 = 100𝑉𝑝 (𝑠) , from which the 3.16 summarizes the system. Here each xi is the amount of
drug in that particular compartment (Lordi, 1972). Represent
differential equation can be written as
the system in state space, where the outputs are the amounts
𝑑𝑒𝑎 (𝑡)
+ 100𝑒𝑎 (𝑡) = 100𝑣𝑝 (𝑡) (3.86) of drug in each compartment
𝑑𝑡

HCM City Univ. of Technology, Faculty of Mechanical Engineering Nguyen Tan Tien HCM City Univ. of Technology, Faculty of Mechanical Engineering Nguyen Tan Tien

11

You might also like