We continue with the explanation of the partial fraction expansion. In the first part of this post, which can be accessed here, we explained the partial fraction expansion when our rational function (transfer) function has distinct roots. Also, we gave an example of a transfer function with real roots. Let us now focus on an example of distinct but complex roots. Such examples often appear in practice, and we need to dedicate special attention to them. The video accompanying this post can be found here:
Example 1: Compute the step response of the system given by an ODE:
(1)
Assume zero initial conditions.
Solution: We use the Laplace transform method to solve this problem. Taking the Laplace transform of both sides of (1), we obtain:
(2)
where and are the Laplace transforms of the time-domain signals and , and and are the initial conditons for . Since we assumed that the initial conditions are zero, from the last equation, we obtain:
(3)
Now, our goal is to compute the step response of the system when , where is a Heaviside step function. Since , the step response in the s-domain has the following form
(4)
So, our goal is to compute the inverse Laplace transform of (4). There are at least two ways to compute this. The first way is to use the formula we explained in the first part of this post. First, we determine the poles. The poles are given by
(5)
So our expression for becomes:
(6)
We can find the constant , , by applying the previously introduced formula. The difficulty with this approach is that we have to deal with complex numbers and this might be tedious. Instead, there is a more elegant and convinent method to solve this problem. The idea is to represent as follows
(7)
By multiplying the expression on the right-hand-side of the last equation, we obtain:
(8)
By comparing the last equation with (4), we obtain that the constants should satisfy the following system of equations (for more details, see the first part of this post that can be found here):
(9)
By solving this system of equations, we obtain:
(10)
So we can write:
(11)
We want to compute the inverse Laplace transform of the last expression. The inverse transform of the first term is easy, it is simply the Heaviside function. On the other hand, the inverse transform of the second term is a bit more complicated. The idea is to write the second term as follows:
(12)
Let us recall some basic properties of the Laplace transform. Let be a function in the time domain. Them the Laplace transform of the scaled function is given by:
(13)
where is the Laplace transform of . Let us apply this law to the Laplace transform of . We know that
(14)
From this expression and from (13) it follows:
(15)
Using the same principle, we can obtain
(16)
By comparing the expressions (15) and (16) with (12) , we can observe that these expressions are similar except for the fact that instead of , we have in (12). In order to complete this example, we need to recall another important property of the Laplace transform. We have:
(17)
Using (16) and (17), we obtain that the inverse Laplace transform of in (12) is
(18)
To compute the inverse Laplace transform of , we transform as follows
(19)
By applying (15) and (17) to (19), we obtain
(20)
Finally, using the previously derived expressions, we obtain:
(21)
where is the Heaviside function. The MATLAB code for computing the inverse Laplace transform is given below.
clc
syms s
F=1/(s*(s^2+s+1))
Factorized=partfrac(F)
ilaplace(Factorized)
And the output is:
1/(s*(s^2 + s + 1))
Factorized =
1/s - (s + 1)/(s^2 + s + 1)
ans =
1 - exp(-t/2)*(cos((3^(1/2)*t)/2) + (3^(1/2)*sin((3^(1/2)*t)/2))/3)