riethmue
riethmue

Reputation: 93

Synchronize movesense sample rates

I synchronized two sensors regarding this method. Afterwards I logged the raw data and checked the peaks. The synchronization seems to work at the beginning but it starts to drift rapidly by time. I tried 13 Hz, 26 Hz and 25Hz. The drift gets worser when asking for higher sample rates. Also I checked the timestamps and estimated the sample rates. For one sensor the sample rate is not constant (e.g. for 52Hz it varies between 50 and 51 Hz). One sensor is always "faster" than the other one.

Is there a method to synchronize them?

Thank you in advance

Upvotes: 1

Views: 469

Answers (1)

PetriL
PetriL

Reputation: 1309

The link in the question you linked contains the following:

Since especially the IMU unit (Acc/Gyro/Magn) sampling is timed by the LSM6DSL's internal RC oscillator, the diff of timestamps can vary and the real samplerate is +-10% of the nominal given in the subscription parameter. The ECG samples are accurate since that chip uses the clock signal from the stable oscillator

So the samples will drift due to the limitation of the IMU sensor hardware.

To mitigate that the measurement API's include the crystal stabilized timestamps which enable the synchronization of the data streams from different sensors:

  • At simplest it could be so that you'd skip a sample from the stream that is behind the other by more than a sample length. This method causes timing jitter of the samples but is simple to implement.
  • A more complex way is to re-sample both streams and picking the samples using the interpolated values based on timestamps.

Full disclosure: I work for the Movesense team

Upvotes: 1

Related Questions