LAB-09 EE-311 Signal and Systems PDF
LAB-09 EE-311 Signal and Systems PDF
LAB EXPERIMENT # 09
Implementation of Laplace Transform in MATLAB
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.
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))
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)
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
Output:
(a) r = [-
13 7] p [-2 -
1] k = [2]
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:
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