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

Why is the result of plantloop operation incompatible with the strategy specified in EMS:Program?

asked 2017-06-14 04:09:26 -0600

Fan's avatar

updated 2017-06-15 14:37:30 -0600

I used an EMS:Program(see the following blockquote) to control the operation of PlantLoop. In short, the program will decide the number of chillers to stage on according the cooling demand. ( 1chiller if demand is between [0,Cap], and 2 chillers if demand is between [Cap, 2Cap]) Cap here means the rated capacity of the chiller and is 1481477 in this case.

EnergyManagementSystem:Program,
    Cooling_dispatch_Values, !- Name
    IF  CoolSys1_LoopDmnd < -1481477,  !- Program Line 1
        SET Chil1_Disptch = CoolSys1_LoopDmnd/2,  !- Program Line 2
        SET Chil2_Disptch = CoolSys1_LoopDmnd/2,  !- A4
   ELSEIF CoolSys1_LoopDmnd < 0,  !- A5
      SET Chil1_Disptch =  CoolSys1_LoopDmnd,  !- A6
      SET Chil2_Disptch = 0.0, !- A7
ELSE,                    !- A8
     SET Chil1_Disptch = 0.0, !- A9
     SET Chil2_Disptch = 0.0, !- A10
ENDIF;                   !- A11

However, the result is confusing in that even if the cooling demand is larger than 1481477(rated cap), there are still some moments when only one chiller is turned on. Parts of these inconsistencies are shown in the following table.

----------------Table1-----------------------------------------------------------
Date/Time          coolingDmnd    Ele-PowerOfchil1   Ele-PowerOfchil2 
01/01  08:35:00     1484323.003      106556.5292              0
01/01  10:11:15     1493364.145      110266.0414              0
01/01  10:15:00     1488649.626      109615.4136              0
01/01  11:12:16     1499195.511      110652.2023              0
01/01  11:53:10     1502321.217      110640.5195              0
01/01  12:26:15     1514519.749      111723.4092              0
01/01  12:43:38     1502297.995      110866.6415              0
01/01  13:03:19     1506863.348      109632.451               0
01/01  15:17:08     1514534.598      110532.2262              0
01/01  16:12:30     1515863.384      112271.376               0
01/02  05:45:00     1490389.698      107734.7433              0
01/02  06:10:00     1508263.231      109458.4895              0

So why do these situations occur, and how can I avoid these situations?

Any help will be greatly appreciated.


Updated

