<< Chapter < Page
  Digital signal processing - dsp     Page 4 / 14
Chapter >> Page >

The real part of the spectrum is symmetrical

The real part of the complex spectrum is shown in the second plot from the top in Figure 1 . It will become important later to note that the real part of the spectrum is symmetrical about the folding frequency near the center of theplot (at the eighth tick mark) .

Without attempting to explain why, I will simply tell you that the real part of the Fourier transform of a complex series whose imaginary part is all zeros (like a typical sampled time series for real-world data) is always symmetrical about the folding frequency.

The imaginary part of the spectrum is asymmetrical

The imaginary part of the complex spectrum is shown in the third plot from the top. Again, it will become important later to note that the imaginary partof the spectrum is asymmetrical about the folding frequency.

Once again, without attempting to explain why, the imaginary part of the Fourier transform of a complex series whose imaginary part is all zeros (like a typical sampled time series for real-world data) is always asymmetrical about the folding frequency.

The converse is also true

It is also true that the values of the imaginary part of the Fourier transform of a complex spectrum whose real part is symmetrical about the foldingfrequency and whose imaginary part is asymmetrical about the folding frequency will all be zero. I will take advantage of these facts later to simplify thecomputing and plotting process.

The amplitude spectrum

The amplitude spectrum is shown in the fourth plot down from the top. Recall from previous modules that the amplitude values are always positive, consistingof the square root of the sum of the squares of the real and imaginary parts.

The output time series

The output time series, produced by performing an inverse Fourier transform on the complex spectrum is shown in the bottom plot in Figure 1 . Compare the bottom plot to the top plot. As you can see, they are the same, demonstratingthe reversible nature of the Fourier transform.

The program named Dsp035

I will discuss this program in fragments. A complete listing of the program is provided in Listing 14 near the end of the module.

The beginning of the class named Dsp035

The beginning of the class for Dsp035 , including the declaration of some variables and the creation of some array objects is shown in Listing 1 . This code is straightforward.

Listing 1. The beginning of the class named Dsp035.
class Dsp035 implements GraphIntfc01{ final double pi = Math.PI;int len = 256; double[]timeDataIn = new double[len];double[] realSpect = new double[len]; double[]imagSpect = new double[len];double[] angle = new double[len];//unused double[]magnitude = new double[len];double[] timeDataOut = new double[len];

Beginning of the constructor

The constructor begins in Listing 2 . The code in Listing 2 creates the input time series data shown in the top plot of Figure 1 .

Listing 2. Beginning of the constructor.
public Dsp035(){//constructor //Create the raw data pulsestimeDataIn[0] = 0;timeDataIn[1] = 50;//... //code deleted for brevity//... timeDataIn[254]= -80; timeDataIn[255]= -80; //Create raw data sinusoidfor(int x = len/3;x<3*len/4;x++){ timeDataIn[x]= 80.0 * Math.sin( 2*pi*(x)*1.0/20.0);}//end for loop

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, Digital signal processing - dsp. OpenStax CNX. Jan 06, 2016 Download for free at https://legacy.cnx.org/content/col11642/1.38
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Digital signal processing - dsp' conversation and receive update notifications?

Ask