You are on page 1of 25

ME 413: System Dynamics & Control

LAPLACE
LAPLACE TRANSFORM

Name:

__________________________________

ID #:

__________________________________

Section #:

__________________________________

Due Date:

__________________________________

Instructor

__________________________________

ME 413: System Dynamics and Control Lab Manual

LAPLACE TRANSFORM

OBJECTIVES

1. To use MATLAB in solving problems of Laplace Transform.


2. To solve Initial Value Problem (IVP).
3. To use symbolic MATLAB in solving problems of Laplace Transform.

WHY USE LAPLACE TRANSFORM?

Laplace transform is a powerful tool formulated to solve a wide variety of


Initial-Value Problems (IVP). The strategy is to transform the difficult
differential equations into simple algebraic problems where solutions can be easily
obtained. One then applies the Inverse Laplace transform to retrieve the
solutions of the original problems. This can be illustrated as follows:

Figure 1

Laplace Transform

Steps involved in solving Initial Value Problem (IVP) using Laplace


Transform

ME 413: System Dynamics and Control Lab Manual

PART 1: SOLVED PROBLEMS

Example 1: Distinct Real Poles

Find the inverse Laplace transform of

G (s ) =

num
den

s +5
3

s + 6s 2 + 11s + 6

(1)

Solution:

In Eq. (1) num and den denotes respectively, the numerator and denominator of
G (s ) .

G (s ) = 0 . For
num = s + 5 = 0 s = 5 . Therefore s = 5

Zeros:

values

Poles:

values of

of

G (s ) = 0

or

for

which

for which

G (s )

G( s) = 0
is the zero of G (s ) .
instance,

is undefined (the denominator of

den = s 3 + 6 s 2 + 11s + 6 = 0 ).

The roots of the denominator

can be found by MATLAB.

>> den=[1
6
>> roots(den)
ans=

-3.000
-2.000
-1.000

11

6];

The above poles are real and distinct, therefore

G (s ) =
where the residues
methods:

G (s )

can be written in the form

num
s +5
A
B
C
=
=
+
+
den (s + 3)(s + 2 )(s + 1) (s + 3) (s + 2 ) (s + 1)

A, B

and

(2)

can be determined by any of the following

Method 1: Direct calculations of the residues


A=

B=

Laplace Transform

(s + 3)(s + 5)
(s + 3)(s + 2)(s + 1)
(s + 2)(s + 5)
(s + 3)(s + 2)(s + 1)

( 3 + 5) = (2) = 1
( 3 + 2 )( 3 + 1) ( 1)( 2)

( 2 + 5) = (3) = 3
( 2 + 3)( 2 + 1) (1)( 1)

s =3

s = 2

ME 413: System Dynamics and Control Lab Manual

C=

Substituting

A, B

and

(s + 1)(s + 5)
(s + 3)(s + 2)(s + 1)

=
s =1

( 1 + 5) = (4) = 2
( 1 + 3)( 1 + 2) (2)(1)

into Eq. (2) gives

G( s) =
Therefore, the expression of

1
3
2

+
( s + 3 ) ( s + 2 ) ( s + 1)

(3)

g (t ) is given by
g (t ) =

G ( s ) = e3t 3e2t + 2e t

(4)

Method 2: Use of MATLAB residue function


The use of MATLAB makes it easier to calculate the residues
(1) can be written in the form

g (t ) =
where ri , pi and

k (s)

L [G (s )] =

A, B

and

. Equation

r
r1
r
+ 2 + 3 + k (s )
s p1 s p2 s p3

(5)

are the residues, poles and direct terms of the partial fraction

expansion of two polynomials

num ( s )

and

den ( s ) .

Notice that

ri , pi

and

k (s)

can be found by using the MATLAB command [r,p,k] = residue(num,den) as


shown below
>> num=[1
5];
>> den=[1
6
11
6];
>> [r,p,k] = residue(num,den)
r=

1.0000
-3.0000
2.0000

p=

-3.0000
-2.0000
-1.0000

k=[]
Notice that k = [ ] means that

k (s )

does not exist. Substituting the above values of

ri , pi and k (s ) into Eq. (5) gives

G (s ) =

Laplace Transform

1
3
2

+
s + 3 s + 2 s +1

ME 413: System Dynamics and Control Lab Manual

which is similar to Eq. (3).

Method 3: Use of symbolic MATLAB toolbox


In order to run the symbolic MATLAB toolbox, one needs to generate the syms
function. syms x creates the symbolic variable with name 'x'.
>> syms t s
% creates the symbolic variables t and s.
>> G = (s+5)/(s^3+6*s^2+11*s+6)
>> g =ilaplace (g)
G
g=
exp(-3*t)-3*exp(-2*t)+2*exp(-t)
The above expression can be written in an elegant form by using the function pretty
as shown below
>> pretty(g)
exp(-3 t) - 3 exp(-2 t) + 2 exp(-t)
which is similar the solution obtained by the previous methods.

