18.4.1.2 Algorithms (FFT)FFT1Algorithm
A discrete Fourier transform (DFT) converts a signal in the time domain into its counterpart in frequency domain. Let () be a sequence of length N, then its DFT is the sequence () given by
Origin uses the FFTW library to perform Fourier transform. With the transformed data, the amplitude, magnitude and power density can be computed by Origin.
FFTW
In FFTW, the computation of the transformed data is performed by an executor that is comprised of blocks of C code called "codelets". Each codelet specializes in one part of the transformation. With these codelets, the executor implements the CooleyTurkey FFT algorithm, which factors the size of the input signal. By recursive factoring, the signal is broken into shorter parts. The results of the transforms of the short parts are multiplied; and finally the transform of the original signal is computed. More information on FFTW is available at http://fftw.org/.
Power density
By definition, power density or spectrum can be computed with the following equation:
where is the autocorrelation function of the input signal.
However, we have a finite number of samples for the input signal and, therefore, computing the power spectrum with the definition is not possible as only certain methods can be used to estimate the power spectrum. The method used in Origin is the Periodogram, which estimates the power from the amplitude of the Fourier transformed data. While it is generally accepted that the squared amplitude is in proportion to the amplitude of power spectrum, various conventions exist for describing the normalization of power spectrum in each domain. The three descriptions used by Origin are "mean squared amplitude"(MSA), "sum squared amplitude"(SSA) and "timeintegral squared amplitude"(TISA). They can be expressed as follows:
where and are the real and imaginary parts of the transform data; is the length of the input sequence; is the sampling interval.
Power spectrum can be either onesided (singlesided) or twosided (doublesided), depending on whether TwoSided (2) or OneSided (1) is selected for Spectrum Type (st). To compute the onesided power density, it is necessary to compute the twosided power density first. The result is then converted to the onesided power using the following equations:
where is the onesided power spectrum and is the twosided power spectrum.
If a window function is applied, the power result will be multiplied by a factor for compensation which is defined by :
 , where is the window function defined below.
More results
Origin can calculate the magnitude, phase and amplitude of the transformed data. Let and be the real and imaginary parts of the transform data, and let be the size of the input signal. Use to represent the sampling interval. Suppose the norma variable is set to 0 (normalization is not used). More outputs are calculated with the following formulas:

Spectrum Type is Twosided (i=1n/2 ~ n/2)

Spectrum Type is Onesided (i=0 ~ n/2)

Phase


Magnitude


Amplitude



dB


Normalized Amplitude in dB


RMS amplitude


Normalization
The above computations are actually based on the assumption that the norma vairable is set to false. If this variable is set to true, the complex, real, imaginary, magnitude and square magnitude results will be normalized. Note that phase, power, amplitude, normalzied amplitude, db and square amplitude are not affected by the norma vairable.
If TwoSided (2) is selected for Spectrum Type (st) and Normalize (norma) is set to true, the complex, real, imaginary, magnitude and square magnitude results will be divided by , where is the size of the input signal.
If OneSided (1) is selected for Spectrum Type (st) and Normalize (norma) is set to true, the complex, real, imaginary, magnitude and square magnitude results will be normalized as follows. Let be the normalized result:
Automatic Computation of Sampling Interval
The automatically computed sampling interval is the average increment of the time sequence, which is usually from the X column associated with the input signal. If there is no associated X column, the row numbers will be used. Note that if Origin fails to get the average increment, the sampling interval will be set to 1.
Frequency
The frequency column is obtained from the sampling intervaland the number of input data points N. The nth frequency datum is given by:
If there are N input data points, the frequency domain will also have N points with the maximum frequency, equal to.If shift result option is not selected, the transform will display from 0 to . Otherwise, the shifted transform displays from to .
Windows
Windows are used to suppress leakage. Different types of windows are defined as follows in Origin.
Rectangular Window:
for and zero otherwise.
Welch Window:
Triangular Window:
Bartlett Window:
Hanning Window:
Hamming Window:
Blackman Window:
Gaussian Window:
Kaiser Window:
