<< Chapter < Page Chapter >> Page >

To see how this works, consider the first few columns. C 0 is a vector of all ones; it is the zero frequency sinusoid, or DC. C 1 is more interesting. The i t h element of C 1 is e j 2 i π / N , which means that as i goes from 0 to N - 1 , the exponential assumes N uniformly spaced points around the unit circle. This is clearer in polar coordinates, where the magnitude isalways unity and the angle is 2 i π / N radians. Thus, C 1 is the lowest frequency sinusoid that can be represented (other than DC); it is the sinusoid that fitsexactly one period in the time interval N T s , where T s is the distance in time between adjacent samples. C 2 is similar, except that the i t h element is e j 4 i π / N . Again, the magnitude is unity and the phase is 4 i π / N radians. Thus, as i goes from 0 to N - 1 , the elements are N uniformly spaced points which go around the circle twice.Thus, C 2 has frequency twice that of C 1 , and it represents a complex sinusoid that fits exactly two periods into thetime interval N T s . Similarly, C n represents a complex sinusoid of frequency n times that of C 1 ; it orbits the circle n times and is the sinusoid that fits exactly n periods in the time interval N T s .

One subtlety that can cause confusion is that the sinusoids in C i are complex valued, yet, most signals of interest are real. Recall from Euler's identities [link] and [link] that the real-valued sine and cosine can each be written as a sum of two complex valued exponentials that have exponents with opposite signs.The DFT handles this elegantly. Consider C N - 1 . This is

1 , e j 2 ( N - 1 ) π N , e j 4 ( N - 1 ) π N , e j 6 ( N - 1 ) π N , ... , e j 2 ( N - 1 ) 2 π N T ,

which can be rewritten as

1 , e - j 2 π N , e - j 4 π N , e - j 6 π N , ... , e - j 2 π ( N - 1 ) N T ,

since e - j 2 π = 1 . Thus, the elements of C N - 1 are identical to the elements of C 1 , except that the exponents have the opposite sign, implying that the angle of the i t h entry in C N - 1 is - 2 i π / N radians. Thus, as i goes from 0 to N - 1 , the exponential assumes N uniformly spaced points around the unit circle, in the opposite direction from C 1 . This is the meaning of what might be interpreted as “negative frequencies”that show up when taking the DFT. The complex exponential proceeds in a (negative) clockwise manner around the unit circle, ratherthan in a (positive) counterclockwise direction. But it takes both to make a real valued sine or cosine, as Euler's formula shows. For real valued sinusoids of frequency 2 π n / N , both W [ n ] and W [ N - n ] are nonzero and equal in magnitude. Since W [ n ] = W * [ N - n ] by the discrete version of the symmetry property [link] , the magnitudes are equal but the phases have opposite signs.

Which column C i represents the highest possible frequency in the DFT? What do the elements of this column look like?Hint: Look at C N / 2 and think of a square wave. This “square wave” is the highest frequency that can be representedby the DFT, and occurs at exactly the Nyquist rate.

Using the dft

Fortunately, M atlab makes it easy to do spectral analysis with the DFT by providing a number of simple commandsthat carry out the required calculations and manipulations. It is not necessary toprogram the sum [link] or the matrix multiplication [link] . The single line commands W = fft ( w ) and w = ifft ( W ) invoke efficient FFT (and IFFT) routines when possible, and relatively inefficientDFT (and IDFT) calculations otherwise. The numerical idiosyncrasies are completely transparent, with one annoying exception.In M atlab , all vectors, including W and w , must be indexed from 1 to N instead of from 0 to N - 1 .

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, Software receiver design. OpenStax CNX. Aug 13, 2013 Download for free at http://cnx.org/content/col11510/1.3
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Software receiver design' conversation and receive update notifications?

Ask