MATLAB: HOW TO ELIMINATE PHASE DIFFERENCE BETWEEN TWO SIGNALS

phaseshift

Hello all,
I have a problem with removing phase difference between my signals. What i am trying to do is:
Create an angle function Differentiate twice to obtain acceleration Integrate acceleration twice to obtain a position Compare the new position with the initial angle
When compared, there's a phase difference between both signals. I have tried fftshift also, adding a phase shift to the signal to overcome the phase difference but not worked.
I am hoping someone can assist in overcoming the problem. Thank you for your help in advance

Best Answer

Use the technique called cross-correlation. Here from @dpb Link
Also here
Related Question