Deriving Fractional Octave Spectra from the FFT with APx

Created on 2013-12-17 00:04:00

FFT analysis is without question a powerful tool for audio analysis and for signal processing in general. In some applications, however, fractional octave analysis is desirable or even required. For example, many standards in acoustics specify that sound pressure levels be measured and expressed in terms of full-octave or 1/3-octave spectra. A typical application might involve stimulating the sound system of a room or a passenger car with pink noise and measuring the sound level at listener positions in 1/3-octave bands.

Fractional octave analysis is typically implemented by passing a signal through a series of parallel overlapping filters and then finding the signal level in each band. This is sometimes referred to as “constant percentage bandwidth analysis”, because the bandwidth of any filter is a fixed percentage of the filter’s mid-band frequency (the bandwidth varies linearly with frequency). For example, consider the set of full-octave filters at mid-band frequencies 31.5, 63, 125, 250, 500, 1000, 2000, 4000 and 8000 Hz. Each frequency in the set is a factor twice the previous one (i.e., they are spaced one octave apart). Octave filters have a bandwidth that is approximately 71% of the mid-band frequency. So the 31.5 Hz filter in the above set has a bandwidth of about 22 Hz and the 8 kHz filter has a bandwidth of about 5.7 kHz. For greater resolution, fractions of an octave such as 1/3, 1/6, … 1/24, may also be specified.

In contrast, FFT analysis is considered to be “constant bandwidth analysis”; it is akin to passing a signal through a series of parallel, evenly spaced filters, but unlike fractional octave analysis, in the FFT the filters are equally spaced on a linear frequency axis and each “filter” (FFT bin) has the same width in Hz. For example, the FFT of a 16,384 point acquisition acquired at 48 kHz sample rate, the resulting FFT has 8192 bins and each bin has a width of about 2.93 Hz (48,000/16,384).

If an FFT spectrum has sufficient resolution, a fractional octave spectrum can be derived from it. Equation (1) describes the gain versus frequency of a 1/b-octave filter with mid-band frequency fm. For 1/3-octaves (b = 3), this gain curve meets the Class 0 tolerance requirements of IEC 61260 for 1/3-octave filters.



where b = bandwidth designator (1 for full octave, 3 for 1/3-octave,… etc.) f = frequency fm = the mid-band frequency of the 1/b-octave filter g = the filter gain

The article titled FFT Scaling for Noise describes how to determine the overall RMS level of a signal from the FFT by integrating the power spectral density. This equation is shown as (2), below.


where L = RMS level pi = power spectral density of FFT bin i n = the total number of FFT bins.

Combining equations (1) and (2) for any given mid-band frequency fm yields the total RMS level within that fractional octave band (Lfm), as shown in equation (3).



As noted above, the bandwidth of fractional octave filters varies linearly with frequency, while the resolution of an FFT spectrum is constant. Because of this, care must be exercised when applying equation (3) at low frequencies. For example, consider the plot in Figure 1. In this case, equation (1) has been applied to the frequencies in an FFT spectrum with an FFT length of 1024 and sample rate of 48 kHz, resulting in an FFT bin width of 46.9 Hz. For this example, the 1/3-octave band filter centered at 2.0 kHz meets the requirements for IEC Class 0. However, at the next lower 1/3-octave band (1.6 kHz), the filter fails to meet Class 0 limits. Furthermore, with the same FFT resolution, at a mid-band frequency of 20 Hz, there is not even one FFT bin within the 1/3-octave band, so the equation would not come close to meeting IEC limits and would be a dismal estimate of the 1/3-octave level.


Figure 1. Plot of Equation (1) for fm = 2 kHz, applied to the frequency bins from an FFT with length = 1024, and corresponding limits for an IEC 61260 Class 0 filter.

