You are on page 1of 15

TFY Signal Processing

Lecture 9A

Initial value problems with LT

T9A.pdf and VL9A.mp4


We have seen how FT and LT techniques are very poerful to investigate both steady
state and transient input signals. Here it will be introduced techniques for solving causal
LTI systems being in some certain initial state, meaning that there is energy stored in the
system.

Electrical circuits Chemical reactions

𝑥(𝑡) Initial state y(𝑡)


variables –
stored energy.

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

𝑦ℎ (𝑡) = 𝐶 ⋅ 𝑒 −2𝑡 C is later given by BC (boundary condition)

2) Find particular (external) solution, include specific source term →


𝑦(𝑡)
ሶ + 2𝑦(𝑡) = 3 cos( 4𝑡)
1 Solve for each frequency and
Let 𝑥(𝑡) = 3 cos( 4𝑡) = 3 ⋅ 𝑒 4𝑖𝑡 + 𝑒 −4𝑖𝑡 add solutions because of
2
linearity.

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

Im(Y1) tan 𝜃1 = −2;


1 3 3
𝑜𝑟 cos 𝜃1 = − 𝑦1 𝑡 = 𝑒 −𝜃𝑖 𝑒 4𝑖𝑡 ; 𝑦2 𝑡 = 𝑒 𝜃𝑖 𝑒 −4𝑖𝑡 ;
1 5 2 20 2 20
q1 3
Re(Y1) 𝑦𝑝 𝑡 = 𝑦1 𝑡 + 𝑦2 𝑡 = cos 4𝑡 − 𝜃 ; 𝜃 = tan−1 2
-2i
20
Example LDE – traditional solution (cont)
Source term, t > 0
𝑦(𝑡)
ሶ + 2𝑦(𝑡) = 𝑥(𝑡)
𝑥(𝑡) = 3 cos( 4𝑡) Initial value condition
𝑦(0) = 𝑦0

We had 𝑦 (𝑡) = 𝐶 ⋅ 𝑒 −2𝑡



3 1 𝑦 𝑡 = 𝑦ℎ 𝑡 + 𝑦𝑝 (𝑡)
−1 −1
𝑦𝑝 𝑡 = cos 4𝑡 − 𝜃 ; 𝜃 = tan 2 = cos
20 5

Now aply BC (initial condition) to find the constant C


3 0
3 3 1 3
𝑦0 = cos −𝜃 + 𝐶 ∙ 𝑒 → 𝐶 = 𝑦0 − cos 𝜃 = 𝑦0 − = 𝑦0 −
20 20 20 5 10

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)

𝛼1 𝑠 𝑌 𝑠 − 𝑦 0+ + 𝛼0 𝑌 𝑠 = initial values of state


= 𝛽 𝑠 𝑋 𝑠 − 𝑥 0+ + 𝛽0 𝑋(𝑠) variables
z(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)

𝟑 𝟑
𝒚 𝒕 = 𝒚𝟎 − 𝒆−𝟐𝒕 + 𝐜𝐨𝐬( 𝟒𝒕 − 𝜽); 𝐭𝐚𝐧 𝜽 = 𝟐
𝟏𝟎 𝟐𝟎

Homogeneous Particular solution from


solution + BC from ‘classical’ approach
‘classical’ approach

The traditional and Laplace transform


approaches each of course gives the same
solution – However the LT method gives more
clear separation between external and internal
contribution, useful for system design.
Laplace transform with initial values – generalized higher order
𝑛 𝑚
𝑑𝑘 𝑦 𝑡 𝑑𝑘 𝑥 𝑡
෍ 𝑎𝑘 = ෍ 𝑏𝑘 initial values of state
𝑑𝑡𝑘 𝑑𝑡𝑘
𝑘=0 𝑘=0 variables
z(0)
Differentiation theorem of LT.
Depends on the
𝑑𝑘 𝑓 𝑡 G(s) energy stored in the
𝑘
= 𝑠 𝑘 𝐹 𝑠 − 𝑠 𝑘−1 𝑓 0+ − ⋯ − 𝑓 𝑘−1 0+
𝑑𝑡 system

As for the 1st order case we can separet into: Yint(s)


X(s)
H(s) S Y(s)
𝑌(𝑠) = 𝐻(𝑠)𝑋(𝑠) + 𝐺(𝑠)𝑧(0) Yext(s)
This we recognize as This we defined as the Depends on external signals
H(s) X(s) – the external ‘internal solution’ applied to the system..
solution depending on depending on the initial
the applied x(t) values (BC) of the system.

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

all affecting the dynamic movement of the mass in the


y-direction.

We let x(t) denote the acceleration due an external


force and y(t) the resulting displacement of the proof
mass. Newton’s law of motion then gives:

𝑑 𝑑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

𝑦𝑖𝑛𝑡 𝑡 −2 × 10−7 𝑒 −10000𝑡 − 2 × 10−3 𝑡 ⋅ 𝑒 −10000𝑡 𝑢 𝑡


𝑟𝑎𝑑
𝜔𝑛 = 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)

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

Internal (natural) response


𝜔 𝑑𝑦
𝑠 + 𝑛 𝑦(0) + ฬ
1 𝑄 𝑑𝑡 𝑡=0
𝑌(𝑠) = 𝜔𝑛 𝑋(𝑠) + 𝜔𝑛
𝑠2 + 𝑠 + 𝜔𝑛2 2
𝑠 + 𝑠 + 𝜔𝑛2
𝑄 𝑄
𝑦 −2 × 10−7 𝑒 −10000𝑡 − 2 × 10−3 𝑡 ⋅ 𝑒 −10000𝑡 𝑢 𝑡 int

What happens if we increase Q ?


External (forced) response
𝑠 + 20000
𝑌𝑖𝑛𝑡 𝑠 = 2 −2 × 10−7
𝑠 + 20000𝑠 + 100002

20 1 − 𝑒 −10000⋅𝑡 − 10000 ⋅ 𝑡 ⋅ 𝑒 −10000⋅𝑡 𝑢(𝑡) −


𝑦𝑒𝑥𝑡 (𝑡) = 𝑡−3×10−4 𝑡−3×10−4
108 1 − 𝑒 −10000 − 10000 𝑡 − 3 × 10−4 𝑒 −10000 𝑢 𝑡 − 3 × 10−4

If Q > 0.5 we will get complex roots in


denominator and oscillatory solutions.
0.3 ms
Summing up

𝑌(𝑠) = 𝐻(𝑠)𝑋(𝑠) + 𝐺(𝑠)𝑧(0)

𝑌 𝑠 𝑏𝑚 𝑠 𝑚 + 𝑏𝑚−1 𝑠 𝑚−1 +. . 𝑏1 𝑠 + 𝑏0
𝐻 𝑠 = =
𝑋 𝑠 𝑎𝑛 𝑠 𝑛 + 𝑎𝑛−1 𝑠 𝑛−1 +. . 𝑎1 𝑠 + 𝑎0

Specifically up to 2nd order


𝑎2 𝑠 − 𝑎1 𝑦 0+ + 𝑎2 𝑦 ′ 0+ − 𝑏2 𝑠 − 𝑏1 𝑥 0+ + 𝑏2 𝑥′ 0+
𝐺 𝑠 𝑧 0 =
𝑎2 𝑠 2 + 𝑎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.

You might also like