Averager
Overview
The output value is the average (mean) over N previous sample values, where N represents a rectangular window.Operator ports
Input S: Floating point valuesOutput Avg(S): Floating point values
Properties
Find more information about changing properties here: "Properties Viewer"WindowInTime
type: See descriptionThe moving box-car window size in seconds (minimal window size is the duration of one sample interval)
WindowInSamples
type: Integer valueThe moving box-car window size as number of samples (must be greater than 0)
NumberFormat
type: See descriptionSpecifies the format in which the averager window setting is displayed (default ;3 for 3 digits after dot or comma)
RealWindowInTime
type: See description [this value cannot be changed]The moving window as calculated by the system, expressed in seconds
Caption
type: Word or phraseThe name of the object in the project. This name must not contain '.', '$' nor '@' characters.
For more information about the rules and usage of the Caption property, please refer to "Caption property - background and usage".
Documentation
type: See descriptionOptional documentation of this object. If this object is an operator, the Documentation text is displayed below the operator symbol.
Variable Parameters
Find more information about Variable Parameters here: "Variable Parameters"WindowInSamples
type: See descriptionThe moving box-car window size as number of samples (must be greater than 0)
WindowInTime
type: See descriptionThe moving box-car window size in seconds (minimal window size is the duration of one sample interval)
RealWindowInTime
type: See description [this value cannot be changed]The moving window as calculated by the system, expressed in seconds
Details
Averaging of the input values starts immediately after reset, because the averaging window will grow from 1 to N sample periods during this start-up period.A minimal averaging window of 1 sample period lets the averager result in the input value.
Note that the averaging process resets, when the window size is set to a smaller value, or whenever the number of channels at the input changes. If the window size is enlarged, the window will grow per incoming sample from its old size, to its new size.
If your measurement configuration receives a RESET action, the averager is also reset to its start state.
Examples
Example: Basic Running Averager Demo
Demonstrates how the Averager works. As source signal a block of 0.5 Hz is taken. The Averager has a window of 0.5 seconds. The result of the Averager is shown with the blue line, which is printed over the input signal (single baseline).Examples\DF0204016_001_Averager_Demo.xmc
Example: Averaging Signals Demo
Demonstrates various properties of the Averager, given different mathematical input signals. Also demonstrates that if the averaging window has 1 sample period length, the output is exactly the input signal.Examples\DF0204016_002_Averager_Demo.xmc