You are on page 1of 7

Experiment 10:

Laplace , Z Transform and Frequency Response


Part 1: Laplace Transform:

Objective
The purpose of this lab to gain familiarity with Laplace transforms, including the Laplace transforms of
step functions and related functions.

Introduction:

Laplace transform is used for solving differential and integral equations. In physics and engineering, it is
used for analysis of linear time-invariant systems such as electrical circuits, harmonic oscillators, optical
devices, and mechanical systems. In this analysis, the Laplace transform is often interpreted as a
transformation from the time-domain, in which inputs and outputs are functions of time, to the frequency-
domain, where the same inputs and outputs are functions of complex angular frequency, in radians per
unit time.

Denoted , it is a linear operator on a function f(t) (original) that transforms it to a function F(s)
with a complex argument s.

The Laplace transform has the useful property that many relationships and operations over the originals
f(t) correspond to simpler relationships and operations over the images F(s).

1
Formal Definition

The Laplace transform of a function x(t), is the function X(s), defined by:

 x (t )e
 st
[x (t )]  X (s )  dt


The inverse Laplace transform x  t  is given by


the following complex integral :
c j
1

1
[X (s )]  x (t )  X (s )e st ds
2 j cj

with c chosen such that s= +jw is in ROC


The parameter s is a complex number:

s= +jw
with real numbers σ and ω.
Note: the Fourier Transform is a special case of the Laplace Transform when σ= 0

Laplace in Matlab
Suppose we wished to find the output to a filter whose input is

x(t )  e 2t u(t )

and whose transfer function is

1
H ( s) 
s3
we could take the symbolic Laplace transform ,multiply it by 1/(s+3), and then take the inverse Laplace
transform as follows:
syms x t s;
x = exp(-2*t);
X= laplace(x);
H = 1/(s+3);
Y = X*H;
y = ilaplace(Y);

2
Specifying Transfer Functions in MATLAB
A transfer function is a mathematical representation, of the relation between the input and output of a
(linear time-invariant) system

It is obtained using the Laplace transform of the output divided by the Laplace transform of the input or
simply it's the Laplace transform of the impulse response of the system.
Transfer functions are used because they simplify operations ,
In MATLAB, transfer functions are specified by the numerator and denominator coefficients. Thus, the
transfer function

2s  3
H ( s) 
s 2  5s  6
can be specified in MATLAB as:

>> h = tf([2 3], [1 5 6]);


If we specify an input to this transfer function,

>> t = 0:0.01:1;
>> x = exp(-t);

we can then find the response using

>> [y, t] = lsim (h, x, t);

3
Method of partial fraction expansion:

Consider a linear time-invariant system with transfer function H(s)

The impulse response is simply the inverse Laplace transform of this transfer function:

 Use the residue command to find the inverse Laplace transform of the following functions:

1. X(s)= (2s2+5)/(s2+3 s+2).


Num=[2 0 5];
Den=[1 3 2];
[r, p, k ]=residue(Num,Den)

Part2: Z Transform

In mathematics and signal processing, the Z-transform converts a discrete time-domain signal, which is
a sequence of real or complex numbers, into a complex frequency-domain representation.

It can be considered as a discrete equivalent of the Laplace transform.

The Z-transform, like many integral transforms, can be defined as either a one-sided or two-sided
transform.

Bilateral Z-transform

The bilateral or two-sided Z-transform of a discrete-time signal x[n] is the function X(z) defined as

where n is an integer and z is, in general, a complex number.

Unilateral Z-transform

4
Alternatively, in cases where x[n] is defined only for n ≥ 0, the single-sided or unilateral Z-transform is
defined as

Inverse Z-transform

The inverse Z-transform is

where is a counterclockwise closed path encircling the origin and entirely in the region of
convergence (ROC). The contour or path, , must encircle all of the poles of .

Commands in Matlab:
 ZTRANS(f): is the Z-transform of the scalar sym f with default independent variable n. The default
return is a function of z.
 IZTRANS(F): is the inverse Z-transform of the scalar sym F with default independent variable z. The
default return is a function of n.

Lab Work:
1. Find the z-transform of :
 [ ]
 [ ]
 [ ]
 [ ]

a=sym('1');
y=ztrans(a)
y=
z/(z-1)
//////////////////////////////////////
syms n
y=ztrans(n)

5
y=
z/(z-1)^2
//////////////////////////////////////
syms n
y=ztrans(n^2)
y=
z*(z+1)/(z-1)^3
////////////////////////////////////
syms n a T
y=ztrans(exp(-a*n*T))
y=
z/exp(-a*T)/(z/exp(-a*T)-1)
//////////////////////////////////////
syms n b
y=ztrans(cos(b*n)
y=
(z-cos(b))*z/(z^2-2*z*cos(b)+1)

2. Find the inverse z-transform of:



syms z
y=iztrans(z*(2*z-1)/((z-1).*(z+.5)))
y =
4/3*(-1/2)^n+2/3
////////////////////////////////////////
syms z a
y=iztrans(z/(z-a))
y =
a^n

Finding response of a system:

6
If a system is driven by a signal then the output is . By taking the

inverse Z-transform the output can be found.

Example:
A discrete time system is described by the following transfer function:

Find the system response to input [ ] [ ] if all initial conditions are zero.

syms n z
x=(-2).^-n;
x=simplify(ztrans(x))
h=(z+.32)/(z^2+z+.16)
y=x.*h
yn=iztrans(y)

You might also like