How do I time synch 2 sensors with different sample rates and start/stop times?

4 visualizzazioni (ultimi 30 giorni)
I have 2 sensors, A and B.
Sensor A is operating at 5Hz. Sensor B is operating at 100Hz. However, they are both the same type of sensor, and I can see that they are recording essentially the exact same waveform at some point in their respective collections, but their collections start and stop at different times. So sensor A may see the start of an event after 10 seconds (50 of its samples) and sensor B may see the same event after 2 seconds (200 of its samples). Is there an easy way to line these up? That is, upsample sensor A so it also sees the event at it's 200th sample? I would like Sensor A to be upsampled to Sensor B's sampling rate, probably using interp1.
Only one of the sensors is GPS timestamped, otherwise this would be fairly easy.
  2 Commenti
Mitch Hezel
Mitch Hezel il 10 Apr 2020
Looks like it could be good, but MATLAB throws a memory error. The vectors I am using are pretty large: ~620k for sensor B and 58k for sensor A. It then tries to make an array of size 620kx58k.
I tried identifying maximum and minimum peaks near the beginning and end of each signal and clipping them so they both start and end at approximately the same reading, and then upsampling sensor A to sensor B using interp1. The beginning and end of the sensors align nicely, but there is a drift in the middle.

Accedi per commentare.

Risposte (0)

Community Treasure Hunt

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

Start Hunting!

Translated by