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

TypeNameDefaultDescription
Modelica.Units.SI.TimewindowLength of sliding time window (> 0)
RealupperPercentageLimit(in [%]) In sliding time window, percentageIncrease <= upperPercentageLimit of input u required
Realu_small1e-10Small number to guard against a division by zero

Connectors

TypeNameDefaultDescription
Modelica.Blocks.Interfaces.BooleanOutputy= true if percentageIncrease <= upperPercentageLimit
Modelica.Blocks.Interfaces.RealOutputpercentageIncreaseIncrease of the input signal in the sliding time window in [%]
Modelica.Blocks.Interfaces.RealInputuReal input signal