fft2 - Intuitive Guide to Principals of Communications...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Intuitive Guide to Principals of Communications Tutorial 6 - Fourier Analysis Made Easy Part 2 Complex representation of Fourier series e jwt cos wt i sin wt (1) Bertrand Russell called this equation “the most beautiful, profound and subtle expression in mathematics.”. Richard Feyman., the noble laureate said that it is “the most amazing equation in all of mathematics”. In electrical engineering, this enigmatic equation is equivalent in importance to F = ma. This perplexing looking equation was first developed by Euler (pronounced Oiler) in the early1800’s. A student of Johann Bernoulli, Euler was the foremost scientist of his day. Born in Switzerland, he spent his later years at the University of St. Petersburg in Russia. He perfected plane and solid geometry, created the first comprehensive approach to complex numbers and is the father of modern calculus. He was the first to introduce the concept of log x and ex as a function and it was his efforts that made the use of e, i and pi the common language of mathematics. He derived the equation ex + 1 = 0 and its more general form given above. Among his other contributions were the consistent use of the sin, cos functions and the use of symbols for summation. A father of 13, he was a prolific man in all aspects, in languages, medicine, botany, geography and all physical sciences. The secret to this equation lies in understanding that sinusoids are a special case of a general polynomial function of the form ejwt in Euler’s equation is a decidedly confusing concept. What exactly is the role of j in ejwt? We know that it stands for 1 but what is it doing here? Can we visualize this function? Tutorial 6 - Fourier Analysis Made Easy Part 2 Charan Langton, complextoreal.com Page 1 Before we continue the discussion of Fourier Series and its complex representation, let’s first try to make sense of ejwt as it relates to signal processing. Take any real number, say 3, and plot it on a X-Y plot as in Fig 1a. Multiply this number by j, so it becomes 3j. Where do we plot it now? Herein lies our answer to what multiplication with j does. Y 3j Each time the number is multiplied by o, i it shifts by 90 . Y 3i Phase shift due to multiplication with j 3 -3 X X 3 Figure 1a - Relationship of real and imaginary numbers -3j Figure 1b – Multiplication with j represents a phase shift The number stays exactly the same, 3j is the same as 3, except that multiplication with j shifts the phase of this number by +90o. So instead of an X-axis number, it becomes a Y-axis number. Each subsequent multiplication rotates it further by 90o in the X-Y plane as shown in Figure 1b. 3 become 3j, then -3 and then -3j and back to 3 doing a complete 360 degree turn. Division by j means the opposite. It shifts the phase by -90o. (Question: What does division by -j mean?) Alternately, imagine a number that is multiplied by -1. In Cartesian sense, we say that the point has now rotated 180o to the negative x-axis. Another multiplication by a -1 rotates back to the positive x axis. If that is the case, then a square root of -1 can be conceptualized as a rotation of 90 o. A rotation of - 1 can be seen as a 270o rotation. This is also essentially the concept of complex numbers. A compound number called the complex number consists of numbers in more than one dimension. The operator I is used to indicate this dimensional difference. Complex numbers often thought of as “complicated numbers” follow all of the common rules of mathematics. Whereas in calculus of real numbers, we deal with numbers along a line in one dimension, in complex math, we allow numbers to move in many dimensions and have an another property called phase associated with them. Perhaps a better name for complex numbers would have been 2D numbers. Tutorial 6 - Fourier Analysis Made Easy Part 2 Charan Langton, complextoreal.com Page 2 To further complicate matters, the axes, which were called X and Y in our Cartesian mathematics are now called respectively Real and Imaginary. Why so? Is the quantity 3j any less real than 3? This semantic confusion is the unfortunate result of the naming convention of complex numbers and helps to make them confusing, complicated and of course complex Y 3 ejwt 3+j3 sin wt X X 3 cos wt Figure 2 – a. Plotting complex numbers b. plotting a complex function Now let’s plot a complex number, 3 + j3. In Cartesian math we would write this number as (3,3) indicating 3 units on the X-axis and 3 units in the Y-axis. Similarly, the real quantity is plotted on the X-axis (real part) and the j coefficient (imaginary part) is plotted on the Y-axis. These are the X-Y projections of this number. The projection magnitudes are real and not encumbered by the vexing j. A complex number can have for its coefficients, instead of numbers, equations (cos x, sin x). We plot these in exactly the same way as shown in Figure 2b except that X and Y projections instead of being numbers, are functions, namely sine and cosine in this case. Now let’s take a look at the ejwt again. It is called a Cisoid {(cos x + j sin x)usoid} from contraction of the parts of the Euler’s equation. Now forget about the ejwt part and concentrate only on the RHS containing sines and cosines. e jwt cost j sin t We plot this function by setting the X-axis = cos wt and the Y-axis = sin wt. This plot is shown in Figure 3. Tutorial 6 - Fourier Analysis Made Easy Part 2 Charan Langton, complextoreal.com Page 3 Figure 3 – ejwt plotted in three dimensions is a helix Imaginary Axis sin wt cos wt Time Real Axis In Figure 3 cos wt is plotted on the Real axis and sin wt is plotted on the Imaginary axis. The function looks like a helix moving forward in time to the right. The X-Z and the Y-Z projections, if plotted, would be the sine and cosine functions. Had we plotted the function e-jwt, we would have seen that it moves to the left instead of to the right. This direction of rotation has important implications for the definition of frequency. The quantity “ee-to-the-jay-omega-tee” is a mouthful and is commonly called a Phasor, particularly in electrical engineering. Phasors are plotted with time dimension suppressed, so they look like a vector frozen in time with its plane rotating with the angular frequency of the cisoid. Now let’s express sines and cosines in terms of our new quantity ejwt. So we have Tutorial 6 - Fourier Analysis Made Easy Part 2 Charan Langton, complextoreal.com Page 4 e jwt cos wt j sin wt and Q e jwt cos wt j sin wt (2) e jwt cos wt j sin wt Manipulating these two equations, we get e jwt e jwt 2j sin wt (3) e jwt e jwt cos wt 2 Now let’s just substitute Q+, for ejwt and Q- for e-jwt , we get cos wt sin wt Q Q 2 Q Q 2j (4) The use of Q is just to make it easier to see what is happening. We have redefined sine as a difference between two phasors Q+ and Q- and cosine as the sum of the same of the same two phasors. The presence of j in the definition of sine means that it is -90o to the other term and nothing more. So mentally erase the j in the denominator, if it bothers you. The phasor Q+ is arbitrarily defined to rotate in the counterclockwise direction and the Q- phasor in the clockwise direction. The vector sum of these two phasors is changing with time and represents the cosine and sine functions. In Figure 4 we show two phasors at a particular time. They always rotate in opposite directions and meet each other at 0 and 180 degrees. Their instantaneous vector sum equals the quantity (2 cos(wt)) and their vector difference equal (2 sin(wt).) Tutorial 6 - Fourier Analysis Made Easy Part 2 Charan Langton, complextoreal.com Page 5 Y 2sinwt = ejwt - e-jwt e-jwt ejwt Q+ Q- Phasor Q+ rotates counterclockwise with time X Phasor Q- rotates clockwise with time 2coswt = ejwt + e-jwt Figure 4 – ejwt and e-jwt phasors In Figure 5 we plot the progression of these two phasors to see how their sum and differences would equal the cosine and sine function. Each picture depicts the phasors at a particular time. Time is increasing as one moves from left to right then to retrace as in reading a page. Imaginary Imaginary 2 sinwt = 2/sqrt(2) ejwt 1 1 ejwt 1 2 sinwt = 0 e-jwt Real 2 2 cos wt = 2 Real 2 coswt = 2/sqrt(2) 1 e-jwt Figure 5a - Phasor representation of sine and cosine, 1. Wt = 0, 2. Wt = pi/4 At t = 0, both phasors are horizontal. Their vector sum is twice the length of each. So cos wt = 1 and since the difference is zero, sin wt = 0 At t = pi/4, the Q- phasor has rotated up to pi/4 and the Q- phasor has rotated to pi/4. Now their vector sums, give us cos wt = 1/sqrt 2 and their difference gives also 1/sqrt2. Tutorial 6 - Fourier Analysis Made Easy Part 2 Charan Langton, complextoreal.com Page 6 4. wt = 3 3. wt = Imaginary Imaginary ejwt At wt = -3pi/4 ejwt 2 sinwt = 2 Real Real 2 coswt = -2/sqrt(2) 2 cos wt = 0 2 sinwt = 2/sqrt(2) e-jwt e-jwt Figure 5b - Phasor representation of sine and cosine, 1. Wt = pi/2, 2. Wt = 3pi/4 At t = pi/2, Q+ phasor has rotated upright and the Q- has rotated down to the opposite side. Now the vector sum gives us the cos wt = 0 and sin wt = 1. At t = 3pi/4, we get the same situation as at t = 0, but the cosine term is negative as it should be. Imaginary 5. wt = ejwt Real -2 cos wt = -2 e-jwt 2 sin wt = 0 Figure 5c- Two phasors at wt = pi/2 At wt = pi/2, the phasors meet again. The sine term which is the difference is once again zero and the cosine term is the sum of the two magnitudes and as such cos wt = 1 and sin wt =0. By following each phasor we see that at every t, we get the conventional and correct values of sine and cosines. Tutorial 6 - Fourier Analysis Made Easy Part 2 Charan Langton, complextoreal.com Page 7 Now we make the following important points that will help us in dealing with concepts of negative frequency and signals in quadrature. 1. Cosine wave is sum of two phasors rotating in opposite directions divided by 2. 2. Sine wave is difference of the same two phasors divided by 2. 3. Since any real periodic signal can be represented as a sum of sines and cosines, then it also be represented as a sum of positive and negative phasors (also called exponential). 4. Just as we could create a spectrum out of the coefficients of the sinusoids, we can do the same thing out of the coefficients of the phasors. If we think about sine and cosines strictly in terms of phasors and forget about the old trigonometric definition of sine in terms of frequency and amplitude, we can talk about (but using old terminology) the concept of negative frequency. We can say that both sine and cosine waves are made up of two quantities called phasors, a phasor of positive frequency, ejwt and a phasor of negative frequency, e-jwt. So both sine and cosine contain negative frequency content. The idea is similar to talking about negative colors or negative people. These are perceived as physical properties and it is hard for us visualize them as negative. But when seen from a mathematical perspective, there is such a thing as a negative color; white can bee seen as negative of black and according to my esteemed colleague Dr. Dave Watson, there is definitely such a thing as “negative person.” but of course none in Advanced Systems! This terminology is confusing because in complex domain we are not talking about frequency at all but the exponent of the exponential, ejwt. The Q+ phasor represents the positive frequency content and the Q- phasor the negative frequency because of the sign of the exponent. Each phasor then represents only the positive or the negative frequency. Here is a hardware oriented view of negative frequency. A two-pole permanent magnet AC generator connected to same shaft with their field windings in space quadrature will produce a positive frequency output by driving the shaft in one direction of rotation. And a negative frequency output when driven in the opposite direction. So it is direction of the motion that determines the sign of the frequency. The difficulty is that frequency is really a two dimensional concept but is often seen only as one. Two dimensions are needed to describe a frequency, its cycles per second and its direction of rotation. Historically we have always talked of frequency as a physical quality of a wave. Spectrum analyzers and other electrical measuring devices are one dimensional as well which limits our understanding of the general concept of frequency. The general concept of frequency can be written as follows Tutorial 6 - Fourier Analysis Made Easy Part 2 Charan Langton, complextoreal.com Page 8 f d dt We can define frequency as the rate of change of phase over time. So a + 2 rotation over half second means the frequency is 2. And here we see that if phase rotates around counter-clockwise, then we have the definition of positive frequency and when it goes the other way then it is negative. A - 2 rotation over half second means the frequency is -2. Velocity or speed which we also tend to think of as a scalar has a similar confusing aspect. We can talk about 60 miles per hour and this makes perfect sense. But what does –60 miles per hour mean? Mathematically it is a perfectly OK construct. It just means same speed but going backwards. The concept of negative frequency is just as simple as that. What use is ejwt? Why bother with it at all? Recall that we can use a sinusoid as a filter. When we multiply a signal by a sinusoid of a particular frequency, the product when integrated reveals the frequency of the sinusoid hidden in the signal. To compute trigonometric coefficients, this is essentially what we do, we multiply a random signal by sinusoids of different frequencies to yield all its frequency components. Multiplying by ejwt does exactly same thing. Except that now instead of doing sines and cosines one at a time we can do them both together. The function allows us to deal with two dimensional signals together. We can also interpret the multiplication as a form of frequency shifting. When we multiply a signal by ejw0t, then we are essentially isolating and shifting that signal to the w0 frequency to the right. When we multiply it by a e-jw0t, then we are shifting it leftwards to - w0. Figure below shows the effect of this multiplication. Figure 8a shows the Amplitude spectrum centered about frequency = 2. Multiplying this signal by e j ( 2f ) t where f = 2 causes the spectrum of the new signal to shift to 4 for a total shift of f = 2. When we multiply this signal by e j ( 2f ) t where f = -2 causes the spectrum of the new signal to shift to 0 for a total shift of f = -2 as in Figure 8c. This important property of Cisoid allows us to shift signals from baseband to carriers and vice versa. It is a fundamental equation whenever we talk about modulation. Tutorial 6 - Fourier Analysis Made Easy Part 2 Charan Langton, complextoreal.com Page 9 0 1 2 3 Frequency Figure 6a - Amplitude Spectrum of an arbitrary signal f(t) 0 1 2 3 4 Frequency Figure 6b - Amplitude of signal f(t) multiplied by e -1 0 1 2 j 4 t 3 4 Frequency Figure 6c - Amplitude Spectrum of signal f(t) multiplied by e Tutorial 6 - Fourier Analysis Made Easy Part 2 Charan Langton, complextoreal.com 5 5 j 4t Page 10 Back to the Fourier Series— Recall that Fourier Series is a sum of sinusoids. N f (t ) a0 a N sin( wn t ) n n 1 b n cos( wn t ) (5) n 1 The coefficients a0, an and bn (which we can call the trignometric coefficients) are defined as 1 a0 T 2 T an 2 T bn T f (t )dt 0 T f (t ) sin nwt dt 0 T f (t ) cos nwt dt 0 Now substitute Eq 4a and 4b as the definition of sine and cosine into Eq 5, and we get N f (t ) a0 2 (e an jnwt e jnwt ) n 1 bn jnwt (e e jnwt ) 2i (6) Now let’s make the same substitution in the equations for the previously derived Fourier coefficients. 2 an T bn 2 T T f (t ) 2i (e 1 jnwt e jnwt )dt (7a) 0 T f ( t ) 2 e 1 jnwt e jnwt dt (7b) 0 Expanding and rewriting Eq 6, we get 1 1 f ( t ) a0 ( a n ibn )e jnwt ( a n ibn )e jnwt 2 n 1 2 (8) the coefficients in Eq 7 can be written as follows by just rearranging and simplifying. Tutorial 6 - Fourier Analysis Made Easy Part 2 Charan Langton, complextoreal.com Page 11 1 an T 1 ibn T T f (t )e jnwt 0 1 dt T T f (t )e jnwt 0 1 dt T T f (t )e jnwt dt (9a) 0 T f (t )e jnwt dt (9b) 0 In exponential from, these are kind of hard to write, so let’s redefine new coefficients An and Bn 1 ( a n jbn ) 2 1 Bn ( a n jbn ) 2 An (10a) (10b) Substituting these new definition into the Eq 6, we get a much simpler representation f (t ) a0 A e jnwt n Bn e jnwt dt (11) n 1 An 1 T T f (t )e jnwt dt 0 (12) Bn 1 T T f (t )e jnwt dt 0 It is clear from the above equation that An can be seen as the coefficients of the positive frequency and Bn the coefficient of the negative frequency. Do you remember that the term a0 stands for the DC term in Eq 11. We generally do not like DC terms so we will try to get rid of it by expanding the range of the second term from 1 to infinity to include 0 so it goes from 0 to infinity instead and as such includes the DC term. Rewrite Eq 11 as f (t ) a0 A e jnwt n Bn e jnwt dt (13) Bn e jnwt dt (14) n 1 f (t ) n0 An e jnwt n 1 Note that the index changed from 1 Tutorial 6 - FourieroAnalysis Madefirst (DC) term. t 0 to include the Easy Part 2 Charan Langton, complextoreal.com Page 12 The above equation can be simplified still further by extending the range of the coefficients from -1 to -infinity. We can do this by changing the sign of the index. Combine the two terms of Eq 14 to write a much more compact and elegant equation for the Fourier Series. And here is our much shorter equation for Fourier Series. f (t ) C e jnwt (15) n n The above is called the exponential or the complex form of the Fourier Series. It is rigorously related to the sinusoidal form but its coefficients Cn are generally complex. Note that our index (or the frequency) was always positive before and the spectrum was one sided. Now the index goes from - to + . We have by a mathematical trick taken the perfectly good one-sided spectrum computed by the trigonometric coefficients and now folded it over to make a two sided symmetrical spectrum. Its coefficients are exactly half of the one-sided coefficients. The coefficient Cn is given by Cn 1 2T T f (t )e jnwt dt T Cn is related to the trigonometric coefficients by Cn An jBn The magnitude and phase of Cn is defined by Cn An Bn 2 2 Bn An n tan 1 An and Bn can be seen as the coefficients on each side of the origin. Example 1 - Fourier coefficients of a cosine wave Tutorial 6 - Fourier Analysis Made Easy Part 2 Charan Langton, complextoreal.com Page 13 f (t ) A cos wt A A Q Q 2 2 We get the trigonometric coefficients from looking at the first equation. It is simply A and it is at f = 1. We get the complex coefficients by looking at the coefficients of the two phasors in the second equation. They are A/2 located at +f and -f. The two spectrums are shown below. v(t) [V] A/2 A [V] A/2 t f Real Real 2. v(t) = A cos wt Figure 7 - Single and double-sided spectrum of a sine wave Example 2 - Fourier coefficients of a sine wave f (t ) A sin wt A A Q Q 2j 2j We get the trigonometric coefficients from looking at the first equation. It is simply A and it is at f = 1 just as it was for the cosine wave above. We get the complex coefficients by looking at the coefficients of the two phasors in the second equation. They are A/2 and -A/2 located at +f and -f. The two spectrums are shown below. Note the sign change in the coefficients of the negative frequency phasor. Presence of j tells us that we have to plot the coefficients -90 phase shifted. Figure below shows this plot. Tutorial 6 - Fourier Analysis Made Easy Part 2 Charan Langton, complextoreal.com Page 14 v ( t) [V] [V] A t A/2 A/2 f Real Real 2. v(t) = A sin wt Figure 8 - Single and double-sided spectrum of a sine wave Example 3 - Fourier coefficients of f(t) = A(cos wt + sin wt) f (t ) A(cos w sin wt ) A A A A Q Q Q Q 2 2 2j 2j We get the trigonometric coefficients from looking at the first equation. It is simply A times the square root of 2 and it is at f = 1. We get the complex coefficients by looking at the coefficients of the two phasors in the second equation. Q+ phasor which has two coefficients each 90 degrees from each other. The same is true for Q- phasor. Note the coefficients of sine wave are 90 degrees to the cosine coefficients just as they were in Example 2 Figure below shows this plot. v(t) [V] sqr t (2)*A [V] sqr t (2)*A sqr t (2)*A/2 t sqr t (2)*A/2 f Real Real 2. v(t) = A cos wt + A sin wt Figure 9 - Single and double-sided spectrum of f(t) = A (cos wt + sin wt) Tutorial 6 - Fourier Analysis Made Easy Part 2 Charan Langton, complextoreal.com Page 15 Example 4 - Fourier coefficients of a complex signal f(t) = A(cos wt + jsin wt) f (t ) A(cos w j sin wt ) A A A A Q Q Q Q 2 2 2 2 We can split the first equation into sine and cosine and the trigonometric coefficients are as in Ex 1 and 2. We sum the two contributions to get A times the square root of 2 at f = 1. Now here we see something interesting. Note the coefficients of Q- by sine is rotated up to be coincident with the coefficient of cosine. The two subtract. On the positive side, once again, they are coincident but they add. The complex phasor Q- makes no contribution at all. It cancels out. So we see a single valued delta function at positive frequency only. This is a surprising and perhaps a counter-intuitive result. v(t) [V] sq rt (2) *A [V] sq rt (2) *A/2 sq r t (2)*A t f R e al Real 2. v(t) = A cos wt + j A sin wt Figure 10 - Single and double-sided spectrum of a complex signal f(t) = cos wt + j sin wt Example 5 - a constant signal Tutorial 6 - Fourier Analysis Made Easy Part 2 Charan Langton, complextoreal.com Page 16 [V] v(t) A2/2 t Real f Figure 11 - f(t) = a constant We can write the F(t) as an exponential of zero frequency. f ( t ) A cos( w 0)t A A Q Q 2 2 From the first representation, we get the trigonometric coefficient = A at w =0. From the second representation we get the two complex coefficients, A/2 and A/2 but both are at w = 0 so their sum is A which is exactly the same as the trigonometric representation. The function f(t) is a non-changing function of time and we classify it as a DC signal. The DC component if any always shows up at the origin for this reason. Example 6 - a real signal f (t ) .3 cos 2tt .5 sin 2t .9 cos 4t .6 sin 4t .2 cos 6t .3sin 6t Figure 12 - A periodic signal Tutorial 6 - Fourier Analysis Made Easy Part 2 Charan Langton, complextoreal.com Page 17 By inspection alone, we can draw its one-sided amplitude spectrum. The signal has three harmonics, at f = 1, f = 2 and f = 3. We can write down the trigonometric a and b coefficients for each harmonic just by looking at the signal f(t) equation. Harmonic 1 a1 = .3 b1 = -.5 Harmonic 2 a2=.9 b2 = .6 Harmonic 3 a3 = -.2 b3 = .3 Creating the spectrum is a simple matter of summing ( ( a1 ) 2 ( b1 ) 2 ) the a and b coefficients for each harmonic and drawing them as shown below. 1.08 .58 .36 w=1 w=2 w=3 Frequency Bandwidth Figure 13 - One sided Spectrum of f(t) Now let’s draw the spectrum of the same signal using the complex form. From Eq 16, we have the complex coefficients An and Bn. From these, we can compute Cn. 1 An ( a n ibn ) 2 An 1 2 2 a n bn 2 1 Bn ( a n ibn ) 2 Bn 1 2 2 a n bn 2 Cn Cn 1 2 2 a n bn 2 An Bn 2 2 We can see that the magnitude of the coefficient C is exactly half of the singlesided spectrum magnitude. We compute Cn for positive n and since this is a real signal, Cn for negative n are equal to ones for the positive n. Tutorial 6 - Fourier Analysis Made Easy Part 2 Charan Langton, complextoreal.com Page 18 .54 .29 -1 -2 .18 1 -3 2 3 Frequency Bandwidth Figure 14 - Two-sided spectrum from complex representation of Fourier series Magnitude and Power spectrum of a signal derived from the Fourier coefficients The spectrum we draw from the Fourier Series coefficients is called the Magnitude spectrum or loosely just called the spectrum. The spectrum quantities are always 0 or greater than zero and never negative. So there is something that is never negative, and that is Power. The amplitude spectrum can be converted to the power spectrum by the Parseval’s relationship Pg 1 T T v ( t ) dt 2 Cn n 0 2 C C n * n n The relationship says that the power in any tone is just the square of its amplitude. (for R = 1 ohm) The division by T gives us the average power in the period. So we take the amplitude spectrum, divide each term by 2 , square each term and then add them all together. For the above example, we would get for total power of the signal. 2 2 2 .29 .58 .18 P 2 2 2 = .268 2 2 2 The power can also be computed by multiplying the complex coefficients Cn by its complex conjugate Cn* and summing for all n. The Power Spectral Density (PSD) can then be computed by dividing each magnitude component by its frequency. Copyright 1998 All Rights Reserved C. Langton, mntcastle@earthlink.net Tutorial 6 - Fourier Analysis Made Easy Part 2 Charan Langton, complextoreal.com Page 19 ...
View Full Document

This note was uploaded on 02/07/2011 for the course EEE EE567 taught by Professor Tutorials during the Spring '11 term at Birla Institute of Technology & Science, Pilani - Hyderabad.

Ask a homework question - tutors are online