quintel / etengine

Calculation engine for the Energy Transition Model
https://energytransitionmodel.com/
MIT License
15 stars 7 forks source link

Demand including export does not equal supply when electricity storage is installed #1227

Open mabijkerk opened 2 years ago

mabijkerk commented 2 years ago

When I open a blank scenario on beta, add 10.0 GW of flow batteries and turn the forecasting algorithm on, I get this scenario. The source of electricity production chart then shows a slight difference between total production and total demand (including demand for export).

Screenshot 2022-01-19 at 08 46 20

It does not seem limited to flow batteries: if I install e.g. 10.0 GW of large-scale batteries with the forecasting algorithm on, instead of the flow batteries, the total demand including export (546.5 PJ) also exceeds total supply (544.6 PJ):

Screenshot 2022-01-19 at 08 51 28

When I turn off the forecasting algorithm and adjust the prices to increase the utilisation of the large-scale batteries I get this scenario. In this case the total supply (549.0 PJ) exceeds total demand including export (548.4 PJ).

Screenshot 2022-01-19 at 08 55 58

I don't think any series could be missing in the supply-side queries, since batteries only pass on the electricity of other sources of electricity. If need be I can look into the issue some more and try to pin down where it goes wrong exactly, but I'm also curious if you already might have an idea @antw.

antw commented 2 years ago

I'm pretty sure this would be fixed by https://github.com/quintel/etengine/issues/1218. I tested the last scenario with the MV battery, and the input and output curves have a significant mismatch. This implies that there's a lot of unused energy remaining in the battery at the end of the year. This mismatch is exactly the same as in the chart:

mabijkerk commented 2 years ago

Okay so that explains the mismatch for price-based behaviour, where there is unused energy left in the large-scale battery at March 31st. The total supply then exceeds total demand.

However, with the optimisation algorithm on you state that there should be no mismatch:

The new battery algorithm does not have this problem since it optimizes the battery across the whole year, rather than one hour at a time.

This therefore does not seem to explain the second example where, with the optimisation algorithm on, the total supply is lower than total demand. For reference this is the scenario.

Screenshot 2022-01-31 at 16 18 43
antw commented 2 years ago

This therefore does not seem to explain the second example where

Thanks, this insight put me on the correct path. I'm using a simplified scenario for my examples:

Unfortunately, I've only got bad news:

It's useful to understand the difference between the two values in the chart:

Electricity flows

Excess electricity (including batteries) isn't connected in any way to the electricity network. Instead, we've got a completely disconnected subgraph where excess electricity ends up:

Screenshot 2022-02-01 at 15 52 34

The "Demand (incl. export)" is querying the electricity consumption (final demand), while "Total" is querying production.

This isn't an issue because storage doesn't change the amount of electricity production or consumption. It changes when it is produced and consumed. The logic was that these nodes don't need to connect to the network because the electricity is already represented there.

Screenshot 2022-02-01 at 14 50 28 (ignore for now that many excess electricity options should connect to the MV or LV network)

Losses

A moment ago, I said:

storage doesn't change the amount of electricity production or consumption

This is, of course, completely untrue:

  1. Stored electricity can decay in some storage options.
  2. Energy is sometimes lost when discharging.

Screenshot 2022-02-01 at 15 38 24

These losses happen completely outside of the normal electricity network. Note how the amount of energy entering the HV network is 1.9 PJ higher than the energy that leaves. A producer has to output those 1.9 PJ to account for the MV battery loss but that loss isn't represented anywhere on the consumption side of the HV network.

The result is:

Solution

I don't think there is a solution aside from reconsidering how we structure electricity storage in the graph. I feel it should be connected to the electricity network, but I imagine this is non-trivial:

I propose we combined this with #1218 into a full modeling project at some point. I don't see a quick fix.


Including @ChaelKruip.

mabijkerk commented 2 years ago

This is also related to https://github.com/quintel/etsource/issues/2493. It seems to me that the goal of that issue is indeed to lose the excess electricity node, which makes sense because flexible demand technologies are no longer limited to using only excess electricity.

The 1.9 PJ of loss is not accounted for when querying electricity consumption as it doesn't happen on a node that is reachable from the consumer.

At least for this chart, can't we query the losses in batteries and add them to electricity consumption query? Or would that be 'hiding' the current flawed calculations?

github-actions[bot] commented 2 years ago

This issue has had no activity for 60 days and will be closed in 7 days. Removing the "Stale" label or posting a comment will prevent it from being closed automatically. You can also add the "Pinned" label to ensure it isn't marked as stale in the future.