modelPIDHysteresisTimer
PID controller with anti-windup, hysteresis and timer to prevent short cycling
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, and a timer that prevents the controller to short cycle.
The controller is similar to
IBPSA.Controls.Continuous.PIDHysteresis but in addition,
it has a timer that prevents the controller from switching to on
too fast. When the controller switches off, the timer starts and
avoids the controller from switching on until minOffTime seconds elapsed.
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| On/off controller | |||
| Real | minOffTime | 600 | Minimum time that devices needs to be off before it can run again |
| 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 modulating output |
| Real | yMin | 0.3 | Lower limit of modulating output (before switch to 0) |
| 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 | |
| Modelica.Blocks.Interfaces.RealOutput | tOn | Time since boiler switched on | |
| Modelica.Blocks.Interfaces.RealOutput | tOff | Time since boiler switched off | |
| Modelica.Blocks.Interfaces.BooleanOutput | on | Outputs true if boiler is on |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| LimPID | con | Controller to track setpoint | |
| OffTimer | offHys | ||
| Modelica.Blocks.Logical.Timer | onTimer | ||
| Modelica.Blocks.Logical.Timer | offTimer | ||
| Modelica.Blocks.Math.Feedback | feeBac | ||
| Modelica.Blocks.Logical.Hysteresis | hys | Hysteresis element to switch controller on and off |
Revisions
-
September 29, 2016, by Michael Wetter:
Removed parameterlimitsAtInitbecause it is no longer used in the PID controller. -
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. -
February 9, 2009, by Michael Wetter:
First implementation.