plot the Error without phase shift

조회 수: 2 (최근 30일)
Mohammed Altaher
Mohammed Altaher 2017년 7월 10일
답변: Don Zheng 2017년 7월 18일
I have the reference Singal ( Ref) and sensor signal ( Sen), the Sen has 23 samples equivalent t0 0.0011 seconds of phase shift delay. I want to plot the error without the phase shift if I do this plot(t, Ref-Sen) it will have a phase shift, plotting them in the time domain without the phase shift was easy by doing plot(t, Ref), hold on plot(t-0.0011, Sen)
I hope these figures can help the reader to understand better, I note most of your answer relevant to this. plot(t,Ref,'b','LineWidth',2) hold on grid plot(t-0.0011,Sen,'b','LineWidth',2) I have managed to get rid of the phase shift in the time domain. I am now trying to plot the error for one period, so I used the following plot(t(7:674),Ref(7:674)-Sen(30:697),'k','LineWidth',2) where sample 7 is the intersection of the Ref with 0 and 30 sample is Sen with zero, you will note still the phase shift occurs in the error plot, I want to plot error without the phase shift.

답변 (1개)

Don Zheng
Don Zheng 2017년 7월 18일
Error magnitude (pic4) seems consistent with the aligned plot (pic3).
For precise synchronization, you need a time stamp for each data point in your 'Ref' and 'Sen', because 'Ref' and 'Sen' might not have precisely equal intervals and that might be why a simple offset on data positions could be off.

카테고리

Help CenterFile Exchange에서 Pulse and Transition Metrics에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by