Design of a low pass FIR filter to remove the white noise that has corrupted the message received

Verified

Added on  2021/11/19

|7
|495
|100
AI Summary
MR=load('MessageReceived.mat'); testData=MR.UNKNOWNSIGNAL(); Msig=abs(testData); t=1:length(Msig); figure(1) plot(Msig) grid on title('Corrupted Received Message y(n)') %Designing the Low Pass filter for FIR Mb=fir1(42,fc,chebwin(43,30) figure(2) freqz(Mb,1,Mb;length(
tabler-icon-diamond-filled.svg

Contribute Materials

Your contribution can guide someone’s learning journey. Share your documents today.
Document Page
DIGITAL SIGNAL PROCESSING
NEE3208 SIGNAL PROCESSING
ASSIGNMENT 3
STUDENT NAME
STUDENT ID NUMBER
INSTRUCTOR (PROFESSOR/TUTOR)
DATE OF SUBMISSION
tabler-icon-diamond-filled.svg

Secure Best Marks with AI Grader

Need help grading? Try our AI Grader for instant feedback on your assignments.
Document Page
TASK
Design of a low pass FIR filter to remove the white noise that has corrupted the message
received. The FIR filter is of the form,
y ( n )=
i=0
M1
h ( i ) x ( ni )
Part 1
Designing the kernel filter h(n) by defining its impulse response.
The non-recursive finite impulse response is given as,
y ( n )=h ( 0 ) x ( n ) +h ( 1 ) x ( n1 )+ +h ( N ) x ( nN )
Norder of the filter
For a finite duration, the impulse response is given as,
To obtain the ideal low pass filter,
c
sin1
( ) sinc
2
c
c
cj n c
d
n
h n Ae d A A n
n











Document Page
For windowing,
hw ( n ) =hd ( n ) w ( n )
¿ 1
2 π Hd ( ω )W ( ω )
The impulse response of the FIR filter, following the Hamming window, is, therefore, given as,
h [n]= sin ( ωc ( nL ) )
π ( nL ) w [ n ]
Part 2
Evaluate the transfer function using DFT. Magnitude of the transfer functions.
Hd ( ω )=DTFT {hd ( n ) }=
n=
+
hd ( n ) e jωn
Part iii
Apply the filter in the frequency domain to X(k). Obtaining the inverse DFT to get filtered signal
and determining the cut-off frequency
hd ( n )=IDTFT { Hd ( ω ) }
¿ 1
2 π
ωc
+ωc
A e jωn
¿ A ( sin ( ωc n )
πn )
¿ A ( ωc
π )sinc ( ωc
π n )
Part iv
Applying the filter in the time domain to obtain the filtered signal y(n)
Document Page
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
Normalized Frequency ( rad/sample)
-2000
-1500
-1000
-500
0
Phase (degrees)
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
Normalized Frequency ( rad/sample)
-100
-50
0
Magnitude (dB)
0 5 10 15
105
0
5000
10000
15000
Original Signal
0 5 10 15 20 25 30 35 40 45
Time(s)
-0.2
0
0.2
0.4
0.6 LowPass Filtered Signal
tabler-icon-diamond-filled.svg

Secure Best Marks with AI Grader

Need help grading? Try our AI Grader for instant feedback on your assignments.
Document Page
0 10 20 30 40 50 60 70 80 90
-5
0
5
10
15
20
25
30
35
40
45 Impulse response of the Message After Filtering
Discussion
Filters are used to remove disturbances; in this case, the message signal is corrupted by white
noise during transmission. At the receiver end, the message received is distorted by the noise and
a low pass filter FIR is designed to remove the white noise. Let the low pass filter have
ω p=0.4 π , ωs=0.6 π
Attenuation=50 dB(stopband )
The transition band,
ωsωp=0.2 π
Using the Hamming window,
Document Page
8 π
M , M =40
The window is given as,
ω [ n ] = {0.540.46 cos ( 2
M ) 0 n M
0 otherwise }
h [ n ] = [ 0.540.46 cos ( 2
M ) ] [ 0.5 sinc n20
2 ] 0 n M
The MATLAB implementation,
%% ASSIGNMENT 3
%VICTORIAL UNIVERSITY-MELBOURNE AUSTRALIA
%NEE3208 SIGNAL PROCESSING
%introduction
clear
close all
format short
clc
%% Initializing several parameters
N=10; %filter order- length of the test input signal
fs=36e2; %sample frequency
fc=0.48; %Cut off frequency
Ap=0.01; %pass band ripple
Ast=80; %stop band attenuation
% loading the data.
MR=load('ReceivedMessage.mat');
testData=MR.UNKNOWNSIGNAL();
Msig=abs(testData);
t=1:length(Msig);
figure(1)
plot(Msig)
grid on
title('Corrupted Received Message y(n)')
%Designing the Low Pass filter for FIR
Mb=fir1(42,fc,chebwin(43,30));
Outr=filter(Mb,1,length(Mb));
figure(1)
subplot(2,1,1)
Document Page
plot(t,Msig,'b-*');
title('Original Signal');
grid on
subplot(2,1,2)
plot(Mb,'r-*')
grid on
title('LowPass Filtered Signal')
xlabel('Time(s)')
%Using the window size
figure(2)
freqz(Mb,1);
figure(3)
te=1:length(Mb);
hy=conv(Mb,te);
plot(hy)
grid on
title('Impulse response of the Message After Filtering')
chevron_up_icon
1 out of 7
circle_padding
hide_on_mobile
zoom_out_icon
[object Object]

Your All-in-One AI-Powered Toolkit for Academic Success.

Available 24*7 on WhatsApp / Email

[object Object]