Colorado School of Mines CHEN403 Laplace Transforms

advertisement

Colorado School of Mines CHEN403

Laplace Transforms

Laplace Transforms.............................................................................................................................................. 1

Definition of the Transform .............................................................................................................................. 2

Properties of Laplace Transform .................................................................................................................... 2

Transforms of Simple Functions ..................................................................................................................... 3

Translation of Transforms................................................................................................................................. 5

Transforms of Derivatives ................................................................................................................................. 6

Transforms of Integrals ...................................................................................................................................... 6

Final-Value & Initial-Value Theorems........................................................................................................... 7

Inverse Laplace Transform — Conversion to Partial Fractions ......................................................... 8

Collection of Terms.......................................................................................................................................... 9

Specific Values of s ...................................................................................................................................... 10

Heaviside Expansion Method ................................................................................................................... 12

More Complicated Partial Fractions – Repeated Roots....................................................................... 13

Heaviside Expansion for Repeated Roots............................................................................................ 13

Specific s Values for Repeated Roots ..................................................................................................... 14

More Complicated Partial Fractions – Quadratic & Higher Order Terms .................................... 15

Repeated Roots .............................................................................................................................................. 15

Complex Conjugate Roots .......................................................................................................................... 16

Inverting Quadratic Term – Completing the Square ............................................................................ 18

Steps for Completing the Square............................................................................................................. 19

Example #1...................................................................................................................................................... 20

Numerical Root Finding & Partial Fractions ........................................................................................... 21

All Real Roots .................................................................................................................................................. 21

Complex Conjugate Roots .......................................................................................................................... 23

Solution of Initial Value ODEs ....................................................................................................................... 26

Solution of Systems of Initial Value ODEs ................................................................................................ 27

Translation of Transform................................................................................................................................ 30

Further Examples — Finding Transform of Piece-Wise Driving Function.................................. 31

Further Examples — Inverse Transform With Time Delay............................................................... 33

Further Examples — Arbitrary Driving Function in ODE .................................................................. 35

Use of Mathematical Software to Work with Laplace Transforms ................................................. 38

Mathematica.................................................................................................................................................... 38

MATLAB ............................................................................................................................................................ 40

Microsoft Excel............................................................................................................................................... 44

POLYMATH ...................................................................................................................................................... 49

Laplace transforms provide an efficient way to solve linear differential equations with constant coefficients. These are traditional method to solve process control problems. Use algebra instead of calculus.

Laplace Transforms - 1 - December 22, 2008

Colorado School of Mines CHEN403

Procedure:

Solution in t domain

Solution in s domain

Definition of the Transform

Definition:

= L

 ( )  ≡ ∫

0

∞ ( ) st where L is the Laplace operator. Converting back to the t domain requires the inverse

Laplace operator, L -1

:

= L

− 1 .

The inverse Laplace operator does have an integral definition:

= L

1 =

1

2

π i

∫ ( ) st f s e ds where i is

1 and

γ

is some real constant that exceeds the real part of all singularities of

( ) . We will not be dealing directly with this inversion formula in this class but will instead be using simplified techniques.

Properties of Laplace Transform

Properties of the Laplace transforms:

( )

( )

contains no information for t

<

0

does not necessarily exist for all

. our work here.

• L is linear:

( )

. This should not be a problem for

Laplace Transforms - 2 - December 22, 2008

Colorado School of Mines CHEN403

L

{

1

( ) +

2

( ) }

= a L

{

1

( ) }

+ b L

{

2

( ) }

L removes the t variable by integration but replaces it with s .

Proof of linearity:

L

 ( )

+

( )

= ∫

0

∞ ( )

+

( ) e dt

= a

0

∞ ( ) + b

0

∞ ( )

= a L

( ) + b L

( )

Example of function with transform — let

− <

0 , since:

L

 e at  = ∫

0

= ∫

0

∞ e

( ) dt

( )

= e at

where a

>

0 .

( )

only exists when

Transforms of Simple Functions

Common transforms shown in the text book. There are 99 functions listed on pp. 296-299 of Handbook of Mathematical Formulas and Integrals . The most needed in this class are part of these notes. Let’s derive some of them.

First, we need to remember how to integrate by parts . Since:

( ) = + ⇒ udv

= ( ) − vdu then, the integration gives us: and:

∫ udv

= ∫ ( ) − ∫ vdu

∫ a b udv

= [ ] b a

− ∫ a b vdu

⇒ ∫ udv

= uv

− ∫ vdu

Laplace Transforms - 3 - December 22, 2008

Colorado School of Mines CHEN403

Unit Step

=

0

 1

= ∫

0

1

⋅ t t

<

0

>

0 st

= −

1 s

0

∞ e

(

− st

) d

( − st

) s

 e

− st 

0

= −

1 s

[

0 1

]

=

1 s

=

1 s

Ramp

=

0

 t t t

0

= ⋅

<

0

>

0 st

=

=

1 s

2

1 s 2

=

1 s

2 e

− st

(

0

( )

1

)

0

=

1 s

2

Quadratic

=

=

 t

0

2 t t

0

<

0

>

0 t

2 ⋅ e dt

= −

1 s

0

= −

1 s

− st

0

+

1 s

0

= −

1 s

[

0 0

] ∞

0

+ s

2

0

∞ st

=

2 s

3 s s

=

2 s 2

Laplace Transforms - 4 -

1.2

1.0

0.8

f(t) 0.6

0.4

0.2

0.0

-2 0 2 t

4 6

6.0

5.0

4.0

f(t) 3.0

2.0

1.0

0.0

-2 0 2 t

4 6

30.0

25.0

20.0

f(t) 15.0

10.0

5.0

0.0

-2 0 2 t

4 6

December 22, 2008

Colorado School of Mines CHEN403

Unit pulse

= 

0

1/ A 0

0 t

<

0

< <

A

⇒ t

>

A

( ) = ∫

0

∞ ( ) st

=

1

− e

− As

As

=

1

A

0

A st

= −

1

As

 e

− st  A

0

=

1

− e

− As

As

Unit impulse (requiring the use of L’Hopital’s rule)

= lim

A → 0

1

 

⇒ = lim

A → 0

1

− e

As

As 

= lim

A → 0

=

1 se s

− As 

1.2

1.0

0.8

f(t) 0.6

0.4

0.2

0.0

-2

1.2

1.0

0.8

f(t) 0.6

0.4

0.2

0.0

-2

Can proceed onward to show that, in general:

( ) =

 t

0 n t t

<

0

>

0

⇒ = n !

s n

+ 1

Other formulas can be derived (some easily, some not).

Translation of Transforms

L

 e

− at

( )

=

(

+

)

⇒ L

− 1

(

+

)  = e

− at

( )

This most useful when doing the inverse translation.

Examples:

L

[ cos

] s

2 s

+ ω 2

so L e

− at cos t

( )

( s a

) 2 + ω 2

=

1

( ) 2

— since L

[ ] =

1 s

2

, then L

− 1

1

( ) 2

 = te

− at

Laplace Transforms - 5 -

0

0 2 t

2 t

4

4

6

6

December 22, 2008

Colorado School of Mines CHEN403

Transforms of Derivatives

L

L

 dt

 dt 2

( ) 

=

=

( ) − f

( )

( ) − sf

( ) − df dt t = 0

L

 dt 3

( ) 

 =

L

 d

( ) dt

 =

( ) − s f

( ) −

( )

− s n − 1 f s df dt t = 0

− dt 2

− s n − 2 df dt t = 0 t

= 0

− s d

( n − 2

) f dt

( n

2

) t

=

0

− d

( n − 1

) f dt

( n

1

) t

=

0

Note that we can change an n-th order ODE in t into an n-th order polynomial in s . This is why Laplace transforms have been used.

Also note that for an n-th order ODE in t we need n initial conditions: f

( )

,

[

/

] t = 0

, …, d

( n − 1

)

/

( n − 1

)

 t = 0

.

Proof of transform of 1 st derivative using integration by parts:

L

 dt

= ∫

0

∞ dt st

= ∫

0 e st

( )

= e

− st

( ) ∞

− ∫

0

0

= 

0

= − f f

+ ∫

∞ ( ) − s f t e dt

0 st

( )

+

( )

Transforms of Integrals

L

0 t f

( ) d

1 s

Proof:

Laplace Transforms - 6 - December 22, 2008

Colorado School of Mines CHEN403

L

0 t f

( ) d

0

∞ 

0 t f

( ) 

 e dt

= −

1 s

= −

1 s

0

∞ 

0 t

  e

− st ∫

0 t f

( ) 

( ) f

( ) d

τ τ +

0

1 s

0

∞ e d

(

∫ t

0 f

( )

)

= −

1 s

  e

−∞ ∫

0

∞ f

( )

= −

1 s

[

0 0

] 1 s

( )

=

1 s

0

0 f

( ) d s

1

0

∞ ( ) st

Final-Value & Initial-Value Theorems t lim

→∞ lim s

0

( )

for

( )

that exists over the entire range of 0

< < ∞ lim t

0

With these two theorems, we can determine the limiting values of a function only knowing the Laplace transform.

Example #1:

=

