modelLimPID_HysteresisTimer

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 TRANSFORM.Controls.LimPID_Hysteresis 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
SimpleControllercontrollerTypeSimpleController.PIDType of controller
BooleanderMeastrue=true avoid derivative kick
Realyb0Output bias. May improve simulation
Realk_s1Setpoint input scaling: k_s*u_s. May improve simulation
Realk_m1Measurement input scaling: k_m*u_m. May improve simulation
RealyMaxModelica.Constants.infUpper limit of output
RealyMin-yMaxLower limit of output
Parameters: Tuning Controls
Realk1Controller gain: +/- for direct/reverse acting
SI.TimeTi0.5Time constant of Integrator block
SI.TimeTd0.1Time constant of Derivative block
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
Initialization
.Modelica.Blocks.Types.InitPIDinitType.Modelica.Blocks.Types.InitPID.NoInitType 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
Booleanstrictfalse= true, if strict limits with noEvent(..)
Hysteresis
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

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
LimPIDPIDController to track setpoint
TRANSFORM.Blocks.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

Modified from IBPSA Library