2D curve: spectrum analysis (FFT)

Introduction

The user can decompose into Fourier series all the results which have been represented as a 2D curve, thus allowing to perform spectrum analysis of the physical quantities. In Flux, spectrum results are obtained by the Fast Fourier Transform (FFT) method and are graphically represented as a new 2D curve.

Operation

The spectral analysis in Flux is carried out in the following manner:

Stage Description
1 The user applies the Spectrum Analysis (FFT) command to a 2D curve entity
2 The function to be analyzed is extrapolated over a full period by using the appropriate properties of symmetry: see Extrapolation of the original curve
3 The extrapolated function is decomposed into Fourier series by the Fast Fourier Transform method, then the spectrum which represents the characteristics (magnitude, phase and order) of the various harmonics is computed: see Principles of the FFT in Flux
4 Two new 2D curve entities are created:
  • the graph of the extrapolated original function
  • and the corresponding calculated spectrum

Principles of the FFT in Flux

Given a curve representing the function f(x), the Fourier series coefficients are expressed - for the sine-cosine form - as follows:

and

where:

  • T is the period of the function f(x)
  • k is the order of the considered harmonic, with k = [ 0 ÷ N ] (see below)

Fourier series coefficients ak and bk for the sine-cosine form can be transformed into the more practical magnitude-phase form, which is used by Flux to provide spectrum results:

and

where Dk and φk are the magnitude and the phase of the k-th harmonic, respectively.

The original function f(x) can therefore be expressed or recomposed by means of these Fourier series coefficients, whatever the form (sine-cosine or magnitude-phase) used, in the following way:

where N = 2 n-1-1 is the maximum number of harmonics, being n the upper integer of log2M with M the number of evenly-spaced samples of the function f(x).

In the above equation, three contributions can be identified:

  • the constant term a0=D0, named DC component, which corresponds to the average value of the function f(x) over the period T;
  • the fundamental (or first harmonic) characterized by the coefficients a1, b1 or D1, φ1, whose period is equal to T;
  • the other harmonics of order k >1, whose periods are fractions of the fundamental period and which are characterized by the Fourier coefficients ak, bk or Dk, φk.
Note:

The maximum number N of harmonics in a spectrum computed by Flux FFT depends on the number of samples of the function f(x), as indicated in the formula above N = 2 n-1-1, where the existence of the term “-1“ is due to the 0-order harmonic, i.e. the DC component of the signal.

A specific option in the Flux dialog box enables to display or not in the spectrum results the characteristics of this 0-order harmonic.

Decibel mode

In addition to the classical linear scale for plotting the magnitudes Dk, Flux provides the user with the possibility to represent these values in decibel mode, which has the benefit to intensify the quantities in an exponential manner and so to highlight possible differences between magnitude values that are not perceptible in linear mode.

As a reminder, the decibel is a logarithmic unit of measurement that expresses the magnitude of a physical quantity with respect to a reference value of the same quantity. The magnitudes Dk in decibel mode are therefore dimensionless values which are calculated by the following formula:

where

  • Dk is the magnitude of the k-th harmonic expressed in linear scale and
  • Dref is the reference magnitude, corresponding to 0 dB. Flux provides two options to set this reference value:
    • (default option) either by defining the magnitude value (in dB) of the first harmonic, i.e. by setting the result of this expression to a specified value (100 by default);
    • or by defining in linear scale the reference value Dref for 0 dB: by default set at 1.

Perform a spectrum analysis (FFT) in Flux

To perform a spectrum analysis (FFT) of a quantity, i.e. get the plotting of the extrapolated function of its original 2D curve and display its corresponding spectrum, the Flux user must follow the procedure below:

Step Action
1

In the menu Curve > 2D curve (…), click on Spectrum analysis (FFT)

2

In the selection dialog box, choose the 2D curve entity on which FFT will be computed

3

In the Spectrum analysis (FFT) dialog box that appears:

  • choose the part of period that corresponds to the studied interval
  • if the choice is different from "Full period", choose the type of symmetry to apply for the extrapolation of the original curve
  • enter the number of harmonics to compute
  • choose if displaying or not the DC component
  • modify (if you wish) the proposed names for the extrapolated function, that will be generated, and for the 2D curve that will contain the spectrum results
  • in the "Decibel mode" tab, modify (if you wish) the default options that will be used to represent the harmonic magnitudes in dB
  • Two new 2D curves are created and displayed in the corresponding curve sheets : a 2D curve for the extrapolated function and a 2D curve for the spectrum.
  • These two new 2D curves are also stored in the data tree.

Extrapolation of the original curve

Since the spectrum analysis needs to be performed over a full period, an extrapolation of the original curve is required if the considered interval corresponds to just a portion of the full period. It means that the original function is copied repeatedly at regular intervals to reach a full-period representation.

Different types of extrapolation are provided by Flux to fulfill the various requirements which depend on the initial interval of the original function. All the available options are summarized in the table below and explained with more details in the examples that follow below.

Part of the represented period Type of extrapolation
full period
  • identity
half-period
  • normal symmetry
  • even symmetry
  • odd symmetry
a quarter of a period
  • even symmetry
  • odd symmetry

Example (1): "half-period" extrapolation

The possible extrapolations for a curve represented over a half-period are presented in the table below.

Type of extrapolation Formula Image
normal symmetry f(T/2+t)=-f(t)
even symmetry f(T/2+t)=f(T/2-t)
odd symmetry f(T/2+t)=-f(T/2-t)

Example (2): "a quarter of period" extrapolation

The possible extrapolations for a curve represented over a quarter of a period are presented in the table below.

Type of extrapolation Formula Image
even symmetry f(T/4+t)=f(T/4-t), f(T/2+t)=-f(t)
odd symmetry f(T/4+t)=-f(T/4-t), f(T/2+t)=f(t)