Buildings.Templates.Plants.Controls.StagingRotation.Validation

Collection of validation models

Information

This package contains validation models.

Package Content

Name Description
Buildings.Templates.Plants.Controls.StagingRotation.Validation.EquipmentAvailability EquipmentAvailability Validation model for the evaluation of equipment availability
Buildings.Templates.Plants.Controls.StagingRotation.Validation.EquipmentEnable EquipmentEnable Validation model for equipment enable logic
Buildings.Templates.Plants.Controls.StagingRotation.Validation.EventSequencing EventSequencing Validation model for event sequencing logic
Buildings.Templates.Plants.Controls.StagingRotation.Validation.FailsafeCondition FailsafeCondition Validation model for failsafe staging logic
Buildings.Templates.Plants.Controls.StagingRotation.Validation.LoadAverage LoadAverage Validation model for heating and cooling load calculation
Buildings.Templates.Plants.Controls.StagingRotation.Validation.SortRuntime SortRuntime Validation model for equipment runtime sorting logic
Buildings.Templates.Plants.Controls.StagingRotation.Validation.StageAvailability StageAvailability Validation model for the evaluation of stage availability
Buildings.Templates.Plants.Controls.StagingRotation.Validation.StageChangeCommand StageChangeCommand Validation model for stage change logic
Buildings.Templates.Plants.Controls.StagingRotation.Validation.StageCompletion StageCompletion Validation model for the evaluation of stage completion

Buildings.Templates.Plants.Controls.StagingRotation.Validation.EquipmentAvailability Buildings.Templates.Plants.Controls.StagingRotation.Validation.EquipmentAvailability

Validation model for the evaluation of equipment availability

Buildings.Templates.Plants.Controls.StagingRotation.Validation.EquipmentAvailability

Information

This model validates Buildings.Templates.Plants.Controls.StagingRotation.EquipmentAvailability for heating-only applications (component avaHeaCoo) and heating and cooling applications (component avaHea).

Modelica definition

model EquipmentAvailability "Validation model for the evaluation of equipment availability" Buildings.Templates.Plants.Controls.StagingRotation.EquipmentAvailability avaHeaCoo(have_heaWat=true, have_chiWat=true) "Evaluate equipment availability – Heating and cooling"; Buildings.Controls.OBC.CDL.Logical.Sources.TimeTable u1Ava( table=[ 0, 1; 8, 0; 9, 1], timeScale=1000, period=10000) "Equipment available signal"; Buildings.Controls.OBC.CDL.Logical.Sources.TimeTable u1_actual( table=[ 0, 1; 1, 0; 2.5, 1; 4.2, 0; 5, 1; 7, 1; 8, 0; 9, 1], timeScale=1000, period=10000) "Equipment status"; Buildings.Controls.OBC.CDL.Logical.Sources.TimeTable u1Hea_actual( table=[ 0, 1; 1, 1; 2, 1; 5, 0; 8.5, 1; 9.7, 0], timeScale=1000, period=10000) "Equipment operating mode"; Buildings.Templates.Plants.Controls.StagingRotation.EquipmentAvailability avaHea(have_heaWat=true, have_chiWat=false) "Evaluate equipment availability – Heating only"; equation connect(u1Hea_actual.y[1], avaHeaCoo.u1Hea); connect(u1_actual.y[1], avaHeaCoo.u1); connect(u1_actual.y[1], avaHea.u1); connect(u1Ava.y[1], avaHeaCoo.u1Ava); connect(u1Ava.y[1], avaHea.u1Ava); end EquipmentAvailability;

Buildings.Templates.Plants.Controls.StagingRotation.Validation.EquipmentEnable Buildings.Templates.Plants.Controls.StagingRotation.Validation.EquipmentEnable

Validation model for equipment enable logic

Buildings.Templates.Plants.Controls.StagingRotation.Validation.EquipmentEnable

Information

