Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

Infinite Impulse Response Filter Design

Abstract: According to the Nyquist Theorem, Nyquist rate can be get as


following:
Digital filter design and evaluation: this homework studied the Fnyquist = Fsample/2=16kHz. This Nyquist rate will be used
design, simulation and performance of IIR and FIR filters. Based for normalization of the frequency in x axis.
on the assumption of sample rate of 32kHz and related
specification, Elliptical filter, one Chebychev I and one FIR (linear My home phone number is (402) 484-8496.
phase) bandpass filter were designed and evaluated , including So the following parameter can be got:
filtering the sinusoidal signal and noise signal.
Keywords: IIR filter, FIR filter, Elliptical, Chebychev I, Pass band width = 484
bandwidth, bandpass, sample rate, stop band, center frequency, Stop band frequency will be Fstop=2*484
Center frequency= 8496Hz

I. SEPECATIONS AND REQUIREMENT Pass band will be [8496-484/2, 8496+484/2]


Stop band will be [0, 8496-484] and [8496+484, 16000].

Specifications 1: phone number can be written as 484 8496. Stopband attenuation Rs=40dB
Passband ripple Rp=1dB.
the center frequency of your bandpass filter as 8496Hz.
The basic structure of passband filter has been shown in figure
the bandwidth of your bandpass filter as 484Hz. 1, where
Fstop1=8496-484=8012
Specifications 2: stop band attenuation equal to 40dB.
passband ripple less than or equal to 10dB. stop band Fpass1=8496-484/2=8254
frequencies is selected as 8990(=8496 +484)Hz and 8012 Fpass2=8496+484/2=8738
(=8496 -484) Hz Fstop1=8496+484=8999

. The figure can be got from MATLAB special tool FDAtool. It


Delivery1: Show magnitude, phase and group delay plots for just illustrate the filter structure in the paper. Filter will be
these filters. Vary the axes to make the plots useful and designed by program code (attached).
informative. Please label the axes clearly.
Delivery2:
Evaluate the performance of these filters for different input
sinusoidal in the time domain (try one each in the passband,
stopband, and transition band). Compare the time domain
output you see with the expected result. When does each filter
reach steady state?
II. PARAMETER
The IIR filter is infinite impulse response filter. Its equation
can be expressed as Figure 1 The basic structure of bandpass filter
y[n]=aox[n]+a1x[n−1]+++aM−1x[n−(M−1)]
The order is a key parameter for filter. The project will use the
−b1y[n−1]−b2y[n−2]−−bNy[n−N] cheb1ord() and ellipord() to get the order automatically. But
IIR output not only depends the past input signal, but also the orders that got the two functions are the minimal order for
depends on the past output signal. filters. The Chebychev filter will get 5th order while the
While FIR filter is finite impulse response filter. Elliptical filter will have 4th order.
y[n] = ao x[n] + a1 x[n − 1] +  + +aM −1 x[n − (M − 1)] It
Chebychev filter’s with 5th order for this project was shown in
depends on past input signals only. following figure, including magnitude, phase and group delay.
It can be seen group delay happen during the pass band.
Per the project requests, two IIR filters will be selected as
Elliptical and Chebychev I and one FIR Filter will be designed
also for comparison.
The sample frequency Fsample =32kHz.
Figure 2 Chebychev I Filter Figure 4 Elliptical Filter with 4th order

Following figure shows the magnitude of Chebychev I filter Following figure shows the magnitude of Elliptical filter
separately. It shows the filter can meet the specification well. separately. It shows the filter can meet the specification well.

Figure 3 Chebychev I Filter Magnitude

The Elliptical filter was also designed with 4th order according
to ellipord() and its magnitude, phase and group delay have Figure 5 Elliptical Filter Magnitude
been shown in the following figure.
It can also be seen that group delay exists during the pass band. For the purpose of comparison among different types of IIR
and FIR filter, FIR filter with 500 order was also designed.
The FIR filter was also designed with 500 order according to
and its magnitude, phase and group delay have been shown in
the following figure.
It can be seen that group delay was a fixed value of 250, half of
the filter order and it exits along the frequency axis.
The follow figure shows the 1 st sinusoidal signal with 8300Hz
passes through three different type filter. All three filters have
delay than original input signal. And the magnitude of signal
from FIR attenuated most. The elliptical filter reduced the
signal magnitude less than FIR filter does. And the magnitude
of signal from Chebychev 1 filter attenuated less and is most
closed to the original output.

