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: linkWindowInTime
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 '.' or '$' characters.
Every object has the Caption property. This property is very important, because it is the name by which Polybench recognizes this object.
It is allowed to give multiple objects the same name, as long as the objects are of the same type. In that case, a reference to this caption includes all the objects with the same caption.
In Polybench, every object can be addressed by an Address specifier, which starts with the dollar sign, for example: $My Page.My Object. 'My Page' would be the Caption of a page, and 'My Object' the Caption of an object on that page.
It is allowed to give multiple objects the same name, as long as the objects are of the same type. In that case, a reference to this caption includes all the objects with the same caption.
In Polybench, every object can be addressed by an Address specifier, which starts with the dollar sign, for example: $My Page.My Object. 'My Page' would be the Caption of a page, and 'My Object' the Caption of an object on that page.
Documentation
type: See descriptionOptional documentation of this object.
It is good practice to write in short notes why you have used this object, and why its properties are set the way they are set. If this object is an operator, the Documentation text is displayed below the operator symbol.
Variable Parameters
Find more information about Variable Parameters here: linkWindowInSamples
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