Buildings.Controls.OBC.ASHRAE.G36.Plants.Chillers.Generic

Generic control sequences

Information

This package contains generic primary plant control sequences.

Package Content

Name Description
Buildings.Controls.OBC.ASHRAE.G36.Plants.Chillers.Generic.ChillerLifts ChillerLifts Calculate the maximum and minimum enabled chiller lifts
Buildings.Controls.OBC.ASHRAE.G36.Plants.Chillers.Generic.IdentifyStage IdentifyStage Identify current chiller stage according to the proven on status of the chillers
Buildings.Controls.OBC.ASHRAE.G36.Plants.Chillers.Generic.TimerWithReset TimerWithReset Timer measuring the time from the time instant where the Boolean input became true
Buildings.Controls.OBC.ASHRAE.G36.Plants.Chillers.Generic.PlantEnable PlantEnable Package of sequences for enabling plant and the associated devices
Buildings.Controls.OBC.ASHRAE.G36.Plants.Chillers.Generic.Validation Validation Collection of validation models

Buildings.Controls.OBC.ASHRAE.G36.Plants.Chillers.Generic.ChillerLifts Buildings.Controls.OBC.ASHRAE.G36.Plants.Chillers.Generic.ChillerLifts

Calculate the maximum and minimum enabled chiller lifts

Buildings.Controls.OBC.ASHRAE.G36.Plants.Chillers.Generic.ChillerLifts

Information

Block that outputs the maximum and minimum lifts of the enabled chillers. It is based on ASHRAE Guideline 36-2021, section 5.20.4.14.

yLifMin and yLifMax shall be calculated as the averages of minChiLif and maxChiLif for operating chillers, respectively.

Parameters

TypeNameDefaultDescription
IntegernChi2Total number of chillers
RealminChiLif[nChi]{12,12}Minimum LIFT of each chiller [K]
RealmaxChiLif[nChi]{18,18}Maximum LIFT of each chiller [K]

Connectors

TypeNameDescription
input BooleanInputuChi[nChi]Vector of chillers proven on status: true=ON
output RealOutputyLifMaxMaximum LIFT among enabled chillers [K]
output RealOutputyLifMinMinimum LIFT among enabled chillers [K]

Modelica definition

