Signal synchronization - lagging over time

6 views (last 30 days)
I am recording force values with two different sensors - one is S-load cell, the other F/T transducer. Both have same sampling rate 60 Hz. However, when analysing the data there is a lag shown for the F/T transducer which occurs over time.
I was trying to solve the problem applying cross-correlation, which only shift the F/T signal over time. Would approach with using windows help solving the problem? If yes, how to do it?

Accepted Answer

Sivapriya Srinivasan
Sivapriya Srinivasan on 27 Mar 2023
Hello,
I understand that while you are trying to record force with two different sensors, it is resulting in a lag in one of the sensor."
i) Using windows, you can potentially solve the problem of lag between the S-load cell and F/T transducer signals. One approach is to divide the signals into smaller segments, or windows, and then perform cross-correlation analysis on each window separately. This allows you to account for any variations in the lag over time.
Here's a step-by-step guide on how to apply this approach:
1.Choose the length of the window: The length of the window should be long enough to capture enough data to analyze, but not too long to miss any variations in the lag over time. A reasonable starting point could be 1-2 seconds of data.
2.Divide the signals into windows: Divide the S-load cell and F/T transducer signals into non-overlapping windows of the chosen length.
3.Apply cross-correlation analysis on each window: For each window, perform cross-correlation analysis between the S-load cell and F/T transducer signals. The resulting cross-correlation function will provide you with a measure of the lag between the two signals within that window.
4.Determine the average lag over time: Once you have performed cross-correlation analysis on each window, you can determine the average lag between the S-load cell and F/T transducer signals over time.
5.Apply the average lag to align the signals: Finally, use the determined average lag to align the F/T transducer signal with the S-load cell signal, so that they are synchronized and can be compared accurately.
Note that this approach assumes that the lag between the S-load cell and F/T transducer signals varies over time.
ii) If the lag is constant, you may not need to use windows and can simply apply the cross-correlation function to the entire signals.
Also, keep in mind that applying windows can introduce some artifacts at the edges of the windows, so you may need to use overlapping windows or smoothing techniques to mitigate this.
You can also refer this documentation for further understanding: https://www.mathworks.com/help/documentation-center.html
Hope this helps!
  2 Comments
npe
npe on 27 Mar 2023
Hi Sivapriya, Thank you for your answer. This is exactly how I approached solving the problem. As the lag is not constant I used the method with windows. Since the edges of the signal are not important for my analysis I could cut off the part with artifacts.
I hope your answer helps someone else in the future. It is nicely explained for each step.
Many thanks, Nina
Sivapriya Srinivasan
Sivapriya Srinivasan on 27 Mar 2023
Hey Nina,
Glad that it helped you resolve the issue :)

Sign in to comment.

More Answers (0)

Products


Release

R2022a

Community Treasure Hunt

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

Start Hunting!