beautypg.com

Fft (source, datatype, n, tau, units, option), Fft parameters – Campbell Scientific CR9000X Measurement and Control System User Manual

Page 198

background image

Section 6. Data Table Declarations and Output Processing Instructions

FFT (Source, DataType, N, Tau, Units, Option)

The FFT function performs a Fast Fourier Transform on a time series of
measurements stored in an array. It can also perform an inverse FFT,
generating a time series from the results of an FFT. Depending on the output
option chosen, the output can be: 0) The real and imaginary parts of the FFT;
1) Amplitude spectrum. 2) Amplitude and Phase Spectrum; 3) Power
Spectrum; 4) Power Spectral Density (PSD); or 5) Inverse FFT.

Parameter
& Data Type

Enter

FFT PARAMETERS

Source

Variable

The name of the Variable array that contains the input data for the FFT.

DataType

A code to select the data storage format. Read More: See Section 4.2.4.4 Data Types

Constant

Alpha Code

Numeric Code

Data Format

IEEE4

24

IEEE 4 byte floating point

FP2

7

Campbell Scientific 2 byte floating point

UINT2

21

2 Byte unsigned integer

Long

20

4 Byte Integer value

N

Constant

Number of points in the original time series. The number of points must be a power of 2 (i.e., 512, 1024,
2048, etc.).

Tau

Constant

The sampling interval of the time series.

Units

The units for Tau.

Constant

Alpha
Code

Numeric
Code


Units

USEC 0

Microseconds

MSEC 1

Milliseconds

SEC 2

Seconds

MIN 3

Minutes

Options

to indicate what values to calculate and output.

Constant

Code Result

0

1
2

3

4

5

FFT. The output is (N/2)+1 complex data points, i.e., the real and imaginary parts of the
FFT. The first pair is the DC pair; the last pair is the Nyquist pair. Zero is seen for the DC
and Nyquist imaginary components.
Amplitude spectrum. The output is N/2+1 magnitudes. With Acos(wt); A is magnitude.
Amplitude and Phase Spectrum. The output is N/2+1 pairs of magnitude and phase; with
Acos(wt -

φ); A is amplitude, φ is phase (-π,π). The first pair is the DC pair; the last pair is

the Nyquist pair. Pi is seen for their imaginary component.
Power Spectrum. The output is (N/2)+1 values normalized to give a power spectrum.
With Acos(wt -

φ), the power is A

2

/ 2. The summation of the N/2 values yields the total

power in the time series signal.
Power Spectral Density (PSD). The output is (N/2)+1 values normalized to give a power
spectral density (power per herz). The Power Spectrum multiplied by T = N*tau yields the
PSD. The integral of the PSD over a given bandwidth yields the total power in that band.
Note that the bandwidth of each value is 1/T Hertz.
Inverse FFT. The input is (N/2)+1 complex numbers, organized as in the output of option
0, which is assumed to be the transform of some real time series. The output is the time
series whose FFT would result in the input array.

6-14