Laboratory 9 - Laplace Transform

Download as pdf or txt
Download as pdf or txt
You are on page 1of 11

Laboratory 9 - Laplace Transform

Signals and Systems


Department of Computer Engineering
College of Computer and Information Sciences
King Saud University
Student Name:

Student ID:

Instructions

1. Read this document before coming to the laboratory.

2. Print this document and bring it with you to the laboratory.

3. Mobile phones are not allowed.

4. Do not copy paste the code - type it.

5. Use only the front side of the sheets.

Marking Scheme

Task Points Obtained


1 25
2 25
3 25
4 25
Total 100

1
Laboratory 9 - Laplace Transform
Contents
9.1 Laplace transform . . . . . . . . . . . . . . . . . . . . . . . . . 3
9.2 Student Task 1 - Laplace transform . . . . . . . . . . . . . . . 5
9.3 Properties of the Laplace transform - differentiation in the
time domain . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
9.4 Student Task 2 - Differentiation in the time domain . . . . . . 6
9.5 Partial fraction expansion . . . . . . . . . . . . . . . . . . . . 7
9.6 Analysis and characterization of LTI systems using the Laplace
transform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
9.6.1 Causality . . . . . . . . . . . . . . . . . . . . . . . . . 8
9.6.2 Student Task 3 - causality . . . . . . . . . . . . . . . . 10
9.6.3 Student Task 4 - stability . . . . . . . . . . . . . . . . 11

2
9.1 Laplace transform
Matlab uses the laplace and ilaplace functions to calculate the Laplace trans-
form and inverse Laplace transform in a similar way to the Fourier transform
and the inverse Fourier transform.

The usefulness of the Laplace transform can be demonstrated through the


following example.

Let us consider the signal x(t) = e2t u(t) and calculate the Fourier and Laplace
transforms using the following code

clear all
close all
syms t w
x=exp(2*t)*heaviside(t);
f=fourier(x)
l=laplace(x)

Matlab gives the following response

f = 1/(- 2 + w*1i) + fourier(exp(2*t), t, w)


l = 1/(s - 2)

This means that Matlab is unable to calculate the Fourier transform of


x(t) = e2t u(t) as it does not exist because the signal is not absolutely in-
tegrable. A system represented by x(t) = e2t u(t) would be unstable.

On the other hand, Laplace transform provides important insight into the
behavior of such unstable systems.

1
The pole zero map of the Laplace transform, X(s) = s−2 , can be specified by
using the numerator and denominator polynomials in the form of the transfer
function using the following code.

clear all
close all
n=[1];
d=[1 -2];
H=tf(n,d);
[p z]=pzmap(H)
pzmap(H);
1
Figure 1 shows the pole zero plot for X(s) = s−2
.

3
1
Figure 1: Pole zero plot for X(s) = s−2

4
9.2 Student Task 1 - Laplace transform
Task 1. Calculate and show the Laplace transform of the following sig-
nals. Write the code and results here. Plot the pole zero map of the Laplace
transform. Print and paste the figures here.

1. x(t) = 3e−2t u(t) − 2e−t u(t)

2. x(t) = e−2t u(t) + e−t (cos3t)u(t)

Note

1. When calculating the Laplace and inverse Laplace transforms in Matlab


use the following arguments

clear all
close all
syms t s
%x is your signal
l=laplace(x,s)
il=ilaplace(l,t)

2. You might need to use the collect and expand functions in Matlab.
Check their description by typing help collect and help expand in the
command window.

5
9.3 Properties of the Laplace transform - differentia-
tion in the time domain
We will now consider one of the important properties of the Laplace trans-
form. You are encouraged to try out all the properties of the Laplace trans-
form.
The differentiation in the time domain of a signal x(t) is a Laplace transform
pair of sX(s), as expressed by Equation 1.

dx(t) L
←−
−→ sX(s) (1)
dt

9.4 Student Task 2 - Differentiation in the time do-


main
Task 2. Show that the differentiation in the time domain property of the
Laplace transform, given by Equation 1, holds for x(t) = e−2t u(t). Write the
code here.

6
9.5 Partial fraction expansion
The partial fraction expansion of X(s), given in Equation 2 is calculated
using the residue function, see the following code

s2 + 2s − 1
X(s) = (2)
s3 + 6s2 + 11s + 6

clear all
close all
n=[1 2 -1]; % exressing the numerator polynomial in ...
descending powers of s
d=[1 6 11 6]; % exressing the denominator polynomial in ...
descending powers of s
[r,p,k]=residue(n,d)

The residue function returns residues in r, pole locations in p, and direct


terms in k. This codes gives the response

r =
1.0000
1.0000
-1.0000
p =
-3.0000
-2.0000
-1.0000
k =
[]

Which translates to the following expression for X(s) in partial fraction form.
1 1 1
X(s) = + − (3)
s+3 s+2 s+1
We can also get back to X(s) in the rational form as given by Equation 2

[n new,d new] = residue(r,p,k)

To which Matlab gives the following result

n new = 1.0000 2.0000 -1.0000


d new = 1.0000 6.0000 11.0000 6.0000

This translates to X(s) given by Equation 2.

7
9.6 Analysis and characterization of LTI systems using
the Laplace transform
LTI system are represented through Equation 4 using the Laplace transform
where Y (s) is the Laplace transform of the output y(t), X(s) is the Laplace
transform of the input x(t) and H(s) is the Laplace transform of the impulse
response of the system. H(s) is generally called the transfer function of the
system. The transfer function allows for the analysis of the systems.

Y (s) = X(s)H(s) (4)

9.6.1 Causality
‘For a system with a rational system function (transfer function), causality
of the system is equivalent to the ROC being the right-half plane to the right
of the rightmost pole.’
Let us consider the system with the impulse response h(t) = e−2t u(t). The
1
Laplace transform is H(s) = s+1 . The pole zero plot is plotted using the
following code

clear all
close all
n=[1];
d=[1 2];
H=tf(n,d);
[p z]=pzmap(H)
pzmap(H);

For

[p z]=pzmap(H)

Matlab gives the response as poles and zeros of the system.

p = -2
z = 0 x 1 empty double column vector

Figure 2 shows the pole zero plot for H(s). The transfer function or the
system function is rational and the ROC is to the right of the right most
pole. Thus the system is causal.

8
1
Figure 2: Pole zero plot for H(s) = s+2

9
9.6.2 Student Task 3 - causality
Task 3. Determine whether the system given by h(t) = e−|t| and the corre-
sponding H(s) = − s22−1 is causal. Plot the pole zero plot. Add appropriate
labels and title. Write the code, print and paste the figure here. Comment
on your results.

10
9.6.3 Student Task 4 - stability
‘A causal system with rational system function (transfer function), H(s) is
stable if and only if all of the poles of H(s) lie in the left half of the s-plane
- i.e., all of the poles have negative real parts.’
Task 4. Determine whether the following systems are stable.

1. h(t) = e2t u(t)


s2 +s−1
2. X(s) = s3 +6s2 +11s+6

Plot the pole zero plot for both cases. Add appropriate labels and title.
Write the code, print and paste the figure here. Comment on your results
and provide reason(s) for your answers.

11

You might also like