Part 2 explains complex numbers. Topics covered include real and imaginary numbers, periodic signals, digital frequencies, and discrete arithmetic.
By James D. Broesch
This series is excerpted from "Digital Signal Processing: Instant Access."
Order this book today and receive an additional 20% discount. Click here
www.elsevierdirect.com and be sure to type in 92836. Or call 1-800-545-2522 and be sure to mention 92836. Offer expires 12/31/2008.
Part 1 introduces the basic math needed for DSP. Part 3 explains the basics of filters.
COMPLEX NUMBERS
Now, on to the subject of complex numbers. We have stayed away from this subject until now simply because we did not want to confuse things.
FAQ
How do "imaginary" numbers represent real-world quantities?
Part of the confusion over complex numbers—particularly as they relate to DSP— comes from a lack of understanding over their role in the "real world" (no pun intended). Complex numbers can be thought of as numbers with two parts: the first part is called the real part, and the second part is called the imaginary part. Naturally, most numbers we deal with in the real world are real numbers: 0, 3.3, 5.0, and 0.33 are all examples. Since complex numbers have two parts, it is possible to represent two related values with one number; x-y coordinates, speed and direction, or amplitude and phase can all be expressed directly or indirectly with complex numbers.
Initially, it is easy to think of signals as "real valued." These are what we see when we look at a signal on an oscilloscope, look at a time vs. amplitude plot, or think about things like radio waves. There are no "imaginary" channels on our TVs, after all.
But in practice most of the signals we deal with are actually complex signals. For example, when we hear a glass drop we immediately get a sense of where the glass hit the floor. It is tempting to think of the signals hitting our ear as "real valued" —the amplitude of the sound wave reaching our ears as a function of time. This is actually an oversimplification, as the sound wave is really a complex signal. As the glass hits the floor the signal propagates radially out from the impact point. Imagine a stone dropped in a pond; its graph would actually be three-dimensional, just as the waves in a pond are three dimensional. These three-dimensional waves are, in fact, complex waveforms. Not only is the waveform complex, but the signal processing is also complex. Our ears are on opposite sides of our head to allow us to hear things slightly out of phase. This phase information is perceived by our brains as directional information.
The points we have been discussing, such as P(0,0) and P(x,y), are really complex numbers. That is, they define a point on a two-dimensional plane. We do not generally refer to them this way, however, as a matter of convention. Still, it is useful to remember that fact if things get too confusing when working with complex notation.
Insider Info
Historically, complex numbers were developed from examining the real number line. If we think of a real number as a point on the line, then the operation of multiplying by (-1) rotates the number 180° about the origin on the number line. For example, if the point is 7, then multiplying by (-1) gives us (-7). Multiplying by (-1) again rotates us back to the original value of 7. Thus, the quantity (-1) can be thought of as an operator that causes a 180° rotation. The quantity (-1)2 is just one, so it represents a rotation of either 0°, or equivalently, 360°.
This leads us to an interesting question: If (-1)2 = 1, then what is the meaning of √-1 ? There is no truly analytical way of answering the question. One way of looking at it, however, is like this: If 1 represents a rotation of 360°, and (-1) represents a rotation of 180°, then √-1 must, by analogy, represent a rotation of 90°. In short, multiplying by √-1 rotates a value from the x-axis to the x -axis. Early mathematicians considered this operation a purely imaginary (that is, having no relation to the "real" world) exercise, so it was given the letter i as its symbol. Since i is reserved for current in electronics, most engineers use j as the symbol for √-1. This book follows the engineering convention.
Key Concept
In our earlier discussion, we pointed out that a point on the Cartesian coordinates can be expressed as P (x, y). This means, in words, that the point P is located at the intersection of x units on the x -axis, and y units on the y -axis. We can use the j operator to say the same thing:
Thus, we see that there is nothing magical about complex numbers. They are just another way of expressing a point in the x-y plane. Equation 4-23 is important to remember since most programming languages do not support a native complex number data type, nor do most processors have the capability of dealing directly with complex number data types. Instead, most applications treat a complex variable as two real variables. By convention one is real, the other is imaginary. We will demonstrate this with some examples later.