You are on page 1of 19

Lab #8:LAPLACE TRANSFORM SSUET/QR/114

LAB #8

LAPLACE TRANSFORM
Theory

The Laplace Transform of a signal f (t) is shown in eq. 13.1 and it is the
generalization of the continuous time Fourier Transform (CTFT) that is useful
for studying continuous time signals and systems.

(13.1)

Syntax: laplace(f, t, s)

laplace(f, t, s) computes the Laplace transform of the expression f = f(t) with


respect to the variable t at the point s.

If s=jω, then the Laplace Transform reduces to CTFT. The Laplace Transform
can also be represented as a ratio of polynomials in s, which is also known as
rational transforms. Rational Transforms can be completely determined by the
roots of polynomials N(s) and D(s), known as zeros and poles respectively.
X (s) = N (s)
D (s) (13.2)

POLE-ZERO DIAGRAM:

The Pole-Zero diagram displays the poles and zeros of the rational transform by
placing an “x” at each pole location and an “o” at each zero location in the
complex s-plane. In MATLAB, Poles and Zeros can be found out by using
roots command and the pole and zero diagram can be plotted by using pzmap
command.

CE -302:Signals and Systems 1


Lab #8:LAPLACE TRANSFORM SSUET/QR/114

Fig. 13.1: Pole Zero representation on complex plane

RC Filter
One of the simplest lowpass filters is realized by using the RC circuit.
This one-pole system has transfer function HRC(s) = (RCs+1)-1 and magnitude
response |HRC(jω)| = |jωRC+1)-1| = 1/√ 1+ ( RCω)2

Program

>> omega_c=2*pi*3000;
>> C= 1e-9;
>> R=1/sqrt(C^2*omega_c^2)
CE -302:Signals and Systems 2
Lab #8:LAPLACE TRANSFORM SSUET/QR/114

R = 5.3052e+004
The root of this first-order RC filter is directly related to the cutoff frequency, λ
= -1/RC= -18,850= -ω c

To evaluate the RC filter performance ,the magnitude response is plotted over


the mostly audible frequency range (0 ≤ f ≤ 20 kHz).

>> f=linspace(0,20000,200);
>> B=1;A=[R*C 1];Hmag_RC = abs(MS4P1(B,A,f*2*pi));
>> plot(f,abs(f*2*pi)<=omega_c,'k-',f,Hmag_RC,'k--');
>> xlabel('f[Hz]');ylabel('|H_{RC}(j2\pi f)|');
>> axis([0 20000 -0.05 1.05]);legend('Ideal','First-Order RC');

function [ H ] = MS4P1( B,A,omega );


%MS4P1.m : MATLAB session 4,Program 1
%Function M-file computes frequency response for LTIC system
%INPUTS: B=vector of feedforward coefficients
% A=vector of feedback coefficients
% omega = vector of frequencies [rad/s].
%OUTPUTS: H = frequency response

H=polyval(B,j*omega)./polyval(A,j*omega);
end

CE -302:Signals and Systems 3


Lab #8:LAPLACE TRANSFORM SSUET/QR/114

0.9

0.8

0.7

0.6

0.5

0.4

0.3

0.2

0.1

0
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2
4
x 10

Partial Fraction Expansions

There are a wide variety of techniques and shortcuts to compute the partial
fraction expansion of rational function F(x) = B(x)/A(x), but few are more
simple than the MATLAB residue command. The basic form of this command
is

>> [R,P,K] = residue(B,A)

To demonstrate the power of the residue command, consider finding the


partial fraction expansion of
x5 + π x5+ π
F(x) = 3 =
( x+ √ 2 ) ( x−√ 2 ) x 4−√ 8 x3 + √ 32 x−4

MATLAB makes short work of the expansion

>> [R,P,K] = residue([1 0 0 0 0 pi],[1 -sqrt(8) 0 sqrt(32) -4])


CE -302:Signals and Systems 4
Lab #8:LAPLACE TRANSFORM SSUET/QR/114

R = 7.8888 5.9713 3.1107 0.1112

P = 1.4142 1.4142 1.4142 -1.4142

K = 1.0000 2.8284

CE -302:Signals and Systems 5


LAB ACTIVITY

Task 1: Find out the zeros and poles of the following transfer functions by
using ‘roots’ command and also plot them by using ‘rlocus’ and ‘pzmap’
commands.

H=tf([1 5],[1 2 3]);


pzmap(H)
grid on
H=tf([2 5 12],[1 2 10]);
pzmap(H)
grid on
H=tf([2 5 12],[1 4 14 20]);
pzmap(H)
grid on
BY rlocus

sys=tf([1 5],[1 2 3]);


rlocus(sys)
sys=tf([2 5 12],[1 2 10]);
rlocus(sys)
sys=tf([2 5 12],[1 4 14 20]);
rlocus(sys)
Task 2: Use the ‘freqs’ function to evaluate the frequency response of a
Laplace Transform shown below:

where -20 ≤ ω ≤ 20 is the frequency vector in


radians/seconds. (Use “linespace” function to generate a vector with 200
samples).
Hint: H=freqs(b,a,w)
a=[1 2 17];
b=[1 4 104];
w=logspace(-20,20);
freqs(b,a,w)
a=[1 2 17];

b=[1 4 104];

w=linspace(-20,20);

freqs(b,a,w)
Task 3: Use “ilaplace” command to find the Inverse Laplace transforms of the
following:
syms s

F= 1/(s*(s+2)*(s+3))

F=

1/(s*(s + 2)*(s + 3))

>> ilaplace(F)

ans =

exp(-3*t)/3 - exp(-2*t)/2 + 1/6

syms s

F=(10/((s+1)^2*(s+3)))

F=

10/((s + 1)^2*(s + 3))

>> ilaplace(F)

ans =

(5*exp(-3*t))/2 - (5*exp(-t))/2 + 5*t*exp(-t)

syms s

F=(((2)*(s+1))/(s*(s^2+s+2)))

F=

(2*s + 2)/(s*(s^2 + s + 2))

ilaplace(F)

ans =
1 - exp(-t/2)*(cos((7^(1/2)*t)/2) - (3*7^(1/2)*sin((7^(1/2)*t)/2))/7)

Task 4: Find out the laplace transform of the following by using the command
“laplace”:
a) Sinwt
b) f(t) = -1.25+3.5te(-2t)+ 1.25e(-t)

You might also like