FFT Setup: Difference between revisions

From IVS Expert Wiki
Jump to navigation Jump to search
m (Charles moved page Sample Rate to FFT Setup without leaving a redirect: Better name)
No edit summary
Line 1: Line 1:
There are two common approaches to setting the sample rate and FFT parameters.  
There are two common approaches to setting the sample rate and other FFT parameters.  


When digital data loggers first came out, they were pushing the limits of the available memory and processing power. In order to use the absolute minimum sample rate and logging duration, the user was prompted to enter in the maximum frequency of interest, as well as the required frequency resolution. This approach has remained the industry standard for routine condition monitoring ("route based") data acquisition systems. It has the advantage of allowing the user to focus on the critical diagnostics requirements of a spectrum. It is the approach that is taught in ISO 18436 (VCAT) training courses. These courses leave out some fundamental relationships that can lead to confusion when practitioners then come across the alternative approach, which is to set the sample rate directly and either log indefinitely (until the stop button is pressed) or for a specified period of time. To address this potential confusion, this page attempts to bridge to the gap between the two approaches.
First, a little background. When digital data loggers first came out, they were pushing the limits of the available memory and processing power. In order to use the absolute minimum sample rate and logging duration, the user was prompted to enter in the maximum frequency of interest, as well as the required frequency resolution. This approach has remained the industry standard for routine condition monitoring ("route based") data acquisition systems. It has the advantage of allowing the user to focus on the critical diagnostic requirements of a spectrum, but reduces flexibility in analysis. It is the approach that is taught in ISO 18436 (VCAT) training courses. These courses leave out some fundamental relationships that can lead to confusion when practitioners then come across the modern alternative approach, which is to set the sample rate directly and either log indefinitely (until the stop button is pressed) or for a specified period of time, and then change the window length as required during analysis. To address this potential confusion, this page attempts to bridge to the gap between the two approaches.


The sample rate in Hertz (Hz) is the number of samples taken per second. The maximum frequency in an FFT is equal to half the sample rate. This is referred to as the Nyquist frequency. However, anti aliasing filters reduce the amplitude of data in the FFT at frequencies close to the Nyquist frequency. In addition, they allow some aliasing. That is, they allow signals that are slightly higher than the Nyquist frequency to appear in the FFT at slightly lower than the Nyquist frequency. For this reason, the highest frequencies in the FFT should be ignored, discarded or treated with great caution. Condition monitoring software typically divides the sample rate by 2.56 instead of 2 to account for this. This gives an "Fmax" that is somewhat lower than the Nyquist frequency. Note that this number (2.56) is somewhat arbitrary. It depends on the properties of the anti aliasing filter used and the tradeoff between amplitude accuracy, permitting aliased signals in, and how much wasted data you can tolerate in terms of oversampling.  
The sample rate in Hertz (Hz) is the number of samples taken per second. The maximum frequency in an FFT is equal to half the sample rate. This is referred to as the Nyquist frequency. However, anti aliasing filters reduce the amplitude of data in the FFT at frequencies close to the Nyquist frequency. In addition, they allow some aliasing. That is, they allow signals that are slightly higher than the Nyquist frequency to appear in the FFT at slightly lower than the Nyquist frequency. For this reason, the highest frequencies in the FFT should be ignored, discarded or treated with great caution. Condition monitoring software typically divides the sample rate by 2.56 instead of 2 to account for this. This gives an "Fmax" that is somewhat lower than the Nyquist frequency. Note that this number (2.56) is somewhat arbitrary. It depends on the properties of the anti aliasing filter used and the tradeoff between amplitude accuracy, permitting aliased signals in, and how much wasted data you can tolerate in terms of oversampling.  
Line 8: Line 8:


To complicate matters further, the spectrum in a condition monitoring program is not defined by Fmax and frequency resolution, but by Fmax and lines of resolution, which is the number of bins (data points in the FFT) up to Fmax.  
To complicate matters further, the spectrum in a condition monitoring program is not defined by Fmax and frequency resolution, but by Fmax and lines of resolution, which is the number of bins (data points in the FFT) up to Fmax.  
The terms spectrum and FFT are used interchangeably here.


== Equations ==
== Equations ==
Line 27: Line 29:
<math>N</math> the number of samples taken, or the number of samples used to produce the FFT.
<math>N</math> the number of samples taken, or the number of samples used to produce the FFT.


