modelPIDHysteresis
Extends from Modelica.Blocks.Interfaces.SVcontrol (Single-Variable continuous controller).
Information
Block of a controller for set point tracking with a hysteresis element that switches the controller on and off.
If the controller is off, and the control error becomes larger than eOn, then
the controller switches to on and remains on until the control error is smaller than eOff.
When the controller is on, the set point tracking can be done using a P-, PI-, or PID-controller.
In its off-mode, the control output is zero. Thus, the parameters yMin and yMax are
used to constrain the output of the controller during its on mode only. This can be used, for
example, to modulate a device between 0.3 and 1.0, and switch it to off when the control error
is small enough.
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Hysteresis | |||
| Real | eOn | 1 | if off and control error > eOn, switch to set point tracking |
| Real | eOff | -eOn | if on and control error < eOff, set y=0 |
| Boolean | pre_y_start | false | Value of hysteresis output at initial time |
| Set point tracking | |||
| Modelica.Blocks.Types.SimpleController | controllerType | Modelica.Blocks.Types.SimpleController.PID | Type of controller |
| Real | k | 1 | Gain of controller |
| Modelica.SIunits.Time | Ti | Time constant of Integrator block | |
| Modelica.SIunits.Time | Td | Time constant of Derivative block | |
| Real | yMax | 1 | Upper limit of output |
| Real | yMin | 0 | Lower limit of output |
| Real | wp | 1 | Set-point weight for Proportional block (0..1) |
| Real | wd | 0 | Set-point weight for Derivative block (0..1) |
| Real | Ni | 0.9 | Ni*Ti is time constant of anti-windup compensation |
| Real | Nd | 10 | The higher Nd, the more ideal the derivative block |
| Boolean | reverseAction | false | Set to true to enable reverse action (such as for a cooling coil controller) |
| Initialization | |||
| Modelica.Blocks.Types.InitPID | initType | Modelica.Blocks.Types.InitPID.DoNotUse_InitialIntegratorState | Type of initialization (1: no init, 2: steady state, 3: initial state, 4: initial output) |
| Real | xi_start | 0 | Initial or guess value value for integrator output (= integrator state) |
| Real | xd_start | 0 | Initial or guess value for state of derivative block |
| Real | y_start | 0 | Initial value of output |
| Advanced | |||
| Boolean | strict | true | = true, if strict limits with noEvent(..) |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| RealInput | u_s (from SVcontrol) | Connector of setpoint input signal | |
| RealInput | u_m (from SVcontrol) | Connector of measurement input signal | |
| RealOutput | y (from SVcontrol) | Connector of actuator output signal |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| LimPID | PID | Controller for room temperature | |
| Modelica.Blocks.Logical.Hysteresis | hys | Hysteresis element to switch controller on and off | |
| Modelica.Blocks.Math.Feedback | feeBac |
Revisions
-
September 29, 2016, by Michael Wetter:
Removed parameterlimitsAtInitbecause it is no longer used in the PID controller. -
April 13, 2016, by Michael Wetter:
Setzer(final k=0)and made swi, zer and zer1 protected which they are also for IBPSA.Controls.Continuous.PIDHysteresis. These changes are not backwards compatible. -
March 15, 2016, by Michael Wetter:
Changed the default value tostrict=truein order to avoid events when the controller saturates. Also assigned propogated values to befinal. This is for issue 433. -
February 24, 2010, by Michael Wetter:
Changed PID controller from Modelica Standard Library to PID controller from Buildings library to allow reverse control action. -
October 2, 2009, by Michael Wetter:
Fixed error in default parametereOn. Fixed error by introducing parameterTd, which used to be hard-wired in the PID controller. -
February 14, 2009, by Michael Wetter:
First implementation.