Moving Standard Deviation block

This block calculates a time-weighted moving standard deviation of the input fields. The calculation uses a time weighted variant of the population standard deviation calculation, modified to use duration instead of sample counts.

Return to Overview of blocks

Moving Standard Deviation block

Description

The output of the block is the standard deviation of each input variable, respectively, calculated over a moving window. The window moves forward as time progresses with the one end anchored to current execution time. (The standard deviation is a measure of how widely values are dispersed from the average value (the mean))

Moving standard deviation block

Block Type

Statistical block (Moving window)

Input/Output ports

The input port may only contain fields of type double. There is one output field and 3 quality fields for every input field. The 3 quality fields have the following postfixes appended to the configured output field name (by default the configured output field has the same name as the input field):

  • _DurationBad

  • _DurationGood

  • _Windowspan

If a new field is added to the input port an output field will be created. The output field will have the default window span and quality threshold. The default window span and quality threshold is either the last configured window span and quality threshold or, if no new value was specified, it takes on the default block window span and quality threshold values.

In order for this block to run, the input port must be connected to a valid source that contains only double fields. All configured window spans must also be larger than 0 seconds.

There is also a parameter port of type double. During configuration, the parameter ports' fields can be used to substitute the fixed window span and quality thresholds values. During execution, the first value of the parameter field (that was used to substitute fixed values) is then used as the value for the window span and quality threshold

Example:

Input field name = Asset

“Outport1” port’s field name: Asset

“Quality” port’s field names:

  • Asset_DurationBad

  • Asset_DurationGood

  • Asset_Windowspan

Parameter port

The parameter port does not have to be used. The block reads its parameters from the parameter port, if it's configured to do so.

On the first execute, the block will read the value(s) from the parameter field(s) and lock on that value. The parameter value will not change during execution.

Why are parameter ports great?

If you have 10 Moving window blocks and you want to change the configured quality threshold and window span, you only have to change it in one place.  

Functions performed on tags

  • On the values: - The output value is the calculated moving standard deviation of the signal over the window.

  • On the timestamp - The output time stamp is always set to the execute time.

  • On the quality - The quality is set based on the quality threshold. The quality level is calculated as the number of seconds that the signal had good quality over the window. This quality level is expressed as a percentage of the window span. If the quality level is less that the quality threshold, the output quality is set to bad, otherwise it is good.

Return to top

Example

  • Sample period = 60s

  • Window span = 300s

  • Quality threshold = 80%

Example of processing by Moving Standard Deviation block

Return to top


Related topics:

  

CSense 2023- Last updated: June 24,2025