Question-and-Answer Resource for the Building Energy Modeling Community
Get started with the Help page
Ask Your Question

Revision history [back]

EMS for custom output variable

I am trying to set up some custom output variables, so that I can use the custom data to be analysis directly. But I checked the custom output variables by handling the original output variables, I found some problems.

a.When I use the original output variables to calculate 'Temperature Efficiency' and 'AC Consumption' with the same formulas in EMS program, the results does not match with the EMS custom output results, even through I change the reporting frequency from hourly to timestep.

b. The AC system operates from 8:00 AM to 5:00 PM. For calculating the AC Consumption, the result from original output variables is smaller than the EMS result, but usually after a shorter period such as from 8:30 AM, the former result equals with the EMS result.

c. I checked the example files of EMSCustomOutputVariable.idf, and set a simple EMS program to let the T1 plus T2. I found that when the output variable style is 'Zone mean air temperature', the result from original output variables equals the EMS result. But when I change the output variable style to 'Zone air temperature', the two results differ a lot.

The blow is the idf scripts:

!- =========== ALL OBJECTS IN CLASS: ENERGYMANAGEMENTSYSTEM:SENSOR ===========

EnergyManagementSystem:Sensor, Tout, !- Name 1W, !- Output:Variable or Output:Meter Index Key Name Zone Air Temperature ; !- Output:Variable or Output:Meter Name

EnergyManagementSystem:Sensor, Tin, !- Name 1W, !- Output:Variable or Output:Meter Index Key Name Zone Ventilation Air Inlet Temperature ; !- Output:Variable or Output:Meter Name

EnergyManagementSystem:Sensor, Ts1, !- Name 1W_N_Floor, !- Output:Variable or Output:Meter Index Key Name Surface Inside Face Temperature ; !- Output:Variable or Output:Meter Name

EnergyManagementSystem:Sensor, Ts2, !- Name 1W_N_Ceiling, !- Output:Variable or Output:Meter Index Key Name Surface Inside Face Temperature; !- Output:Variable or Output:Meter Name

EnergyManagementSystem:Sensor, Ts3, !- Name 1W_S, !- Output:Variable or Output:Meter Index Key Name Surface Inside Face Temperature; !- Output:Variable or Output:Meter Name

EnergyManagementSystem:Sensor, Ts4, !- Name 1W_E_S_Wall, !- Output:Variable or Output:Meter Index Key Name Surface Inside Face Temperature; !- Output:Variable or Output:Meter Name

EnergyManagementSystem:Sensor, Ts5, !- Name 1W_N, !- Output:Variable or Output:Meter Index Key Name Surface Inside Face Temperature; !- Output:Variable or Output:Meter Name

EnergyManagementSystem:Sensor, Ts6, !- Name 1W_W, !- Output:Variable or Output:Meter Index Key Name Surface Inside Face Temperature; !- Output:Variable or Output:Meter Name

EnergyManagementSystem:Sensor, Ts7, !- Name 1W_C_Ceiling, !- Output:Variable or Output:Meter Index Key Name Surface Inside Face Temperature; !- Output:Variable or Output:Meter Name

EnergyManagementSystem:Sensor, Ts8, !- Name 1W_S_Ceiling, !- Output:Variable or Output:Meter Index Key Name Surface Inside Face Temperature; !- Output:Variable or Output:Meter Name

EnergyManagementSystem:Sensor, Ts9, !- Name 1W_S_Floor, !- Output:Variable or Output:Meter Index Key Name Surface Inside Face Temperature; !- Output:Variable or Output:Meter Name

EnergyManagementSystem:Sensor, Ts10, !- Name 1W_C_Floor, !- Output:Variable or Output:Meter Index Key Name Surface Inside Face Temperature; !- Output:Variable or Output:Meter Name

EnergyManagementSystem:Sensor, Ts11, !- Name 1W_E_N_Wall, !- Output:Variable or Output:Meter Index Key Name Surface Inside Face Temperature; !- Output:Variable or Output:Meter Name

EnergyManagementSystem:Sensor, Ts12, !- Name 1W_E_C_Wall, !- Output:Variable or Output:Meter Index Key Name Surface Inside Face Temperature; !- Output:Variable or Output:Meter Name

EnergyManagementSystem:Sensor, Ts13, !- Name 1W_S_Win, !- Output:Variable or Output:Meter Index Key Name Surface Inside Face Temperature; !- Output:Variable or Output:Meter Name

EnergyManagementSystem:Sensor, Ts14, !- Name 1W_N_Win, !- Output:Variable or Output:Meter Index Key Name Surface Inside Face Temperature; !- Output:Variable or Output:Meter Name

EnergyManagementSystem:Sensor, To, !- Name , !- Output:Variable or Output:Meter Index Key Name Site Outdoor Air Drybulb Temperature ; !- Output:Variable or Output:Meter Name

EnergyManagementSystem:Sensor, Qfan, !- Name 1W, !- Output:Variable or Output:Meter Index Key Name Zone Ventilation Fan Electric Energy ; !- Output:Variable or Output:Meter Name

EnergyManagementSystem:Sensor, Qhr, !- Name 1W, !- Output:Variable or Output:Meter Index Key Name Zone Ventilation Sensible Heat Loss Energy; !- Output:Variable or Output:Meter Name

EnergyManagementSystem:Sensor, Qac, !- Name 1W PTHP, !- Output:Variable or Output:Meter Index Key Name Zone Packaged Terminal Heat Pump Electric Energy ; !- Output:Variable or Output:Meter Name

EnergyManagementSystem:Sensor, Qpa, !- Name DOAS, !- Output:Variable or Output:Meter Index Key Name Air System Electric Energy ; !- Output:Variable or Output:Meter Name

!- =========== ALL OBJECTS IN CLASS: ENERGYMANAGEMENTSYSTEM:PROGRAMCALLINGMANAGER ===========

EnergyManagementSystem:ProgramCallingManager, TemperatureEfficiencyProgram, !- Name EndOfZoneTimestepBeforeZoneReporting, !- EnergyPlus Model Calling Point CalTemperatureEfficiency;!- Program Name 1

EnergyManagementSystem:ProgramCallingManager, ACconsumptionProgram, !- Name EndOfZoneTimestepBeforeZoneReporting, !- EnergyPlus Model Calling Point CalACconsumption; !- Program Name 1

