Automation in Clinical
Laboratories (ACL)
Course Code: BEAL 301
Level: 3 (2023-2024)- Fall Semester
Instructor: Walaa Shoeib
Don’t waste
your time !
The Power of
Team
Check
attendance !
1 2
Outlines:
1. Introduction to Control Systems
2. modeling in frequency domain
3. Time response
4. Stability
5. steady state error
Objective of this part
After completing this chapter, the student will be able to:
[Link] the fundamentals of Laplace transforms.
[Link] the Laplace transform of different functions.
[Link] the definition of the inverse Laplace transform.
[Link] the Laplace transform and inverse Laplace
Laplace Transform
It provides a transformation between the time domain and the
frequency domain, allowing for easier analysis and solution of
differential equations and linear dynamical systems.
1. Simplifies Differential Equations
2. Solves Initial Value Problems
3. Enables Transfer Function Analysis
4. Facilitates Stability Analysis
5. Enhances Control System Design
The purpose in this chapter
Differential Apply Laplace Obtain algebraic
equations transform equation
Solution of
differential Apply inverse Solve algebraic
equation Laplace equation
Laplace Transform
∞
−𝒔𝒕
𝓛𝒇 𝒕 =𝑭 𝒔 =න 𝒇 𝒕 𝒆 𝒅𝒕
𝟎
where 𝑠 = 𝜎 + 𝑗𝜔, a complex variable.
Inverse Laplace Transform
𝝈+𝒋∞
𝟏
𝒇 𝒕 = 𝓛−𝟏 𝑭 𝒔 = න 𝑭 𝒔 𝒆𝒔𝒕 𝒅𝒕
𝟐𝝅𝒋 𝝈−𝒋∞
𝓛 for step function
𝐴 𝑡≥0
𝑓 𝑡 = ቊ
0 𝑡<0
∞
𝐹 𝑠 = 0 𝑓 𝑡 𝑒 −𝑠𝑡 𝑑𝑡
∞ −𝑠𝑡 −1 ∞
= 0 𝐴𝑒 𝑑𝑡 = 𝐴∗ 𝑒 −𝑠𝑡 0
𝑠
−𝐴 −𝐴 𝐴
= 𝑒 −∞ − 𝑒 0 = 0−1 =
𝑠 𝑠 𝑠
For A=1
1
𝐹 𝑠 =
𝑠
𝓛 for ramp function
𝐴𝑡 𝑡 ≥ 0
𝑓 𝑡 = ቊ
0 𝑡<0
∞
𝐹 𝑠 = 0 𝑓 𝑡 𝑒 −𝑠𝑡 𝑑𝑡
∞ −𝑠𝑡 𝐴
= 0 𝐴𝑡𝑒 𝑑𝑡= 𝑠2
For A=1
1
𝐹 𝑠 = 2
𝑠
𝑵𝒐𝒕𝒆:
∞
න 𝑡𝑒 −𝑠𝑡 𝑑𝑡
0
න 𝑢 𝑑𝑣 = 𝑢. 𝑣 − න 𝑣 𝑑𝑢
𝑢=𝑡 𝑑𝑣 = 𝑒 −𝑠𝑡
−1 −𝑠𝑡
d𝑢 = 1 𝑣= 𝑒
𝑠
−𝑡 −𝑠𝑡 ∞ −1 ∞ −𝑠𝑡 1 −𝑠𝑡 ∞ 1
= 𝑒 − ( 0 𝑒 𝑑𝑡)= (-0-0)+ 2 𝑒 0 =
𝑠 0 𝑠 𝑠 𝑠2
Laplace Transforms of Exponential Function
𝒇(𝒕) = 𝑨𝒆−𝒂𝒕
∞ ∞ ∞
𝐹 𝑠 = න 𝑓 𝑡 𝑒 −𝑠𝑡 𝑑𝑡 = න 𝐴𝑒 −𝑎𝑡 𝑒 −𝑠𝑡 𝑑𝑡 = 𝐴 න 𝑒 −(𝑠+𝑎)𝑡 𝑑𝑡
0 0 0
−1 𝑠+𝑎 𝑡 ∞
−𝐴
=𝐴∗ 𝑒− = 𝑒 −∞ − 𝑒 0
𝑠+𝑎 0 𝑠+𝑎
−2 𝐴
= 0−1 =
𝑠+𝑎 𝑠+𝑎
For A=1, a=3
1
𝐹 𝑠 =
𝑠+3
Laplace Transforms of Sine Wave
𝑓 𝑡 = sin 𝜔𝑡
𝑒 𝑗𝜔𝑡 − 𝑒 −𝑗𝜔𝑡
sin 𝜔𝑡 =
2𝑗
∞ ∞ 𝑗𝜔𝑡 −𝑗𝜔𝑡
𝑒 − 𝑒
𝐹 𝑠 = න 𝑓 𝑡 𝑒 −𝑠𝑡 𝑑𝑡 = න 𝑒 −𝑠𝑡 𝑑𝑡 =
0 ∞ 0 ∞ 2𝑗
1
න 𝑒 𝑗𝜔−𝑠 𝑡 𝑑𝑡 − න 𝑒 − 𝑗𝜔+𝑠 𝑡 𝑑𝑡 =
2𝑗 0 0
1 1 1 𝜔
− =
2𝑗 𝑠−𝑗𝜔 𝑠+𝑗𝜔 𝑠 2 +𝜔2
Laplace Transforms of Sine Wave
𝑓 𝑡 = cos 𝜔𝑡
𝑒 𝑗𝜔𝑡 + 𝑒 −𝑗𝜔𝑡
cos 𝜔𝑡 =
∞
2
∞ 𝑗𝜔𝑡 −𝑗𝜔𝑡
𝑒 + 𝑒
𝐹 𝑠 = න 𝑓 𝑡 𝑒 −𝑠𝑡 𝑑𝑡 = න 𝑒 −𝑠𝑡 𝑑𝑡 =
0 ∞ 0 ∞ 2
1
න 𝑒 𝑗𝜔−𝑠 𝑡 𝑑𝑡 − න 𝑒 − 𝑗𝜔+𝑠 𝑡 𝑑𝑡 =
2 0 0
1 1 1 𝑠
− =
2 𝑠−𝑗𝜔 𝑠+𝑗𝜔 𝑠 2 +𝜔2
Find Laplace transform for
𝒇 𝒕 = 𝒆−𝒂𝒕 sin 𝜔𝑡
𝑒 𝑗𝜔𝑡 − 𝑒 −𝑗𝜔𝑡
sin 𝜔𝑡 =
2𝑗
∞ ∞ 𝑗𝜔𝑡 −𝑗𝜔𝑡
𝑒 − 𝑒
𝐹 𝑠 = න 𝑓 𝑡 𝑒 −𝑠𝑡 𝑑𝑡 = න 𝑒 −𝑎𝑡 𝑒 −𝑠𝑡 𝑑𝑡
0 0 2𝑗
Please complete
𝜔
𝐹 𝑠 =
𝑠 + 𝑎 2 + 𝜔2
Laplace transform table
Inverse Laplace Transform
𝝈+𝒋∞
𝟏
𝒇 𝒕 = 𝓛−𝟏 𝑭 𝒔 = න 𝑭 𝒔 𝒆𝒔𝒕 𝒅𝒕
𝟐𝝅𝒋 𝝈−𝒋∞
There are simpler methods by which f (t) can be found.
• One such method is the use of the table of Laplace transform pairs
given in table.
• Quite often a particular transform F(s) may not find a place in the
table. In such cases, we have to expand it into partial fractions of
standard forms for which inverse LT is found in the table.
Numerator
partial fractions 𝑭 𝒔 =
𝑵 𝒔
𝑫 𝒔
=
Denominator
▪ convert the function to a sum of simpler terms for which we know the
Laplace transform of each term.
▪ where the order of 𝑁 𝑠 is less than the order of 𝐷 𝑠 , then a partial-
fraction expansion can be made.
▪ If the order of 𝑁 𝑠 is greater than or equal to the order of 𝐷 𝑠 , then
𝑁 𝑠 must be divided by 𝐷 𝑠 successively until the result has a
remainder whose numerator is of order less than its denominator.
partial fractions
𝒔𝟑 + 𝟐𝒔𝟐 + 𝟔𝒔 + 𝟕
𝑭 𝒔 =
𝒔𝟐 + 𝟏𝟏𝒔 + 𝟑𝟎
75𝑠 + 277
𝐹 𝑠 =𝑠−9+ 2
𝑠 + 11𝑠 + 30
Taking the inverse Laplace transform:
𝑑𝛿 𝑡 75𝑠 + 277
𝑓 𝑡 = − 9𝛿 𝑡 + ℒ −1 2
𝑑𝑡 𝑠 + 11𝑠 + 30
Case1: Partial Fraction Expansion with Real and
Distinct Poles
When all poles of F(s) are real and simple, F(s) is expressed as
𝑝(𝑠) 𝑝(𝑠)
𝐹 𝑠 = =
𝑠 + 𝑝1 𝑠 + 𝑝2 𝑠 + 𝑝3 … … . . 𝑠 + 𝑝𝑛 𝑄(𝑠)
The partial-fraction expansion of F(s)
𝐴1 𝐴2 𝐴3 𝐴4 𝐴𝑛
𝐹 𝑠 = + + + + ⋯…+
𝑠+𝑝1 𝑠+𝑝2 𝑠+𝑝3 𝑠+𝑝4 𝑠+𝑝𝑛
The coefficient 𝐴𝑖 𝑖 = 1,2,3, … … . , 𝑛
𝑝(𝑠)
𝐴𝑖 = 𝑠 + 𝑝𝑖 ቚ
𝑄(𝑠) 𝑠=−𝑝𝑖
Find f(t) from
7𝑠 + 2
𝐹 𝑠 =
(𝑠 + 1)(𝑠 + 3)(𝑠 + 4)
𝐴1 𝐴2 𝐴3
𝐹 𝑠 = + +
(𝑠 + 1) (𝑠 + 3) (𝑠 + 4)
7𝑠 + 2 −5
𝐴1 = 𝑠 + 1 𝐹 𝑠 ቚ = =
𝑠=−1 (𝑠 + 3)(𝑠 + 4) 6
7𝑠 + 2
𝐴2 = 𝑠 + 3 𝐹 𝑠 ቚ = = 9.5
𝑠=−3 (𝑠 + 1)(𝑠 + 4)
7𝑠 + 2 −26
𝐴3 = 𝑠 + 4 𝐹 𝑠 ቚ = =
𝑠=−4 (𝑠 + 1)(𝑠 + 3) 3
Find f(t) from
−0.83 9.5 −8.66
𝐹 𝑠 = + +
(𝑠 + 1) (𝑠 + 3) (𝑠 + 4)
Take inverse Laplace
𝑓 𝑡 = −0.83𝑒 −𝑡 + 9.5𝑒 −3𝑡 − 8.66𝑒 −4𝑡
Find f(t) from 𝐹 𝑠 =
𝑠 2 + 12𝑠 + 44
𝑠+2 𝑠+4 𝑠+6
𝐴1 𝐴2 𝐴3
= + +
𝑠+2 𝑠+4 𝑠+6
𝑠 2 + 12𝑠 + 44
𝐴1 = ቚ =3 3 −3 1
𝑠 + 4 𝑠 + 6 𝑠=−2 𝐹 𝑠 = + +
𝑠+2 𝑠+4 𝑠+6
𝑠 2 + 12𝑠 + 44
𝐴2 = ቚ = −3
𝑠 + 2 𝑠 + 6 𝑠=−4
𝑓 𝑡 = 3𝑒 −2𝑡 − 3𝑒 −4𝑡 + 𝑒 −6𝑡
𝑠 2 + 12𝑠 + 44
𝐴3 = ቚ =1
𝑠 + 2 𝑠 + 4 𝑠=−6
Case2: Partial Expansion with Multiple Order Real
Poles Fraction
Consider that the pole at at s = -pi, is repeated r times. Then F(s) is given by
𝑝(𝑠) 𝑝(𝑠)
𝐹 𝑠 = =
𝑠 + 𝑝1 𝑠 + 𝑝2 𝑟 𝑠 + 𝑝3 … … . . 𝑠 + 𝑝𝑛 𝑄(𝑠)
In the partial-fractioned form, F(s) is written as
𝐴1 𝐵1 𝐵2 𝐵3 𝐵𝑟 𝐴3 𝐴4 𝐴𝑛
𝐹 𝑠 = + + + + ⋯…+ + ⋯………… + + ⋯…+
𝑠+𝑝1 𝑠+𝑝2 𝑠+𝑝2 2 𝑠+𝑝2 3 𝑠+𝑝2 𝑟 𝑠+𝑝3 𝑠+𝑝4 𝑠+𝑝𝑛
The coefficients of multiple order poles are
𝑟
𝑝(𝑠) 𝑑 𝑟
𝑝(𝑠)
𝐵1 = 𝑠 + 𝑝2 ቚ 𝐵2 = 𝑠 + 𝑝2 ቚ
𝑄(𝑠) 𝑠=−𝑝2 𝑑𝑠 𝑄(𝑠) 𝑠=−𝑝2
1 𝑑2 𝑟
𝑝(𝑠) 1 𝑑 𝑟−1 𝑟
𝑝(𝑠)
𝐵3 = 𝑠 + 𝑝2 ቚ 𝐵𝑟 = 𝑠 + 𝑝2 ቚ
2! 𝑑𝑠 2 𝑄(𝑠) 𝑠=−𝑝2 (𝑟 − 1)! 𝑑𝑠 𝑟−1 𝑄(𝑠) 𝑠=−𝑝2
Partial Expansion with Multiple Order Real Poles Fraction
2 𝐴 𝐵 𝐶
𝐹 𝑠 = 2
= + 2
+
𝑠+1 𝑠+2 𝑠+1 𝑠+2 𝑠+2
2 2
𝐴= ቚ
2 𝑠=−1
=2 𝐵= ቚ = −2
𝑠+2 𝑠 + 1 𝑠=−2
1 𝑑 2 −2
𝐶= ቚ = ቚ
2 𝑠=−2 = −2
1! 𝑑𝑠 𝑠+1 𝑠=−2 𝑠+1
2 2 2
𝐹 𝑠 = − 2
−
𝑠+1 𝑠+2 𝑠+2
𝑓 𝑡 = 2𝑒 −𝑡 − 2𝑡𝑒 −2𝑡 − 2𝑒 −2𝑡
Partial Expansion with Multiple Order Real Poles Fraction
2 𝐴 𝐵 𝐶 𝐷
𝐹 𝑠 = 3
𝑠 𝑠 + 1 = 𝑠 + 1 + 𝑠3 + 𝑠2 + 𝑠
2 2
𝐴 = 3ቚ = −2 𝐵= ቚ =2
𝑠 𝑠=−1 𝑠 + 1 𝑠=0
1 𝑑 2 −2
𝐶= ቚ = ቚ = −2
1! 𝑑𝑠 𝑠+1 𝑠=0 𝑠+1 2 𝑠=0
1 𝑑2 2 1 𝑑 −2
𝐷= ቚ = ቚ =2
2! 𝑑𝑠 2 𝑠+1 𝑠=0 2! 𝑑𝑠 𝑠+1 2 𝑠=0
2 2 2 2
𝑓 𝑡 = −2𝑒 −𝑡 + 𝑡 2 − 2𝑡 + 2
𝐹 𝑠 =− + 3− 2+
𝑠+1 𝑠 𝑠 𝑠
Transfer Function from a Differential Equation
𝐶 𝑠 𝑏𝑚 𝑠 𝑚 + 𝑏𝑚−1 𝑠 𝑚−1 + ⋯ + 𝑏0
𝐺 𝑠 = =
𝑅 𝑠 𝑎𝑛 𝑠 𝑛 + 𝑎𝑛−1 𝑠 𝑛−1 + ⋯ + 𝑎0
𝑅 𝑠 𝑏𝑚 𝑠 𝑚 + 𝑏𝑚−1 𝑠 𝑚−1 + ⋯ + 𝑏0 𝐶 𝑠
𝑎𝑛 𝑠 𝑛 + 𝑎𝑛−1 𝑠 𝑛−1 + ⋯ + 𝑎0
Transfer Function from a Differential Equation
❑ Write the transfer function corresponding to differential equation:
𝑑𝑐 𝑡
+ 2𝑐 𝑡 = 𝑟 𝑡
𝑑𝑡
Taking the Laplace transform of both sides, assuming zero initial
conditions, we have
𝑠 + 2 𝐶 𝑠 = 𝑅(𝑠)
𝐶 𝑠 1
𝐺 𝑠 = =
𝑅 𝑠 𝑠+2
Transfer Function from a Differential Equation
❑ Write the transfer function corresponding to differential equation:
𝑑3 𝑐 𝑡 𝑑2 𝑐 𝑡 𝑑𝑐 𝑡 𝑑2 𝑟 𝑡 𝑑𝑟 𝑡
3
+3 2
+7 + 5𝑐 𝑡 = 2
+4 + 3𝑟 𝑡
𝑑𝑡 𝑑𝑡 𝑑𝑡 𝑑𝑡 𝑑𝑡
Taking the Laplace transform of both sides, assuming zero initial
conditions, we have
𝑠 3 + 3𝑠 2 + 7𝑠 + 5 𝐶 𝑠 = 𝑠 2 + 4𝑠 + 3 𝑅(𝑠)
𝐶 𝑠 𝑠 2 + 4𝑠 + 3
𝐺 𝑠 = = 3
𝑅 𝑠 𝑠 + 3𝑠 2 + 7𝑠 + 5
Differential Equation from a Transfer Function
▪ Write the corresponding differential equation for:
2𝑠 + 1
𝐺(𝑠) = 2
𝑠 + 6𝑠 + 2
𝑐 𝑠 2𝑠 + 1
𝐺(𝑠) = = 2
𝑅 𝑠 𝑠 + 6𝑠 + 2
𝑠 2 + 6𝑠 + 2 𝑐 𝑠 = 𝑅 𝑠 (2𝑠 + 1)
𝑐ሷ 𝑡 + 6𝑐ሶ 𝑡 + 2𝑐 𝑡 = 2𝑟ሶ 𝑡 + 𝑟(𝑡)
Solve problems