You are on page 1of 6

Digital Signal Processing

EE-414
Lab Report 10 Fall 2022

Obtained Marks
Total Marks

Lab Engineer Signature &


Section & Comments

Group
Student Name

1. Muhammad Afaq Younas

2. Asad Iqbal

3. Muhmmad Abdullah

Section: Electronics Group: 9

Experiment No: 10 Date of Submission:


12/12/2022

Experiment Title:
Digital FIR Filter Design

Batch: BSEE Teacher:


2019-23 Dr. Sufi Tabassum Gul

Semester Lab Engineer:


7th Ms. Arhama Riaz

Department of Electrical Engineering


10.1. OBEJECTIVES:
The objectives of this lab were to:

• To design Finite Impulse Response (FIR) filters and analyzes their responses on
MATLAB.

10.2. EQUIPMENT:
• Computer/Laptop
• MATLAB Software.

10.3. USEFUL MATLAB FUNCTIONS:


• Remez : uses the weights in vector w to weight the fit in each frequency band
• remezord: finds the approximate order, normalized frequency band edges, frequency
band amplitudes, and weights that meet input specifications f , a , and dev
• kaiserord: converts the given filter specifications into passband and stopband ripples
and converts cutoff frequencies into the form needed for windowed FIR filter design.
• kaiser: This MATLAB function returns an L-point Kaiser window with shape factor
beta

10.4. TASKS:
10.4.1. TASK 1: Determine the transfer function and gain response of Equiripple linear-
phase FIR lowpass filter. The filter was designed for the following specifications:
• Passband edge frequency (Fp) = 800Hz
• Stopband frequency(Fs) = 1000Hz
• Passband ripple = 0.5 dB
• Minimum stopband attenuation in dB = 40 dB
• Sampling Frequency FT = 4000Hz
10.4.2. TASK 2: Generate Kaiser window and use it to design a lowpass FIR filter The
filter was designed for the following specifications: 
• Passband edge frequency (Wp) = 0.3π 
• Stopband frequency(Ws) = 0.4 π 
• Stopband attenuation (αs )= 50 dB 
• Peak stopband ripple = 0.003162.
10.4.3. TASK 3 : Design a Least-Square Error FIR filter. The filter was designed using
the following specifications: 
• Passband edge frequency (Fp) = 800Hz 
• Stopband frequency(Fs) = 1000Hz 
• Passband ripple (αp )= 0.5 dB 
• Minimum stopband attenuation (αs )= 50 dB
10.4.4. Task 4: Generate a noise corrupted signal 𝑥[𝑛] = 𝑑[𝑛] + 𝜈[𝑛]. The desired signal
𝑑[ 𝑛] consists of sinusoids with frequencies 0.1𝜋, 0.3𝜋, 𝑎𝑛𝑑 0.8𝜋 and the noise signal
𝜈[𝑛] has frequency spectrum between 0.32𝜋 𝑡𝑜 0.78𝜋. Design an appropriate Linear
Phase filter to filter noise from 𝑥[𝑛]. Draw the frequency response of this filter. Pass
the the signal 𝑥[𝑛] from this filter to obtain the signal 𝑦[𝑛] and plot the filtered signal
and compare it with the actual signal. Plot the frequency responses of 𝑑[𝑛], 𝑥[𝑛], 𝑣[𝑛],
𝑦[𝑛]
10.5. DISCUSSION:
The purpose of this lab was to design FIR digital filters. In signal processing, a finite impulse
response (FIR) filter is a filter whose impulse response (or response to any finite length input)
is of finite duration, because it settles to zero in finite time. This is in contrast to infinite impulse
response (IIR) filters, which may have internal feedback and may continue to respond
indefinitely (usually decaying). An FIR filter has a number of useful properties which
sometimes make it preferable to an infinite impulse response (IIR) filter. FIR filters:
• Require no feedback. This means that any rounding errors are not compounded by
summed iterations. The same relative error occurs in each calculation. This also makes
implementation simpler.
• Are inherently stable, since the output is a sum of a finite number of finite multiples of
the input values, so can be no greater than {\textstyle \sum |b_{i}|}{\textstyle \sum
|b_{i}|} times the largest value appearing in the input.
• Can easily be designed to be linear phase by making the coefficient sequence
symmetric. This property is sometimes desired for phase-sensitive applications, for
example data communications, seismology, crossover filters, and mastering.
The same theory of FIR filter was implemented using the commands mentioned above along
with their use.

10.6. CONCLUSION:
FIR digital filters were implemented in this lab and their characteristics were observed using
matlab. Frequency response of the 4 tasks were recorded and the different results were obtained
for each of the filter.

You might also like