Listings
Preview
In this module, I will present and explain the following new programs:
-
Dsp035 - Illustrates the reversible nature of the
Fourier transform. This program transforms a real time series into a complexspectrum, and then reproduces the real time series by performing an inverse
Fourier transform on the complex spectrum. This is accomplished using a DFTalgorithm.
-
InverseComplexToReal01 - Class that implements an
inverse DFT algorithm for transforming a complex spectrum into a real timeseries.
-
Dsp036 - Replicates the behavior of the program named
Dsp035 but uses an FFT algorithm instead of a DFT algorithm.
-
InverseComplexToRealFFT01 - Class that implements an
inverse FFT algorithm for transforming a complex spectrum into a real timeseries.
-
Dsp037 - Illustrates filtering in the frequency domain.
Uses an FFT algorithm to transform a time-domain impulse into the frequencydomain. Modifies the complex spectrum, eliminating energy within a specific
band of frequencies. Uses an inverse FFT algorithm to produce the filteredversion of the impulse in the time domain.
In addition, I will use the following programs that I explained in the module
titled
Spectrum Analysis using Java, Sampling Frequency, Folding Frequency, and the FFT
Algorithm and other previous modules.
-
ForwardRealToComplex01 - Class that implements a
forward DFT algorithm for transforming a real time series into a complexspectrum.
-
ForwardRealToComplexFFT01 - Class that implements a
forward FFT algorithm for transforming a real time series into a complexspectrum.
-
Graph03 - Used to display various types of data. (The
concepts were explained in an earlier module.)
-
Graph06 - Also used to display various types of data in
a somewhat different format. (The concepts were also explained in an earliermodule.)
-
GraphIntfc01 - An interface that is required by
Graph03 and
Graph06 .
Discussion and sample code
Description of the
program named Dsp035
The program named
Dsp035 illustrates
forward and
inverse Fourier transforms
using DFT algorithms.
The program performs spectral analysis on a time series consisting of pulses
and a sinusoid. Then it passes the resulting real and complex parts of thespectrum to an inverse Fourier transform program. This program performs an
inverse Fourier transform on the complex spectral data to reconstruct theoriginal time series.