!- =========== ALL OBJECTS IN CLASS: ENERGYMANAGEMENTSYSTEM:PROGRAM ===========

EnergyManagementSystem:Program, CalTemperatureEfficiency,!- Name SET Numerator = Tout-Tin,!- Program Line 1 SET Denominator = (Ts1+Ts2+Ts3+Ts4+Ts5+Ts6+Ts7+Ts8+Ts9+Ts10+Ts11+Ts12+Ts13+Ts14)/14-Tin, !- Program Line 2 SET TE = Numerator / Denominator; !- A4

EnergyManagementSystem:Program, CalACconsumption, !- Name SET AC = Qac+Qpa; !- Program Line 1

!- =========== ALL OBJECTS IN CLASS: ENERGYMANAGEMENTSYSTEM:GLOBALVARIABLE ===========

EnergyManagementSystem:GlobalVariable, TE, !- Erl Variable 1 Name AC; !- Erl Variable 2 Name

!- =========== ALL OBJECTS IN CLASS: ENERGYMANAGEMENTSYSTEM:OUTPUTVARIABLE ===========

EnergyManagementSystem:OutputVariable, TemperatureEfficiency, !- Name TE, !- EMS Variable Name Averaged, !- Type of Data in Variable ZoneTimestep, !- Update Frequency , !- EMS Program or Subroutine Name %; !- Units

EnergyManagementSystem:OutputVariable, ACConsumption, !- Name AC, !- EMS Variable Name Summed, !- Type of Data in Variable ZoneTimestep, !- Update Frequency , !- EMS Program or Subroutine Name J; !- Units

I was very confused about the EMS set up. And I hope anyone who is familiar with EMS can help me! Thank you very much.

click to hide/show revision 1
initial version

EMS for custom output variable

I am trying to set up some custom output variables, so that I can use the custom data to be analysis directly. But I checked the custom output variables by handling the original output variables, I found some problems.

a.When problems, which are:

A.When I use the original output variables to calculate 'Temperature Efficiency' and 'AC Consumption' with the same formulas in EMS program, the results does not match with the EMS custom output results, even through I change the reporting frequency from hourly to timestep.

b. B. The AC system operates from 8:00 AM to 5:00 PM. For calculating the AC Consumption, the result from original output variables is smaller than the EMS result, but usually after a shorter period such as from 8:30 AM, the former result equals with the EMS result.

c. C. I checked the example files of EMSCustomOutputVariable.idf, and set a simple EMS program to let the T1 plus T2. I found that when the output variable style is 'Zone mean air temperature', the result from original output variables equals the EMS result. But when I change the output variable style to 'Zone air temperature', the two results differ a lot.

The blow is the idf scripts:

!- =========== ALL OBJECTS IN CLASS: ENERGYMANAGEMENTSYSTEM:SENSOR ===========

EnergyManagementSystem:Sensor, Tout, !- Name 1W, !- Output:Variable or Output:Meter Index Key Name Zone Air Temperature ; !- Output:Variable or Output:Meter Name

EnergyManagementSystem:Sensor, Tin, !- Name 1W, !- Output:Variable or Output:Meter Index Key Name Zone Ventilation Air Inlet Temperature ; !- Output:Variable or Output:Meter Name

EnergyManagementSystem:Sensor, Ts1, !- Name 1W_N_Floor, !- Output:Variable or Output:Meter Index Key Name Surface Inside Face Temperature ; !- Output:Variable or Output:Meter Name

EnergyManagementSystem:Sensor, Ts2, !- Name 1W_N_Ceiling, !- Output:Variable or Output:Meter Index Key Name Surface Inside Face Temperature; !- Output:Variable or Output:Meter Name

EnergyManagementSystem:Sensor, Ts3, !- Name 1W_S, !- Output:Variable or Output:Meter Index Key Name Surface Inside Face Temperature; !- Output:Variable or Output:Meter Name

EnergyManagementSystem:Sensor, Ts4, !- Name 1W_E_S_Wall, !- Output:Variable or Output:Meter Index Key Name Surface Inside Face Temperature; !- Output:Variable or Output:Meter Name

EnergyManagementSystem:Sensor, Ts5, !- Name 1W_N, !- Output:Variable or Output:Meter Index Key Name Surface Inside Face Temperature; !- Output:Variable or Output:Meter Name

EnergyManagementSystem:Sensor, Ts6, !- Name 1W_W, !- Output:Variable or Output:Meter Index Key Name Surface Inside Face Temperature; !- Output:Variable or Output:Meter Name

EnergyManagementSystem:Sensor, Ts7, !- Name 1W_C_Ceiling, !- Output:Variable or Output:Meter Index Key Name Surface Inside Face Temperature; !- Output:Variable or Output:Meter Name

EnergyManagementSystem:Sensor, Ts8, !- Name 1W_S_Ceiling, !- Output:Variable or Output:Meter Index Key Name Surface Inside Face Temperature; !- Output:Variable or Output:Meter Name

EnergyManagementSystem:Sensor, Ts9, !- Name 1W_S_Floor, !- Output:Variable or Output:Meter Index Key Name Surface Inside Face Temperature; !- Output:Variable or Output:Meter Name

EnergyManagementSystem:Sensor, Ts10, !- Name 1W_C_Floor, !- Output:Variable or Output:Meter Index Key Name Surface Inside Face Temperature; !- Output:Variable or Output:Meter Name

EnergyManagementSystem:Sensor, Ts11, !- Name 1W_E_N_Wall, !- Output:Variable or Output:Meter Index Key Name Surface Inside Face Temperature; !- Output:Variable or Output:Meter Name

EnergyManagementSystem:Sensor, Ts12, !- Name 1W_E_C_Wall, !- Output:Variable or Output:Meter Index Key Name Surface Inside Face Temperature; !- Output:Variable or Output:Meter Name

EnergyManagementSystem:Sensor, Ts13, !- Name 1W_S_Win, !- Output:Variable or Output:Meter Index Key Name Surface Inside Face Temperature; !- Output:Variable or Output:Meter Name

EnergyManagementSystem:Sensor, Ts14, !- Name 1W_N_Win, !- Output:Variable or Output:Meter Index Key Name Surface Inside Face Temperature; !- Output:Variable or Output:Meter Name