Example 2: Repeated Real Poles

Find the inverse Laplace transform of

G (s ) =

num
1
= 2
den s (s + 2 )2

(1)

Solution:

Zeros:
Poles:

None
2

s =0

(s + 2)

s = 0, 0
2

s = 0 is a pole of multiplicity 2

= 0 s = 2, 2 s = 2

is a pole of multiplicity 2

Unlike the previous case, for repeated poles the expression of

G(s)

can be written in

partial fraction form as

G (s ) =

where the residues

num
1
A A2
B1
B2
= 2
= 1+ 2 +
+
2
den s (s + 2 )
s
s
(s + 2 ) (s + 2 ) 2

(2)

A i and B i . can be determined by any of the following methods:

Method 1: Direct Calculation of the Residues


Laplace Transform

ME 413: System Dynamics and Control Lab Manual

A2 =

s2
s 2 (s + 2 )

2
s =0

( 0 + 2)

1
4

0 (s + 2 ) 2 (s + 2 )
d
s2
d 1
1
=
A1 = 2
=
=
2
4
2
ds s (s + 2 )
ds (s + 2 )
4
(s + 2 )
s =0
s =0
s =0

B2 =

(s + 2 )

s (s + 2 )
2

( 2 )

1
4

s =2

d (s + 2 )
B2 =
ds s 2 (s + 2 ) 2

Substituting the values of

G (s ) =

The expression of

d 1
0 s 2 2s
1

= 2
=
=
2
2

ds s s =2
(s ) s =2 4
s =2
A i and B i into Eq. (2) gives

num
1
1/ 4 1/ 4
1/ 4
1/ 4
= 2
=
+ 2 +
+
2
den s (s + 2 )
s
s
(s + 2 ) (s + 2 ) 2

(3)

g (t ) is given by

1 1
1
1
g (t ) = + t + e 2t + te 2t
4 4
4
4

(4)

Method 2: Use of MATLAB residue function


For repeated poles, the residues

A i and B i may be calculated, using the following

MATLAB command
resi2(num,den,pole,n,k)

returns the residue of a repeated pole of order n and


the kth power denominator of [1-pole], where num
and den represent the original polynomial ratio
num/den.

This can be illustrated as


>>
>>
>>
>>
%
>>

num = [1];
a = conv([1 0], [1
b = conv([1 2], [1
den = conv(a, b);

0]);
2]);

A1 = resi2(num,den,0,2,1)

>> A2 = resi2(num,den,0,2,2)
>> B1 = resi2(num,den,-2,2,1)
>> B2 = resi2(num,den,-2,2,2)

Laplace Transform

% the expression of s2
% the expression of (s+2)2
% the expression of s2 (s+2)2

A1
gives A2
gives B1
gives B2

gives

= 0.2500,
= 0.2500,
= 0.2500,
= 0.2500,
5

ME 413: System Dynamics and Control Lab Manual

Substituting the above values into Eq. (2), one can get

G( s) =

num
1
1/ 4
1/ 4
1/ 4 1/ 4
=
+ 2 +
+
= 2
2
(s + 2) (s + 2)2
den
s
s
s (s + 2)

which is similar to Eq. (3).

Remark: For repeated poles, the command [r,p,k] = residue(num,den) can be


applied and provides the same residues and poles. However, it does not
arrange them in the appropriate order and this may confuse the student.

Method 3: Use of Symbolic MATLAB Toolbox


>> syms t s
>> G = 1 /((s^2)*(s+2)^2)
>> g=ilaplace (G)
g=
exp(-t)*(1/2*t*cosh(t)-1/2*sinh(t))
knowing that

sinh(t ) =

et e t
2

and

cosh(t ) =

et + e t
2

the above expression of g can be written as

1 2t 1 2t 1
e t e t + e t e t e t 1
g (t ) =

t
= t + te e
2
2
2 4
4
4
4
which is similar to Eq. (4).

Example 3: Complex Conjugate Poles

Find the inverse Laplace transform of

G(s) =
where

a and are real positive.

Solution:

The expression of

Laplace Transform

Bs + C
s + 2as + a 2 + 2
2

(1)

G ( s ) can be written as
6

ME 413: System Dynamics and Control Lab Manual

G (s) =

Bs + C
Bs + C
=
2
2
( s + 2as + a ) + ( s + a )2 + 2
2

(2)

It is clear that the denominator is the sum of two complete squares. The roots of
the denominator (poles) are:

s = a + j
1
_
s2 = a + j

2
(s + a) + 2 = 0

(3)

j = 1 and s1 and s2 are complex conjugates. The location of the poles


