<<

S. Boyd EE102

Lecture 5 Rational functions and partial expansion

(review of) • rational functions • pole-zero plots • partial fraction expansion • repeated poles • nonproper rational functions •

5–1 Polynomials and roots polynomials a(s) = a + a s + + a sn 0 1 · · · n a is a in the s • a are the coefficients of a (usually real, but occasionally complex) • i n is the degree of a (assuming a = 0) • n 6 roots (or zeros) of a polynomial a: λ C that satisfy ∈ a(λ) = 0 examples a(s) = 3 has no roots • a(s) = s3 1 has three roots: 1, ( 1 + j√3)/2, ( 1 j√3)/2 • − − − −

Rational functions and partial fraction expansion 5–2 factoring out roots of a polynomial if a has a root at s = λ we can factor out s λ: − dividing a by s λ yields a polynomial: • − a(s) b(s) = s λ − is a polynomial (of degree one less than the degree of a)

we can express a as • a(s) = (s λ)b(s) − for some polynomial b example: s3 1 has a root at s = 1 − s3 1 = (s 1)(s2 + s + 1) − −

Rational functions and partial fraction expansion 5–3 the multiplicity of a root λ is the number of factors s λ we can factor out, i.e., the largest k such that −

a(s) (s λ)k − is a polynomial example: a(s) = s3 + s2 s 1 − −

a has a zero at s = 1 • − a(s) s3 + s2 s 1 = − − = s2 1 also has a zero at s = 1 • s + 1 s + 1 − − a(s) s3 + s2 s 1 = − − = s 1 does not have a zero at s = 1 • (s + 1)2 (s + 1)2 − − so the multiplicity of the zero at s = 1 is 2 −

Rational functions and partial fraction expansion 5–4 Fundamental theorem of algebra

a polynomial of degree n has exactly n roots, counting multiplicities this means we can write a in factored form

a(s) = a sn + + a = a (s λ ) (s λ ) n · · · 0 n − 1 · · · − n where λ1, . . . , λn are the n roots of a example: s3 + s2 s 1 = (s + 1)2(s 1) − − − the relation between the coefficients ai and the λi is complicated in general, but n n

a0 = an ( λi), an 1 = an λi − − − i=1 i=1 Y X are two identities that are worth remembering

Rational functions and partial fraction expansion 5–5 Conjugate symmetry if the coefficients a , . . . , a are real, and λ C is a root, i.e., 0 n ∈ a(λ) = a + a λ + + a λn = 0 0 1 · · · n then we have

n a(λ) = a + a λ + + a λ = (a + a λ + + a λn) = a(λ) = 0 0 1 · · · n 0 1 · · · n in other words: λ is also a root

if λ is real this isn’t interesting • if λ is complex, it gives us another root for free • complex roots come in complex conjugate pairs •

Rational functions and partial fraction expansion 5–6 example: PSfrag replacements = λ1

λ4 λ3 λ6 < λ5

λ2

λ3 and λ6 are real; λ1, λ2 are a complex conjugate pair; λ4, λ5 are a complex conjugate pair if a has real coefficients, we can factor it as

r m a(s) = a (s λ ) (s λ )(s λ ) n − i − i − i Ãi=1 ! Ãi=r+1 ! Y Y where λ1, . . . , λr are the real roots; λr+1, λr+1, . . . , λm, λm are the complex roots

Rational functions and partial fraction expansion 5–7 Real factored form

(s λ)(s λ) = s2 2( λ) s + λ 2 − − − < | | is a quadratic with real coefficients real factored form of a polynomial a:

r m a(s) = a (s λ ) (s2 + α s + β ) n − i i i Ãi=1 ! Ãi=r+1 ! Y Y λ , . . . , λ are the real roots • 1 r α , β are real and satisfy α2 < 4β • i i i i any polynomial with real coefficients can be factored into a product of degree one polynomials with real coefficients • quadratic polynomials with real coefficients •

Rational functions and partial fraction expansion 5–8 example: s3 1 has roots − 1 + j√3 1 j√3 s = 1, s = − , s = − − 2 2

complex factored form •

s3 1 = (s 1) s + (1 + j√3)/2 s + (1 j√3)/2 − − − ³ ´ ³ ´ real factored form • s3 1 = (s 1)(s2 + s + 1) − −

Rational functions and partial fraction expansion 5–9 Rational functions a rational has the form

b(s) b + b s + + b sm F (s) = = 0 1 · · · m , a(s) a + a s + + a sn 0 1 · · · n i.e., a ratio of two polynomials (where a is not the zero polynomial)

b is called the numerator polynomial • a is called the denominator polynomial • examples of rational functions:

1 1 s s3 + 3s + 3 , s2 + 3, + = s + 1 s2 + 1 2s + 3 2s3 + 3s2 + 2s + 3

