Hi! I'm currently adopting this testbed to optimize the carbon emission of the data center. I've been trying to modify 2ZoneDataCenterHVAC_wEconomizer_Temp_Fan.idf so that the observation sent by @ExtCtrlObs includes the carbon emission sensor data.
I added three sensors as follows:
EnergyManagementSystem:Sensor,
CARBON_EQUIVALENT, !- Name
Site, !- Output:Variable or Output:Meter Index Key Name
Environmental Impact Total CO2 Emissions Carbon Equivalent Mass; !- Output:Variable or Output:Meter Name
EnergyManagementSystem:Sensor,
CO2_EMISSION, !- Name
Site, !- Output:Variable or Output:Meter Index Key Name
Environmental Impact Electricity CO2 Emissions Mass; !- Output:Variable or Output:Meter Name
EnergyManagementSystem:Sensor,
CO_EMISSION, !- Name
Site, !- Output:Variable or Output:Meter Index Key Name
Environmental Impact Electricity CO Emissions Mass; !- Output:Variable or Output:Meter Name
with the corresponding output variables:
Output:Variable,
*, !- Key Value
Environmental Impact Total CO2 Emissions Carbon Equivalent Mass, !- Variable Name
timestep;
Output:Variable,
*, !- Key Value
Environmental Impact Electricity CO2 Emissions Mass, !- Variable Name
timestep; !- Reporting Frequency
Output:Variable,
*, !- Key Value
Environmental Impact Electricity CO Emissions Mass, !- Variable Name
timestep;
The EMS program for sending the observation is basically the same as the original code, with the power consumption EMS variables substituted with the carbon emission ones:
EnergyManagementSystem:ProgramCallingManager,
ExtCtrl-Based Observation Collector, !- Name
EndOfZoneTimestepAfterZoneReporting, !- EnergyPlus Model Calling Point
ExtCtrlBasedObservationCollector; !- Program Name 1
EnergyManagementSystem:Program,
ExtCtrlBasedObservationCollector, !- Name
IF WarmupFlag == 0.0, !- Program Line 1
SET tmp_val1 = @ExtCtrlObs 1 OutdoorTemp, !- Program Line 2
SET tmp_val1 = @ExtCtrlObs 2 WestZoneTemp, !- <none>
SET tmp_val1 = @ExtCtrlObs 3 EastZoneTemp, !- <none>
SET tmp_val1 = @ExtCtrlObs 4 PUE_Value, !- <none>
SET tmp_val1 = @ExtCtrlObs 5 CARBON_EQUIVALENT, !- <none>
SET tmp_val1 = @ExtCtrlObs 6 CO_EMISSION, !- <none>
SET tmp_val1 = @ExtCtrlObs 7 CO2_EMISSION, !- <none>
ELSE, !- <none>
ENDIF; !- <none>
(The variable PUE_Value here is just a placeholder as this value is neither involved in the reward calculation process nor included in the observation space.)
I modified the weight in the reward function. The training went on well and the observed carbon emission values decreased significantly during the inference process. Yet I just found that these carbon emission values sent as observation are different from the generated output in eplusout.csv.
For example, here's a snippet of the logged values of CARBON_EQUIVALENT from the first few observations:
Carbon Equivalent
--
0.0
0.133487
0.337323
0.307257
0.2369
0.282264
0.391187
0.225665
0.235469
0.157378
0.238455
And here's a snippet of the same timesteps in eplusout.csv:
Site:Environmental Impact Total CO2 Emissions Carbon Equivalent Mass [kg](TimeStep)
--
2.00229877741957
5.05984938339263
3.37983056774111
3.31660334495416
3.10490202242562
2.73830923089479
3.38498004573822
3.53203668198742
2.36067179328403
3.57682565240907
5.63639703991733
3.47494246773142
As a result, though the observed values got significantly reduced during the model's inference, it just doesn't seem to reduce carbon emission judging from the EnergyPlus output. The same inconsistency doesn't exists in the original case where electricity demand values are sent as observations.
I saw some issues discussing the inconsistency between EMS and output variables (NatLabRockies/EnergyPlus#7563, NatLabRockies/EnergyPlus#8915), and the problem seems to be the calling program manager. Yet I've tried a bunch of different calling points including EndOfSystemTimestepBeforeHVACReporting and AfterPredictorBeforeHVACManagers but they didn't fix the inconsistency.
Is there any suggestion on how solve this issue? Anything about applying this testbed to optimize carbon emission would be very helpful. Thanks!
Hi! I'm currently adopting this testbed to optimize the carbon emission of the data center. I've been trying to modify
2ZoneDataCenterHVAC_wEconomizer_Temp_Fan.idfso that the observation sent by@ExtCtrlObsincludes the carbon emission sensor data.I added three sensors as follows:
with the corresponding output variables:
The EMS program for sending the observation is basically the same as the original code, with the power consumption EMS variables substituted with the carbon emission ones:
(The variable
PUE_Valuehere is just a placeholder as this value is neither involved in the reward calculation process nor included in the observation space.)I modified the weight in the reward function. The training went on well and the observed carbon emission values decreased significantly during the inference process. Yet I just found that these carbon emission values sent as observation are different from the generated output in
eplusout.csv.For example, here's a snippet of the logged values of
CARBON_EQUIVALENTfrom the first few observations:And here's a snippet of the same timesteps in
eplusout.csv:As a result, though the observed values got significantly reduced during the model's inference, it just doesn't seem to reduce carbon emission judging from the EnergyPlus output. The same inconsistency doesn't exists in the original case where electricity demand values are sent as observations.
I saw some issues discussing the inconsistency between EMS and output variables (NatLabRockies/EnergyPlus#7563, NatLabRockies/EnergyPlus#8915), and the problem seems to be the calling program manager. Yet I've tried a bunch of different calling points including
EndOfSystemTimestepBeforeHVACReportingandAfterPredictorBeforeHVACManagersbut they didn't fix the inconsistency.Is there any suggestion on how solve this issue? Anything about applying this testbed to optimize carbon emission would be very helpful. Thanks!