MECH3418 03 Modeling
MECH3418 03 Modeling
Reference: Dorf, Richard C., and Robert H. Bishop. Modern control systems.
Pearson, 12th Edition (Chapter 2)
Outline
• System description
• Linear Time-Invariant (LTI) systems and
linearization
• Transfer functions
• Block diagrams and reductions
2
Outline
• System description
• Linear Time-Invariant (LTI) systems and
linearization
• Transfer functions
• Block diagrams and reductions
3
System: General Description
• A system is physical or artificial, that (takes an input and) produces some
output
Input Output
System
Disturbance Noise
Reference + +
+ Process / + Output
Controller
+- Plant
Feedback
4
Example: An Electrical System
Obtain the governing equation of current i(t) for any given input voltage e(t)
𝑢𝑅 = 𝑅 ∗ 𝑖;
𝑢𝑅 𝑢𝐿 𝑢𝐶 𝑑𝑖
𝑢𝐿 = 𝐿 ;
𝑑𝑡
𝑢𝐶 = 𝐶 න 𝑖𝑑𝑡
e = uR + uL + uC
di 1
e = R i + L + idt
dt C
1
e − R i − L i − i = 0
C
g (i, i, i; e) = 0 5
Example: A Mechanical System
A propeller with moment of inertia 𝐽 is driven by a
DC motor. Assume the motor has input voltage
𝑢, armature resistance 𝑅𝑎 , and back electromotive
force (i.e., back e.m.f.) 𝐸𝑎 . It is known that 𝐸𝑎 =
1 1 2
𝜔, 𝜏 = 𝐼𝑎 , and 𝜏 𝑑 = 𝑐𝑞 𝜔 , where 𝐾𝑣 > 0, 𝑐𝑞 >
𝐾𝑣 𝐾
𝑣
0 are two constants. Obtain the dynamic equation
of the motor speed.
1 𝜇
𝐽𝜔ሶ + 𝑅 2𝜔 + 𝑐𝑞 𝜔2 = 𝐾 𝑢,
𝑎 𝐾𝑣 𝑣 𝑅𝑎
6
Example: A mass-spring-damper system
Obtain the dynamic equation of the mass position x(t) (relative to its free
length) for any given external force f(t)
f(t)
𝑚𝑥 = 𝑓total = 𝑓 − 𝑘𝑥 − 𝑐𝑥ሶ − 𝑚𝑔
𝑚𝑥 + 𝑐𝑥ሶ + 𝑘𝑥 − 𝑓 + 𝑚𝑔 = 0
Or represented as a function:
𝑔(𝑥 , 𝑥ሶ , 𝑥; 𝑓) = 0
7
System: Mathematical Description
• A system is physical or artificial, that (takes an input and) produces some
output
Input Output
System
• Mathematical notation
• Input: 𝑢 𝑡 , 𝑡 ≥ 0
• Output: 𝑦 𝑡 , 𝑡 ≥ 0
• Mathematical model
𝑔 𝑦 𝑡 , 𝑦′ 𝑡 , … , 𝑦 𝑛 𝑡 , 𝑢 𝑡 , 𝑢′ 𝑡 , … , 𝑢 (𝑚) 𝑡 = 0; 𝑚 ≤ 𝑛
8
Equilibrium Points
• Mathematically, an equilibrium point is a pair (𝑢𝑒𝑞 , 𝑦𝑒𝑞 ) satisfying
𝑔 𝑦𝑒𝑞 , 0, … , 0, 𝑢𝑒𝑞 , 0, … , 0 = 0
9
Example
Solve the equilibrium points of the below system:
The solution to finding the equilibrium
′′ ′ points for the system:
𝐿𝑖 + 𝑅𝑖 + 𝐶𝑖 − 𝑒′ = 0
𝐿𝑖″ + 𝑅𝑖′ + 𝐶𝑖 − 𝑒′ = 0
0 + 0 + 𝐶 ⋅ 𝑖𝑒𝑞 − 0 = 0
This implies:
𝑖𝑒𝑞 = 0
(𝑒𝑒𝑞 ∈ ℝ, 𝑖𝑒𝑞 = 0)
10
Example
Solve the equilibrium points of the below system:
The equilibrium points for the system:
1 1
𝐽𝜔ሶ + 𝑘 2 𝑅 𝜔 + 𝑐𝑞 𝜔2 − 𝑘 𝑢 =0
𝑣 𝑎 𝑣 𝑅𝑎
At equilibrium, set , , , , .
Solve for :
11
Example
Solve the equilibrium points of the below system:
𝑚𝑥 + 𝑐𝑥ሶ + 𝑘𝑥 − 𝑓 + 𝑚𝑔 = 0
0 + 0 + 𝑘𝑥𝑒𝑞 − 𝑓𝑒𝑞 + 𝑚𝑔 = 0
𝑘𝑥𝑒𝑞 − 𝑓𝑒𝑞 + 𝑚𝑔 = 0
12
Outline
• System description
• Linear Time-Invariant (LTI) systems and
linearization
• Transfer functions
• Block diagrams and reductions
13
LTI system
• General:
𝑔 𝑦 𝑡 , 𝑦′ 𝑡 , … , 𝑦 𝑛 𝑡 , 𝑢 𝑡 , 𝑢′ 𝑡 , … , 𝑢 (𝑚) 𝑡 = 0; 𝑚 ≤ 𝑛
𝑔 𝑦 𝑡 , 𝑦′ 𝑡 , … , 𝑦 𝑛
𝑡 , 𝑢 𝑡 , 𝑢′ 𝑡 , … , 𝑢 (𝑚) 𝑡 =
𝐴0 𝑦 𝑡 + 𝐴1 𝑦 ′ 𝑡 … + 𝐴𝑛 𝑦 𝑛 𝑡 + 𝐵0 𝑢 𝑡 + 𝐵1 𝑢′ 𝑡 + ⋯ + 𝐵𝑚 𝑢 𝑚 𝑡 + 𝐶 = 0;
14
Example
Is the below system LTI?
𝐿𝑖 ′′ + 𝑅𝑖 ′ + 𝐶𝑖 − 𝑒′ = 0
Yes
15
Example
Is the below system LTI?
1 1
𝐽𝜔ሶ + 𝑘 2 𝑅 𝜔 + 𝑐𝑞 𝜔2 − 𝑘 𝑢 =0
𝑣 𝑎 𝑣 𝑅𝑎
No
16
Example
Is the below system LTI?
𝑚𝑥 + 𝑐𝑥ሶ + 𝑘𝑥 − 𝑓 + 𝑚𝑔 = 0
Yes
17
Linearization
• LTI system
𝐴0 𝑦 𝑡 + 𝐴1 𝑦 ′ 𝑡 … + 𝐴𝑛 𝑦 𝑛
𝑡 + 𝐵0 𝑢 𝑡 + 𝐵1 𝑢′ 𝑡 + ⋯ + 𝐵𝑚 𝑢 𝑚
𝑡 +𝐶 =0
𝑔 𝑦 𝑡 , 𝑦′ 𝑡 , … , 𝑦 𝑛 𝑡 , 𝑢 𝑡 , 𝑢′ 𝑡 , … , 𝑢 (𝑚) 𝑡 =0
18
Error Analysis – Definition
• Key observation: Practical systems typically operate near to a known
equilibrium point (𝑢𝑒𝑞 , 𝑦𝑒𝑞 )
19
Error Analysis – Approximation
• Key observation: Practical systems typically operate near to a known
equilibrium point (𝑢𝑒𝑞 , 𝑦𝑒𝑞 )
𝑦 = 𝑦 − 𝑦𝑒𝑞 ≈ 0 𝑢 = 𝑢 − 𝑢𝑒𝑞 ≈ 0
𝑦 ′ = 𝑦 ′ ≈ 0 𝑢 ′ = 𝑢′ ≈ 0
⋮ ⋮
20
Error Analysis – Approximation
• Taylor series expansion
𝑓 𝑥1 , … , 𝑥𝑘 = 𝑓 𝑥ҧ1 , … , 𝑥ҧ 𝑘 The constant term
𝜕𝑓 𝜕𝑓
+ ቤ 𝑥1 − 𝑥ҧ1 + ⋯ + ቤ 𝑥 − 𝑥ҧ 𝑘 First order terms
𝜕𝑥1 0 𝜕𝑥𝑘 0 𝑘
𝑔 𝑦, 𝑦 ′ , … , 𝑦 𝑛
, 𝑢, 𝑢′ , … , 𝑢(𝑚) = 𝑔 𝑦𝑒𝑞 , 0, … , 0, 𝑢𝑒𝑞 , 0, … , 0
𝜕𝑔 𝜕𝑔 𝜕𝑔 𝜕𝑔 𝜕𝑔 𝜕𝑔
+ ቤ 𝑦 − 𝑦𝑒𝑞 + ′ ቤ 𝑦 ′ + ⋯ + ቤ 𝑦 𝑛
+ ቤ 𝑢 − 𝑢𝑒𝑞 + ′ ቤ 𝑢′ + ⋯ + ቤ 𝑢 𝑚
𝜕𝑦 0 𝜕𝑦 0 𝜕𝑦 𝑛 0 𝜕𝑢 0 𝜕𝑢 0 𝜕𝑢 𝑚 0
2 𝑛 2 2 𝑚 2
+𝑜 (𝑦 − 𝑦𝑒𝑞 )2 + 𝑜 𝑦 ′ + ⋯+𝑜 𝑦 + 𝑜 (𝑢 − 𝑢𝑒𝑞 )2 + 𝑜 𝑢′ +⋯+ 𝑜 𝑢
+⋯ 21
Error Analysis – Approximation
• Taylor series expansion
𝑔 𝑦, 𝑦 ′ , … , 𝑦 𝑛
, 𝑢, 𝑢′ , … , 𝑢(𝑚) = 𝑔 𝑦𝑒𝑞 , 0, … , 0, 𝑢𝑒𝑞 , 0, … , 0
𝜕𝑔 𝜕𝑔 𝜕𝑔 𝜕𝑔 𝜕𝑔 𝜕𝑔
+ ቤ 𝑦 − 𝑦𝑒𝑞 + ′ ቤ 𝑦 ′ + ⋯ + ቤ 𝑦 𝑛
+ ቤ 𝑢 − 𝑢𝑒𝑞 + ′ ቤ 𝑢′ + ⋯ + ቤ 𝑢 𝑚
𝜕𝑦 0 𝜕𝑦 0 𝜕𝑦 𝑛 0 𝜕𝑢 0 𝜕𝑢 0 𝜕𝑢 𝑚 0
2 𝑛 2 2 𝑚 2
+𝑜 (𝑦 − 𝑦𝑒𝑞 )2 + 𝑜 𝑦 ′ + ⋯+𝑜 𝑦 + 𝑜 (𝑢 − 𝑢𝑒𝑞 )2 + 𝑜 𝑢′ +⋯+ 𝑜 𝑢
+⋯
𝜕𝑔 𝜕𝑔
𝐴𝑖 = ቤ ; 𝐵 = ቤ
𝜕𝑦 (𝑖) 0 𝑖 𝜕𝑢(𝑖) 0
𝑔 𝑦, 𝑦 ′ , … , 𝑦 𝑛
, 𝑢, 𝑢′ , … , 𝑢(𝑚) = 0 + 𝐴0 𝑦 + 𝐴1 𝑦 ′ + ⋯ + 𝐴𝑛 𝑦 𝑛
+ 𝐵0 𝑢 + 𝐵1 𝑢 ′ + ⋯ + 𝐵𝑚 𝑢 𝑚
2 𝑛 2 2 𝑚 2
+𝑜 𝑦 2 + 𝑜 𝑦 ′ + ⋯ + 𝑜 𝑦 + 𝑜 𝑢 2 + 𝑜 𝑢 ′ + ⋯ + 𝑜 𝑢
+⋯
22
Error Analysis – Approximation
• Truncation:
𝑔 𝑦, 𝑦 ′ , … , 𝑦 𝑛
, 𝑢, 𝑢′ , … , 𝑢(𝑚) = 0 + 𝐴0 𝑦 + 𝐴1 𝑦 ′ + ⋯ + 𝐴𝑛 𝑦 𝑛
+ 𝐵0 𝑢 + 𝐵1 𝑢 ′ + ⋯ + 𝐵𝑚 𝑢 𝑚
2 𝑛 2 2 𝑚 2
+𝑜 𝑦 2 + 𝑜 𝑦 ′ + ⋯ + 𝑜 𝑦 + 𝑜 𝑢 2 + 𝑜 𝑢 ′ + ⋯ + 𝑜 𝑢
+⋯
𝑢 (𝑘) and 𝑦 (𝑘) are small
2 2
𝑢 (𝑘) and 𝑦 (𝑘) are smaller
3 3
𝑢 (𝑘) and 𝑦 (𝑘) are even smaller
…
𝑔 𝑦, 𝑦 ′ , … , 𝑦 𝑛
, 𝑢, 𝑢′ , … , 𝑢(𝑚) ≈ 𝐴0 𝑦 + 𝐴1 𝑦 ′ + ⋯ + 𝐴𝑛 𝑦 𝑛
+ 𝐵0 𝑢 + 𝐵1 𝑢 ′ + ⋯ + 𝐵𝑚 𝑢 𝑚
23
Error Analysis – Approximation
• Hence:
0 = 𝑔 𝑦, 𝑦 ′ , … , 𝑦 𝑛
, 𝑢, 𝑢′ , … , 𝑢(𝑚) ≈ 𝐴0 𝑦 + 𝐴1 𝑦 ′ + ⋯ + 𝐴𝑛 𝑦 𝑛
+ 𝐵0 𝑢 + 𝐵1 𝑢 ′ + ⋯ + 𝐵𝑚 𝑢 𝑚
𝑎0 𝑦 + ⋯ + 𝑎𝑛−1 𝑦 (𝑛−1) + 𝑦 𝑛
= 𝑏0 𝑢 + 𝑏1 𝑢 ′ + ⋯ + 𝑏𝑚 𝑢 𝑚
𝐴𝑖 𝐵𝑖
𝑎𝑖 = ; 𝑏𝑖 = −
𝐴𝑛 𝐴𝑛
24
Linearization
𝑢(𝑡) 𝑦 𝑡
𝑔 𝑦 𝑡 , 𝑦′ 𝑡 ,…,𝑦 𝑛 𝑡 ,𝑢 𝑡 , 𝑢′ 𝑡 , … , 𝑢 (𝑚) 𝑡 =0
𝜕𝑔 𝜕𝑔
ฬ ฬ
𝜕𝑦 (𝑖) 0 𝜕𝑢 (𝑖) 0 Linearization at (𝑢𝑒𝑞 , 𝑦𝑒𝑞 )
𝑎𝑖 = , 𝑏𝑖 = − ;
𝜕𝑔 𝜕𝑔
ฬ ฬ
𝜕𝑦 (𝑛) 0 𝜕𝑦 (𝑛) 0
𝑢(𝑡) 𝑢(𝑡)
𝑎0 𝑦(𝑡)
+ ⋯ 𝑎𝑛−1 𝑦 (𝑛−1) + 𝑦 𝑛 (𝑡) 𝑦(𝑡)
𝑦 𝑡
+ = 𝑏0 𝑢(𝑡)
+ 𝑏1 𝑢 ′ (𝑡) + ⋯ + 𝑏𝑚 𝑢 𝑚 (𝑡) +
- +
𝑢𝑒𝑞 𝑦𝑒𝑞
▪ The linearization is valid only when y(t) and u(t) are
near to yeq and ueq, respectively.
▪ ~ will be dropped in the following discussion 25
Example
Linearize the following system around its respective equilibrium point
𝐿𝑖 ′′ + 𝑅𝑖 ′ + 𝐶𝑖 − 𝑒′ = 0
26
Example
Linearize the following system around its respective equilibrium point
1 1
𝐽𝜔ሶ + 𝑘 2 𝑅 𝜔 + 𝑐𝑞 𝜔2 − 𝑘 𝑢 =0
𝑣 𝑎 𝑣 𝑅𝑎
27
Example
Linearize the following system around its respective equilibrium point
𝑚𝑥 + 𝑐𝑥ሶ + 𝑘𝑥 − 𝑓 + 𝑚𝑔 = 0
28
Outline
• System description
• Linear Time-Invariant (LTI) systems and
linearization
• Transfer functions
• Block diagrams and reductions
29
Transfer function (!)
• First, consider a LTI system:
𝑦 (𝑛) + 𝑎𝑛−1 𝑦 (𝑛−1) + ⋯ + 𝑎1 𝑦ሶ + 𝑎0 𝑦
= 𝑏𝑚 𝑢(𝑚) + 𝑏𝑚−1 𝑢(𝑚−1) + ⋯ + 𝑏1 𝑢ሶ + 𝑏0 𝑢 (𝑛 ≥ 𝑚)
• Take Laplace transform to both side, differential equation-> algebraic eq.
• Assuming zero initial conditions:
𝑎0 𝑠 𝑛 + 𝑎1 𝑠 𝑛−1 + ⋯ + 𝑎𝑛−1 𝑠 + 𝑎𝑛 𝑌(𝑠)
= 𝑏0 𝑠 𝑚 + 𝑏1 𝑠 𝑚−1 + ⋯ + 𝑏𝑚−1 𝑠 + 𝑏𝑚 𝑈(𝑠)
• The Transfer Function of the system is then:
ℒ(Output)
𝐺 𝑠 ≜ ቤ
ℒ(Input) zero initial conditions
30
Transfer function
• Very important: the foundation of frequency-based control design
• It is a property of the system itself: does not change with the input
• With the system transfer function, its forced response can be calculated for
ANY input: 𝑦 𝑡 = ℒ −1 𝑌 𝑠 = ℒ −1 𝐺 𝑠 𝑈(𝑠)
• Can be obtained by
• modelled from its physical equations
• identified input/output data (system identification)
31
Terminologies
• Given a system 𝐺(𝑠)
32
Impulse response
• For impulse input 𝑢 𝑡 = 𝛿(𝑡)
𝑈 𝑠 =1
𝑌 𝑠 = 𝐺 𝑠 𝑈 𝑠 = 𝐺(𝑠)
33
Response for Any Input
• For an input 𝑢 𝑡 with 𝑈 𝑠 = ℒ{𝑢 𝑡 },
𝑌 𝑠 = 𝐺 𝑠 𝑈(𝑠)
34
Representation of A LTI System
• Differential Equation
• Impulse response
𝑢(𝑡) 𝑦 𝑡 = 𝑔 𝑡 ∗ 𝑢(𝑡)
𝑔 𝑡
• Transfer function
𝑈(𝑠) 𝑌 𝑠 = 𝐺 𝑠 𝑈(𝑠)
𝐺 𝑠
35
Example
Obtain the transfer function of the following system
𝐿𝑖 ′′ + 𝑅𝑖 ′ + 𝐶𝑖 − 𝑒′ = 0
36
Example
Obtain the transfer function of the following system
1 1
𝐽𝜔ሶ + 𝑘 2 𝑅 𝜔 + 𝑐𝑞 𝜔2 − 𝑘 𝑢 =0
𝑣 𝑎 𝑣 𝑅𝑎
37
Example
Obtain the transfer function of the following system
𝑚𝑥 + 𝑐𝑥ሶ + 𝑘𝑥 − 𝑓 + 𝑚𝑔 = 0
38
Example (2015-2016 Final Exam, Q5)
Obtain the transfer function of the following system from the input displacement x to
the output displacement y. The reference point of x, y are made such that when x=0
and y=0, the two springs k1 and k2 are at their free length.
39
Use MATLAB
Define a transfer function in MATLAB: “tf”
40
System description
• Examples
• Linear Time-Invariant (LTI) systems and
linearization
• Transfer functions
• Block diagrams and reductions
41
Block Diagrams
• A pictorial representation of a system
• Intuitively illustrate system component relations and signal flows
• Easing the simplification and analysis of larger network consisting of many
systems
𝑈(𝑠) 𝑌 𝑠
𝐺 𝑠
𝑌 𝑠 = 𝐺 𝑠 𝑈(𝑠)
42
Elements (!)
• Block 𝐺 𝑠
Signals are always unidirectional.
• Signal
𝑈(𝑠) Double-arrow lines should ever appear!
𝑈(𝑠)
• Input 𝐺 𝑠
𝑌(𝑠)
• Output 𝐺 𝑠
𝑌(𝑠) 𝑌(𝑠)
43
Block Diagram Transformations
1. Combining blocks in cascade
𝑋1 𝑋2 𝑋3 𝑋1 𝑋3
𝐺1 𝐺2 𝐺2 𝐺1
44
Block Diagram Transformations
2. Moving a summing point ahead of a block
𝑋1 𝑋3 𝑋1 𝑋3
𝐺 + +
𝐺
± ±
1 𝑋2
𝑋2
𝐺
45
Block Diagram Transformations
3. Moving a summing point behind a block
𝑋1 𝑋3 𝑋1 𝑋3
+
𝐺 𝐺 +
± ±
𝑋2 𝑋2
𝐺
46
Block Diagram Transformations
4. Moving a pickoff point ahead of a block
𝑋1 𝑋2 𝑋1 𝑋2
𝐺 𝐺
𝑋2
𝑋2 𝐺
47
Block Diagram Transformations
5. Moving a pickoff point behind a block
𝑋1 𝑋2
𝑋1 𝑋2 𝐺
𝐺
𝑋1 𝑋1 1
𝐺
48
Block Diagram Transformations
6. Eliminating a negative feedback loop
𝑋1 𝑋2 𝑋1 𝐺 𝑋2
+ 𝐺 1 + 𝐺𝐻
−
49
Block Diagram Transformations
7. Eliminating a negative feedback loop
𝑋1 𝑋2 𝑋1 𝐺 𝑋2
+ 𝐺 1 + 𝐺𝐻
−
𝑋1 𝑋2 𝑋1 𝐺 𝑋2
+ 𝐺 1 − 𝐺𝐻
+
𝑋1 𝑋2 𝑋1 𝐺 𝑋2
+ 𝐺 1 ∓ 𝐺𝐻
±
53
Block Diagrams Reduction
• A block diagram may contain multiple loops and blocks
• Reduce one loop at once, using the elementary block diagram
transformations
• Start with the innermost loop
54
Example
Obtain the transfer function of the following network
𝑋1
𝑋2 ++ 𝑌
+
𝐺 𝑃
−
55
Example
Obtain the transfer function of the following network
𝑋1
𝑋2 ++ 𝑌
𝐺 𝑃
+
−
𝐻
56
Example
Obtain the transfer function of the following network
57
Example
Below shows the structure of a feedback control system with a disturbance observer (DoB). Determine
the transfer function from 𝑅 𝑠 to the tracking error 𝐸 𝑠 . DoB is widely used in high-precision
machines to attenuate the effect of disturbance. The idea of DoB design is to first estimate the total input
𝑉 𝑠 from the system output 𝑌(𝑠) by inverting the system plant model 𝐺𝑛 (𝑠). The estimated total input
𝑉 𝑠 , after removing the known control input 𝑈(𝑠), would give an estimate of the disturbance that is
contaminated by noise in 𝑌(𝑠). To eliminate this noise, a low pass filter denoted by 𝑄 𝑠 is hence used to
obtain the filtered disturbance estimate 𝐷 𝑠 . This estimated disturbance 𝐷 𝑠 is then added to the
ഥ 𝑠 , hoping that 𝐷
original control input 𝑈 𝑠 would cancel 𝐷 𝑠 and that the control input 𝑈 ഥ 𝑠 (i.e.,
controller 𝐶 𝑠 ) can be designed as the system has no disturbance 𝐷 𝑠 at all.
58