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.11k stars 385 forks source link

ABUPS Electric Loads Satisfied value for 'Fuel-Fired Power Generation" is incorrect when using PV and battery storage #4419

Closed BobHenninger closed 8 years ago

BobHenninger commented 10 years ago

Helpdesk Ticket 9123

Posted on: 12 March 2014 10:20 PM I ran without the BCVTB and confirmed that the value reported for "Fuel-Fired Power Generation" is incorrect. It is the sum of these two output variables, which is clearly wrong.

BATERIJA:Electric Storage Production Decrement Energy BATERIJA:Electric Storage Discharge Energy

In order to track the performance of your PV system and battery storage, you will need to use the relevant output:variable results. You can access these also using Output:Table:Monthly (one for the storage, one for the pv generators, and one for the distribution center) if you want results in the table output.

Thank you for calling this to our attention. Mike

Hello!

I've attached used IDF and weather file. Please let me know, what did you find... For simulation I'm using BCVBT.

2014-03-06 19:12 GMT+01:00 EnergyPlus Support energyplus-support@gard.com:

My apologies for the slow response. Please reply and attach your idf file and tell us what epw file you are using.

To answer your first question, energy drawn from the battery is not represented as Fuel-Fired Power Generation.

Mike

Posted on: 18 February 2014 08:32 AM Hello!

I have a simple model with added photovoltaic panels and KiBaM battery model to store power. Everything seems to work ok, but I have one question regarding outputs. Is it possible that energy that is drawn from battery is represented as "Fuel-Fired Power Generation" in final summary report Table.csv /Table.html under Electric Loads Satisfied?

I noticed that PV output power is more or less the same if I use some kind of electrical storage or not. Difference is shown when I add battery or simple storage. It somehow adds almost all the power, that is needed for operating this simple building and final report is strange(difference almost doubles as if there is double the amount of produced electric power EVEN if battery is empty at the beginning of simulation). Is this bug in simulation software or is there something that I'm missing. Is my PV grid producing more power than it could be fed into the grid and difference shows only when there is another "consumer" - battery?

My model is using PhotovoltaicPerformanceSimple, with 11% efficiency, 0.9 fraction of roof surface, which roughly measures 7m x 2.5m. Electric load center:generators uses 1 PV generator, rated electric power output 3000W. Battery is modeled with same specification that is available in InputOutputreference.pdf - 10 modules in parallel, 10 in series...

If you have any idea what could be the cause of this, to my understanding a bit odd situation, please let me know.

Kind regards, Matej Krebelj

User files ContainerWithBattery.idf Jul_Aug_Sep_Okt_Nov_2013CSTHourly.epw

mjwitte commented 10 years ago

There are no fuel-fired generators in this idf, so the reported value for Fuel-Fired Power Generation in the ABUPS Electric Loads Satisfied table output should be zero. Can run this with any epw file.

JasonGlazer commented 9 years ago

May be related to #4622

JasonGlazer commented 8 years ago

@EnergyArchmage @WeiminWang I traced the problem of the ABUPS Fuel-Fired Power Generation reporting a positive value in an IDF file that did not have any kind of fuel-fired generating equipment to the use of some battery stuff being attached to the "ElectricityProduced" "Cogeneration" meter. See lines:

https://github.com/NREL/EnergyPlus/blob/develop/src/EnergyPlus/ManageElectricPower.cc#L1343

https://github.com/NREL/EnergyPlus/blob/develop/src/EnergyPlus/ManageElectricPower.cc#L1345

For every other location that meter is referenced it is just used for generators that use fuel but not in this case. I assume one of you is the person most familiar with the battery code but if not, if you know who is just add them to this thread.

JasonGlazer commented 8 years ago

@EnergyArchmage @WeiminWang. Please review the pull request that addresses this issue. If you think it will have any unintended consequences, please let me know.

mjwitte commented 8 years ago

@JasonGlazer @EnergyArchmage The battery is metered like this:

 Meters for 237,BATERIJA:Electric Storage Production Decrement Energy [J]
  OnMeter=ElectricityProduced:Facility [J]
  OnMeter=ElectricityProduced:Plant [J]
  OnMeter=Cogeneration:ElectricityProduced [J]

 Meters for 249,BATERIJA:Electric Storage Discharge Energy [J]
  OnMeter=ElectricityProduced:Facility [J]
  OnMeter=ElectricityProduced:Plant [J]
  OnMeter=Cogeneration:ElectricityProduced [J]

I don't see why storage should be on any ElectricytProduced meters. The table in question is not the main ABUPS table, but this one:

image

Seems like any battery storage losses should be in the row "Net Decrease in On-Site Storage". What meter/variable is feeding that row?

EnergyArchmage commented 8 years ago

That row in the report is for the change in storage state. You can start out with a fully charged battery and end up with it empty and that could look like production in ABUPS. It isn't accumulated from any meter but rather a simple delta between starting and ending state of charge in store.

