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

• cfann61
In summary: The Hann window scales the data by 1/(2 Pi), so if your data is centered on 0, then the Hann window will scale the data by 0.5.
cfann61
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?

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'm guessing the scale factor for the window likely doesn't have anything to do with the .5 you are seeing.

I would recommend verifying the results of your FFT package by using a known input, as you have mentioned. This will help you determine if the results you are getting are accurate and reliable. In terms of your specific results, it is important to note that the FFT is a mathematical algorithm that transforms a signal from the time domain to the frequency domain. This means that the results you see are not the same as the input signal, but rather a representation of the frequencies present in the signal.

In terms of the peak amplitude, it is expected that the FFT will show a lower amplitude than the maximum voltage from the sampled data. This is because the FFT is a representation of the frequencies present, not the amplitude of the signal itself. Additionally, the FFT may show a result of (amplitude/2) due to the way the algorithm is designed. This is not necessarily a problem, but it is important to understand the limitations of the FFT and how it may affect your results.

In terms of the terms "peak to peak" and "peak", these refer to different ways of measuring the amplitude of a signal. Peak to peak refers to the difference between the maximum and minimum values of a signal, while peak refers to the maximum value only. Understanding these terms can help you interpret your results accurately.

Overall, I would recommend further verifying your FFT package by using a known input and also researching the specific algorithm used in the package to better understand its limitations and how it may affect your results. I hope this helps clarify some of your questions.

## 1. What is an FFT package (GFT)?

An FFT (Fast Fourier Transform) package is a software tool that implements the FFT algorithm for efficiently computing the discrete Fourier transform of a signal. GFT (Generalized Fourier Transform) is an extension of the FFT algorithm that allows for more flexible signal analysis.

## 2. Why use an FFT package for analyzing a pressure signal?

An FFT package can quickly and accurately decompose a signal into its frequency components, allowing for a more detailed analysis of the signal. This is especially useful for pressure signals, which can provide important information about the source of the pressure and potential issues with equipment or systems.

## 3. How does an FFT package work?

An FFT package uses a mathematical algorithm called the FFT algorithm to convert a signal from the time domain to the frequency domain. This allows for the identification of specific frequency components in the signal and their amplitudes.

## 4. What are the benefits of using GFT over traditional FFT?

GFT allows for the analysis of non-periodic or non-stationary signals, whereas traditional FFT is limited to analyzing periodic or stationary signals. Additionally, GFT can handle irregularly spaced data points and can provide more accurate frequency estimates for signals with high noise levels.

## 5. Are there any limitations to using an FFT package for signal analysis?

While FFT packages are powerful tools for signal analysis, they do have some limitations. For example, they assume that the signal is stationary over the entire duration of the analysis, which may not always be the case. Additionally, FFT packages may not be suitable for analyzing signals with very low or very high frequencies.

• General Math
Replies
6
Views
1K
• MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
2K
• MATLAB, Maple, Mathematica, LaTeX
Replies
8
Views
1K
• MATLAB, Maple, Mathematica, LaTeX
Replies
16
Views
13K
• MATLAB, Maple, Mathematica, LaTeX
Replies
9
Views
4K
• MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
790
• Engineering and Comp Sci Homework Help
Replies
1
Views
1K
• MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
4K
• Electrical Engineering
Replies
10
Views
2K
• MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
6K