Professional Documents
Culture Documents
The following specifications (Figure 2) were chosen after careful consideration and analysis of the
provided reference noise and song signal spectrums (seen later in Figure 5.1). It could be shown
through our analysis that there was minimal data from the song within these frequencies, allowing
for maximum retention of the original signal.
Name Frequency
𝐹𝑠 44100 Hz
𝑓𝑐 (High-pass) 95 Hz
Engineering Effort
Design Procedures
The following procedure was followed to achieve the desired results:
1. Analyze the frequency spectrums of both the noisy and unnoisy signals
2. Identify areas with large amounts of noise/corruption
3. Remove any found noise while maintaining as much of the original signal as possible
In analyzing the frequency spectrums, the areas of specified in Figure 1 were found to have the
larges amount of noise when compared with the reference noisy signal. In an effort to remove these
areas of interest, the following filters were created in MATLAB using the parameters described
above:
1
% Filtering
ROI_data_d = highpass(ROI_data,95,Fs);
ROI_data_d = bandstop(ROI_data_d,[270 377],Fs);
ROI_data_d = bandstop(ROI_data_d,[403 480],Fs);
ROI_data_d = bandstop(ROI_data_d,[830 1680],Fs);
Results
The resultant reduction in noise was measured by taking the power
of the measured data subtracted by the power of the song signal to Signal Noise Ratio
find the power of the original noise signal, as well as the power of
Original 7.546 dB
the denoised signal subtracted by the song signal to find the power
of the remaining noise. Using the respective noise ratios, it can be Denoised 19.793 dB
found that the signal to noise ratio increased by 2.616 times, or there
Figure 4. Signal to Noise Ratios
was 162.3% less noise after the filters.
Figure 5.1. Frequency Domain Analysis Figure 5.2. Highlighting Denoised Portion Figure 5.3. Comparison of Signals
Figure 5.1 displays the Fast Fourier Transform (FFT) of the measured data in addition to the noisy
data. This is used to determine which frequencies should be filtered out. Once the noisy data is
passed through our denoising algorithm, the resulting FFT can be seen in the lower plot of Figure
5.1. Effects of the four applied filters are shown with low amplitude valleys in the frequency data.
Then, it is converted to time domain using an Inverse Fast Fourier Transform, or IFFT. Figure 5.2
shows the denoised portion inserted into the non-corrupted data, having a lower overall amplitude
in comparison with the original noisy portion. This amplitude decrease can be seen more clearly in
Figure 5.3, where the denoised data is overlayed on top of the noisy data.
2
Discussion
In beginning analysis of the two provided signals, the original strategy was to remove frequencies
below a certain threshold, as had been done in the past for pervious exercises. For this particular
circumstance, however, this strategy proved fruitless, as the engine noise did not remain within any
given frequency threshold for the duration of the signal but rather changed along with the song. If
the engine noise did not remain consistent, then an alternative methodology would be required.
The first alternative method attempted was to line up the noisy signal with the provided noisy
engine signal, and then subtract the engine noise from the noisy signal. This alternative method
seemingly had no change on the apparent noisy-ness of the signal. The attempt was followed by the
final method which would use multiple filters, a high-pass, and a series of band-stop filters as
described above. This method proved to be the most effective of the methods attempted, and, with
some adjustment of the filter parameters, sufficient noise was removed.
Conclusion
While the entirety of the noise cannot be removed from the provided signal, a sufficient amount of
that noise was able to be reduced, allowing for clearer song to be heard. While other methods for
achieving this level of reduction were possible, the chosen method was found to be effective for this
use case, resulting in a reduction of 162.3%.
Appendix
%% ECE 301 Project 3
% Brandon Adduci and Benjamen Bachmann
clc;
close all;
clear all;
%Print header
header;
%% User Parameters
%Load Data
ROI_data = corrupted_data1(220501:1764000);
ROI_song = song_ref(220501:1764000);
ROI_noise = noise_ref;
time = 1:length(corrupted_data1);
time = time/Fs;
hold on;
ROI_plot = nan(length(corrupted_data1),1);
ROI_plot(220501:1764000) = corrupted_data1(220501:1764000);
plot(time,ROI_plot,'r-');
legend('Measured Data','Highlighted Noisy Portion');
%% Perform Denoising
figure(2);
subplot(2,1,1);
plot(abs(data_FFT),'r-','LineWidth',1.1);xlim([0 3000]);
hold on;
% Filtering
ROI_data_d = highpass(ROI_data,95,Fs);
ROI_data_d = bandstop(ROI_data_d,[270 377],Fs);
ROI_data_d = bandstop(ROI_data_d,[403 480],Fs);
ROI_data_d = bandstop(ROI_data_d,[830 1680],Fs);
corrupted_data1(220501:1764000) = nan;
plot(time,corrupted_data1,'Color',[0, 0.8, 0.1]); ylim([-2 2]);
xlabel('Time (s)'); ylabel('Amplitude');4 title('Denoised Data with Corrupted
Portion');
hold on;
corrupted_data1(220501:1764000) = nan;
plot(time,corrupted_data1,'Color',[0, 0.8, 0.1]); ylim([-2 2]);
xlabel('Time (s)'); ylabel('Amplitude'); title('Denoised Data with Corrupted
Portion');
hold on;
ROI_plot = nan(length(corrupted_data1),1);
ROI_plot(220501:1764000) = ROI_data_d;
plot(time,ROI_plot,'b');
legend('Measured Data','Highlighted Denoised Portion');
figure(2);
subplot(2,1,2);
plot(abs(denoised_FFT),'b-');xlim([0 3000]);
title('Denoised Spectrum');
xlabel('Frequency (Hz)'); ylabel('Normalized Amplitude');
p_noise_original = p_data-p_song;
p_noise_remaining = p_denoised-p_song;
%% Functions
function header()
fprintf("\t\tECE301 Project 3\n")
fprintf("\t\tEngine Denoising\n")
fprintf(" Brandon Adduci and Ben Bachmann \n")
fprintf("------------------------------------\n\n")
end
end