modelLimPID_Hysteresis
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 |
|---|---|---|---|
| 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 | 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 |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| LimPID | PID | ||
| Modelica.Blocks.Logical.Hysteresis | hys | Hysteresis element to switch controller on and off | |
| Modelica.Blocks.Math.Feedback | feeBac |
Revisions
Modified from IBPSA Library