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

Click For Summary

Discussion Overview

The discussion revolves around the use of an FFT package (GFT) to analyze signals from a pressure sensor, specifically focusing on the expected results from FFT analysis of sine wave inputs at different frequencies. Participants explore issues related to signal generation, sampling, windowing effects, and scaling factors in FFT results.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • One participant reports FFT results showing peak amplitudes of 2.3 V at 5 Hz and 1.7 V at 100 Hz, questioning why these values differ from the expected 5 V input.
  • Another participant suggests that aliasing may be affecting the results and emphasizes the importance of ensuring complete cycles in the synthesized waveforms.
  • A third participant describes their setup, noting that their FFT routine yields a single peak of 2.5 V at 5 Hz after applying a Hann window function, questioning the implications of the scaling factor associated with the window.
  • There is a discussion about the potential effects of windowing on FFT results and the significance of checking for components beyond the fundamental frequency.
  • Participants mention the concept of "off-center components" and scaling factors, with one participant seeking clarification on their relevance to the observed amplitude discrepancies.

Areas of Agreement / Disagreement

Participants express differing views on the causes of the discrepancies in FFT results, with some attributing it to windowing effects and others suggesting issues related to waveform synthesis and sampling. No consensus is reached on the exact reasons for the observed amplitudes.

Contextual Notes

Participants highlight the importance of complete cycles in the data and the potential impact of windowing on FFT results. There is also mention of scaling factors that may influence the interpretation of amplitude in the frequency domain.

Who May Find This Useful

This discussion may be useful for individuals working with FFT analysis in signal processing, particularly those interested in the effects of windowing, sampling, and waveform generation on frequency domain results.

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 ·
Replies
6
Views
2K
  • · Replies 3 ·
Replies
3
Views
1K
Replies
4
Views
3K
  • · Replies 16 ·
Replies
16
Views
15K
  • · Replies 8 ·
Replies
8
Views
3K
Replies
1
Views
6K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 1 ·
Replies
1
Views
5K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 9 ·
Replies
9
Views
5K