Remove spikes from a signal

4 次查看(过去 30 天)
Joana Silva
Joana Silva 2017-9-14
Hello everybody! I want to attenuate the signal between 10 and 20 seconds (Fig1). If we pay attention to this specific interval, we can see the "normal" waves behind the spikes. I attached another figure (Fig.2) to demonstrate what I want. I could clean the forward signal too but this is the reference signal so I will subtract this from the real data. Can anyone help me? Joana
  1 个评论
Rik
Rik 2017-9-14
Looks like you have the misfortune of dealing with very high frequency noise (although misfortune is relative, as that may be very easy to filter). What did you try already? And do you have access to the signal processing toolbox? I suspect most suggestions are going to involve functions from that toolbox. (e.g.: try the cftool)
My gut instinct is that this is a sine wave with an exponential function as the amplitude. Did you try to fit that?

请先登录,再进行评论。

回答(1 个)

Image Analyst
Image Analyst 2017-9-14
What about a modified median filter. Median filter it, then replace spikes above 0.1 with the median signal:
mfSignal = medfilt1(signal);
badIndexes = mfSignal > 0.1;
signal(badIndexes) = mfSignal(badIndexes);
Or use sgolayfilt() to filter the signal with a moving quadratic.

Community Treasure Hunt

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

Start Hunting!

Translated by