Unit 4.4 The Inverse Laplace Transform#

Follow along at cpjobling.github.io/eg-150-textbook/laplace_transform/4/inverse_laplace

QR Code for this lecture

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

(2)#\[\mathcal{L}^{-1}\left\{ F(s) \right\} = \frac{1}{2\pi j}\int_{\sigma-j\omega}^{\sigma+j\omega} F(s)e^{st}ds\]

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 \(s\).

(3)#\[F(s) = \frac{N(s)}{D(s)} = \frac{b_ms^m + b_{m-1}s^{m-1}+b_{m-2}s^{m-2}+ \cdots +b_{1}s+b_{0}}{a_ns^n + a_{n-1}s^{n-1}+a_{n-2}s^{n-2}+ \cdots +a_{1}s+a_{0}}\]

The coefficients \(a_k\) and \(b_k\) are real for \(k = 1, 2, 3, \ldots\)

Proper and Improper Rational Functions#

  • If \(m < n\) \(F(s)\) is said to be a proper rational function.

  • If \(m \ge n\) \(F(s)\) is said to be an improper rational function

(Think proper fractions and improper fractions.)

Zeros#

  • The roots of the numerator polymonial \(N(s)\) are found by setting \(N(s)=0\)

  • When \(s\) equals one of the \(m\) roots of \(N(s)\) then \(F(s)\) will be zero.

  • Thus the roots of \(N(s)\) are the zeros of \(F(s)\).

Poles#

  • The roots (zeros) of the denominator polynomial are found by setting \(D(s) = 0\).

  • When \(s\) equals one of the \(n\) roots of \(D(s)\) then \(F(s)\) will be infinite \(F(s_r) = N(s_r)/0=\infty\)).

  • These are called the poles of \(F(s)\).

(Imagine telegraph poles planted at the points on the \(s\)-plane where \(D(s)\) is zero.)

A Further Simplifying Assumption#

If \(F(s)\) is proper then it is conventional to make the coefficient \(s_n\) unity thus:

(4)#\[F(s) = \frac{N(s)}{D(s)} = \frac{1/{a_n}\left({ {b_m}{s^m} + {b_{m - 1}}{s^{m - 1}} + {b_{m - 2}}{s^{m - 2}} + \cdots + {b_1}s + {b_0}} \right)}{s^n + \frac{a_{n - 1}}{a_n}{s^{n - 1}} + \frac{a_{n - 2}}{a_n}{s^{n - 2}} + \cdots + \frac{a_1}{a_n}s + \frac{a_0}{a_n}}\]

(I know it doesn’t look simpler, but remember that the \(a\) and \(b\) coefficients are numbers in practice!)

Inverse Laplace Transform by Partial Fraction Expansion (PFE)#

The poles of \(F(s)\) can be real and distinct, real and repeated, complex conjugate pairs, or a combination.

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 \(F(s)\) has distinct real poles

  • The case where \(F(s)\) has complex poles

  • The case where \(F(s)\) has repeated poles

  • The case where \(F(s)\) 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 \(p_1,\,p_2,\,p_3,\,\ldots,\, p_n\) are distinct we can factor the denominator of \(F(s)\) in the form

(5)#\[F(s) = \frac{N(s)}{(s-p_1)(s-p_2)(s-p_3)\ldots(s-p_n)}\]

Next, using partial fraction expansion

(6)#\[F(s)=\frac{r_1}{s-p_1}+\frac{r_2}{s-p_2}+\frac{r_3}{s-p_3}+\cdots + \frac{r_n}{s-p_n}\]

To evaluate the residue \(r_k\), we multiply both sides by \((s-p_k)\) then let \(s \to p_k\)

(7)#\[r_k = \lim_{s\to p_k}(s-p_k)F(s) = \left.(s-p_k)F(s)\right|_{s=p_k}\]

The case of the complex poles#

