Different values of "Output:Variable" and "EnergyManagementSystem:OutputVariable" for the same Sensor in EnergyPlus
I am using EMS to compute an intermediate value based on the available sensors. To check that the correct values are used in the EMS calculations, I created customized EMS outputs for those sensors and compared them with their values produced in the ESO file. For example, one of the sensors is the System Node Wetbulb Temperature of the Air Loop Demand Side Outlet as follows:
Actual sensor reading:
Output:Variable, Air Loop Demand Side Outlet, !- Key Value System Node Wetbulb Temperature, !- Variable Name timestep; !- Reporting Frequency
EMS sensor reading definition and it custom output:
Output:Variable, *, !- Key Value AirLoopWetbulb_Temperature_EMS, !- Variable Name timestep; !- Reporting Frequency EnergyManagementSystem:Sensor, AirLoopWetbulb_Temperature, !- Name Air Loop Demand Side Outlet, !- Output:Variable or Output:Meter Index Key Name System Node Wetbulb Temperature; !- Output:Variable or Output:Meter Name EnergyManagementSystem:OutputVariable, AirLoopWetbulb_Temperature_EMS, !- Name AirLoopWetbulb_Temperature, !- EMS Variable Name Summed, !- Type of Data in Variable !Averaged, !- Type of Data in Variable ZoneTimeStep ; !- Update Frequency
Is there a way to eliminate or minimize this error? I tried different EMS Program Calling options as follows:
EnergyManagementSystem:ProgramCallingManager,
For EMS Run , !- Name
BeginTimestepBeforePredictor, !- EnergyPlus Model Calling Point
!AfterPredictorBeforeHVACManagers
!EndOfZoneTimestepAfterZoneReporting
!EndOfZoneTimestepBeforeZoneReporting
EMSProgram1; !- Program Name 1
Thank you.
Looks like the EMS output is just lagging by one timestep.
As Jason suggests, EMS output is simply lagging behind every timestep e.g. C1 == B2, and so on. I suspect the lag is due to reporting an HVAC state variable (like node WBT) too soon (i.e. before it gets calculated or initialized at runtime), so it's ends up reporting the previous timestep value. Try
EndOfSystemTimestepBeforeHVACReporting
(i.e. system variable) to first see if you can at least synchronize reported values, and move on from there. Andsummed
seems odd for a state variable like WBT ... Long story short : correct values (reassuring), yet calling point is off.Thank you @JasonGlazer and @Denis Bourgeois for your reply. Indeed, I have missed this observation because my question was based on the comparison graphical results I got using Design Builder viewer that I now found out plots the two variables with non-unified Y-axis scales, hence they seems very different. Thanks again for your feedback.