EnergyManagementSystem:Sensor, To, !- Name , !- Output:Variable or Output:Meter Index Key Name Site Outdoor Air Drybulb Temperature ; !- Output:Variable or Output:Meter Name

EnergyManagementSystem:Sensor, Qfan, !- Name 1W, !- Output:Variable or Output:Meter Index Key Name Zone Ventilation Fan Electric Energy ; !- Output:Variable or Output:Meter Name

EnergyManagementSystem:Sensor, Qhr, !- Name 1W, !- Output:Variable or Output:Meter Index Key Name Zone Ventilation Sensible Heat Loss Energy; !- Output:Variable or Output:Meter Name

EnergyManagementSystem:Sensor, Qac, !- Name 1W PTHP, !- Output:Variable or Output:Meter Index Key Name Zone Packaged Terminal Heat Pump Electric Energy ; !- Output:Variable or Output:Meter Name

EnergyManagementSystem:Sensor, Qpa, !- Name DOAS, !- Output:Variable or Output:Meter Index Key Name Air System Electric Energy ; !- Output:Variable or Output:Meter Name

!- =========== ALL OBJECTS IN CLASS: ENERGYMANAGEMENTSYSTEM:PROGRAMCALLINGMANAGER ===========

EnergyManagementSystem:ProgramCallingManager, TemperatureEfficiencyProgram, !- Name EndOfZoneTimestepBeforeZoneReporting, !- EnergyPlus Model Calling Point CalTemperatureEfficiency;!- Program Name 1

EnergyManagementSystem:ProgramCallingManager, ACconsumptionProgram, !- Name EndOfZoneTimestepBeforeZoneReporting, !- EnergyPlus Model Calling Point CalACconsumption; !- Program Name 1

!- =========== ALL OBJECTS IN CLASS: ENERGYMANAGEMENTSYSTEM:PROGRAM ===========

EnergyManagementSystem:Program, CalTemperatureEfficiency,!- Name SET Numerator = Tout-Tin,!- Program Line 1 SET Denominator = (Ts1+Ts2+Ts3+Ts4+Ts5+Ts6+Ts7+Ts8+Ts9+Ts10+Ts11+Ts12+Ts13+Ts14)/14-Tin, !- Program Line 2 SET TE = Numerator / Denominator; !- A4

EnergyManagementSystem:Program, CalACconsumption, !- Name SET AC = Qac+Qpa; !- Program Line 1

!- =========== ALL OBJECTS IN CLASS: ENERGYMANAGEMENTSYSTEM:GLOBALVARIABLE ===========

EnergyManagementSystem:GlobalVariable, TE, !- Erl Variable 1 Name AC; !- Erl Variable 2 Name

!- =========== ALL OBJECTS IN CLASS: ENERGYMANAGEMENTSYSTEM:OUTPUTVARIABLE ===========

EnergyManagementSystem:OutputVariable, TemperatureEfficiency, !- Name TE, !- EMS Variable Name Averaged, !- Type of Data in Variable ZoneTimestep, !- Update Frequency , !- EMS Program or Subroutine Name %; !- Units

EnergyManagementSystem:OutputVariable, ACConsumption, !- Name AC, !- EMS Variable Name Summed, !- Type of Data in Variable ZoneTimestep, !- Update Frequency , !- EMS Program or Subroutine Name J; !- Units

I was very confused about the EMS set up. And I hope anyone who is familiar with EMS can help me! Thank you very much.

EMS for custom output variable

I am trying to set up some custom output variables, so that I can use the custom data to be analysis directly. But I checked the custom output variables by handling the original output variables, I found some problems, which are:

A.When I use the original output variables to calculate 'Temperature Efficiency' and 'AC Consumption' with the same formulas in EMS program, the results does not match with the EMS custom output results, even through I change the reporting frequency from hourly to timestep.

B. The AC system operates from 8:00 AM to 5:00 PM. For calculating the AC Consumption, the result from original output variables is smaller than the EMS result, but usually after a shorter period such as from 8:30 AM, the former result equals with the EMS result.

C. I checked the example files of EMSCustomOutputVariable.idf, and set a simple EMS program to let the T1 plus T2. I found that when the output variable style is 'Zone mean air temperature', the result from original output variables equals the EMS result. But when I change the output variable style to 'Zone air temperature', the two results differ a lot.

The blow is the idf scripts:

!-   ===========  ALL OBJECTS IN CLASS: ENERGYMANAGEMENTSYSTEM:SENSOR ===========

=========== EnergyManagementSystem:Sensor, Tout, !- Name 1W, !- Output:Variable or Output:Meter Index Key Name Zone Air Temperature ; !- Output:Variable or Output:Meter Name

Name EnergyManagementSystem:Sensor, Tin, !- Name 1W, !- Output:Variable or Output:Meter Index Key Name Zone Ventilation Air Inlet Temperature ; !- Output:Variable or Output:Meter Name

Name EnergyManagementSystem:Sensor, Ts1, !- Name 1W_N_Floor, !- Output:Variable or Output:Meter Index Key Name Surface Inside Face Temperature ; !- Output:Variable or Output:Meter Name

Name EnergyManagementSystem:Sensor, Ts2, !- Name 1W_N_Ceiling, !- Output:Variable or Output:Meter Index Key Name Surface Inside Face Temperature; !- Output:Variable or Output:Meter Name

Name EnergyManagementSystem:Sensor, Ts3, !- Name 1W_S, !- Output:Variable or Output:Meter Index Key Name Surface Inside Face Temperature; !- Output:Variable or Output:Meter Name

Name EnergyManagementSystem:Sensor, Ts4, !- Name 1W_E_S_Wall, !- Output:Variable or Output:Meter Index Key Name Surface Inside Face Temperature; !- Output:Variable or Output:Meter Name

Name EnergyManagementSystem:Sensor, Ts5, !- Name 1W_N, !- Output:Variable or Output:Meter Index Key Name Surface Inside Face Temperature; !- Output:Variable or Output:Meter Name

Name EnergyManagementSystem:Sensor, Ts6, !- Name 1W_W, !- Output:Variable or Output:Meter Index Key Name Surface Inside Face Temperature; !- Output:Variable or Output:Meter Name

