In this post we explain partial fraction expansion. This is the first part. The second part is given here. Here is a video accompanying this post:
1. Motivation
Often, in practice, we are faced with the following problem. Given a rational function or a transfer function in the case of control systems, we want to represent such a function as a sum of simpler terms. Once we have such simpler terms, in the case of control systems, we can compute the inverse Laplace transform of simpler terms to obtain the system response in the time domain. We want to expand the function in partial fractions.
For example, say that we have a (transfer) function:
(1)
So our goal is to try to represent this function as
(2)
where
![Rendered by QuickLaTeX.com A](https://aleksandarhaber.com/wp-content/ql-cache/quicklatex.com-25b206f25506e6d6f46be832f7119ffa_l3.png)
![Rendered by QuickLaTeX.com B](https://aleksandarhaber.com/wp-content/ql-cache/quicklatex.com-770fd1447ccf2fc229801b486b0d8f8a_l3.png)
(3)
by multiplying the expressions on the right-hand side of the last expression, we obtain:
(4)
We want to find the constants
![Rendered by QuickLaTeX.com A](https://aleksandarhaber.com/wp-content/ql-cache/quicklatex.com-25b206f25506e6d6f46be832f7119ffa_l3.png)
![Rendered by QuickLaTeX.com B](https://aleksandarhaber.com/wp-content/ql-cache/quicklatex.com-770fd1447ccf2fc229801b486b0d8f8a_l3.png)
(5)
The expressions on both sides of the last equations are polynomials in
![Rendered by QuickLaTeX.com s](https://aleksandarhaber.com/wp-content/ql-cache/quicklatex.com-ae1901659f469e6be883797bfd30f4f8_l3.png)
![Rendered by QuickLaTeX.com s](https://aleksandarhaber.com/wp-content/ql-cache/quicklatex.com-ae1901659f469e6be883797bfd30f4f8_l3.png)
(6)
The solution of this system is
![Rendered by QuickLaTeX.com A=-1](https://aleksandarhaber.com/wp-content/ql-cache/quicklatex.com-aaf58b2c91f7f72d5468b6ca39ed8e9a_l3.png)
![Rendered by QuickLaTeX.com B=1](https://aleksandarhaber.com/wp-content/ql-cache/quicklatex.com-a11a4f8508949390e94813004253d0f9_l3.png)
![Rendered by QuickLaTeX.com A](https://aleksandarhaber.com/wp-content/ql-cache/quicklatex.com-25b206f25506e6d6f46be832f7119ffa_l3.png)
![Rendered by QuickLaTeX.com B](https://aleksandarhaber.com/wp-content/ql-cache/quicklatex.com-770fd1447ccf2fc229801b486b0d8f8a_l3.png)
syms s
F=1/((s-2)*(s-3))
partfrac(F)
and as the result, we obtain:
F =
1/((s - 2)*(s - 3))
Factorized =
1/(s - 3) - 1/(s - 2)
We can see that our result is correct. Let us briefly comment the MATLAB code. The code line “syms s” is used to define a symbolic variable . Once we have that variable, with code line 3 we can define a symbolic expression for our function. Finally, code line 5 is used to compute the expansion.
Although the above-explained approach might work for more complicated functions, it becomes tedious and time-consuming if we have many terms. In the sequel, we present a systematic and easy to use approach for computing partial fraction expansion.
Case 1: Distinct Poles- (Cover-up method)
First, let us explain what are the poles and zeros of a function. Consider a general form of a function
(7)
The last expression, can be written as follows:
(8)
where
![Rendered by QuickLaTeX.com G](https://aleksandarhaber.com/wp-content/ql-cache/quicklatex.com-30a79c32f18567063fe44716929e7ced_l3.png)
![Rendered by QuickLaTeX.com z_{i}](https://aleksandarhaber.com/wp-content/ql-cache/quicklatex.com-91650b546b756e1d0501b9b6c329b69a_l3.png)
![Rendered by QuickLaTeX.com p_{i}](https://aleksandarhaber.com/wp-content/ql-cache/quicklatex.com-023c41f12f610826e31cbbde001cf48c_l3.png)
![Rendered by QuickLaTeX.com s=z_{i}](https://aleksandarhaber.com/wp-content/ql-cache/quicklatex.com-0d8e0fe347d93ba6c44eded0f6c6b810_l3.png)
![Rendered by QuickLaTeX.com s->p_{i}](https://aleksandarhaber.com/wp-content/ql-cache/quicklatex.com-fb61cbb103b783bf8c905538416dabcc_l3.png)
![Rendered by QuickLaTeX.com W(s)](https://aleksandarhaber.com/wp-content/ql-cache/quicklatex.com-7d3c3f3713f698eb775e1bbb06b85025_l3.png)
(9)
Our goal is to develop the procedure for computing the constants
![Rendered by QuickLaTeX.com C_{1},C_{2},\ldots, C_{n}](https://aleksandarhaber.com/wp-content/ql-cache/quicklatex.com-1609282e38425720aad475ae4e74b310_l3.png)
![Rendered by QuickLaTeX.com (s-p_{i})](https://aleksandarhaber.com/wp-content/ql-cache/quicklatex.com-9b0d62efb7c025ffef6aadb78c47a6d1_l3.png)
(10)
Now by substituting
![Rendered by QuickLaTeX.com s=p_{i}](https://aleksandarhaber.com/wp-content/ql-cache/quicklatex.com-51ac29c51b0a2d10623821d814aca838_l3.png)
![Rendered by QuickLaTeX.com (s-p_{i})W(s)](https://aleksandarhaber.com/wp-content/ql-cache/quicklatex.com-a6598fcfd1f6f909212772896720fa20_l3.png)
(11)
That is, we have obtained an expression for computing the constant
![Rendered by QuickLaTeX.com C_{i}](https://aleksandarhaber.com/wp-content/ql-cache/quicklatex.com-147d9a9f15c308927485996d66c5c770_l3.png)
![Rendered by QuickLaTeX.com C_{i}](https://aleksandarhaber.com/wp-content/ql-cache/quicklatex.com-147d9a9f15c308927485996d66c5c770_l3.png)
![Rendered by QuickLaTeX.com i](https://aleksandarhaber.com/wp-content/ql-cache/quicklatex.com-695d9d59bd04859c6c99e7feb11daab6_l3.png)
![Rendered by QuickLaTeX.com W(s)](https://aleksandarhaber.com/wp-content/ql-cache/quicklatex.com-7d3c3f3713f698eb775e1bbb06b85025_l3.png)
![Rendered by QuickLaTeX.com s-p_{i}](https://aleksandarhaber.com/wp-content/ql-cache/quicklatex.com-e912ae8896fe4b4e2e30bd8d35e63877_l3.png)
![Rendered by QuickLaTeX.com p_{i}](https://aleksandarhaber.com/wp-content/ql-cache/quicklatex.com-023c41f12f610826e31cbbde001cf48c_l3.png)
Why this partial fraction expansion is important? Namely, after we have computed (9), we can simply compute the inverse Laplace transform by noting that:
(12)
where
![Rendered by QuickLaTeX.com h(t)](https://aleksandarhaber.com/wp-content/ql-cache/quicklatex.com-e5f085081671bb76fc2d617c2a65b6d3_l3.png)
Let us do an example.
Example 1: Compute the step response of the function
(13)
Solution: The step response of the function in the complex domain is obtained by multiplying the transfer function by the term
![Rendered by QuickLaTeX.com 1/s](https://aleksandarhaber.com/wp-content/ql-cache/quicklatex.com-5dce43955f9b1dd416236ec089fa743d_l3.png)
(14)
Let us now apply the previously explained approach. We want to expand
![Rendered by QuickLaTeX.com G(s)](https://aleksandarhaber.com/wp-content/ql-cache/quicklatex.com-114b51fda404df9a709d7e156cf5cc78_l3.png)
(15)
By using the formula (16), we obtain:
(16)
(17)
(18)
So our factorized expression becomes
(19)
By computing the inverse Laplace transform of the last expression we obtain
(20)
The following MATLAB code is used to compute the partial fraction expansion and the inverse Laplace transform.
clc
syms s
F=(s+1)*(s+3)/(s*(s+2)*(s+4))
Factorized=partfrac(F)
ilaplace(Factorized)
The following output is generated.
F =
((s + 1)*(s + 3))/(s*(s + 2)*(s + 4))
Factorized =
1/(4*(s + 2)) + 3/(8*(s + 4)) + 3/(8*s)
ans =
exp(-2*t)/4 + (3*exp(-4*t))/8 + 3/8
Notice that we used the MATLAB function “ilaplace()” to compute the inverse Laplace transform.