blockIntegratorWithReset
Output the integral of the input signal
Extends from Modelica.Blocks.Interfaces.SISO.
Information
This model is similar to
Modelica.Blocks.Continuous.Integrator
except that it optionally allows to reset the output y
of the integrator.
The output of the integrator can be reset as follows:
-
If
reset = AixLib.Types.Reset.Disabled, which is the default, then the integrator is never reset. -
If
reset = AixLib.Types.Reset.Parameter, then a boolean input signaltriggeris enabled. Whenever the value of this input changes fromfalsetotrue, the integrator is reset by settingyto the value of the parametery_reset. -
If
reset = AixLib.Types.Reset.Input, then a boolean input signaltriggeris enabled. Whenever the value of this input changes fromfalsetotrue, the integrator is reset by settingyto the value of the input signaly_reset_in.
See AixLib.Utilities.Math.Examples.IntegratorWithReset for an example.
Implementation
To adjust the icon layer, the code of Modelica.Blocks.Continuous.Integrator has been copied into this model rather than extended.
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Real | k | 1 | Integrator gain |
| AixLib.Types.Reset | reset | AixLib.Types.Reset.Disabled | Type of integrator reset |
| Initialization | |||
| Modelica.Blocks.Types.Init | initType | Modelica.Blocks.Types.Init.InitialState | Type of initialization (1: no init, 2: steady state, 3,4: initial output) |
| Real | y_start | 0 | Initial or guess value of output (= state) |
| Integrator reset | |||
| Real | y_reset | 0 | Value to which integrator is reset, used if reset = AixLib.Types.Reset.Parameter |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Blocks.Interfaces.RealInput | y_reset_in | Input signal for state to which integrator is reset, enabled if reset = AixLib.Types.Reset.Input | |
| Modelica.Blocks.Interfaces.BooleanInput | trigger | Resets the integrator output when trigger becomes true |
Revisions
-
November 1, 2016, by Michael Wetter:
Corrected wrong annotation fory_reset, and made rendering ofy_reset_inconditional.
This is for #562. -
September 29, 2016, by Michael Wetter:
Refactored model to use atypefor configuration of the integrator reset. -
August 9, 2016, by Michael Wetter:
Reformulated model using a conditional connector to use the same design pattern as is used in other models. -
August 9, 2016, by Michael Wetter:
Revised model. -
July 18, 2016, by Philipp Mehrfeld:
First implementation.