This model validates Buildings.Templates.Plants.Controls.StagingRotation.EquipmentEnable in a configuration with three equally sized units (component equEnaEqu) and in a configuration with one small unit and two large equally sized units (component equEnaOneTwo). Only the units of the same size are lead/lag alternated.

Modelica definition

model EquipmentEnable "Validation model for equipment enable logic" Buildings.Controls.OBC.CDL.Logical.Sources.TimeTable u1AvaEqu( table=[ 0, 1, 1, 1; 6, 0, 0, 1; 8, 0, 1, 1; 10, 1, 0, 1; 15, 1, 1, 0; 18, 0, 1, 1; 22, 1, 1, 1], timeScale=1, period=25) "Equipment available signal"; Buildings.Templates.Plants.Controls.StagingRotation.EquipmentEnable equEnaOneTwo( staEqu=[ 1, 0, 0; 0, 1 / 2, 1 / 2; 1, 1 / 2, 1 / 2; 0, 1, 1; 1, 1, 1]) "Compute array of enabled equipment – One small equipment, two large equally sized equipment"; Buildings.Controls.OBC.CDL.Integers.Sources.TimeTable uSta( table=[ 0, 1; 5, 2; 10, 3; 15, 4; 20, 5], timeScale=1, period=25) "Stage index"; Buildings.Templates.Plants.Controls.StagingRotation.EquipmentEnable equEnaEqu( staEqu=[ 1 / 3, 1 / 3, 1 / 3; 2 / 3, 2 / 3, 2 / 3; 1, 1, 1]) "Compute array of enabled equipment – Equally sized units"; Buildings.Controls.OBC.CDL.Integers.Sources.TimeTable uSta1( table=[ 0, 1; 10, 2; 20, 3], timeScale=1, period=25) "Stage index"; Buildings.Controls.OBC.CDL.Conversions.BooleanToReal booToRea[3] "Cast to real"; Buildings.Controls.OBC.CDL.Reals.Sort sort( ascending=false, nin=3) "Sort lead/lag alternate equipment with available equipment first"; Buildings.Controls.OBC.CDL.Conversions.BooleanToReal booToRea1[2] "Cast to real"; Buildings.Controls.OBC.CDL.Reals.Sort sort1( ascending=false, nin=2) "Sort lead/lag alternate equipment with available equipment first"; Buildings.Controls.OBC.CDL.Integers.AddParameter addPar[2]( each final p=1) "Restore indices with respect to original vector u1AvaEqu"; equation connect(u1AvaEqu.y, equEnaOneTwo.u1Ava); connect(uSta.y[1], equEnaOneTwo.uSta); connect(uSta1.y[1], equEnaEqu.uSta); connect(u1AvaEqu.y, equEnaEqu.u1Ava); connect(u1AvaEqu.y, booToRea.u); connect(booToRea.y, sort.u); connect(sort.yIdx, equEnaEqu.uIdxAltSor); connect(u1AvaEqu.y[2:3], booToRea1.u); connect(booToRea1.y, sort1.u); connect(sort1.yIdx, addPar.u); connect(addPar.y, equEnaOneTwo.uIdxAltSor); end EquipmentEnable;

Buildings.Templates.Plants.Controls.StagingRotation.Validation.EventSequencing Buildings.Templates.Plants.Controls.StagingRotation.Validation.EventSequencing

Validation model for event sequencing logic

Buildings.Templates.Plants.Controls.StagingRotation.Validation.EventSequencing

Information

This model validates Buildings.Templates.Plants.Controls.StagingRotation.EventSequencing for the following configurations.

Modelica definition

