beautypg.com

60 fast fourier transform – Campbell Scientific CR23X Micrologger User Manual

Page 171

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 power spectrum, 2) the real and imaginary
components, or 3) the magnitude and phase
components. The power spectrum results
indicate the amount of power at the different
frequencies but do not contain any phase
information. 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.

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

02:

2

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

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: Equal to the number of
values in the original time series data.

Intermediate locations required: N/8+2

Execution time in seconds:

POWER SPECTRUM

= 0.00035*N*LOG

10

(N)/LOG

10

(2)+0.01

MAGNITUDE AND PHASE

= 0.00035*N*LOG

10

(N)/LOG

10

(2)+0.14

REAL AND IMAGINARY

= 0.00072*N*LOG

10

(N)/LOG

10

(2)+1.44

PARAMETER 1 is an integer from 1 to 12. 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=12, then N=4096. Maximum value
for Parameter 1 is 12 (4096).

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