1

Below an example of a velocity signal. It's a simple integration of accelerometer data with 100 measurements per second.

As you can see there is drift (slowly drifting negative).

I'm completely new to MATLAB so I dont really have a clue what to do. I didn't came further than importing the data and plotting it with plot(velos1.cVelo)

As you can see it has some bigger peaks from the baseline. I basically want to filter only those peaks. In the second image you see a little zoom in of two of those peaks.

My goal: a non drifting signal that shows only the peaks. The peaks dont occur in certain frequency. There might be one peak per 10 minutes, zero, or 10.

How to do this in MATLAB?

Zoomed in Image enter image description here

Full 10-15 minutes 100 hertz acquisition enter image description here

  • You need to take a moving average of your signal by selecting a convenient $n$ (for example 50) and defining the following filter : :f=$\tfrac{1}{n}$*ones(1,1:n), then take the convolution tr=conv(s,f) of your signal with filter $f$: this will give you the trend tr, that you will subtract to the initial signal. Take care: taking a convolution broadens the result. Incorporate the results you obtain in the question – Jean Marie Dec 11 '22 at 13:54

0 Answers0