Moving Average v1.0
The Moving Average block calculates the moving average from the input data stream over a configurable time window and sample set size. Like the Correlation Calculation block, the set of samples may be unlimited in size, or constrained by a maximum number of samples or a maximum age of samples. The Moving Average block performs a subset of the processing performed by the Data Distribution Calculator block. Consequently, execution of the Moving Average block is considerably faster than execution of the Data Distribution Calculator block.
Parameters
Parameter | Description |
period | The maximum age of any sample that is used in the calculations, in seconds. Any samples older than this will be discarded before performing the calculation. |
size | The maximum number of samples that are used in the calculation. The oldest sample is replaced by the newest sample when the total number of samples has reached this limit. |
One or both of the above parameters must be 0, in which case that limit is not imposed. It is not possible to restrict the number of samples by both age and number of samples, but it is possible to not impose any limit on the number of samples (thus an infinite set of samples is kept).
Operations
Operation | Description |
start | Starts the calculation of statistics. Must be called before the calculator will generate any statistics. |
stop | Stops the calculation of further statistics. Any subsequent input feeds are ignored. |
clear | Discards all current data. |
Input feeds
Feed | Fields | Description |
data | value | The feed of values. The time of a value is taken to be the correlator’s current time. |
Output feeds
Feed | Fields | Description |
statistics | value | The most recent value received on the input feed. |
mean | The arithmetic mean of the distribution. |
samples | The number of samples used for this calculation. |
Copyright © 2013
Software AG, Darmstadt, Germany and/or Software AG USA Inc., Reston, VA, USA, and/or Terracotta Inc., San Francisco, CA, USA, and/or Software AG (Canada) Inc., Cambridge, Ontario, Canada, and/or, Software AG (UK) Ltd., Derby, United Kingdom, and/or Software A.G. (Israel) Ltd., Or-Yehuda, Israel and/or their licensors.