modelLimPID_HysteresisTimer
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
TRANSFORM.Controls.LimPID_Hysteresis 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 |
|---|---|---|---|
| SimpleController | controllerType | SimpleController.PID | Type of controller |
| Boolean | derMeas | true | =true avoid derivative kick |
| Real | yb | 0 | Output bias. May improve simulation |
| Real | k_s | 1 | Setpoint input scaling: k_s*u_s. May improve simulation |
| Real | k_m | 1 | Measurement input scaling: k_m*u_m. May improve simulation |
| Real | yMax | Modelica.Constants.inf | Upper limit of output |
| Real | yMin | -yMax | Lower limit of output |
| Parameters: Tuning Controls | |||
| Real | k | 1 | Controller gain: +/- for direct/reverse acting |
| SI.Time | Ti | 0.5 | Time constant of Integrator block |
| SI.Time | Td | 0.1 | Time constant of Derivative block |
| 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 |
| Initialization | |||
| .Modelica.Blocks.Types.InitPID | initType | .Modelica.Blocks.Types.InitPID.NoInit | 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 | false | = true, if strict limits with noEvent(..) |
| Hysteresis | |||
| 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 |
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 | PID | Controller to track setpoint | |
| TRANSFORM.Blocks.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
Modified from IBPSA Library