NREL / EnergyPlus

EnergyPlus™ is a whole building energy simulation program that engineers, architects, and researchers use to model both energy consumption and water use in buildings.
https://energyplus.net
Other
1.15k stars 392 forks source link

EMS actuator no changing Air temperature in Ideal Loads #8579

Closed LorenzoBottaccioli closed 3 years ago

LorenzoBottaccioli commented 3 years ago

I'm trying to use the EMS actuators to manually set the supply mass flow rate and supply air temperature in an

`ZoneHVAC:IdealLoadsAirSystem`. 

Reading the EMS documentation on actuators I see I can edit the "Air Mass Flow Rate” and “Air Temperature”. I have so set sensors and actuators how you can see below. However, I see changes with respect to no actions only in the mass flow (mdot_ideal , mdot_sys ) rate and not in the system temperature (tair_sys). I have also tried to use this actuator

    EnergyManagementSystem:Actuator,
        t_air_act,               !- Name
        NODE BLOCK1:ZONEWEST IN, !- Actuated Component Unique Name
        System Node Setpoint,    !- Actuated Component Type
        Temperature Setpoint;    !- Actuated Component Control Type

But no changes in the temperature as well. I want to do so in order to develop a model predictive control able to regulate both mass flow rate and inlet temperature.

EMS OBJECTS IN THE IDF

    !-   ===========  ALL OBJECTS IN CLASS: ENERGYMANAGEMENTSYSTEM:ACTUATOR ===========
    EnergyManagementSystem:Actuator,
        t_air_act,               !- Name
        BLOCK1:ZONEWEST IDEAL LOADS AIR, !- Actuated Component Unique Name
        Ideal Loads Air System,    !- Actuated Component Type
        Air Temperature;    !- Actuated Component Control Type

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

    EnergyManagementSystem:Sensor,
        T_in,                    !- Name
        Block1:ZoneWest,         !- Output:Variable or Output:Meter Index Key Name
        Zone Mean Air Temperature;  !- Output:Variable or Output:Meter Name

    EnergyManagementSystem:Sensor,
        mdot_ideal,              !- Name
        BLOCK1:ZONEWEST IDEAL LOADS AIR,  !- Output:Variable or Output:Meter Index Key Name
        Zone Ideal Loads Supply Air Mass Flow Rate;  !- Output:Variable or Output:Meter Name

    EnergyManagementSystem:Sensor,
        heat_power,              !- Name
        DistrictHeating:Facility,!- Output:Variable or Output:Meter Index Key Name
        DistrictHeating:Facility;!- Output:Variable or Output:Meter Name

    EnergyManagementSystem:Sensor,
        mdot_sys,                !- Name
        NODE BLOCK1:ZONEWEST ZONE,  !- Output:Variable or Output:Meter Index Key Name
        System Node Mass Flow Rate;  !- Output:Variable or Output:Meter Name

    EnergyManagementSystem:Sensor,
        tair_sys,                !- Name
        NODE BLOCK1:ZONEWEST ZONE,  !- Output:Variable or Output:Meter Index Key Name
        System Node Temperature; !- Output:Variable or Output:Meter Name

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

    EnergyManagementSystem:Actuator,
        MDOT_act,                !- Name
        BLOCK1:ZONEWEST IDEAL LOADS AIR,  !- Actuated Component Unique Name
        Ideal Loads Air System,  !- Actuated Component Type
        Air Mass Flow Rate;      !- Actuated Component Control Type

     EnergyManagementSystem:Actuator,
        t_air_act,               !- Name
        BLOCK1:ZONEWEST IDEAL LOADS AIR, !- Actuated Component Unique Name
        Ideal Loads Air System,    !- Actuated Component Type
        Air Temperature;    !- Actuated Component Control Type

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

    EnergyManagementSystem:ProgramCallingManager,
        sensorsTemp,             !- Name
        EndOfSystemTimestepBeforeHVACReporting,  !- EnergyPlus Model Calling Point
        getSensors;              !- Program Name 1

    EnergyManagementSystem:ProgramCallingManager,
        act,                     !- Name
        BeginTimestepBeforePredictor,  !- EnergyPlus Model Calling Point
        setAct;                  !- Program Name 1

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

    EnergyManagementSystem:Program,
        getSensors,              !- Name
        ;                        !- Program Line 1

    EnergyManagementSystem:Program,
        setAct,                  !- Name
        SET t_air_act = 17;      !- Program Line 1
        SET MDOT_act = 0.1 !- Program Line 2

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

    EnergyManagementSystem:GlobalVariable,
        MDOTact;                 !- Erl Variable 1 Name

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

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

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

    EnergyManagementSystem:OutputVariable,
        mdot_ideal,              !- Name
        mdot_ideal,              !- EMS Variable Name
        Averaged,                !- Type of Data in Variable
        ZoneTimestep,            !- Update Frequency
        ,                        !- EMS Program or Subroutine Name
        kg/s;                    !- Units

    EnergyManagementSystem:OutputVariable,
        MDOTact,                 !- Name
        MDOTact,                 !- EMS Variable Name
        Summed,                  !- Type of Data in Variable
        SystemTimestep,          !- Update Frequency
        ,                        !- EMS Program or Subroutine Name
        kg/s;                    !- Units

    EnergyManagementSystem:OutputVariable,
        mdot_sys,                !- Name
        mdot_sys,                !- EMS Variable Name
        Averaged,                !- Type of Data in Variable
        ZoneTimestep;            !- Update Frequency

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

