0% found this document useful (0 votes)
4 views

Lab Manual Filter Design

Uploaded by

Santosh Kumar
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

Lab Manual Filter Design

Uploaded by

Santosh Kumar
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

Filter Design

LAB MANUAI-
B.E (FCE), tV/I

14;a tr1 ir i a'i:


Yif{}t I Y

i' r"1'

Department of Eiectronics and Communication

+PKC _01 1 386

0J j 3sfi

1
LABORATORY RULES

. Reports should include:

Name and Roll number of student


Name, purpose. theory and the procedure of experiment

. Grading will be as follows:

Experiments: .2s%
Viva: 2r%
Performance: l0o/o
Final Examination: 40o/o

t.
,,1

List of Experiments:
I- Analysis and design of firter circuits using computer
simulation
II. Butterworth Filter Using Matlab

ilI. Chebyshev Type I filter design

IV. Chebyshev Type ll filter design


I

Experiment 01:
Analysis and design of filter circuits using computer simuration

SOFTWARE REQUIRED:
[. Matlab
2. Simulink

Simulation Procedure:

Writefdatool in the command window.


>>fdatool

This tool allows one to construct filters of different types:


Lowpass, HighPass, Bandpass and Bandstop together with different designs like Buttepworth,
Chebyshev[, Chebyshev II and Elliptic filters (IIR) or FIR filters using window methods among
other techniques. We can of course specify very high orders o. from 16 different
windows. The frequency specification neea sampiing irequency and"hoor. frequencies for passband
and stopband. These need to be written either as frequencylHz] or as normalized,between 0 and
l.Inthe menu one can find other usefulthings like: impulse responses. step responses, pole/zero
map, filter coefficients, magnitude and phase characteristics. This tool also p.orid., poisibilty
to
import filters or expott a variable to the command window/ or as a block to Simulink or even
generate am-fi1e.

ii= .,,,, :=, .l' :-:,ii:-4:.ffi.S

,,|.. i}| ::,:: : .. .:,


E!-q6-r'.lidim FR
Cr&i :r l .
:;bli ,.'re!
*-:ji. *u1.1:

FF: isa :. iqeil.


":: 'i'!
ih.r 9,3J1
,d.,,,)::l!::.?,,
,
fid;rai!n.,: : ,,i:,mmii.i.;
,.
fie;ii.ii+:, :..,,,,.
l' I : I -..........1....'.:,.,-,......,-...r,i:..--'.......:..- .l
,lin.*.1
:.;::: -r:i::l : .r-:;---Y:T,:i l?::;rcif

Now let us export our filter to Simulinl<.


