@@ -60,23 +60,15 @@ block Controller
6060 final unit= "1" ,
6161 displayUnit= "1" ,
6262 final min = 0 ,
63- final max = maxPumSpe ) = 0.1
63+ final max = 1 ) = 0.1
6464 "Minimum pump speed"
6565 annotation (Dialog(group="Pump parameters" , enable=have_varPriPum));
6666
67- parameter Real maxPumSpe(
68- final unit= "1" ,
69- displayUnit= "1" ,
70- final min = minPumSpe,
71- final max = 1 ) = 1
72- "Maximum pump speed"
73- annotation (Dialog(group="Pump parameters" , enable=have_varPriPum));
74-
7567 parameter Real VHotWat_flow_nominal(
7668 final min = 1e-6 ,
7769 final unit= "m3/s" ,
7870 displayUnit= "m3/s" ,
79- final quantity= "VolumeFlowRate" )
71+ final quantity= "VolumeFlowRate" ) if have_priOnl and have_heaPriPum and (have_remDPReg or have_locDPReg)
8072 "Total plant design hot water flow rate"
8173 annotation (Dialog(group="Plant parameters" ));
8274
@@ -314,23 +306,23 @@ block Controller
314306 final unit= "Pa" ,
315307 displayUnit= "Pa" ,
316308 final quantity= "PressureDifference" ) if have_priOnl and have_varPriPum
317- and locDPReg
309+ and have_locDPReg
318310 "Hot water differential static pressure from local sensor"
319311 annotation (Placement(transformation(extent={{-320,-460},{-280,-420}}),
320312 iconTransformation(extent={{-140,-70},{-100,-30}})));
321313
322314 Buildings.Controls.OBC.CDL.Interfaces.RealInput dpHotWat_remote[nSen](
323315 final unit= fill ("Pa" , nSen),
324316 final quantity= fill ("PressureDifference" , nSen)) if have_priOnl and
325- have_varPriPum and (locDPReg or remDPReg )
317+ have_varPriPum and (have_locDPReg or have_remDPReg )
326318 "Hot water differential static pressure from remote sensor"
327319 annotation (Placement(transformation(extent={{-320,-500},{-280,-460}}),
328320 iconTransformation(extent={{-140,-100},{-100,-60}})));
329321
330322 Buildings.Controls.OBC.CDL.Interfaces.RealInput dpHotWatSet(
331323 final unit= "Pa" ,
332324 final quantity= "PressureDifference" ) if have_priOnl and have_varPriPum
333- and (locDPReg or remDPReg )
325+ and (have_locDPReg or have_remDPReg )
334326 "Hot water differential static pressure setpoint"
335327 annotation (Placement(transformation(extent={{-320,-530},{-280,-490}}),
336328 iconTransformation(extent={{-140,-130},{-100,-90}})));
@@ -347,7 +339,7 @@ block Controller
347339 final unit= "m3/s" ,
348340 displayUnit= "m3/s" ,
349341 final quantity= "VolumeFlowRate" ) if not have_priOnl and have_varPriPum
350- and floReg and use_priSecFloSen
342+ and have_floReg and use_priSecFloSen
351343 "Measured hot water flowrate through secondary loop"
352344 annotation (Placement(transformation(extent={{-320,-600},{-280,-560}}),
353345 iconTransformation(extent={{-140,-190},{-100,-150}})));
@@ -356,7 +348,7 @@ block Controller
356348 final unit= "m3/s" ,
357349 displayUnit= "m3/s" ,
358350 final quantity= "VolumeFlowRate" ) if not have_priOnl and have_varPriPum
359- and floReg and not use_priSecFloSen
351+ and have_floReg and not use_priSecFloSen
360352 "Measured hot water flowrate through decoupler"
361353 annotation (Placement(transformation(extent={{-320,-630},{-280,-590}}),
362354 iconTransformation(extent={{-140,-220},{-100,-180}})));
@@ -365,7 +357,7 @@ block Controller
365357 final unit= "K" ,
366358 displayUnit= "K" ,
367359 final quantity= "ThermodynamicTemperature" ) if not have_priOnl and
368- have_varPriPum and temReg and use_priTemSen
360+ have_varPriPum and have_temReg and use_priTemSen
369361 "Measured hot water temperature at primary loop supply"
370362 annotation (Placement(transformation(extent={{-320,-660},{-280,-620}}),
371363 iconTransformation(extent={{-140,-250},{-100,-210}})));
@@ -374,7 +366,7 @@ block Controller
374366 final unit= "K" ,
375367 displayUnit= "K" ,
376368 final quantity= "ThermodynamicTemperature" ) if not have_priOnl and
377- have_varPriPum and temReg
369+ have_varPriPum and have_temReg
378370 "Measured hot water temperature at secondary loop supply"
379371 annotation (Placement(transformation(extent={{-320,-690},{-280,-650}}),
380372 iconTransformation(extent={{-140,-280},{-100,-240}})));
@@ -383,13 +375,13 @@ block Controller
383375 final unit= fill ("K" , nBoi),
384376 displayUnit= fill ("K" ,nBoi),
385377 final quantity= fill ("ThermodynamicTemperature" ,nBoi)) if not have_priOnl
386- and have_varPriPum and temReg and not use_priTemSen
378+ and have_varPriPum and have_temReg and not use_priTemSen
387379 "Measured hot water temperature at boiler supply"
388380 annotation (Placement(transformation(extent={{-320,-720},{-280,-680}}),
389381 iconTransformation(extent={{-140,-310},{-100,-270}})));
390382
391383 Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput yHotWatPum[nPum]
392- "Hot water pump status "
384+ "Hot water pump enable signal "
393385 annotation (Placement(transformation(extent={{280,-20},{320,20}}),
394386 iconTransformation(extent={{100,20},{140,60}})));
395387
@@ -420,25 +412,24 @@ block Controller
420412 final minLocDp= minLocDp,
421413 final maxLocDp= maxLocDp,
422414 final minPumSpe= minPumSpe,
423- final maxPumSpe= maxPumSpe,
424415 final k= k,
425416 final Ti= Ti,
426- final Td= Td) if have_priOnl and have_varPriPum and locDPReg
417+ final Td= Td) if have_priOnl and have_varPriPum and have_locDPReg
427418 "Hot water pump speed control with local DP sensor"
428- annotation (Placement(transformation(extent={{-60,-490 },{-40,-470 }})));
419+ annotation (Placement(transformation(extent={{-60,-492 },{-40,-472 }})));
429420
430421protected
431- parameter Boolean remDPReg = (speConTyp == Buildings.Controls.OBC.ASHRAE.G36.Plants.Boilers.Types.PrimaryPumpSpeedControlTypes.remoteDP)
432- "Boolean flag for pump speed control with remote differential pressure" ;
422+ parameter Boolean have_remDPReg = (speConTyp == Buildings.Controls.OBC.ASHRAE.G36.Plants.Boilers.Types.PrimaryPumpSpeedControlTypes.remoteDP)
423+ "Boolean flag for primary pump speed control with remote differential pressure" ;
433424
434- parameter Boolean locDPReg = (speConTyp == Buildings.Controls.OBC.ASHRAE.G36.Plants.Boilers.Types.PrimaryPumpSpeedControlTypes.localDP)
435- "Boolean flag for pump speed control with local differential pressure" ;
425+ parameter Boolean have_locDPReg = (speConTyp == Buildings.Controls.OBC.ASHRAE.G36.Plants.Boilers.Types.PrimaryPumpSpeedControlTypes.localDP)
426+ "Boolean flag for primary pump speed control with local differential pressure" ;
436427
437- parameter Boolean temReg = (speConTyp == Buildings.Controls.OBC.ASHRAE.G36.Plants.Boilers.Types.PrimaryPumpSpeedControlTypes.temperature)
438- "Boolean flag for pump speed control with temperature readings" ;
428+ parameter Boolean have_temReg = (speConTyp == Buildings.Controls.OBC.ASHRAE.G36.Plants.Boilers.Types.PrimaryPumpSpeedControlTypes.temperature)
429+ "Boolean flag for primary pump speed control with temperature readings" ;
439430
440- parameter Boolean floReg = (speConTyp == Buildings.Controls.OBC.ASHRAE.G36.Plants.Boilers.Types.PrimaryPumpSpeedControlTypes.flowrate)
441- "Boolean flag for pump speed control with flowrate readings" ;
431+ parameter Boolean have_floReg = (speConTyp == Buildings.Controls.OBC.ASHRAE.G36.Plants.Boilers.Types.PrimaryPumpSpeedControlTypes.flowrate)
432+ "Boolean flag for primary pump speed control with flowrate readings" ;
442433
443434 parameter Integer pumInd[nPum]= {i for i in 1 :nPum}
444435 "Pump index, {1,2,...,n}" ;
@@ -501,10 +492,9 @@ protected
501492 final nSen= nSen,
502493 final nPum= nPum,
503494 final minPumSpe= minPumSpe,
504- final maxPumSpe= maxPumSpe,
505495 final k= k,
506496 final Ti= Ti,
507- final Td= Td) if have_priOnl and have_varPriPum and remDPReg
497+ final Td= Td) if have_priOnl and have_varPriPum and have_remDPReg
508498 "Hot water pump speed control with remote DP sensor"
509499 annotation (Placement(transformation(extent={{-60,-530},{-40,-510}})));
510500
@@ -514,12 +504,9 @@ protected
514504 final use_priSecSen= use_priSecFloSen,
515505 final nPum= nPum,
516506 final minPumSpe= minPumSpe,
517- final maxPumSpe= maxPumSpe,
518507 final k= k,
519508 final Ti= Ti,
520- final Td= Td,
521- final VHotWat_flow_nominal= VHotWat_flow_nominal) if not have_priOnl and
522- have_varPriPum and floReg
509+ final Td= Td) if not have_priOnl and have_varPriPum and have_floReg
523510 "Pump speed control using flow sensors"
524511 annotation (Placement(transformation(extent={{-60,-574},{-40,-554}})));
525512
@@ -531,7 +518,6 @@ protected
531518 final numIgnReq= numIgnReq,
532519 final boiDesFlo= boiDesFlo,
533520 final minPumSpe= minPumSpe,
534- final maxPumSpe= maxPumSpe,
535521 final delTim= delTim,
536522 final samPer= samPer,
537523 final triAmo= triAmo,
@@ -541,7 +527,7 @@ protected
541527 final twoReqLimHig= twoReqLimHig,
542528 final oneReqLimLow= oneReqLimLow,
543529 final oneReqLimHig= oneReqLimHig) if not have_priOnl and have_varPriPum
544- and temReg "Pump speed control using temperature sensors"
530+ and have_temReg "Pump speed control using temperature sensors"
545531 annotation (Placement(transformation(extent={{-60,-608},{-40,-588}})));
546532
547533 Buildings.Controls.OBC.CDL.Conversions.BooleanToReal booToRea[nBoi] if not have_heaPriPum
@@ -791,15 +777,15 @@ equation
791777 color={0,0,127}));
792778
793779 connect (pumSpeLocDp.dpHotWat_local,dpHotWat_local)
794- annotation (Line(points={{-62,-472 },{-230,-472 },{-230,-440},{-300,-440}},
780+ annotation (Line(points={{-62,-474 },{-230,-474 },{-230,-440},{-300,-440}},
795781 color={0,0,127}));
796782
797783 connect (pumSpeLocDp.dpHotWat_remote,dpHotWat_remote)
798- annotation (Line(points={{-62,-484 },{-200,-484 },{-200,-480},{-300,-480}},
784+ annotation (Line(points={{-62,-486 },{-200,-486 },{-200,-480},{-300,-480}},
799785 color={0,0,127}));
800786
801787 connect (pumSpeLocDp.dpHotWatSet,dpHotWatSet)
802- annotation (Line(points={{-62,-488 },{-220,-488 },{-220,-510},{-300,-510}},
788+ annotation (Line(points={{-62,-490 },{-220,-490 },{-220,-510},{-300,-510}},
803789 color={0,0,127}));
804790
805791 connect (dpHotWat_remote,pumSpeRemDp.dpHotWat)
@@ -924,8 +910,8 @@ equation
924910 connect (pumSpeRemDp.yHotWatPumSpe, max .u2) annotation (Line(points={{-38,-520},
925911 {96,-520},{96,-552},{132,-552}}, color={0,0,127}));
926912
927- connect (pumSpeLocDp.yHotWatPumSpe, max .u2) annotation (Line(points={{-38,-480 },
928- {96,-480 },{96,-552},{132,-552}}, color={0,0,127}));
913+ connect (pumSpeLocDp.yHotWatPumSpe, max .u2) annotation (Line(points={{-38,-482 },
914+ {96,-482 },{96,-552},{132,-552}}, color={0,0,127}));
929915
930916 connect (pumSpeFlo.yHotWatPumSpe, max .u2) annotation (Line(points={{-38,-564},{
931917 96,-564},{96,-552},{132,-552}}, color={0,0,127}));
@@ -1060,8 +1046,9 @@ equation
10601046 {-278,-300},{-278,98},{22,98},{22,106},{56,106}}, color={255,127,0}));
10611047 connect (uLasDisBoi, chaPumSta.uLasLagPum) annotation (Line(points={{-300,-340},
10621048 {-264,-340},{-264,96},{28,96},{28,102},{56,102}}, color={255,127,0}));
1063- connect (uHotWatPum, pumSpeLocDp.uHotWatPum) annotation (Line(points={{-300,140},
1064- {-260,140},{-260,-476},{-62,-476}}, color={255,0,255}));
1049+ connect (uHotWatPum, pumSpeLocDp.uHotWatPum) annotation (Line(points={{-300,
1050+ 140},{-260,140},{-260,-478},{-62,-478}},
1051+ color={255,0,255}));
10651052 connect (uHotWatPum, pumSpeRemDp.uHotWatPum) annotation (Line(points={{-300,140},
10661053 {-260,140},{-260,-512},{-62,-512}}, color={255,0,255}));
10671054 connect (uHotWatPum, pumSpeFlo.uHotWatPum) annotation (Line(points={{-300,140},
0 commit comments