block ChillerLifts "Calculate the maximum and minimum enabled chiller lifts" parameter Integer nChi = 2 "Total number of chillers"; parameter Real minChiLif[nChi]( final unit=fill("K",nChi), final quantity=fill("TemperatureDifference",nChi))={12, 12} "Minimum LIFT of each chiller"; parameter Real maxChiLif[nChi]( final unit=fill("K",nChi), final quantity=fill("TemperatureDifference",nChi))={18, 18} "Maximum LIFT of each chiller"; Buildings.Controls.OBC.CDL.Interfaces.BooleanInput uChi[nChi] "Vector of chillers proven on status: true=ON"; Buildings.Controls.OBC.CDL.Interfaces.RealOutput yLifMax( final unit="K") "Maximum LIFT among enabled chillers"; Buildings.Controls.OBC.CDL.Interfaces.RealOutput yLifMin( final unit="K") "Minimum LIFT among enabled chillers"; protected Buildings.Controls.OBC.CDL.Reals.Sources.Constant minLif[nChi]( final k=minChiLif) "Minimum LIFT of chillers"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant zeoCon[nChi]( final k=fill(0, nChi)) "Zero constant"; Buildings.Controls.OBC.CDL.Reals.Switch swi[nChi] "Logical switch"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant maxLif[nChi]( final k=maxChiLif) "Maximum LIFT of chillers"; Buildings.Controls.OBC.CDL.Reals.Switch swi1[nChi] "Logical switch"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant one( final k=1) "Dummy constant"; Buildings.Controls.OBC.CDL.Conversions.BooleanToReal booToRea[nChi] "Convert boolean input to real output"; Buildings.Controls.OBC.CDL.Reals.MultiSum mulSum(nin=nChi) "Total number of enabled chillers"; Buildings.Controls.OBC.CDL.Reals.MultiSum minLifSum(nin=nChi) "Sum of the enabled chillers minimum lift"; Buildings.Controls.OBC.CDL.Reals.MultiSum maxLifSum(nin=nChi) "Sum of the enabled chillers maximum lift"; Buildings.Controls.OBC.CDL.Logical.MultiOr chiOn(nin=nChi) "Check if there is any chiller proven on"; Buildings.Controls.OBC.CDL.Reals.Switch swi2 "Switch to avoid zero denominator"; Buildings.Controls.OBC.CDL.Reals.Divide maxLifMea "Average maximum lift of the enabled chillers"; Buildings.Controls.OBC.CDL.Reals.Divide minLifMea "Average maximum lift of the enabled chillers"; Buildings.Controls.OBC.CDL.Reals.Switch swi4 "Maximum lift"; Buildings.Controls.OBC.CDL.Reals.Switch swi3 "Minimum lift"; equation connect(uChi, swi.u2); connect(zeoCon.y, swi.u3); connect(minLif.y, swi.u1); connect(uChi, swi1.u2); connect(zeoCon.y, swi1.u3); connect(maxLif.y, swi1.u1); connect(uChi, booToRea.u); connect(uChi,chiOn. u); connect(chiOn.y, swi2.u2); connect(mulSum.y, swi2.u1); connect(swi2.y, maxLifMea.u2); connect(maxLifSum.y, maxLifMea.u1); connect(chiOn.y, swi4.u2); connect(maxLifMea.y, swi4.u1); connect(minLifSum.y, minLifMea.u1); connect(swi2.y, minLifMea.u2); connect(minLifMea.y, swi3.u1); connect(chiOn.y, swi3.u2); connect(minLif[1].y, swi3.u3); connect(maxLif[1].y, swi4.u3); connect(swi4.y, yLifMax); connect(swi3.y, yLifMin); connect(swi1.y, maxLifSum.u); connect(booToRea.y, mulSum.u); connect(swi.y, minLifSum.u); connect(one.y, swi2.u3); end ChillerLifts;

Buildings.Controls.OBC.ASHRAE.G36.Plants.Chillers.Generic.IdentifyStage Buildings.Controls.OBC.ASHRAE.G36.Plants.Chillers.Generic.IdentifyStage

Identify current chiller stage according to the proven on status of the chillers

Buildings.Controls.OBC.ASHRAE.G36.Plants.Chillers.Generic.IdentifyStage

Information

This subsequence is not directly specified in ASHRAE Guideline 36-2021 as it provides a side calculation about the generalization of the staging sequences for any number of chillers and stages provided by the user.

The subsequence outputs the current chiller stage index ySta according to the current chillers proven on status uChi and the given staging matrix staMat, which specifies which chillers should be enabled at each stage.

Parameters

TypeNameDefaultDescription
IntegernSta3Number of chiller stages
IntegernChi2Number of chillers
IntegerstaMat[nSta, nChi]{{1,0},{0,1},{1,1}}Staging matrix with chiller stage as row index and chiller as column index

Connectors

TypeNameDescription
input BooleanInputuChi[nChi]Vector of chiller proven on status: true=ON
output IntegerOutputyStaCurrent stage index

Modelica definition

