Skip to content

Commit 3f6504e

Browse files
committed
used status emulators in open loop validation model
1 parent 8879d0d commit 3f6504e

1 file changed

Lines changed: 52 additions & 57 deletions

File tree

  • Buildings/Controls/OBC/ASHRAE/G36/Plants/Chillers/Validation

Buildings/Controls/OBC/ASHRAE/G36/Plants/Chillers/Validation/Controller.mo

Lines changed: 52 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -98,16 +98,6 @@ model Controller "Validation head pressure controller"
9898
annotation (Placement(transformation(extent={{-240,160},{-220,180}})));
9999
Buildings.Controls.OBC.CDL.Reals.Multiply pro1[2] "Chiller cooling load"
100100
annotation (Placement(transformation(extent={{-200,-138},{-180,-118}})));
101-
Buildings.Controls.OBC.CDL.Logical.Pre chiOneSta
102-
"Chiller one status"
103-
annotation (Placement(transformation(extent={{140,130},{160,150}})));
104-
Buildings.Controls.OBC.CDL.Logical.Pre chiTwoSta
105-
"Chiller two status"
106-
annotation (Placement(transformation(extent={{140,80},{160,100}})));
107-
Buildings.Controls.OBC.CDL.Logical.Pre towSta1[2](
108-
final pre_u_start=fill(false, 2))
109-
"Tower cell status"
110-
annotation (Placement(transformation(extent={{120,-180},{140,-160}})));
111101
Buildings.Controls.OBC.CDL.Reals.Sources.Ramp watLev(
112102
final height=1.2,
113103
final duration=3600,
@@ -121,10 +111,6 @@ model Controller "Validation head pressure controller"
121111
final samplePeriod=fill(5, 2))
122112
"Output the input signal with a zero order hold"
123113
annotation (Placement(transformation(extent={{200,40},{220,60}})));
124-
Buildings.Controls.OBC.CDL.Logical.Pre conWatPum[2](
125-
final pre_u_start=fill(false, 2))
126-
"Condenser water pump status setpoint"
127-
annotation (Placement(transformation(extent={{160,-50},{180,-30}})));
128114
Buildings.Controls.OBC.CDL.Discrete.ZeroOrderHold zerOrdHol2[2](
129115
final samplePeriod=fill(5, 2))
130116
"Output the input signal with a zero order hold"
@@ -155,17 +141,22 @@ model Controller "Validation head pressure controller"
155141
extrapolation=Buildings.Controls.OBC.CDL.Types.Extrapolation.HoldLastPoint)
156142
"Time table with smoothness method of constant segments"
157143
annotation (Placement(transformation(extent={{-300,-210},{-280,-190}})));
144+
Buildings.Templates.Components.Controls.StatusEmulator chiOne "Chiller one status"
145+
annotation (Placement(transformation(extent={{140,170},{160,190}})));
146+
Buildings.Templates.Components.Controls.StatusEmulator chiTwo "Chiller two status"
147+
annotation (Placement(transformation(extent={{140,110},{160,130}})));
148+
Buildings.Templates.Components.Controls.StatusEmulator conWatPum[2]
149+
"Condenser water pump status setpoint"
150+
annotation (Placement(transformation(extent={{140,-10},{160,10}})));
151+
Buildings.Templates.Components.Controls.StatusEmulator towSta[2] "Tower cell status"
152+
annotation (Placement(transformation(extent={{120,-180},{140,-160}})));
158153
equation
159154
connect(chiPlaCon.uChiWatPum, uChiWatPum.y) annotation (Line(points={{-30,180},
160155
{-190,180},{-190,132},{-238,132}}, color={255,0,255}));
161156
connect(timTabLin1.y[1], reaToInt1.u)
162157
annotation (Line(points={{-298,-70},{-282,-70}}, color={0,0,127}));
163158
connect(reaToInt1.y, chiPlaCon.TChiWatSupResReq) annotation (Line(points={{-258,
164159
-70},{-100,-70},{-100,-50},{-30,-50}}, color={255,127,0}));
165-
connect(chiPlaCon.yChi[1], chiOneSta.u) annotation (Line(points={{90,97.5},{120,
166-
97.5},{120,140},{138,140}}, color={255,0,255}));
167-
connect(chiPlaCon.yChi[2], chiTwoSta.u) annotation (Line(points={{90,102.5},{114,
168-
102.5},{114,90},{138,90}}, color={255,0,255}));
169160
connect(uChiAva.y, chiPlaCon.uChiAva) annotation (Line(points={{-218,-50},{-124,
170161
-50},{-124,5},{-30,5}}, color={255,0,255}));
171162
connect(phi.y, chiPlaCon.phi) annotation (Line(points={{-278,60},{-150,60},{-150,
@@ -188,20 +179,10 @@ equation
188179
{106,-97.5},{106,-146},{118,-146}},color={0,0,127}));
189180
connect(chiPlaCon.yTowFanSpe[1], max1.u1) annotation (Line(points={{90,-102.5},
190181
{112,-102.5},{112,-134},{118,-134}}, color={0,0,127}));
191-
connect(chiPlaCon.yTowCel, towSta1.u) annotation (Line(points={{90,-85},{96,-85},
192-
{96,-170},{118,-170}}, color={255,0,255}));
193-
connect(towSta1.y, chiPlaCon.uTowSta) annotation (Line(points={{142,-170},{160,
194-
-170},{160,-190},{-40,-190},{-40,-170},{-30,-170}}, color={255,0,255}));
195182
connect(chiPlaCon.yTowCelIsoVal, zerOrdHol.u) annotation (Line(points={{90,-70},
196-
{100,-70},{100,-90},{118,-90}}, color={0,0,127}));
183+
{110,-70},{110,-90},{118,-90}}, color={0,0,127}));
197184
connect(zerOrdHol.y, chiPlaCon.uIsoVal) annotation (Line(points={{142,-90},{
198185
190,-90},{190,-210},{-70,-210},{-70,-150},{-30,-150}}, color={0,0,127}));
199-
connect(chiPlaCon.yConWatPum, conWatPum.u) annotation (Line(points={{90,20},{
200-
108,20},{108,-40},{158,-40}}, color={255,0,255}));
201-
connect(conWatPum.y, chiPlaCon.uConWatPum) annotation (Line(points={{182,-40},
202-
{210,-40},{210,-230},{-100,-230},{-100,-90},{-30,-90}}, color={255,0,255}));
203-
connect(conWatPum.y, booToRea.u)
204-
annotation (Line(points={{182,-40},{218,-40}}, color={255,0,255}));
205186
connect(booToRea.y, pro.u2) annotation (Line(points={{242,-40},{250,-40},{250,
206187
-6},{258,-6}}, color={0,0,127}));
207188
connect(pro.y, chiPlaCon.uConWatPumSpe) annotation (Line(points={{282,0},{300,
@@ -233,38 +214,52 @@ equation
233214
connect(zerOrdHol3.y, chiPlaCon.uFanSpe) annotation (Line(points={{170,-140},
234215
{180,-140},{180,-200},{-60,-200},{-60,-130},{-30,-130}}, color={0,0,
235216
127}));
236-
connect(chiOneSta.y, booToRea1[1].u) annotation (Line(points={{162,140},{200,140},
237-
{200,260},{-250,260},{-250,170},{-242,170}}, color={255,0,255}));
238-
connect(chiOneSta.y, chiPlaCon.uConWatReq[1]) annotation (Line(points={{162,140},
239-
{200,140},{200,260},{-90,260},{-90,187.5},{-30,187.5}}, color={255,
240-
0,255}));
241-
connect(chiOneSta.y, chiPlaCon.uChi[1]) annotation (Line(points={{162,140},{200,
242-
140},{200,260},{-90,260},{-90,117.5},{-30,117.5}}, color={255,0,
243-
255}));
244-
connect(chiOneSta.y, chiPlaCon.uChiHeaCon[1]) annotation (Line(points={{162,140},
245-
{200,140},{200,260},{-90,260},{-90,-32.5},{-30,-32.5}}, color={255,
246-
0,255}));
247-
connect(chiTwoSta.y, booToRea1[2].u) annotation (Line(points={{162,90},{210,90},
248-
{210,270},{-260,270},{-260,170},{-242,170}}, color={255,0,255}));
249-
connect(chiTwoSta.y, chiPlaCon.uConWatReq[2]) annotation (Line(points={{162,90},
250-
{210,90},{210,270},{-100,270},{-100,192.5},{-30,192.5}}, color={
251-
255,0,255}));
252-
connect(chiTwoSta.y, chiPlaCon.uChi[2]) annotation (Line(points={{162,90},{210,
253-
90},{210,270},{-100,270},{-100,122.5},{-30,122.5}}, color={255,0,
254-
255}));
255-
connect(chiTwoSta.y, chiPlaCon.uChiHeaCon[2]) annotation (Line(points={{162,90},
256-
{210,90},{210,270},{-100,270},{-100,-27.5},{-30,-27.5}}, color={
257-
255,0,255}));
258-
connect(chiOneSta.y, chiPlaCon.uChiWatReq[1]) annotation (Line(points={{162,
259-
140},{200,140},{200,260},{-90,260},{-90,197.5},{-30,197.5}}, color={
260-
255,0,255}));
261-
connect(chiTwoSta.y, chiPlaCon.uChiWatReq[2]) annotation (Line(points={{162,
262-
90},{210,90},{210,270},{-100,270},{-100,202.5},{-30,202.5}}, color={
263-
255,0,255}));
264217
connect(zerOrdHol1.y, pro.u1) annotation (Line(points={{222,50},{252,50},{252,
265218
6},{258,6}}, color={0,0,127}));
266219
connect(chiWatFlo.y[1], chiPlaCon.VChiWat_flow) annotation (Line(points={{
267220
-278,-200},{-160,-200},{-160,130},{-30,130}}, color={0,0,127}));
221+
connect(chiPlaCon.yChi[1], chiOne.y1) annotation (Line(points={{90,97.5},{110,
222+
97.5},{110,180},{138,180}}, color={255,0,255}));
223+
connect(chiPlaCon.yChi[2], chiTwo.y1) annotation (Line(points={{90,102.5},{120,
224+
102.5},{120,120},{138,120}}, color={255,0,255}));
225+
connect(chiOne.y1_actual, booToRea1[1].u) annotation (Line(points={{162,180},{
226+
180,180},{180,240},{-260,240},{-260,170},{-242,170}}, color={255,0,255}));
227+
connect(chiOne.y1_actual, chiPlaCon.uChiWatReq[1]) annotation (Line(points={{162,
228+
180},{180,180},{180,240},{-40,240},{-40,197.5},{-30,197.5}}, color={255,
229+
0,255}));
230+
connect(chiOne.y1_actual, chiPlaCon.uConWatReq[1]) annotation (Line(points={{162,
231+
180},{180,180},{180,240},{-40,240},{-40,187.5},{-30,187.5}}, color={255,
232+
0,255}));
233+
connect(chiOne.y1_actual, chiPlaCon.uChi[1]) annotation (Line(points={{162,180},
234+
{180,180},{180,240},{-40,240},{-40,117.5},{-30,117.5}}, color={255,0,255}));
235+
connect(chiOne.y1_actual, chiPlaCon.uChiHeaCon[1]) annotation (Line(points={{162,
236+
180},{180,180},{180,240},{-40,240},{-40,-32.5},{-30,-32.5}}, color={255,
237+
0,255}));
238+
connect(chiTwo.y1_actual, booToRea1[2].u) annotation (Line(points={{162,120},{
239+
200,120},{200,250},{-260,250},{-260,170},{-242,170}}, color={255,0,255}));
240+
connect(chiTwo.y1_actual, chiPlaCon.uChiWatReq[2]) annotation (Line(points={{162,
241+
120},{200,120},{200,250},{-60,250},{-60,202.5},{-30,202.5}}, color={255,
242+
0,255}));
243+
connect(chiTwo.y1_actual, chiPlaCon.uConWatReq[2]) annotation (Line(points={{162,
244+
120},{200,120},{200,250},{-60,250},{-60,192.5},{-30,192.5}}, color={255,
245+
0,255}));
246+
connect(chiTwo.y1_actual, chiPlaCon.uChi[2]) annotation (Line(points={{162,120},
247+
{200,120},{200,250},{-60,250},{-60,122.5},{-30,122.5}}, color={255,0,255}));
248+
connect(chiTwo.y1_actual, chiPlaCon.uChiHeaCon[2]) annotation (Line(points={{162,
249+
120},{200,120},{200,250},{-60,250},{-60,-27.5},{-30,-27.5}}, color={255,
250+
0,255}));
251+
connect(chiPlaCon.yConWatPum, conWatPum.y1) annotation (Line(points={{90,20},{
252+
120,20},{120,0},{138,0}}, color={255,0,255}));
253+
connect(conWatPum.y1_actual, chiPlaCon.uConWatPum) annotation (Line(points={{162,
254+
0},{210,0},{210,-230},{-100,-230},{-100,-90},{-30,-90}}, color={255,0,
255+
255}));
256+
connect(conWatPum.y1_actual, booToRea.u) annotation (Line(points={{162,0},{210,
257+
0},{210,-40},{218,-40}}, color={255,0,255}));
258+
connect(chiPlaCon.yTowCel, towSta.y1) annotation (Line(points={{90,-85},{100,-85},
259+
{100,-170},{118,-170}}, color={255,0,255}));
260+
connect(towSta.y1_actual, chiPlaCon.uTowSta) annotation (Line(points={{142,-170},
261+
{170,-170},{170,-190},{-50,-190},{-50,-170},{-30,-170}}, color={255,0,
262+
255}));
268263
annotation (
269264
experiment(StopTime=10800.0, Tolerance=1e-06),
270265
__Dymola_Commands(file="modelica://Buildings/Resources/Scripts/Dymola/Controls/OBC/ASHRAE/G36/Plants/Chillers/Validation/Controller.mos"

0 commit comments

Comments
 (0)