1

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
    

image description

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.

Mariam's avatar
65
Mariam
asked 2022-05-18 04:30:10 -0500
Aaron Boranian's avatar
14.1k
Aaron Boranian
updated 2022-05-18 09:37:15 -0500
edit flag offensive 0 remove flag close merge delete

Comments

1

Looks like the EMS output is just lagging by one timestep.

JasonGlazer's avatar JasonGlazer (2022-05-18 07:07:11 -0500) edit
1

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. And summed seems odd for a state variable like WBT ... Long story short : correct values (reassuring), yet calling point is off.

Denis Bourgeois's avatar Denis Bourgeois (2022-05-18 07:11:25 -0500) edit

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.

Mariam's avatar Mariam (2022-05-18 07:21:13 -0500) edit
add a comment see more comments

1 Answer

2

Thanks to @JasonGlazer and @Denis Bourgeois, EMS output is simply lagging behind every timestep that can be 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. I will try EndOfSystemTimestepBeforeHVACReporting (i.e. system variable) as suggested by @Denis Bourgeois to solve the lagging issue. 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 scale, hence looking very different.

Mariam's avatar
65
Mariam
answered 2022-05-18 07:25:54 -0500, updated 2022-05-18 07:26:52 -0500
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments