| Visual Basic sample program for Discrete Fourier Transform |
|
Fourier Transformation is used to transform data in time domain to frequency domain and vice versa. The forward fourier transform or simply fourier transform is used for time domain to frequency domain transformation. Where as Inverse fourier transform is used for reverse process. Here you can find a visual basic sample program implementing fourier transform using correlation method.
Fourier transform techniques, transform data between time and frequency domains. To transform a time domain signal to a frequency domain signal , fourier transform is used. Inverse fourier transform transforms frequency domain signal to time domain signal. Discrete fourier transform is used in Digital signal processing applications since it is the only transform that can be computed using a computer. Though the fourier techniques are comparatively easy from the mathematical perspective, it can not be used for computer based calculations. The role of fourier transform is to find the frequency components present in the input signal and the relative magnitude of each component. One of the popular method to find DFT is by using correlation. In this method, the input signal is correlated with basis functions (sin waves and cos waves) of required frequency. When we correlate the input with a basis function of certain frequency, we get a single value that represents the presence of that frequency in the input signal. To obtain the frequency spectrum , it is necessary to correlate the input signal with basis functions from DC to half the sampling rate.
Now change the Frequency to 100 Hz and click "generate" button again. The newly generated waveform is added to the existing waveform and resulting waveform looks like a 10Hz sin wave with 100 Hz noise. See the waveform below.
This waveform contains two different frequencies. Select one of the windowing functions and display format( defaults will do for this experiment) and click "Transform button". The frequency spectrum in the selected mode will be displayed on the output graph. Once transform is completed , you can select any of the output display modes and click "display" button to display frequency domain data in that format. The figure below shows the frequency spectrum of the given input.
|