Name EnergyManagementSystem:Sensor, Ts7, !- Name 1W_C_Ceiling, !- Output:Variable or Output:Meter Index Key Name Surface Inside Face Temperature; !- Output:Variable or Output:Meter Name

Name EnergyManagementSystem:Sensor, Ts8, !- Name 1W_S_Ceiling, !- Output:Variable or Output:Meter Index Key Name Surface Inside Face Temperature; !- Output:Variable or Output:Meter Name

Name EnergyManagementSystem:Sensor, Ts9, !- Name 1W_S_Floor, !- Output:Variable or Output:Meter Index Key Name Surface Inside Face Temperature; !- Output:Variable or Output:Meter Name

Name EnergyManagementSystem:Sensor, Ts10, !- Name 1W_C_Floor, !- Output:Variable or Output:Meter Index Key Name Surface Inside Face Temperature; !- Output:Variable or Output:Meter Name

Name EnergyManagementSystem:Sensor, Ts11, !- Name 1W_E_N_Wall, !- Output:Variable or Output:Meter Index Key Name Surface Inside Face Temperature; !- Output:Variable or Output:Meter Name

Name EnergyManagementSystem:Sensor, Ts12, !- Name 1W_E_C_Wall, !- Output:Variable or Output:Meter Index Key Name Surface Inside Face Temperature; !- Output:Variable or Output:Meter Name

Name EnergyManagementSystem:Sensor, Ts13, !- Name 1W_S_Win, !- Output:Variable or Output:Meter Index Key Name Surface Inside Face Temperature; !- Output:Variable or Output:Meter Name

Name EnergyManagementSystem:Sensor, Ts14, !- Name 1W_N_Win, !- Output:Variable or Output:Meter Index Key Name Surface Inside Face Temperature; !- Output:Variable or Output:Meter Name

Name EnergyManagementSystem:Sensor, To, !- Name , !- Output:Variable or Output:Meter Index Key Name Site Outdoor Air Drybulb Temperature ; !- Output:Variable or Output:Meter Name

Name EnergyManagementSystem:Sensor, Qfan, !- Name 1W, !- Output:Variable or Output:Meter Index Key Name Zone Ventilation Fan Electric Energy ; !- Output:Variable or Output:Meter Name

Name EnergyManagementSystem:Sensor, Qhr, !- Name 1W, !- Output:Variable or Output:Meter Index Key Name Zone Ventilation Sensible Heat Loss Energy; !- Output:Variable or Output:Meter Name

Name EnergyManagementSystem:Sensor, Qac, !- Name 1W PTHP, !- Output:Variable or Output:Meter Index Key Name Zone Packaged Terminal Heat Pump Electric Energy ; !- Output:Variable or Output:Meter Name

Name EnergyManagementSystem:Sensor, Qpa, !- Name DOAS, !- Output:Variable or Output:Meter Index Key Name Air System Electric Energy ; !- Output:Variable or Output:Meter Name

Name !- =========== ALL OBJECTS IN CLASS: ENERGYMANAGEMENTSYSTEM:PROGRAMCALLINGMANAGER ===========

=========== EnergyManagementSystem:ProgramCallingManager, TemperatureEfficiencyProgram, !- Name EndOfZoneTimestepBeforeZoneReporting, !- EnergyPlus Model Calling Point CalTemperatureEfficiency;!- Program Name 1

1 EnergyManagementSystem:ProgramCallingManager, ACconsumptionProgram, !- Name EndOfZoneTimestepBeforeZoneReporting, !- EnergyPlus Model Calling Point CalACconsumption; !- Program Name 1

1 !- =========== ALL OBJECTS IN CLASS: ENERGYMANAGEMENTSYSTEM:PROGRAM ===========

=========== EnergyManagementSystem:Program, CalTemperatureEfficiency,!- Name SET Numerator = Tout-Tin,!- Program Line 1 SET Denominator = (Ts1+Ts2+Ts3+Ts4+Ts5+Ts6+Ts7+Ts8+Ts9+Ts10+Ts11+Ts12+Ts13+Ts14)/14-Tin, !- Program Line 2 SET TE = Numerator / Denominator; !- A4

A4 EnergyManagementSystem:Program, CalACconsumption, !- Name SET AC = Qac+Qpa; !- Program Line 1

1 !- =========== ALL OBJECTS IN CLASS: ENERGYMANAGEMENTSYSTEM:GLOBALVARIABLE ===========

=========== EnergyManagementSystem:GlobalVariable, TE, !- Erl Variable 1 Name AC; !- Erl Variable 2 Name

Name !- =========== ALL OBJECTS IN CLASS: ENERGYMANAGEMENTSYSTEM:OUTPUTVARIABLE ===========

=========== EnergyManagementSystem:OutputVariable, TemperatureEfficiency, !- Name TE, !- EMS Variable Name Averaged, !- Type of Data in Variable ZoneTimestep, !- Update Frequency , !- EMS Program or Subroutine Name %; !- Units

Units EnergyManagementSystem:OutputVariable, ACConsumption, !- Name AC, !- EMS Variable Name Summed, !- Type of Data in Variable ZoneTimestep, !- Update Frequency , !- EMS Program or Subroutine Name J; !- Units

Units

I was very confused about the EMS set up. And I hope anyone who is familiar with EMS can help me! Thank you very much.

EMS for custom output variable

I am trying to set up some custom output variables, so that I can use the custom data to be analysis directly. But I checked the custom output variables by handling the original output variables, I found some problems, which are:

A.When I use the original output variables to calculate 'Temperature Efficiency' and 'AC Consumption' with the same formulas in EMS program, the results does not match with the EMS custom output results, even through I change the reporting frequency from hourly to timestep.

B. The AC system operates from 8:00 AM to 5:00 PM. For calculating the AC Consumption, the result from original output variables is smaller than the EMS result, but usually after a shorter period such as from 8:30 AM, the former result equals with the EMS result.

C. I checked the example files of EMSCustomOutputVariable.idf, and set a simple EMS program to let the T1 plus T2. I found that when the output variable style is 'Zone mean air temperature', the result from original output variables equals the EMS result. But when I change the output variable style to 'Zone air temperature', the two results differ a lot.

The blow is the idf scripts:

