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.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

FFT RMS or Peak?

Solved!
Go to solution

Hi,

 

I've got a sine wave signal that oscillates about the zero axis in the negitave and positive. It is measuring wave height about the static water level in an water wave tank. I am calculating the FFT but the amplitude is lower than the wave height in the time domain. Does this mean that I'm calculating it wrong? I don't know wheather I should be using the FFT Peak or RMS? I assumed that the FFT amplitude should give me the same amplitude as the time domain.

 

Any advice would be greatly appreciated.

 

Thank you,

Donners
0 Kudos
Message 1 of 4
(6,341 Views)
Solution
Accepted by Donners

Donners,

 

It can get complicated but I suspect that what you are seeing is a result of the frequency of the waves not matching exactly the frequency bins of the FFT.  For example suppose that df = 1 Hz. Then each element of the FFT array represents the energy in a "bin" one hertz wide centered on integer frequencies.  For a wave with most of its energy at 7.3 Hz the FFT will likely have non-zero values for both the 7 and 8 Hz bins.  In real systems with noise and slight frequency variations it is not uncomon for the data to be spread over 10 or 20 bins. To get the fundamental amplitude of the signal you would need to combine the energy in all those bins.  Since the FFT produces a complex output, the phase component also needs to be considered. Non-sinusoidal waveshapes mean that some of the energy is in harmonics. A narrow square pulse can have a quite large amplitude yet still have no large spectral components.

 

The short answer is that generally there is no easy way to get precise correlation between the peak amplitude in the time domain and the amplitude of the spectral components in the freqeuency domain.

 

Lynn

Message 2 of 4
(6,336 Views)

Thanks Lynn,

 

That explains it. Any idea whether I need FFT Peak or RMS for a sine wave going above and below the zero line? I know what RMS means, root mean squared, but I don't know it's application for FFT.

 

Thank you,

Donners
0 Kudos
Message 3 of 4
(6,319 Views)

Donners,

 

I am not sure what would be best for your application.  Have you read the detailed help files for the relevant VIs?  That may explain the differences. Also, you can open the block diagrams and look to see how the data is scaled.

 

Lynn

0 Kudos
Message 4 of 4
(6,305 Views)