Professional Documents
Culture Documents
Laplace Transform
Jan. 30, 2020 ENGR 410-01 Process Instrumentation and Control (Spring 2020) Page 1 of 10
Reading Assignment: Chap. 2, sections 2.1 and 2.2 of textbook.
- Why the interest in complex numbers? Concept of “Transfer Function” used extensively (will explain later).
- Most Transfer Functions → Ratios of two Polynomials in 𝑠 where 𝑠 = 𝜎 + 𝑗𝜔 and is complex.
- Notation:
Rectangular Notation: 𝑧 = 𝑥 + 𝑗𝑦 ⟹ Re(𝑧) ≡ 𝑥; Im(𝑧) ≡ 𝑦
o Where:
√𝑥 2 + 𝑦 2 = |𝑧| ← Magnitude of 𝑧
𝜃 = ∠𝑧 ← Angle of 𝑧
o Depending on Quadrant:
0 1st and 4th Quad.
𝜃 = tan−1 (𝑦/𝑥) + {+180° 2nd Quad. (2 – 1)
−180° 3rd Quad.
o Note: Most of the time in this course, the complex function 𝑧 = 𝐺(𝑗𝜔) where 𝐺(𝑠) is a ratio of two
polynomials of s.
o Note: Always sketch the complex number to be converted to polar as a vector on the complex plane so you
see in which quadrant the point is located. tan−1 (𝑦/𝑥) alone would not return correct value of 𝜃, refer to
equation (2 – 1) as to when add or subtract 180 degrees.
o Instead of tan−1 , may use calculator Rectangular to Polar: R→P. or MATLAB cart2pol command. It returns
the correct value of 𝜃. Remember default unit of angle in MATLAB is radians.
o Calculator P→R (also MATLAB pol2cart) return correct signs for 𝑥, 𝑦 if 𝜃 is input in the range ±180°.
2nd Quad 𝑥 < 0; 𝑦 > 0; 90° < 𝜃 < 180°: Im 1st Quad 𝑥; 𝑦 > 0, 0 < 𝜃 < 90°:
𝜽 = 𝟏𝟖𝟎° + 𝒕𝒂𝒏−𝟏 (𝒚/𝒙) 𝜽 = 𝒕𝒂𝒏−𝟏 (𝒚/𝒙)
𝑥
𝑦 Re
3rd Quad 𝑥; 𝑦 < 0, −180 < 𝜃 < −90: 4th Quad 𝑥 > 0; 𝑦 < 0, −90 < 𝜃 < 0:
𝜽 = −𝟏𝟖𝟎° + 𝒕𝒂𝒏−𝟏 (𝒚/𝒙) 𝜽 = 𝒕𝒂𝒏−𝟏 (𝒚/𝒙)
Page 1 of 10
Handout 2
Laplace Transform
Jan. 30, 2020 ENGR 410-01 Process Instrumentation and Control (Spring 2020) Page 2 of 10
Complex Numbers Multiplication/Division Rule:
▪ Magnitudes→ Multiply/Divide
▪ Angles→ Add/Subtract.
▪ Example:
▪ Note: Angle in denominator gets a sign change when brought to numerator and vice versa.
o Complex Conjugate→ Change sign of complex part, i.e. if: 𝐺(𝑗𝜔) = 𝑥 + 𝑗𝑦 ⟹ 𝐺 ∗ (𝑗𝜔) = 𝑥 − 𝑗𝑦
▪ You must know how to work with complex numbers both by hand and by MATLAB. Please review your
complex algebra.
Example: Find the magnitude and angle of the following transfer function given 𝑠 = 𝑗𝜔; at 𝜔 = 120𝜋 rad/s:
𝑠
𝐺(𝑠) =
(𝑠 2 + 𝑠 + 1)
MATLAB Commands: With commands below one may calculate magnitude and angle of a function of complex
variable 𝑠, symbolically.
Note: It is best to put MATLAB commands in a script file called “m-file”. In MATLAB main window → Click on
“New Script” (top left) → copy/paste commands and run.
Method 1 (easier):
% Note: % (percent)means comment in MATLAB.
Page 2 of 10
Handout 2
Laplace Transform
Jan. 30, 2020 ENGR 410-01 Process Instrumentation and Control (Spring 2020) Page 3 of 10
r = abs(G1) % Compute magnitude of the complex number G1.
theta = (180/pi) * angle(G1) % Compute angle of complex number G1 and
% Convert it from radians to degrees.
Laplace Transform
Definitions:
▪ Analytic Function: A function G(s) of the complex variable 𝑠 is “analytic” in a region of the 𝑠 plane if the
1
function and all its derivatives exist in that region. Examples: 𝐺(𝑠) = is analytic for all 𝑠 except 𝑠 =
𝑠(𝑠+1)
0; 𝑠 = −1; 𝐻(𝑠) = 3𝑠 + 1 is analytic for all 𝑠.
Page 3 of 10
Handout 2
Laplace Transform
Jan. 30, 2020 ENGR 410-01 Process Instrumentation and Control (Spring 2020) Page 4 of 10
- Laplace Transform is linear:
ℒ[𝑎𝑓(𝑡) + 𝑏𝑔(𝑡)] = 𝑎𝐹(𝑠) + 𝑏𝐺(𝑠)
- Derivative Rule:
ℒ[𝑓′(𝑡)] = 𝑠𝐹(𝑠) − 𝑓(0)
- Second derivative:
𝑑𝑓
ℒ[𝑓′′(𝑡)] = 𝑠 2 𝐹(𝑠) − 𝑠𝑓(0) − |
𝑑𝑡 𝑡=0
𝑑𝑛 𝑓(𝑡)
ℒ[ ] = 𝑠 𝑛 𝐹(𝑠)
𝑑𝑡 𝑛
- Integral Rule:
𝑡
1
ℒ [∫ 𝑓(𝑡)𝑑𝑡] = 𝐹(𝑠)
0 𝑠
- Multiplication by 𝑡:
𝑑
ℒ[𝑡𝑓(𝑡)] = − 𝐹(𝑠)
𝑑𝑠
- Translation in 𝑠 domain by 𝑎:
- Inverse Transform, i.e. going from 𝐹(𝑠) → 𝑓(𝑡) is done by partial fraction expansion or MATLAB better.
Page 4 of 10
Handout 2
Laplace Transform
Jan. 30, 2020 ENGR 410-01 Process Instrumentation and Control (Spring 2020) Page 5 of 10
(impulse) 𝛿(𝑡) ↔ 1
1
(unit step) 𝑢(𝑡) ↔
𝑠
1
(ramp) 𝑡 ↔
𝑠2
1
𝑒 −𝑎𝑡 ↔
𝑠+𝑎
1
𝑡𝑒 −𝑎𝑡 ↔
(𝑠 + 𝑎)2
𝑛!
𝑡 𝑛 𝑒 −𝑎𝑡 ↔
(𝑠 + 𝑎)𝑛+1
𝜔
𝑒 −𝑎𝑡 sin(𝜔𝑡) ↔
(𝑠 + 𝑎)2 + 𝜔 2
𝑠+𝑎
𝑒 −𝑎𝑡 cos(𝜔𝑡) ↔
(𝑠 + 𝑎)2 + 𝜔 2
- Important Definition: Causal Transfer Function → Order of Denominator polynomial ≥ Order of Numerator
polynomial. (order = highest power of 𝑠)
- Example of partial fraction expansion: Find constants 𝑐1 ; 𝑐2 ; 𝑐3 ; 𝑐4 below so that the two sides of the identity
sign are always equal for all values of 𝒔 (i.e. identically equal):
… 𝑐1 𝑐2 𝑐3 𝑐4
≡ + + + (2 – 2)
(𝑠 + 𝑝1 )(𝑠 + 𝑝2 ) (𝑠 + 𝑝3 )2 𝑠 + 𝑝1 𝑠 + 𝑝2 𝑠 + 𝑝3 (𝑠 + 𝑝3 )2
- If order of numerator and denominator are the same, then need to add a constant 𝑐0 (without any
denominator) to above.
- If there are complex roots, proceed as above but, the two constants in the numerator would be complex
conjugates (hence finding one is enough). They are of the form 𝑐1,2 = 𝑎 ± 𝑗𝑏.
Page 5 of 10
Handout 2
Laplace Transform
Jan. 30, 2020 ENGR 410-01 Process Instrumentation and Control (Spring 2020) Page 6 of 10
- Recall:
𝑒 −𝜎+𝑗(𝜔𝑡+𝜃) = 𝑒 −𝜎 [cos(𝜔𝑡 + 𝜃) + 𝑗𝑠𝑖𝑛(𝜔𝑡 + 𝜃)]; 𝑗 ≡ √−1
o If like to avoid complex roots, need to write the second order polynomial with the complex roots as
𝑠 2 + 𝑎𝑠 + 𝑏 = (𝑠 + 𝜎)2 + 𝜔2 ; i.e. find 𝜎 ; 𝜔 first), then use the following form:
… 𝑠+𝜎 𝜔
→ 𝑐1 . + 𝑐2 .
𝑠2 + 𝑎𝑠 + 𝑏 (𝑠 2
+ 𝜎) + 𝜔 2 (𝑠 + 𝜎)2 + 𝜔 2
… 𝑐1 𝑐2 𝑐3
𝑌(𝑠) = ≡ + + +⋯
(𝑠 + 𝑝1 )(𝑠 + 𝑝2 ) (𝑠 + 𝑝3 ) … 𝑠 + 𝑝1 𝑠 + 𝑝2 𝑠 + 𝑝3
𝑐𝑛 = lim (𝑠 + 𝑝𝑛 )𝑌(𝑠) (2 – 3)
𝑠→−𝑝𝑛
… 𝑐𝑘 𝑐𝑘́
𝑌(𝑠) = ⋯ 2
≡ ⋯+ + +⋯
… (𝑠 + 𝑝𝑘 ) … 𝑠 + 𝑝𝑘 (𝑠 + 𝑝𝑘 )2
𝑑
𝑐𝑘 = lim (𝑠 + 𝑝𝑘 )2 𝑌(𝑠); 𝑐𝑘́ = lim (𝑠 + 𝑝𝑘 )2 𝑌(𝑠) (2 – 4)
𝑠→−𝑝𝑘 𝑑𝑠 𝑠→−𝑝𝑘
… 𝑐𝑘 𝑐𝑘́ 𝑐̋ 𝑘
𝑌(𝑠) = 3
≡ ⋯+ + 2
+ + ⋯:
… (𝑠 + 𝑝𝑘 ) … 𝑠 + 𝑝𝑘 (𝑠 + 𝑝𝑘 ) (𝑠 + 𝑝𝑘 )3
1 𝑑2 3
𝑑
𝑐𝑘 = lim (𝑠 + 𝑝𝑘 ) 𝑌(𝑠); 𝑐𝑘́ = lim (𝑠 + 𝑝𝑘 )3 𝑌(𝑠); 𝑐̋ 𝑘 = lim (𝑠 + 𝑝𝑘 )3 𝑌(𝑠)
𝑠→−𝑝𝑘 2! 𝑑𝑠 2 𝑠→−𝑝𝑘 𝑑𝑠 𝑠→−𝑝𝑘
- Take common denominator in right hand side of eq. (2 – 2) above → end up with same denominator as the
left hand side of (2 – 2); expand numerator, take everything to the left hand side so that an identically equal
to 0 expression is obtained, collect same powers of s in the numerator and set their coefficients to 0.
Page 6 of 10
Handout 2
Laplace Transform
Jan. 30, 2020 ENGR 410-01 Process Instrumentation and Control (Spring 2020) Page 7 of 10
Example (identity method):
▪ For input x(t) equal to a unit step find the expression for y(t) if the transfer function is:
𝑌(𝑠) 𝑠+1
=
𝑋(𝑠) (𝑠 + 2) (𝑠 2 + 2𝑠 + 2)
2
1
▪ Answer: Laplace transform for a unit step is 𝑠 ; therefore:
𝑠+1
𝑌(𝑠) =
𝑠(𝑠 + 2)2 (𝑠 2 + 2𝑠 + 2)
▪ Note 𝑠 2 + 2𝑠 + 2 = (𝑠 + 1)2 + 12 has no real root (Δ = 𝑏 2 − 4𝑎𝑐 < 0); hence we proceed with:
𝑠+1 1 1 1 𝑠+1 1
𝑌(𝑠) = = 𝑐1 + 𝑐2 + 𝑐3 + 𝑐4 + 𝑐5 ⟹
𝑠(𝑠 + 2)2 (𝑠 2
+ 2𝑠 + 2) 𝑠 𝑠+2 (𝑠 + 2)2 2
(𝑠 + 1) + 1 2 (𝑠 + 1)2 + 12
▪ Take common denominator, the numerators on the two sides then have to be equal for all values of 𝑠, i.e.
they must be identical:
▪ Take everything to the left hand side, multiply by -1, and set coefficients of various powers of 𝑠 equal to
zero:
𝑠4 : (𝑐1 + 𝑐2 + 𝑐4 ) = 0
𝑠3 : (6𝑐1 + 4𝑐2 + 𝑐3 + 5𝑐4 + 𝑐5 ) = 0
2
𝑠 : (14𝑐 1 + 6𝑐2 + 2𝑐3 + 8𝑐4 + 4𝑐5 ) = 0
1 (16𝑐 + 4𝑐 + 2𝑐 + 4𝑐 + 4𝑐 − 1) = 0
𝑠 1 2 3 4 5
𝑠0 { (8𝑐1 − 1) = 0
1 1 −2𝑡 1 −2𝑡 1 −𝑡
𝑦(𝑡) = + 𝑒 + 𝑡𝑒 − 𝑒 [𝑠𝑖𝑛(𝑡) + 𝑐𝑜𝑠(𝑡)]
8 8 4 4
▪ Given existence of computers and programs like MATLAB, Hand Computations Are Deemphasized.
- First define symbols 𝑠 and 𝑡: “syms s t”, then use “ilaplace( )”.
- To see partial fraction expansion of 𝑌(𝑠) above by MATLAB (symbolic toolbox), use “partfrac”
command. Older versions of MATLAB type: laplace(ilaplace(Ys)) instead. See example below.
Page 7 of 10
Handout 2
Laplace Transform
Jan. 30, 2020 ENGR 410-01 Process Instrumentation and Control (Spring 2020) Page 8 of 10
Example: Do the example on top of page 7 by MATLAB symbolically.
syms s t
% Don’t forget to put ( ) around the denominator in below:
Ys = (s + 1)/( s * (s + 2)^2 * (s^2 + 2*s + 2) )
ilaplace(Ys) % Inverse Laplace Transform. This gives the same
% same answer as above y(t).
partfrac(Ys, 'factormode','real')% To see Partial fraction expansion of Y(s).
laplace(ilaplace(Ys)) % Alternatively.
Here three functions that you are familiar with are reviewed:
2. Unit Ramp Function r(t) is the time integral of the unit step function:
𝑡
𝑟(𝑡) = ∫ 𝑢(𝑡)𝑑𝑡
−∞
3. Delta Function 𝛿(𝑡) is the derivative of u(t).
1
a. It is equivalent to a pulse of a very short duration 𝛿𝑡 at t=0 and a very high amplitude 𝛿𝑡
as
𝛿𝑡 → 0.
1
lim (𝐷𝑢𝑟𝑎𝑡𝑖𝑜𝑛 × 𝐴𝑚𝑝𝑙𝑖𝑡𝑢𝑑𝑒) = lim (𝛿𝑡 )=1
𝛿𝑡→0 𝛿𝑡→0 𝛿𝑡
1
𝐴𝑟𝑒𝑎|𝛿𝑡→0 = 𝛿𝑡 ∙ =1 1/𝛿𝑡
𝛿𝑡
𝛿𝑡
𝑢(𝑡)
𝑟(𝑡) 𝛿(𝑡)
t
0
Page 8 of 10
Handout 2
Laplace Transform
Jan. 30, 2020 ENGR 410-01 Process Instrumentation and Control (Spring 2020) Page 9 of 10
Solution of a Differential Equation by Laplace Transform Method
By Hand and with MATLAB Symbolic Package
Example: Find the unit step response of the following differential equation by hand and by MATLAB where 𝑥(𝑡)
is the input and 𝑦(𝑡) is the output (assume all zero initial conditions):
𝑑3 𝑦 𝑑2 𝑦 𝑑𝑦 𝑑𝑥
3
+ 4 2
+5 + 2𝑦 = + 3𝑥
𝑑𝑡 𝑑𝑡 𝑑𝑡 𝑑𝑡
Answer: Need to find 𝑦(𝑡) when 𝑥(𝑡) is a unit step function. First take Laplace Transform of above:
𝑑3 𝑦 𝑑2 𝑦 𝑑𝑦 𝑑𝑥
ℒ[ 3 +4 2 +5 + 2𝑦 = + 3𝑥] ⟹ 𝑠 3 𝑌(𝑠) + 4𝑠 2 𝑌(𝑠) + 5𝑠𝑌(𝑠) + 2𝑌(𝑠) = 𝑠𝑋(𝑠) + 3𝑋(𝑠)
𝑑𝑡 𝑑𝑡 𝑑𝑡 𝑑𝑡
Factor:
(𝑠 3 + 4𝑠 2 + 5𝑠 + 2)𝑌(𝑠) = (𝑠 + 3)𝑋(𝑠)
Transfer Function:
𝑌(𝑠) 𝑠+3
𝑇(𝑠) =
= 3
𝑋(𝑠) 𝑠 + 4𝑠 2 + 5𝑠 + 2
Factor denominator (may use MATLAB “factor” command):
𝑌(𝑠) 𝑠+3
=
𝑋(𝑠) (𝑠 + 2)(𝑠 + 1)2
Laplace Transform of a unit step is:
1
𝑋(𝑠) =
𝑠
Hence:
𝑠+3
𝑌(𝑠) =
𝑠(𝑠 + 2)(𝑠 + 1)2
Partial Fraction Expansion: The goal is to expand the above in such a way so that the resulting terms exist in the
Laplace transform table in order to look up the corresponding time functions (i.e. this is how inverse Laplace
transform is usually found):
𝑠+3 𝑎 𝑏 𝑐 𝑑
𝑌(𝑠) = 2
≡ + + 2
+
𝑠(𝑠 + 2)(𝑠 + 1) 𝑠 𝑠+2 (𝑠 + 1) 𝑠+1
𝑠+3 −2 + 3 +1 1
𝑏 = lim 2
= 2
= =−
𝑠 → −2 𝑠(𝑠 + 1) (−2)(−2 + 1) (−2)(+1) 2
Page 9 of 10
Handout 2
Laplace Transform
Jan. 30, 2020 ENGR 410-01 Process Instrumentation and Control (Spring 2020) Page 10 of 10
𝑠+3 −1 + 3
𝑐 = lim = = −2
𝑠 → −1 𝑠(𝑠 + 2) (−1)(−1 + 2)
𝑠+3 3 1 1 1 2 1
𝑌(𝑠) = 2
= ∙ − ∙ − 2
−
𝑠(𝑠 + 2)(𝑠 + 1) 2 𝑠 2 𝑠+2 (𝑠 + 1) 𝑠+1
From page 5 (Laplace Transform Table) the inverse transforms (time functions) for above terms are:
1 1 1 1
→ 𝑢(𝑡); → 𝑒 −2𝑡 ; → 𝑒 −𝑡 ; → 𝑡𝑒 −𝑡
𝑠 𝑠+2 𝑠+1 (𝑠 + 1)2
Hence the final answer:
3 1
𝑦(𝑡) = − 𝑒 −2𝑡 − 2𝑡𝑒 −𝑡 − 𝑒 −𝑡
2 2
MATLAB:
>> syms s t
y(t) =
>> % To check your partial fraction expansion terms, use “partfrac” command.
>> % NOTE: Older MATLAB versions don’t have partfrac, then type:
>> % “laplace(ilaplace(Y(s))” instead:
>> partfrac(Y(s))
ans =
3/(2*s) - 2/(s + 1)^2 - 1/(2*(s + 2)) - 1/(s + 1)
>> laplace(ilaplace(Y(s)))
ans =
3/(2*s) - 2/(s + 1)^2 - 1/(2*(s + 2)) - 1/(s + 1)
Page 10 of 10