0% found this document useful (0 votes)
116 views5 pages

LAB-09 EE-311 Signal and Systems PDF

This document contains instructions for a lab experiment on implementing Laplace transforms in MATLAB. It begins with an objective to familiarize students with Laplace transforms. It then provides examples of using the laplace and ilaplace commands to find the Laplace transform and inverse Laplace transform of functions. It gives tasks of finding the inverse Laplace transform of a given function and the Laplace transform of several other functions.

Uploaded by

Awais Ali
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
116 views5 pages

LAB-09 EE-311 Signal and Systems PDF

This document contains instructions for a lab experiment on implementing Laplace transforms in MATLAB. It begins with an objective to familiarize students with Laplace transforms. It then provides examples of using the laplace and ilaplace commands to find the Laplace transform and inverse Laplace transform of functions. It gives tasks of finding the inverse Laplace transform of a given function and the Laplace transform of several other functions.

Uploaded by

Awais Ali
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

The Islamia University of Bahawalpur

University College of Engineering &Technology


Department of Electronic Engineering
LAB MANUAL SIGNALS AND SYSTEMS EE-311 5thSemester

LAB EXPERIMENT # 09
Implementation of Laplace Transform in MATLAB

Student Name: Abdul Rehman Roll No: 16ES08

Lab Instructor Signatures: Date:

OBJECTIVE:
Familiarization with Laplace transforms.

1. Laplace Transform:
Laplace transform ( is a linear operator on a function with real argument ,
which transforms it to a function with a complex argument . In signals and
systems, the real argument usually represents time domain , and complex argument
represents frequency domain.

MATLAB uses the command “laplace” to find the Laplace transform of a function, and
“ilaplace” for the inverse Laplace.

Example: Let f(t)= -1.25+3.5te-2t+1.25e-2t


Code:
>>syms t s
>> f=-1.25+3.5*t*exp(-2*t)+1.25*exp(-2*t);
>> F=laplace(f,t,s)

Output:
F = -5/4/s+7/2/(s+2)^2+5/4/(s+2)

>>simplify(F)
ans = (s-5)/s/(s+2)^2
>>pretty(ans)
s - 5 ------
---- s (s +
2)2
Alternativ
ely, we
can also
write the
function
f(t)
directly as
part of the
laplace
command:

>>F2=laplace(-1.25+3.5*t*exp(-2*t)+1.25*exp(-2*t))

This corresponds to F(s),

2. Inverse Laplace Transform:


The command will be ilaplace. Also needs to define the symbols t and s.

Example: Lets calculate the inverse of the previous function F(s),

Code:
>>syms t s
>> F=(s-5)/(s*(s+2)^2);
>>ilaplace(F)
ans=
-5/4+(7/2*t+5/4)*exp(-2*t)
>>simplify(ans)
>>pretty(ans)

Output:
- 5/4 + 7/2 t exp(-2 t) + 5/4 exp(-2 t)

Which corresponds to f(t)

f(t)= -1.25+3.5te-2t+1.25e-2t
Alternatively,
>>ilaplace((s-5)/(s*(s+2)^2))

Example: Using the MATLAB residue command, determine the inverse Laplace transform of
following

>>num = [2 0 5]; den = [1 3 2];


>> [r, p, k] = residue(num,den);
>>disp([ '(a) r = [ ',num2str(r. ', ' %0.5g '), '] ']);...
>>disp([ ' p = [ ',num2str(p. ', ' %0.5g '), '] ']);...
>>disp([ ' k = [ ',num2str(k. ', ' %0.5g '), '] ']);...

Output:
(a) r = [-
13 7] p [-2 -
1] k = [2]

Therefore, Xa(s) = −13/(s + 2) + 7/(s + 1)+2 and xa(t) = (−13e−2t+7e−t)u(t)+2δ(t).

>>num = [2 7 4]; den = [conv([1 1],conv([1 2], [1 2]))]); >>


[r, p, k] = residue(num,den);
>>disp([ '(b) r = [ ',num2str(r. ', ' %0.5g '), '] ']);...
>>disp([ ' p = [ ',num2str(p. ', ' %0.5g '), '] ']);...
>>disp([ ' k = [ ',num2str(k. ', ' %0.5g '), '] ']);...

Output:
(b) r = [3
2 -1] p [-2 -2 -
1] k = [ ]

Therefore, Xb(s) = 3/(s + 2) + 2/(s + 2)2− 1/(s + 1) and xb(t) = (3e−2t+ 2te−2t−e−t)u(t).

Tasks:

1) Find the Inverse Laplace of

ANS:
syms s
F
=ilaplace((10*(s+2)/(s*(s^2+4*s+5))
))

OUTPUT:
F = 4 - 4*exp(-2*t)*(cos(t) - sin(t)/2)
2) Find the Laplace transform of following functions ?
ANSWERS:
1:
syms t
F=laplace(heaviside(t))
OUTPUT:
F = 1/s
2:
syms t
F=laplace(dirac(t))
OUTPUT
F=
1
3:
syms t a
F=laplace(exp(-a*t)*heaviside(t))
OUTPUT:
F=
1/(a + s)
4:
syms t w
F=laplace(cos(w*t)*heaviside(t))
OUTPUT:
F=
s/(s^2 + w^2)
5:
syms t w
F=
laplace(sin(w*t)*heaviside(t))
OUTPUT:
F = w/(s^2 + w^2)
6:
syms t
F=
laplace((t^3+3*t^2+4*t+3)*heavisid
e(t))
OUTPUT
F=
(4*((3*s)/4 + 1))/s^2 + 6/s^3 + 6/s^4

You might also like