Exp 10 DSP
Exp 10 DSP
Name :
Register No. :
Day / Session :
Venue :
Title of Experiment :
Date of Conduction :
Date of Submission :
Marks
Particulars Max. Marks
Obtained
Pre lab and Post lab 10
Lab Performance 10
Total 30
REPORT VERIFICATION
Staff Name :
Signature :
Experiment 10(a) Design of Analog Butterworth filter
Theory: The signal processing filter which is having a flat frequency response in the passband
can be termed as Butterworth filter and is also called as a maximally flat magnitude filter. In
1930 physicist and the British engineer Stephen Butterworth described about a Butterworth filter
in his “on the theory of filter amplifiers” paper for the first time. Hence, this type of filter named
as Butterworth filter. There are various types of Butterworth filters such as low pass Butterworth
filter and digital Butterworth filter. The frequency response of the nth order Butterworth filter is
given as
Where ‘n’ indicates the filter order, ‘ω’ = 2πƒ, Epsilon ε is maximum pass band gain, (Amax).
Algorithm:
Step 1: For the given Cutoff frequency, band ripple and stopband ripple find the order of the
filter
Step 2: Round the order of the filter to the next higher order integer
Step 3: Determine the magnitude and phase response of the analog Butterworth filter to Plot
Program:
Simulation Output:
Experiment 10(b) Design of Analog Chebyshev filter
Theory: Chebyshev filters are used for distinct frequencies of one band from another. They
cannot match the windows-sink filter’s performance and they are suitable for many applications.
The main feature of Chebyshev filter is their speed, normally faster than the windowed-sinc.
Because these filters are carried out by recursion rather than convolution. The designing of the
Chebyshev and Windowed-Sinc filters depends on a mathematical technique called as the Z-
transform. Types of Chebyshev Filters
Chebyshev filters are classified into two types, namely type-I Chebyshev filter and type-II
Chebyshev filter.
Type-I Chebyshev Filters
This type of filter is the basic type of Chebyshev filter. The amplitude or the gain response is an
angular frequency function of the nth order of the LPF (low pass filter) is equal to the total value
of the transfer function Hn (jw)
Gn(w)=|Hn (jω)|=1√(1+ϵ2Tn2() ω/ωo)
Where,ε=ripple factor
ωo= cutoff frequency
Tn= Chebyshev polynomial of the nth order
The above equation produces the poles of the gain G. For each pole, there is the complex
conjugate, & for each and every pair of conjugate there are two more negatives of the pair. The
TF should be stable, transfer function (TF) is given by
Algorithm:
Step 1: Convert the given analog frequencies to digital domain
Step 2: Prewarp the frequency components and find the prewarping frequency
Step 3: Determine the order of the filter and round to next higher order integer
Step 4: Convert the analog transfer function to digital by using Bilinear transformation technique
and plot the magnitude and frequency response
Program:
// Capt ion : To o b t a i n Di g i t a l I IR Chebyshev low pa s s
filter
// Fr equency r e s p o n s e
clc ;
clear ;
close ;
fp= input ( ' Enter the pass band edge (Hz ) = ' );
fs= input ( ' Enter the stop band edge (Hz ) = ' );
kp= input ( ' Enter the pass band attenuation (dB) = ' );
ks= input ( ' Enter the stop band attenuation (dB) = ' );
Fs= input ( ' Enter the sampling rate samples / s e c = ' );
d1 = 10^( kp /20) ;
d2 = 10^( ks /20) ;
d = sqrt ((1/( d2 ^2)) -1);
E = sqrt ((1/( d1 ^2)) -1);
// Di g i t a l f i l t e r s p e c i f i c a t i o n s ( rad / s ampl e s )
wp =2* %pi *fp *1/ Fs;
ws =2* %pi *fs *1/ Fs;
// Pre warping
op =2* Fs* tan (wp /2);
os =2* Fs* tan (ws /2);
N = acosh (d/E)/ acosh (os/op);
oc = op /(( E ^2) ^(1/(2* N)));
N = ceil (N); // rounded to n e a r e s t i n t e g e r
disp (N, ' I IR F i l t e r o r d e r N =' );
disp (oc , ' Cu t o f f Fr equency i n rad / s e c o n d s OC = ' )
[pols ,gn] = zpch1 (N,E,op);
HS = poly (gn , ' s ' , ' c o e f f ' )/ real ( poly (pols , ' s ' ));
z = poly(0,'z')
Hz = horner (HS ,(2* Fs *(z -1) /(z +1) ))
num = coeff (Hz (2) )
den = coeff (Hz (3) )
Hz (2)= Hz (2) ./ den (3) ;
Hz (3) = Hz (3) ./ den (3) ;
disp (Hz , ' Tr a n s f e r f u n c t i o n o f Di g i t l a I IR Chebyshev LPF H(Z)=' )
[Hw ,w] = frmag (Hz ,256) ;
figure (1)
plot (2*w*%pi ,20* log10 ( abs (Hw)));
xlabel ( ' Di g i t a l Fr equency W>' )
ylabel ( 'Magni tude i n dB 20 l o g jH(w) j= ' )
title ( 'Magni tude Re spons e o f I IR LPF ' )
xgrid (1)
Simulation Output
Prelab Questions:
1. List the differences between butterworth and Chebyshev filter
2. Define the term Prewarping and mention its importance
3. To design a Discrete time Low pass filter the specifications are
Passband Fp = 4 KHz with 0.8 dB ripple
Stopband Fp = 4.5 KHz with 50 dB attenuation
Sampling frequency Fs = 22 KHz
(i) Determine the passband and stopband frequencies (ii) Determine the maximum
and minimum values of |H (ω)| in the pass band and stopband
Postlab Questions:
1. List the properties of Chebyshev filter
2. In your CD the data is sampled at 44.1kHz, and we want to have a good sound quality
upto 21kHz. If you had to use an analog butterworth filter as reconstruction filter, What
would be the order of the filter?
3. Give the Normalized Low pass Butterworth Denominator polynomials for N=8,9,10.