I am using an FFT package (GFT) to analyze a signal from a pressure

AI Thread Summary
The discussion revolves around using the GFT FFT package to analyze signals from a pressure sensor, specifically testing with sine waves at 5 Hz and 100 Hz. The results show peak amplitudes lower than expected, prompting questions about the FFT's output and the effects of windowing. Users are advised to ensure complete cycles in their data to avoid aliasing and to consider the impact of window functions on amplitude scaling. Additionally, exploring the frequency spectrum beyond the fundamental frequency can help verify the presence of unwanted components. The conversation emphasizes the importance of understanding scaling factors and windowing effects in FFT analysis.
cfann61
Messages
2
Reaction score
0
I am using an FFT package (GFT) to analyze a signal from a pressure sensor. I am unsure of the results I am getting, so I decided to try to verify the FFT package using a known input.

I am using a signal generator to produce a sine wave of +/- 5V @ 5 and 100 Hz.

When I run the FFT on the data @ 5 Hz, the results show a peak amplitude of about 2.3 V @ 5 Hz. The max voltage from the sampled data was about 4.2 V.

When I run the FFT on the data @ 100 Hz, the results show a peak amplitude of about 1.7 V @ 100 Hz. Max voltage from the sampled data was about 4.9 V.

What results should I be seeing from the FFT analysis? I thought that if I input sine wave data at a certain peak voltage and frequencey that the FFT results would show that same peak voltage and frequency (i.e. 5 V @ 5 Hz in would give me an FFT result of 5 V @ 5 Hz in the frequency domain).

Also, somebody mentioned that I might get a result of (amplitude/2) from the FFT depending on the FFT routine. What does this mean? Is that dependent on the algorithm that is used? I heard the terms 'peak to peak' and 'peak' used in reference to this. What does this mean?
 
Physics news on Phys.org


Are you certain your synthesized waveforms start at sin(0)=0 and have exactly n complete cycles? If not you might be getting aliasing that is confounding your results.

You might also do a 10 Hz or 20 Hz transform on your 5 Hz signal and confirm that you get a single clean peak at 5 Hz and everything else is approximately zero. Similarly for your 100 Hz data. You need to ensure that you have complete cycles in your data to avoid introduced crud. Or you need to discover "windowing" that distorts your results somewhat, but not as much as crud will.

In the middle of this web page
http://mathworld.wolfram.com/FourierTransform.html
you can see the 1/(2 Pi) scaling factor if you lump all that into only the transform or the inverse transform OR there is the 1/Sqrt[2 Pi] factor if you put equal weights into both,
maybe that is what he was talking about, but I've never heard of a 1/2 weighting.

So check for complete cycles, perhaps plot each to verify this, see if you get a single spike in the frequency domain, consider windowing on your real data and report back if any of this helped or if nothing did.
 


I set up a routine to calc sine wave data, calculated data for 4 cycles of a 5V/5Hz signal, taking 4096 samples overall.

I fed this data into my FFT routine, the result is a single peak of 2.5 V @ 5 Hz.

I am using a Hann window function. Looks like this:

for(i=0;i<nSamples;i++) WinFcn=0.500*(1-cos((2*M_PI*i)/(DefaultWindow-1))) ;

Data = Data * WinFcn;


My FFT result should be 5V @ 5Hz, correct?
What do you mean by "You might also do a 10 Hz or 20 Hz transform on your 5 Hz signal" ??

Also, I was going through this article on the NI website. About 3/4 of the way down, in the 'Strategies for Choosing a Window", it mentions correction factors for 'off-center components'. The Scaling Factor for a Hann window is 0.5.
What are off-center components?
Does this Scaling Factor have anything to do with the 5V/2 amp I am getting?

http://zone.ni.com/devzone/cda/tut/p/id/4278#toc2
 
Last edited:


For calculated data that is exactly n complete cycles you could skip using the window function (trying to eliminate possible sources of error) and see what you get.

What I meant by "You might also do a 10 Hz..." is that if your fft only goes up to 5 Hz
and your data is 5 Hz you are not seeing anything that might be lurking beyond 5 Hz. If you look at the spectrum up to 10 Hz or 20 Hz you shouldn't see anything other than the single 5 Hz spike (well possible rounded mountain because of the windowing). Doing that can confirm or refute that there is nothing above 5 Hz.

I can't help you with the definition of "off-center components", perhaps Google can.

I'm guessing the scale factor for the window likely doesn't have anything to do with the .5 you are seeing.
 

Similar threads

Replies
6
Views
2K
Replies
16
Views
14K
Replies
12
Views
2K
Replies
1
Views
5K
Replies
9
Views
5K
Replies
10
Views
2K
Replies
3
Views
1K
Back
Top