Homework #6: Fourier Transform (1-D)

Chris Smemoe , Computer Science 450


Table of Contents

1. Simple sines and cosines

2. Rectangular pulse function

3. Gaussian function

4. The convolution theorem

5. Discovering the transfer function g(t)

Here is the source code for computing the fourier transform.

 


1. Simple sines and cosines

Generate and display a one-dimensional sine wave of length 128 that makes 8 cycles over this length:

f[x,y] = sin(2 pi f x / N) where f = 8 and N = 128.

See the graph below for sine, cosine, sin+cos, and other combinations of the sin and cos waves--

Apply the Fourier Transform to this sinusoid and display the Real, Imaginary, Magnitude, and Phase parts of the result.

Explain each of the four parts.

The real, imaginary, and magnitude results from the sine wave show that the Fourier transform of a sine wave is the Dirac Delta function. The phase plot shows that the angle from the real number axis changes where frequencies are close to where the Dirac Delta function occurs on the complex axis.

Do the same thing as in A for a cosine wave.

Apply the Fourier Transform to this sinusoid and display the Real, Imaginary, Magnitude, and Phase parts of the result.

Explain each of the four parts.

The real, imaginary, and magnitude results from the cosine wave show that the Fourier transform of a cosine wave is the Dirac Delta function, and the complex number values are opposite from the Fourier transform of the sine wave. The phase plot shows that the angle from the real number axis changes where frequencies are close to where the Dirac Delta function occurs on the complex axis.

Do the same thing again but this time for the sum of your sine and cosine functions.

Apply the Fourier Transform to this sinusoid and display the Real, Imaginary, Magnitude, and Phase parts of the result.

Explain each of the four parts.

The real and imaginary components of the transforms of the sine and cosine functions are the sum of the Fourier transforms of the sine and cosine functions. The phase plot shows that the phases of the sine and cosine functions add together to create the phase spectrum.

Play with the relative weightings of the sine and cosine parts and see what happens.

Apply the Fourier Transform to this sinusoid and display the Real, Imaginary, Magnitude, and Phase parts of the result.

Explain each of the four parts.

In each of the above examples, the magnitudes and signs of the phase, real, and complex components changed based on the relative weights of the sine and cosine components. In other words, if the Fourier transform of the sine function was weighted more, the real and complex components and phase was closer to those of the sine function than those of the cosine function.

Return to the Table of Contents

 

2. Rectangular pulse function

Compute the Fourier Transform of the Rectangular Pulse (file: "1D_Rect128") and plot the real part, imaginary part, and Power Spectrum. Include a copy of the plots in your write-up - no sketching). (3 pts.)

Show (mathematically) in your write-up why you get this result. (2 pt.)

The result is a sinc function. The fourier transform of the rectangular pulse function is:

This equals (euler's law):

Since the complex integrand is an odd function, it is equal to zero. Evaluating the integral, we get:

This equals:

which is the sinc function as graphed above.

Return to the Table of Contents

 

3. Gaussian function

Compute the Fourier Transform of the Gaussian (file: "1D_Gauss128") and plot the real part, imaginary part, and Power Spectrum. Include a copy of the plots in your write-up - no sketching). (3 pts.)

Show (mathematically) in your write-up why you get this result. (2 pt.)

The Fourier transform of a Gaussian function is:

Multiplying the right-hand side by:

Yields:

Making the variable substitution u=t+js and du=dt, we get:

Since the integral above is 1, this equation reduces to:

which is a Gaussian, as represented in the result above.

Return to the Table of Contents

 

4. The convolution theorem

Using any of the signals above, design an experiment that will "prove" (i.e. visually) the Convolution Theorem. Include a copy of all relevant plots in your write-up - no sketching). (8 pts.)

To visually prove the convolution theorem, I used a rectangular and a gaussian to show that the convolution in the spatial domain is the same as multiplication in the frequency domain. Here are the steps I took to visually prove the convolution theorem:

  1. First, I plotted f(x)*g(x):

  2. Next, I determined F(s) and G(s)--The Fourier transform of the rectangular and Gaussian functions.

  3. Next, I multiplied F(s) and G(s) together and determined the inverse transform. Then, I plotted the result. The result was the same as the original convolution of f(x) and g(x). Therefore, the convolution theorem was proven for this case.

Prove the Convolution Theorem (mathematically) in your write-up. (2 pts.)

First, I will write down the fourier transform of the convolution of two functions:

After rearrangement, this becomes:

By the shift theorem, we can write:

The above equation means that:

Which is the convolution theorem.

Return to the Table of Contents

 

5. Discovering the transfer function g(t)

In Figure 10-3, p. 186, let f(t) = the Rectangular Pulse (file: "1D_Rect128").

Let h(t) = the output (file: "1D_Output128"). Use the Convolution Theorem to find g(t) and plot g(t) in your write-up - no sketching).

Hint: be careful of division by 0! (Treat 0/0 as 0.)

Here is the plot of g(t):

Return to the Table of Contents

 


smemoe@byu.edu
Date last modified: 10/29/1999