Waves: Part 4 - Complex Numbers
In this part we look at the most elegant way of finding and defining a sine wave.
Other articles in this series and more series by the same author:
In broadcasting and in the wider fields of electronics, we are accustomed to turn to mathematics when quantitative answers are needed. The power in a resistive load goes as the square of the voltage, for example. Squaring can be eased by using logarithms, because the logarithm is simply doubled. Increase the voltage by 3dB and the power goes up by 6dB. It follows that 3dB must be the equivalent of the square root of two.
As we are, or should be, used to messing about with logarithms and square roots, it should not be too much of a chore to push the ideas a little further out.
The square root is an interesting idea. The square root of x is a number which, when multiplied by itself, or squared, gives x. Two squared is four, three squared is nine and so on. It’s a characteristic of squares like four and nine that they are all positive. Minus one squared is also plus one. It seems a bit unfair that there are no negative squares. In the real world there aren’t and there never will be. However, using our imagination, we can speculate about what things would be like if there were.
In the same way that mermaids and unicorns are found in the dictionary, mathematicians have a symbol called i, which is the square root of minus one. As the electrical community had already reserved i as the symbol for current, they converted it to j. The two are interchangeable. In the real world, there is no such thing as the square root of minus one, so it has to be imagined. Having taken that step, if i or j did exist, what characteristics would it have?
It turns out that i can be treated much like any variable, such as x or y in algebra and will work its way through equations and calculations just like any other variable but with one difference, which is that if we want a real answer at the end, we have to square it. The need for imagination collapses and it becomes a nice real minus one. This is all very well, but is it not just a lot of academic hot air? Actually no, it isn’t because it has some tangible applications that are very useful. If it didn’t it would have fallen by the wayside.
Trying to visualize the intangible leads on to the topic of imaginary numbers. Fig.1a) shows the real numbers. They populate a one-dimensional line, the real axis, going both ways from zero. Fig.1b) shows that we can make the system two dimensional by adding a vertical axis, known as the imaginary axis which is in units of i or j.
A complex number is now specified by where it sits on the plane. It can be specified by a real component that locates it in a, and an imaginary component that locates it in b. The complex number is written as a + bi. The complex number is a vector having length and direction. It can therefore be specified by a different pair of parameters as shown in Fig.1c). These are the modulus, r, and an angle known as the argument.
Fig.1 a) Real numbers live in one dimension, b) Complex numbers are two dimensional and the real axis lies across the center. The imaginary axis is vertical and has units of i. A complex number can by specified by a and b, c) A complex number can also be specified by the Modulus, which is the radius and the Argument which is an angle.
The modulus can be found from a and b using Pythagoras. The argument is also known as the phase. The relationship between the a + bi notation and the modulus and argument notation is exactly the same as the difference between component and composite video. And why exactly are we doing this? Very simply, that if we can find a mathematical way of making a vector having a constant modulus rotate at constant speed in the complex plane, it will trace out a circle and we will get a sine wave on the real axis.
Fig. 2 shows a step along the way to that. Simply by raising i to successively higher powers we can make the result rotate around the origin. The locations of i and i2 in complex space are obvious. i3 is i2 x i, which is –i and i4 is i2 x i2, which is +1. Further increases in the power of i simply causes the rotation to repeat. Clearly if we used powers of i that were not integers we could draw that circle.
Now we need to take a look at another peculiar number, which mathematicians call e. Its value is about 2.718…, but it is an irrational number, so that it can never be written to its full accuracy however many decimal places are used. e has some interesting properties, as shown in Fig.3, which is a graph of y = ex. The graph has the characteristic that the slope is equal to y, the value. As the slope of a function is obtained by differentiating it, it follows that differentiating a function of e makes no difference, which simplifies some calculations.
A function of e is usually exponential, but if the exponent is a function of i, then something peculiar happens. The imaginary nature of i means that instead of increasing the modulus, which would make the result bigger, the argument increases instead, which simply turns the modulus to a new direction.
Fig.4 shows the result of raising e to various powers is to go around a circle in the complex plane.
This result was first found by Leonhard Euler, back somewhat before rock and roll, in about 1740. Euler’s Equation is also shown in Fig.4. Richard Feynman described it as a jewel and as the most remarkable formula in mathematics. Essentially Euler’s equation allows us to move from the polar expression in e on the left to the Cartesian expression on the right. The analogy between composite video and component video is quite good.
It is remarkable enough that Euler was able to come up with this equation. It is even more remarkable that he was able to prove it. More remarkable still is that it can be proved in more than one way. If the Taylor series for the exponential expression is set down, it can be picked apart into two separate series. One of these is the series for a sine wave and the other is for a cosine wave. This is all very well once Euler’s equation is known, but it doesn’t help to understand how he got to it.
Fig.4 Euler’s equation links the exponential form of a complex rotation with the sine and cosine representation.
It seems astonishing that Euler discovered this relationship so early. Back then there was no electronics, not even electricity. There was practically no science beyond Galileo’s telescope; only philosophy and wacky stuff like alchemy. This reinforces the view that mathematics is not a science, because it does not observe nature and needs no specialized apparatus. Even if it did, complex numbers cannot be observed.
It appears that mathematics is instead is a valuable outgrowth from logic, which needs no equipment beyond pencil, paper and thought. The ancient Greeks managed drawing in the sand with a stick. Mathematics is extremely useful to both science and technology.
Now we have our rotation in the complex plane it is a simple step to take the real part, which is a sine wave. However, we have to think carefully what we did when we went from a rotation in two dimensions to a wave in one. Essentially, we got rid of the cosine wave. That is not possible if we start with a single rotation in a single direction. Fig.5a) shows that we need to start with a pair of rotations, turning in opposite directions, and add them. The cosine components are in antiphase and cancel out, leaving only a sine wave, which is actually the sum of two sine waves, one of positive frequency and one of negative. Fig.5b) shows the spectrum of a sine wave contains equal amounts of positive and negative frequency.
Fig.5 a) a pair of contra rotations. The vertical motion is coherent and adds. The horizontal motion cancels, b) The contra rotation requires a sine wave to have equal amounts of positive and negative frequency, hence the pair of sidebands obtained in modulation.
Something similar is done in the discrete cosine transform (DCT). The block of samples is mirrored, by repeating it backwards in front of the original data. If a Fourier transform is carried out on the mirrored block, we will find that all of the sine coefficients have a value of zero, because mirroring the block put the sine components in the first half in antiphase to those in the second half of the block. In practice we simply don’t bother to calculate the sine coefficients and the output of the DCT consists of cosine coefficients only. The coefficients are scalars rather than the vectors of the Fourier transform.
In the base band, positive and negative frequencies are indistinguishable, so we don’t usually consider them. However, once we employ any kind of modulation the positive and negative frequencies can be seen as upper and lower sidebands. Sampling is, of course, a modulation process and sampling, broadcasting and cinematography are completely inseparable, so we will have quite a bit more to say about that.
You might also like...
The Importance Of CDN Selection To Achieve Broadcast-Grade Streaming Experiences
Multi-CDN is a standard model for today’s OTT Operators, which automatically requires a CDN selection solution. As streaming aims to be broadcast-grade and cost-effective, how are CDN Selection solutions evolving to support these objectives?
OTT’s Unique Storage Requirements
Central storage systems for OTT are unique in the world of media storage. They combine a set of requirements which no other media use case must handle.
Waves: Part 9 - Propagation Inversion
As a child I came under two powerful influences. The first of these was electricity. My father was the chief electrician at a chemical works and he would bring home any broken or redundant electrical parts for me to tinker…
OTT Content Origination
Content Origination is in the midst of significant transformation, like all parts of the OTT video ecosystem. As OTT grows and new efficiencies are pursued, Origination must play its part as a fundamental element of the delivery chain. But Origination…
The Big Guide To OTT: Part 2 - Content Origination
Part 2 of The Big Guide To OTT is a set of three articles which dig into the key issues of OTT content origination, the unique demands of OTT content storage, and the role of CDN selection in achieving broadcast grade…