PART 2: IIR FILTER DESIGNS

DESCRIPTION

2-B: BUTTERWORTH LOWPASS IIR FILTER DESIGN

                Based on the given sample files, design a Butterworth IIR digital lowpass filter for removing the noise by the MATLAB function butter(). The specifications of the filter are stopband attenuation more than 40dB and passband ripple lower than 0.03dB, which attempts to remove the unwanted componenets in the signal. You have to determine the passband and the stopband edge frequencies based on your results in Part 1. In addition, you are also required to use the minimum filter order that can satisfy the specifications.

1.    Study the MATLAB functions butter()  and buttord()  for Butterworth IIR filter design using bilinear transformation method. Use the buttord function to determine the minimum filter order based on the results of the Part 1. Show your MATLAB code, filter order, passband and stopband edge frequencies to the instructor.

2.    Design the IIR filter using butter MATLAB function. Plot the designed filter frequency responses (Magnitude and Phase) to see whether the specifications are met. Check the passband and stopband edge frequencies, they may not be the same as input arguments to the function. Save the filter coefficients into a file if the filter satisfies the specifications, otherwise redesign the filter with different sets of parameters. Plot the filter impulse responses, i.e. its coefficient using stem function.

3.    Remove the noise of the noisy signal using the designed filter by the filter() MATLAB function. For example, if the noisy signal is stored in the vector x and the designed IIR filter coefficients are stored on the vectors a and b, then we can obtain the filtered signal in vector y by:

4.    Evaluate the effectiveness of the designed filter by computing the MSE (mean squared error) and SNR (signal to noise ratio) between the original signal and the filtered noisy signal. The MSE and SNR are defined as:

       (7) & (8)

where s(n) is the original signal sample, y(n) is the filter noisy signal samples. Write MATLAB code to compute the MSE and SNR. Plot the original and filtered signal on the same figure for both time and frequency domains. How does the filtered version sound? Show your answers to the instructor.

5.     Compare the FIR and the IIR lowpass filter that you have designed, comment on their structural effectiveness, and their performance.

6.     Comments precisely the quality of sound given by the noisy file following the filtering process.
 

RESULTS

Figures:

Frequency Response (Magnitude & Phase) Of The IIR Filter

Filtered Signal In Time Domain

 

Filtered Signal In Frequency Domain (Magnitude & Phase)


Sounds:

Filtered sound using the IIR

 

MSE between the noisy signal and the original signal                 = 0.0573
MSE beween the filtered signal to the original signal                  = 0.0694
SNR for the noisy signal to the original signal (before filtering)   = -5.3796
SNR for the filtered signal to the original signal                          = -6.2099
 

OBSERVATION AND ELABORATION

From the results, he can see that the IIR filter has got a sharper transition between passband and stopband compared to the the FIR filter. Therefore, we can precisely elimate the unwanted noise effectively using the IIR filter. After playing the filtered sound using the IIR filter, we find that it is of better quality than the one generated using FIR filter.
 
 

M-files scripts
 
IIR Filter Scripts