Integrator with limits
signal.limited_integrator
Integrates the input, y' = k u, and stays between lower and upper. At a limit it stops integrating while the input pushes outward, so it leaves the limit as soon as the input turns back.
Ports
| Name | Domain | Direction |
|---|---|---|
u | signal | in |
y | signal | out |
Parameters
| Name | Unit | Default | Description |
|---|---|---|---|
k | 1 | 1 | Gain |
y0 | 1 | 0 | Start value, between the limits |
upper | 1 | 1 | Upper limit |
lower | 1 | -1 | Lower limit |
Variables
| Name | Unit | Start | Description |
|---|---|---|---|
x | 1 | y0 | Integral |
Equations
der(x) = if x >= upper then (if k * u > 0 then 0 else k * u) else if x <= lower then (if k * u < 0 then 0 else k * u) else k * u when x >= upper then reinit(x, upper) when x <= lower then reinit(x, lower) y = x