<math>LOR</math> is the number of lines of resolution, or number of bins (data points) in an FFT.
<math>LOR</math> is the number of lines of resolution, or number of bins (data points) in an FFT scaled to <math>f_{MAX}</math>.


<math>WF</math> is the window factor, (1.5 for a hanning window), which captures the extent to which a pure tone will be 'spread' between bins.
<math>WF</math> is the window factor (1.5 for a hanning window). This number captures the extent to which a pure tone will be 'spread' between bins.


<math>SF</math> is the separation frequency, which is the minimum frequency offset to distinguish two separate FFT peaks in ideal conditions (pure tones with steady frequency). This is the 'bare minimum' requirement.
<math>SF</math> is the separation frequency, which is the minimum frequency offset to distinguish two separate FFT peaks in ideal conditions (pure tones with steady frequency). This is the 'bare minimum' requirement.

Revision as of 04:31, 4 June 2024

There are two common approaches to setting the sample rate and other FFT parameters.

First, a little background. When digital data loggers first came out, they were pushing the limits of the available memory and processing power. In order to use the absolute minimum sample rate and logging duration, the user was prompted to enter in the maximum frequency of interest, as well as the required frequency resolution. This approach has remained the industry standard for routine condition monitoring ("route based") data acquisition systems. It has the advantage of allowing the user to focus on the critical diagnostic requirements of a spectrum, but reduces flexibility in analysis. It is the approach that is taught in ISO 18436 (VCAT) training courses. These courses leave out some fundamental relationships that can lead to confusion when practitioners then come across the modern alternative approach, which is to set the sample rate directly and either log indefinitely (until the stop button is pressed) or for a specified period of time, and then change the window length as required during analysis. To address this potential confusion, this page attempts to bridge to the gap between the two approaches.

The sample rate in Hertz (Hz) is the number of samples taken per second. The maximum frequency in an FFT is equal to half the sample rate. This is referred to as the Nyquist frequency. However, anti aliasing filters reduce the amplitude of data in the FFT at frequencies close to the Nyquist frequency. In addition, they allow some aliasing. That is, they allow signals that are slightly higher than the Nyquist frequency to appear in the FFT at slightly lower than the Nyquist frequency. For this reason, the highest frequencies in the FFT should be ignored, discarded or treated with great caution. Condition monitoring software typically divides the sample rate by 2.56 instead of 2 to account for this. This gives an "Fmax" that is somewhat lower than the Nyquist frequency. Note that this number (2.56) is somewhat arbitrary. It depends on the properties of the anti aliasing filter used and the tradeoff between amplitude accuracy, permitting aliased signals in, and how much wasted data you can tolerate in terms of oversampling.

While sample rate determines Fmax, the duration of the time waveform used for the FFT determines the frequency resolution, or the bin resolution - that is, the frequency spacing of data points on the FFT. The frequency resolution is the inverse of the window length. That is, a 4 second window will give you 0.25 Hz resolution, and a 1 second window will give you 1 Hz resolution. Again, this number differs from the critical requirement of an FFT in a condition monitoring program, which is the ability to distinguish two spectral peaks from two pure tonal sources. For example, suppose you are using a 4 second window (0.25 Hz resolution) and there is a tone being generated at 10 Hz and at 10.25 Hz (or one at 10.125 Hz and 10.375 Hz). You would not be able to tell that these are two separate tones in the FFT. For a hanning window, the two tones need to be separated in frequency by at least three times the frequency resolution in order to be able to clearly distinguish them. That is, for a 4 second window with 0.25 Hz resolution, tones that are separated by 0.75 Hz or more can be distinguished. The 'bandwidth' in this example is 1.5 times the frequency resolution, or 0.375 Hz.

To complicate matters further, the spectrum in a condition monitoring program is not defined by Fmax and frequency resolution, but by Fmax and lines of resolution, which is the number of bins (data points in the FFT) up to Fmax.

The terms spectrum and FFT are used interchangeably here.

Equations

The relationships discussed are presented here in equation form. The definitions vary slightly between approaches. The condition monitoring definitions typically assume that all of the data obtained is used to produce a single FFT (even though this is not always the case), while for modern systems an indefinite amount of data is obtained and any section of that data can be selected for an FFT.

s is the sampling rate