( +

1

)( s s

+

+

6

2

)( s

+

3

) t lim

→∞ s lim

→∞

⋅ ( ) lim s

→ 0

( s

+

1

)( s s

+

+

6

2

)( s

+

3

)

6

1

. lim t

→ 0 s lim

→∞

( s

+

1

)( s s

+

+

6

2

)( s

+

3

)

 = s lim

→∞

1

+

1 s s

1

2





1

1

+

+

2 s

6 s





1

+

3 s

=

0

Example #2:

( ) ( s s s

+

+

3

1

)( s s

+

+

4

2

)( s s

+

+

5

3

)

( )( )( )

Laplace Transforms - 7 - December 22, 2008

Colorado School of Mines CHEN403 t lim

→∞ lim s

→ 0

(

( s s

+

+

3

1

)(

)( s s

+

+

4

2

)(

)( s s

+

+

5

3

)

)

 =

60

=

6

10 lim t

→ 0 s lim

→∞

(

( s s

+

+

3

1

)(

)( s s

+

+

4

2

)(

)( s s

+

+

5

3

)

)

 = s lim

→∞

1

1

+

+

3 s

1 s



1





1

+

+

4 s

2 s



1





1

+

+

5 s s

3 

=

1

Example #3:

( ) ( s s s

+

+

3

1

)( s s

+

+

4

2

)( s s

+

5

3

)

( )( )( ) lim t → 0 s lim

→∞

(

( s s

+

+

3

1

)(

)( s s

+

+

4

2

)(

)( s s

+

5

3

)

)

 = s lim

→∞

1

1

+

+

3 s





1

+

1 s

1

+

4 s





1

2 s

1

+

5 s

3

 s

=

1

We would think that we could determine the final value as: t lim

→∞ s lim

→ 0

(

( s s

+

+

3

1

)(

)( s s

+

+

4

2

)(

)( s s

+

5

3

)

)

 =

60

6

= −

10 .

However, the final value theorem cannot be applied since

( )

does not exist at s

= 3 , so this equation cannot be applied. This is more readily apparent from the form of the function transformed to the t domain:

= −

25

9

2 10 e

− 2 t +

8 e

− t +

32 e

3 t

5

⇒ t lim

→∞

= ∞

.

Inverse Laplace Transform — Conversion to Partial Fractions

When doing the math in this class we will generally want to invert Laplace expressions that are ratios of polynomials:

=

Q m

P n

( )

( )

= b s a s m n

+

+ b s 2 + b s b

0

+

+ a s

2 +

1

+

0

.

We will invert the Laplace transforms by matching forms in tables. The functions we want to invert are generally more complicated than those listed in the reference tables. We can do this by splitting up the Laplace function in terms of partial fractions, each of which can

Laplace Transforms - 8 - December 22, 2008

Colorado School of Mines CHEN403 be matched up to the tables. There are three techniques to break the Laplace function apart into partial fractions:

1.

Collection of Terms

2.

Specific Values of s .

3.

Heaviside Expansion.

The procedure can be shown with a series of examples. Let’s start with:

=

2

( +

1

)( s

+

2

)

=

A s

+ s

B

+

1

+ s

C

+

2 where the A , B , and C constants to be determined so that they give an identity for any and all values of s . Once in the simpler form the Laplace function can easily be inverted as:

= L

− 1

( +

1

2

)( s

+

2

)

 = L

− 1

A

 

+ L

− 1

 s

B

+

1

+ L

− 1

 s

C

+

2

∴ ( ) = + − t +

Ce

2 t

Note that we are going in the opposite direction of what we more typically do in algebra — we want to end up with series of fractions with different denominators instead of combining in a single fraction with a common denominator.

Collection of Terms

This is a technique that requires that the values of of A , B , and C will give an identity for all values of s . We proceed using the same steps for combining fractions over a common denominator – put the revised expression over a common denominator, collect terms in the numerator into different powers of s , and then determine the specific values of the constants so that the correct numerator is obtained. For this example:

( +

1

2

)( s

+

2

)

=

A s

+ s

B

+

1

+

=

=

=

(

C s

+

2

( +

1

)( s

+

(

2

) +

+

Bs s

1

)( s

+

2

+

+

2

)

) ( +

1

)

(

2 +

3 s

+

2

) (

2 +

2 s

( +

1

)( s

+

2

)

) (

2 + s

)

)

(

2 +

+

(

3

1

A

)( s

+

+

2

2

)

+

)

+

2 A

Laplace Transforms - 9 - December 22, 2008

Colorado School of Mines CHEN403

Now, we must match up the expressions for the different coefficients for the different powers of s in this general expression with the specific function in the numerator of the original Laplace function: 2 0 s 0 s

1

2 s

0

. So: s

2

: s

1

: s

0

:

0

= + +

=

A

+

2 B C

=

A

Now we 3 linear equations to find our 3 unknowns. First, the constant term immediately gives:

A

=

1 .

Putting this into the other equations give:

2

+ = −

1

B C 3

Subtracting the 1 st equation from the 2 nd gives:

B

= −

2 .

From either of the 2 variable equations we get:

C

=

1

Our partial fraction expansion of the Laplace function is:

=

(

+

1

2

)( s

+

2

)

= − s s

2

+

1

+

1 s

+

2

.

Specific Values of s

We can also find the values of the constants by judicious application of specific values of s .

The partial fraction expansion:

=

( +

1

2

)( s

+

2

)

=

A s

+ s

B

+

1

+ s

C

+

2 can give rise to three different equations by applying three separate values for s . Let’s pick the particular values of s as 1, 2, and 3. The resulting equations will be:

Laplace Transforms - 10 - December 22, 2008

Colorado School of Mines CHEN403

+

1

+

1

=

1

A B C

2 3 3

1

+

1

+

1

=

1

A B C

2 3 4 12

1

+

1

+

1

=

1

A B C

3 4 5 30

We now have three simultaneous linear equations that are somewhat tedious with which to work. The solution found before ( A

=

1 , B

= −

2 , C

=

1 ) can be shown to be a solution to this set of equations, too. One way to find the solution is to apply Cramer’s rule; for the A term:

1 1 1

A

=

3 2 3

1 1 1

12 3 4

1

30

1

1

4

1 1

2 3

1

5

=

1

3

2

1

⋅ + ⋅ ⋅

5 2 4 30

+ ⋅ ⋅ −

3 12 4

⋅ ⋅ + ⋅ ⋅ + ⋅ ⋅ −

3 5 2 4 3 3 2 4

1

3

1

3

2

3

30

1

 

1 1 1

2 12 5

2

2 5

1

1

1

3

2

 

 

2

1 1 1

=

1 .

2 3 4

1 1 1

3 4 5

Similar equations can be set up for the B and C terms.

Admittedly, this way of specifying values is even more complicated the first way, not simpler. However, we could make the math simpler by first algebraically manipulating the form of the partial fraction equation and then picking specific s values. Clearing the fractions to create a polynomial expression leads to:

2

=

( s

+

1

)( s

+

2

)

+

(

+

2

)

B

+

(

+

1

)

C .

Now it seems obvious that very simple equations can be obtained by choosing values of s corresponding to the roots of the original polynomial in the denominator : 0, -1, and -2.

This leads to: s

=

0

( )( )

A

=

2

A

=

1 s

= −

1 B

=

2

B

= −

2

Laplace Transforms - 11 - December 22, 2008

Colorado School of Mines CHEN403 s

= −

2

( )( )

C

=

2

C

=

1 and:

=

(

+ 1

2

)( s

+ 2

)

= − s s

2

+ 1

+

1 s

+ 2

.

Heaviside Expansion Method

The Heaviside Expansion method is a formulized way to make use of the roots in the denominator’s polynomial to easily find the coefficients for the partial fraction expansion.

In general, if there are no repeated roots, then the function

( )

can be expanded into the form:

= i

N ∑

= 1

A i i where the r i

values are the roots of the polynomial in the denominator and the coefficients can be determined as:

A i

A i

= lim s

→ r i

( s r i

) ( )

.

For our sample problem: r

1

= 0 : A

1

= s lim

→ 0

 ⋅

(

+

1

2

)( s

+

2

2

) ( )( )

= 1 r

2

= −

1 : r

3

= −

2:

A

2

= s lim

→− 1

( s

+

1

) ⋅

(

+ 1

2

)( s

+ 2

2

) ( )( )

= −

2

A

3

= lim s →− 2

( s

+

2

) ⋅

( +

1

2

)( s

+

2

2

2

) ( )( )

=

1 and:

=

2

( +

1

)( s

+

2

)

= − s s

2

+

1

+

1 s

+

2

.

Laplace Transforms - 12 - December 22, 2008

Colorado School of Mines CHEN403

The basis for the Heaviside Expansion method is fairly simple to show. The use of specific values was demonstrated by clearing out the denominator of the Laplace function. But, we could clear out one factor at a time:

(

( s r

1

=

Q m

P n

( )

( )

=

A

1 s r

1

+

A

2

) ( ) (

1

)

2

Q

P n m

( )

( )

+

+

=

A

1

+

(

A n n

1

)

⋅ s r

1

) ( )

=

P n s