What matters here is losses from repeated round trips. Confusing, but it is complex. I think a new row would be something like "Storage round trip loss" and be a negative value

mjwitte commented 8 years ago

I see. We're mixing up apples and oranges here I think. From the perspective of this table, Electric Storage Production Decrement Energy and Electric Storage Discharge Energy don't belong here - they are neither a source nor an end-use - it's not clear that these should be metered at all.

Electric Storage Discharge Energy is an end-use - it consumes power, so maybe that should be metered, like Inverter Ancillary AC Electric Energy.

EnergyArchmage commented 8 years ago

Electric Storage Discharge Energy by itself is not the consumed power, it is what is drawn out of storage. The metering system is used here to calculate the storage losses by summing the difference between energy stored and energy drawn, which occur at different points in time. Meters are especially useful here because the time shifting means that losses cannot really be calculated by the model on a timestep basis in the usual manner.

mjwitte commented 8 years ago

Sorry I pasted in the wrong variable name. I meant Electric Storage Thermal Loss Energy

-------- Original message --------
From: Brent Griffith notifications@github.com
Date:10/15/2015 6:39 AM (GMT-06:00)
To: NREL/EnergyPlus EnergyPlus@noreply.github.com
Cc: "Michael J. Witte" mjwitte@gard.com
Subject: Re: [EnergyPlus] ABUPS Electric Loads Satisfied value for 'Fuel-Fired Power Generation" is incorrect when using PV and battery storage (#4419)
Electric Storage Discharge Energy by itself is not the consumed power, it is what is drawn out of storage. The metering system is used here to calculate the storage losses by summing the difference between energy stored and energy drawn, which occur at different points in time. Meters are especially useful here because the time shifting means that losses cannot really be calculated by the model on a timestep basis in the usual manner. — Reply to this email directly or view it on GitHub.
JasonGlazer commented 8 years ago

So it sounds like "Electric Storage Production Decrement Energy" and "Electric Storage Discharge Energy" should not be attached to the "Cogeneration:ElectricityProduced". That is the code change that I did with #5263. On that pull request @EnergyArchmage suggested a new meter related to "storage". I am not sure that adding a new meter is really the level of work for fixing an issue, it should probably have a NFP and the process of review attached to it. So at this point I think I should just leave these two output variables not connected to any meter. Do you both agree? If not what else should I do?

mjwitte commented 8 years ago

Adding a meter is relatively simple, but I'm not sure if a storage meter is useful. If I'm understanding Electric Storage Thermal Loss Energy correctly, it seems that should be added to a meter. Do both types of electric storage have this variable or equivalent?

JasonGlazer commented 8 years ago

I am not sure I understand the connection with "Electric Storage Thermal Loss Energy". The issue is related to "Electric Storage Production Decrement Energy" and "Electric Storage Discharge Energy".

mjwitte commented 8 years ago

@EnergyArchmage said the difference between "Electric Storage Production Decrement Energy" and "Electric Storage Discharge Energy" was supposed to represent the losses involved in charging/discharging. Seems that "Electric Storage Thermal Loss Energy" is that loss.

EnergyArchmage commented 8 years ago

That is an interesting way of thinking about it. The model could be reworked to do that I suppose but that isn't the case now. There is a relationshop of course but not they are not the same. The thermal losses (to the surrounding zone) are more approximated at this point and not carefully metered when you have charging and discharging in the same timestep.

A battery state of charge can just fade away while sitting idle, without giving off significant heat. The thermal losses are more for when it is actively being used.

Note that there is a new project starting up to do a lot of rework in this area, so this issue could just be left to that project for this release cycle.

Storage losses are very significant, I do not understand the resistance to metering them.

JasonGlazer commented 8 years ago

I am not opposed to metering them but putting them on the "ElectricityProduced", "COGENERATION" meter pushes them into the Electric Loads Satisfied table under Fuel-Fired Power Generation. They are neither fuel-fired or power generation nor are related to satisfying the buildings need for power. They really ought to be on a different meter that does not flow into that table.

EnergyArchmage commented 8 years ago

If storage is being used to help satisfy electric loads, and it lops off 30% of the PV production, how is that not related?

JasonGlazer commented 8 years ago

I believe the control volume is the building. Storage is within the control volume and not crossing it. The Electric Loads Satisfied table is trying to document what is crossing in and out of the building control volume.

EnergyArchmage commented 8 years ago

Okay. Then I guess the other way to go would be to use the Generators end use meter and flip the sign of each of the outputs. Then we'll just get questions about why the generators are using electricity.

JasonGlazer commented 8 years ago

Maybe I am not understanding. Is the electricity that is being put on Electric Storage Production Decrement Energy and Electric Storage Discharge Energy not already being satisfied by either the generators in the plant or the electric utility?