s1 and s2 is shown in Figure 2.

where

s1

s2

Figure 2 Complex conjugate roots in the s-plane

Method 1: Completing the Square


The expression of

G ( s ) can be written in a form that can be easily recognized using

Laplace Transform tables. Therefore,

G (s ) =

G ( s ) is written as

Bs + C
2

B ( s + a ) + C Ba
2

(s + a ) +
(s + a ) + 2
B (s + a )
C Ba
=
+
2
( s + a ) + 2 ( s + a )2 + 2
=

B (s + a )

(s + a )

+ 2

C Ba


2
( s + a ) + 2

Using entries 20 & 21 of Table 2-1, page 19 Textbook,

g (t ) = Be at cos (t ) +

Laplace Transform

(4)

g (t ) is given by

(C Ba ) e at sin t
( )

(5)

ME 413: System Dynamics and Control Lab Manual

Method 2: Partial Fraction Expansion


Since

s1 = a + j and s2 = a j are the poles of G ( s ) , therefore G ( s ) can be

written as

G (s ) =
where

and

Bs + C

( s + a + j )( s + a j )

s + a + j

(6)

s + a j

can be determined in a similar manner to that of Example #1.

(s + a + j)(Bs + C )
B ( a j) + C
(C Ba )
B
=
=
= + j

2
(s + a + j)(s + a j) s = a j ( a j + a j) 2

(7)

(s + a j)(Bs + C )
B( a + j) + C
(C Ba )
B
=
=
= j

2
(s + a + j)(s + a j) s = a + j ( a + j + a + j) 2

(8)

and

Notice that

and

are complex conjugate. Substituting

gives

and

into Eq. (6)

(C Ba ) B j (C Ba )
B
+ j
2 + 2
2
G(s) = 2
s + a + j
s + a j

(9)

Taking the inverse Laplace transform of Eq. (9) gives

B
(C Ba ) e ( a j ) t + B j (C Ba ) e ( a + j ) t
g (t ) = + j

2
2
2
2
Arranging terms, the above expression can be written in the form

g (t ) =

(C Ba ) e at e jt e jt
B at jt jt
e
e
+
e

2
2

Multiplying the second term of the above equation by

j and dividing by j , results in

the following expression

B
g (t ) = e at
2

e jt + e jt
(C Ba ) e at

jj
2
2

e jt e jt

2j

(10)

Using Eulers Formulae

Laplace Transform

ME 413: System Dynamics and Control Lab Manual

cos t =
the expression of

e jt + e jt
e jt e jt
, sin t =
2
2j

(11)

g (t ) is written as:
g (t ) = Be at cos t +

(C Ba ) e at sin t

(12)

which is similar to equation (5).

Example 4: Initial Value Problem (IVP)

Solve the following Initial Value Problem (IVP)

y + 3 y + 2 y = f (t ),
where

y (0) = 0, y (0) = 0

f (t )

(1)

f (t ) is a function given by the graph

shown in Fig. 3.

Solution:

Step 1: The expression of f (t ) is given by

t
1,
f (t ) =
0,

0 t <1

t 1
Figure 3 Graph of

f (t ) .

and its Laplace transform is


st
L {f( t )} = F (s ) = f( t )e dt = 1e dt = e
s
0
0
1

st

Alternatively,

st

=
0

(2)

f (t ) and F ( s ) can be given by using the step function u (t ) , that is


u (t )

f (t )

u ( t 1)

t
0

Figure 4
Laplace Transform

e s 1 1
= (1 e s )
s
s

Construction of the input

t
1

f (t ) with the aid of step inputs.


9

ME 413: System Dynamics and Control Lab Manual

Therefore,

f (t ) = u (t ) u (t 1)

(3)

as shown in figure 4. Laplace transform of the previous expression is given by

F (s) =

1 es 1

= 1 e s
s
s
s

Step 2: Remember:
Zero Initial Conditions

Non-zero Initial Conditions

L
L
L

y (0) = 0, y (0) = 0

L
L
L

{ y} = s 2Y (s ) sy (0) y (0)


{ y } = sY (s ) y (0)
{ y} = Y ( s)

{ y} = s 2 Y ( s)
{ y} = sY ( s)
{ y} = Y ( s)

Taking Laplace transform of both sides of equation (1) gives:

(s

+ 3s + 2 ) Y ( s ) =