is the Nyquist frequency

is the maximum frequency shown on a spectrum in a conventional condition monitoring package, or the highest frequency that should be trusted.

is the frequency (bin) resolution.

is the sample time, or length of data used to produce the FFT.

is the time between individual samples.

the number of samples taken, or the number of samples used to produce the FFT.

is the number of lines of resolution, or number of bins (data points) in an FFT scaled to .

is the window factor (1.5 for a hanning window). This number captures the extent to which a pure tone will be 'spread' between bins.

is the separation frequency, which is the minimum frequency offset to distinguish two separate FFT peaks in ideal conditions (pure tones with steady frequency). This is the 'bare minimum' requirement.

is the bandwidth, which is half the separation frequency.

The two fundamental relationships behind an FFT, and also the two key relationships when setting up modern software such as Expert are:

Δ

The sample rate is part of the main hardware setup and is fixed from when you start logging, while is part of the plot setup, and is only limited by the duration of continuous data you have recorded. When setting up a spectrum plot during data acquisition or analysis, Expert allows you to specify either or Δ directly.

The first equation is the most important, because sample rate is fixed as soon as you start logging and cannot be increased during analysis, so it limits your ability to analyse high frequency data. You can set the FFT's X axis limit to anything you want during analysis, but you can only get data up to . Typically your X axis limit will be significantly lower. Most modern data acquisition hardware has a minimum 'native' (in-built) sample rate of around 2000 Hz, whereas you might only be interested in vibration up to 100 Hz for a typical structural problem. However there are situations where much higher sample rates are required. Also, remember that you should not trust any FFT data above . As a rule of thumb:

In practice, you do not have any good reason to cut it this fine, so use a much higher sample rate.

Also remember that to distinguish two peaks in an FFT, the bare minimum window length, and hence the minimum continuous data sample, is governed by:

Δ

For a hanning window, the window factor is 1.5, so

and

Again, you should not need to cut it this fine, so try a much finer frequency resolution if you suspect there might be two separate peaks. However, be aware that as well as having enough continuous data for the FFT, the two frequencies need to be steady. If the machine run speed changes slightly, it will blur the peaks in the FFT.

The following equations are typically presented in a VCAT course. They are consistent with the above equations, but hide the two fundamental relationships, which can make it difficult to wrap your head around the setup for modern software if you have a condition monitoring background.

Δ

Δ

Recommend Sample Rate

The first question to ask yourself is, will I be able to repeat the measurement if I discover later that the sample rate was not high enough? If the answer is no, or "yes but I will have to answer some difficult questions", use a higher sample rate.

These days, memory and processing allowing for both far higher sample rates and measurement durations, and there are advantages to taking advantage of both. We recommend taking at least one initial measurement at the maximum sample rate to check for unexpected high frequency vibration. Note that integrating measured acceleration once to get velocity, and twice to get displacement, will effectively filter out high frequency vibration. So, when you are performing this check, look at acceleration data. Likewise, vibration amplitudes (and frequencies) are never steady over time, and the time frame over which they change can be anywhere from seconds to years, depending on the cause of the variation. Typically, you will want to measure for somewhere between several minutes and several hours.

Aliasing Filters

A word of caution: you can buy data acquisition systems that either do not have anti aliasing filters (typically very low sample rate systems) or allow the user to change the anti aliasing filter cut-off (these are typically the newer wireless systems). The complete absence of an anti aliasing filter can perhaps be justified on technical grounds. Data from such a system with a very low sample rate needs to be interpreted with caution, as vibration will appear as random 'noise' in the data. The data from these systems is typically not intended to be used for a spectrum, but only for long term trending of the static component.

A user changeable anti aliasing filter has no justification at all. The cut-off should always be set at half the sample rate. There is no good reason to require or allow the user to change it. They inevitably forget, meaning that high frequency data is filtered out without the user realising, or aliased data is allowed in. This is a particular problem when vibration and random noise at approximately equal to the sample rate (and multiples thereof) gets aliased to a very low frequency, close to zero Hz, and then magnified when integrated to displacement or velocity. This can cause false low frequency vibration data. Furthermore, the high pass filter typically used during integration can make this look somewhat like real data - not quite tonal, but slightly broadband such as you might get from flow induced (eg wind induced) vibration.

Always check this before buying a hardware package.