MaxIncrease block
Requirements.ChecksInSlidingWindow.MaxIncrease
ยท source
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
| Name | Type | Description |
|---|---|---|
window parameter | SI.Time | Length of sliding time window (> 0) |
upperLimit parameter | Real | In sliding time window, increase <= upperLimit of input u required |
scale parameter | Real | Scale of the margin: margin = (upperLimit - increase)/scale, with scale the requirement's tolerance (1 = raw) |
computeMargin parameter | Boolean | = true, if the normalized margin output is provided |
Components and variables
| Name | Type | Description |
|---|---|---|
y | Modelica.Blocks.Interfaces.BooleanOutput | = true if increase <= upperLimit |
increase | Modelica.Blocks.Interfaces.RealOutput | Increase of the input signal in the sliding time window |
margin | Requirements.Interfaces.MarginOutput | Normalized margin of the check: >= 0 exactly when the check holds, in units of scale |
u | Modelica.Blocks.Interfaces.RealInput | Real input signal |

