Steps for FFT Analysis of Analog Input and Graph Display (1/5)
Overview
This explains the steps from FFT analysis of periodic data such as vibration using a high-speed analog input unit (NX-HAD???) to graph display on an NA series HMI.
It then explains the steps for outputting the analog input data and FFT analysis data to an SD card as csv.
Preparation
Measurement target
The measurement target is a periodic waveform
The Fourier transform decomposes a periodic waveform into multiple simple sine waves, and generally a fixed period (a few milliseconds to a few seconds) of the periodic waveform is cut out for calculation.
A periodic waveform is, for example, the humming, buzzing or whining sound or vibration of a motor rotating at a constant speed, or the sound or vibration when an object is struck with a hammer.
Note that if the motor speed changes, or the object is struck several times like knocking, within the period cut out for calculation, the frequencies in the result will be scattered.
Frequency
Roughly decide the frequency you want to measure. Within the audible range, use sounds like these as a guide.
- 30Hz
- 50Hz
- 100Hz
- 440Hz International standard pitch (the note A)
- 10kHz TV test tone
- 15kHz
Sampling frequency
The observable frequency depends on the sampling frequency (the period at which analog values are acquired). A faster sampling frequency allows higher frequencies to be observed, but the sampling frequency should stay below the performance of the connected sensor, such as a vibration sensor. In FFT calculation, half the sampling frequency is called the Nyquist frequency; data above it is aliased and is ignored
NOTE
A higher sampling frequency makes the FFT calculation take longer and lengthens the scan time, so measures such as lengthening the task period or running it in an event task are needed
| Sampling frequency (Hz) | Maximum frequency after FFT calculation (Hz) |
|---|---|
| 1k | 500 |
| 2k | 1k |
| 5k | 2.5k |
| 10k | 5k |
| 20k | 10k |
| 100k | 50k |
Number of data points
Making the number of data points for the Fourier transform 2 to the power of n enables calculation with the FFT (fast Fourier transform), which is fast.
NOTE
Increasing the number of sampled data points gives finer resolution but a longer collection time
| Number of data points | Collection time | Resolution |
|---|---|---|
| 512 | 51.2ms | 19.53Hz |
| 1024 | 102.4ms | 9.77Hz |
| 2048 | 204.8ms | 4.88Hz |
| 4096 | 409.6ms | 2.44Hz |
| 8192 | 819.2ms | 1.22Hz |
| 16384 | 1638.4ms | 0.61Hz |
From the next page,
we explain the steps for acquiring analog data and calculating the FFT
Download
If you want to download the project made here first,
