0% found this document useful (0 votes)
22 views6 pages

Rakibul DSP - 8 Final

The document describes designing a digital FIR band stop filter in MATLAB to remove a frequency component from a noisy signal. It generates a signal with four frequencies based on the student's ID. It then designs an FIR filter to remove one of the frequencies and verifies the filter's operation by analyzing time and frequency domain plots of the original, filtered, and impulse/frequency responses.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views6 pages

Rakibul DSP - 8 Final

The document describes designing a digital FIR band stop filter in MATLAB to remove a frequency component from a noisy signal. It generates a signal with four frequencies based on the student's ID. It then designs an FIR filter to remove one of the frequencies and verifies the filter's operation by analyzing time and frequency domain plots of the original, filtered, and impulse/frequency responses.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

Department of Electrical and Electronic Engineering

LAB REPORT
Experiment Name : Design of Digital FIR filter and its application signal
separation
Experiment : Open Ended Lab
Course Name : Digital Signal Processing
Sessional Course Code : EEE-3604

Submitted To
Engr. Md. Abdul Kader
Assistant Professor
Department of EEE,
Submitted By IIUC

Name : Irfan Nur Shahid


Student ID : ET 213005
Email id :
et213005@ugrad.iiuc.ac.bd Semester Remark
Remark
: 6th
Section : 6A
Department : EEE
Date of Experiment
: Date of Submission
:
ET-213005 page : 1

Objective:

1. To Study the Impact of Window Functions in FIR Filter Design.


2. To Explore the Conversion of Low-Pass to High-Pass Filters.
3. To Investigate the Use of FIR Filters in Signal Separation.

Filter Description:

The steps provided outline how to design a lowpass FIR filter in MATLAB.

1. Specify the Filter Order:

- Choosing the desired filter order (the length of the filter impulse response). A higher order
results in narrower transition widths and higher stopband attenuation but increases computational
complexity.

2. Choose a Window Function:

- Selecting a suitable window function to shape the filter's frequency response. Common
window functions include Hamming, Bartlett, Blackman, and more. The choice of window
affects the side lobe characteristics of the filter.

3. Design the Filter Coefficients:

- MATLAB provides functions like `firce qrip` and `figure` for designing FIR filter
coefficients. These functions take inputs such as filter order, passband frequency, stopband
frequency, and window function to generate a vector of filter coefficients. Alternatively, we can
design filter coefficients manually using mathematical expressions.

hd=sin(wc*(n-(M-1)./2))./(pi*(n-(M-1)./2))

4. Implement the
Filter:

- Once we have the filter coefficients, apply the filter to your input signal using the `filter`
function in MATLAB. This function takes the filter coefficients and the input signal as inputs
and produces the filtered output signal.

Problem:

Generate a signal which has four frequency components of frequency f1, f2, f3 and f4 (in Hz)
where; f1=23*L , f2= 12*(M+2) , f3=17*(N+2) and f4=11*|L+M-N| (Take the absolute value of
(L+M-N). [L, M, and N should be taken from your matric ID comparing your ID with the syntax
ET-ALBCMN] Now design a digital FIR filter (using MATLAB) which will remove f1 or f2 or
f3 or f4 frequency (choose f1 if MN is even-even, f2 if MN is even-odd, f3 if MN is odd-even,
else f4 from the signal. You are not allowed to use any in-built functions of FIR filter or, filter
ET-213005 page : 2

design toolbox. After design, you must verify your filter operation by analyzing the following
graphs:

a) Time domain and frequency domain plot of the generated signal.

b) Impulse response and frequency response of the designed filter.

c) Time domain and frequency domain plot of filtered signal.

Program:

Here my ID is ET-213005. Compared with ET-ALBCMN, we get the frequencies, f1=23; f2=60;
f3=153; f4=-33 After generating a raw/noisy signal with these frequencies, I have to design a
digital FIR Band Stop filter to remove the f2=60 frequency from the raw signal.

Band Stop Filter:


ET-213005 page : 3

Signal Separation:
ET-213005 page : 4

Result:

Fig. 01: Time domain and frequency domain representation of Noisy and Filtered signal.Analysis:

a) Time domain and frequency domain plot of generated signal:

- The code generates a noisy signal `y_05` by summing four sinusoidal components with
different frequencies.

- It then plots the generated signal in the time domain using `subplot(3, 2, 1)` and labels it as
"Generated Noisy Signal in Time Domain-ET213037."

- In the frequency domain, the code calculates the Fast Fourier Transform (FFT) of the signal
and plots it in `subplot(322)`. This plot shows the frequency components present in the noisy
signal.
ET-213005 page : 5

b) Impulse response and frequency response of the designed filter:

- The code designs a low-pass FIR filter (`h`) using the `fir_bandstop` function. The filter design
is based on a two cutoff frequency (`cut_off 1 , cut off 2`) and an order (`256`).

- The impulse response of the designed filter is plotted in `subplot(3, 2, 3)` using `stem(h)`. This
plot shows the filter's time-domain characteristics.

- The code also computes and plots the frequency response of the filter in `subplot(3, 2, 4)` using
the `freqz` function. This plot displays how the filter affects different frequencies.

c) Time domain and frequency domain plot of filtered signal:

- The original noisy signal (`y_21`) is filtered using the designed FIR filter `h` through
convolution, resulting in the filtered signal `filtered_sig`.

- The filtered signal is then plotted in the time domain using `subplot (325)`. This plot shows the
effect of the filter on the signal.

- In the frequency domain, the code calculates the FFT of the filtered signal and plots it in
`subplot (326)`. This plot displays the frequency components of the filtered signal.
Application :

This experiment has practical applications in real-world scenarios. For example:

1. Noise Reduction in Audio: It can be applied to clean up noisy audio recordings, reducing
unwanted background noise to enhance audio quality.

2. Feature Extraction in Data Analysis: In data analysis, it can help identify and extract
important patterns or features from noisy data, aiding in decision-making and insights.

3. Biomedical Signal Processing: In biomedical applications, it helps clean up heart and brain
signals by removing unwanted noise and keeping important data

Discussion:

The goal of this MATLAB project is to clean up a noisy signal by using a band-stop filter. Similar to a
tool, the filter can be modified to eliminate unnecessary components of the signal while retaining the
crucial ones. I select the band stop filter, the cutoff frequency, and the signal's "windows" based on my
analysis of the signal. It follows that the signal in the subplot (3,2,6) is free of the f2 frequency
component.
Real-world applications include improving the audio quality of noisy recordings and extracting crucial
information from jumbled signals. It's a method of using signal processing techniques to improve the
utility and comprehension of signals.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy