MATLAB Answers

How to synchronize two different data sets?

79 views (last 30 days)
Weikang
Weikang on 20 Dec 2012
Commented: Beatriz Padrela on 20 Jul 2018
The problem is as follows:
In an experiment two devices are used for measuring for which manual operation is required. This causes the obtained data sets to be out of sync and of different lengths. The question is how to synchronize one of the sets to the other. Below are parts of the plots of both data sets.
Figure 1: Data set A. This data has a lot of noise which will be removed later on, but for now it is important that it won't.
Figure 2: Data set B. This data has an offset, but this shouldn't be a problem for synchronizing.
From the figures it can be seen that there is a clear spike in the data at the beginning of both sets. This has been done on purpose to make the synchronization easier. It's not a problem if the spike isn't used, because it isn't part of the important data. The goal is that each spike in data set A corresponds to the spike in data set B with an error as small as possible. Notice that the heights/values of the sets don't correspond with each other, which is intended. In the end both data sets should have the same length. This probably means that both sets need to be trimmed, resulting in the loss of some data, but that has been taken into account. A few solutions have been tried.
Finding the peaks in each data and than correlate some of the points that were found didn't solve the problem. Also trying to detect when a spike occurred didn't work.
Pleas help solve this problem. Thanks in advance.
Greetings,
Weikang
  4 Comments
Weikang
Weikang on 27 Dec 2012
Thank you all for commenting and answering on the problem.

Sign in to comment.

Accepted Answer

Matt J
Matt J on 20 Dec 2012
Edited: Matt J on 20 Dec 2012
The closed form solution to José-Luis' suggestion (for squared differences) is known and is described here
and here
  2 Comments

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!