Detect major events in signal data?
Asked Answered
C

1

1

If I have a signal as the one below, how would I go about finding the beginning and end of the two "major events" (illustrated by a green arrow where the event begins, and a red arrow where it ends)?

Signal

I've tried the method suggested in this answer, but it seems that no matter how much I play around with the lag, threshold and influence variables, it either reacts to the tiny changes in the beginning, middle and end of the graph (where there are no major events), or it doesn't react at all.

I can't simply determine if the signal is above a fixed threshold, as the strength of the signal can vary, thus I need some way of detecting when the signal deviates a lot from the "background noise". Also, the signal can sometimes be in an overall trend, like in the graphs below.

Exponential trend

Linear trend

I'm already applying a simple low- and high pass filter to the signal. What I would like to have is something like the orange signal in the chart below (I've drawn it manually just to illustrate).

enter image description here

Conglobate answered 27/4, 2017 at 19:20 Comment(2)
I would suggest using a median filter for background extraction and then look for the zero crossings. If you can provide a sample data, maybe a txt file, I can help.Hufuf
As far as separating these events from background information, you might want to look at sections of your signal with high sample entropy. en.wikipedia.org/wiki/Sample_entropyCirsoid
C
0

You might try a couple things. Both of these options depend somehow on knowing the type of unusual event that is to be expected.

Say you know the events are typically 100 samples in length. Create this signal and examine the peaks.

indicator = filtfilt(ones(1, 100) ./ 100, 1, abs(signal));

This will look something like your orange signal.

Second, you might try examining the sample-to-sample variation in the signal.

indicator = abs(diff(signal));

If you really want to go all-out, try a 1D-convolutional neural network. This requires labeled training data.

Cirsoid answered 27/4, 2017 at 19:44 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.