blockLimPID
Extends from Modelica.Blocks.Interfaces.SVcontrol (Single-Variable continuous controller).
Information
This model is similar to Modelica.Blocks.Continuous.LimPID, except for the following changes:
-
It can be configured to have a reverse action.
If the parameter
reverseAction=false(the default), thenu_m < u_sincreases the controller output, otherwise the controller output is decreased. Thus,- for a heating coil with a two-way valve, set
reverseAction = false, - for a cooling coils with a two-way valve, set
reverseAction = true.
- for a heating coil with a two-way valve, set
-
It can be configured to enable an input port that allows resetting the controller output. The controller output can be reset as follows:
-
If
reset = IBPSA.Types.Reset.Disabled, which is the default, then the controller output is never reset. -
If
reset = IBPSA.Types.Reset.Parameter, then a boolean input signaltriggeris enabled. Whenever the value of this input changes fromfalsetotrue, the controller output is reset by settingyto the value of the parametery_reset. -
If
reset = IBPSA.Types.Reset.Input, then a boolean input signaltriggeris enabled. Whenever the value of this input changes fromfalsetotrue, the controller output is reset by settingyto the value of the input signaly_reset_in.
Note that this controller implements an integrator anti-windup. Therefore, for most applications, keeping the default setting of
reset = IBPSA.Types.Reset.Disabledis sufficient. Examples where it may be beneficial to reset the controller output are situations where the equipment control input should continuously increase as the equipment is switched on, such as as a light dimmer that may slowly increase the luminance, or a variable speed drive of a motor that should continuously increase the speed. -
If
-
The parameter
limitsAtInithas been removed. - Some parameters assignments in the instances have been made final.
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Blocks.Types.SimpleController | controllerType | Modelica.Blocks.Types.SimpleController.PID | Type of controller |
| Real | k | 1 | Gain of controller |
| Modelica.SIunits.Time | Ti | 0.5 | Time constant of Integrator block |
| Modelica.SIunits.Time | Td | 0.1 | 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 for throttling the water flow rate through 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(..) |
| Integrator reset | |||
| IBPSA.Types.Reset | reset | IBPSA.Types.Reset.Disabled | Type of controller output reset |
| Real | y_reset | xi_start | Value to which the controller output is reset if the boolean trigger has a rising edge, used if reset == IBPSA.Types.Reset.Parameter |
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.BooleanInput | trigger | Resets the controller output when trigger becomes true | |
| Modelica.Blocks.Interfaces.RealInput | y_reset_in | Input signal for state to which integrator is reset, enabled if reset = IBPSA.Types.Reset.Input |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| Real | controlError | u_s - u_m | Control error (set point - measurement) |
| Modelica.Blocks.Math.Add | addP | Adder for P gain | |
| Modelica.Blocks.Math.Add | addD | Adder for D gain | |
| Modelica.Blocks.Math.Gain | P | Proportional term | |
| Utilities.Math.IntegratorWithReset | I | Integral term | |
| Modelica.Blocks.Continuous.Derivative | D | Derivative term | |
| Modelica.Blocks.Math.Add3 | addPID | Adder for the gains |
Revisions
-
September 29, 2016, by Michael Wetter:
Refactored model. -
August 25, 2016, by Michael Wetter:
Removed parameterlimitsAtInitbecause it was only propagated to the instancelimiter, but this block no longer makes use of this parameter. This is a non-backward compatible change.
Revised implemenentation, added comments, made some parameter in the instances final. - July 18, 2016, by Philipp Mehrfeld:
Added integrator reset. This is for issue 494. -
March 15, 2016, by Michael Wetter:
Changed the default value tostrict=truein order to avoid events when the controller saturates. This is for issue 433. -
February 24, 2010, by Michael Wetter:
First implementation.