From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
10-10-2012 05:45 PM
Hi all,
I have an application that displays live vibration readings including the spectrum and overall vibration level. All my report generation is done in DIAdem scripts, so it's critical that any values calculated and displayed on the LabVIEW side match the values calculated and reported in DIAdem. The attached VI and Script, when fed the input from the attached TDMS file, give me significantly different values for the magnitude of the FFT and overall RMS value. Can anyone spot what I'm doing wrong?
Thanks,
Scott
Solved! Go to Solution.
10-11-2012 08:28 AM
Here's a version of the VI in LV2010 in case anyone needs it.
10-16-2012 10:28 AM
Did some fiddling around and discovered that setting the "Amplitude attenuation correction" to "periodic" in the DIAdem script resulted in the two flavors agreeing with each other. I'm not really sure what this correction is or if it's appropriate. Does anyone here know what this setting actually does? Is there some documentation on it beyond the help file?
Here's the line in the script that I changed:
FFTWndCorrectTyp = "periodic"
In the file I posted originally it was:
FFTWndCorrectTyp = "no"
10-16-2012 11:04 AM
Hello,
Here is a great reponse from R&D. I felt it would be better to place this on the web then keep it limited to your service request.
The difference has to do with the Window-correction. The results are identical if you select rectangluar (or no) window.
Usually a Window is taking a part of the singnal away, so in the first place, the result has a different shape and is smaller compared to result with rectangular window. This can be corrected with a specific factor for each window.
There are two possible corrections. Random and periodic.
- Periodic is used if you have pure sine-wave like signals and you want to measure the peak value. A typical use case is the flattop-window which is designed for this type of calculations. The periodic correction is too large if you want to add the values to calculate the total RMS of the signal or of a the summation of a certain frequency band.
- Random is correcting the signal back to the correct overall RMS value and should be used in all other cases.
The periodic correction for the Hanning window is a factor of two. The random correction is about 1.633. DIAdem will give the same result as LabVIEW if you use the following correction type:
FFTWndCorrectTyp = "periodic"
In the world of FFT-analysis, the different corrections are very often not obvious and hidden to the user. Unfortunately this is also the case in LabVIEW. You can find a good example of an explanation here:
http://blog.prosig.com/2009/09/01/amplitude-and-energy-correction-a-brief-summary/
There are different factors for the different window functions. If you go deeper into the FFT-VI you will find the "Scaled Window VI". This has an output "window constants". With this, it is possible to get the correction values for the window functions.
I also think, that periodic is wrong in most cases when Hanning is used, because Hanning is best for the summation of RMS values in frequency bands and the results are wrong without a random correction.
Hope that helps.
10-17-2012 10:43 AM
@testingHotAir wrote:
Did some fiddling around and discovered that setting the "Amplitude attenuation correction" to "periodic" in the DIAdem script resulted in the two flavors agreeing with each other. I'm not really sure what this correction is or if it's appropriate. Does anyone here know what this setting actually does? Is there some documentation on it beyond the help file?
Hello,
Please refer to the document in this link to learn more about the FFT functions in DIAdem:
In depth look at the FFT functions in DIAdem
I hope that will help you understand some of the options in the FFT dialogs better.
Best regards,
Otmar