model EventSequencing "Validation model for event sequencing logic" Buildings.Templates.Plants.Controls.StagingRotation.EventSequencing seqEveHea( have_heaWat=true, have_chiWat=false, have_valInlIso=true, have_valOutIso=false, have_pumHeaWatPri=true, have_pumHeaWatSec=true) "Event sequencing – Heating-only system with primary-secondary distribution"; Buildings.Controls.OBC.CDL.Logical.Sources.TimeTable u1( table=[0,0,0; 1,1,0; 2,0,0; 3,0,1; 4,0,0; 5,0,0], timeScale=900, period=4500) "Command signal – Index 1 for heating command, 2 for cooling command"; Buildings.Templates.Plants.Controls.StagingRotation.EventSequencing seqEveHeaCoo( have_heaWat=true, have_chiWat=true, have_valInlIso=true, have_valOutIso=true, have_pumHeaWatPri=true, have_pumChiWatPri=false, have_pumHeaWatSec=false, have_pumChiWatSec=false) "Event sequencing – Heating and cooling system with primary-only distribution"; Components.Controls.StatusEmulator y1Pum_actual "Pump Status"; Components.Controls.StatusEmulator y1Pum_actual1 "Pump Status"; equation connect(u1.y[1], seqEveHea.u1Hea); connect(u1.y[1], seqEveHea.u1PumHeaWatSec_actual); connect(u1.y[1], seqEveHeaCoo.u1Hea); connect(u1.y[2], seqEveHeaCoo.u1Coo); connect(seqEveHea.y1PumHeaWatPri, y1Pum_actual.y1); connect(y1Pum_actual.y1_actual, seqEveHea.u1PumHeaWatPri_actual); connect(seqEveHeaCoo.y1PumHeaWatPri, y1Pum_actual1.y1); connect(y1Pum_actual1.y1_actual, seqEveHeaCoo.u1PumHeaWatPri_actual); end EventSequencing;

Buildings.Templates.Plants.Controls.StagingRotation.Validation.FailsafeCondition Buildings.Templates.Plants.Controls.StagingRotation.Validation.FailsafeCondition

Validation model for failsafe staging logic

Buildings.Templates.Plants.Controls.StagingRotation.Validation.FailsafeCondition

Information

This model validates Buildings.Templates.Plants.Controls.StagingRotation.FailsafeCondition for the following configurations.

Modelica definition

model FailsafeCondition "Validation model for failsafe staging logic" Buildings.Templates.Plants.Controls.StagingRotation.FailsafeCondition faiSafHea( typ=Buildings.Templates.Plants.Controls.Types.Application.Heating, have_pumSec=true, dT=2.5) "Failsafe stage up condition for heating applications"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant THeaWatSupSet( k=60 + 273.15) "HWST setpoint"; Buildings.Controls.OBC.CDL.Reals.Sources.Sin THeaWatPriSup( amplitude=5, freqHz=1 / 3000, offset=THeaWatSupSet.k) "PHWST"; Buildings.Controls.OBC.CDL.Reals.Sources.Sin THeaWatSecSup( amplitude=5, freqHz=1 / 3000, phase=1.7453292519943, offset=THeaWatSupSet.k) "SHWST"; Buildings.Controls.OBC.CDL.Logical.Sources.Pulse booPul( width=1 / 2000, period=2000, shift=100) "Reset"; Buildings.Templates.Plants.Controls.StagingRotation.FailsafeCondition faiSafCooPri( typ=Buildings.Templates.Plants.Controls.Types.Application.Cooling, have_pumSec=false, dT=1) "Failsafe stage up condition – Cooling application, primary-only"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant TChiWatSupSet( k=7 + 273.15) "CHWST setpoint"; Buildings.Controls.OBC.CDL.Reals.Sources.Sin TChiWatPriSup( amplitude=3, freqHz=1 / 3000, offset=TChiWatSupSet.k) "PCHWST"; Buildings.Controls.OBC.CDL.Reals.Sources.Sin TChiWatSecSup( amplitude=3, freqHz=1 / 3000, phase=1.7453292519943, offset=TChiWatSupSet.k) "SCHWST"; Buildings.Templates.Plants.Controls.StagingRotation.FailsafeCondition faiSafCoo( typ=Buildings.Templates.Plants.Controls.Types.Application.Cooling, have_pumSec=true, dT=1) "Failsafe stage up condition – Cooling application"; equation connect(THeaWatSupSet.y, faiSafHea.TSupSet); connect(THeaWatPriSup.y, faiSafHea.TPriSup); connect(THeaWatSecSup.y, faiSafHea.TSecSup); connect(booPul.y, faiSafHea.reset); connect(TChiWatSupSet.y, faiSafCooPri.TSupSet); connect(TChiWatPriSup.y, faiSafCooPri.TPriSup); connect(booPul.y, faiSafCooPri.reset); connect(TChiWatSupSet.y, faiSafCoo.TSupSet); connect(booPul.y, faiSafCoo.reset); connect(TChiWatPriSup.y, faiSafCoo.TPriSup); connect(TChiWatSecSup.y, faiSafCoo.TSecSup); end FailsafeCondition;

