0% found this document useful (0 votes)
19 views11 pages

Digital Control System NUST EME Lab Solution

The document discusses digital control systems lab experiments. It describes determining the z-transform and inverse z-transform of discrete time signals and systems in MATLAB. Several examples of finding the z-transform are provided. Pole-zero plots and impulse responses of example discrete time systems are also shown.

Uploaded by

Muhammad Umer
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)
19 views11 pages

Digital Control System NUST EME Lab Solution

The document discusses digital control systems lab experiments. It describes determining the z-transform and inverse z-transform of discrete time signals and systems in MATLAB. Several examples of finding the z-transform are provided. Pole-zero plots and impulse responses of example discrete time systems are also shown.

Uploaded by

Muhammad Umer
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/ 11

DIGITAL CONTROL SYSTEMS (EE-372)

Lab #3 Report

Course Instructor: Lt Col Dr Atif Qayyum


Lab Engineer: Haris Ataullah

Group Members Registration Number


Zain Rehan 301822
Muhammad Umer Siddiq 296908
Syed Muhammad Abdullah Shah 286767
Degree 41 Syndicate B
LAB 3: Z-Transform in MATLAB

Objective:
• To realize the significance of z-transform.

• To determine the z-transform and inverse z-transform of discrete time signal and systems in
MATLAB.

• To find the pole-zero plot and impulse response of DT system.

Significance of 𝒛−𝒏:

The z-transform of a discrete-time signal x(n) is defined as the power series.

Where z is a complex variable. The relation sometimes called the direct z-transform because it
transforms the time-domain signal x(n) into its complex-plane representation X(z).

Where,
‘r’ is a real number.
𝑒𝑗𝜔 is Euler's Number
𝜔 is the angular frequency in radians per samples.
Lab Tasks:
1. Find Z-transform and inverse Z-transform of some DT signals.

1. For sin(ꞷ*n):
MATLAB Code:
syms z n w
fn = sin(w*n)
F1 = ztrans(fn,z)
f1 = iztrans(F2)

MATLAB Output:
fn =

sin(n*w)

F1 =

(z*sin(w))/(z^2 - 2*cos(w)*z + 1)

f1 =

sin(n*w)

2. For cos(ω*n):
MATLAB Code:
syms z n w
fn = cos(w*n)
F1 = ztrans(fn,z)
f1 = iztrans(F2)

MATLAB Output:
fn =

cos(n*w)

F1 =

(z*(z - cos(w)))/(z^2 - 2*cos(w)*z + 1)


f1 =

cos(n*w)

3. For a^n:
MATLAB Code:
syms a n z
fn = a^n;
F1 = symsum(fn.*(z.^-n),n,0,inf)
F2 = ztrans(fn,z)
f1 = simplify(iztrans(F2))

MATLAB Output:
fn =

a^n

F1 =

piecewise(a == z & z ~= 0, Inf, a ~= z & z ~= 0, -(z - z*limit(a^n/z^n, n,


Inf))/(a - z))

F2 =

-z/(a - z)

f1 =

piecewise(a == 0, kroneckerDelta(n, 0), a ~= 0, a^n)

4. For (1/2)^n:
MATLAB Code:
syms n z
fn = (1/2)^n;
F1 = simplify(symsum(fn.*(z.^-n),n,0,inf))
F2 = ztrans(fn,z)
f1 = simplify(iztrans(F2))
MATLAB Output:
fn =

(1/2)^n

F1 =

piecewise(z == 1/2, Inf, z ~= 0 & z ~= 1/2, -(2*z*(limit(1/(2^n*z^n), n, Inf)


- 1))/(2*z - 1))

F2 =

z/(z - 1/2)

f1 =

1/2^n

2. Define some DT systems and draw pole-zero plot of the systems. Also find impulse response
of the systems.

DT System 1:
MATLAB Code:
%% DT System 1
num = [1 2 0];
den = [1 0 0.2];
sys = tf(num,den,0.1)
[z,p,k] = tf2zpk(num,den)
zplane(num,den)
impz(num,den)

MATLAB Output:
sys =

z^2 + 2 z

---------

z^2 + 0.2

Sample time: 0.1 seconds

Discrete-time transfer function.


z =

-2

p =

0.0000 + 0.4472i

0.0000 - 0.4472i

k =

Pole-Zero Plot of DT System 1:


Impulse Response of DT System 1:

DT System 2:
MATLAB Code:
%% DT System 2
num = [1 0];
den = [1 -0.707 0.2499];
sys = tf(num,den,0.1)
[z,p,k] = tf2zpk(num,den)
zplane(num,den)
impz(num,den)

MATLAB Output:
sys =

----------------------

z^2 - 0.707 z + 0.2499

Sample time: 0.1 seconds

Discrete-time transfer function.


z =

p =

0.3535 + 0.3535i

0.3535 - 0.3535i

k =

Pole-Zero Plot of DT System 2:


Impulse Response of DT System 2:

DT System 3:
MATLAB Code:
%% DT System 3
num = [1 4 0];
den = [1 5 9];
sys = tf(num,den,0.1)
[z,p,k] = tf2zpk(num,den)
zplane(num,den)
impz(num,den)

MATLAB Output:
sys =

z^2 + 4 z

-------------

z^2 + 5 z + 9

Sample time: 0.1 seconds

Discrete-time transfer function.


z =

-4

p =

-2.5000 + 1.6583i

-2.5000 - 1.6583i

k =

Pole-Zero Plot of DT System 3:


Impulse Response of DT System 3:

You might also like