How can i remove the background noise of my signal?

130 views (last 30 days)
Rory Hill
Rory Hill on 10 Mar 2014
Answered: Image Analyst on 11 Mar 2014
I have created a sine sweep wave and recorded it using four microphones to the file s1m1(960000:4). I have also recorded the background noise from the room without the sine sweep playing as backgroundroom2(960000:4) using the same four microphones. Both of these files have been attached. I have tried to remove the background noise from my file s1m1 using the answer to a similar problem: but this did not work. Does anyone else have any suggestions?
Thanks, Rory

Answers (2)

Image Analyst
Image Analyst on 11 Mar 2014
See the Mathworks official recommendation: < Basically use a Savitky-Golay filter. Why would that work so well in your situation? Well you know from the Taylor series that a sine wave is like a0 + a1*x + a3*x^3 + fifth and higher odd orders. So a Siviztky Golay filter with a 3rd order would be about perfect. Here's a demo for you:
clc; % Clear the command window.
close all; % Close all figures (except those of imtool.)
clear; % Erase all existing variables. Or clearvars if you want.
workspace; % Make sure the workspace panel is showing.
format long g;
format compact;
fontSize = 25;
% Make a noisy sine wave signal
x = 1 : 300;
period = 50
y = sin(2*pi*x/period);
noiseAmplitude = 0.8;
y = y + noiseAmplitude * rand(size(y));
plot(x, y, 'b-', 'LineWidth', 2);
title('Noisy Signal', 'FontSize', fontSize);
% Enlarge figure to full screen.
set(gcf, 'Units', 'Normalized', 'OuterPosition', [0 0 1 1]);
% Give a name to the title bar.
set(gcf, 'Name', 'Demo by ImageAnalyst', 'NumberTitle', 'Off')
% Now smooth with a Savitzky-Golay sliding polynomial filter
windowWidth = 27
polynomialOrder = 3
smoothY = sgolayfilt(y, polynomialOrder, windowWidth);
plot(x, smoothY, 'b-', 'LineWidth', 2);
title('Smoothed Signal', 'FontSize', fontSize);

Youssef  Khmou
Youssef Khmou on 11 Mar 2014
hi, One of the ways to handle this problem is to treat the signal in frequency domain, after applying the Fourier transform try to delete the unwanted frequencies and/or smooth the wideband spectrum of the sweep, i realized that there are two types of peaks , wide and narrow , try to start with these tests, on first signal, once the operation is good , apply it to three left signals :
figure; plot(abs(t))
figure; plot(real(t))
figure; plot(imag(t))

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!