Enter File-> Export to Simulink N[odel

.:,
- t!-,.di-,e. E-i':j:tii{i
;ij.:
-r :Y.:::i:,:.;t
1.*inclou. , .,:..r,.,,:,.:..,,i:.,r
Hef p ri

r, :/-.'iu.
.,
Sr :i ri:: ::

lE r .4t'-i
.,,1
=
.:.4:j:.: :
6

::,:,,-$*$,

Give the Blocl< used in the Simulink environme,r a name:


Lp Filrer
Press the buuori "Realize Model,' at lhe bofl.om.
Sirnuli.k stafls and an rndr-fire is opened rvith our firter rhere
,.ffil#,.*,]lil.,'.,-r,.,.ii,,,,,
rijiiliilt::.1:i:::. :iJi:a:1lt $ jr
irjl:::l:i:: i j:r::::,

i, I1,',::*t *:,,l.-=y:*s
ft :--r
tt;t+Htl.ffi
a.wIIag Ji :ffi ' .i.,;fu
..* ffi, ;i :*i:,,i*.1,,,1;::i'.; #

l--;;-1 I
F ilt::r

I'^E/
r --.c cdejj

Let us now apply some signals to the filter to see horv it performs.
If you are curious you can also doubie-click on the Filtei icon to see how its Block diagram looks
lil<e

-i i.= i '::ililii" ;i
,il
1:+*:.!4*l:l
ryffiJ..i.
' ', r,l . .,
19 .:'

Llin: !lr':v:r

Output waveform:
Experiment 02:
Butterworth Filter Using Matlab

SOFTWARE REQUIRED:
1. Matlab

INTRODUCTION
Butterworth filters have a magnitude response that is
maximaliy flat in the passband and
monotonic overall' This smoothness comei at the price
of decreasld rolloff steepness. Elliptic
and chebyshev filters generally provide steeper
rolloff for a given filter order.
Syntax:
[b,al : butter(n,Wn)
Ib.a] : butrer(n.Wn,ftype)
[z,p,k] :butter(-.-)

A!gorithm:

1' Find the lowpass analog prototype poles, zeros,


and gain using the function buttap.
2. Convert the poles, zeros, and gain into statespaceform.
3' Il required, use a statespacetranslormation to convert th.e lowpass
highpass, or bandstop filter with the clesired rr"qr"n"y.onr*i*r. r-'-- -'^lvr
filter .r
into a banclpass,
4' For digital filter design, use bilinear to conv.err the anatog
firter into a digital filter through a
bilinear transformation with frequencl, prewarping.

Careful flequency adjustment enables the analog filters


and the digiral filters to have t6e same
[r'eqr"rency
rv1LrvrrwJ response
ruDpulr.str rnagnitude
urdglutuoe at Wn a[ \\ I and \\r2.
wn or at\\rI u2.
MATLAB PROGRAM

Output:
33s
Wavelonn:

EXERCISES

I. Butterworthlow Pass Filter Matlab program


il. Butterworth High Pass Filter
Iil. Butterworlh Band pass Filter
IV. Butrerworth Band Reject Filter

i. r.:
i

Experiment 03:
Chebyshev Type I frlter designUsing Matlab

SOFTWARE REQUIRED:
l. Matlab

INTRODUCTION
Chebyshev Type I filters are equiripple in the passband and monotonic in the stopband. Type i
filters roll off faster than Type II filters, but at the expense of greater deviation from unity in-the
passband.

Syntax:

[b,a] = cheby I (n,Rp,Wp)


[b,a] = cheby I (n,Rp,Wp,ftype)
[z,p,k]:chebyl(__J

Algorithms

i. It finds the lowpass anaiog prototype poles, zeros, and gain using the function cheblap.
2. It conveds the poles, zeros, and gain into state-space form.
3. lf required. it uses a state-space transformation to convert the lowpass filter to a highpass,
bandpass, or bandstop filter with the desired frequency constraints.
4. For digital filter design, it uses bilinear to convefl rhe analog filter into a digital filter through
a bilinear transformation with frequency prewarping. Careful frequency adjustment enabies
the -analog f,rlters and the digital filters. to haVd thg same frequencf responSe magnitude
at Wp or wl and w2.
i. It converts the itate-space fllter back to transfer function or zero-po1"-gai, fonn, as required.

MATLAB PROGRAM

Output:

Waveform:

EXERCISES

I. Chebyshev Type I Low Pass FilterMatlab Program


II. Chebyshev Type I Band Pass Filter.

8
J

chebyshev Type II filter designUsing ji:P


SOFTWARE REQUIRED:
I. Matlab

INTRODUCTION
chebyshev Type II filters are monotonic in the passband
and equirippie in the stopband. Type tI
filters do not roll off as fast as Type I filters, but are free
of passband rippre.

Syntax:
[b,a] = cheby2(n,Rs,Ws)
[b,a] : cheby2(n.Rs,Ws,ftype)
[z,p,k] : cheby2( )

Aigorithm:
I' It finds the lowpass artalog protorlpe poles. zeros, and gain using the function
cheb2ap.
2. it converts poles, zeros, and gain into state_space form.
3' If required, it uses a state-space transformation to convert the lowpass
filter into a bandpass,
highpass, or bandstop firteri'ith the desired frequency constraints.
+' For digital filter design, it uses bilinear to convert
rhe analog filter inro
a digiral filter throLrgh
a bilinear transformatio, rvith frequency.r,:.*rroiru. carelrl f,requency
adjustrnent rhe
analog filters and the cligital filters to have ttre s=ame
frequencl,response rnagnitude
at Ws or rvl and w2.
5' It converts the state-space filterbackto transfer luncrion
orzero-pole-gain lorm. as required.

MATLAB PROCRAM

Outpur:

Waveform:

EXERCISES

r Chebyshev Type IILow pass Filter Matlab program


,, Chebyshev Type IIBand pass Filter
5>',

LABORATORY RULES

' Reports should include:

Name and Roll number of student


Name, purpose, theory and the procedure of experiment

' Grading witl be as follows:

Experiments: 25%
Viva: 25%
Performance: t0%
Final Examination: 40%

i ..

You might also like