blockMaxPercentageIncrease
In every sliding time window, the percentage increase of the input is limited
Information
Syntax
percentageIncreaseLimited = MaxPercentageIncrease(window=..., upperPercentageLimit=...).y;
Description
In any (sliding) time window of length window, the percentage increase of input u is limited by parameter upperPercentageLimit, that is
percentageIncrease(t) = 100*(u(t) - u(t-window)/max(|u(t-window)|,usmall), if t ≥ t0 + window
= 100*(u(t) - u(t0)/max(|u(t0)|,usmall), if t < t0 + window
y(t) = percentageIncrease(t) ≤ upperPercentageLimit
Whenever this property is fulfilled, Boolean output y = true, otherwise y = false.
The denominator of the percentageIncrease uses the max(...,usmall)) construction to guard against division by 0.
Note, percentageIncrease and upperPercentageLimit have unit [%].
Example
The property is demonstrated with the following example calling the block as:
results in
![]() |
|
| simulation result |
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Units.SI.Time | window | Length of sliding time window (> 0) | |
| Real | upperPercentageLimit | (in [%]) In sliding time window, percentageIncrease <= upperPercentageLimit of input u required | |
| Real | u_small | 1e-10 | Small number to guard against a division by zero |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Blocks.Interfaces.BooleanOutput | y | = true if percentageIncrease <= upperPercentageLimit | |
| Modelica.Blocks.Interfaces.RealOutput | percentageIncrease | Increase of the input signal in the sliding time window in [%] | |
| Modelica.Blocks.Interfaces.RealInput | u | Real input signal |