!-   ===========  ALL OBJECTS IN CLASS: ENERGYMANAGEMENTSYSTEM:SENSOR ===========

EnergyManagementSystem:Sensor,
    Tout,                    !- Name
    1W,                      !- Output:Variable or Output:Meter Index Key Name
    Zone Air Temperature ;   !- Output:Variable or Output:Meter Name

EnergyManagementSystem:Sensor,
    Tin,                     !- Name
    1W,                      !- Output:Variable or Output:Meter Index Key Name
    Zone Ventilation Air Inlet Temperature ;  !- Output:Variable or Output:Meter Name

EnergyManagementSystem:Sensor,
    Ts1,                     !- Name
    1W_N_Floor,              !- Output:Variable or Output:Meter Index Key Name
    Surface Inside Face Temperature ;  !- Output:Variable or Output:Meter Name

EnergyManagementSystem:Sensor,
    Ts2,                     !- Name
    1W_N_Ceiling,            !- Output:Variable or Output:Meter Index Key Name
    Surface Inside Face Temperature;  !- Output:Variable or Output:Meter Name

EnergyManagementSystem:Sensor,
    Ts3,                     !- Name
    1W_S,                    !- Output:Variable or Output:Meter Index Key Name
    Surface Inside Face Temperature;  !- Output:Variable or Output:Meter Name

EnergyManagementSystem:Sensor,
    Ts4,                     !- Name
    1W_E_S_Wall,             !- Output:Variable or Output:Meter Index Key Name
    Surface Inside Face Temperature;  !- Output:Variable or Output:Meter Name

EnergyManagementSystem:Sensor,
    Ts5,                     !- Name
    1W_N,                    !- Output:Variable or Output:Meter Index Key Name
    Surface Inside Face Temperature;  !- Output:Variable or Output:Meter Name

EnergyManagementSystem:Sensor,
    Ts6,                     !- Name
    1W_W,                    !- Output:Variable or Output:Meter Index Key Name
    Surface Inside Face Temperature;  !- Output:Variable or Output:Meter Name

EnergyManagementSystem:Sensor,
    Ts7,                     !- Name
    1W_C_Ceiling,            !- Output:Variable or Output:Meter Index Key Name
    Surface Inside Face Temperature;  !- Output:Variable or Output:Meter Name

EnergyManagementSystem:Sensor,
    Ts8,                     !- Name
    1W_S_Ceiling,            !- Output:Variable or Output:Meter Index Key Name
    Surface Inside Face Temperature;  !- Output:Variable or Output:Meter Name

EnergyManagementSystem:Sensor,
    Ts9,                     !- Name
    1W_S_Floor,              !- Output:Variable or Output:Meter Index Key Name
    Surface Inside Face Temperature;  !- Output:Variable or Output:Meter Name

EnergyManagementSystem:Sensor,
    Ts10,                    !- Name
    1W_C_Floor,              !- Output:Variable or Output:Meter Index Key Name
    Surface Inside Face Temperature;  !- Output:Variable or Output:Meter Name

EnergyManagementSystem:Sensor,
    Ts11,                    !- Name
    1W_E_N_Wall,             !- Output:Variable or Output:Meter Index Key Name
    Surface Inside Face Temperature;  !- Output:Variable or Output:Meter Name

EnergyManagementSystem:Sensor,
    Ts12,                    !- Name
    1W_E_C_Wall,             !- Output:Variable or Output:Meter Index Key Name
    Surface Inside Face Temperature;  !- Output:Variable or Output:Meter Name

EnergyManagementSystem:Sensor,
    Ts13,                    !- Name
    1W_S_Win,                !- Output:Variable or Output:Meter Index Key Name
    Surface Inside Face Temperature;  !- Output:Variable or Output:Meter Name

EnergyManagementSystem:Sensor,
    Ts14,                    !- Name
    1W_N_Win,                !- Output:Variable or Output:Meter Index Key Name
    Surface Inside Face Temperature;  !- Output:Variable or Output:Meter Name

EnergyManagementSystem:Sensor,
    To,                      !- Name
    ,                        !- Output:Variable or Output:Meter Index Key Name
    Site Outdoor Air Drybulb Temperature ;  !- Output:Variable or Output:Meter Name

EnergyManagementSystem:Sensor,
    Qfan,                    !- Name
    1W,                      !- Output:Variable or Output:Meter Index Key Name
    Zone Ventilation Fan Electric Energy ;  !- Output:Variable or Output:Meter Name

EnergyManagementSystem:Sensor,
    Qhr,                     !- Name
    1W,                      !- Output:Variable or Output:Meter Index Key Name
    Zone Ventilation Sensible Heat Loss Energy;  !- Output:Variable or Output:Meter Name

EnergyManagementSystem:Sensor,
    Qac,                     !- Name
    1W PTHP,                 !- Output:Variable or Output:Meter Index Key Name
    Zone Packaged Terminal Heat Pump Electric Energy ;  !- Output:Variable or Output:Meter Name

EnergyManagementSystem:Sensor,
    Qpa,                     !- Name
    DOAS,                    !- Output:Variable or Output:Meter Index Key Name
    Air System Electric Energy ;  !- Output:Variable or Output:Meter Name


!-   ===========  ALL OBJECTS IN CLASS: ENERGYMANAGEMENTSYSTEM:PROGRAMCALLINGMANAGER ===========

EnergyManagementSystem:ProgramCallingManager,
    TemperatureEfficiencyProgram,  !- Name
    EndOfZoneTimestepBeforeZoneReporting,  !- EnergyPlus Model Calling Point
    CalTemperatureEfficiency;!- Program Name 1

EnergyManagementSystem:ProgramCallingManager,
    ACconsumptionProgram,    !- Name
    EndOfZoneTimestepBeforeZoneReporting,  !- EnergyPlus Model Calling Point
    CalACconsumption;        !- Program Name 1


!-   ===========  ALL OBJECTS IN CLASS: ENERGYMANAGEMENTSYSTEM:PROGRAM ===========

EnergyManagementSystem:Program,
    CalTemperatureEfficiency,!- Name
    SET Numerator = Tout-Tin,!- Program Line 1
    SET Denominator = (Ts1+Ts2+Ts3+Ts4+Ts5+Ts6+Ts7+Ts8+Ts9+Ts10+Ts11+Ts12+Ts13+Ts14)/14-Tin,  !- Program Line 2
    SET TE = Numerator / Denominator;  !- A4

