beautypg.com

Campbell Scientific CR23X Micrologger User Manual

Page 173

background image

SECTION 10. PROCESSING INSTRUCTIONS

10-9

REAL AND IMAGINARY COMPONENTS
The result of the FFT when the Real and
Imaginary option is selected is N/2 input
locations containing the Real components (R

i

)

followed by N/2 input locations containing the
Imaginary components (I

i

). There is a real and

an imaginary component for each bin. The
value of i varies from 1 to N/2. The real and
imaginary results at each frequency i, are
related to the magnitude (M

i

) and phase (P

i

) as

shown below:

R

i

= M

i

* cos P

i

[2]

I

i

= M

i

* sin P

i

[3]

where M

i

is the magnitude and P

i

is the phase of

the signal in degrees. Magnitude is half of the
zero to peak amplitude or one quarter of the
peak to peak value of the sinusoidal signal.

MAGNITUDE AND PHASE COMPONENTS
The result of the FFT when the magnitude and
phase option is selected is N/2 input locations
containing the magnitude components (Mi)
followed by N/2 input locations containing the
phase components (P

i

). Magnitude is half of the

zero to peak amplitude or one quarter of the
peak to peak value of the sinusoidal signal.
There is a magnitude and a phase component
for each bin. The value of i varies from 1 to N/2.
The magnitude and phase components are
related to the real (R

i

) and imaginary (I

i

)

components as shown below:

M

i

= SQRT[(R

i

*R

i

) + (I

i

*I

i

)]

[4]

P

i

= arctan (I

i

/R

i

)

[5]

To calculate the magnitude and phase the
CR23X's FFT algorithm must first compute the
real and imaginary components. Conversion
from real and imaginary to the magnitude and
phase requires quite a bit more datalogger
execution time and no new information is gained.
If datalogger execution time is limiting, program
the datalogger to store the real and imaginary
results and have a computer do the conversion
to magnitude and phase during the data
reduction phase. The FFT assumes the signal
was sampled at the beginning of each of N
intervals. Since the FFT assumes the signal is
periodic with a period equal to the total sampling
period, the result of its phase calculation at each
frequency component is the average of the
phase at the beginning of the first interval with

the phase at the end of the last interval. The
phase is the angle (0 to 360 degrees) of the
cosine wave that describes the signal at a
particular point in time.

POWER SPECTRUM
The result of the FFT when the power spectrum
option is selected is N/2 bins of spectral energy
(PS

i

) representing frequencies from 0 Hz to 1/2

the sampling frequency. The value of i varies
from 1 to N/2. The result in each bin i, is related
to the magnitude (M

i

) of the wave in the

following manner:

PS

i

= 2*N*(M

i

*M

i

)

[6]

where the magnitude is half of the zero to peak
amplitude or one quarter of the peak to peak
value of the sinusoidal signal.

The power spectrum can also be expressed as
either of the following:

PS

i

= N*(U

i

*U

i

)

[7]

PS

i

= F*T*(U

i

*U

i

)

[8]

U

i

is defined as the root mean square (RMS)

value of the sine component of frequency i (f

i

)

(U

i

= magnitude (M

i

) of the sine wave multiplied

by the square root of 2) in units of the input
signal multiplied by the scaling multiplier. In
equation 8, F is the sampling frequency (Hz) and
T is the duration of the original time series data
(seconds).

When the FFT results are expressed in terms of
the power spectrum, a multiplier of 1 will cause
the average of all the bins to be very nearly
equal to twice the variance of the original data.

FFT RESULTS WITH BIN AVERAGING

When bin averaging is specified, the FFT results
can only be calculated in terms of the power
spectrum. The rest of this section deals with the
DC component, bin frequency, and the power
spectrum results. An example showing bin
averaging FFT results is given in Section 8.11.2.

DC COMPONENT
Before the FFT is applied, the average of the
original time series data is subtracted from each
value. This is done to maintain the resolution of
the math in the rest of the FFT calculations.
When bin averaging is specified then the DC
component is not output.