Remove spikes from a signal

5 vues (au cours des 30 derniers jours)
Joana Silva
Joana Silva le 14 Sep 2017
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 commentaire
Rik
Rik le 14 Sep 2017
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?

Connectez-vous pour commenter.

Réponses (1)

Image Analyst
Image Analyst le 14 Sep 2017
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