Waveform Pattern detection in MATLAB

10 views (last 30 days)
Ronak Vyas
Ronak Vyas on 2 Jan 2023
Answered: Walter Roberson on 2 Jan 2023
Hello,
I have continuous data from the IMU sensor, which contains 3-axis acceleration and gyroscope, thus when I plot gyroscopes-Z axis data in Matlab, I get some waveform pattern that is repeated (has the same pattern) during some activity. So, first and foremost, I want to recognise these patterns. Aside from that, after identifying these patterns (that I described), Now i have some random data that has some of the repeated patterns that I mentioned, and I want to discover these patterns from the random data. Also i have attached the pictures of repeated data and random data. so, is it possible to achieve this with MATLAB...?
Thanks and Regards,
Ronak

Answers (1)

Walter Roberson
Walter Roberson on 2 Jan 2023
Realistically... No.
Your pattern involves multiple peaks in a short space. It looks to me as if the pattern involves the sum of at least 5 Gaussians, possibly 7 Gaussians.
In order to determine whether the pattern matched properly, you would have to segment the waveform and check to see if each segment matched the pattern potentially by trying to fit a sum of at least 5 Gaussians (maybe more) and then check to see if the patterns of coefficients is satisfactory. Each Gaussian involves at least four parameters, so you would be fitting the signal segment to a model with 20 to 28 parameters.
Sum of Gaussians are notoriously difficult to fit. Unless you find a really good specialized technique in the literature, your fit results will be bonkers most of the time.
We had a program written in IDL and C to do fitting using Marquardt and simplex techniques. It was not fast... and it took only a little noise to throw off the parameter estimations. It was not uncommon back then for us to put in a synthetic signal with a small bit of noise and use the known parameters to start... and have it output results that were clearly different. I did a bunch of debugging to figure out that the program was working as designed, that the system is just mathematically unstable.

Community Treasure Hunt

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

Start Hunting!