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.

LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

calculating autopowerspectrum from fft

Hello,

I'm trying to get the AutoPowerSpectrum using only FFT (I know it's wierd but I have to). When I compute this

FFT(A)FFT*(B)/N²

I don't get the same amplitudes than those computed by the AutoPowerSpectrum function.

Why is that?

Any help on the algorithm would be greatly appreciated
0 Kudos
Message 1 of 2
(3,049 Views)
Ok folks, I found the answer myself,

the autoPowerSpectrum is single-sided. This means that it returns an array that stops at SampleRate/2. Althought the FFT returns a two-sided complex array, when canceling the second half to switch to single-sided, all values have to be multiplied by 2.

I didn't quite notice because I was looking at the RMS value of the returned spectrum.

Bye folks
0 Kudos
Message 2 of 2
(3,049 Views)