Buildings.Templates.Plants.Controls.StagingRotation.Validation.LoadAverage Buildings.Templates.Plants.Controls.StagingRotation.Validation.LoadAverage

Validation model for heating and cooling load calculation

Buildings.Templates.Plants.Controls.StagingRotation.Validation.LoadAverage

Information

This model validates Buildings.Templates.Plants.Controls.StagingRotation.LoadAverage for heating and cooling applications.

Modelica definition

model LoadAverage "Validation model for heating and cooling load calculation" Buildings.Templates.Plants.Controls.StagingRotation.LoadAverage loaHea( typ=Buildings.Templates.Plants.Controls.Types.Application.Heating, cp_default=4186, rho_default=1000) "Calculate heating load"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant THeaWatSupSet( k=60 + 273.15) "HWST setpoint"; Buildings.Controls.OBC.CDL.Reals.Sources.Sin THeaWatRet( amplitude=10, freqHz=2 / 3000, phase=3.1415926535898, offset=THeaWatSupSet.k) "HWRT"; Buildings.Controls.OBC.CDL.Reals.Sources.Ramp V_flow( height=- 0.1, duration=100, offset=0.1, startTime=1200) "Volume flow rate"; Buildings.Templates.Plants.Controls.StagingRotation.LoadAverage loaCoo( typ=Buildings.Templates.Plants.Controls.Types.Application.Cooling, cp_default=4186, rho_default=1000) "Calculate cooling load"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant TChiWatSupSet( k=7 + 273.15) "CHWST setpoint"; Buildings.Controls.OBC.CDL.Reals.Sources.Sin TChiWatRet( amplitude=5, freqHz=2 / 3000, phase=3.1415926535898, offset=TChiWatSupSet.k) "CHWRT"; equation connect(THeaWatSupSet.y, loaHea.TSupSet); connect(TChiWatSupSet.y, loaCoo.TSupSet); connect(THeaWatRet.y, loaHea.TRet); connect(V_flow.y, loaHea.V_flow); connect(TChiWatRet.y, loaCoo.TRet); connect(V_flow.y, loaCoo.V_flow); end LoadAverage;

Buildings.Templates.Plants.Controls.StagingRotation.Validation.SortRuntime Buildings.Templates.Plants.Controls.StagingRotation.Validation.SortRuntime

Validation model for equipment runtime sorting logic

Buildings.Templates.Plants.Controls.StagingRotation.Validation.SortRuntime

Information

The simulation shows that even wear is achieved among available equipment. When it becomes unavailable, equipment #1 is sent to last position (sorRunTim.yIdx[3]=1), and automatically moves up in the staging order only if another equipment (#3) becomes unavailable (sorRunTim.yIdx[3]=3 and sorRunTim.yIdx[2]=1).

We can verify that no equipment gets "hot swapped".

Modelica definition

