Problem with signal resampling(stretching)

6 次查看(过去 30 天)
Hello, I have been trying to solve my problem using various tools and commands in Matlab e.g. resample, xcorr, dwt etc but I'm unable to achieve the desired result. Here is the problem.. I have two pressure sensors through which I record pressure sensor measurements at the same frequency. Both the sensors have their own internal clock that provides time stamps for every measurement. I need to time-synchronize the measurements from both the sensors to do my further calculations. But it appears that the clock of one of the sensors is running faster than the other's, i.e. if I record data for 100 sec on one of the sensor the other sensor shows a recording of ~105 sec. How can I resample the second signal of 105 s to 100 s? The time stamps are also needed to be adjusted as it is required in my further calculations.
Thank you!

回答(1 个)

Sailesh Sidhwani
Sailesh Sidhwani 2017-7-27
If we assume the slowdown is uniform, you could simply do the following for the second time series:
ts2.Time = ts2.Time * 100/105;
Now the duration will be in agreement while the data is unaffected.
Finally, you can use 'resample' to determine interpolated values at the desired times. The built-in MATLAB 'resample' function is: http://www.mathworks.com/help/matlab/ref/timeseries.resample.html
  1 个评论
Toni Seidlitz
Toni Seidlitz 2019-2-7
编辑:Toni Seidlitz 2019-2-7
Hi!
Is there a way to determine the elongation factor based in the pressure signal of the sensor?
I have the same problem, and i need to find a solution, which is working for all kinds of stretching, since the clock speed seems to be affected by the voltage of the powering battery.
xcorr is bringing both signals to allignment, but unfortunately only in the middle of the measurement.

请先登录,再进行评论。

Community Treasure Hunt

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

Start Hunting!

Translated by