1
1 e s )
(
s

Step 3: Solve for Y ( s )

Y (s) =

1
1 e s ) = H ( s ) (1 e s )
(
2
s ( s + 3s + 2 )

where

H ( s) =

1/ 2
1
1/ 2
= +
+
=

+
s
s +1 s + 2
s ( s + 3s + 2 ) s s + 1 s + 2
2

Hence

h(t ) =

1
1
e t + e 2t
2
2

Therefore, using the first expression

L [ h (t )u (t ) ] = e s H (s ) L
For this example

Laplace Transform

=1

e s H (s ) = h (t )u (t ) , 0

and the expression of

e s H ( s )

is given by

10

ME 413: System Dynamics and Control Lab Manual

e H ( s ) = h(t 1)u (t 1) = 1 ( t 1) 1 2(t 1)


+ e
2 e
2

0 t <1

t >1

Step 4: The solution y ( t ) is therefore given by

y (t ) = L

1 (t 1) 1 2(t 1)
0 t <1
e
+ e
2
[Y (s )] = f (t ) f (t 1)u (t 1) = 2
K e t K e 2t
t >1
2
1

where K 1 = e 1 and K 2 = (e 2 1) / 2 .

Laplace Transform

11

ME 413: System Dynamics and Control Lab Manual

PART 2: ASSIGNMENT

Problem 1: Real and Distinct Poles

Consider the following transfer function (Instructors are required to fill in the
blanks such that the poles are real and distinct)

G(s) =

num ( s )
den ( s )

s +
s + s2 + s +
3

1. With the help of MATLAB, find the poles of


2. Write

G(s)

G(s) .

in partial fractions

num ( s )

A
B
C
+
+
den ( s ) s + p1 s + p2 s + p3
Where pi are the poles of G ( s ) and A , B and C are its residues.
By hand calculations, find A , B and C .
G( s) =

3.
4. Check your finding by using the MATLAB residue command (See help
residue) to find A , B and C .
5. Using the results of part (3) above, find

g (t ) = L

[G ( s )] .

6. Use the symbolic MATLAB command ilaplace (See help ilaplace) to


find

g (t ) = L

[G( s )] and compare your finding with (5).

Laplace Transform

12

ME 413: System Dynamics and Control Lab Manual

Laplace Transform

13

ME 413: System Dynamics and Control Lab Manual

Laplace Transform

14

ME 413: System Dynamics and Control Lab Manual

Problem 2: Real and Repeated Poles

Consider the following transfer function (Instructors are required to fill in the
blanks such that the poles are real and distinct)

G(s) =

num ( s )
den ( s )

1. Find the poles and zeros of


2. Write

G(s)

s +
s 2 ( s + )

G(s) .

in partial fractions

3. Find the residues of

G ( s ) by hand calculations.

4. Check your finding by using the MATLAB residue command resi2 (See
help resi2) to find the partial fraction expansion of G ( s ) .
5. Using the results of part (3) above, find

g (t ) = L

[G ( s )] .

6. Use the symbolic MATLAB command ilaplace (See help ilaplace), find

g (t ) = L

[G ( s )] and compare your finding with (5).

Laplace Transform

15

ME 413: System Dynamics and Control Lab Manual

Laplace Transform

16

ME 413: System Dynamics and Control Lab Manual

Laplace Transform

17

ME 413: System Dynamics and Control Lab Manual

Laplace Transform

18

ME 413: System Dynamics and Control Lab Manual

Problem 3: Complex Conjugate Poles

Consider the following transfer function (Instructors are required to fill in the
blanks such that the poles are complex conjugates)

G( s) =

num ( s )
den ( s )

s +
s2 + s +

1. Use the method of completing the square to find


2. Write the partial fraction of

g (t ) = L

G ( s ) and then find g ( t ) =

[G ( s )] .
1

L [G ( s )]

by using complex algebra.


3. Find the residues of G ( s ) by hand calculations.
4. Use the symbolic MATLAB command ilaplace (See help ilaplace), find

g (t ) = L

[G ( s )] and compare your finding with (2).

Laplace Transform

19

ME 413: System Dynamics and Control Lab Manual

Laplace Transform

20

ME 413: System Dynamics and Control Lab Manual

Laplace Transform

21

ME 413: System Dynamics and Control Lab Manual

Problem 4: Final Value Theorem (FVT) and Initial


Value Theorem (IVT)

Consider the following transfer function (Instructors are required to fill in the
blanks). Use the Initial-Value and Final-Value-Theorems to find g ( 0 ) and

g ( ) where

num ( s )

s2 + s +
G(s) =
=
den ( s ) s 3 + s 2 + s +

Laplace Transform

22

ME 413: System Dynamics and Control Lab Manual

Problem 5: Initial Value Problem (IVP)


(Instructors are required to fill in the blanks and to provide the shape
of the graph of

f ( t ) ).

f (t )

Solve the Initial Value Problem (IVP)

y + y + y = f (t ) ,
y ( 0 ) = , y ( 0 ) =
where

f ( t ) is shown in the graph.

t
0

Laplace Transform

23

ME 413: System Dynamics and Control Lab Manual

..

Laplace Transform

24

You might also like