Open WynnCJF opened 2 years ago
Hi @WynnCJF. A discrepancy is possible if you don't use the right calling point, but it usually expresses as a lag, not a completely different value. There's also a possible problem when using EnergyManagementSystem:OutputVariable
with an incorrect update frequency or aggregation (averaged -> summed).
What you could try:
Output:Meter
for comparison. In some cases meters can help, sometimes they're completely off.EnergyManagementSystem:OutputVariable
to check if it tells the same than Output:Variable
and Output:Meter
I also recommend running your tests outside of this testbed since it's seems to be an EnergyPlus-related issue
Here is a test example (not tested):
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:ProgramCallingManager,
Test Prgm, !- Name
EndOfZoneTimestepBeforeZoneReporting, !- EnergyPlus Model Calling Point
Test_Prgm; !- Program Name 1
EnergyManagementSystem:Program,
Test_Prgm, !- Name
SET carbon = CARBON_EQUIVALENT; !- Program Line 1
EnergyManagementSystem:OutputVariable,
EMS Carbon, !- Name
carbon, !- EMS Variable Name
Summed, !- Type of Data in Variable
SystemTimestep, !- Update Frequency
Test_Prgm, !- EMS Program or Subroutine Name
J; !- Units
!- Case 1: EMS output variable
Output:Variable,
EMS, !- Key Value
EMS Carbon, !- Variable Name
timestep; !- Reporting Frequency
!- Case 2: Output Variable
Output:Variable,
*, !- Key Value
Environmental Impact Total CO2 Emissions Carbon Equivalent Mass, !- Variable Name
timestep; !- Reporting Frequency
!- Case 3: Output Meter
Output:Meter,
ElectricEmissions:CO2 , !- Key Name
timestep; !- Reporting Frequency
You may want to tweak the EnergyPlus Model Calling Point
too, to check the impact.
See also EnergyPlus Input/Output Reference for other ways to express CO2 emissions as output variables and meters.
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:
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_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: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 (https://github.com/NREL/EnergyPlus/issues/7563, https://github.com/NREL/EnergyPlus/issues/8915), and the problem seems to be the calling program manager. Yet I've tried a bunch of different calling points including
EndOfSystemTimestepBeforeHVACReporting
andAfterPredictorBeforeHVACManagers
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!