model SortRuntime "Validation model for equipment runtime sorting logic" Buildings.Templates.Plants.Controls.StagingRotation.SortRuntime sorRunTim(nin=3) "Sort runtime"; Utilities.TrueArrayConditional u1Ena( nin=3) "Equipment enable signal"; Buildings.Controls.OBC.CDL.Logical.Sources.TimeTable u1AvaEqu( table=[0,1,1,1; 1500,0,1,1; 2500,0,1,0; 3000,1,1,1], timeScale=1, period=5000) "Equipment available signal"; Utilities.StageIndex idxSta( nSta=3, dtRun=60); Buildings.Controls.OBC.CDL.Logical.Sources.Constant u1Lea( k=true) "Lead equipment enable signal"; Buildings.Controls.OBC.CDL.Logical.Sources.SampleTrigger upPul( period=60) "Stage up command pulse"; Buildings.Controls.OBC.CDL.Logical.Sources.SampleTrigger dowPul( period=60) "Stage down command pulse"; Buildings.Controls.OBC.CDL.Logical.Sources.TimeTable booTimTab( table=[ 0, 0, 0; 60, 1, 0; 300, 0, 1], period=500) "Signal to inhibit up and down commands"; Buildings.Controls.OBC.CDL.Logical.And up "Stage up command"; Buildings.Controls.OBC.CDL.Logical.And dow "Stage up command"; Buildings.Controls.OBC.CDL.Logical.Sources.Constant u1AvaSta[3]( each k=true) "Stage available signal"; Buildings.Controls.OBC.CDL.Logical.And run[3] "Returns true if equipment is enabled and available"; Components.Controls.StatusEmulator y1_actual[3] "Equipment status"; equation connect(sorRunTim.yIdx, u1Ena.uIdx); connect(u1AvaEqu.y[1:3], sorRunTim.u1Ava[1:3]); connect(u1Lea.y, idxSta.u1Lea); connect(upPul.y, up.u2); connect(booTimTab.y[2], dow.u1); connect(booTimTab.y[1], up.u1); connect(dowPul.y, dow.u2); connect(up.y, idxSta.u1Up); connect(dow.y, idxSta.u1Dow); connect(u1AvaSta.y, idxSta.u1AvaSta); connect(idxSta.y, u1Ena.u); connect(u1Ena.y1, run.u1); connect(u1AvaEqu.y[1:3], run.u2); connect(run.y, y1_actual.y1); connect(y1_actual.y1_actual, sorRunTim.u1Run); end SortRuntime;

Buildings.Templates.Plants.Controls.StagingRotation.Validation.StageAvailability Buildings.Templates.Plants.Controls.StagingRotation.Validation.StageAvailability

Validation model for the evaluation of stage availability

Buildings.Templates.Plants.Controls.StagingRotation.Validation.StageAvailability

Information

This model validates Buildings.Templates.Plants.Controls.StagingRotation.StageAvailability in a configuration with three equally sized units (component avaStaEqu) and in a configuration with one small unit and two large equally sized units (component avaStaOneTwo). Only the units of the same size are lead/lag alternated.

Modelica definition

model StageAvailability "Validation model for the evaluation of stage availability" Buildings.Controls.OBC.CDL.Logical.Sources.TimeTable u1AvaEqu( table=[ 0, 0, 0, 0; 1, 1, 0, 0; 2, 0, 1, 0; 3, 0, 0, 1; 4, 1, 1, 0; 5, 0, 1, 1; 6, 1, 1, 1; 7, 0, 0, 0], timeScale=1, period=7) "Equipment available signal"; Buildings.Templates.Plants.Controls.StagingRotation.StageAvailability avaStaEqu( staEqu=[ 1 / 3, 1 / 3, 1 / 3; 2 / 3, 2 / 3, 2 / 3; 1, 1, 1]) "Compute stage availability – Equally sized units"; Buildings.Templates.Plants.Controls.StagingRotation.StageAvailability avaStaOneTwo( staEqu=[ 1, 0, 0; 0, 1 / 2, 1 / 2; 1, 1 / 2, 1 / 2; 0, 1, 1; 1, 1, 1]) "Compute stage availability – One small equipment, two large equally sized equipment"; equation connect(u1AvaEqu.y, avaStaEqu.u1Ava); connect(u1AvaEqu.y, avaStaOneTwo.u1Ava); end StageAvailability;

