Hi, I have two signals(x,y) whose absolute phases i'm calculating by using the atan2 function.Then subtracting both i'm getting the relative phase between two signals.
Because the absolute phase is calculated by atan2,it's range is [-pi,pi]. Now the relative phasei got after subtracting the absolute phase, will its value still be in the range [-pi,pi] ? How do i convert this to [0,2pi] ?
My efforts:- On the final relative phase obtained by atan2.i'm doing this
if phase >= 0 then
phase = 360 - phase;
phase = abs(phase);
This is yielding good results & matching with the phase between signals x & y, except in the range from [0 to 10] & [350 to 360]