Q m

( ) (

( )

1

)

=

A

1

as s

→ r

1

A

2

2

+

+

( s r

1

)

A n n

Note that we do not have to completely find all of the other roots, we just need the reduced polynomial for the denominator, P n

( ) ( −

1

)

.

More Complicated Partial Fractions – Repeated Roots

Repeated roots require special considerations. There must be a separate term for each power of the root in the partial fraction expansion.

For example, the following shows the partial fraction expansion of a Laplace function with a repeated root in the denominator:

1

( +

1

) 2

=

A

+ s

B

( s

+

1

) 2

+

C s

+

1

Heaviside Expansion for Repeated Roots

Once we’re at this point, the application of the Collection of Terms & Specific Values of s methods are the same. However, the Heaviside Expansion method is slightly different. If we expand a root r

1

repeated m times as:

= k m

= 1

A k

(

1

) m k

+

⋯ then the coefficients associated with the repeated roots are:

A

1

= lim s → r

1

A k

(

1

= lim s → r

1

( k

1

)

) m ⋅ d k − 1

( )

(

1

) ds k − 1 m ⋅ ( )

 k

=

2,

, m .

Laplace Transforms - 13 - December 22, 2008

Colorado School of Mines CHEN403

So, all of the coefficients are: r

=

0 : A

= s lim

0

 s

1

 =

1

( +

1

) 2 ( ) 2

=

1 r

= −

1, k

=

1 : r

= −

1, k

=

2:

C

= lim s

→−

1

( s

B

= lim s

→−

1

1

 1!

d

1

) 2 ⋅

(

1

+

1

) 2

 =

1

( )

= −

1

1

 

= lim s

→−

1

1 s

2

= −

1

( ) 2

= −

1 and the expansion is:

1

( +

1

) 2

= − s

1

( s

+

1

) 2

1 s

+

1

.

This shows that the Heaviside Expansion method can be applied though its steps require additional calculus. If the expression without the repeated roots is complicated that may make the calculations rather long & tedious.

Specific s Values for Repeated Roots

In this case, it’s almost easier to work with the specific values of s . Manipulating the equation to the form:

1

= ( s

+

1

) 2 + + ( +

1

)

C shows us that we can easily find the values of A & B by setting the value of s to 0 and –1: s

=

0 s

= −

1

1

= ( ) 2

A

1

( )

B

A

=

1

B

= −

1 .

We still have to find the value of C , however. But if we insert the known values of A & B the equation becomes:

1

= ( s

+

1

) 2 s

( +

1

)

C

Now we only have to apply one of the other methods (Collection of Terms or Specific

Value) once. For example, if we look at just the coefficients on the s

2

term we get: s

= +

C

C

= −

1 .

Laplace Transforms - 14 - December 22, 2008

Colorado School of Mines CHEN403

Or, we could insert the value s

=

1 to get:

1

=

2 1 2 C

1

C

= −

1 .

Either of these two methods is easy to apply and may be easier to remember than the

Heaviside equation involving the 1 st derivative.

More Complicated Partial Fractions – Quadratic & Higher Order Terms

There will come times when it may be impractical to split the Laplace function into partial fractions with just linear terms in the denominator. These can still be split into partial fractions. In general, the order of the polynomial in the numerator should be one less than the order of the polynomial in the denominator .

Repeated Roots

We could have split up the repeated root example as:

=

1

(

+

1

) 2

=

A s

+

(

Ds s

+

+

1

)

E

2

.

The manipulated polynomial form for this is now:

1

=

( s

+

1

) 2 +

(

+

)

.

We have a myriad of ways to determine the value of A . Setting s to the root value of 0 gives:

1

=

( ) 2

A

A

=

1 .

Now however setting s to the other root value of -1 not give one of the other coefficients but rather a relationship: s

= −

1 : 1

( )(

D E

)

D E 1 .

Setting s to one gives another relationship (remembering to include the A term): s

=

1 : 1

=

(

+

E

)

D E 3 .

Laplace Transforms - 15 - December 22, 2008

Colorado School of Mines CHEN403

Adding the two relationships together gives:

2 D

= −

2

D

= −

1 and we can derive E

= −

2 from either relationship. Now the expansion is:

=

1

(

+

1

) 2

= − s s

+

2

( s

+

1

) 2

.

With a little more manipulation this can also be expressed as:

=

1

(

+

1

) 2 s

( s s

+

+

1

2

) 2

= − s s

+

1 1

( s

+

1

) ( s

+

1

) 2

= − s s

1

+

1

1

( s

+

1

) 2 the same expression we found before.

Complex Conjugate Roots

This technique is used most useful when there is a quadratic term with complex conjugate roots . For example, the quadratic term:

=

1

(

2 +

2 s

+

2

) cannot be split into real factors (since it has complex conjugate roots). Using only real arithmetic it can be split as:

=

1

(

2 +

2 s

+

2

)

=

A s

+ s 2 +

2

+ s

+

2

.

We can still determine A using the Heaviside Method (or one of the other methods): r

=

0 : A

= s lim

→ 0

 s

2

1

+

2 s

+

2

)

 =

1

( )( )

=

1

1 2 2

leaving the equation:

Laplace Transforms - 16 - December 22, 2008

Colorado School of Mines CHEN403

=

1

(

2 +

2 s

+

2

)

= ⋅ +

2 s s

2 +

2 s

+

2

.

We can manipulate the Laplace function to form the polynomial:

2

=

( s

2 +

2 s

+

2

)

+

2

(

+

E

)

; we can determine D and E using the specific values of 1 and -1 for s : giving:

2 D

+

2 E

= −

2 D

2 E

=

1

3 

=

D

E

= −

1/2

= −

1

1

(

2 +

2 s

+

2

)

= ⋅ − ⋅

2 s 2 s

+

2 s

2 +

2 s

+

2

.

If we’re willing to use complex arithmetic then we can work directly with the complex factors:

=

1

(

2 +

2 s

+

2

)

=

A

+ s s

+

(

B

1 + i

)

+ s

+

(

C

1 − i

) where i

≡ −

1 . The Heaviside Method can be used to find the coefficients even for complex roots: r

( i

)

: B

= s lim

( i

)

( s i

) i

1

)( s i

)

=

1

( i

)(

1

=

( i

1

)( ) i

=

1

− + i

− − i i

= i

1 i

)

= −

1

+ i

4

Laplace Transforms - 17 - December 22, 2008

Colorado School of Mines CHEN403 r

( i

)

: C

= s lim

( i

)

( s i

)

=

1

( − + i

)(

1 i

=

(

1 i

)( )

=

1

− − i

− + i i

= i

1 i

) i

1

)( s i

)

 i

=

4

So, the partial fraction form of this Laplace function is:

=

1

(

2 +

2 s

+

2

)

= ⋅ − ⋅

2 s 4 s

+

1

(

+

1 i

+ i

)

− ⋅

4 s

+

1

(

1 i

− i

)

.

Inverting Quadratic Term – Completing the Square

Will generally want to expand a quadratic (or higher polynomial) in the denominator as product of linear terms. However, we may instead want to “complete the square” and use different translations of the transform function. A particularly simple example is:

=

1 s

2 + 8 s

+ 7

=

( s

+ 7

1

)( s

+ 1

)

=

6

( s

1

+ 1

)

6

( s

1

+ 7

)

∴ ( ) =

1

6 e

− t −

1

6 e

− 7 t

.

We could also “complete the square” to get:

=

1 s

2 +

8 s

+

7

=

( s

2 +

8 s

1

+

16

)

9

=

( s

+

4

1

) 2 −

3

2

=

1

3

3

( s

+

4

) 2 −

3

2

=

1

3 e

− 4 t

( )

.

Note that these expressions are equivalent since sinh

( ) ≡

( e x − e

− x

)

/2 , so:

Laplace Transforms - 18 - December 22, 2008

Colorado School of Mines CHEN403

1

3 e

− 4 t =

1

3 e

− 4 t e

3 t − e

2

3 t

= e

− t − e

6

7 t

Completing the square is much more important when the quadratic cannot be factored into real roots (i.e., has complex conjugate roots). For the quadratic used in the previous example:

=

1 s

2 +

2 s

+

2

=

1

( s

+

1

) 2 +

1

2

( ) = e

− t sin

( )

.

Steps for Completing the Square

The key step in completing the square is to determine half the value of the coefficient of the s term. We then want to split this value squared out of the constant term. Overall, we want to manipulate the quadratic into the following form:

Identify half the value of the coefficient on the s term – express the quadratic as: s

2 +

2

+

.

Separate out the square of half the value of the coefficient from the constant term:

( s

2 +

2 Bs

+

B

2

) (

C

B

2

)

.

Express the quadratic term as a square:

( s

+

B

) 2 +

(

C

B

2

)

.

Express the constant term as a square of its absolute value – be mindful that the sign of the resulting term should match the sign of this difference:

( s

+

B

) 2 ±

(

2

)

2

C

B .

Laplace Transforms - 19 - December 22, 2008

Colorado School of Mines CHEN403

Example #1

= s

2 s

+

8 s

+

25

=

( s

2 s

2 4 s 4

2

) (

− 2

)