Buildings.Templates.Plants.Controls.StagingRotation.Validation.StageChangeCommand Buildings.Templates.Plants.Controls.StagingRotation.Validation.StageChangeCommand

Validation model for stage change logic

Buildings.Templates.Plants.Controls.StagingRotation.Validation.StageChangeCommand

Information

This model validates Buildings.Templates.Plants.Controls.StagingRotation.StageChangeCommand in a configuration with one small unit and two large equally sized units (component avaStaOneTwo). In response to a varying flow rate, the variation of the required capacity chaSta.capReq.y triggers stage change events. The block Buildings.Templates.Plants.Controls.Utilities.StageIndex is used to illustrate how these events translate into a varying plant stage index idxSta.y.

Parameters

TypeNameDefaultDescription
Configuration
Realcp_default4184Default specific heat capacity [J/(kg.K)]
Realrho_default996Default specific heat capacity [kg/m3]
Nominal condition
RealTHeaWatSup_nominal50 + 273.15Design HW supply temperature [K]
RealVHeaWat_flow_nominalcapHea_nominal/(THeaWatSup_n...Design primary HW volume flow rate [m3/s]

Modelica definition

model StageChangeCommand "Validation model for stage change logic" parameter Real cp_default( final unit="J/(kg.K)")=4184 "Default specific heat capacity"; parameter Real rho_default( final unit="kg/m3")=996 "Default specific heat capacity"; final parameter Real capHea_nominal( final unit="W")=sum(chaSta.capEqu) "Installed heating capacity"; parameter Real THeaWatSup_nominal( final unit="K", displayUnit="degC")=50 + 273.15 "Design HW supply temperature"; final parameter Real THeaWatRet_nominal( final unit="K", displayUnit="degC")=42 + 273.15 "Design HW return temperature"; parameter Real VHeaWat_flow_nominal( final unit="m3/s")=capHea_nominal /(THeaWatSup_nominal - THeaWatRet_nominal) / cp_default / rho_default "Design primary HW volume flow rate"; final parameter Integer nSta=size(chaSta.staEqu, 1) "Number of stages"; Buildings.Controls.OBC.CDL.Reals.Sources.TimeTable ratV_flow( table=[ 0, 0; 1, 0; 5, 0.2; 6, 0.01; 11, 1; 12, 1; 18, 0], timeScale=1000) "Source signal for volume flow rate ratio"; Buildings.Templates.Plants.Controls.StagingRotation.StageChangeCommand chaSta( typ=Buildings.Templates.Plants.Controls.Types.Application.Heating, have_pumSec=false, plrSta=0.9, staEqu=[1,0,0; 0,1/2,1/2; 1,1/2,1/2; 0,1,1; 1,1,1], capEqu=1E3*{100,450,450}, cp_default=cp_default, rho_default=rho_default, dT=2.5) "Generate stage change command"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant TSupSet( final k=THeaWatSup_nominal) "HWST setpoint"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant TRet( final k=THeaWatRet_nominal) "HWRT"; Utilities.StageIndex idxSta( final nSta=nSta, dtRun=900) "Compute stage index"; Buildings.Controls.OBC.CDL.Logical.Sources.Constant u1Lea( k=true) "Lead equipment enable signal"; Buildings.Controls.OBC.CDL.Logical.Sources.Constant u1AvaSta[nSta]( each k=true) "Stage available signal"; Buildings.Controls.OBC.CDL.Logical.TrueFalseHold y1UpHol( final falseHoldDuration=0, trueHoldDuration=1) "Hold stage up command for plotting"; Buildings.Controls.OBC.CDL.Logical.TrueFalseHold y1DowHol( final falseHoldDuration=0, trueHoldDuration=1) "Hold stage down command for plotting"; Buildings.Controls.OBC.CDL.Reals.MultiplyByParameter V_flow( final k=VHeaWat_flow_nominal) "Scale by design flow"; Buildings.Templates.Plants.Controls.StagingRotation.EquipmentEnable enaEqu( final staEqu=chaSta.staEqu) "Enable equipment"; Buildings.Controls.OBC.CDL.Integers.Sources.Constant idxEquLeaLag[2]( final k={2, 3}) "Indices of lead/lag equipment"; Buildings.Controls.OBC.CDL.Logical.Sources.Constant u1AvaEqu[3]( each final k=true) "Equipment available signal"; Components.Controls.StatusEmulator staEqu[3]( each delayTime=15) "Evaluate equipment status"; Buildings.Templates.Plants.Controls.StagingRotation.StageCompletion comSta( nin=3) "Check completion of stage change"; equation connect(TRet.y, chaSta.TRet); connect(TSupSet.y, chaSta.TSupSet); connect(chaSta.y1Up, idxSta.u1Up); connect(chaSta.y1Dow, idxSta.u1Dow); connect(u1Lea.y, idxSta.u1Lea); connect(u1AvaSta.y, idxSta.u1AvaSta); connect(idxSta.y, chaSta.uSta); connect(chaSta.y1Up, y1UpHol.u); connect(chaSta.y1Dow, y1DowHol.u); connect(u1AvaSta.y, chaSta.u1AvaSta); connect(ratV_flow.y[1], V_flow.u); connect(V_flow.y, chaSta.V_flow); connect(idxSta.y, enaEqu.uSta); connect(idxEquLeaLag.y, enaEqu.uIdxAltSor); connect(u1AvaEqu.y, enaEqu.u1Ava); connect(enaEqu.y1, staEqu.y1); connect(comSta.y1, chaSta.u1StaPro); connect(enaEqu.y1, comSta.u1); connect(staEqu.y1_actual, comSta.u1_actual); connect(idxSta.y, comSta.uSta); connect(TSupSet.y, chaSta.TPriSup); end StageChangeCommand;

Buildings.Templates.Plants.Controls.StagingRotation.Validation.StageCompletion Buildings.Templates.Plants.Controls.StagingRotation.Validation.StageCompletion

Validation model for the evaluation of stage completion

Buildings.Templates.Plants.Controls.StagingRotation.Validation.StageCompletion

Information

This model validates Buildings.Templates.Plants.Controls.StagingRotation.StageCompletion in a configuration with one small unit and two large equally sized units (component avaStaOneTwo). In response to a varying flow rate, the variation of the required capacity chaSta.capReq.y triggers stage change events. The block Buildings.Templates.Plants.Controls.Utilities.StageIndex is used to illustrate how these events translate into a varying plant stage index idxSta.y.

Modelica definition

model StageCompletion "Validation model for the evaluation of stage completion" Buildings.Templates.Plants.Controls.StagingRotation.StageCompletion comSta( nin=2) "Check successful completion of stage change"; Buildings.Controls.OBC.CDL.Logical.Sources.TimeTable booTimTab( table=[ 0, 0, 0, 0, 0; 1, 0, 0, 0, 0; 3, 1, 0, 0, 0; 6, 1, 0, 1, 0; 21, 1, 0, 1, 0; 22, 0, 0, 1, 0; 24, 0, 0, 0, 0], timeScale=60, period=1800) "Source for Boolean signals"; Buildings.Controls.OBC.CDL.Logical.TrueFalseHold y1ComSta( final falseHoldDuration=0, trueHoldDuration=1) "Hold stage completion signal for plotting"; Buildings.Controls.OBC.CDL.Integers.Sources.TimeTable idxSta( table=[ 0, 0; 1, 1; 21, 0], timeScale=60, period=1800) "Stage index"; initial equation Modelica.Utilities.Streams.print("At initialization: comSta.y1End = " + String(comSta.y1End)); equation when initial() then Modelica.Utilities.Streams.print("When initial(): comSta.y1End = " + String(comSta.y1End)); end when; connect(comSta.y1End, y1ComSta.u); connect(booTimTab.y[1:2], comSta.u1[1:2]); connect(booTimTab.y[3:4], comSta.u1_actual[1:2]); connect(idxSta.y[1], comSta.uSta); end StageCompletion;