Revised: Fri Oct 16 23:17:43 CDT 2015
This page is included in the following books:
Table of contents
- Table of contents
- Preface
- Preview
- Discussion and sample code
- Run the programs
- Summary
- What's next?
- Complete program listings
- Miscellaneous
Preface
The how and the why of spectral analysis
A previous module titled Fun with Java, How and Why Spectral Analysis Works explained how and whyspectral analysis works. An understanding of that module is a prerequisite to understanding this module.
Programs to perform spectral analysis
In this module I will provide and explain different programs used for performing spectral analysis. The first program is a very general program thatimplements a Discrete Fourier Transform (DFT) algorithm. I will explain this program in detail.
The second program is a less general, but much faster program that implements a Fast Fourier Transform (FFT) algorithm. I will defer an explanation of this program until a future module. I am providing it here so that you canuse it and compare it with the DFT program in terms of speed and flexibility.
Fundamental aspects of spectral analysis
I will use the DFT program to illustrate several fundamental aspects of spectral analysis that center around the sampling frequency and the Nyquistfolding frequency.
Visual illustration of sampling
I will also provide and explain a program that produces a visual illustration of the impact of the sampling frequency and the Nyquist folding frequency.
Plotting programs
Finally, I will provide, but will not explain two different programs used for display purposes. These are newer versions of graphics display programs that Iexplained in the module titled Plotting Engineering and Scientific Data using Java .
Viewing tip
I recommend that you open another copy of this module in a separate browser window and use the following links to easily find and view the Figuresand Listings while you are reading about them.
Figures
- Figure 1. Required parameters.
- Figure 2. Actual parameter values.
- Figure 3. Program output for five sinusoids.
- Figure 4. A new set of frequency values.
- Figure 5. Program output for five sinusoids.
- Figure 6. One more example.
- Figure 7. Program output for five sinusoids.
- Figure 8. Parameters for spectral analysis.
- Figure 9. Spectral analysis of five sinusoids.
- Figure 10. The input parameters.
- Figure 11. Spectral analysis of five sinusoids.
- Figure 12. Required input parameters for Dsp028.
- Figure 13. Contents of Dsp028.txt file.
- Figure 14. Output from Graph03.
- Figure 15. Spectral transform expressions.
- Figure 16. Required input parameters for Dsp030.
- Figure 17. Example input parameters.
- Figure 18. FFT of five sinusoids.
- Figure 19. Parameters for A matching DFT spectral analysis.
- Figure 20. DFT of five sinusoids.