A baseline smoother is a construct that is used to generate a smoothed value based on prior input values. Then, depending on context, this smoothed value is used as an output and/or as part of spike or stability detection. That is, the smoother generates a value looking backwards in time as well as indicators about the state of the latest value (if it’s a spike or the the smoother is now stable).

The basic structure of the smoother consists of a type selection and various parameters for certain types. The parameters for any type not currently selected are not valid and are ignored. In the cases where the smoother is not used for spike and/or stability detection, the associated parameters are also ignored.

The type of the smoother is defined by the enumeration value Type:

FixedTime

Use a fixed maximum number of seconds worth in a "boxcar" style average. That is, once the smoother reaches it maximum capacity, older points are shifted out in the order they where received. This type of smoother is considered unstable until it receives at least a certain minimum number of seconds worth of data (defaulting to the maximum time). After that minimum, stability is detected by if the total relative standard deviation (σ/μ) is less than a threshold. Spikes are detected by comparing the incoming value to a band determined by the prior smoothed value and if the point is outside the band, it is considered a spike.

For fixed time smoothers, the following parameters are valid:

Time

The real number maximum time in seconds the smoother considers.

MinimumTime

The real number minimum time before the smoother is considered valid. When set to undefined, the total time is used; the boxcar must be full.

RSD

The real number relative standard deviation threshold used to determine if the smoother is stable or not. When set to undefined, the smoother is always stable.

Band

The real number relative band of the smoothed value used for spike detection. For example, a value of 0.5 means that any value outside the range of half to twice the smoothed value is considered a spike.

SinglePole and FourPole

These smoother types are low pass digital filters of one and four poles, respectively. A low pass digital filter is an exponential infinite response type of filter. That is, they consider the prior smoothed value(s) weighted against the latest incoming ones to generate an output smoothed value. Both forms of filter accept the same parameters and are defined in terms of a time constant. This time constant is the same as an RC time constant. Conceptually, this represents the time it would take for the smoothed output value to reach 63.2 percent of the final value after a step change in the input.

Digital filter type smoothers detect spikes and stability by comparing the incoming value to relative bands of the prior smoothed one. For example, a stable band of 0.5 means that the smoother is stable as long as the incoming value is within half to twice the smoothed one.

For both forms of digital filter, the following parameters are valid:

TimeConstant

The time interval representing the time constant (impulse response time) of the filter.

Gap

The time interval representing the maximum time between two incoming points before the smoother is reset. When set to undefined, no reset is performed; the value is considered infinite.

ResetOnUndefined

When the boolean value is true, the smoother is reset as soon as an undefined value is received.

StableBand

The real number relative band of the smoothed value used for stablity detection. The smoother is stable as long as the incoming value is within this band of the prior smoothed one.

Spike

The real number relative band of the smoothed value used for spike detection. The incoming value is considered a spike if it is outside of this band of the smoothed value.

SinglePoint

Use the latest valid (defined) single value. Single point smoothers are stable if they have received a valid value. They do not perform spike detection.

Latest

Use the latest value, regardless of if it’s defined or not. Latest point smoothers are stable if the latest point is defined. They do not perform spike detection.

Disable

Disable all smoothing and report only invalid values. When disabled, the smoother is never stable, ready or a spike.

Forever

Use all valid points the smoother has received in an arithmetic mean average. The smoother is stable as soon as it as received a valid value. No spike detection is performed.

90 second maximum and 30 second minimum smoother
/Type,"FixedTime"
/Time,90.0
/MinimumTime,30.0
Single value smoother
/Type,"SinglePoint"