This action might not be possible to undo. Are you sure you want to continue?

BooksAudiobooksComicsSheet Music### Categories

### Categories

### Categories

### Publishers

Editors' Picks Books

Hand-picked favorites from

our editors

our editors

Editors' Picks Audiobooks

Hand-picked favorites from

our editors

our editors

Editors' Picks Comics

Hand-picked favorites from

our editors

our editors

Editors' Picks Sheet Music

Hand-picked favorites from

our editors

our editors

Top Books

What's trending, bestsellers,

award-winners & more

award-winners & more

Top Audiobooks

What's trending, bestsellers,

award-winners & more

award-winners & more

Top Comics

What's trending, bestsellers,

award-winners & more

award-winners & more

Top Sheet Music

What's trending, bestsellers,

award-winners & more

award-winners & more

Welcome to Scribd! Start your free trial and access books, documents and more.Find out more

5 THEORY: Description: 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. The Z-transform, like many other integral transforms, can be defined as either a one-sided or two-sided transform. The bilateral or two-sided Z-transform of a discrete-time signal x[n] is the function X(z) defined as

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

In signal processing, this definition is used when the signal is causal. Rational Z-transform to partial fraction form: Consider the transfer function in the rational form i-e; 18z3 G(z)= -----------------18z3+3z2-4z-1 We can evaluate the partial fraction form of the above system using matlab command. The partial fraction form be, G(z)= 0.36__ + __0.24__ + _0.4____ 1 – 0.5z-1 1+0.33 z-1 (1+0.33 z-1) Matlab command that converts rational z-transform in to partial fraction form is ‘residuez’. If you want to see the poles and zeros in a zplane. This function displays the poles and zeros of discrete-time systems. Use the under given matlab command zplane(b,a) PROGRAM CODE:

%program to perform Inverse Z-Transform b=[1,0.4*sqrt(2)]; a=[1,-0.8*sqrt(2),0.64]; [R,P,C]=residuez(b,a); m=abs(P'); subplot(1,2,1); plot(m); title('magnitude'); A=angle(P')/pi; subplot(1,2,2); plot(A); title('Angle'); freqz(a,b,10)

Plot the frequency response of given z-transform of the given function.Column vector contains P contains the pole locations. Plot the pole angles in pi units. Write the poles and zeros of the input sequence. Returned vector R contains the residues. Input Sequence: RESULT: MAGNITUDE AND ANGLE:- . 5. And row vector contains the direct terms. 4. Plot the pole magnitudes. 3. 2.ALGORITHM: 1.

25 1 1.6 0.3 0.5 -0.5 2 .8 Normalized Frequency ( rad/sample) 0.4 0.15 -0.5 1 1.9 1 magnitude 2 1.9 1 150 Phase (degrees) 100 50 0 0 0.5 2 -0.7 0.1 0.7 0.1 0 -0.05 0 0.5 0.2 0.2 0.5 0.25 0.4 0.2 -0.1 0.8 Normalized Frequency ( rad/sample) Angle 0.3 0.05 -0.1 1 0.2 0.20 Magnitude (dB) 10 0 -10 -20 0 0.5 0.15 0.6 0.

