modelPIDHysteresisTimer

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 IBPSA.Controls.Continuous.PIDHysteresis 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

TypeNameDefaultDescription
On/off controller
RealminOffTime600Minimum time that devices needs to be off before it can run again
RealeOn1if off and control error > eOn, switch to set point tracking
RealeOff-eOnif on and control error < eOff, set y=0
Booleanpre_y_startfalseValue of hysteresis output at initial time
Set point tracking
Modelica.Blocks.Types.SimpleControllercontrollerTypeModelica.Blocks.Types.SimpleController.PIDType of controller
Realk1Gain of controller
Modelica.SIunits.TimeTiTime constant of Integrator block
Modelica.SIunits.TimeTdTime constant of Derivative block
RealyMax1Upper limit of modulating output
RealyMin0.3Lower limit of modulating output (before switch to 0)
Realwp1Set-point weight for Proportional block (0..1)
Realwd0Set-point weight for Derivative block (0..1)
RealNi0.9Ni*Ti is time constant of anti-windup compensation
RealNd10The higher Nd, the more ideal the derivative block
BooleanreverseActionfalseSet to true to enable reverse action (such as for a cooling coil controller)
Initialization
Modelica.Blocks.Types.InitPIDinitTypeModelica.Blocks.Types.InitPID.DoNotUse_InitialIntegratorStateType of initialization (1: no init, 2: steady state, 3: initial state, 4: initial output)
Realxi_start0Initial or guess value value for integrator output (= integrator state)
Realxd_start0Initial or guess value for state of derivative block
Realy_start0Initial value of output
Advanced
Booleanstricttrue= true, if strict limits with noEvent(..)

Connectors

TypeNameDefaultDescription
RealInputu_s (from SVcontrol)Connector of setpoint input signal
RealInputu_m (from SVcontrol)Connector of measurement input signal
RealOutputy (from SVcontrol)Connector of actuator output signal
Modelica.Blocks.Interfaces.RealOutputtOnTime since boiler switched on
Modelica.Blocks.Interfaces.RealOutputtOffTime since boiler switched off
Modelica.Blocks.Interfaces.BooleanOutputonOutputs true if boiler is on

Components

TypeNameDefaultDescription
LimPIDconController to track setpoint
OffTimeroffHys
Modelica.Blocks.Logical.TimeronTimer
Modelica.Blocks.Logical.TimeroffTimer
Modelica.Blocks.Math.FeedbackfeeBac
Modelica.Blocks.Logical.HysteresishysHysteresis element to switch controller on and off

Revisions

  • September 29, 2016, by Michael Wetter:
    Removed parameter limitsAtInit because it is no longer used in the PID controller.
  • March 15, 2016, by Michael Wetter:
    Changed the default value to strict=true in order to avoid events when the controller saturates. Also assigned propogated values to be final. This is for issue 433.
  • February 24, 2010, by Michael Wetter:
    Changed PID controller from Modelica Standard Library to PID controller from Buildings library to allow reverse control action.
  • October 2, 2009, by Michael Wetter:
    Fixed error in default parameter eOn.
  • February 9, 2009, by Michael Wetter:
    First implementation.