= s

( s

+

4

) 2 +

9

= s

+

4

( s

+ 4

) 2 + 3 2

4

( s

+ 4

) 2 + 3 2

= s

+

4

( s

+

4

) 2 +

3 2

− ⋅

3

3

( s

+

4

) 2 +

3 2

To finish putting this into a form we can invert we must (1) make sure that all occurrences of s are in the combination of

( s

+

4

)

and (2) there must be a 3 in the numerator of the second term (with a “cancelling” value also in the denominator):

= s

+

4

( s

+

4

) 2 +

3

2

− ⋅

3

3

( s

+

4

) 2 +

3

2 so:

( )

= e

− 4 t

3 e

− 4 t

( )

= e

− 4 t

( )

3

( )

 .

Note that we could still invert this using the complex roots. Then the partial fraction expansion would be:

= s 2 +

8 s s

+

25

1

6 s

(

+ i i

)

1

6 s

(

− i i

)

= i

⋅ exp

 ( − + + i

⋅ exp

( − − )

.

6 6

We can convert to trigonometric functions and eliminate the complex numbers:

( ) = e

− 4 t

 6 i

⋅ e

3 +

6 i

⋅ e i t

= e

− 4 t

1

2

( e

3 + e

= e

4 t

( )

3 i t

)

+

2

3 i ( e

3 − e

 i t

) 

Laplace Transforms - 20 - December 22, 2008

Colorado School of Mines CHEN403

Numerical Root Finding & Partial Fractions

We may be presented with a transfer function that is of high polynomial order and does not have analytical factors. We should not let this stand in the way of trying to solve the problem. After all, we are engineers and we are most interested in numerical solutions to our problems. The key step is the first step: finding the numerical roots to the polynomial in the denominator of the transfer function. Once these are found then there are multiple ways to find the terms in the numerators that represent the partial fractions. Inverting to the time domain is then an almost trivial matter.

The technique can be shown with numerical examples. The calculations will all be shown using Microsoft Excel for the calculations. (The spreadsheet is available on the class web page.)

All Real Roots

Let’s consider the transfer function:

( ) = s

5

1

+

9.2

s

4 +

33.15

s

3 +

58.3

s

2 +

49.85

s

+

16.495

.

This is a 5 th order polynomial – we know that it should have 5 roots. The following figure shows the curve for the denominator’s function:

P

( ) = s 5 +

9.2

s 4 +

33.15

s 3 +

58.3

s 2 +

49.85

s

+

16.495

.

Indeed, the five points on the figure indicate the five real roots to this polynomial. All of the roots are negative real numbers; there are a variety of ways to determine the roots & we could show that their values are (to four decimal digits): -2.4730, -2.2812, -1.9203, -1.5310,

& -0.9946.

Laplace Transforms - 21 - December 22, 2008

Colorado School of Mines CHEN403

0.1

0.05

0

-0.05

-0.1

-0.15

-0.2

-3 -2.5

-2 -1.5

-1 -0.5

0

The next step to breaking this into partial fractions is to remember that each factor will be s minus the value for the root . Since all roots are negative then all factors will be positive.

The Laplace expression in terms of the factors & then separated into partial fractions will be:

= s 5

1

+

9.2

s 4 +

33.15

s 3 +

58.3

s 2 +

49.85

s

+

16.495

=

( s

+

2.4730

)( s

+

2.2812

)( s

+

1

1.9203

)( s

+

1.5310

)( s

+

0.9946

)

=

A s

+

2.4730

+ s

B

+

2.2812

+ s

C

+

1.9203

+ s

D

+

1.5310

+

E s

+

0.9946

All coefficients can be determined using the Heaviside Expansion method. For example, for the first coefficient:

A

= lim s →− 2.4730

( s

+

2.2812

)( s

+

1.9203

1

)( s

+

1.5310

)( s

+

0.9946

)

=

( − + )( − +

1

)( − + )( − +

=

6.774

)

Laplace Transforms - 22 - December 22, 2008

Colorado School of Mines CHEN403

Finding all coefficients in a similar manner gives:

( ) =

= s

5

1

+

9.2

s

4 +

33.15

s

3 +

58.3

s

2 +

49.85

s

+

16.495

s

6.774

+

2.4730

14.967

s

+

2.2812

+

13.910

s

+

1.9203

6.776

s

+

1.5310

+

1.059

s

+

0.9946

and the inverted result is:

= 6.774exp

(

− 2.4730

t

)

− 14.967exp

(

− 2.2812

t

)

+ 13.910exp

(

− 1.9203

t

)

− 6.776exp

(

− 1.5310

t

)

+ 1.059exp

(

− 0.9946

t

)

The calculations are complicated to do by hand but are very doable using common computer tools (such as Excel ).

Complex Conjugate Roots

It doesn’t take much to turn a complicated numerical problem into a very complicated numerical problem. Let’s change our 5 th order transfer function slightly in the last coefficient:

( )

= s

5

1

+

9.2

s

4 +

33.15

s

3 +

58.3

s

2 +

49.85

s

+

16.505

.

This is still a 5 th order polynomial – we know that it should still have 5 roots. The following figure shows the curve for the polynomial in the denominator:

P

( ) = s

5 +

9.2

s

4 +

33.15

s

3 +

58.3

s

2 +

49.85

s

+

16.505

.

Now note that there are only three points on the figure where the curve crosses the horizontal axis. This indicates that there are only three real roots to this polynomial, not five. The three real roots are (to four decimal digits): -2.5195, -1.4731, & -1.0057. Since there are a total of five roots there must be two more that are complex.

Laplace Transforms - 23 - December 22, 2008

Colorado School of Mines CHEN403

0.1

0.05

0

-0.05

-0.1

-0.15

-3 -2.5

-2 -1.5

-1 -0.5

0

We cannot stop at this point – we still need to determine the terms that correspond to the complex roots. One way is to set up a matrix whose determinant corresponds to the denominator’s polynomial function and then use the QR eigenvalue solution technique to determine all of the roots simultaneously (whether they are real or not). This has been implemented in the spreadsheet available on the class web page. In this way we can determine that the complex conjugate roots are -2.1009±0.09056i.

Now that we have all of the roots we can expand the Laplace function in the partial fraction form:

=

1 s

5 +

9.2

s

4 +

33.15

s

3 +

58.3

s

2 +

49.85

s

+

16.505

=

A s

+ 2.5195

+

B s

+ 1.4731

+

C s

+ 1.0057

+ s

+

(

D i

)

+ s

+

(

E

All coefficients can be determined using the Heaviside Expansion method (even the complex ones). The coefficients for A , B , and C do not really require complex arithmetic since the product of the D & E factors lead to a quadratic expression with real coefficients.

For example: i

)

Laplace Transforms - 24 - December 22, 2008

Colorado School of Mines CHEN403

A

= s lim

→− 2.5195

( s

+

1.4731

)( s

+

1.0057

)( s

+

1 i

)( s

+ i

)

= s lim

→−

2.5195

( s

+

1.4731

)( s

+

1.0057

)

1

( s 2 +

4.4218

s

+

4.2017

)

=

3.4422

Finding all of the coefficients in a similar manner gives:

=

1 s

5 +

9.2

s

4 +

33.15

s

3 +

58.3

s

2 +

49.85

s

+

16.505

=

3.4422

s

+

2.5195

5.0830

s

+

1.4731

+

1.1704

s

+

1.0057

+ s

+

( i i

)

+ s

+

( and the inverted result is:

=

3.4422e

− 2.5195

t −

5.0830e

− 1.4731

t +

1.1704e

− 1.0057

t

+ ( ) − (

2.1009 0.09056

)

+ ( ) − (

The complex numbers can be eliminated by converting the last two exponential terms to trigonometric functions. Remember that the trigonometric functions can be related to exponentials by: cos sin

1

2

( e

θ i + e

−θ i

)

( e

θ i + e

−θ i

)

=

2cos

( ) i

2

( e

θ i − e

−θ i

)

(

θ i − e

−θ i

)

= −

2sin

So the resulting

( )

can be modified to trigonometric form as:

=

3.4422e

2.5195

t −

5.0830e

1.4731

t +

1.1704e

1.0057

t

+ e

2.1009

t

( ) −

0.09056

+

( )

0.09056

=

3.4422e

− 2.5195

t −

5.0830e

− 1.4731

t +

1.1704e

− 1.0057

t

+ e

2.1009

t

(

0.09056

+ e 0.09056

)

(

0.09056

− e

0.09056

)

= 3.4422e

− 2.5195

t − 5.0830e

− 1.4731

t + 1.1704e

− 1.0057

t

+ e

− 2.1009

t  ( t

) + ( t

)

Laplace Transforms - 25 - December 22, 2008 i i

)

Colorado School of Mines CHEN403

The partial fraction coefficients for the complex conjugate terms will always be complex conjugates themselves when all of the coefficients in the Laplace function are real. This simplifies the transformation to trigonometric functions:

= s

− ( a

+ ω i

)

+ s

− ( a

− ω i

)

⇒ ( ) ( + ) ( a +ω

)

+ ( − ) ( a −ω

)

= e at

(

ω it + e

−ω it

)

+

(

ω it − e

−ω it

)

= e at

 A

( )

2 sin

Note that one could also recombine the partial fractions involving the complex conjugate terms to give a single term with a quadratic in the denominator:

=

= s

− ( a

+ ω i

)

+ s

− ( a

− ω i

)

( ) −

2

( aA

+ ω

B s

2 −

2 as

+

( a

2 + ω 2

)

) which can be shown to invert to the same as before.

Solution of Initial Value ODEs

We can apply Laplace transforms to ODEs & obtain solutions. Example: d x dt

3

+

4 d x dt

2

+

5 dx dt

+

2 x

=

2 with x

= dx dt t

=

0

= dt

2

=

0 . t = 0

Transforming: s x

− s x

( ) − sx

′ ( ) − x

′′ ( )  +

4

 s x

− sx

( ) − x

′ ( )

+

5  sx

− x

( ) +

2 x

=

2 s s x

+

4 s x

+

5 sx

+

2 x

=

2 s

=

2

(

3 +

4 s 2 +

5 s

+

2

)

Again, the problem is to invert apart into partial fractions:

( )

to get

( )

. We can factor the cubic term & then break

Laplace Transforms - 26 - December 22, 2008

Colorado School of Mines CHEN403

=

2

( +

1

) ( s

+

2

)

=

A s

+ s

B

+

2

+

C

( s

+

1

) 2

+ s

D

+

1

The first three coefficients can easily be determined using the Heaviside Method to give:

=

2

( +

1

) ( s

+

2

)

= − s s

1

+

2

2

( s

+

1

) 2

+

D s

+

1

.

We can determine the value of D by setting s

=

1 to find D

=

0 . So:

=

2

( +

1

) ( s

+

2

)

= − s s

1

+

2

2

( s

+

1

) 2 which gives:

= − e

− 2 t −

2 te

− t .

Note that we have traded solving an ODE for factoring a polynomial and finding its partial fractions.

Further note: dx

=

2 e

− 2 t dt

2 e

− t +

2 te

− t dt

2

= −

4 e

2 t +

2 e

− t +

2 e

− t −

2 te

− t

= −

4 e

− 2 t +

4 e

− t −

2 te

− t

=

8 e

2 t −

4 e

− t −

2 e

− t +

2 te

− t dt 3

=

8 e

− 2 t −

6 e

− t +

2 te

− t

The ICs & the original ODE are satisfied by this solution.

Solution of Systems of Initial Value ODEs

We can also apply Laplace transforms to systems of ODEs & obtain solutions. Example: dy

1 dt

= sin y

1

− y

2

) ⇒ dy dt

1 +

2 y

1

2 y

2

= sin

Laplace Transforms - 27 - December 22, 2008

Colorado School of Mines CHEN403 dy

2 dt

=

2

( y

1

− y

2

) −

3 y

2 with the ICs y

1

( )

= y

2

( )

=

0 .

⇒ −

2 y

1

+ dy

2 dt

+

5 y

2

=

0

How would we even start to solve this without the special properties of Laplace transforms?

The first step would be to eliminate one of the variables from one of the

ODEs. For example, let’s eliminate the ODE to be in terms of y

2

: y

2

from the 1 st ODE. We’ll start by rearranging dy

1 dt

= sin y

1

− y

2

) and then by taking its derivative:

