Unit 4.4 The Inverse Laplace Transform#
Follow along at cpjobling.github.io/eg-150-textbook/laplace_transform/4/inverse_laplace
Introduction#
The preparatory reading for this section is Chapter 3 of [Karris, 2012] which
defines the Inverse Laplace transformation
gives several examples of how the Inverse Laplace Transform may be obtained
thouroughly decribes the Partial Fraction Expansion method of converting complex rational polymial expressions into simple first-order and quadratic terms
demonstrates the use of MATLAB for finding the poles and residues of a rational polymial in s and the symbolic inverse laplace transform.
There is additional coverage, including many worked problems in Chapter 3.5 of [Hsu, 2020].
We will explore the use of MATLAB to solve inverse Laplace tranforms in MATLAB Lab 4.
Agenda#
Definition#
The formal definition of the inverse Laplace transform is
but this is difficult to use in practice because it requires contour integration using complex variable theory.
For most engineering problems we can instead refer to Tables of Properties and Common Transform Pairs to look up the Inverse Laplace Transform.
(Or, if we are not taking an exam, we can use a computer or mobile device.)
Partial Fraction Expansion#
Quite often the Laplace Transform we start off with is a rational polynomial in
The coefficients
Proper and Improper Rational Functions#
If
is said to be a proper rational function.If
is said to be an improper rational function
(Think proper fractions and improper fractions.)
Zeros#
The roots of the numerator polymonial
are found by settingWhen
equals one of the roots of then will be zero.Thus the roots of
are the zeros of .
Poles#
The roots (zeros) of the denominator polynomial are found by setting
.When
equals one of the roots of then will be infinite ).These are called the poles of
.
(Imagine telegraph poles planted at the points on the
A Further Simplifying Assumption#
If
(I know it doesn’t look simpler, but remember that the
Inverse Laplace Transform by Partial Fraction Expansion (PFE)#
The poles of
Defining the problem#
The nature of the poles governs the best way to tackle the PFE that leads to the solution of the Inverse Laplace Transform. Thus, we need to structure our presentation to cover one of the following cases:
The case where
has distinct real polesThe case where
has complex polesThe case where
has repeated polesThe case where
is an improper rational polynomial
We will examine each case by means of a worked example. Please refer to Chapter 3 of Karris for full details.
The case of the distinct real poles#
If the poles
Next, using partial fraction expansion
To evaluate the residue
The case of the complex poles#
Quite often the poles of
You can still use the PFE with complex poles, as demonstrated in Pages 3-5—3-7 in the textbook. However it is easier to use the fact that complex poles will appear as quadratic factors of the form
The case of the repeated poles#
When a rational polynomial has repeated poles
and the PFE will have the form:
The ordinary residues
To find the residuals for the repeated term
which in the age of computers is rarely needed.
The case of the improper rational polynomial#
If
and then
Exercises 11: Inverse Laplace Transforms#
Lecturer clear all cells and set up MATLAB
clear all
% setappdata(0, "MKernel_plot_format", 'svg')
format compact
Starting MATLAB ...
Error connecting to MATLAB. Check the status of MATLAB by clicking the "Open MATLAB" button. Retry after ensuring MATLAB is running successfully
Exercise 11.1: Real Poles#
Use the PFE method to simplify
(Quick solution: Wolfram Alpha)
Paper Solution#
See OneNote class notebook: Unit 4.4: The Inverse Transform.
MATLAB Solution - Numerical#
Ns = [2, 5]; Ds = [1, 5, 6];
[r,p,k] = residue(Ns, Ds)
Error connecting to MATLAB. Check the status of MATLAB by clicking the "Open MATLAB" button. Retry after ensuring MATLAB is running successfully
This result should be interpreted as:
which because of the linearity property of the Laplace Transform and using tables results in the Inverse Laplace Transform
MATLAB solution - symbolic#
Recall that in MATLAB the laplace
operator is the single sided Laplace transform, so the presence of ilaplace
is implied.
syms s t;
F_1(s) = (2*s + 5)/(s^2 + 5*s + 6);
f_1(t) = ilaplace(F_1(s))
Error connecting to MATLAB. Check the status of MATLAB by clicking the "Open MATLAB" button. Retry after ensuring MATLAB is running successfully
Which we can plot using the fplot
function:
fplot(f_1(t),[0,8]),title('Solution to Exercise 11.1'),ylim([-0.5,2.0]),grid,ylabel('f_1(t)'),xlabel('t [s]')
Error connecting to MATLAB. Check the status of MATLAB by clicking the "Open MATLAB" button. Retry after ensuring MATLAB is running successfully
Exercise 11.2: Cubic with Real Poles#
Determine the Inverse Laplace Transform of
(Quick solution: Wolfram Alpha)
Solution 11.2#
Because the denominator of
syms s;
factors = factor(s^3 + 9*s^2 + 23*s + 15)
Error connecting to MATLAB. Check the status of MATLAB by clicking the "Open MATLAB" button. Retry after ensuring MATLAB is running successfully
In an exam you’d be given the factors
The problem becomes: determine the Inverse Laplace Transform of
which we will solve in class.
Paper Solution#
See OneNote class notebook: Unit 4.4: The Inverse Transform.
The solution checked with MATLAB should be
Symbolic Solution#
F_2(s) = (3*s^2 + 2*s + 5)/((s+1)*(s+3)*(s+5))
f_2(t) = ilaplace(F_2(s))
Error connecting to MATLAB. Check the status of MATLAB by clicking the "Open MATLAB" button. Retry after ensuring MATLAB is running successfully
Which can be plotted using fplot
. Note that it is good practice to adjust the scale and label your plots.
fplot(f_2(t),[0,5]),ylim([-0.5,3.5]),grid,title('Solution to Exercise 11.2'),ylabel('f_2(t)'),xlabel('t [s]')
Error connecting to MATLAB. Check the status of MATLAB by clicking the "Open MATLAB" button. Retry after ensuring MATLAB is running successfully
Exercise 11.3: System with Complex Poles#
Rework Example 3-2 from the [Karris, 2012] using quadratic factors.
Find the Inverse Laplace Transform of
(Quick solution: Wolfram Alpha – Shows that the computer will not always give the expected answer!)
Solution 11.3#
We know that one pole is real at
We can use residue
to find the other two poles, but the poles and the residues will both be complex:
Ns = [1 3]; Ds = conv([1 1],[1 4 8]) % conv of two vectors is polynomial multiplication
[r,p,k]=residue(Ns,Ds)
Error connecting to MATLAB. Check the status of MATLAB by clicking the "Open MATLAB" button. Retry after ensuring MATLAB is running successfully
We can use PFE to solve this, as is done in Section 3.2.2 of [], but the mathematics is quite challenging.
Instead, we assume that the solution will have the structure
and solve the PFE using simultaneous equations to determine
Complete the square on the quadratic term:
Then comparing this with the desired form
To solve this, we need to find the PFE for the assumed solution:
which we do by equating (14) to (13),
putting both sides on a common denominator,
and then solving for
The completion of this problem is left as a homework exercise for the student.
The solution should be:
You can use trig. identities to simplify this further if you wish.
Symbolic solution#
F_3(s) = (s+3)/((s+1)*(s^2 + 4*s + 8))
f_3(t) = ilaplace(F_3(s))
fplot(f_3(t),[0,10]),ylim([0,0.3]),grid,title('Solution to Exercise 11.3'),ylabel('f_3(t)'),xlabel('t [s]')
Error connecting to MATLAB. Check the status of MATLAB by clicking the "Open MATLAB" button. Retry after ensuring MATLAB is running successfully
Exercise 11.4: Repeated Real Poles#
Find the inverse Laplace Transform of
Note that the transform
and the derivative of a quotient rule
will be useful.
(Quick solution: Wolfram Alpha)
Solution 11.4#
We will leave the solution that makes use of the residude of repeated poles formula for you to study from the text book (Example 3.4 []).
In class we will illustrate the slightly simpler approach also presented in the text.
For exam preparation, I would recommend that you use whatever method you find most comfortable.
Find the inverse Laplace Transform of
Symbolic solution#
F_4(s) = (s + 3)/((s+2)*(s+1)^2)
f_4(t) = ilaplace(F_4(s))
fplot(f_4(t),[0,10]),grid,ylim([0,0.6]),title('Solution to Exercise 11.4'),ylabel('f_4(t)'),xlabel('t [s]')
Error connecting to MATLAB. Check the status of MATLAB by clicking the "Open MATLAB" button. Retry after ensuring MATLAB is running successfully
Numerical solution#
We use function conv
to perform polynomial multiplication
Ns = [1 3]
Ds = conv([1 2],conv([1 1],[1 1])) % (s + 2)*(s + 1)*(s + 1)
[r,p,k] = residue(Ns,Ds)
doc residue
Error connecting to MATLAB. Check the status of MATLAB by clicking the "Open MATLAB" button. Retry after ensuring MATLAB is running successfully
To interpret this we refer to the MATLAB documentation doc residue
which tells us, that for the pole at
hence
Exercise 11.5: Non-proper rational polynomial#
Introduces some new transform pairs!
(Quick solution: Wolfram Alpha)
Solution 11.5#
Dividing
What function of t has Laplace transform s?#
Recall from Session 2:
and
Also, by the time differentiation property
New Transform Pairs#
Matlab verification#
Ns = [1, 2, 2]; Ds = [1 1];
[r, p, k] = residue(Ns, Ds)
Error connecting to MATLAB. Check the status of MATLAB by clicking the "Open MATLAB" button. Retry after ensuring MATLAB is running successfully
syms s;
F_6(s) = (s^2 + 2*s + 2)/(s + 1);
f_6(t) = ilaplace(F_6(s))
Error connecting to MATLAB. Check the status of MATLAB by clicking the "Open MATLAB" button. Retry after ensuring MATLAB is running successfully
Lab Work#
In MATLAB Lab 4, we will explore the tools provided by MATLAB for taking Laplace transforms, representing polynomials, finding roots and factorizing polynomials and solution of inverse Laplace transform problems.
Unit 4.4: Homework#
Complete Exercise 11.3: System with Complex Poles to confirm the result (16). Then do the end of the chapter exercises (Section 3.67) from the [Karris, 2012]. Don’t look at the answers until you have attempted the problems.
Summary#
In this section we have looked at the inverse Laplace transform. In particular, how to solve continuous-time LTI system problems that take the form of rational polynomials in
Unit 4.4: Take Aways#
For causal signals and continuous-time LTI systems, the Laplace transform usually takes the form of a rational polynomial with general form
Each such rational polynomial can then be represented as a partial fraction with residues
The factored polynomial which represents
MATLAB#
The inverse Laplace transform is given by the Symbolic math toolbox function ilaplace
. We can determine the partial fraction of a rational polynomial with constant coefficients using the function residue
we can factorise a symbolic polynomial using factor
and expand a product of rational terms using expand
. A symbolic polynomial with numerical coeffients can be converted into a numerial polynomial using sym2poly
and you can go the other way using poly2sym
. For more information and examples on how to use these functions please consult the MATLAB help centre.
Footnote
1 A pair of complex conjugate factors
can be represented as a single quadratic factor which, when
By completing the square we get
which implies that the inverse Laplace transform of a complex pole pair will be a linear combination of the damped cosine and sine transform pairs:
Next time#
We move on to consider
References#
Hwei P. Hsu. Schaums outlines signals and systems. McGraw-Hill, New York, NY, 2020. ISBN 9780071634724. Available as an eBook. URL: https://www.accessengineeringlibrary.com/content/book/9781260454246.
Steven T. Karris. Signals and systems with MATLAB computing and Simulink modeling. Orchard Publishing, Fremont, CA., 2012. ISBN 9781934404232. Library call number: TK5102.9 K37 2012. URL: https://ebookcentral.proquest.com/lib/swansea-ebooks/reader.action?docID=3384197.
Matlab Solutions#
For convenience, single script MATLAB solutions to the examples are provided and can be downloaded from the accompanying MATLAB folder.
Example 1 - Real poles [ex11_1.mlx]
Example 2 - Real poles cubic denominator [ex11_2.mlx]
Example 3 - Complex poles [ex11_3.mlx]
Example 4 - Repeated real poles [ex11_4.mlx]
Example 5 - Non proper rational polynomial [ex11_5.mlx]