When you plot the two signals on a time series graph, do you see the phase difference in the time domain? This might be a good way to check what is going into the FFT where you are calculating magnitude and phase. Also, insure your phase outputs are in degrees, this typically helps visualize the phase differences, as compared to radians.
Just some ideas for additional testing.
prestonj
Preston Johnson
Solutions Manager, Industrial IoT: Condition Monitoring and Predictive Analytics
cbt
512 431 2371
preston.johnson@cbtechinc