Campbell Scientific CR9000X Measurement and Control System User Manual

Page 294

Advertising
background image

Section 8. Processing and Math Instructions

Example 1:

Scan period = 1 mSec,

N value = 4 (Number of points to average),

Running Average Duration = 4 mSecs

Running Average Frequency = 1/(Running Average Duration = 250 Hz

Input Signal Frequency = 100 Hz

Input Freq. to RunAvg Freq. (Normalized frequency) = 100/250 = 0.4

Sin(0.4

π

)/(0.4

π

) = 0.757 (or read from Chart 8-1 where the X axis is 0.4)

For a 100 Hz input signal with an Amplitude of 10 V peak to peak, the
Running Average outputs a 100 Hz signal with an amplitude of 7.57 V peak to
peak.

Phase Shift : There is also a phase shift, or delay, in the output from the
Running Average. The formula for calculating the delay in number of samples
is:

Delay in Samples = (N-1)/2

(N = Number of points in running

average)

To calculate the delay in time, multiply the result from the above equation by
the period at which the running average is executed (usually the scan period):

Delay in Time = (Scan Period)(N-1)/2

For the example above, the delay is :

Delay in time = (1 mSec)(4-1)/2

= 1.5 mSec

Example 2. Actual test using an accelerometer mounted on a beam whose
resonant frequency is about 36 Hz. The measurement period was 2 mSec. The
running average duration was 20 mSec (frequency of 50 Hz), so the normalized
resonant frequency is 36/50 = 0.72. Sin(0.72

π

)/(0.72

π

) = 0.34. The recorded

amplitude for this example should be about 1/3 of the input signal's amplitude.
A program was written with two stored variables: Accel2 and Accel2RA. The
raw measurement was stored in Accel2, while Accel2RA was the result of
performing a Running Average on the Accel2 variable. Both values were
stored at a rate of 500 Hz. Chart 8-2 show the two values plotted in a single
graph to illustrate the attenuation (the running average value has the lower
amplitude).

8-8

Advertising