Statistic Filter¶
Introduction¶
The Statistic Filter is a runtime block that continuously computes statistical measures of a selected input signal and writes the result to a designated output global variable. It is typically used for signal conditioning. It can, for example, smooth noisy probe data before feeding it to a PID controller, or monitor transient behavior by tracking rolling statistics, such as standard deviation, coefficient of variation, or percentage change. By filtering out short-term fluctuations or highlighting trends, the statistic filter helps stabilize control loops and provides insight into the dynamic behavior of key process variables.
Property Grid¶
General
¶
- Input Variable
This setting specifies the global variable whose data will be analyzed.
- Output Variable
This setting specifies the global variable that will receive the filtered or computed statistic.
- Output Option
This setting selects the statistical quantity to be computed from the input signal.
- Sample Average
This selection computes the mean of the input over the most recent time window of length, \(T_w\) :
\[SampleAvg\]- Cumulative Average
This selection computes the mean of the input from the start of the simulation up to the current time:
\[CumulativeAvg\]- Sample Standard Deviation
This selection computes the standard deviation of the input over the current window:
\[SampleStd\]where x¯ w(t) is the Sample Average over the same window.
- COV %
This selection computes the coefficient of variation within the current window, expressed as a percentage:
\[COV\]- Change %
This selection computes the percentage change of the input relative to its value at the start of the window:
\[Change\]- Cumulative RMSD
This selection computes the root-mean-square deviation of the input from a fixed reference value xref. By default, xref=x(0), the input’s initial value:
\[RMSD\]- RMSD Reference Variable
The Cumulative RMSD measures variation relative to a baseline. The RMSD Reference Variable defines the baseline variable.
- Window Length UDF
s | This UDF defines the statistical sampling period when calculating output statistics. The window length is relevant for the sample average, sample standard deviation, and percentage change calculations. This length can be calculated using global variables but cannot change over time. For window-based options (e.g., Sample Average, Sample Standard Deviation), only data within the most recent window are used in the calculation.
Download Sample File:
Window Length
Statistics Filter Toolbar¶
Context-Specific Toolbar Options |
Description |
---|---|
|
The Help command launches the M-Star reference documentation in your web browser. |
See also Child Geometry Context Specific Toolbar.
For a full description of each selection on the Context-Specific Toolbar, see Toolbar Selections.