I am maintaining a LabVIEW v6.1 program originated by others. The program measures vibration and presents an analysis to the user. The analysis includes a Peak G value and an associated Frequency. I have questions regarding one of the LabVIEW VIs used in the program, about the logic in the VI and the way the results of the VI are used in the program.
The program acquires a buffer of acceleration values that represent the vibration over a period of time. It then extracts the maximum absolute value from the array and presents it as the Peak G. The array is then passed to the "Amplitude and Phase Spectrum.vi". The "Amp Spectrum Mag (Vrms)" array output of that VI is then passed to the "Array Max & Min" function block and the "max index" return is multiplied times the "df" return from the "Amplitude and Phase Spectrum.vi" to arrive at a value that is labeled Frequency (I am assuming that this is meant to be the frequency of the sine wave component with the largest magnitude).
First, I have questions regarding the logic in the "Amplitude and Phase Spectrum.vi". In the VI, the input Signal array is passed to the "Real FFT.vi" and the resulting array of complex values is converted to polar form. The radius component of the polar form is then put through a For Loop where the first half of the array values are multiplied by the square root of two and assembled into the output array "Amp Spectrum Mag (Vrms)". That is, all of the values except the first one (where For Loop index equals 0) are multiplied by the square root of two. The first value is simply passed through unmodified.
Why is the first value treated differently? Why is the second half of the array discarded?
Second, I have a question regarding the use of the results of the VI. Is my interpretation of what the program has labeled Frequency (the index of the maximum value in the "Amp Spectrum Mag (Vrms)" array multiplied by the "df" value) correct? I.e., does the index multiplied by "df" yield the frequency of the largest magnitude component?
I have attached the VI that contains the code described above. There is a global variable referenced in the VI called "DAQ Setting". It is a cluster that includes a value containing the scan rate (samples per second) used for the acquisition of the acceleration data. That value is inverted and passed to the "Amplitude and Phase Spectrum.vi" as the "dt" input.
Thank you for your help in understanding this program fragment.