Figure 6 FIR filter with 500 orders

Following figure shows the magnitude of FIR filter separately.


It shows the filter can meet the pass band ripple and stop band
attenuation well. But it didn’t meet well the cut off frequency
Figure 8 Sinusoidal signal and Filters output
requirement exactly. In order to fix this, bigger order for FIR
filter is suggested.
The follow figure shows the 2 nd sinusoidal signal with 8888Hz
passes through three different type filter.
All three signals attenuated in the transition band. It is clear
that the magnitude of signal in FIR is bigger than the other
two signals. So the elliptical filter and Chebychev I filter make
the signal attenuate more than FIR filter does in the transition
band.

Figure 7 FIR Filter Magnitude (500 order)

Based on the requirement of the project to evaluate the


performance of the three filter for different input sinusoidal in
the time domain, each filter will be tested in the pass band,
stop band and transition band.
The pass band is [8254, 8738], so the first sinusoidal signal
frequency was selected as 8300Hz.
The transition band is [8738, 8990], so the 2nd sinusoidal Figure 9 Sinusoidal signal in transition band
signal frequency was selected as 8888Hz.
The stop band is [0, 8012] and [8990, bigger value]. So the 3 rd The follow figure shows the 3rd sinusoidal signal with
sinusoidal signal frequency was selected as 11111Hz. 11111Hz passes through three different type filter in the stop
band.
All three signals attenuated in the transition band. It is clear
that all three filters have eliminated the signals. No signal pass
through the stop band.

Figure 12 Signals output from Filters in stop band


Figure 10 Sinusoidal signal in stop band

When does each filter reach steady state?


Elliptical filter has the fastest speed to reach the steady state. It
takes about 0.006to reach steady.
It takes about 0.008s for Elliptical filter to reach steady while
FIR takes about 0.01s.
Due to delay, FIR is more slower than the other two filters.

Figure 13 Signals output from Filters in transition band

In the transition band, FIR takes about 0.013s, Elliptical takes


about 0.015s, Chebychev I takes about 0.04s. That means the
Chebychev I filter has more fluctuation of signal.
Figure 11 Delay Caused by Three Filters

In the stop band band, FIR takes about 0.01s, Elliptical takes
about 0.005s, Chebychev I takes about 0.009s.
The pulse response of IIR is shown in following two figures. One is
Chebychev, the other is Elliptical. Both of their length are infinite. The
magnitude is 0.03. This magnitude is same as FIR filter’s.

Figure 16 Impulse response of FIR Filter

The following figures show that the noise filtering performance of three filter.
Only the noise whose frequency within the passband of the filter can be output.
Figure 14 Impulse response of Chebychev Filter Or the other noise whose frequency in the stop band is eliminated by these
filers. So the filters have good performance.

F
igure 15 Impulse response of Elliptical Filter

The pulse response of FIR is shown in following figure. It is symmetrical at


the center point of 250 and the length of the response is 500, which is same as
FIR order. The center point is 250, which is half of FIR order. The
magnitude is 0.03. This magnitude is same as FIR filter’s.

Figure 17 Noise Filtering passing through Three Filters


The power density of noise can be obtained with the Matlab code. The
following figures show different power density of different filter. It is found Figure 20
that the power density of the output is concentrated in the pass band of all Noise
filters. Filtering
with
Elliptical
Filter

The IIR filter


order can
also be
assigned
with bigger value, but attention should be paid that this may cause the IIR
filter be unstable. It has be tested that 20th order will make Chebychev1 be
unstable.
FIR filter can have much higher order for accurate calculation at the cost of
delay and huge work load of computation.

Figure 18Noise filtiering with Chebychev I filte

Figure 21 Chebyche I filter with 20 order

Conclusion
Through the Matlab code program three different filters were analyzed. The
performance of filters and design process of IIR and FIR filter were learned.

Figure 19 Noise Filtering with FIR Filter

[1] ALAN V. Oppenheim, Discrete-Time Signal Processing, 3rd, ed. 2010,


by Pearson Higher Education, Inc., NJ 07458.
[2] Michael, Hofmann. Homework assignment.
[3] Matlab program.

You might also like