Wave Walker DSP

DSP Algorithms for RF Systems

Trending

Buy the Book!

DSP for Beginners: Simple Explanations for Complex Numbers! The second edition includes a new chapter on complex sinusoids.

The Unit Circle: The Field of Play for the Game of DSP
October 23, 2021

Table of Contents

Introduction

Thinking about complex sinusoids, \sqrt{-1} = j, the unit circle, phase, negative frequency and using \pi instead of 180^\circ can all be confusing when the material is first encountered. Have you asked yourself the following questions? I certainly have:

  • Why do we need the complex plane?
  • Why can’t we just use degrees instead of radians?
  • Why is the unit circle useful?

Unfortunately many of the mathematical tools encountered in the first and second years of an undergraduate EE degree are abstract and their value may not seem practical until graduate school or your first job as an engineer. The hope is that the following post will connect these concepts into a real world situation using the face of a clock in an attempt to build some intuition.

Additional blog posts on complex numbers:

The Unit Circle

The unit circle is a foundational concept and is used as the reference geometry in all of DSP. Baseball has to have the baseball field with its foul lines, outfield fence and base paths which are the foundation for all other rules in the game. Driving from one city to another requires foundational geometry: north, south, east and west. So too does DSP need its foundational geometry, the unit circle.

The unit circle is field the game of DSP is played upon. The unit circle is the reference allowing the measurement of parameters such as phase and frequency. The unit circle is used to create modulations for transmitters and compute center frequency offset for receivers.

The unit circle is a circle of radius 1 within the complex plane. The unit circle can be thought of as a complex vector e^{j \phi} with unit magnitude |e^{j\phi}| = 1 being swept across all values of \phi = [-\pi, \pi]. The angle from 0 radians or 0^\circ is given by \sphericalangle{ e^{j \phi} } = \phi.

By convention the angles of the unit circle are given in radians, most commonly from -\pi to \pi or sometimes from 0 to 2\pi. Figure 1 shows the unit circle with an example complex vector e^{j\pi/3} whose phase is \pi/3 as labeled on the plot.

Figure 1: The unit circle with an example complex vector e(j pi/3).
Figure 1: The unit circle with an example complex vector e(j pi/3).

Angles on Face of Clock

Figure 2 overlays the unit circle and the angles onto the face of a clock.

Figure 2: The angles of the unit circle are joined with the hours on the face of a clock.
Figure 2: The angles of the unit circle are joined with the hours on the face of a clock.

The hours and their corresponding phase angle on the unit circle are given by

(1)   \begin{equation*}\begin{split}\text{hour} ~ 12, & ~ \text{phase} ~ 90^\circ, \pi/2 ~\text{radians}, \\\text{hour} ~ 1, & ~ \text{phase} ~ 60^\circ, \pi/3 ~\text{radians}, \\\text{hour} ~ 2, & ~ \text{phase} ~ 30^\circ, \pi/6 ~\text{radians}, \\\text{hour} ~ 3, & ~ \text{phase} ~ 0^\circ ~ \text{or} ~ 360^\circ, 0 ~ \text{or} ~ 2\pi ~\text{radians}, \\\text{hour} ~ 4, & ~ \text{phase} ~ -30^\circ, -\pi/6 ~\text{radians}, \\\text{hour} ~ 5, & ~ \text{phase} ~ -60^\circ, -\pi/3 ~\text{radians}, \\\text{hour} ~ 6, & ~ \text{phase} ~ -90^\circ, -\pi/2 ~\text{radians}, \\\text{hour} ~ 7, & ~ \text{phase} ~ -120^\circ, -2\pi/3 ~\text{radians}, \\\text{hour} ~ 8, & ~ \text{phase} ~ -150^\circ, -5\pi/6 ~\text{radians}, \\\text{hour} ~ 9, & ~ \text{phase} ~ \pm 180^\circ, \pm \pi ~\text{radians}, \\\text{hour} ~ 10, & ~ \text{phase} ~ 150^\circ, 5\pi/6 ~\text{radians}, \\\text{hour} ~ 11, & ~ \text{phase} ~ 120^\circ, 2\pi/3 ~\text{radians}. \\\end{split}\end{equation*}

Instantaneous Phase

The instantaneous phase is the angle of the complex vector measured from 0 radians at a given time. For the face of a clock the instantaneous phase is the angle from 3 o’clock at a given moment. For simplicity the clock will only use hours and the minute and second hands will be ignored.

Figure 3 gives an example of the clock hand pointing to 5 o’clock. From Figure 1 and (1) 5 o’clock on the face of the clock is an instantaneous phase of -\pi/3.

Figure 3: The face of the clock with the hand pointing to 5 o'clock.
Figure 3: The face of the clock with the hand pointing to 5 o'clock.

Instantaneous Frequency

Instantaneous frequency is the velocity at which a complex sinusoid is rotating around the unit circle. Where phase is give in radians frequency is given in radians per second. By analogy the instantaneous frequency \omega_{clock} is the velocity of the clock hand rotation around the face of the clock. Recall that the instantaneous frequency \omega is the time-derivative of the instantaneous phase \phi

(2)   \begin{equation*}\omega = \frac{\Delta \phi}{\Delta t}.\end{equation*}

The clock hand moves at a constant speed so the time-derivative can be calculated by

(3)   \begin{equation*}\omega = \frac{\phi_{1} - \phi_{0}}{\Delta t}.\end{equation*}