Please change this line to a description of the defect, with useful supporting information including how the issue was found, conditions that trigger this defect, workarounds for users of the current version, and a clear description of how to validate that a fix is complete for this defect.

Details

Some additional details for this issue (if relevant):

EDIT: Minor Changes to IDF and add results output. file test_act_1.csv has no call on:

    EnergyManagementSystem:ProgramCallingManager,
        act,                     !- Name
        BeginTimestepBeforePredictor,  !- EnergyPlus Model Calling Point
        setAct;                  !- Program Name 1

Checklist

Add to this list or remove from it as applicable. This is a simple templated set of guidelines.

bonnema commented 3 years ago

@LorenzoBottaccioli, after a cursory review of the code, I don't think the calling point you're using (BeginTimestepBeforePredictor) is appropriate for this type of actuator. Maybe try InsideHVACIterationLoop instead? The actuator could very well be set to the value you want at the beginning of the timestep then overwritten during by the HVAC solver. Read here for more details on calling points. I also think the EMS data dictionary would be helpful for debugging (add the Output:EnergyMangementSystem object, here).

LorenzoBottaccioli commented 3 years ago

@bonnema I'll have a read and give you back. However, I have now tested InsideHVACIterationLoop but no changes: I only see the actuation on the mass flow rate (mdot_ideal, mdot_sys) and not in the system temperature (tair_sys).

mjwitte commented 3 years ago

Also, prior to v9.4, the EMS actuators did not take action if the zone load was zero. This was changed for v9.4, see #8109.

mjwitte commented 3 years ago

And there are other changes pending for v9.5, see #8302 and #8519.

LorenzoBottaccioli commented 3 years ago

@mjwitte if you take a look at the csv files you see that the mass flow rate is always set to the 0.1 values when the actuator is used. What is not changing is the air temperature. I have tried to update to the latest E+ version (9.4.0) but I have same issue. I see changes in flow rate but no changes in air temp.

Ciao

LorenzoBottaccioli commented 3 years ago

Okay. I Have solved the issue in the tair_sys by changing:


EnergyManagementSystem:Sensor,
    tair_sys,                !- Name
    NODE BLOCK1:ZONEWEST ZONE,  !- Output:Variable or Output:Meter Index Key Name
    System Node Temperature; !- Output:Variable or Output:Meter Name

in

EnergyManagementSystem:Sensor,
    tair_sys,                !- Name
    NODE BLOCK1:ZONEWEST IN, !- Output:Variable or Output:Meter Index Key Name
    System Node Temperature; !- Output:Variable or Output:Meter Name

I confirm that in the 9.4 version the EMS actuators did take action if the zone load was zero. and not in the 9.0 version.

tnx