Professional Documents
Culture Documents
Lecture 9A
Robitics/control
General LDE technology
Mechanical systems
Example LDE – traditional solution
Source term, t > 0
𝑦(𝑡)
ሶ + 2𝑦(𝑡) = 𝑥(𝑡) How to solve?
𝑥(𝑡) = 3 cos( 4𝑡) Initial value condition
𝑦(0) = 𝑦0
Classical method
1) Find homogeneous (internal) solution, source term = 0 → 𝑦(𝑡)
ሶ + 2𝑦(𝑡) = 0
1
𝑦1 𝑡 = 𝑌1 𝑒 4𝑖𝑡 → 4𝑖 ∙ 𝑌1 𝑒 4𝑖𝑡 + 2 ∙ 𝑌1 𝑒 4𝑖𝑡 = 3 𝑒 4𝑖𝑡
2
3 3 1 3 1
→ 4𝑖 + 2 𝑌1 = → 𝑌1 = Similarly 𝑦2 𝑡 = 𝑌2 𝑒 −4𝑖 → 𝑌2 =
2 2 2 + 4𝑖 2 2 − 4𝑖
Example LDE – traditional solution (cont)
Source term, t > 0
𝑦(𝑡)
ሶ + 2𝑦(𝑡) = 𝑥(𝑡)
𝑥(𝑡) = 3 cos( 4𝑡) Initial value condition
𝑦(0) = 𝑦0
3 1
𝑌1 =
2 2 + 4𝑖
Simplify the particular solution using
complex representation 𝑦1 𝑡 = 𝑌1 𝑒 4𝑖𝑡 ; 𝑦2 𝑡 = 𝑌2 𝑒 −4𝑖𝑡 𝑌2 =
3 1
2 2 − 4𝑖
𝑌1 = 𝑌1 𝑒 𝑖𝜃1 ; 𝑌2 = 𝑌2 𝑒 𝑖𝜃2 3 1 3
𝑌1 = 𝑌1∗ 𝑌1 = =
2 2 + 4𝑖 2 − 4𝑖 2 20
3
𝑌1 = 𝑌2 =
Phase angle 𝜃1 (= −𝜃2 ) 2 20
3 1 3 2 − 4𝑖 3 2 − 4𝑖 3
= = = 1 − 2𝑖
2 2 + 4𝑖 2 2 + 4𝑖 2 − 4𝑖 2 2 + 4𝑖 2 − 4𝑖 20
3 3 1
𝑦 𝑡 = 𝑦0 − 𝑒 −2𝑡 + cos 4𝑡 − 𝜃 ; 𝜃 = tan−1 2 = cos−1
10 20 5
So a quite simple PDE is quite complex to solve using the traditional analytical
mathematics method. So how can we proceed using the LT transform ?
Laplace transform with initial values (1st order LDE) Ch 7.6
𝛼1 𝑦(𝑡)
ሶ + 𝛼0 𝑦(𝑡) = 𝛽1 𝑥(𝑡)
ሶ + 𝛽0 𝑥(𝑡)
Later on we shall extend this further
𝑑𝑓 𝑡 including general state variables z(0)
ℒ = 𝑠 𝐹 𝑠 − 𝑓 0+
𝑑𝑡
𝛽1 𝑠 + 𝛽0 𝛼1 𝛽0 − 𝛼0 𝛽1
𝑌(𝑠) = 𝑋(𝑠) + 𝑧(0)
Differentiation theorem of LT. Take into account 𝛼1 𝑠 + 𝛼0 𝛼1 𝑠 + 𝛼0
the initial value of the function to transform.
𝑌(𝑠) = 𝐻(𝑠)𝑋(𝑠) + 𝐺(𝑠)𝑧(0)
Depends on the
𝑌 𝑠 𝛼1 𝑠 + 𝛼0 − 𝛼1 𝑦 0+ = G(s) energy stored in the
= 𝑋 𝑠 𝛽1 𝑠 + 𝛽0 − 𝛽1 𝑥 0+ system
Yint(s)
X(s)
𝛽1 𝑠 + 𝛽0 1 H(s) S Y(s)
𝑌(𝑠) = 𝑋(𝑠) + 𝛼1 ⋅ 𝑦(0) − 𝛽1 ⋅ 𝑥(0)
𝛼1 𝑠 + 𝛼0 𝛼1 𝑠 + 𝛼0 Yext(s)
Depends on external signals
This we recognize as This we defined as the applied to the system..
H(s) X(s) – the external ‘internal solution’
solution depending on depending on the initial
the applied x(t) values (BC) of the system. Let’s return to our LDE →
Example LDE – Laplace Transform approach 1st order LDE
Source term
𝑦(𝑡)
ሶ + 2𝑦(𝑡) = 𝑥(𝑡) 𝑎1 𝑦(𝑡)
ሶ + 𝑎0 𝑦(𝑡) = 𝑏1 𝑥(𝑡)
ሶ + 𝑏0 𝑥(𝑡)
𝑥(𝑡) = 3 cos( 4𝑡) Initial value condition
𝑦(0) = 𝑦0
Identification:
𝑎1 = 1; 𝑎0 = 2
Solve with Laplace Transform technique
𝑏1 = 0; 𝑏0 = 1
external part
𝑏1 𝑠 + 𝑏0 1
We had 𝑌(𝑠) = 𝑋(𝑠) + 𝑎 ⋅ 𝑦(0) − 𝑏1 ⋅ 𝑥(0)
𝑎1 𝑠 + 𝑎0 𝑎1 𝑠 + 𝑎0 1
internal part
identification
1 1
𝑌(𝑠) = 𝑋(𝑠) + 𝑦(0)
𝑠+2 𝑠+2
−𝑎𝑡
1
use 𝐿 𝑒 = PFE: A little algebra yields
𝑠+𝑎
𝑦0
⇒ 𝑦𝑖𝑛𝑡 𝑡 = 𝑦0 𝑒 −2𝑡 int
𝑠+2 1 3𝑠 𝐴 𝐵 𝐶
= + +
internal part 𝑠+2 𝑠 2 + 42 𝑠 + 2 𝑠 − 4𝑖 𝑠 + 4𝑖
external part 3 3 −1
1 𝐴=− ; 𝐵= 𝑒 −𝑖 tan 2
; 𝐶 = 𝐵∗
𝑌𝑒𝑥𝑡 (𝑠) = 𝑋(𝑠) = 10 2 20
𝑠+2
1 1 3𝑠
= 𝐿𝑇 3 cos 4 𝑡 =
𝑠+2 𝑠 + 2 𝑠 2 + 42
Example LDE – Laplace Transform approach PFE: A little algebra yields
𝑦(𝑡)
ሶ + 2𝑦(𝑡) = 𝑥(𝑡) 1 3𝑠 𝐴 𝐵 𝐶
= + +
𝑥(𝑡) = 3 cos( 4𝑡) 𝑠+2 𝑠 2 + 42 𝑠 + 2 𝑠 − 4𝑖 𝑠 + 4𝑖
𝑦(0) = 𝑦0
3 3 −1
From Laplace Transform technique 𝐴=− ; 𝐵= 𝑒 −𝑖 tan 2
; 𝐶 = 𝐵∗
10 2 20
internal part 𝑦𝑖𝑛𝑡 𝑡 = 𝑦0 𝑒 −2𝑡 int
external part
3 −2𝑡 3
𝑦𝑒𝑥𝑡 𝑡 = − 𝑒 + cos( 4𝑡 − 𝜃); tan 𝜃 = 2
10 20 (set y0 = 0.8 in plots)
𝟑 𝟑
𝒚 𝒕 = 𝒚𝟎 − 𝒆−𝟐𝒕 + 𝐜𝐨𝐬( 𝟒𝒕 − 𝜽); 𝐭𝐚𝐧 𝜽 = 𝟐
𝟏𝟎 𝟐𝟎
With
𝑌 𝑠 𝑏𝑚 𝑠 𝑚 + 𝑏𝑚−1 𝑠 𝑚−1 +. . 𝑏1 𝑠 + 𝑏0
𝐻 𝑠 = =
𝑋 𝑠 𝑎𝑛 𝑠 𝑛 + 𝑎𝑛−1 𝑠 𝑛−1 +. . 𝑎1 𝑠 + 𝑎0
And the 2nd term specific for the 2nd order LDE
𝑎2 𝑠 − 𝑎1 𝑦 0+ + 𝑎2 𝑦 ′ 0+ − 𝑏2 𝑠 − 𝑏1 𝑥 0+ + 𝑏2 𝑥′ 0+
𝐺 𝑠 𝑧 0 =
𝑎2 𝑠 2 + 𝑎1 𝑠 + 𝑎0
Nb the same
denominator as H(s) Although complex, this is straight forward to
solve using PFE etc, as for previous example.
Solved example - Accelerometer
𝑌 𝑠 𝑏𝑚 𝑠 𝑚 + 𝑏𝑚−1 𝑠 𝑚−1 +. . 𝑏1 𝑠 + 𝑏0
Solved example - Accelerometer 𝐻 𝑠 =
𝑋 𝑠
=
𝑎𝑛 𝑠 𝑛 + 𝑎𝑛−1 𝑠 𝑛−1 +. . 𝑎1 𝑠 + 𝑎0
+
𝑎2 𝑠 − 𝑎1 𝑦 0+ + 𝑎2 𝑦 ′ 0 − 𝑏2 𝑠 − 𝑏1 𝑥 0+ + 𝑏2 𝑥′ 0+
𝐺 𝑠 𝑧 0 =
𝑎2 𝑠 2 + 𝑎1 𝑠 + 𝑎0
A micro-accelerometer may be modelled from a
second-order mass-damper-spring.
M is the proof mass
K an effective spring constant
D the damping factor
𝑑 𝑑2
𝑀⋅𝑥 𝑡 −𝐷 𝑦 𝑡 − 𝐾𝑦 𝑡 = 𝑀 2 𝑦 𝑡
𝑑𝑡 𝑑𝑡
This is a common LDE respresenting mechanic systems and it is insightful to use the following two new quantities:
𝐾
The natural frequency of the accelerometer: 𝜔𝑛 =
𝑀
𝐾𝑀
The dimension-less quality factor of the accelerometer: 𝑄=
𝐷 𝑟𝑎𝑑
𝜔𝑛 = 10000
Using these quantities we can rewrite the LDE of the accelerometer 𝑠
𝑄 = 1/2
by 𝑦(0) = −2 × 10−7 𝑚
𝑑2 𝜔𝑛 𝑑 𝑑
𝑦(𝑡) + 𝑦(𝑡) + 𝜔𝑛2 𝑦(𝑡) = 𝑥(𝑡) 𝑑𝑡
𝑦(𝑡)ቤ =0
𝑑𝑡 2 𝑄 𝑑𝑡 0.3 ms 𝑡=0
𝑚
𝑥(𝑡) = 20 𝑢 𝑡 − 𝑢 𝑡 − 3 × 10−4
pulse 𝑠2
𝑟𝑎𝑑
𝜔𝑛 = 10000
𝑠
Solved example - Accelerometer 𝑄 = 1/2
𝑦(0) = −2 × 10−7 𝑚
𝑑
𝑦(𝑡)ቤ =0
𝑑𝑡 𝑡=0
𝜔𝑛 𝑑𝑦 𝑚
𝑠+ 𝑦(0) + ฬ 𝑥(𝑡) = 20 𝑢 𝑡 − 𝑢 𝑡 − 3 × 10−4
1 𝑄 𝑑𝑡 𝑡=0 𝑠2
𝑌(𝑠) = 𝜔𝑛 𝑋(𝑠) + 𝜔
𝑠2 + 2
𝑠 + 𝜔𝑛 𝑠 2 + 𝑛 𝑠 + 𝜔𝑛2
𝑄 𝑄
1 1 −3×10−4 𝑠 1 −4
𝑋(𝑠) = 20 − 𝑒 = 20 1 − 𝑒 −3×10 𝑠
external response internal response 𝑠 𝑠 𝑠
(or forced response) (or natural response)
𝑠 + 20000
𝑌𝑖𝑛𝑡 𝑠 = −2 × 10−7
𝑠 2 + 20000𝑠 + 100002
𝑠 + 20000 1 10000
𝑌𝑖𝑛𝑡 𝑠 = 2
−2 × 10−7 = + 2
−2 × 10−7
𝑠 + 10000 𝑠 + 10000 𝑠 + 10000
1 1
𝐿𝑇 𝑒 −𝑎𝑡 = 𝐿𝑇 𝑡𝑒 −𝑎𝑡 =
𝑠+𝑎 𝑠+𝑎 2
Matlab:
1 −3×10−4 𝑠 >> [r,p,s]=residue([1],[1 20000 100000000 0])
𝑌𝑒𝑥𝑡 (𝑠) = 20 1 − 𝑒
𝑠 𝑠 2 + 20000𝑠 + 100002 r=
1.0e-04 *
-0.0001
-1.0000
1 10000 1 20 −4
𝑌𝑒𝑥𝑡 (𝑠) = − − 2
+ 8
1 − 𝑒 −3×10 𝑠 0.0001
𝑠 + 10000 𝑠 + 10000 𝑠 10 p=
-10000
-10000
0
s=
[]
20 𝑡−3×10−4 𝑡−3×10−4
𝑦𝑒𝑥𝑡 (𝑡) = 1 − 𝑒 −10000⋅𝑡 − 10000 ⋅ 𝑡 ⋅ 𝑒 −10000⋅𝑡 𝑢(𝑡) − 1 − 𝑒 −10000 − 10000 𝑡 − 3 × 10−4 𝑒 −10000 𝑢 𝑡 − 3 × 10−4
108
Solved example - Accelerometer
𝑑2 𝜔𝑛 𝑑
2
𝑦(𝑡) + 𝑦(𝑡) + 𝜔𝑛2 𝑦(𝑡) = 𝑥(𝑡)
𝑑𝑡 𝑄 𝑑𝑡 Total response
𝑟𝑎𝑑
𝜔𝑛 = 10000
𝑠
𝑄 = 1/2
𝑦(0) = −2 × 10−7 𝑚
𝑑
𝑦(𝑡)ቤ =0
𝑑𝑡 𝑡=0
𝑚
𝑥(𝑡) = 20 𝑢 𝑡 − 𝑢 𝑡 − 3 × 10−4
𝑠2
𝑌 𝑠 𝑏𝑚 𝑠 𝑚 + 𝑏𝑚−1 𝑠 𝑚−1 +. . 𝑏1 𝑠 + 𝑏0
𝐻 𝑠 = =
𝑋 𝑠 𝑎𝑛 𝑠 𝑛 + 𝑎𝑛−1 𝑠 𝑛−1 +. . 𝑎1 𝑠 + 𝑎0
We will next time continue with ‘state variable and systems’ (Ch 8) which
is a similar but more flexible approach for suitable for numerical schemes.