beautypg.com

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

Page 302

background image

Section 8. Processing and Math Instructions

FFTSpa (Dest, N, Source, Tau, Units, Option)

The FFTSpa performs a Fast Fourier Transform on a time series of
measurements stored in an array and places the results 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.

The difference between the FFT instruction (Section 6) and FFTSpa is that
FFT is an output instruction that stores the results in a data table and FFTSpa
stores its results in an array.

Parameter
& Data Type

Enter

FFTSPA PARAMETERS

Dest

Array

The array in which to store the results of FFT.

Source

Variable

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

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

A code 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.

π

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 Hertz). 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.


T = N*tau: the length, in seconds, of the time series.
Processing field: “FFT,N,tau,option”. Tick marks on the x axis are 1/(N*tau)
Herz. N/2 values, or pairs of values, are output, depending upon the option
code.

8-16