block IdentifyStage "Identify current chiller stage according to the proven on status of the chillers" parameter Integer nSta = 3 "Number of chiller stages"; parameter Integer nChi = 2 "Number of chillers"; parameter Integer staMat[nSta, nChi] = {{1,0},{0,1},{1,1}} "Staging matrix with chiller stage as row index and chiller as column index"; Buildings.Controls.OBC.CDL.Interfaces.BooleanInput uChi[nChi] "Vector of chiller proven on status: true=ON"; Buildings.Controls.OBC.CDL.Interfaces.IntegerOutput ySta "Current stage index"; protected final parameter Real staInd[nSta] = {i for i in 1:nSta} "Stage index vector"; Buildings.Controls.OBC.CDL.Routing.BooleanVectorReplicator booVecRep( final nin=nChi, final nout=nSta) "Replicate boolean vector to be a matric with total stages as row size and total chillers as column size"; Buildings.Controls.OBC.CDL.Conversions.BooleanToInteger booToInt[nSta,nChi] "Convert boolean to integer"; Buildings.Controls.OBC.CDL.Integers.Equal intEqu[nSta,nChi] "Output true if the first integer input one equals to the second integer input"; Buildings.Controls.OBC.CDL.Conversions.BooleanToReal booToRea [nSta,nChi] "Convert boolean to real"; Buildings.Controls.OBC.CDL.Reals.MatrixMax rowMax( final nRow=nSta, final nCol=nChi) "Outputs the row-wise maximum"; Buildings.Controls.OBC.CDL.Reals.MatrixMin rowMin( final nRow=nSta, final nCol=nChi) "Outputs the row-wise minimum"; Buildings.Controls.OBC.CDL.Reals.Multiply mul[nSta] "Output product of the inputs"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant con[nSta]( final k=staInd) "Stage indices"; Buildings.Controls.OBC.CDL.Reals.Multiply mul1[nSta] "Output vector with the elements which equal to either zero or current stage index"; Buildings.Controls.OBC.CDL.Reals.MultiSum curSta( final nin=nSta) "Current stage"; Buildings.Controls.OBC.CDL.Conversions.RealToInteger reaToInt "Convert real to integer signal"; Buildings.Controls.OBC.CDL.Integers.Sources.Constant chiStaMatr[nSta,nChi]( final k=staMat) "Staging matrix"; equation connect(uChi, booVecRep.u); connect(booVecRep.y, booToInt.u); connect(chiStaMatr.y, intEqu.u1); connect(booToInt.y, intEqu.u2); connect(intEqu.y, booToRea.u); connect(booToRea.y,rowMax. u); connect(booToRea.y,rowMin. u); connect(rowMax.y, mul.u1); connect(rowMin.y, mul.u2); connect(mul.y, mul1.u1); connect(con.y, mul1.u2); connect(mul1.y, curSta.u); connect(curSta.y, reaToInt.u); connect(reaToInt.y, ySta); end IdentifyStage;

Buildings.Controls.OBC.ASHRAE.G36.Plants.Chillers.Generic.TimerWithReset Buildings.Controls.OBC.ASHRAE.G36.Plants.Chillers.Generic.TimerWithReset

Timer measuring the time from the time instant where the Boolean input became true

Buildings.Controls.OBC.ASHRAE.G36.Plants.Chillers.Generic.TimerWithReset

Information

This block is similar to Buildings.Controls.OBC.CDL.Logical.Timer, but introduces an additional Boolean input signal reset, which resets the timer. When reset becomes true: y=0 and passed=false.

Parameters

TypeNameDefaultDescription
Realt0Threshold time for comparison [s]

Connectors

TypeNameDescription
input BooleanInputuInput that switches timer on if true, and off if false
input BooleanInputresetReset signal
output RealOutputyElapsed time [s]
output BooleanOutputpassedTrue if the elapsed time is greater than threshold

Modelica definition

block TimerWithReset "Timer measuring the time from the time instant where the Boolean input became true" parameter Real t( final quantity="Time", final unit="s")=0 "Threshold time for comparison"; Buildings.Controls.OBC.CDL.Interfaces.BooleanInput u "Input that switches timer on if true, and off if false"; Buildings.Controls.OBC.CDL.Interfaces.BooleanInput reset "Reset signal"; Buildings.Controls.OBC.CDL.Interfaces.RealOutput y( final quantity="Time", final unit="s") "Elapsed time"; Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput passed "True if the elapsed time is greater than threshold"; protected Buildings.Controls.OBC.CDL.Logical.Edge edg "Reset input edge"; Buildings.Controls.OBC.CDL.Logical.Xor xor "Output true if only one input is true"; Buildings.Controls.OBC.CDL.Logical.Timer tim( final t=t) "Measuring time and check if bolean input has been true more than threshold time"; equation connect(reset, edg.u); connect(edg.y, xor.u2); connect(u, xor.u1); connect(xor.y, tim.u); connect(tim.y, y); connect(tim.passed, passed); end TimerWithReset;