Moving Min Max block

This block calculates a moving min max for the input variables.

Return to Overview of blocks

Moving Min Max block

Description

The output of the block is the smallest and largest value of each input variable, respectively, calculated over a moving window. Each input field has a configured time span window and quality threshold value. The window moves forward as time progresses with the one end anchored to the current execution time.

Moving Min max block

Block Type

Statistical block (Moving window)

Input/Output ports

The input port may only contain fields of type double. There are 2 output fields and 3 quality fields for every input field.

The 2 output 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 name):

  • _Min

  • _Max

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 the 2 output fields will be created. The output fields 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

“Maximum” port’s field name: Asset_Max

“Minimum” port’s field name: Asset_Min

“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:

    • “Maximum” port’s fields – The largest value in the input variable time window

    • ”Minimum” port’s fields – The smallest value in the input variable time 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%

Return to top

 

Example of processing by Moving Min max block

Return to top


Related topics:

  

CSense 2023- Last updated: June 24,2025