The Concept of Phase

Changing phase with frequency indices

We have explained what Discrete Fourier Transform (DFT) is. Also, we have covered that the concept of frequency is related to rotational speed of a complex sinusoid. Subsequently, a frequency axis was defined first in continuous domain and then in discrete domain. The tools to view the spectrum of a signal in frequency domain are IQ and magnitude-phase plots. We defined the magnitude and phase of a complex number before. Similar definitions hold for complex signals as

(1)   \begin{equation*}     |S[k]| = \sqrt{S_I[k]^2 + S_Q[k]^2}      \end{equation*}

and the phase \measuredangle S[k] is defined as four-quadrant inverse tangent as in this Eq with S_I[k] and S_Q[k] in place of V_I and V_Q, respectively.

Magnitude-phase plots are usually used more than IQ plots because a magnitude plot shows the strength of a complex sinusoid at each frequency in the whole spectrum. In focusing on the magnitude plot, sometimes it is easy to miss a great deal of information provided by the phase plot. Although phase is relatively unimportant for some particular areas such as most audio applications due to relative insensitivity of human ear to phase, it plays a significant role in wireless communications as we will see in later chapters.

As an example of what happens when phase information is neglected, this is how my daughter writes some English letters:

  • L \rightarrow \Gamma
  • V \rightarrow \Lambda
  • Z \rightarrow a reversed \Gamma

All her symbols above are almost correct. Nevertheless, their phase is distorted leading to incorrect results. In addition, further confusion can develop if the relationship of phase with time domain is not clearly understood.

Phase in frequency domain has a special relationship with initial sample of a signal in time domain. Intuitively, a waveform is about how a signal changes in time IQ-plane while its first samples on I and Q axes indicate the starting point of that waveform. On the other hand, frequency is about rotational speed of complex sinusoids constructing that signal (the higher the frequency, the farther it is on frequency axis but not rotating) and phase indicates their orientation on frequency IQ-plane. Naturally, this orientation of each such complex sinusoid depends on where its initial sample is.

Example


As an example, consider this Figure. In time domain, when the starting sample of a cosine is changed by 1/4 of a period, it becomes a sine wave. Correspondingly in frequency domain, the cosine changes its phase by 1/4 of 360^{\circ} =90^{\circ} (to be exact, -90^ {\circ} and +90^ {\circ} on positive and negative frequency axis, respectively). Mathematically, remember that \cos(A-90^{\circ}) = \sin(A).

Consider the inphase component of a complex sinusoid shifted by n_0 samples:

    \begin{align*}         \cos 2\pi \frac{k}{N} \left(n-n_0 \right) &= \cos \left( 2\pi \frac{k}{N} n - 2\pi \frac{k}{N} n_0 \right)  \\                                                                      &= \cos \left( 2\pi \frac{k}{N} n + \Delta \theta (k) \right)     \end{align*}

Since n_0 is a constant above, \Delta \theta (k) = - 2 \pi (k/N)n_0 can be seen as the phase shift incurred by a delay of n_0 samples. This result is known as the shifting property of the DFT which holds true for circular shifts in time. It states that a (circular) time shift of an input signal s[n] results in a corresponding phase shift at each frequency of its DFT S[k].

Effect of time shift on DFT – Magnitude and Phase In the light of discussion above, the DFT of s[(n-n_0) \:\textmd{mod}\: N] has its magnitude unchanged. However its phase is rotated by \Delta \theta (k) = -2\pi (k/N) n_0. We denote the rotated DFT by \widetilde{S}[k].

(2)   \begin{equation*}           \begin{aligned}             |\widetilde{S}[k]| &= |S[k]| \\             \measuredangle \widetilde{S}[k] &= \measuredangle S[k] - 2\pi \frac{k}{N} n_0           \end{aligned}         \end{equation*}

Effect of time shift on DFT – I and Q It is straightforward to prove through DFT definition that the DFT of s[(n-n_0) \:\textmd{mod}\: N] is given by

(3)   \begin{align*}         \widetilde{S}_I[k]\: &= S_I[k] \cos 2\pi \frac{k}{N} n_0 + S_Q[k] \sin 2\pi \frac{k}{N} n_0 \\         \widetilde{S}_Q[k] &= S_Q[k] \cos 2\pi \frac{k}{N} n_0 - S_I[k] \sin 2\pi \frac{k}{N} n_0       \end{align*}