fp=input('enter passband freq').6*(fs-fp)/f. if(c==1) y=rectwin(n1). EQUIPMENTS: Constructor – MATLAB Software THEORY: A Finite Impulse Response (FIR) filter is a discrete linear time-invariant system whose output is based on the weighted summation of a finite number of past inputs. h(n-k) is the transversal filter coefficients at time n.kaiser: \n '). x(k) and y(n) represent the input to and output from the filter at time n.FIR filters AIM: To verify FIR filters. disp('Rectangular window filter response').2)~=0) n1=n. Hanning. triangular 3. f=input('enter sampling freq '). PROGRAM: %fir filt design window techniques clc. close all. end y c=input('enter your choice of window function 1. rp=input('enter passband ripple'). num=-20*log10(sqrt(rp*rs))-13. rs=input('enter the stopband ripple'). . Barlett. n=n-1. n1=n+1. In this equation. ws=2*fs/f. dem=14. Infinite response is truncated to get finite impulse response. Order of the filter should be specified. clear all. fs=input('enter stopband freq'). n=ceil(num/dem). FIR – filter is a finite impulse response filter. Hamming. This FIR filter is an all zero filter. Blackmann window etc. rectangular 2. An FIR transversal filter structure can be obtained directly from the equation for discrete-time convolution. Types of windows available are Rectangular. placing a window of finite length does this. if(rem(n. wp=2*fp/f. These coefficients are generated by using FDS (Filter Design Software or Digital filter design package).

end if (c==2) y=triang(n1).256).1.3).256). xlabel('(b) Normalized frequency-->').256).1. m=20*log10(abs(h)). xlabel('(a) Normalized frequency-->'). ylabel('Gain in dB-->').o]=freqz(b.o]=freqz(b. disp('kaiser window filter response'). xlabel('(c) Normalized frequency-->'). subplot(2. ylabel('Gain in dB-->'). subplot(2.y).wn. %HPF b=fir1(n.o]=freqz(b. title('BPF').wp. ylabel('Gain in dB-->'). [h.o]=freqz(b. ylabel('Gain in dB-->'). b=fir1(n. xlabel('(d) Normalized frequency-->') RESULTS: . m=20*log10(abs(h)).plot(o/pi. disp('Triangular window filter response'). title('BSF').4). subplot(2.wp. [h. %BPF wn=[wp ws].1).y). end %LPF b=fir1(n.m).2.y). m=20*log10(abs(h)).2.256). end if(c==3) y=kaiser(n1). [h.m).1.1. subplot(2. title('HPF'). [h.plot(o/pi.'stop'.y).'high'.wn.2. title('LPF'). %BSF b=fir1(n.m).2.plot(o/pi.plot(o/pi. m=20*log10(abs(h)).m).2).

.

w2=2*ws/fs.MATLAB THEORY: The IIR filter can realize both the poles and zeroes of a system because it has a rational transfer function.a. IIR filters can be expanded as infinite impulse response filters.a]=butter(n. fs=input('enter the sampling freq').'s').clear all. disp('enter the IIR filter design specifications'). HPF \n '). bk and ak are the filter coefficients.'s').w2.om]=freqs(b. [b. ws=input('enter the stopband freq'). In designing IIR filters.wn. [h. [n. w1=2*wp/fs. wp=input('enter the passband freq'). PROGRAM: % IIR filters LPF & HPF clc. cutoff frequencies of the filters should be mentioned.01:pi. These filter coefficients are generated using FDS (Filter Design software or Digital Filter design package).close all.'low'.IIR filters AIM: To design and implement IIR (LPF/HPF)filters.a]=butter(n. The order of the filter can be estimated using butter worth polynomial.rp. . Filter coefficients can be found and the response can be plotted. rs=input('enter the stopband ripple').wn]=buttord(w1. described by polynomials in z in both the numerator and the denominator: The difference equation for such a system is described by the following: M and N are order of the two polynomials. c=input('enter choice of filter 1. end if(c==2) disp('Frequency response of IIR HPF is:').'s'). end w=0:.w).wn. LPF 2. EQUIPMENTS: Software . if(c==1) disp('Frequency response of IIR LPF is:').rs. That’s why the filters are named as butter worth filters. [b.'high'. rp=input('enter the passband ripple').

subplot(2. title('magnitude response of IIR filter is:'). an=angle(h).plot(om/pi.1.1). xlabel('(b) Normalized freq.2). ylabel('Phase in radians-->').m=20*log10(abs(h)). -->'). RESULTS: .plot(om/pi. title('phase response of IIR filter is:').m). -->'). ylabel('Gain in dB-->'). figure. xlabel('(a) Normalized freq.an).1.subplot(2.

Download

Are you sure?

This action might not be possible to undo. Are you sure you want to continue?

CANCEL

OK

We've moved you to where you read on your other device.

Get the full title to continue

Get the full title to continue listening from where you left off, or restart the preview.

Restart preview

scribd