⇒ y

2

=

1

2 dy

1 dt

+ y

1

1

2 sin y

2

=

1

2 dy dt

1 + y

1

1

2 sin

⇒ dy

2 dt

=

1

2 d y dt

2

1 + dy dt

1 +

1 cos

2

.

Now, insert these two expressions into the 2 nd ODE & re-arrange to give: dy dt

2 =

2

( y

1

− y

2

) −

3 y

2

1

2 d y dt

2

1 + dy dt

1 +

1

2 cos

=

2 y

1

5

1

2 dy

1 dt

+ y

1

1 sin

2

1

2 dt

2

1 +

7

2 dy

1 dt

+

3 y

1

=

5 sin

2

1 cos

2

Now, instead of two first order ODEs, we have one second order ODE. This means we also need to have to another IC on derivative,

[ y

1

/ dt

] t = 0 form of the first ODE:

, by inserting the y

1

. We can calculate the IC for the first y

1

( )

and y

2

( )

values into the original y

1

′ ( ) = ( ) −

2 y

1

( ) − y

2

( ) =

0 .

Now we have the system in a form that we can try to solve it (either using Laplace transforms or some other technique).

It is much simpler to apply Laplace transforms and use algebraic equation techniques to solve this system of ODEs. Applying the Laplace transforms to the 1 st equation gives:

Laplace Transforms - 28 - December 22, 2008

Colorado School of Mines CHEN403 dy

1 dt

= sin t 2 y

1

− y

2

)

( s sy

1

− y

1

+

2

)

= y

1

2 y

2

=

1 s

2 +

1

2

( y

1

− y

2

) s 2

1

+

1 and to the 2 nd equation gives: dy

2 =

2

( y

1

− y

2

) −

3 y

2 dt

⇒ sy

− y

2 2

( ) =

2

(

2 y

1

+ ( s

+

5

) y

2

=

0 y

1

− y

2

) −

3 y

2 y

1

= s

+

5 y

2

2

Now we have a system of two algebraic equations in two unknowns. Inserting the 2 nd equation into the 1 st :

( s

+

2

) s

+

5

2

( s

2 +

7 s

+

6

) y

2 y

2

=

2 y

2

= s

2

2

+

1 s

2

1

+

1 y

2

=

2

( s

2 +

1

)( s

2 +

7 s

+

6

) ( s

2 +

1

) ( s

2

+

1

)( s

+

6

) y

2

= −

1 7

37

( s

2 s

+

5

1

)

+

1

5

( s

1

+

1

)

2

185

( s

1

+

6

) y

2

= −

7

37

( s

2 s

+

1

)

+

5 1

37

( s

2 +

1

)

+

1

5

( s

1

+

1

)

2

185

( s

1

+

6

)

Note:

( ) = −

7

37 cos dy

2 dt

=

7

37 sin

+

5

37 sin

( ) +

1

5 e

− t −

2

185 e

− 6 t

+

5

37 cos

( ) −

1

5 e

− t +

12

185 e

6 t and the other function is: y

1

= s

+

5

2 y

2

= s

+

5

2

( s

2 +

1

) ( s

2

+

1

)( s

+

6

) y

1

= −

1 15

37

( s

2 s

+

16

1

)

+

2

5

( s

1

+

1

)

+

1

185

( s

1

+

6

) y

1

= −

15

37

( s

2 s

+

1

)

+

16 1

37

( s

2 +

1

)

+

2

5

( s

1

+

1

)

+

1

185

( s

1

+

6

)

Laplace Transforms - 29 - December 22, 2008

Colorado School of Mines CHEN403

Note: dy

1 dt

( )

= −

15 cos

37

=

15 sin

37

+

+

16

37

16

37 cos sin

( )

+

( )

2

5 e

− t

2

5 e

− t +

1

185 e

− 6 t

6

185 e

− 6 t

The following chart shows the two solutions.

1.000

0.800

0.600

0.400

0.200

0.000

-0.200

-0.400

-0.600

-0.800

-1.000

0.0

2.0

y

2

4.0

6.0

t

8.0

y

1

10.0

Translation of Transform

Remember that if there is an exponential term in the time domain then this means we have to shift all terms with s in the Laplace domain:

L

 e

− at

( ) = ( + ) ⇒ L

− 1

( + )  = e

− at

( )

If there is an exponential in the Laplace domain, then this means there is a shift in the time domain. This is written as:

L

( − t

0

) = e

− st

0 L where

( ) =

0 for t

≤ t .

0

This can incorporate dead time into the transform.

Laplace Transforms - 30 - December 22, 2008

Colorado School of Mines CHEN403

Example:

L

1

1 s s

= + s e

− s − e e

− s s s

1

2

2

2 s

− e

− e

3 s

− 2 s

1 s s 2

− e

− 3 s

1 s

1 and L

1 s

1

  t

So:

( ) =

L

1

1

 

=

1 when 0

< <

1 .

=

=

=

L

− 1

1 s

L

− 1

1 s

L

− 1

1 s

+ e

− s

+ e

− s

+ e

− s

1 s 2

 s s

1

1

2

2

− e

− 2 s

− e

− 2 s s

(

1

2 t

1 s

2

1

− e

− 3 s

1 s

The following chart shows the solution.

) =

( t t

when 1

< <

2 .

1

) (

( t t

1

2

) =

) (

2 t

when 2

< <

3 .

2

)

1 1 when t

>

3 .

2.5

2.0

1.5

f(t)

1.0

0.5

0.0

0 1 2 3 4 5 t

Further Examples — Finding Transform of Piece-Wise Driving Function

Find the Laplace transform of triangular pulse of duration T :

Laplace Transforms - 31 - December 22, 2008

Colorado School of Mines CHEN403

2 t

T

0

=



2

0

2

T t T

< <

T

/2

T

< <

< t

/2

T

Brute Force Method.

Can find directly from defining formula:

L

0

∞ ( ) st = ∫