Rational functions and partial fraction expansion 5–10 b(s) rational function F (s) = a(s)

polynomials b and a are not uniquely determined, e.g.,

1 3 s2 + 3 = = s + 1 3s + 3 (s + 1)(s2 + 3)

(except at s = j√3. . . ) § rational functions are closed under addition, subtraction, multiplication, division (except by the rational function 0)

Rational functions and partial fraction expansion 5–11 Poles & zeros

b(s) b + b s + + b sm F (s) = = 0 1 · · · m , a(s) a + a s + + a sn 0 1 · · · n assume b and a have no common factors (cancel them out if they do . . . )

the m roots of b are called the zeros of F ; λ is a zero of F if F (λ) = 0 • the n roots of a are called the poles of F ; λ is a pole of F if • lims λ F (s) = → | | ∞ the multiplicity of a zero (or pole) λ of F is the multiplicity of the root λ of b (or a) 6s + 12 example: has one zero at s = 2, two poles at s = 1 s2 + 2s + 1 − −

Rational functions and partial fraction expansion 5–12 factored or pole-zero form of F :

b + b s + + b sm (s z ) (s z ) F (s) = 0 1 · · · m = k − 1 · · · − m a + a s + + a sn (s p ) (s p ) 0 1 · · · n − 1 · · · − n where

k = b /a • m n z , . . . , z are the zeros of F (i.e., roots of b) • 1 m p , . . . , p are the poles of F (i.e., roots of a) • 1 n

(assuming the coefficients of a and b are real) complex poles or zeros come in complex conjugate pairs can also have real factored form . . .

Rational functions and partial fraction expansion 5–13 Pole-zero plots

poles & zeros of a rational functions are often shown in a pole-zero plot

=

j PSfrag replacements 1 <

( denotes a pole; denotes a zero) × ◦ this example is for (s + 1.5)(s + 1 + 2j)(s + 1 2j) F (s) = k − (s + 2.5)(s 2)(s 1 j)(s 1 + j) − − − − (s + 1.5)(s2 + 2s + 5) = k (s + 2.5)(s 2)(s2 2s + 2) − − (the plot doesn’t tell us k)

Rational functions and partial fraction expansion 5–14 Partial fraction expansion

b(s) b + b s + + b sm F (s) = = 0 1 · · · m a(s) a + a s + + a sn 0 1 · · · n let’s assume (for now) no poles are repeated, i.e., all roots of a have multiplicity one • m < n • then we can write F in the form r r F (s) = 1 + + n s λ · · · s λ − 1 − n called partial fraction expansion of F λ , . . . , λ are the poles of F • 1 n the numbers r , . . . , r are called the residues • 1 n when λ = λ , r = r • k l k l

Rational functions and partial fraction expansion 5–15 example:

s2 2 1 1 1 − = − + + s3 + 3s2 + 2s s s + 1 s + 2 let’s check: 1 1 1 1(s + 1)(s + 2) + s(s + 2) + s(s + 1) − + + = − s s + 1 s + 2 s(s + 1)(s + 2) in partial fraction form, inverse is easy:

1 1 r1 rn − (F ) = − + + L L s λ · · · s λ µ − 1 − n¶ = r eλ1t + + r eλnt 1 · · · n

(this is real since whenever the poles are conjugates, the corresponding residues are also)

Rational functions and partial fraction expansion 5–16 Finding the partial fraction expansion two steps:

find poles λ , . . . , λ (i.e., factor a(s)) • 1 n find residues r , . . . , r (several methods) • 1 n

method 1: solve linear equations we’ll illustrate for m = 2, n = 3

b + b s + b s2 r r r 0 1 2 = 1 + 2 + 3 (s λ )(s λ )(s λ ) s λ s λ s λ − 1 − 2 − 3 − 1 − 2 − 3

Rational functions and partial fraction expansion 5–17 clear denominators: b +b s+b s2 = r (s λ )(s λ )+r (s λ )(s λ )+r (s λ )(s λ ) 0 1 2 1 − 2 − 3 2 − 1 − 3 3 − 1 − 2 equate coefficients:

coefficient of s0: •

b0 = (λ2λ3)r1 + (λ1λ3)r2 + (λ1λ2)r3

coefficient of s1: • b = ( λ λ )r + ( λ λ )r + ( λ λ )r 1 − 2 − 3 1 − 1 − 3 2 − 1 − 2 3

coefficient of s2: • b2 = r1 + r2 + r3 now solve for r1, r2, r3 (three equations in three variables)

Rational functions and partial fraction expansion 5–18 method 2: to get r , multiply both sides by s λ to get 1 − 1 (s λ )(b + b s + b s2) r (s λ ) r (s λ ) − 1 0 1 2 = r + 2 − 1 + 3 − 1 (s λ )(s λ )(s λ ) 1 s λ s λ − 1 − 2 − 3 − 2 − 3 cancel s λ term on left and set s = λ : − 1 1 b + b λ + b λ2 0 1 1 2 1 = r (λ λ )(λ λ ) 1 1 − 2 1 − 3 an explicit formula for r1! (can get r2, r3 the same way) in the general case we have the formula

