Ee-323 Diigital Signal Processing Lab Report 02: 6 Semester (Spring 2018)
Ee-323 Diigital Signal Processing Lab Report 02: 6 Semester (Spring 2018)
Ee-323 Diigital Signal Processing Lab Report 02: 6 Semester (Spring 2018)
LAB REPORT 02
6TH SEMESTER (SPRING 2018)
16-EE-03
TAXILA
LAB No. 02
Objective:
Introduction:
Theory:
𝑋(𝑧) = ∑ 𝑥(𝑛)𝑧 −𝑛
𝑛=−∞
Code:
function X=z_transform(x)
syms z;
sum=0;
n=length(x)-1;
for i=0:1:n;
X=x(i+1)*z^(-1*i);
sum=sum+X;
end
X=sum
end
2. Use the function defined in Task 1 to compute Z-transform of the following signals
i. x(n) = cos(2πFn) here F = 10Hz
Code:
F=10;
x=cos(2*pi*F*n);
z_transform(x)
Output:
X =1/z + 1/z^2 + 1/z^3 + 1/z^4 + 1
Code:
x=[2 4 5 7 1];
z_transform(x)
Output:
X = 4/z + 5/z^2 + 7/z^3 + 1/z^4 + 2
Code:
x=[0 0 1 2 5 7 0 1];
z_transform(x)
Output:
X = 1/z^2 + 2/z^3 + 5/z^4 + 7/z^5 + 1/z^7
Code:
syms a k T;
a=k*T;
X=ztrans(a)
Output:
X= (T*z)/(z - 1)^2
ii. x[n]= an
Code:
syms a n;
x=a^n;
X=ztrans(x)
Output:
X = -z/(a - z)
4. We know that a transfer function is a ratio of polynomials with ascending power of 𝑧-1.
Transfer functions are specified by their numerator and denominator polynomials. In
MATLAB, NUM and DEN are row vectors listing the numerator and denominator
coefficients in descending order of z by default. For example, the polynomial 𝑧2 + 2𝑧 +
10 is specified as [1 2 10]. For discrete-time transfer functions, it is highly
recommended to make the length of the numerator and denominator equal to ensure
correct results. Define vectors in MATLAB to express following transfer function with
numerator and denominator polynomials.
4 − 5𝑧 −1
𝐻(𝑧) =
8 + 3𝑧 −1 + 𝑧 −2
Output:
z=
4 z^2 - 5 z
---------------
8 z^2 + 3 z + 1
Output:
num = 0 4 -10 4
den = 1.0000 0.5000 -0.1800 -0.0720
H = 4 z^2 - 10 z + 4
------------------------------
z^3 + 0.5 z^2 - 0.18 z - 0.072
z = 2.0000
0.5000
p = 0.4000
-0.6000
-0.3000
k=4
1. What are the differences between MATLAB commands ‘zplane’ and pzmap?
2. How complex variable ‘z’ is related to complex variable ‘s’? Give expression.
4. How the values of real part (σ) of ‘s’ be translated into stability conditions in z-domain?
Discussion/ Conclusion: