Signal Processing Assignment1
Signal Processing Assignment1
Table of Contents
General Information ............................................................................................................................. 1
Clean Up ........................................................................................................................................... 1
Define Parameters ............................................................................................................................... 1
Saving the signals data in xlsx file ......................................................................................................... 2
Plotting The Signals ............................................................................................................................ 2
General Information
Author: Haider Hasan Hamood
Objective: We want to generate a sinusoidal signal with 3 different frequencies and add noise to it and analyze the 2
signals using "Signal Analyzer" app to see the impact of the noise on the signal
Clean Up
clear;
clc;
close all;
Define Parameters
frequencies = [5 10 15]; % [Hz] the 3 frequencies for the signal
Fs = 500; % [Hz] The sampling frequency
Ts = 1/Fs; % [s] The sampling time
1
Assignment 1: Signal Pro-
cessing Using Matlab
subplot(3, 1, 1);
plot(t, signal_no_noise);
xlim([0 6]); ylim([-1.5 1.5]);
ylabel('Power [mW]'); xlabel('time [s]');
title('The Signal (No Noise)');
grid on;
subplot(3, 1, 2);
plot(t, signal_with_noise);
xlim([0 6]); ylim([-1.5 1.5]);
ylabel('Power [mW]'); xlabel('time [s]');
title('The Signal (with Noise)');
grid on;
subplot(3, 1, 3);
plot(t, signal_with_awgn);
xlim([0 6]); ylim([-1.5 1.5]);
ylabel('Power [mW]'); xlabel('time [s]');
title('The Signal (with AWGN)');
grid on;
2
Assignment 1: Signal Pro-
cessing Using Matlab
3
University of Kufa 19th – Feb – 2024
Assignment 1: Signal
Processing Using Matlab
Haider Hasan Hamood // 3rd Stage -Morning Study-
ECE // University of Kufa
5 Hz 10 Hz 15 Hz
5 Hz 10 Hz 15 Hz
5 Hz 10 Hz 15 Hz
Fig. 4: The Signal in time and frequency domain (With Noise and Without Noise)
Discussion
From the power spectrum (frequency domain) in Fig. 2, we can see that the high power
components of the signal is at 5, 10, and 15 Hz (see red circles) which represents the frequency
values of the sinusoidal signal, after 15 Hz, the power starts to drop to very low values (below -
80 dB) because the signal doesn’t have frequency components after the highest frequency (15
Hz), but if we look at the signal in Fig. 3, we notice that the signal is distorted with white noise.
Even though the power is still concentrated at the 3 main frequency values (see red circles), the
white noise added to the signal results in power presented in frequencies higher than 15 Hz (see
the power spectrum), and since the power of the noise isn’t high, the power in higher frequencies
is still low (in the range of -50dB).
Fig. 4 clarifies the difference between the pure sinusoidal signal and the distorted signal even
further.