rk = (s λk)F (s) − |s=λk which means: multiply F by s λ • − k then cancel s λ from numerator and denominator • − k then evaluate at s = λ to get r • k k

Rational functions and partial fraction expansion 5–19 example: s2 2 r r r − = 1 + 2 + 3 s(s + 1)(s + 2) s s + 1 s + 2

residue r : • 1 r s r s s2 2 r = r + 2 + 3 = − = 1 1 1 s + 1 s + 2 (s + 1)(s + 2) − µ ¶¯s=0 ¯s=0 ¯ ¯ ¯ ¯ residue r2: ¯ ¯ • r (s + 1) r (s + 1) s2 2 r = 1 + r + 3 = − = 1 2 s 2 s + 2 s(s + 2) µ ¶¯s= 1 ¯s= 1 ¯ − ¯ − ¯ ¯ residue r3: ¯ ¯ • r (s + 2) r (s + 2) s2 2 r = 1 + 2 + r = − = 1 3 s s + 1 3 s(s + 1) µ ¶¯s= 2 ¯s= 2 ¯ − ¯ − ¯ ¯ so we have: ¯ ¯ s2 2 1 1 1 − = − + + s(s + 1)(s + 2) s s + 1 s + 2

Rational functions and partial fraction expansion 5–20 method 3: another explicit and useful expression for rk is:

b(λk) rk = a0(λk) to see this, note that

(s λk)b(s) b(s) + b0(s)(s λk) b(λk) rk = lim − = lim − = s λ a(s) s λ a (s) a (λ ) → k → k 0 0 k where we used l’Hˆopital’s rule in second line example (previous page):

s2 2 s2 2 − = − s(s + 1)(s + 2) s3 + 2s2 + 2s hence, s2 2 r = − = 1 1 3s2 + 4s + 2 − ¯s=0 ¯ ¯ Rational functions and partial fraction expansion ¯ 5–21 Example let’s solve v000 v = 0, v(0) = 1, v0(0) = v00(0) = 0 − 1. take Laplace transform:

s3V (s) s2 V (s) = 0 − − (v ) L 000 | {z } 2. solve for V to get s2 V (s) = s3 1 − 3. the poles of V are the cuberoots of 1, i.e., ej2πk/3, k = 0, 1, 2

s3 1 = (s 1) s + 1/2 + j√3/2 s + 1/2 j√3/2 − − − ³ ´ ³ ´

Rational functions and partial fraction expansion 5–22 4. now convert V to partial fraction form

r r r V (s) = 1 + 2 + 2 s 1 s + 1 + j √3 s + 1 j √3 − 2 2 2 − 2

to find residues we’ll use

b(1) 1 b( 1/2 j√3/2) 1 r1 = = , r2 = − − = a0(1) 3 a ( 1/2 j√3/2) 3 0 − −

so partial fraction form is

1 1 1 V (s) = 3 + 3 + 3 s 1 s + 1 + j √3 s + 1 j √3 − 2 2 2 − 2 (check this by just multiplying out . . . )

Rational functions and partial fraction expansion 5–23 5. take inverse Laplace transform to get v:

1 t 1 ( 1 j √3)t 1 ( 1+j √3)t v(t) = e + e −2− 2 + e −2 2 3 3 3

1 t 2 t √3 = e + e−2 cos t 3 3 2

6. check that v000 v = 0, v(0) = 1, v0(0) = v00(0) = 0 −

Rational functions and partial fraction expansion 5–24 Repeated poles now suppose b(s) F (s) = (s λ )k1 (s λ )kl − 1 · · · − l the poles λ are distinct (λ = λ for i = j) and have multiplicity k • i i 6 j 6 i degree of b less than degree of a • partial fraction expansion has the form

r1,k r1,k 1 r1,1 F (s) = 1 + 1− + + (s λ )k1 (s λ )k1 1 · · · s λ − 1 − 1 − − 1 r2,k r2,k 1 r2,1 + 2 + 2− + + (s λ )k2 (s λ )k2 1 · · · s λ − 2 − 2 − − 2 rl,k rl,k 1 rl,1 + + l + l− + + · · · (s λ )kl (s λ )kl 1 · · · s λ − l − l − − l n residues, just as before; terms involve higher powers of 1/(s λ) −

Rational functions and partial fraction expansion 5–25 1 example: F (s) = has expansion s2(s + 1)

r r r F (s) = 1 + 2 + 3 s2 s s + 1

inverse Laplace transform of partial fraction form is easy since

1 r r k 1 λt − = t − e L (s λ)k (k 1)! µ − ¶ −

