BE2M31CZS/BE2M31DSPA Exercise
Optimum design of IIR and FIR Filters from
Tolerance Scheme
Tasks to do:
- Design of IIR filter from given tolerance scheme
- Design bandpass IIR filter fulfilling requirements of the
following tolerance scheme:
- sampling frequency: fs = 16000 Hz
- pass-band boundary: 400 Hz, 3300 Hz
- stop-band boundary: 200 Hz, 3500 Hz
- maximum ripple in passband: Rp = 1 dB
- minimum ripple in stopband: Rs = 40 dB
- Find the lowest order fulfilling given requirements for all
possible approximations of IIR filter magnitude response (use
functions buttord, cheb1ord, cheb2ord,
ellipord).
- Compare achieved orders, frequency responses of achieved filters and check their
stability!
- Realize the filtering of signals saved in the file
speech_8_16_44.mat (binary
MATLAB format, it contains 3 signals saved in variables sig8, sig16
and sig44 for fs=8, 16 or 44.1 kHz respectively. To load signals into
MATLAB use the command "load
speech_8_16_44.mat")
- Checked result:
- observe frequency responses of
designed filters for all sampling frequencies fs = 8, 16, and 44.1 kHz,
- compare achieved orders of designed filters and check their stability,
- for signal sig16 sampled by sampling frequency of 16
kHz realize the filtering and observe spectrograms of original and filtered signals.
- Design of FIR filters from tolerance scheme
- Observe the shape as well as the spectrum of Kaiser window for
various values of N and beta (fcn kaiser)
- Checked result:
- display Kaiser window of the same length of M=101
samples for values
beta = 0, 2, 8, 15 and observe also their power spectra in dB for NFFT
= 1024,
- analogous way, display Kaiser window with the same beta = 8 with lengths
M=31, 51, 101, 201 samples as well astheir power spectra in
dB (again for NFFT = 1024).
- Designs bandpass filter using Kaiser method
(fcn kaiserord, fir1) fulfilling the requirements
mentioned above.
(ATTENTION! The parameters of tolerance scheme must be specified
slightly differently in domparison to IIR filter design).
- Compare achieved order and frequency responses with above achieved
results for IIR filters (for both sampling frequencies).
- Repeat the design using the Park-McClellan equiripple FIR filter (Remez
algorithm, MATLAB functions firpmord and firpm) and observe difference in ripples in passband and stopband
same s achieved orders of designed filters.
- Checked result:
- observe frequency responses of designed filters for all sampling
frequencies fs=8, 16, and 44.1 kHz,
- compare orders of designed filters (compare it also to IIR filters).
- Comparison of signal filtered using IIR and FIR filters
- For above mentioned signal sig16 sampled by the frequency 16 kHz
observe waveforms of input and output signals using
FIR filters (designed by Kaiser method as well as by
Parks-McClellan approximation) and an IIR filter (anyone with stable
solution for given sampling frequency)
- Checked result:
- display always within 3 particular figures the input signal
sig16 and the result of each of previously mentioned 3 filters and
observe the delay of output signals as well as the possible change
of signal shape.
- observe also frequency resposes of used FIR and IIR
fileters and compare especially their pahse responses.
HOMEWORK
- Design of narrow-band stopband filter
- Design stopband filter to remove 50 Hz disturbance in ECG
signal. Take into account the stop band with boundaries
48 < f < 52 and sampling frequency 200 Hz.
- ECG: ekg1.asc, fs = 200 Hz,
ASCII format, use
load to download the signal into MATLAB.
- ECG with 50Hz disturbance: ekg50.asc, fs = 200 Hz.