Problem with signal resampling(stretching)

13 visualizaciones (últimos 30 días)
Ehtesham Hasnain
Ehtesham Hasnain el 18 de Jul. de 2017
Editada: Toni Seidlitz el 7 de Feb. de 2019
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!

Respuestas (1)

Sailesh Sidhwani
Sailesh Sidhwani el 27 de Jul. de 2017
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 comentario
Toni Seidlitz
Toni Seidlitz el 7 de Feb. de 2019
Editada: Toni Seidlitz el 7 de Feb. de 2019
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.

Iniciar sesión para comentar.

Community Treasure Hunt

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

Start Hunting!

Translated by