same types of tricks work to find the ri,j’s

solve linear equations (method 1) • can find the residues for nonrepeated poles as before •

Rational functions and partial fraction expansion 5–26 example: 1 r r r = 1 + 2 + 3 s2(s + 1) s2 s s + 1 we get (as before)

r3 = (s + 1)F (s) s= 1 = 1 | − now clear denominators to get

2 r1(s + 1) + r2s(s + 1) + s = 1 2 (1 + r2)s + (r1 + r2)s + 1 = 1 which yields r = 1, r = 1, so 2 − 1 1 1 1 F (s) = + s2 − s s + 1

Rational functions and partial fraction expansion 5–27 extension of method 2: to get ri,ki,

multiply on both sides by (s λ )ki • − i evaluate at s = λ • i gives ki F (s)(s λi) = ri,k − s=λi i ¯ to get other r’s, we have extension ¯

1 dj ki F (s)(s λi) = ri,k j j! dsj − i− ¯s=λi ¡ ¢¯ ¯ ¯ usually the ki’s are small (e.g., 1 or 2), so fortunately this doesn’t come up too often

Rational functions and partial fraction expansion 5–28 example (ctd.): r r r F (s) = 1 + 2 + 3 s2 s s + 1

multiply by s2: • 1 r s2 s2F (s) = = r + r s + 3 s + 1 1 2 s + 1

evaluate at s = 0 to get r = 1 • 1 differentiate with respect to s: • 1 d r s2 = r + 3 −(s + 1)2 2 ds s + 1 µ ¶

evaluate at s = 0 to get r = 1 • 2 − (same as what we got above)

Rational functions and partial fraction expansion 5–29 Nonproper rational functions

b(s) b + b s + + b sm F (s) = = 0 1 · · · m , a(s) a + a s + + a sn 0 1 · · · n is called proper if m n, strictly proper if m < n, nonproper if m > n ≤ 1 partial fraction expansion requires strictly proper F ; to find − (F ) for other cases, divide a into b: L

F (s) = b(s)/a(s) = c(s) + d(s)/a(s) where

m n k c(s) = c0 + + cm ns − , d = d0 + + dks , k < n · · · − · · · then 1 (m n) 1 − (F ) = c0δ + + cm nδ − + − (d/a) L · · · − L d/a is strictly proper, hence has partial fraction form

Rational functions and partial fraction expansion 5–30 example 5s + 3 F (s) = s + 1 is proper, but not strictly proper

5(s + 1) 5 + 3 2 F (s) = − = 5 , s + 1 − s + 1 so 1 t − (F ) = 5δ(t) 2e− L − in general, F strictly proper f has no impulses at t = 0 • ⇐⇒ F proper, not strictly proper f has an impulse at t = 0 • ⇐⇒ F nonproper f has higher-order impulses at t = 0 • ⇐⇒ m n determines order of impulse at t = 0 • −

Rational functions and partial fraction expansion 5–31 Example

s4 + s3 2s2 + 1 F (s) = − s3 + 2s2 + s

1. write as a sum of a polynomial and a strictly proper rational function:

s(s3 + 2s2 + s) s(2s2 + s) + s3 2s2 + 1 F (s) = − − s3 + 2s2 + s s3 3s2 + 1 = s + − − s3 + 2s2 + s (s3 + 2s2 + s) + (2s2 + s) 3s2 + 1 = s + − − s3 + 2s2 + s s2 + s + 1 = s 1 + − − s3 + 2s2 + s s2 + s + 1 = s 1 + − − s(s + 1)2

Rational functions and partial fraction expansion 5–32 2. partial fraction expansion

s2 + s + 1 r r r − = 1 + 2 + 3 s(s + 1)2 s s + 1 (s + 1)2

determine r1: • s2 + s + 1 r = − = 1 1 (s + 1)2 ¯s=0 determine r : ¯ 3 ¯ • s2 + s + 1 ¯ r = − = 1 3 s ¯s= 1 ¯ − determine r2: ¯ • ¯ d s2 + s + 1 s2 1 r = − = − − = 2 2 ds s s2 − µ ¶¯s= 1 ¯s= 1 ¯ − ¯ − (alternatively, just plug in some value of¯ s other than s = 0¯ or s = 1: ¯ ¯ − 2 s + s + 1 1 r2 r3 r2 1 − = = r1 + + = 1 + + = r2 = 2) s(s + 1)2 ¯ 4 2 4 2 4 ⇒ − ¯s=1 ¯ ¯ ¯ Rational functions and partial fraction expansion 5–33 3. inverse Laplace transform

1 1 1 2 1 − (F (s)) = − s 1 + + L L − s − s + 1 (s + 1)2 µ ¶ t t = δ0(t) δ(t) + 1 2e− + te− − −

Rational functions and partial fraction expansion 5–34