EnergyManagementSystem:Program,
    CalACconsumption,        !- Name
    SET AC = Qac+Qpa;        !- Program Line 1


!-   ===========  ALL OBJECTS IN CLASS: ENERGYMANAGEMENTSYSTEM:GLOBALVARIABLE ===========

EnergyManagementSystem:GlobalVariable,
    TE,                      !- Erl Variable 1 Name
    AC;                      !- Erl Variable 2 Name


!-   ===========  ALL OBJECTS IN CLASS: ENERGYMANAGEMENTSYSTEM:OUTPUTVARIABLE ===========

EnergyManagementSystem:OutputVariable,
    TemperatureEfficiency,   !- Name
    TE,                      !- EMS Variable Name
    Averaged,                !- Type of Data in Variable
    ZoneTimestep,            !- Update Frequency
    ,                        !- EMS Program or Subroutine Name
    %;                       !- Units

EnergyManagementSystem:OutputVariable,
    ACConsumption,           !- Name
    AC,                      !- EMS Variable Name
    Summed,                  !- Type of Data in Variable
    ZoneTimestep,            !- Update Frequency
    ,                        !- EMS Program or Subroutine Name
    J;                       !- Units

I was very confused about the EMS set up. And I hope anyone who is familiar with EMS can help me! Thank you very much.

EMS for custom output variable

I am trying to set up some custom output variables, so that I can use the custom data to be analysis directly. But I checked the custom output variables by handling the original output variables, I found some problems, which are:

A.When I use the original output variables to calculate 'Temperature Efficiency' and 'AC Consumption' with the same formulas in EMS program, the results does not match with the EMS custom output results, even through I change the reporting frequency from hourly to timestep.

B. The AC system operates from 8:00 AM to 5:00 PM. For calculating the AC Consumption, the result from original output variables is smaller than the EMS result, but usually after a shorter period such as from 8:30 AM, the former result equals with the EMS result.

C. I checked the example files of EMSCustomOutputVariable.idf, and set a simple EMS program to let the T1 plus T2. I found that when the output variable style is 'Zone mean air temperature', the result from original output variables equals the EMS result. But when I change the output variable style to 'Zone air temperature', the two results differ a lot.

The blow is the idf scripts:

!-   ===========  ALL OBJECTS IN CLASS: ENERGYMANAGEMENTSYSTEM:SENSOR ===========

EnergyManagementSystem:Sensor,
    Tout,                    !- Name
    1W,                      !- Output:Variable or Output:Meter Index Key Name
    Zone Air Temperature ;   !- Output:Variable or Output:Meter Name

EnergyManagementSystem:Sensor,
    Tin,                     !- Name
    1W,                      !- Output:Variable or Output:Meter Index Key Name
    Zone Ventilation Air Inlet Temperature ;  !- Output:Variable or Output:Meter Name

EnergyManagementSystem:Sensor,
    Ts1,                     !- Name
    1W_N_Floor,              !- Output:Variable or Output:Meter Index Key Name
    Surface Inside Face Temperature ;  !- Output:Variable or Output:Meter Name

EnergyManagementSystem:Sensor,
    Ts2,                     !- Name
    1W_N_Ceiling,            !- Output:Variable or Output:Meter Index Key Name
    Surface Inside Face Temperature;  !- Output:Variable or Output:Meter Name

EnergyManagementSystem:Sensor,
    Ts3,                     !- Name
    1W_S,                    !- Output:Variable or Output:Meter Index Key Name
    Surface Inside Face Temperature;  !- Output:Variable or Output:Meter Name

EnergyManagementSystem:Sensor,
    Ts4,                     !- Name
    1W_E_S_Wall,             !- Output:Variable or Output:Meter Index Key Name
    Surface Inside Face Temperature;  !- Output:Variable or Output:Meter Name

EnergyManagementSystem:Sensor,
    Ts5,                     !- Name
    1W_N,                    !- Output:Variable or Output:Meter Index Key Name
    Surface Inside Face Temperature;  !- Output:Variable or Output:Meter Name

EnergyManagementSystem:Sensor,
    Ts6,                     !- Name
    1W_W,                    !- Output:Variable or Output:Meter Index Key Name
    Surface Inside Face Temperature;  !- Output:Variable or Output:Meter Name

EnergyManagementSystem:Sensor,
    Ts7,                     !- Name
    1W_C_Ceiling,            !- Output:Variable or Output:Meter Index Key Name
    Surface Inside Face Temperature;  !- Output:Variable or Output:Meter Name

EnergyManagementSystem:Sensor,
    Ts8,                     !- Name
    1W_S_Ceiling,            !- Output:Variable or Output:Meter Index Key Name
    Surface Inside Face Temperature;  !- Output:Variable or Output:Meter Name

EnergyManagementSystem:Sensor,
    Ts9,                     !- Name
    1W_S_Floor,              !- Output:Variable or Output:Meter Index Key Name
    Surface Inside Face Temperature;  !- Output:Variable or Output:Meter Name

EnergyManagementSystem:Sensor,
    Ts10,                    !- Name
    1W_C_Floor,              !- Output:Variable or Output:Meter Index Key Name
    Surface Inside Face Temperature;  !- Output:Variable or Output:Meter Name

EnergyManagementSystem:Sensor,
    Ts11,                    !- Name
    1W_E_N_Wall,             !- Output:Variable or Output:Meter Index Key Name
    Surface Inside Face Temperature;  !- Output:Variable or Output:Meter Name

EnergyManagementSystem:Sensor,
    Ts12,                    !- Name
    1W_E_C_Wall,             !- Output:Variable or Output:Meter Index Key Name
    Surface Inside Face Temperature;  !- Output:Variable or Output:Meter Name

EnergyManagementSystem:Sensor,
    Ts13,                    !- Name
    1W_S_Win,                !- Output:Variable or Output:Meter Index Key Name
    Surface Inside Face Temperature;  !- Output:Variable or Output:Meter Name

EnergyManagementSystem:Sensor,
    Ts14,                    !- Name
    1W_N_Win,                !- Output:Variable or Output:Meter Index Key Name
    Surface Inside Face Temperature;  !- Output:Variable or Output:Meter Name

