electricitymaps / electricitymaps-contrib

A real-time visualisation of the CO2 emissions of electricity consumption
https://app.electricitymaps.com
GNU Affero General Public License v3.0
3.5k stars 932 forks source link

Display bug regarding hydrostorage CO2 #3668

Open ThomasAuriel opened 2 years ago

ThomasAuriel commented 2 years ago

In co2eq_parameters.json, hydro discharge and batterry discharge are specified. The value computed is the national/world average CO2 intensity.

https://github.com/electricitymap/electricitymap-contrib/blob/master/config/co2eq_parameters.json

By doing so, are not you counting two times the CO2 produced for stored Wh ? One time at the generation and one time at the discharge ?

Thank you, Thomas

corradio commented 2 years ago

Hello @ThomasAuriel ,

Good to see you here. Emissions are counted during discharge only (the discharge value is 0), as can be seen here: https://github.com/electricitymap/electricitymap-contrib/blob/master/config/co2eq_parameters.json#L4-L8 No double counting!

Macquaria commented 2 years ago

Hi @corradio ,

I'm not sure you understood what @ThomasAuriel meant by "counting the CO2 twice", I may be mistaken but imho his remark is valid.

Imagine a situation where 1 kWh is generated with a 50/50 nuclear/coal mix, and stored in batteries or a pumped hydro plant at 7:00, and released by the same storage facility at 8:00. The 7:00 emission figure includes the 450 g for its generation with the nuclear/coal mix. No effect of battery or hydro charge, as you mentioned. The 8:00 emission figure includes the national average intensity (say 450 g) for the kWh discharged by the storage facility. However, as you know, the release itself doesn't directly emit any CO2, the precise reason why ElectricityMap allocates it 450 g is because of the dirtiness of this kWh's initial generation.

So as you see, the 450 g emitted for this stored kWh is indeed counted twice !

This seems to be a real issue. To me, the storage discharge emissions figure should reflect the lifecycle emissions of batteries/PHS infrastructure themselves, with no consideration for the CO2 that has been released to generate the electricity that transits through them.

jarek commented 2 years ago

I think/suspect the initial setup of storage/battery operations has been based on cross-border exchanges. Electricity Map does subtract the emissions "exported" from a region's total, so that works. But I'm not sure if the emissions "stored" are subtracted - I can't seem to see this happening in the UI.

Taking for example Austria right now, with data available for 7pm EST / 1am Austrian time: the consumption chart shows exports and pumping hydro as negative. But while the emissions chart shows exports as negative, it doesn't show pumping hydro being negative as well. So are the emissions associated with the production of energy subsequently stored in the pumped hydro being subtracted, and just not shown as such, so it's a display bug? If they're not being subtracted in data, it does look like it's double-counting.

austria 3am consumption

austria 3am emissions

Macquaria commented 2 years ago

Thanks @jarek for illustrating the point.

The "?" figure instead of "0" for charging hydro/battery storage carbon emissions is intriguing, but I'm almost certain there's no substraction like for electricity exports.

Actually, substracting average emissions when pumping/charging wouldn't be a good way to fix the double counting. Indeed, storage facilities have an efficiency <1 (~0.8 for PHS, ~0.9 for li-ion batteries). Consequence : if a pumped storage hydro plant "removes" 1 kWh x Average carbon intensity when pumping, it will only release 0.8 kWh x Average carbon intensity, so that its overall carbon footprint will be counted as ... negative.

To me, the simple and proper way to fix the suspected double-counting would be to maintain a null toll on emissions when pumping/charging, and assign the storage system's life cycle emissions (overall indirect emissions / amount of electricity released over lifetime) when discharging.

corradio commented 2 years ago

Hi all,

Thanks for the remark. I confirm there is no double counting. As @jarek mentions, storage works just like an exchange, in the sense that when charging, emissions are "exported" to a virtual country (i.e. the storage system) and are thus deducted. When discharging, emissions are "imported" from this virtual country.

To me, the simple and proper way to fix the suspected double-counting would be to maintain a null toll on emissions when pumping/charging, and assign the storage system's life cycle emissions (overall indirect emissions / amount of electricity released over lifetime) when discharging.

That's exactly how the system works. @Macquaria in the example you present, the 450g are excluded at charging time (just like emissions exported are excluded) and taken into account at discharge time (as part of the consumption mix).

Note however emissions of discharge are currently based on the grid's average intensity. Improvements would be:

corradio commented 2 years ago

So are the emissions associated with the production of energy subsequently stored in the pumped hydro being subtracted, and just not shown as such, so it's a display bug? If they're not being subtracted in data, it does look like it's double-counting.

Good point, that's a display bug! They should be shown as negative just as the exchanges. Maybe we should refocus the issue on this bug?

madsnedergaard commented 1 year ago

I'm looking into this again, but need some help on understanding what the correct visual representation should be before making the changes :)

When storing/charging...

Screenshot 2023-02-26 at 21 20 08

What numbers should be displayed in the tooltip - should the question marks just be replaced with 0?

Screenshot 2023-02-26 at 21 19 37

The bar should be negative (on the left side of the axis) like with exports, is what I gathered from previous comments - is that correct?

When discharging...

Screenshot 2023-02-26 at 21 20 00 Screenshot 2023-02-26 at 21 19 47

Can someone verify that all numbers are indeed correct here? :)

corradio commented 1 year ago

Hello @madsnedergaard ,

A simple way to think about this is with an analogy to exchanges: charge is the same as export (from country to storage system), discharge is the same as import (from country to storage system). Therefore, the carbon intensity of charge (export) is the same as the carbon intensity of the country. The % emissions associated are intensity volume / total_positive, where total positive are the emissions available in a country (imported + produced + discharged, ignoring exports and charging). Some of these emissions will be exported (or stored). If I remember correctly, the denominator for % should always be available* electricity/emissions (i.e. total_positive).

Hope it clarifies things!