0

T /2

2 t

T

+ ∫

T

T

/2

 2

2 t

T

L

L

T

2

0

T /2 te dt

+

2

T

T

/2

2

 e

− st

T

( s

2 st −

2

T

T

T

/2 st

1

) 

T /2

+

2

 e

− s st 

T

T /2

2

T

 e

− st

(

0 s

2

L

2

T

 e

− sT /2

− sT

2

1

 s

2

+

1 s

2

+ ∫

T

1

) 

T

T /2

0

2

 e

− sT s

− e

− sT /2 s

2

T

 e

− sT

(

− sT

1

) s

2

− e

− sT /2

− sT

2

− s

2

1

L

L

L

2 1

2

T

2

− sTe s sTe

2

2

− sT

− sT s

2

/2

− e

− sT s

2

− e

− sT /2

+ s

2 sTe

3 s

2

− sT

2

/2

Te

T

 s sT

+ e

− sT /2 s

2

Te

− sT /2 s

2 1

2

T

2

Te

− s

Te

− sT sT

2 s

/2

− e

− sT s

2 e

− sT /2

+ s

2

Te

− sT

2 s

/2

2

+

Te

T s

− sT e

− sT /2 s

2

Te

− sT /2 s

2

Ts

2

 − e

− sT /2 + e

− sT

Alternate Method.

Can also get this by recognizing that the original function can be rewritten in terms of functions that “turn on” after a time delay:

Laplace Transforms - 32 - December 22, 2008

Colorado School of Mines CHEN403

( ) = ( ) + f

2

 t

T

2

+

3

( − )

Obviously:

( ) =

2 t

T

Over the 2nd range:

2

2 t

=

T

2

T t

 

  2

4

T t

 

 

2

T t

4

T

 t

T

2

 so: f

2

 t

T

2

= −

4

T

 t

T

2

Over the final range:

( )

= −

4

T t

0

2

2 t

T

 

2

2

T t

  2 

 

T t 

4

T

 t

T

2

+

2

T

( )

 so:

3

(

)

=

2

T

( )

( )

=

2 t

T

Now, we can take the Laplace transform of this function to get:

L

L

 = L

 = L 

( )

+ L

( )  + e

− sT f

2

 t

/2 L

T

2

+ L

( ) + e

3

− sT L

( )

( )

L

L

L

L

 L

2

T t

+ e

− sT /2 L

4

T t

+ e

− sT L

2

T t

2

L

T

( e

4

T

− sT e

− sT /2 L

/2 + e

− sT

T

( e

− sT /2 + e

− sT

)

+

2

T e

− sT L

[ ]

)

L

[ ]

Ts 2

Further Examples — Inverse Transform With Time Delay

Find the inverse Laplace transform of:

Laplace Transforms - 33 - December 22, 2008

Colorado School of Mines CHEN403

=

1

− e

− s s 2 + s

Split into:

=

1 s 2

− e

+

− s s

= s 2

1

+ s

− e

− s

1 s 2 + s

Need to find the inverse transform of 1/

( s

2 + s

)

. Can do by partial fractions: s

2

1

+ s

=

A s

+ s

B

+

1

=

(

+

)

+

A s

2 + s

= − s s

1

+

1 so: L

− 1

1 s

2 + s

= L

− 1

1

 

− L

− 1

 s

1

+

1

 e

− t

Could also have found this directly from the table handed out in class. So now we can find the total inverse:

L

− 1

L

− 1

L

− 1

1 s

2 + s

− L

− 1

 e

− s



(

1

− e

− t

1

) ( e

− t

1

− e

1 − t

)

L

− 1

1

− e

− t

 e

1 − t − e

− t t t

<

>

1

1

1 s

2 + s

 t t

<

1

>

1

The chart of this function is shown below.

Laplace Transforms - 34 - December 22, 2008

Colorado School of Mines CHEN403

0.70

0.60

0.50

0.40

f(t)

0.30

0.20

0.10

0.00

0.00

0.50

1.00

1.50

2.00

2.50

t

Further Examples — Arbitrary Driving Function in ODE

Consider the following ODE: d f

+ df dt

2

3 dt

+

2 f

=

( ) with the ICs f

= =

0 and transform of this system will be:

( ) +

3

( ) +

2

( ) = ( )

= s

2 +

3 s

+

2

=

( s

+

G s

1

( )

)( s

+

2

)

( )

is an arbitrary driving function . The Laplace

We can propose several types of driving functions to see the response of the system.

(1) If

( )

is an impulse, G c

δ ( )

, then

( ) =

G c

:

( )

=

=

G

G c

( s

+

1

)( s

+

2

) c e

− t − e

2 t

=

(

− t − e

− 2 t

)

Note that the roots of the derivative terms give rise to two exponential decay terms, e

− t and e

− 2 t

. This can be viewed as the natural response of the system to a disturbance. Also note that the ultimate value of

( )

returns to f

( )

. The following chart shows

( )

. Note

Laplace Transforms - 35 - December 22, 2008

Colorado School of Mines CHEN403 that the input disturbance of G causes an input disturbance for about 5 time units & c having a peak value of about 0.25

G c

.

0.300

0.250

0.200

f(t)/G c

0.150

0.100

0.050

0.000

0.0

1.0

2.0

3.0

4.0

5.0

t

Next, let’s assume that

=

( )

G c

( +

1

)( s

+

2

)

is a constant step change, G H

( )

, then

( )

=

G c

/ s :

( ) =

G c

1

− 1 e

− t −

1

2

1 e

− 2 t +

1

2

1

1

( )

=

G c

1

2

− e

− t +

1

2 e

2 t

Note that the roots of the derivative terms still give rise to two exponential decay terms, e

− t and e

− 2 t . The following chart shows this

( )

. Note that the input change of G c

causes a output change of only 0.5

G c

.

0.6

0.5

0.4

f(t)/G c

0.3

0.2

0.1

0.0

0.0

1.0

2.0

3.0

4.0

5.0

t

Laplace Transforms - 36 - December 22, 2008

Colorado School of Mines CHEN403

1.0

0.8

0.6

0.4

0.2

0.0

-0.2

-0.4

-0.6

-0.8

-1.0

0.0

What if we assume an even more complicated form for

G c sin

( )

, then

( )

= ω

/

( s

2 + ω 2

)

=

( s

2 + ω 2

) (

G c s

ω

+

1

)( s

+

2

)

= −

= −

( )

? Let’s apply a wave function

(

(

4

G c

+ ω 2

ω

3 s

+ ω −

)(

(

1

+ ω 2

)( s

2

2

)

+ ω 2

) (

1

+ ω

G c

2

)

ω

( s

+

1

)

(

4

+ ω

G c

2

)

ω

( s

+

2

)

4

3 G c

+ ω 2

)(

ω

1

+ ω 2

) ( s

2 s

+ ω 2

)

(

4

G c

(

+ ω 2

)(

1

2

)

+ ω 2

) ( s

2

ω

+ ω 2

)

+

= −

(

1

+ ω

G c

2

)

ω

( s

+

1

)

(

4

+ ω

G c

2

)

ω

( s

+

2

)

(

4

3 G c

+ ω 2

)(

ω

1

+ ω 2

) cos

( )

(

4

G c

(

)(

2

)

+ ω 2

1

+ ω 2

) sin

+

(

1

G c

ω

+ ω 2

) e

− t −

(

4

G c

ω

+ ω 2

) e

2 t

Note that the roots of the derivative terms still give rise to two exponential decay terms, e

− t

and e

− 2 t

. The following chart shows this

( )

for

ω =

1.5 . Note that the output signal has a smaller amplitude than the input signal & the phase is shifted.

G(t)/G c

2.0

4.0

6.0

f(t)/G c

8.0

10.0

t

Laplace Transforms - 37 - December 22, 2008

Colorado School of Mines CHEN403

Use of Mathematical Software to Work with Laplace Transforms

Specialized mathematical software can be used to do all of the operations discussed here — splitting apart a Laplace function into partial fractions and then inverting to the t domain or even doing the inversion in one step. Two examples of this software are Mathematica

 and MATLAB

. In fact, if one narrows their focus on the type of problem to be solved, even software such as Microsoft ® Excel and POLYMATH can be used However, it is strongly recommended that in the beginning the student practice doing the operations on his/her own and not rely solely on this software (if for no other reason than computers with this software will not be available to the student during quizzes and exams).

Mathematica

Partial Fractions.

For example, we can use Mathematica to split apart the example problem in the section on more complicate Laplace functions. The key function is Apart that rewrites a rational expression as a sum of terms with “minimal” denominators:

Note that in this case the minimal denominators are a two linear terms in s and one term that is quadratic in s , the simplest factors possible while still retaining real coefficients.

This is an application to a simple case since we were able to do it previously without using any software. However, other simple looking cases may require the use of software.

Mathematica cannot do much with the next example: since there are no factors with real, rational coefficients to the cubic portion of the denominator. However, we may only need the numeric roots. In this case, Mathematica is of great use. Remember that we can get Mathematica to do numeric calculations instead of symbolic by specifying at least one of the numbers with a decimal point. So:

Laplace Transforms - 38 - December 22, 2008