EnergyManagementSystem:Sensor,
    To,                      !- Name
    ,                        !- Output:Variable or Output:Meter Index Key Name
    Site Outdoor Air Drybulb Temperature ;  !- Output:Variable or Output:Meter Name

EnergyManagementSystem:Sensor,
    Qfan,                    !- Name
    1W,                      !- Output:Variable or Output:Meter Index Key Name
    Zone Ventilation Fan Electric Energy ;  !- Output:Variable or Output:Meter Name

EnergyManagementSystem:Sensor,
    Qhr,                     !- Name
    1W,                      !- Output:Variable or Output:Meter Index Key Name
    Zone Ventilation Sensible Heat Loss Energy;  !- Output:Variable or Output:Meter Name

EnergyManagementSystem:Sensor,
    Qac,                     !- Name
    1W PTHP,                 !- Output:Variable or Output:Meter Index Key Name
    Zone Packaged Terminal Heat Pump Electric Energy ;  !- Output:Variable or Output:Meter Name

EnergyManagementSystem:Sensor,
    Qpa,                     !- Name
    DOAS,                    !- Output:Variable or Output:Meter Index Key Name
    Air System Electric Energy ;  !- Output:Variable or Output:Meter Name


!-   ===========  ALL OBJECTS IN CLASS: ENERGYMANAGEMENTSYSTEM:PROGRAMCALLINGMANAGER ===========

EnergyManagementSystem:ProgramCallingManager,
    TemperatureEfficiencyProgram,  !- Name
    EndOfZoneTimestepBeforeZoneReporting,  !- EnergyPlus Model Calling Point
    CalTemperatureEfficiency;!- Program Name 1

EnergyManagementSystem:ProgramCallingManager,
    ACconsumptionProgram,    !- Name
    EndOfZoneTimestepBeforeZoneReporting,  !- EnergyPlus Model Calling Point
    CalACconsumption;        !- Program Name 1


!-   ===========  ALL OBJECTS IN CLASS: ENERGYMANAGEMENTSYSTEM:PROGRAM ===========

EnergyManagementSystem:Program,
    CalTemperatureEfficiency,!- Name
    SET Numerator = Tout-Tin,!- Program Line 1
    SET Denominator = (Ts1+Ts2+Ts3+Ts4+Ts5+Ts6+Ts7+Ts8+Ts9+Ts10+Ts11+Ts12+Ts13+Ts14)/14-Tin,  !- Program Line 2
    SET TE = Numerator / Denominator;  !- A4

EnergyManagementSystem:Program,
    CalACconsumption,        !- Name
    SET AC = Qac+Qpa;        !- Program Line 1


!-   ===========  ALL OBJECTS IN CLASS: ENERGYMANAGEMENTSYSTEM:GLOBALVARIABLE ===========

EnergyManagementSystem:GlobalVariable,
    TE,                      !- Erl Variable 1 Name
    AC;                      !- Erl Variable 2 Name


!-   ===========  ALL OBJECTS IN CLASS: ENERGYMANAGEMENTSYSTEM:OUTPUTVARIABLE ===========

EnergyManagementSystem:OutputVariable,
    TemperatureEfficiency,   !- Name
    TE,                      !- EMS Variable Name
    Averaged,                !- Type of Data in Variable
    ZoneTimestep,            !- Update Frequency
    ,                        !- EMS Program or Subroutine Name
    %;                       !- Units

EnergyManagementSystem:OutputVariable,
    ACConsumption,           !- Name
    AC,                      !- EMS Variable Name
    Summed,                  !- Type of Data in Variable
    ZoneTimestep,            !- Update Frequency
    ,                        !- EMS Program or Subroutine Name
    J;                       !- Units

I was very confused about the EMS set up. And I hope anyone who is familiar with EMS can help me! Thank you very much.image description

EMS for custom output variable

I am trying to set up some custom output variables, so that I can use the custom data to be analysis directly. But I checked the custom output variables by handling the original output variables, I found some problems, which are:

A.When I use the original output variables to calculate 'Temperature Efficiency' and 'AC Consumption' with the same formulas in EMS program, the results does not match with the EMS custom output results, even through I change the reporting frequency from hourly to timestep.

B. The AC system operates from 8:00 AM to 5:00 PM. For calculating the AC Consumption, the result from original output variables is smaller than the EMS result, but usually after a shorter period such as from 8:30 AM, the former result equals with the EMS result.

C. I checked the example files of EMSCustomOutputVariable.idf, and set a simple EMS program to let the T1 plus T2. I found that when the output variable style is 'Zone mean air temperature', the result from original output variables equals the EMS result. But when I change the output variable style to 'Zone air temperature', the two results differ a lot.

The blow is the idf scripts:

!-   ===========  ALL OBJECTS IN CLASS: ENERGYMANAGEMENTSYSTEM:SENSOR ===========

EnergyManagementSystem:Sensor,
    Tout,                    !- Name
    1W,                      !- Output:Variable or Output:Meter Index Key Name
    Zone Air Temperature ;   !- Output:Variable or Output:Meter Name

EnergyManagementSystem:Sensor,
    Tin,                     !- Name
    1W,                      !- Output:Variable or Output:Meter Index Key Name
    Zone Ventilation Air Inlet Temperature ;  !- Output:Variable or Output:Meter Name

EnergyManagementSystem:Sensor,
    Ts1,                     !- Name
    1W_N_Floor,              !- Output:Variable or Output:Meter Index Key Name
    Surface Inside Face Temperature ;  !- Output:Variable or Output:Meter Name

EnergyManagementSystem:Sensor,
    Ts2,                     !- Name
    1W_N_Ceiling,            !- Output:Variable or Output:Meter Index Key Name
    Surface Inside Face Temperature;  !- Output:Variable or Output:Meter Name

EnergyManagementSystem:Sensor,
    Ts3,                     !- Name
    1W_S,                    !- Output:Variable or Output:Meter Index Key Name
    Surface Inside Face Temperature;  !- Output:Variable or Output:Meter Name

EnergyManagementSystem:Sensor,
    Ts4,                     !- Name
    1W_E_S_Wall,             !- Output:Variable or Output:Meter Index Key Name
    Surface Inside Face Temperature;  !- Output:Variable or Output:Meter Name