Quite often the poles of \(F(s)\) are complex and because the complex poles occur as complex conjugate pairs, the number of complex poles is even. Thus if \(p_k\) is a complex root of \(D(s)\) then its complex conjugate \(p_k^*\) is also a root of \(D(s)\).

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 \(s^2 + as + b\) and then call on the two transforms in the PFE

(8)#\[\frac{\omega}{(s - a)^2 + \omega^2} \Leftrightarrow e^{at}\sin\;\omega t\]
(9)#\[\frac{s + a}{(s - a)^2 + \omega^2} \Leftrightarrow e^{at}\cos\;\omega t\]

The case of the repeated poles#

When a rational polynomial has repeated poles

(10)#\[F(s) = \frac{N(s)}{(s - p_1)^m(s - p_2)\cdots(s - p_{n-1})(s-p_0)}\]

and the PFE will have the form:

\[\begin{split}\begin{array}{c} F(s) = \frac{r_{11}}{(s - {p_1})^m} + \frac{r_{12}}{(s - {p_1})^{m - 1}} + \frac{r_{13}}{(s - {p_1})^{m - 2}} + \cdots + \frac{r_{1}}{(s - {p_1})}\\ + \frac{r_2}{(s - {p_2})} + \frac{r_3}{(s - {p_3})} + \cdots + \frac{r_n}{(s - {p_n})} \end{array}\end{split}\]

The ordinary residues \(r_k\) can be found using the rule used for distinct roots.

To find the residuals for the repeated term \(r_{1k}\) we need to multiply both sides of the expression by \((s+p_1)^m\) and take repeated derivatives as described in detail in Pages 3-7—3-9 of the text book. This yields the general formula

(11)#\[r_{1k}=\lim_{s\to p_1}\frac{1}{(k-1)!}\frac{d^{k-1}}{ds^{k-1}}\left[(s-p_1)^mF(s)\right]\]

which in the age of computers is rarely needed.

The case of the improper rational polynomial#

If \(F(s)\) is an improper rational polynomial, that is \(m \ge n\), we must first divide the numerator \(N(s)\) by the denomonator \(D(s)\) to derive an expression of the form

(12)#\[F(s) = k_0 + k_1s + k_2s^2 + \cdots + k_{m-n}s^{m-n} + \frac{N(s)}{D(s)}\]

and then \(N(s)/D(s)\) will be a proper rational polynomial.

Exercises 11: Inverse Laplace Transforms#

Lecturer clear all cells and set up MATLAB

clear all
format compact

Exercise 11.1: Real Poles#

Use the PFE method to simplify \(F_1(s)\) below and find the time domain function \(f_1(t)\) corresponding to \(F_1(s)\)

\[F_1(s) = \frac{2s+5}{s^2 + 5s + 6}\]

(Quick solution: Wolfram Alpha)

MATLAB Solution - Numerical#

Ns = [2, 5]; Ds = [1, 5, 6];
[r,p,k] = residue(Ns, Ds)
r =
    1.0000
    1.0000
p =
   -3.0000
   -2.0000
k =
     []

The previous resuly should be interpreted as:

\[F_1(s) = \frac{1}{s + 3} + \frac{1}{s + 2}\]

which because of the linearity property of the Laplace Transform and using tables results in the Inverse Laplace Transform

\[f_1(t) = e^{-3t}u_0(t) + e^{-2t}u_0(t)\]

MATLAB solution - symbolic#

Recall that in MATLAB the laplace operator is the single sided Laplace transform, so the presence of \(u_0(t)\) in the answers given by ilaplace is implied.

syms s t;
Fs = (2*s + 5)/(s^2 + 5*s + 6);
ft = ilaplace(Fs)
fplot(ft,[0,5])
ft =
exp(-2*t) + exp(-3*t)
../../_images/c3de0f9380f397525188afb2277fcdbfc62ef528fd3e2f56c34a1d5b9f0472ed.png

Exercise 11.2: Cubic with Real Poles#

Determine the Inverse Laplace Transform of

\[F_2(s) = \frac{3s^2+2s+5}{s^3 + 9s^2 + 23s + 15}\]