Colorado School of Mines CHEN403

Now, the simplest denominators are either linear or quadratic in terms of s . The quadratic terms are those that would give complex conjugate numbers is factored any further apart.

But what if we really want those complex conjugates? Then, specify at least one of the coefficients in the original denominator as a complex number by adding a 0

⋅ i term:

Inversion of Laplace Transforms.

How about the problem of inverting to the time domain?

Going back to the first example we can do the inversion pretty quickly by completing the square:

=

(

+

1

)

2 s

+

3

( s

2 +

2 s

+

2

)

=

3/2 s

( s

1

+

1

)

1

2 s 2 s

+

+

2 s

4

+

2

=

3/2

− s

( s

1

+ )

1

1 2

( s

+

4 s 2 +

2 s

+

1

)

+

1

=

3/2

− s

( s

1

+

1

)

1

2

( s

+ s

1

+

) 2

1

+ 1 2

3

2

1

( s

+ 1

) 2 + 1 2

.

3

2 e

− t −

1

2 e

− t cos

What do we get from Mathematica?

3

2 e

− t sin

( )

.

This isn’t what we want – we’re stuck with some expression involving complex numbers, just what we’re trying to avoid. How about if we try to use the function to convert the exponential functions to trigonometric functions?

Laplace Transforms - 39 - December 22, 2008

Colorado School of Mines CHEN403

Now it’s even worse. We have the sine & cosine functions that we want, but we still have complex numbers. Even if we simplify: we have the sinh & cosh functions instead of the exponentials (the ExpToTrig function converts all exponentials to circular or hyperbolic functions).

So how can we use Mathematica to invert the Laplace functions to a form that we can control? I’ve used the following steps with success:

1.

Split the Laplace function into partial fractions using the Apart function.

2.

Invert any quadratic terms “by hand” by completing the square.

3.

Compare the result in step 2 to that generated by Mathematica by subtracting. After simplifying this result should be zero.

So, verifying the result obtained by completing the square:

MATLAB

Partial Fractions.

MATLAB can be used to find the partial fractions resulting from the ratio of two polynomials using the built-in function residue . The function residue finds the residues, poles and direct terms of a partial fraction expansion of the ratio of two polynomials.

For example,

Laplace Transforms - 40 - December 22, 2008

Colorado School of Mines CHEN403

=

( )

( )

=

( +

1

)( s s

+

+

6

2

)( s

+

3

)

= s

+

6 s

4 +

6 s

3 +

11 s

2 +

6 s

+

0

If there are no multiple roots,

( )

( )

= s r

(1) p (1)

+ r (2) s

− p (2)

+

+ s

( )

+

Vectors b and a specify the coefficients of the polynomials in the numerator and denominator in descending powers of s . The residues are returned in the column vector r , the pole locations in column vector p and the direct terms in the row vector k . The number of poles, n , is equal to the order of the denominator polynomial minus 1. The direct term vector is empty if the order of the numerator polynomial is less than the order of the denominator polynomial. Otherwise, it is equal to the order of the numerator polynomial minus the order of the denominator polynomial plus 1.

For our example problem, we assign the polynomial coefficients to the vectors b and a and invoke the function call to residue : b = [ 1 6 ] a = [ 1 6 11 6 0 ]

[r,p,k] = residue(b,a) r =

-0.5000

2.0000

-2.5000

1.0000 p =

-3.0000

-2.0000

-1.0000

0 k =

[]

These results are then put into the form shown above as

Laplace Transforms - 41 - December 22, 2008

Colorado School of Mines CHEN403

( )

( )

= s

0.5

+ s

2

+ s

2.5

+

1 s

(0)

= − s

0.5

+ 3

+ s

2

+ 2

− s

2.5

+

1

+ 1 s

Consider another example, this one with a repeated root:

=

3 s

+

2

( +

1

) ( s

+

2

)

= s

4

3 s

+

2

+

4 s

3 +

5 s

2 +

2 s

+

0

For this case of repeated roots, the partial fraction expansion will include each of the repeating roots represented by

=

= p j m 1) as s

( )

+ r j

+

1)

( s

( )

) 2

+

+

( 1)

( s

( )

) m

For our example, m

=

2 , so we would expect to have the first two terms of this expression in the partial fraction expansion. b = [ 3 2 ] a = [ 1 4 5 2 0 ]

[r,p,k] = residue(b,a) r =

2.0000

-3.0000

1.0000

1.0000 p =

-2.0000

-1.0000

-1.0000

0 k =

Laplace Transforms - 42 - December 22, 2008

Colorado School of Mines CHEN403

[]

These results are put into the form shown above as:

( )

( )

= a s s

2

+ s

3

+

( s

1

) 2

+

1 s

(0)

= s

2

+

2

− s

3

+

1

+

( s

+

1

1) 2

+

1 s

Now let’s look at the example with the complex conjugate roots:

=

( +

1

)

2 s

+

3

( s

2 +

2 s

+

2

)

=

2 s

+

3 s

4 + 3 s

3 + 4 s

2 + 2 s

+ 0

So, the MATLAB code and results will be: b = [ 2 3 ] a = [ 1 3 4 2 0 ]

[r,p,k] = residue(b,a) r =

-0.2500 + 0.7500i

-0.2500 - 0.7500i

-1.0000

1.5000 p =

-1.0000 + 1.0000i

-1.0000 - 1.0000i

-1.0000

0 k =

[] so:

( )

( )

=

− s

+

− − + i ) i

+

− s

− − − i ) i

= −

+ s

1 s

+ (

1

− i

) i

− s

+ (

+

1

+ ) i

− i s

1

+

1

+

1.5

s

+

1.5

s

(0)

Laplace Transforms - 43 - December 22, 2008

Colorado School of Mines CHEN403

Inversion of Laplace Transforms.

The standard version of MATLAB will not directly calculate

Laplace transforms and inverse Laplace transforms. These can be obtained by matching forms in tables of Laplace transforms. However, the capabilities of doing Laplace transforms is part of the MATLAB’s extended symbolic package. The key functions here are laplace and ilaplace . If a function is defined in terms of the variable t , then laplace will determine the Laplace transform; if a function is defined in terms of the variable s , then ilaplace will determine the inverse Laplace transform. So, for the first example in this section:

=

( )

( )

=

( +

1

)( s s

+

+

6

2

)( s

+

3

) the following MATLAB code will perform the inverse Laplace transform:

>> f = sym( 'f' )

>> s = sym( 's' )

>> f = (s+6)/s/(s+1)/(s+2)/(s+3)

>> ilaplace( f ) ans =

1-5/2*exp(-t)+2*exp(-2*t)-1/2*exp(-3*t) and the result will be:

5

2 e

− t +

2 e

− 2 t −

1

2 e

3 t

.

Microsoft Excel

Excel can be used to perform the final calculations and create plots, but these capabilities will not be addressed here. Without customization Excel has limited capabilities to break apart Laplace functions into partial fractions and invert to the time domain. Excel does have little-known capabilities to solve systems of simultaneous linear equations using matrix algebra – in this way Excel can be used to determine the coefficients in a partial fraction expansion.

Let’s look at the example:

Laplace Transforms - 44 - December 22, 2008

Colorado School of Mines CHEN403

= s

+

6

( +

1

)( s

+

2

)( s

+

3

)

=

A s

+

( s

B

+

1

) ( s

C

+

2

) ( s

D

+

3

)

.

By collecting terms, the following system of equations can be developed: s

3

: s

2

: s

1

: s

0

:

0

= + + +

=

=

=

A

A

+

A

5

+

B

6

+

B

4

+

D

C

3 C

+

3

+

D

2 D

We could think of this of equations in terms of a coefficient matrix M , a right-hand side vector b , and a solution vector x such that:

Mx

= b

1

6

11 6 3 2

6

1 1 1

5 4 3

0 0 0

A

B

0

0

C 1

    

D 6

.

Symbolically, the solution vector x is easily found by the operation: x

=

M b

A

B

C

  

D

1

6

1 1 1

5 4 3

11 6 3 2

− 1

0

  

1

6 0 0 0

  

6

.

The troublesome aspect of finding the coefficients in this way is that finding the inverse of the 4

×

4 matrix is not a trivial operation. However, this system of equations can be easily solved in Excel using the built-in matrix manipulation functions MINVERSE (to find the inverse of the coefficient matrix M

− 1

) and MMULT (to multiply the inverse coefficient matrix and the right-hand side vector, M b ). The following is how this could look in a spreadsheet. One key thing to remember is that these functions are array functions, so the total number of cells must be highlighted before entering the function and the function is entered not by hitting <Enter> but rather <Ctrl>-<Shift>-<Enter> .

Laplace Transforms - 45 - December 22, 2008

Colorado School of Mines CHEN403

1

6

11

6

Input coefficients (with yellow background):

6

0

1

5

1

4

3

0

1

3

2

0

A

B

C

D

=

1

6

0

0

A

B

C

D

Solution:

=

0

0.5

-4

4.5

Use of MINVERSE function

4.04E-17 -2E-17 0.166667

-0.5

0.5

-0.5

2

-1.5

-1

0.5

0.5

-0.16667

0

0

1

6

A

B

C

D

=

1

-2.5

2

-0.5

<-- Use of MMULT function

Note that the coefficients for the expansion are the same as had been found previously:

=

(

+ 1

)( s s

+

+

6

2

)( s

+ 3

)

= −

2.5

+

2

0.5

s s

+ 1 s

+ 2 s

+ 3

.

The capabilities of Excel can be extended by using custom code written in Visual Basic for

Applications (VBA) or some other higher level programming language. The spreadsheet used in the class that can find the roots of the denominator’s polynomial and then determine the partial fractions’ coefficients contains special routines written in VBA. The roots of the denominator are determined using the QR eigenvalue solution technique to determine all of the roots simultaneously (whether they are real or not) & then determine the coefficients of the partial fraction using the Heaviside method. The spreadsheet as written is not very accurate when there are repeated roots but can be useful in other cases.

The spreadsheet is set up to work with a Laplace & partial fraction expressions in the form: j

M ∑

= 0 a s j j j

N ∑

= 0 j

=

N ∑ j

=

0

A j

+

B j j

where M

<

N and the r roots may occur as complex conjugates. j

The first sample problem must be specified in the non-factored form:

= s

+

6

( +

1

)( s

+

2

)( s

+

3

)

= s

+

6 s

4 +

6 s

3 +

11 s

2 +

6 s

+

0

.

Laplace Transforms - 46 - December 22, 2008

Colorado School of Mines CHEN403

The input & results from the spreadsheet is as shown below. Note that the constant in the denominator’s polynomial is zero. Further note that it is obvious that one of the roots should be zero, but because of numerical inaccuracies it appears to be 2

×

10 -18 . If we use the a

6 a

7 a

8 a

9 a

2 a

3 a

4 a

5 actual value then the solution will be:

= s 4 s

+

6

+

6 s 3 +

11 s 2 +

6

= − s s

0.5

+

3

+ s

2

+

2

− s

2.5

+

1

+

1 s

. a

0 a

1

Coefficients

Numerator Denominator

6 b

0

1 b

1

0

6 r

1

Real

Denominator

Roots

Imaginary

-3 0

Special b

6 b

7 b

8 b

9 b

10 b

2 b

3 b

4 b

5

11

6

1 r

6 r

7 r

8 r

9 r

10 r

2 r

3 r

4 r

5

-2

-1

1.84459E-18

#N/A

#N/A

#N/A

#N/A

#N/A

#N/A

#N/A

#N/A

#N/A

#N/A

#N/A

#N/A

0

0

0 #N/A

#N/A

#N/A

#N/A

#N/A

#N/A

A

1

A

6

A

7

A

8

A

9

A

10

A

2

A

3

A

4

A

5

Numerator

Constants

Real Imaginary

#N/A

#N/A

-0.5

2

-2.5

1

#N/A

#N/A

-0

0

-0

0

#N/A

#N/A

#N/A

#N/A

#N/A

#N/A

#N/A

#N/A

The spreadsheet is not set up to properly handle repeated roots. The following shows the results when the repeated root problem:

=

3 s

+

2

( +

1

) ( s

+

2

)

= s

4

3 s

+

2

+

4 s

3 +

5 s

2 +

2 s

+

0 is specified. Because of numerical inaccuracies the repeated root appears to be complex conjugate roots. The expression can be expanded in such a way as to use the combination of the apparent complex conjugate terms:

=

3 s

+

2

( +

1

) ( s

+

2

)

=

= s s

4

2

+

3 s

+

2

+

4 s

3 +

5 s

2 +

2 s

+

0

2

+ s

2 + s

2 s

2

+

1

+

1 s

Coefficients a

3 a

4 a

5 a

6 a

7 a

8 a

9

Numerator a

0 a

1 a

2

2

Denominator b

0

0

3 b

1 b

2

2

5

4 b

3 b

4 b

5 b

6 b

7

1 b

8 b

9 b

10 r

1 r

2 r

3 r

4 r

5 r

6 r

7 r

8 r

9 r

10

Real

Denominator

-2

Roots

Imaginary Special?

0

-1 -3.46E-08 CONJUGATE

-1 3.459E-08

-9.4E-17 0

#N/A #N/A

#N/A

#N/A

#N/A

#N/A

#N/A

#N/A

#N/A

#N/A

#N/A

#N/A

#N/A

#N/A

#N/A

#N/A

#N/A

#N/A

A

1

A

2

A

3

A

4

A

5

A

6

A

7

A

8

A

9

A

10

Numerator

Constants

Real

2

Imaginary

0

-1.5

14453225

-1.5 -14453225

1 0

#N/A #N/A

#N/A

#N/A

#N/A

#N/A

#N/A

#N/A

#N/A

#N/A

#N/A

#N/A

Quadratic from complex conjugates

(A s + B)/(s

2

+ C s + D)

A B C D

#N/A

#N/A

#N/A

#N/A

#N/A

#N/A

-3

#N/A

#N/A

#N/A

#N/A

#N/A

#N/A

-2

#N/A

#N/A

#N/A

#N/A

#N/A

#N/A

2

#N/A

#N/A

#N/A

#N/A

#N/A

#N/A

1

Laplace Transforms - 47 - December 22, 2008

Colorado School of Mines CHEN403

We can finish this “by hand” noting that the quadratic denominator can be factored and manipulated as:

=

2 s

+

2

+ s

2 + s

2 s

2

+

1

+ = s s

2

+

2

= s

2

+

2

+

+

( s s

+

1

)

2

2

+

1 s

(

3 s

(

+ s

+

1

)

1

2

)

+

( s

+

1

1

) 2

+

1 s

= s

2

+

2

3 s

+

1

+

1

( s

+

1

) 2

+

1 s and this is the same result that we get from either Mathematica or MATLAB.

Now let’s look at the example with the complex conjugate roots:

=

( +

1

)

2 s

+

3

( s

2 +

2 s

+

2

)

=

2 s

+

3 s

4 +

3 s

3 +

4 s

2 +

2 s

+

0

The following is the spreadsheet with the input and the results. The factored form can be expressed either in one term in the quadratic form or as the fully factored form involving complex conjugate roots:

=

(

+

1

)

2 s

+

3

( s

2 +

2 s

+

2

)

=

2 s

+

3 s 4 +

3 s 3 +

4 s 2 +

2 s

+

0

=

− s

(

− i

) i

+

− s

(

+ i

) i

− s

1

+

1

+

1.5

s

=

2

0.5

+

2 s

+

2

− s s s s

1

+

1

+

1.5

s which is the same result as obtained with MATLAB.

Coefficients a

7 a

8 a

9 a

3 a

4 a

5 a

6

Numerator a

0 a

1 a

2

3

Denominator b

0

0

2 b

1 b

2

2

4

3 b

3 b

4 b

5 b

6

1 b

7 b

8 b

9 b

10 r

7 r

8 r

9 r

10 r

3 r

4 r

5 r

6 r

1 r

2

Real

Denominator

Roots

Imaginary Special?

-1

-1

-1 CONJUGATE

1

-1

-1.2E-17

#N/A

#N/A

#N/A

#N/A

#N/A

#N/A

#N/A

#N/A

#N/A

#N/A

#N/A

#N/A

0

0 #N/A

#N/A

#N/A

#N/A

#N/A

#N/A

#N/A

A

7

A

8

A

9

A

10

A

1

A

2

A

3

A

4

A

5

A

6

Numerator

Constants

Real Imaginary

-0.25

-0.25

-0.75

0.75

-1

1.5

-0

0

#N/A

#N/A

#N/A

#N/A

#N/A

#N/A

#N/A

#N/A

#N/A

#N/A

#N/A

#N/A

Quadratic from complex conjugates

(A s + B)/(s

2

+ C s + D)

A B C D

-0.5

-2 2 2

#N/A

#N/A

#N/A

#N/A

#N/A

#N/A

#N/A

#N/A

#N/A

#N/A

#N/A

#N/A

#N/A

#N/A

#N/A

#N/A

#N/A

#N/A

#N/A

#N/A

#N/A

#N/A

#N/A

#N/A

#N/A

Laplace Transforms - 48 - December 22, 2008

Colorado School of Mines CHEN403

POLYMATH

POLYMATH can be used in a similar manner as Excel, to determine the coefficients in a partial fraction expansion. The use of POLYMATH is a little more straightforward in that once one has specified the set of linear equations POLYMATH will do the solution with little additional user knowledge.

Again, the first example in this section was:

= s

+

6

( +

1

)( s

+

2

)( s

+

3

)

=

A s

+

( s

B

+

1

) ( s

C

+

2

) ( s

D

+

3

) and the following system of equations were developed by collecting terms: s

3

: s

2

: s

1

: s

0

:

0

= + + +

=

=

=

A

A

+

A

5

+

B

6

+

B

4

+

D

C

3 C

+

3

+

D

2 D

The following screen shot shows how this system of equations can be defined after pressing the LEQ button. The solution is obtained by pressing the arrow button.

Laplace Transforms - 49 - December 22, 2008

Colorado School of Mines CHEN403

Laplace Transforms - 50 - December 22, 2008

Download