![]() |
![]() |
|
|
| <<Home | Lab 4 | |||
|
Transform techniques are an important tool in the analysis of signals and LTI (Linear Time Invariant) systems. Z-transform is an infinite power series, it exists only for those values of z for which this series converges (where z is complex variable) .The ROC (Region of convergence) of X(z) is the set of all values of z for which X(z) attains a finite value. Inverse Z-transform can be obtained by transforming the z-domain to the time domain. Following two methods are used for finding inverse z-transform in this lab (a) Partial fraction method (b) Power series method. Z- transform is applied for discrete time signals and LTI systems. Laplace transform is applied for continuous-time signals and LTI systems. The roots of the denominator of H(z) are called "poles" and those of the numerator are called "zeros"
Note:- The signal decays if the pole is inside the unit circle, and grows if the pole is outside the unit circle. A negative pole results in a signal that alternates in sign. Signals with poles outside the unit circle become unbounded, cause overflow in digital systems, this should be avoided. If all poles lie inside of a unit circle on the z-plane means discrete time LTI system is stable. Z-transform
Example 1 Find the poles and zeros of the following pulse transfer function and plot them onto the z plane. H(z) = (2-z-1) / (1-0.1z-1 - 0.02z-2) Matlab algorithm is as follows Solution num =[2 -1] den = [1 -0.1 -.02] poles =roots(den) zeroes = roots(num) zplane(num,den) grid Result
poles = 0.2000, -0.1000
Q. Is this system stable? Why? Ans. Yes the system is stable, since all of its poles lie inside of unit circle on the z-plane as shown in above figure. Z-transform
Exercise 1 Repeat example 1 for H(z) = (2.25-2.1z-1-3.95z-2 -1.6z-3 -0,2z-4) / (4-2.96z-1 +0,8z-2 -0,118z-3 -0,0064z-4) Solution num =[2.25 -2.1 -3.95 -1.6 -0.2] den = [4 -2.96 -0.8 -0.118 -0.0064] poles =roots(den) zeroes = roots(num) zplane(num,den) grid Result
poles = 0.9773, -0.0750 + 0.1147i, -0.0750 - 0.1147i,
-0.0872
Q. Is this system stable? Why? Ans. Yes the system is stable, since all of its poles lie inside of unit circle on the z-plane as shown in above figure. Inverse Z-transform
Example 2 (Practice on Partial fraction) Use MATLAB determine the partial fraction expansions of H(z) = 18z3 / (18z3 +3z2 -4z -1) Solution num = [18 0 0 0]; den = [18 3 -4 -1]; [r,p,k] = residuez(num,den); disp('Residues'); disp(r') disp('Poles'); disp(p') disp('Constants'); disp(k) Result
Residues
Therefore H(z) = 0.24/(1+0.333z-1) + 0.4/(1+0.333z-1)2 + 0.36/(1-0.5z-1) Inverse Z-transform
Example 3 (Practice on Power series method) using impz function Determine the inverse Z-transform of (1+2z-1)/(1+0.4z-1 -0.12z-2) Solution L = 11; % Length of output vector (How may values you want in output) num = [1 2]; den = [1 0.4 -0.12]; [y,t] = impz(num,den,L); disp('Coefficient of the power series expansion '); disp(y') Result Coefficient of the power series expansion 1.0000 1.6000 -0.5200 0.4000 -0.2224 0.1370 -0.0815 0.0490 -0.0294 0.0176 -0.0106 Inverse Z-transform
Example 4 (Practice on Power series method) using filter function Repeat example 3 with the built-in function "filter" Solution t=0:1:10; L = 11; % Length of output vector (How may values you want in output)num = [1 2]; den = [1 0.4 -0.12]; x=[1,zeros(1,L-1)]; y=filter(num,den,x); disp( 'Coefficient of the power series expansion are'); disp(y)stem(t,y) grid Result
Coefficient of the power series expansion 1.0000 1.6000 -0.5200 0.4000 -0.2224 0.1370 -0.0815 0.0490 -0.0294 0.0176 -0.0106 Inverse Z-transform
Example 4b (Practice on Power series method) using decov function Repeat example 3 with the built-in function "deconv" Solution num = [1 2]; den = [1 0.4 -0.12]; y=deconv(den,num); disp('Coefficient of the power series expansion are'); disp(y) Result Coefficient of the power series expansion 1.0000 -1.6000 Impulse and Step response
Exercise Plot impulse and Step response of the transfer functions of example1 and example 3. Also try the built in function filter to plot the same response. Solution % Impulse response of example 3 by dimpulse function L = 11; num = [1 2]; den = [1 0.4 -0.12]; dimpulse(num,den) Result
Solution % Step response of example 3 by dstep function L = 11; num = [1 2]; den = [1 0.4 -0.12]; dstep(num,den) Result
Solution %exercise impulse and step response by filter function of example 1 L=11 t=0:1:10; num =[2 -1]; den = [1 -0.1 -.02]; % Impulse response x=[1, zeros(1,L-1)]; y=filter(num,den,x); stem(t,y) % step response figure; a=ones(L); b=filter(num,den,a); stem(t,b) Result Impulse response
Step response
Frequency response
Example Sketch the normalized frequency response of the system having the pulse transfer function: H(z) = (1+0.95z-1)/(1-1.8z-1+0.81z-2) Solution num=[1 0.95]; den=[1 -1.8 0.81]; w= -pi:pi/255:pi; h=freqz(num,den,w); h1=abs(h); h2=h1/(max(h1)); h3=20*log10(h2); figure plot(w,h3); Result
Frequency response
Exercise Repeat the above example for the following system: (1+z-1)/(1+0.1z-1+0.2z-1) Comment on the response. Find and sketch poles, zeros, step response, impulse response and ramp response of the system. Solution num=[1 1]; den=[1 0.1 -0.2]; poles=roots(den) zeroes=roots(num) zplane(num,den) grid
figure dimpulse(num,den) figure dstep(num,den) %ramp response n=0:1:10; x=n; y=filter(num,den,x); figure plot(n,y) Result
poles = -0.5000 0.4000
Ramp Response
Frequency response
Exercise Sketch the magnitude and phase response of H(z) = 1/ (1-0.8z-1) Solution num=[1]; den=[1 -0.8]; w= -pi:pi/255:pi; h=freqz(num,den,w); h1=abs(h); h2=h1/(max(h1)); h3=20*log10(h2); figure plot(w,h3);
%this is for the Phase Response h4=angle(h); %since phase cannot be in DB so no h2 and h3figure plot(w,h4) Result Magnitude Response
Phase Response
HELP ROOTS
ROOTS Find polynomial roots. RESIDUEZ
RESIDUEZ Z-transform partial-fraction expansion. DISP
DISP Display array. IMPZ
IMPZ Impulse response of digital filter FILTER
FILTER One-dimensional digital filter. DECOV
DECONV Deconvolution and polynomial
division. DIMPULSE DIMPULSE(NUM,DEN) plots the impulse response of the polynomial transfer function G(z) = NUM(z)/DEN(z) where NUM and DEN contain the polynomial coefficients in descending powers of z. DSTEP DSTEP(NUM,DEN) plots the step response of the polynomial transfer function G(z) = NUM(z)/DEN(z) where NUM and DEN contain the polynomial coefficients in descending powers of z. FREQZ
FREQZ Digital filter frequency response. DSP Lab 1 DSP Lab2 DSP Lab 3 DSP Lab4 DSP Lab 5 DSP Lab 6 DSP Lab7 DSP Lab8 DSP Lab9 DSP Lab10 DSP Lab 11 Other material |
||||
| <<Home | ||||
|
||||||