(Quick solution: Wolfram Alpha)

Solution 11.2#

Because the denominator of \(F_2(s)\) is a cubic, it will be difficult to factorise without computer assistance so we use MATLAB to factorise \(D(s)\)

syms s;
factor(s^3 + 9*s^2 + 23*s + 15)
ans =
[s + 3, s + 5, s + 1]

In an exam you’d be given the factors

We can now use the previous technique to find the solution which according to MATLAB should be

\[f_1(t) = \frac{3}{4}e^{-t} - \frac{13}{2}e^{-3t} + \frac{35}{4}e^{-5t}\]

The problem becomes: determine the Inverse Laplace Transform of

\[F_2(s) = \frac{3s^2+2s+5}{(s+1)(s+3)(s+5)}\]

which we will solve in class

Exercise 11.3: System with Complex Poles#

Rework Example 3-2 from the [Karris, 2012] using quadratic factors.

Find the Inverse Laplace Transform of

(13)#\[F_3(s) = \frac{s + 3}{(s+1)(s^2 + 4s + 8)}\]

(Quick solution: Wolfram Alpha – Shows that the computer is not always best!)

Solution 11.3#

We know that one pole is real at \(s=-1\). We can use the PFE in the usual way to find the residue \(r_1\) that corresponds to that pole.

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)
Ds =
     1     5    12     8
r =
  -0.2000 - 0.1500i
  -0.2000 + 0.1500i
   0.4000 + 0.0000i
p =
  -2.0000 + 2.0000i
  -2.0000 - 2.0000i
  -1.0000 + 0.0000i
k =
     []

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

\[F_3(s) = \frac{2/5}{s+1} + r_2\frac{\omega}{(s + a)^2 + \omega^2} + r_3\frac{s+a}{(s+a)^2 + \omega^2}\]

and solve the PFE using simultaneous equations to determine \(r_2\) and \(r_3\).

Complete the square on the quadratic term:

\[s^2 + 4s + 8 = (s + 2)^2 + 4\]

Then comparing this with the desired form \((s + a)^2 + \omega^2\), we have \(a = 2\) and \(\omega^2 = 4 \to \omega = \sqrt{4} = 2\).

To solve this, we need to find the PFE for the assumed solution:

(14)#\[F_3(s) = \frac{2/5}{s+1} + r_2\frac{2}{(s + 2)^2 + 2^2} + r_3\frac{s + 2}{(s + 2)^2 + 2^2} \]

which we do by equating (14) to (13),

(15)#\[\frac{s + 3}{(s+1)(s^2 + 4s + 8)} = \frac{2/5}{s+1} + r_2\frac{2}{(s + 2)^2 + 2^2} + r_3\frac{s + 2}{(s + 2)^2 + 2^2}\]

putting both sides on a common denominator,

(16)#\[\frac{s+3}{(s+1)(s^2 + 4s + 8)} = \frac{(2/5)(s^2 + 4s + 8) + r_2(s + 1) + r_3(s + 1)(s + 2)}{(s+1)(s^2 + 4s + 8)}\]

and then solving for \(r_2\) and \(r_3\) by equating the numerator coefficients on the left and right sides.

\[s+3 = (2/5)(s^2 + 4s + 8) + r_2(s + 1) + r_3(s^2 + 3s + 2)\]

The completion of this problem is left as a homework exercise for the student.

The solution should be:

(17)#\[f_3(t) = \frac{2}{5}e^{-t} + \frac{3}{10} e^{-2t}\sin 2t - \frac{2}{5} e^{-2t}\cos 2t \]

You can use trig. identities to simplify this further if you wish.

Exercise 11.4: Repeated Real Poles#

Find the inverse Laplace Transform of

\[F_4(s) = \frac{s+3}{(s+2)(s+1)^2}\]

Note that the transform

\[te^{at} \Leftrightarrow \frac{1}{(s - a)^2}\]

and the derivative of a quotient rule

