beautypg.com

60 fast fourier transform – Campbell Scientific CR10X Measurement and Control System User Manual

Page 165

background image

SECTION 10. PROCESSING INSTRUCTIONS

10-7

*** 60 FAST FOURIER TRANSFORM ***

THEORY
Instruction 60 performs a Fast Fourier
Transform (FFT) on a set of data contained in
contiguous locations in Input Storage. The FFT
is used to obtain information on the relative
magnitudes and phases of the various frequency
components in a time varying signal. FFT theory
requires that the signal be sampled at a
frequency that is at least two times faster than
the highest frequency component in the signal.
For example, a signal representing ocean waves
with a maximum frequency of 0.125 Hz would
need to be sampled at a rate of 0.25 Hz or
greater. The measurements must be made at
the appropriate sampling rate and stored in
contiguous input locations before the FFT can
be applied. The measured data stored in
sequential input locations is also referred to as
the "original time series data".

The results of the FFT can be expressed as: 1)
the real and imaginary components, 2) the
magnitude and phase components, or 3) the
power spectra. The real and imaginary results
are analogous to the orthogonal (east and north)
representation of a wind vector. The magnitude
and phase results are analogous to the polar
(speed and direction) representation of a wind
vector. The power spectra results indicate the
amount of power at the different frequencies but
do not contain any phase information.

If desired, the original time varying signal can be
reconstructed by taking the Inverse Fourier
Transform of either the real and imaginary or the
magnitude and phase results.

PROGRAMMING
The FFT Instruction is a Processing Instruction
and will not output data to final memory or any
data storage device. FFT results are
transferred to Final Memory by setting the
Output Flag and sampling the input locations
which contain the FFT results.

PARAM.

DATA

NUMBER

TYPE

DESCRIPTION

01:

2

Log base 2 of N, where
N is the number of
samples in the original
data; e.g., this
parameter is 11 for
2048 samples or 12 for
4096 samples.
Maximum is 12 or 4096.

02:

2

FFT Option
X0 = No Taper
0X = Power Spectra
X1 = Taper
1X = Real & Imaginary
2X = Magnitude & Phase

03:

2

Log base 2 of the number
of adjacent bins to
average; e.g., this
parameter is 3 for
averaging 8 adjacent bins.

04:

4

Input location containing
the first value in the original
time series. After this
program has executed, this
location will contain the first
spectral bin or bin average
of the result.

05:

FP

Multiplier for scaling
FFT results.

Input storage locations: Greater than or equal
to the number of values in the original time
series data.

Intermediate locations required: 2 + (.125 * N)

Execution time in seconds:

REAL AND IMAGINARY

= .00065*N*LOG2 of N + .58

MAGNITUDE AND PHASE

= .00077*N*LOG2 of N + 1.66

POWER SPECTRA

= .00066*N*LOG2 of N + .45

PARAMETER 1 is an integer from 1 to 13. The
number 2, raised to the power of Parameter 1, is
equal to the number of data values in the
original time series data, N. For example, if
Parameter 1=13, then N=8192. Maximum value
for Parameter 1 is 13 (8192).

PARAMETER 2, the FFT Option, is a two digit
parameter. The first digit specifies which results
are to be generated and the second digit
specifies whether or not a "taper" is applied.

First Digit: A "0" in the first digit specifies that
the FFT result be expressed as the power
spectra. Bin averaging is allowed with this
option. A "1" in the first digit specifies that the
FFT result be expressed as the real and
imaginary components. Bin averaging is not
allowed with this option. A "2" in the first digit
specifies that the FFT result be expressed as