blockPIDWithOperatingMode
PID controller with operating mode input
Information
This block adds the following features to Buildings.Controls.OBC.CDL.Reals.PIDWithReset.
- Based on the constants defined within Buildings.Fluid.HydronicConfigurations.Controls.OperatingModes the block allows the controller to be either disabled or switched to a change-over mode.
-
When the controller is disabled, the controller output is forced to
y_neutraland the tracking error is zeroed out to prevent windup. Typically this neutral value should correspond to a condition that applies the minimum control effect, i.e., valves/dampers closed, VFDs at minimum speed, etc. -
When operated under the mode
enabledthe controller behaves exactly as Buildings.Controls.OBC.CDL.Reals.PIDWithReset. Furthermore, the controller output is reset toy_resetat enable time. -
When operated under the mode
heatingthe controller behaves as Buildings.Controls.OBC.CDL.Reals.PIDWithReset except that the sign of the measured and set point variables is reversed so that the controller may for instance provide a heating function if it was originally configured for a cooling function. Furthermore, the controller output is reset toy_resetat the time the operating mode changes.
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Buildings.Controls.OBC.CDL.Types.SimpleController | controllerType | Buildings.Controls.OBC.CDL.Types.SimpleController.PI | Type of controller |
| Real | r | 1 | Typical range of control error, used for scaling the control error |
| Boolean | reverseActing | true | Set to true for reverse acting, or false for direct acting control action |
| Real | y_neutral | 0 | Value to which the controller output is reset at disable time |
| Control gains | |||
| Real | k | 1 | Gain of controller |
| Real | Ti | 0.5 | Time constant of integrator block |
| Real | Td | 0.1 | Time constant of derivative block |
| Limits | |||
| Real | yMax | 1 | Upper limit of output |
| Real | yMin | 0 | Lower limit of output |
| Advanced › Integrator anti-windup | |||
| Real | Ni | 0.9 | Ni*Ti is time constant of anti-windup compensation |
| Advanced › Derivative block | |||
| Real | Nd | 10 | The higher Nd, the more ideal the derivative block |
| Integrator reset | |||
| Real | y_reset | y_neutral | Value to which the controller output is reset at enable time or change-over switch |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| Buildings.Controls.OBC.CDL.Interfaces.RealInput | u_s | Connector of setpoint input signal | |
| Buildings.Controls.OBC.CDL.Interfaces.RealInput | u_m | Connector of measurement input signal | |
| Buildings.Controls.OBC.CDL.Interfaces.RealOutput | y | Connector of actuator output signal | |
| Buildings.Controls.OBC.CDL.Interfaces.IntegerInput | mode | Control mode | |
| Buildings.Controls.OBC.CDL.Reals.PIDWithReset | conPID | Controller | |
| Buildings.Controls.OBC.CDL.Integers.Change | cha | Monitor change of signal value | |
| Buildings.Controls.OBC.CDL.Reals.Multiply | mulSet | Multiply input with mapping coefficient | |
| Buildings.Controls.OBC.CDL.Routing.RealExtractor | extIndSig | Select mapping coefficient based on operating mode | |
| Buildings.Controls.OBC.CDL.Reals.Sources.Constant[3] | map_ms | Map set point and measured values depending on actual operating mode | |
| Buildings.Controls.OBC.CDL.Reals.Multiply | mulMea | Multiply input with mapping coefficient | |
| Buildings.Controls.OBC.CDL.Reals.Switch | swi | ||
| Buildings.Controls.OBC.CDL.Integers.LessEqualThreshold | isDis | Returns true if disabled | |
| Buildings.Controls.OBC.CDL.Reals.Sources.Constant | disVal | Value when disabled | |
| Buildings.Controls.OBC.CDL.Integers.AddParameter | addPar | Convert mode index to array index |
Revisions
-
June 30, 2022, by Antoine Gautier:
First implementation.