\[\frac{d}{ds}\left(\frac{N(s)}{D(s)}\right) = \frac{D(s)\frac{dN(s)}{ds} - N(s)\frac{dD(s)}{ds}}{D(s)^2}\]

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

\[F_4(s) = \frac{s+3}{(s+2)(s+1)^2}\]

Exercise 11.5: Non-proper rational polynomial#

Introduces some new transform pairs!

\[F_6(s)= \frac{s^2 + 2s + 2}{s+1}\]

(Quick solution: Wolfram Alpha)

Solution 11.5#

Dividing \(s^2 + 2s + 2\) by \(s + 1\) gives

\[F_6(s) = s + 1 + \frac{1}{s+1}\]
\[\frac{1}{s+1} \Leftrightarrow e^{-t}\]
\[1 \Leftrightarrow \delta(t)\]
\[s \Leftrightarrow ?\]

What function of t has Laplace transform s?#

Recall from Session 2:

\[\frac{d}{dt}u_0(t)=u_0'(t)=\delta(t)\]

and

\[\frac{d^2}{dt^2}u_0(t)=u_0''(t)=\delta'(t)\]

Also, by the time differentiation property

\[u_0''(t)=\delta'(t)\Leftrightarrow s^2\mathcal{L}u_0(t) - su_0(0^-) - \left.\frac{d}{dt}u_0(t)\right|_{t=0^-} = s^2\frac{1}{s} = s\]

New Transform Pairs#

\[s\Leftrightarrow \delta'(t)\]
\[\frac{d^n}{dt^n}\delta(t)\Leftrightarrow s^n\]
\[f_6(t) = e^{-t}+\delta(t)+\delta'(t)\]

Matlab verification#

Ns = [1, 2, 2]; Ds = [1 1];
[r, p, k] = residue(Ns, Ds)
r =
     1
p =
    -1
k =
     1     1
syms s;
F6 = (s^2 + 2*s + 2)/(s + 1);
f6 = ilaplace(F6)
f6 =
exp(-t) + dirac(t) + dirac(1, t)

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 \(s\).

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 \(F(s)\) as shown in equation (3). The denominator of \(F(s)\), \(D(s)\), can always be factorised, and the factors (zeros of D(s), poles of F(s)) will be real \((s - p_k)\), real and repeated, such as \((s - p_k)^n\) or complex conjugate pairs \((s - \sigma_k - j\omega_k)(s - \sigma_k + j\omega_k)^1\), or a combination of these.

Each such rational polynomial can then be represented as a partial fraction with residues \(r_k\) whose values are determined by using one of the partial fraction expansion methods presented in this unit:

The factored polynomial which represents \(F(s)\) can then be converted into the equivalent \(f(t)\) by use of the linearity property (Linearity) and tables of Laplace transforms (e.g. ap:xform_table).

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

\[(s - \sigma - j\omega)(s - \sigma + j\omega)\]

can be represented as a single quadratic factor which, when \(\sigma < 0\), will be

\[s^2 + 2\sigma s +(\sigma^2 + \omega^2)\]

By completing the square we get

\[(s + \sigma)^2 - \sigma^2 + (\sigma^2 + \omega^2) = \left((s + \sigma)^2 + \omega^2\right)\]

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:

\[\frac{(s + \sigma)}{\left(s + \sigma\right)^2 + \omega^2}\Leftrightarrow e^{-\sigma t}\cos(\omega t)u_0(t) \]
\[\frac{\omega}{\left(s + \sigma\right)^2 + \omega^2}\Leftrightarrow e^{-\sigma t}\sin(\omega t)u_0(t) \]

Next time#

We move on to consider

References#

Hsu20

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.

Kar12(1,2,3)

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.m]

  • Example 2 - Real poles cubic denominator [ex11_2.m]

  • Example 3 - Complex poles [ex11_3.m]

  • Example 4 - Repeated real poles [ex11_4.m]

  • Example 5 - Non proper rational polynomial [ex11_5.m]