Figure 4 shows an example where the clock hand has moved from 8 to 12.

Figure 4: The clock hand starts at 8 o'clock, or 7 pi/6, and moves to pi/2 over 4 hours at 12 o'clock. The frequency is the change in phase over change in time.
Figure 4: The clock hand starts at 8 o'clock, or 7 pi/6, and moves to pi/2 over 4 hours at 12 o'clock. The frequency is the change in phase over change in time.

From (1) the phase at hour 8 is \phi_{0}=-5\pi/6 and the phase at hour 12 is \phi_{1} = \pi/2. The angle \phi_{0}=-5\pi/6 is converted into a positive angle

(4)   \begin{equation*}\phi_{0} = -5\pi/6 + 2\pi = 7\pi/6,\end{equation*}

so the subtraction \phi_{1} - \phi_{0} is not done across the \pm \pi boundary. The change in phase is therefore

(5)   \begin{equation*}\phi_{1} - \phi_{0} = \pi/2 - 7\pi/6 = -2\pi/3\end{equation*}

and the change in time is

(6)   \begin{equation*}\Delta t = 4 ~ \text{hours}.\end{equation*}

From Figure 4 and (5) and (6) the frequency is

(7)   \begin{equation*}\omega = \frac{-2\pi/3}{4} = -\frac{\pi}{6} ~ \frac{\text{radians}}{\text{hour}}.\end{equation*}

By convention negative frequencies rotate in counter-clockwise direction and (7) is consistent with this. After converting to degrees the frequency is

(8)   \begin{equation*}\omega \cdot \frac{180}{\pi} = - \frac{\pi}{6} \cdot \frac{180}{\pi} = -30^{\circ} ~ \text{per hour}}\end{equation*}

which is correct because the face of the clock has 360^\circ and is divided into 12 hours thus allocating each hour 360^\circ / 12 = 30^\circ. Normalized frequencies are typically given in radians/second and therefore the frequency is

(9)   \begin{equation*}\frac{\pi}{6} \cdot \frac{1}{3600} = \frac{1}{21600} \frac{\text{radians}}{\text{second}}\end{equation*}

or

(10)   \begin{equation*}30^{\circ} \cdot \frac{1}{3600} = \frac{1}{120} \frac{\text{degrees}}{\text{second}}.\end{equation*}

Conclusion

There is a word to describe people who are confused by the mathematics of DSP: normal.

Remember:

  • The instantaneous phase of a complex vector can be thought of as the angle from 3 o’clock.
  • The instantaneous frequency can be thought of as the velocity at which the clock hand is rotating over the face of the clock.
  • The unit circle is like the outline on the face of the clock where the hours are labeled.
  • The unit circle is the field upon which the game of DSP is played.

The goal of this post was to connect abstract concepts into a real world scenario in an attempt to build some intuition about phase, frequency and the unit circle. Hopefully posts such as Phase, Frequency and Negative Frequency and Basic Rules for Complex Math are easier to understanding after reading through this blog.

If you found this post useful please leave a comment below!

More posts on complex numbers:

Leave a Reply

God, the Lord, is my strength; He makes my feet like the deer's; He makes me tread on my high places. Habakkuk 3:19
For everything there is a season, and a time for every matter under heaven. A time to cast away stones, and a time to gather stones together. A time to embrace, and a time to refrain from embracing. Ecclesiastes 3:1,5
The earth was without form and void, and darkness was over the face of the deep. And the Spirit of God was hovering over the face of the waters. Genesis 1:2
Behold, I am toward God as you are; I too was pinched off from a piece of clay. Job 33:6
Enter His gates with thanksgiving, and His courts with praise! Give thanks to Him; bless His name! Psalm 100:4
Lift up your hands to the holy place and bless the Lord! Psalm 134:2
Blessed is the man who trusts in the Lord, whose trust is the Lord. He is like a tree planted by water, that sends out its roots by the stream, and does not fear when heat comes, for its leaves remain green, and is not anxious in the year of drought, for it does not cease to bear fruit. Jeremiah 17:7-8
He said to him, “You shall love the Lord your God with all your heart and with all your soul and with all your mind. This is the great and first commandment. And a second is like it: You shall love your neighbor as yourself. On these two commandments depend all the Law and the Prophets.” Matthew 22:37-39
Then He said to me, “Prophesy over these bones, and say to them, O dry bones, hear the word of the Lord. Thus says the Lord God to these bones: Behold, I will cause breath to enter you, and you shall live." Ezekiel 37:4-5
Riches do not profit in the day of wrath, but righteousness delivers from death. Proverbs 11:4
The angel of the Lord appeared to him in a flame of fire out of the midst of a bush. He looked, and behold, the bush was burning, yet it was not consumed. And Moses said, “I will turn aside to see this great sight, why the bush is not burned.” When the Lord saw that he turned aside to see, God called to him out of the bush, “Moses, Moses!” And he said, “Here I am.” Exodus 3:2-3
Daniel answered and said: “Blessed be the name of God forever and ever, to whom belong wisdom and might. He changes times and seasons; He removes kings and sets up kings; He gives wisdom to the wise and knowledge to those who have understanding." Daniel 2:20-21
Now the Lord is the Spirit, and where the Spirit of the Lord is, there is freedom. 2 Corinthians 3:17
Previous slide
Next slide

This website participates in the Amazon Associates program. As an Amazon Associate I earn from qualifying purchases.

© 2021-2024 Wave Walker DSP