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_neutral and 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 enabled the controller behaves exactly as Buildings.Controls.OBC.CDL.Reals.PIDWithReset. Furthermore, the controller output is reset to y_reset at enable time.
  • When operated under the mode heating the 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 to y_reset at the time the operating mode changes.

Parameters

TypeNameDefaultDescription
Buildings.Controls.OBC.CDL.Types.SimpleControllercontrollerTypeBuildings.Controls.OBC.CDL.Types.SimpleController.PIType of controller
Realr1Typical range of control error, used for scaling the control error
BooleanreverseActingtrueSet to true for reverse acting, or false for direct acting control action
Realy_neutral0Value to which the controller output is reset at disable time
Control gains
Realk1Gain of controller
RealTi0.5Time constant of integrator block
RealTd0.1Time constant of derivative block
Limits
RealyMax1Upper limit of output
RealyMin0Lower limit of output
Advanced › Integrator anti-windup
RealNi0.9Ni*Ti is time constant of anti-windup compensation
Advanced › Derivative block
RealNd10The higher Nd, the more ideal the derivative block
Integrator reset
Realy_resety_neutralValue to which the controller output is reset at enable time or change-over switch

Connectors

TypeNameDefaultDescription
Buildings.Controls.OBC.CDL.Interfaces.RealInputu_sConnector of setpoint input signal
Buildings.Controls.OBC.CDL.Interfaces.RealInputu_mConnector of measurement input signal
Buildings.Controls.OBC.CDL.Interfaces.RealOutputyConnector of actuator output signal
Buildings.Controls.OBC.CDL.Interfaces.IntegerInputmodeControl mode

Components

TypeNameDefaultDescription
Buildings.Controls.OBC.CDL.Reals.PIDWithResetconPIDController
Buildings.Controls.OBC.CDL.Integers.ChangechaMonitor change of signal value
Buildings.Controls.OBC.CDL.Reals.MultiplymulSetMultiply input with mapping coefficient
Buildings.Controls.OBC.CDL.Routing.RealExtractorextIndSigSelect mapping coefficient based on operating mode
Buildings.Controls.OBC.CDL.Reals.Sources.Constant[3]map_msMap set point and measured values depending on actual operating mode
Buildings.Controls.OBC.CDL.Reals.MultiplymulMeaMultiply input with mapping coefficient
Buildings.Controls.OBC.CDL.Reals.Switchswi
Buildings.Controls.OBC.CDL.Integers.LessEqualThresholdisDisReturns true if disabled
Buildings.Controls.OBC.CDL.Reals.Sources.ConstantdisValValue when disabled
Buildings.Controls.OBC.CDL.Integers.AddParameteraddParConvert mode index to array index

Revisions

  • June 30, 2022, by Antoine Gautier:
    First implementation.