Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Problem removing the noise

Status
Not open for further replies.

stamford

Newbie level 6
Joined
Sep 20, 2009
Messages
13
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Location
usa
Activity points
1,385
I'm trying to remove the noise in a signal, which contains four peaks, and some unknown noise. I want to attenuate the noise while maintaining the peak of the signal.
I've tried various algorithms but all I'm getting is some attenuation in signal as well as noise.
Any idea of removing the noise would be great to me.

Thanks.
 

I looked at the data you posted. Plotting the data over time I can see more than four peaks and also the FFT showed me many peaks.

It seems not so difficult to reduce the noise using a low pass filter. Could you, please, detail the attenuation of noise and signal you expect. Take into account that generally the filtering action also add delay and slows the edge of the peaks: the stronger the filter the higher is the delay and the slowing. If these are parameters you are interested in, then a particular algorithm should be choosen.
 

Thanks for your reply,
Our aim is to reduce the noise by keeping the pulse width and the signal amplitude constant. We are not really concerned about the delay in the signal through the filtering.
There is no specific value of attenuation of noise to achieve. Any good attenuation in the noise would us.

Thanks.
 

you need to design a filter notching at the beginning of frequency that has distortion i guess.
try this code and tell me what happen with u on Matlab:
clc
[x,Fs,bits]=wavread('f17.wav');

Fs
T=length(x)/Fs

figure;
stem(x(1:100));
title('First 100 samples of noised signal');
grid

xf=fft(x,16000);
xfm=abs(xf(1:8000));

figure;
plot (xfm(1:8000,1));
xlabel ('Frequency ( Hz )');
ylabel ('Magnitude');
grid

figure;
freqz(x,Fs)
grid

spectrogram(x,512,250,512,Fs);

h1=Filter1;
h2=Filter2;

freqz(h1,Fs);
freqz(h2,Fs);

a= filter(h1,x);
y= filter(h2,a);

spectrogram(y,512,250,512,Fs);
sound(y*200,Fs,bits)
 

I think you could try to use a very simple FIR filter (exponential moving average) defined as:

let suppose we have an input vector of N samples

let y(i) the input sample 'i'
out(i) the output of the filtering process at sample 'i'
alfa a coefficient in the range 0..1

initialize the filter out (1) = y(1)
then generate out(i) = alfa*y(i) + (1-alfa)*out(i-1)
span 'i' from 2 to N

an example of code is:

alfa = 0.1;
out(1) = y(1);
for i=2:length(y),
out(i) = alfa*y(i) + (1-alfa)*out(i-1);
end


after filtering you can also amplify the signal multiplying by a constant factor. To do this remove before the mean of the signal, then multiply by the constant you choose then add the mean previously removed. Here is an example:

ampl = 1.5;
out_ampl = (out-mean(out))*ampl + mean(out);


"out_amp" is the same of "out", but amplified.

In the attached picture you can see the result obtained with alfa = 0.1 and amplification factor = 1.5

I hope this can help.
Best regards.

 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top