As known, we can get a 'phase spectrum' from the DFT of a input signal. Assume, we do a DFT on a given equal interval sampled 50Hz AC signal, the signal is a complete whole cycle, but the start sample point may at any point. And I get the amplitude and phase from the DFT, but what's the reference point of the phase?
For signals that are strictly periodic an exact integer multiple in the FFT aperture, the phase (atan2(imag_component, real_component)) of the result from the most common implementations of an FFT are with respect to the edge of the window at point 0 (the phase at the time that the first sample, that was fed to the FFT, was taken). If you know the exact frequency, and the phase at one point in time, you can calculate the phase at any other point in time (or at nearby points in time if there is noise or other frequency estimator errors), as needed.
However, for signals that are not integer periodic in the FFT length, there will be a circular discontinuity between the last point and point 0. Since the FFT is circular (the only possibility with circular basis vectors), the measurement of phase at a point of discontinuity can be non-intuitive. For sinusoids that are not strict periodic in the FFT length, the sign of the phase also flips between FFT result bins, causing problems with simple linear (or other low order) phase interpolation (e.g. for estimating the phase of a sinusoid that is of a between-bins frequency).
However, an fftshift will move the phase measurement reference to the center of the FFT window (point N/2), where there isn't a discontinuity (assuming the input is continuous). The sign of the phase will no longer keep flipping, allowing easier estimation of interpolated phase.
An fftshift can be done by either rotating the whole input vector, or by flipping the phase (rotating 180 degrees) of every other FFT result bin, and may produce a phase reference point that makes more sense at the center of the FFT aperture or window.