blockTrimAndRespond

Block to inplement trim and respond logic

Information

This block implements the trim and respond logic according to Section 5.1.14.3 and 5.1.14.4 of ASHRAE Guideline 36, May 2020.

For each upstream system or plant set point being controlled by a trim and respond loop, define the initial values in system or plant sequences. Values for trim, respond, time step, etc. shall be tuned to provide stable control.

Variable Value Definition
DeviceAHU Supply Fan Associated device
SP0iniSetInitial setpoint
SPminminSetMinimum setpoint
SPmaxmaxSetMaximum setpoint
TddelTimDelay timer
TsamplePeriodTime step
InumIgnReqNumber of ignored requests
RnumOfReqNumber of requests
SPtrimtriAmoTrim amount
SPresresAmoRespond amount
SPres_maxmaxResMaximum response per time interval

The trim and respond logic shall reset setpoint within the range minSet to maxSet. When the associated device is off (uDevSta=false), the setpoint shall be iniSet. The reset logic shall be active while the associated device is proven on (uDevSta=true), starting delTim after initial device start command. When active, every time step samplePeriod, trim the setpoint by triAmo. If there are more than numIgnReq requests, respond by changing the setpoint by resAmo*(numOfReq-numIgnReq), i.e., the number of requests minus the number of ignored requests, but no more than maxRes.

In other words, every time step samplePeriod:

  • Change setpoint by triAmo;
  • If numOfReq > numIgnReq, also change setpoint by resAmo*(numOfReq -numIgnReq) but no more than maxRes.

Hold and release loop output

Optionally, if the parameter have_hol is set to true, an additional input signal uHol allows for holding the trim and respond loop output at a fixed value for the longer of the time the input uHol remains true and the duration specified by the parameter dtHol. When uHol switches back to false, the hold is released and resetting continues from the previously held value (without reinitializing to iniSet or going through a delay time of delTim).

This is typically used in control sequences to freeze the reset logic during the plant staging process. Consider for example the following specification:
"When a plant stage change is initiated, the reset logic shall be disabled and value fixed at its last value for the longer of 15 minutes and the time it takes for the plant to successfully stage."
Using this block with have_hol=true and dtHol=15*60 yields the following sequence of events.

  • 0:00 - Stage change is initiated. T&R loop output is at 50 %.
  • 0:12 - Stage change is completed. T&R loop output remains at 50 % since < 15 minutes have elapsed.
  • 0:15 - T&R is released and continues resetting from 50 %.

Examples

The figure below illustrates the trim and respond logic with a negative trim amount, comparing scenarios with and without holding the loop output.

Trend graph for trim and response

The figure below illustrates the trim and respond logic with a positive trim amount.

Trend graph for trim and response

The figure below illustrates the trim and respond logic with a negative trim amount, in a scenario where the equipment switches on and off.

Trend graph for trim and response

Parameters

TypeNameDefaultDescription
Booleanhave_holfalseSet to true to allow holding the reset, false to continuously reset when enabled
RealiniSetInitial setpoint
RealminSetMinimum setpoint
RealmaxSetMaximum setpoint
RealdelTimDelay time
RealsamplePeriodSample period of component
IntegernumIgnReqNumber of ignored requests
RealtriAmoTrim amount
RealresAmoRespond amount (must have opposite sign of triAmo)
RealmaxResMaximum response per time interval (must have same sign as resAmo)
RealdtHol0Minimum hold time

Connectors

TypeNameDefaultDescription
Buildings.Controls.OBC.CDL.Interfaces.IntegerInputnumOfReqNumber of requests from zones/systems
Buildings.Controls.OBC.CDL.Interfaces.BooleanInputuDevStaOn/Off status of the associated device
Buildings.Controls.OBC.CDL.Interfaces.BooleanInputuHolHold signal
Buildings.Controls.OBC.CDL.Interfaces.RealOutputySetpoint that have been reset

Components

TypeNameDefaultDescription
Buildings.Controls.OBC.CDL.Logical.TrueDelaytimSend an on signal after some delay time
Buildings.Controls.OBC.CDL.Reals.GreaterThresholdgreThrCheck if the real requests is more than ignored requests setting
Buildings.Controls.OBC.CDL.Reals.SwitchnetResNet setpoint reset value
CDL.Reals.Sources.ConstantresAmoConRespond amount constant
Buildings.Controls.OBC.CDL.Reals.MultiplyproProducts of net requests and respond amount value
Buildings.Controls.OBC.CDL.Reals.Multiplypro1Product of trim and respond amount
Buildings.Controls.OBC.CDL.Reals.Multiplypro2Product of respond and maximum amount
Buildings.Controls.OBC.CDL.Discrete.UnitDelayuniDelOutput the input signal with a unit delay
Buildings.Controls.OBC.CDL.Reals.SwitchswiSwitch between initial setpoint and reseted setpoint
Buildings.Controls.OBC.CDL.Reals.Switchswi1Before instant (device ON + delTim + samplePeriod), the setpoint should not be trimmed
Buildings.Controls.OBC.CDL.Reals.Switchswi2Reinitialize setpoint to initial setting when device become OFF
Buildings.Controls.OBC.CDL.Reals.Switchswi3Logical switch
Buildings.Controls.OBC.CDL.Discrete.SamplersamplerSample number of requests
Buildings.Controls.OBC.CDL.Reals.LessThresholdlesThr1Check if trim and response amount have same sign
Buildings.Controls.OBC.CDL.Reals.GreaterThresholdgreThr2Check if trim and response amount have opposite sign
Buildings.Controls.OBC.CDL.Reals.GreaterThresholdgreThr1Check if response amount have positive sign
Buildings.Controls.OBC.CDL.Reals.MultiplyByParametergaiConvert results back to negative

Revisions

  • June 6, 2024, by Antoine Gautier:
    Added logic to hold trim and respond loop output. This is for #3761.
  • June 3, 2020, by Jianjun Hu:
    Upgraded according to G36 official release.
  • April 13, 2020, by Jianjun Hu:
    Corrected to delay the true initial device status. This is for #1876.
  • August 28, 2019, by Jianjun Hu:
    Added assertions and corrected implementation when response amount is negative. This is for #1503.
  • July 10, 2017, by Jianjun Hu:
    First implementation.