The plot in Figure 1 was created by sweeping a sine wave through a range of frequencies and applying equation (1) to an FFT spectrum for each step in the sweep. By repeating this process while varying the mid-band frequency and FFT length, it is possible to empirically determine the lowest mid-band 1/b-octave frequency which meets IEC Class 0 limits for various FFT lengths. The results of this analysis are shown in Figure 2 for the 1/3-octave bandwidth. As shown, for a 20 Hz 1/3-octave filter to meet IEC limits, an FFT bin width of about 0.7 Hz is required (achieved, for example, with a 64k FFT Length at 48 kHz sample rate). This is 64 times the FFT length required at 2.0 kHz.










Figure 2. Empirical analysis of FFT bin width needed to meet IEC Class 0 limits for a 1/3-octave filter.

Note that the FFT window used has some effect on the shape of the filter; the analysis shown in Figure 2 is based on the use of a Hann FFT window. Results could be slightly different for other windows.

The APx FFT to Octave Conversion Utility

We have created a utility for APx500 audio analyzers that can be used to convert FFT spectra measured with APx to fractional octave spectra (Figure 3). When first loaded, the utility prompts the user with a choice of whether to load a default APx project file or to proceed without one. You can adapt the default project file to your own needs and then save over it, so that your preferred project settings are loaded by default. Or, you can simply create a new project file.

The utility works with the Signal Analyzer measurement. If one is present in the currently loaded project file, the utility will automatically select the first Signal Analyzer measurement in the first signal path. You can also use the Signal Path and Measurement controls in the utility to select a different Signal Analyzer measurement to work with (if more than one is present).

Note: If you change the APx project file by adding or deleting measurements or Signal Paths, use the Refresh button in the utility to update it to the new APx configuration.












Figure 3. The APx FFT to Octave Conversion Utility.

The utility has a few simple controls: In addition to the Refresh button, there is a Load Project button, to make it easy to load a different APx project file. The FFT Data Source control is used to select the source of the FFT data to be converted; the choices are:

  • New Acquisition – Runs the Signal Analyzer measurement and gets the FFT data.
  • Last Acquisition – Gets the data from the last acquired data set in the measurement.
  • CSV File – Reads the data from a spectrum exported from APx.

Note: To use a CSV file as input, the file must be in the form of an FFT power spectral density (PSD) result exported from APx. The PSD result is required because it has already been normalized for the window used in the FFT analysis.

After selecting the FFT Data Source, click the Start button to acquire (if selected) and analyze the data. This launches the Process and Display Data window (Figure 4). (The graph in Figure 4 shows a 1/3-octave spectrum derived from an FFT of a pink noise signal generated on two channels with a 10 dB level difference between channels.)

Note: The utility automatically limits the lowest fractional octave frequency based on the FFT length and an empirical relationship such as the one shown in Figure 2 (for the Hann window). This is done so that the lowest fractional octave bands displayed meet IEC Class 0 requirements . If you need a lower fractional octave frequency than the one displayed, (1) increase the FFT length, (2) lower the sample rate, or do both . Similarly, if you don’t need as low a frequency as displayed, you can decrease the FFT length to reduce the processing time. (Note that the time required to process the data increases linearly with the FFT length and the channel count.)












Figure 4. The utility’s Process and Display Data dialog.

A Bandwidth control (Figure 5) on the Process & Display Data window selects full-octave, 1/3, 1/6, 1/12 or 1/24-octave analysis. The Bar Type control selects outline only or solid filled vertical bars. The Export Data control exports the fractional octave spectra to a CSV file, and the Export Image saves an image of the Graph tab (including the Date, Time and Comment fields) in .png format. You can use the Comment field to enter a string describing the data before exporting it or saving the image.








Figure 5. The Bandwidth control.

Figure 6 shows a 1/12-octave analysis derived from FFT analysis of the 8-channel Channel-ID .wav file created by the APx Waveform Generation utility. The data table view of a full-octave spectrum derived from the same FFT is shown in Figure 7.












Figure 6. 1/12-octave spectra of 8-channel signal.








Figure 7. Table view of an 8-channel 1/3-octave analysis.