I have uploaded the .idf file to Github(ASHRAE90.1_OfficeLarge_STD2013_Miami_V1.idf in this repository: https://github.com/faithefeng/EnergyP...) . This model is a prototypical building in Miami as indicated by file name, and I have modified the control scheme for Plant Loop using EMS.


Updated 2

I have used the EDD to trace the Erl Program. Here is one record of these inconsistencies.

COOLING_DISPATCH_VALUES,Line 1,SET AA = COOLSYS1_LOOPDMND,-1484323.002751, Occurrence info=Miami Intl Ap FL USA TMY3 WMO#=722020, 01/01 08:32 - 08:35
COOLING_DISPATCH_VALUES,Line 2,IF  COOLSYS1_LOOPDMND < -1481477,1.000000, Occurrence info=Miami Intl 
   Ap FL USA TMY3 WMO#=722020, 01/01 08:32 - 08:35
COOLING_DISPATCH_VALUES,Line 3,SET CHIL1_DISPTCH = COOLSYS1_LOOPDMND/2,-742161.501375, Occurrence  info=Miami Intl Ap FL USA TMY3 WMO#=722020, 01/01 08:32 - 08:35
COOLING_DISPATCH_VALUES,Line 4,SET CHIL2_DISPTCH = COOLSYS1_LOOPDMND/2,-742161.501375, Occurrence info=Miami Intl Ap FL USA TMY3 WMO#=722020, 01/01 08:32 - 08:35

As shown, both ChIL1_DISPTCH and ChIL2_DISPTCH are -742161.501375, which means at this moment(01/01 08:32 - 08:35), both these two chillers are turned on. But the confusing part is that in the output files only chiller1 is used ... (more)

edit retag flag offensive close merge delete

Comments

@Faithefeng it would be helpful if you also included the input fields for the other EMS objects (Actuators, Sensors, Program Calling Manager, Output Variable, etc.) to help people provide a better answer.

Have you tried using > 1481477 instead of < -1481477 in your IF / ELSE logic?

Aaron Boranian's avatar Aaron Boranian  ( 2017-06-14 10:45:19 -0600 )edit

I think @Aaron Boranian is correct that you need to revise your IF/ELSE expressions. Both the IF and ELSEIF expressions evaluate to TRUE for cooling loads < -1481477. The EMS application guide indicates that the first ELSEIF clause that evaluates to TRUE will execute. You could fix this by swapping the IF <expression> with the ELSEIF <expression> to swap the order of evaluation.

Molly Curtz's avatar Molly Curtz  ( 2017-06-14 15:10:22 -0600 )edit

@Aaron Boranian, I have uploaded the .idf file (see the updated question). Thanks for you help.

Fan's avatar Fan  ( 2017-06-14 22:03:15 -0600 )edit

I came to same conclusion as you. The EMS program is doing what it is supposed to do. I do not understand either why chiller2 stays off. I tried to see if an availabilityManager or another EMS program could be the problem, but I couldn't find anything that would turn it off. This might be a bug.

Julien Marrec's avatar Julien Marrec  ( 2017-06-15 08:09:22 -0600 )edit

Just to note, my comment above is incorrect. I ran your file and looked at the EDD line trace. Once the IF expression evaluated to true, the program exits the IF/ELSEIF/ELSE. I got an incorrect impression from the EMS Application Guide documentation on IF statements. Also, I don't have an answer to your question, but will post an "answer" below so I can share an observation.

Molly Curtz's avatar Molly Curtz  ( 2017-06-15 11:51:00 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2017-06-15 12:14:51 -0600

Molly Curtz's avatar

updated 2017-06-15 15:37:52 -0600

Here is an observation, but not a complete answer: I ran your file for a short runperiod and looked at the EDD. What I notice is that the EMS program "COOLING_DISPATCH_VALUES" is being called many times for a given "Occurance info" timestamp. (Can someone else please chime in to explain why this is? I know that with the EMS calling point of UserDefinedComponentModel The program will be called each time the plant component is simulated but why is it being called multiple times for a single HVAC timestep?) I'm not familiar enough with EMS to explain this well, but I think the timestamp is the "HVAC" timestep, that would correspond to Output:Variable Field:ReportingFrequency input value of "Detailed". So it looks to me like the final occurrance of the variable assignment for a given HVAC timestep is what is being reported. I am linking below a section of the EDD which shows this happening. The program is called many times for the Timestamp 01/01 15:42 -15:43. For the inital runs of the program the COOLSYS1_LOOPDMND is less than -1,481,477 and the IF branch executes. But for the later, and for the final run, at that timestamp COOLSYS1_LOOPDMND is greater than -1,481,477 (-1,393,557), and the ELSEIF branch executes. This link has a portion of the EDD file, so you can see an example of what I am referring to (note this image does not include all of the times the program ran for the 15:42-15:43 timestep, just the later and last runs.) C:\fakepath\Portion_of_EDD.png

edit flag offensive delete link more

Comments

For the question --why the EMS program "COOLING_DISPATCH_VALUES" is being called many times, the reason might is that within each "system timestep", HVAC system calculation is iterated to reach a certain condition,as in this figure.

I am a beginner in Energyplus, and my understanding may be incorrect.

Fan's avatar Fan  ( 2017-06-15 22:26:17 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Training Workshops

Careers

Question Tools

2 followers

Stats

Asked: 2017-06-14 04:09:26 -0600

Seen: 175 times

Last updated: Jun 15 '17