Skip to content

Commit 5d7ac6b

Browse files
Merge branch 'issue2180_BoilerPlant_Nov23' of github.com:karthikeyad-pnnl/modelica-buildings
2 parents 923e4c8 + 2c427b2 commit 5d7ac6b

16 files changed

Lines changed: 548 additions & 637 deletions

File tree

Buildings/Controls/OBC/ASHRAE/G36/Plants/Boilers/Generic/PlantDisable.mo

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ block PlantDisable
4545
iconTransformation(extent={{-140,-20},{-100,20}})));
4646

4747
Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput yBoi[nBoi]
48-
"Boiler enable status vector"
48+
"Boiler enable signal"
4949
annotation (Placement(transformation(extent={{180,30},{220,70}}),
5050
iconTransformation(extent={{100,40},{140,80}})));
5151

Buildings/Controls/OBC/ASHRAE/G36/Plants/Boilers/PrimaryController.mo

Lines changed: 211 additions & 245 deletions
Large diffs are not rendered by default.

Buildings/Controls/OBC/ASHRAE/G36/Plants/Boilers/Pumps/Generic/Speed_localDp.mo

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,9 @@ block Speed_localDp
3030
final unit="1",
3131
displayUnit="1",
3232
final min=0,
33-
final max=maxPumSpe) = 0.1
33+
final max=1) = 0.1
3434
"Minimum pump speed";
3535

36-
parameter Real maxPumSpe(
37-
final unit="1",
38-
displayUnit="1",
39-
final min=minPumSpe,
40-
final max=1) = 1
41-
"Maximum pump speed";
42-
4336
parameter Real k=1
4437
"Gain of controller"
4538
annotation(Dialog(group="Speed controller"));
@@ -88,7 +81,7 @@ block Speed_localDp
8881

8982
Buildings.Controls.OBC.CDL.Interfaces.RealOutput yHotWatPumSpe(
9083
final min=minPumSpe,
91-
final max=maxPumSpe,
84+
final max=1,
9285
final unit="1")
9386
"Hot water pump speed"
9487
annotation (Placement(transformation(extent={{140,70},{180,110}}),
@@ -108,7 +101,6 @@ block Speed_localDp
108101
final nSen=1,
109102
final nPum=nPum,
110103
final minPumSpe=minPumSpe,
111-
final maxPumSpe=maxPumSpe,
112104
final k=k,
113105
final Ti=Ti,
114106
final Td=Td)
@@ -292,7 +284,7 @@ When any pump is proven on, pump speed shall be controlled by a reverse acting
292284
PID loop maintaining the local dP <code>dpHotWat_local</code> at the DP setpoint output
293285
from the remote sensor control loop. All pumps receive the same speed signal.
294286
PID loop output shall be mapped from minimum pump speed (<code>minPumSpe</code>)
295-
at 0% to maximum pump speed (<code>maxPumSpe</code>) at 100%.
287+
at 0% to maximum pump speed at 100%.
296288
</li>
297289
<li>
298290
Where multiple remote DP sensors exist, a PID loop shall run for each sensor.

Buildings/Controls/OBC/ASHRAE/G36/Plants/Boilers/Pumps/Generic/Speed_remoteDp.mo

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,6 @@ block Speed_remoteDp
1515
parameter Real minPumSpe = 0.1
1616
"Minimum pump speed";
1717

18-
parameter Real maxPumSpe = 1
19-
"Maximum pump speed";
20-
2118
parameter Real k=1
2219
"Gain of controller"
2320
annotation(Dialog(group="Speed controller"));
@@ -61,7 +58,7 @@ block Speed_remoteDp
6158

6259
Buildings.Controls.OBC.CDL.Interfaces.RealOutput yHotWatPumSpe(
6360
final min=minPumSpe,
64-
final max=maxPumSpe,
61+
final max=1,
6562
final unit="1",
6663
displayUnit="1")
6764
"Hot water pump speed"
@@ -113,7 +110,7 @@ protected
113110
annotation (Placement(transformation(extent={{-80,70},{-60,90}})));
114111

115112
Buildings.Controls.OBC.CDL.Reals.Sources.Constant pumSpe_max(
116-
final k=maxPumSpe)
113+
final k=1)
117114
"Maximum pump speed"
118115
annotation (Placement(transformation(extent={{-20,30},{0,50}})));
119116

@@ -244,8 +241,7 @@ When any hot water pump is proven on, <code>uHotWatPum = true</code>,
244241
pump speed will be controlled by a reverse acting PID loop maintaining the
245242
differential pressure signal at a setpoint <code>dpHotWatSet</code>. All pumps
246243
receive the same speed signal. PID loop output shall be mapped from minimum
247-
pump speed (<code>minPumSpe</code>) at 0% to maximum pump speed
248-
(<code>maxPumSpe</code>) at 100%.
244+
pump speed (<code>minPumSpe</code>) at 0% to maximum pump speed at 100%.
249245
</li>
250246
<li>
251247
Where multiple differential pressure sensors exist, a PID loop shall run for

Buildings/Controls/OBC/ASHRAE/G36/Plants/Boilers/Pumps/PrimaryPumps/Controller.mo

Lines changed: 32 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -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

430421
protected
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

Comments
 (0)