EnergyManagementSystem:Sensor,
    Ts5,                     !- Name
    1W_N,                    !- Output:Variable or Output:Meter Index Key Name
    Surface Inside Face Temperature;  !- Output:Variable or Output:Meter Name

EnergyManagementSystem:Sensor,
    Ts6,                     !- Name
    1W_W,                    !- Output:Variable or Output:Meter Index Key Name
    Surface Inside Face Temperature;  !- Output:Variable or Output:Meter Name

EnergyManagementSystem:Sensor,
    Ts7,                     !- Name
    1W_C_Ceiling,            !- Output:Variable or Output:Meter Index Key Name
    Surface Inside Face Temperature;  !- Output:Variable or Output:Meter Name

EnergyManagementSystem:Sensor,
    Ts8,                     !- Name
    1W_S_Ceiling,            !- Output:Variable or Output:Meter Index Key Name
    Surface Inside Face Temperature;  !- Output:Variable or Output:Meter Name

EnergyManagementSystem:Sensor,
    Ts9,                     !- Name
    1W_S_Floor,              !- Output:Variable or Output:Meter Index Key Name
    Surface Inside Face Temperature;  !- Output:Variable or Output:Meter Name

EnergyManagementSystem:Sensor,
    Ts10,                    !- Name
    1W_C_Floor,              !- Output:Variable or Output:Meter Index Key Name
    Surface Inside Face Temperature;  !- Output:Variable or Output:Meter Name

EnergyManagementSystem:Sensor,
    Ts11,                    !- Name
    1W_E_N_Wall,             !- Output:Variable or Output:Meter Index Key Name
    Surface Inside Face Temperature;  !- Output:Variable or Output:Meter Name

EnergyManagementSystem:Sensor,
    Ts12,                    !- Name
    1W_E_C_Wall,             !- Output:Variable or Output:Meter Index Key Name
    Surface Inside Face Temperature;  !- Output:Variable or Output:Meter Name

EnergyManagementSystem:Sensor,
    Ts13,                    !- Name
    1W_S_Win,                !- Output:Variable or Output:Meter Index Key Name
    Surface Inside Face Temperature;  !- Output:Variable or Output:Meter Name

EnergyManagementSystem:Sensor,
    Ts14,                    !- Name
    1W_N_Win,                !- Output:Variable or Output:Meter Index Key Name
    Surface Inside Face Temperature;  !- Output:Variable or Output:Meter Name

EnergyManagementSystem:Sensor,
    To,                      !- Name
    ,                        !- Output:Variable or Output:Meter Index Key Name
    Site Outdoor Air Drybulb Temperature ;  !- Output:Variable or Output:Meter Name

EnergyManagementSystem:Sensor,
    Qfan,                    !- Name
    1W,                      !- Output:Variable or Output:Meter Index Key Name
    Zone Ventilation Fan Electric Energy ;  !- Output:Variable or Output:Meter Name

EnergyManagementSystem:Sensor,
    Qhr,                     !- Name
    1W,                      !- Output:Variable or Output:Meter Index Key Name
    Zone Ventilation Sensible Heat Loss Energy;  !- Output:Variable or Output:Meter Name

EnergyManagementSystem:Sensor,
    Qac,                     !- Name
    1W PTHP,                 !- Output:Variable or Output:Meter Index Key Name
    Zone Packaged Terminal Heat Pump Electric Energy ;  !- Output:Variable or Output:Meter Name

EnergyManagementSystem:Sensor,
    Qpa,                     !- Name
    DOAS,                    !- Output:Variable or Output:Meter Index Key Name
    Air System Electric Energy ;  !- Output:Variable or Output:Meter Name


!-   ===========  ALL OBJECTS IN CLASS: ENERGYMANAGEMENTSYSTEM:PROGRAMCALLINGMANAGER ===========

EnergyManagementSystem:ProgramCallingManager,
    TemperatureEfficiencyProgram,  !- Name
    EndOfZoneTimestepBeforeZoneReporting,  !- EnergyPlus Model Calling Point
    CalTemperatureEfficiency;!- Program Name 1

EnergyManagementSystem:ProgramCallingManager,
    ACconsumptionProgram,    !- Name
    EndOfZoneTimestepBeforeZoneReporting,  !- EnergyPlus Model Calling Point
    CalACconsumption;        !- Program Name 1


!-   ===========  ALL OBJECTS IN CLASS: ENERGYMANAGEMENTSYSTEM:PROGRAM ===========

EnergyManagementSystem:Program,
    CalTemperatureEfficiency,!- Name
    SET Numerator = Tout-Tin,!- Program Line 1
    SET Denominator = (Ts1+Ts2+Ts3+Ts4+Ts5+Ts6+Ts7+Ts8+Ts9+Ts10+Ts11+Ts12+Ts13+Ts14)/14-Tin,  !- Program Line 2
    SET TE = Numerator / Denominator;  !- A4

EnergyManagementSystem:Program,
    CalACconsumption,        !- Name
    SET AC = Qac+Qpa;        !- Program Line 1


!-   ===========  ALL OBJECTS IN CLASS: ENERGYMANAGEMENTSYSTEM:GLOBALVARIABLE ===========

EnergyManagementSystem:GlobalVariable,
    TE,                      !- Erl Variable 1 Name
    AC;                      !- Erl Variable 2 Name


!-   ===========  ALL OBJECTS IN CLASS: ENERGYMANAGEMENTSYSTEM:OUTPUTVARIABLE ===========

EnergyManagementSystem:OutputVariable,
    TemperatureEfficiency,   !- Name
    TE,                      !- EMS Variable Name
    Averaged,                !- Type of Data in Variable
    ZoneTimestep,            !- Update Frequency
    ,                        !- EMS Program or Subroutine Name
    %;                       !- Units

EnergyManagementSystem:OutputVariable,
    ACConsumption,           !- Name
    AC,                      !- EMS Variable Name
    Summed,                  !- Type of Data in Variable
    ZoneTimestep,            !- Update Frequency
    ,                        !- EMS Program or Subroutine Name
    J;                       !- Units

I was very confused about the EMS set up. And I hope anyone who is familiar with EMS can help me! Thank you very much.image description