LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

FFT

Hey,

I'm using the FFT.vi and I found that for long signals (>1000000 points) the amplitude I get is smaller then expected (If I break the input to 10000 points and average the output I do get the correct results). Strange......

thanks, Erez

 

0 Kudos
Message 1 of 18
(3,044 Views)

Do you have some VI to demonstrate? What amplitude did you expect? What amplitude did you get?

0 Kudos
Message 2 of 18
(3,036 Views)

Here's the normalized FFT max magnitude for sizes of 100k ... 2M. They all look the same!

 

 

altenbach_1-1630425687101.png

 

0 Kudos
Message 3 of 18
(3,028 Views)

thanks for the fast reply. I used the below (sample rate is 10kKz at 60hz grid):

erezg_0-1630428108145.png

 

For N=1000 I get Amp = 0.0707 (as expected)

For N = 10000 Amp =0.69

For N = 100000 Amp =0.66

For N = 1200000 Amp =0.55

For N = 1500000 Amp =0.705

 

 

0 Kudos
Message 4 of 18
(3,015 Views)

Please attach your VI instead of an image (we can't even tell what enum you selected!).

 

What's the name of that subVI? Is that from a toolkit? What does it do?

 

Did you look at the waveforms before FFT?

0 Kudos
Message 5 of 18
(3,006 Views)

yepe, this VI is from the toolkit

thanks, Erez

 

0 Kudos
Message 6 of 18
(2,999 Views)

Hi Erez,

 

seems to be some kind of aliasing effect:

Maybe because a FFT prefers blocks with 2^n samples?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 7 of 18
(2,992 Views)

Hi,

still strange. If a 1000 points gives good answer, I would expect that any multiplication of 1000 will work well.

In the "real world" starts with sampling of a 60Hz grid with 10kHz sample rate - so every 1000  point is 6 waves (100msec), so any multiplication of 1000 should work.

BTW, according to the FFT help, it does not require 2^N points.

thanks for the help, 

 

0 Kudos
Message 8 of 18
(2,979 Views)

@erezg wrote:

yepe, this VI is from the toolkit


What toolkit? What does it actually do? Do you have a link to the online help for it? What happens if you just take the normalized magnitude like I do?

 

I don't see where you ensure that you have an integer number of periods. Maybe try to compare Ns that are an integer multiple of 167. In any other case, you'll have the FFT peak spread over more than one bin due to spectral leakage.

0 Kudos
Message 9 of 18
(2,976 Views)

Hi

this sub vi is calculation the normalized amp:

erezg_1-1630477970117.png

 

 

 

But I think I found the reason. For long time scan the frequency resolution is better, and I get a wider pick. In order to calculate the real pick we need to integrate the pick.

 

 

 

erezg_0-1630477943501.png

 

0 Kudos
Message 10 of 18
(2,948 Views)