EELE420 Matlab

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 4

EELE420

Digital Signal Processing


Spring 2024
Assignment 1
Name: sadiq bello Muhammad
Student number: 22204679

Mini Project using MATLAB


Project Title: Reducing the undesired effects of noise when a given signal is
corrupted by noise with known (partially) statistics.
Project Steps:
Let 𝑥0 be the original and 𝑥 be the measured signal which is affected by additive
white Gaussian noise.

𝑥[𝑛] = 𝑥0[𝑛] + 𝑁(𝑛)


where 𝑁(𝑛) is the noise. Our task is to use moving average filter to extract 𝑥0[𝑛]
from the observed signal 𝑥[𝑛].

i) Define the original signal as 𝑥0[𝑛] = cos (𝜋 8 𝑛) + 2cos (2 13


𝜋

𝑛).
ii) Define the domain as −20 < 𝑛 < 20 iii) Generate the noise
signal by using randn command iv) Add noise signal to the
original signal and obtain observed signal 𝑥[𝑛].
v) Implement the moving average filter to 𝑥[𝑛] and define it as 𝑦[𝑛]. Use
conv(. ,. , ‘same’) function to implement
𝑦[𝑛] = 𝑥[𝑛] ∗ ℎ[𝑛].
vi) Implement filter for different 𝑀1and⁡𝑀2; 𝑀1 = ⁡𝑀2 = 4,10,20 … and
observe the output. vii) Plot 𝑥0[𝑛], 𝑥[𝑛] and 𝑦[𝑛] for every step.

Project code:
Plotted graph.

You might also like