DSP Practical - Experiment 8

To design an FIR Low-Pass Digital Filter using a Rectangular Window

Aim

To design a Low-Pass FIR Digital Filter with specific frequency response specifications using the Rectangular Window method.

Problem Statement

Design an FIR low-pass digital filter with the following specifications:

          H(e^jw) = e^(-jwA), for -π/2 <= w <= π/2
          H(e^jw) = 0, for π/2 <= w <= π
        

The filter length is given as N = 7, and the Rectangular Window is used for the design.

Theory

The design of an FIR filter using the Rectangular Window method involves multiplying the ideal impulse response of the filter by a rectangular window function. This approach results in a filter that satisfies the desired frequency response specifications. The process includes:

  1. Define the desired cutoff frequency and the length of the filter.
  2. Calculate the ideal filter response using the sinc function.
  3. Apply the rectangular window to the ideal filter response.
  4. Use the `freqz` function to compute and plot the frequency response of the designed filter.

MATLAB Code

Expected Output

The MATLAB code generates a plot showing the magnitude response of the designed FIR low-pass filter. The expected output should display:

  1. A low-pass filter with a passband from -π/2 to π/2 and a stopband from π/2 to π.
  2. A magnitude response that closely approximates the ideal filter response, with the transition between passband and stopband clearly visible.

The use of the rectangular window will introduce some ripple in the stopband, and the transition band will not be as sharp as in other window methods like the Hamming or Blackman-Harris window.