MaxIncrease block

Requirements.ChecksInSlidingWindow.MaxIncrease  ยท source

Icon of MaxIncrease

In every sliding time window, the increase of the input is limited

Syntax

increaseLimited = MaxIncrease(window=..., upperLimit=...).y;

Description

In any (sliding) time window of length window, the increase of input u is limited by parameter upperLimit, that is

increase(t) = u(t) - u(t-window)
       y(t) = increase(t) ≤ upperLimit

Whenever this property is fulfilled, Boolean output y = true, otherwise y = false:

Hereby it is assumed that u(t-window) = u(t0) for t0 ≤ t < t0 + window, where t0 is the start time of the simulation.

Example

The property is demonstrated with the following example calling the block as:

results in

simulation result

Margin

Output margin (present if computeMargin = true, the default) is the signed distance of the check to its limit, upperLimit - increase, divided by parameter scale: margin ≥ 0 exactly when the check holds, margin = 1 is one scale of headroom, margin < 0 a violation by that many. Set scale to the requirement's tolerance so that margins of different requirements compare; with the default scale = 1 the margin is the raw robustness in the quantity's unit. The block computes the instantaneous value only; the worst value over a run and the instant it occurs are taken from the stored trajectory.

Parameters

NameTypeDescription
window parameterSI.TimeLength of sliding time window (> 0)
upperLimit parameterRealIn sliding time window, increase <= upperLimit of input u required
scale parameterRealScale of the margin: margin = (upperLimit - increase)/scale, with scale the requirement's tolerance (1 = raw)
computeMargin parameterBoolean= true, if the normalized margin output is provided

Components and variables

NameTypeDescription
yModelica.Blocks.Interfaces.BooleanOutput= true if increase <= upperLimit
increaseModelica.Blocks.Interfaces.RealOutputIncrease of the input signal in the sliding time window
marginRequirements.Interfaces.MarginOutputNormalized margin of the check: >= 0 exactly when the check holds, in units of scale
uModelica.Blocks.Interfaces.RealInputReal input signal