As a verification, comparing with this Eq, \widetilde{S}[k] is nothing but rotations of complex numbers S[k] by angles \Delta \theta (k) = -2\pi (k/N) n_0 for each k = -N/2, \cdots,-1,0,1, \cdots,N/2-1.

The converse of the above argument is also true. A phase shift at a discrete frequency bin of the DFT informs us about (circular) time shift of that sinusoid. The conclusions from above are summarized in the note below.

Time shift ~\xrightarrow{\text{{F}}}~ Phase shift


If a signal s[n] is circularly right shifted in time by n_0 samples (i.e., samples are moved n_0 places to the right, with elements that fall off at one end of the sequence appearing at the other end), then the magnitude of its DFT |S[k]| remains unchanged. However, the phase of its DFT \measuredangle S[k] gets rotated by \Delta \theta (k) = -2\pi (k/N) n_0 for each k = -N/2, \cdots,-1,0,1, \cdots,N/2-1. Similarly, for a circular left shift in time by n_0 samples incurs a phase rotation of \Delta \theta (k) = +2\pi (k/N) n_0 for all k.

(4)   \begin{align*}               \textmd{Time shift} \quad s[(n-n_0)  \:\textmd{mod}\: N] ~& \xrightarrow{\hspace*{1cm}}~ -2\pi \frac{k}{N} n_0 \quad \textmd{Phase shift} \\               \textmd{Time shift} \quad s[(n+n_0)  \:\textmd{mod}\: N] ~& \xrightarrow{\hspace*{1cm}}~ +2\pi \frac{k}{N} n_0 \quad \textmd{Phase shift} \\         \end{align*}

Therefore, a time delay (going back in time from NOW, or waveform shift to the right) rotates the original spectral phase in negative direction (clockwise). On the other hand, a time advance (future travel from NOW, or waveform shift to the left) rotates the original spectral phase in positive direction (anticlockwise). In terms of intuitive method of time shifting, it makes perfect sense: Traveling in the past should decrease the DFT phase, and vice versa.

In examples discussed above, the amount of phase shift has a linear relation with the frequency index k as evident from the term \Delta \theta (k) = -2\pi (k/N) n_0. This is the concept of linear phase where the phase of each complex sinusoid is directly proportional to the frequency of that sinusoid. Intuitively, if sinusoids with different frequencies get delayed by the same number of samples, then they naturally end up with different phases at the end of that common sample duration.

The magnitude and direction of rotation for these frequencies is symbolically shown for s[n+n_0] in Figure below. Remember that this is a frequency IQ-plane, unlike time IQ-plane.

Changing phase with frequency indices

Example


The Figure below shows a unit impulse signal s[n] and its DFT S[k] along with its circularly time shifted version s[(n-1) \:\textmd{mod}\: 5] and its DFT \widetilde{S}[k]. This DFT is computed shortly in later article.

Note that phase shift for each frequency bin k is different for each k according to Eq (4). To be exact, \Delta \theta (k) = 2\pi (k/N) \cdot (-1) for k = -2 to k = 2 and N = 5 turns out to be

    \begin{align*}     k &= ~~~0 \quad \rightarrow \quad \Delta \theta (0) ~~\:= 2\pi \frac{0}{5} \cdot (-1) \times \frac{180^\circ}{\pi} = 0^\circ \\     k &= \pm 1 \quad \rightarrow \quad \Delta \theta (\pm 1) = 2\pi \frac{\pm 1}{5} \cdot (-1) \times \frac{180^\circ}{\pi} = \mp 72^\circ \\     k &= \pm 2 \quad \rightarrow \quad \Delta \theta (\pm 2) = 2\pi \frac{\pm 2}{5} \cdot (-1) \times \frac{180^\circ}{\pi} = \mp 144^\circ     \end{align*}

The phase rotations of 72^\circ and 144^\circ are illustrated in the figure. Also observe that for a right shift, the phase rotations are clockwise for positive k and anticlockwise for negative k.

A time shift in a sequence generates a phase shift in frequency domain to all frequency indices

The understanding of phase above cannot be overemphasized. It is relatively straightforward to see magnitude plots and diagnose the behavior of signals and systems. However, true insights can only be developed through grasping the implications of phase rotations.

Leave a Comment

Your email address will not be published. Required fields are marked *