EnergyArchmage commented 8 years ago

Oh sure, it is coming from those sources. I just think of storage as a part of the system producing the electricity rather than part of the building or HVAC. I shouldn't have added the snarky comment, it seems reasonable to treat the storage losses in the same way that ancillary electricity consumption related to generators gets metered as an end use.

changes would be like the following (draft)

  SetupOutputVariable( "Electric Storage Energy [J]", ElecStorage( StorNum ).EnergyStored, "System", "Sum", ElecStorage( StorNum ).Name, _, "Electricity", "GENERATORS", _, "Plant" );

  ElecStorage( ElecStorNum ).DecrementDrawnEnergy = -1.0 * ElecStorage( ElecStorNum ).DrawnEnergy

  SetupOutputVariable( "Electric Storage Discharge Decrement Energy [J]", ElecStorage( StorNum ).DecrementDrawnEnergy, "System", "Sum", ElecStorage( StorNum ).Name, _, "Electricity", "GENERATORS", _, "Plant" );
JasonGlazer commented 8 years ago

@EnergyArchmage The only end use close to "Generators" is "Cogeneration" which we have already discussed. How about:

SetupOutputVariable( "Electric Storage Charge Energy [J]", ElecStorage( StorNum ).StoredEnergy, "System", "Sum", ElecStorage( StorNum ).Name, _, "Electricity", "ExteriorEquipment", "Batteries", "Plant" );

SetupOutputVariable( "Electric Storage Discharge Decrement Energy [J]", ElecStorage( StorNum ).DecrementDrawnEnergy, "System", "Sum", ElecStorage( StorNum ).Name, _, "Electricity", "ExteriorEquipment", "Batteries", "Plant" );

I'm not familiar with the ElecStorage type, these are now both expressing energy consumption, right?

EnergyArchmage commented 8 years ago

I just meant it should show in the "Generators" row in the ABUPS end use table, whatever meter fills that is fine, even it is "Cogeneration" meter. The big change is from "ElectrictyProduced" to "Electricity."

No, they are not both consumption. Again the losses are the difference between the two meters. One is positive the other is negative and the metering system is calculating the losses. The signs on both need to flip from existing code because now it becomes a positive consumption, whereas before it was a negative production.

mjwitte commented 8 years ago

Isn't this going to look strange in the main ABUPS report if a simulation has a big change in stored energy from start to finish? I'm still not sold on using the difference of in vs out to compute losses.

mjwitte commented 8 years ago

@EnergyArchmage Just to be clear, your proposed draft changes add a meter to "Electric Storage Energy" and add a new metered variable named ""Electric Storage Discharge Decrement Energy." Is that correct?

And these changes would be in addition to the changes already showing in PR#5263?

EnergyArchmage commented 8 years ago

it seems all my suggestions have been rejected. I have no more ideas.

mjwitte commented 8 years ago

No, I'm reconsidering this one from Oct 16, but I want to be sure I understand it:

it seems reasonable to treat the storage losses in the same way that ancillary electricity consumption related to generators gets metered as an end use.

changes would be like the following (draft)

  SetupOutputVariable( "Electric Storage Energy [J]", ElecStorage( StorNum ).EnergyStored, "System", "Sum", ElecStorage( StorNum ).Name, _, "Electricity", "GENERATORS", _, "Plant" );

  ElecStorage( ElecStorNum ).DecrementDrawnEnergy = -1.0 * ElecStorage( ElecStorNum ).DrawnEnergy

  SetupOutputVariable( "Electric Storage Discharge Decrement Energy [J]", ElecStorage( StorNum ).DecrementDrawnEnergy, "System
JasonGlazer commented 8 years ago

@mjwitte and @EnergyArchmage so what should I be doing? The changes that Brent suggested and not use of exterior equipment? I just want to get this issue resolved.

EnergyArchmage commented 8 years ago

The batteries can give off heat to a zone, so I do not agree that exterior equipment is a good option.

If the end-use-as-generator's-ancillary approach is okay. The entire report variable called Electric Storage Production Decrement Energy , would go away as it is no longer needed nor very useful. In https://github.com/NREL/EnergyPlus/pull/5263 the change to take Electric Storage Discharge Energy off a meter is okay and the variable can stay. The report Electric Storage Charge Energy stays and gets put on a meter (using "Electricity", "Cogeneration"). A new data structure variable called something like DecrementDrawnEnergy is added, which simply the negative of DrawnEnergy and need code to fill the value. A new output variable called something like Electic Storage Discharge Decrement Energy is created and points to the the new DecrementDrawnEnergy and gets put on a meter (using "Electricity", "Cogeneration").

JasonGlazer commented 8 years ago

Lets move this discussion to #5263 pull request since we are talking about a solution rather than the original problem.

mjwitte commented 8 years ago

Closed via #5300