modelIntegratorVariableLimitsContinuous
Extends from Dynawo.NonElectrical.Blocks.Continuous.BaseClasses.BaseIntegratorVariableLimits (Base model of integrator with variable limits on output and frozen integration on the limits).
Information
This blocks computes w as integral of the input u multiplied by the gain K, with v = K * u.
If the integral reaches a given upper limit limitMax or lower limit limitMin, the integration is halted and only restarted if the input drives the integral away from the bounds.
This freeze is imposed through two coefficients kFreezeMax and kFreezeMin, each defined by a continuous expression involving the hyperbolic tangent, the integrator input v, the integrator output w, the limit limitMax or limitMin and its filtered derivative derLimitMax or derLimitMin.
w > limitMax and v > derLimitMax => kFreezeMax = 1, kFreezeMin = 0 => der(w) = derLimitMax
w < limitMin and v < derLimitMin => kFreezeMax = 0, kFreezeMin = 1 => der(w) = derLimitMin
limitMax > w > limitMin or derLimitMax > v > derLimitMin => kFreezeMax = kFreezeMin = 0 => der(w) = v
The parameters TolInput and TolOutput determine the width of the transition zone from one domain to another.
The output y is the result of the limitation of w by both variable limits.
If the "upper" limit is smaller than the "lower" one, the output y is ruled by the parameter DefaultLimitMax: y is equal to either limitMax or limitMin.
The integrator is initialized with the value Y0.
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Boolean | DefaultLimitMax (from BaseIntegratorVariableLimits) | true | If limitMin > limitMax : if true, y = limitMax, if false, y = limitMin |
| Types.PerUnit | K (from BaseIntegratorVariableLimits) | 1 | Integrator gain |
| Types.PerUnit | LimitMax0 (from BaseIntegratorVariableLimits) | Initial value of upper limit | |
| Types.PerUnit | LimitMin0 (from BaseIntegratorVariableLimits) | Initial value of lower limit | |
| Types.PerUnit | Y0 (from BaseIntegratorVariableLimits) | 0 | Initial or guess value of output |
| Types.Time | tDer | 1e-3 | Time constant of derivative filter for limits in s |
| Real | TolInput | 1e-5 | Tolerance on limit crossing for integrator input |
| Real | TolOutput | 1e-5 | Tolerance on limit crossing for integrator output |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| RealInput | u (from SISO) | Connector of Real input signal | |
| RealOutput | y (from SISO) | Connector of Real output signal | |
| Modelica.Blocks.Interfaces.RealInput | limitMax (from BaseIntegratorVariableLimits) | Connector of Real input signal used as maximum of output y | |
| Modelica.Blocks.Interfaces.RealInput | limitMin (from BaseIntegratorVariableLimits) | Connector of Real input signal used as minimum of output y |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Blocks.Continuous.Derivative | derivativeLimitMax | ||
| Modelica.Blocks.Continuous.Derivative | derivativeLimitMin |