A.10 Partial fraction decomposition
A partial fraction decomposition is used to convert a rational function into a sum of simpler fractions, where and are two polynomials with and being the degrees of and , respectively and .
Two assumptions simplify the decomposition:
- f 1.
- , i. e., the denominator has larger degree than the numerator,
- f 2.
- all roots of the denominator (called poles when dealing with transforms such as Laplace and Z) are distinct, which allows to write .
In this special case, it is possible to write
| (A.23) |
where
| (A.24) |
is called the residue of the (pole) . To understand (and prove) Eq. (A.24), one can observe that multiplying both sides of Eq. (A.23) by leads to
and substituting by makes all terms , equal to zero. The same can be done to the other poles and the general expression for this procedure is Eq. (A.24). For example, expanding leads to
where
and
If the roots are complex (typically they occur as complex conjugate pairs), the procedure is similar, but the parcels can be rearranged.
When the first assumption is not valid, one needs to use polynomial division to first obtain
where the degree of is . This pre-processing stage is similar to writing an improper fraction as a mixed fraction, e. g., . For example, when , some algebra shows that it is not possible to find two residues and such that
Hence, first one obtains
with and having a degree smaller than , and then uses the standard partial fraction expansion on to obtain
When one or more roots of (poles) have multiplicity larger than one, the second simplifying assumption does not hold and the expansion is trickier as discussed in the sequel.
Note that, in general, can be written as , while the previous results were restricted to . A pole with requires not only a parcel but parcels with residues for the following powers of :
The residues can be obtained using factorial and derivatives via the Theorem of residuals:
| (A.25) |
for . When , this equation simplifies to Eq. (A.24). For example, the expansion of can use Eq. (A.25) because the denominator can be written as , having a single pole and a pole with multiplicity 3. Hence, the following residues need to be found
The residue can be found with Eq. (A.24):
while the other residues are given by Eq. (A.25) and require using Eq. (A.26) to obtain the following derivatives:
and
which will be used for calculating and , respectively. Therefore,
and
It is useful to use algebra and double check the obtained expansion:
Alternatively, one can use Matlab/Octave to obtain the residues with the commands b=[1 0 0 5],a=[1 -9 30 -44 24],[r,p,k]=residue(b,a). It should be noted that Octave has the option of a more complete output with [r,p,k,e]=residue(b,a), where the vector e relates each residue to the corresponding parcel in the expansion. When using Matlab, one needs to know that the residues are given in the order .
In Python, the residues can be found with the method scipy.signal.residue. For the previous example, the command would be:
1b=[1, 0, 0, 5]; # numerator 2a=[1, -9, 30, -44, 24] # denominator 3[r,p,k]=scipy.signal.residue(b,a)
The method residue assumes the polynomials are given in positive powers of the independent variable. For a pole with multiplicity larger than one, similar to Matlab, the residues are given in the order .
In Python, the method scipy.signal.residuez can be used if the user prefers to describe the polynomials in negative powers, such , and so on.