The Space Between Money and the Planet

Is there an opportunity cost to saving carbon with batteries?

10 minute read


Is there an environmental opportunity cost to making money from batteries in Australia?

I’ll show that there is - maximizing profit from operating a battery will completely wipe out any environmental value of the battery 50% of the time!

The ‘just make money’ fallacy

In my career I’ve often encountered the following attitude:

Environmentally effective climate action must also be economically effective - we need to make money in order to save the planet.

It’s often backed up with the logical view that renewables are low variable cost generators, always able to bid into electricity markets at prices much lower than high variable cost generators (like gas and coal). This relationship between price and generator carbon intensity

I’ve held this view at one point in my career - I’ve only just got around to answering it (with data).

This is a great example of having your cake and eating it too. Here I’ll show this attitude isn’t always correct.

Importance of battery storage

Battery storage is a key technology of the clean energy transition. Storage is necessary to manage a grid with high levels of intermittent generation, like wind and solar.

Once a wind turbine or solar panel is built, operating that asset is straightforward - you generate as much as you can based on the amount of wind or sun available at that moment. There is no decision to make or opportunity cost to trade off - when the resource is available, you use as much as possible.

Batteries pose a more challenging control problem. A battery makes decisions to charge or discharge based on an imperfect view of the future, with competing objectives and value streams.

In the price arbitrage scenario, a battery wants to purchase cheap electricity and sell it at a higher price. A battery that does the opposite, that charges when electricity prices are high and discharges when they are low, will lose money.

A battery that charged with dirty electricity and displaced clean electricity would increase carbon emissions. Charging would increase the load on the dirtier marginal generator, and discharging will decrease the load on the cleaner marginal generator.

Price and carbon signals, price and carbon worlds

In an ideal world, we would be able to operate a battery to both make money and save carbon at the same time. If clean electricity is cheap and dirty electricity is expensive, we can operate our battery to make money, and know that we will also be saving carbon.

In the opposite world, where dirty electricity is cheap and clean electricity is expensive, there would be an opportunity cost for saving carbon. There would be situations where you would need to reduce the environmental benefit of operating your battery in order to make more money.

The delta between these two worlds can be measured in terms of two things we care about - money and carbon. Below is a scenario where there is an opportunity cost to saving carbon - we can measure the delta between these two worlds:

  Optimize for Money Optimize for Carbon Delta
Money saved $ 200 50 150
Carbon saved tC 10 20 10
    Carbon Price $/tC 15

Choosing to prioritize money over carbon means we make $150 more than if we optimized for carbon, but we generate 10 tC more than if we optimized for carbon.

This allows us to calculate a carbon price of 15 $/tC. This carbon price is the ratio of money gained by optimizing for money to the carbon saving gained by optimizing for carbon.

This carbon price gives some indication about the level of support (via a revenue neutral carbon tax on electricity market participants) required to counteract the misalignment between our price and carbon signals.

We are would be giving the market $150 to balance out the money that is lost when optimizing for carbon, and receiving 10 tC of carbon savings in return.

Reproducing these results

View results

If you want to view the results generated by this work, you can grab the results from the adgefficiency-public S3 bucket.

The recommended way is to install the awscli Python package (you’ll need Python installed) and sync the results folder to notebooks/results (this is where the notebooks that live inside the notebooks folder expect the data to be):

$ pip install awscli
$ git clone https://github.com/ADGEfficiency/energy-py-linear
$ cd energy-py-linear
$ aws s3 sync s3://adgefficiency-public/space-between/results ./notebooks/results --no-sign-request

After downloading these results you can use the space-between-viewer notebook to inspect them.

Re-running the experiment

You can run the code that generated these results by cloning energypy-linear at commit 1d19e3e1, and running make space-between to setup the experiment (you’ll need Python installed):

$ git clone https://github.com/ADGEfficiency/energy-py-linear
$ cd energy-py-linear
$ git checkout 6fdaa6eb25667fc1acdaa8712c2d783f0c560427
$ make space-between

This make command will:

  • install the energypylinear and nemdata Python packages and their requirements,
  • use nemdata to get price & carbon data,
  • run the linear programs for the price & carbon signals,
  • save results and generate a summary.

After running make space-between, you can use the space-between-expt notebook to run the full experiment.

If you can’t get any of this working feel free to email me at adam.green@adgefficiency.com.

Methods

This work uses two tools - nem-data and energypy-linear.

nem-data is a CLI for downloading Australian electricity market data from a shell:

$ nem -s 2014-01 -e 2020-12 -r trading-price

energypy-linear is a Python library for optimizing the dispatch of batteries operating in price arbitrage:

import energypylinear as epl
mdl = epl.Battery(power=2, capacity=4, efficiency=1.0)
mdl.optimize(prices=[10, 20, 50, -10], freq="60T")

The battery model is a mixed-integer linear program built in PuLP, that optimizes the dispatch of a battery with perfect foresight of future prices and marginal carbon intensities.

The only value stream available to the battery is the arbitrage of electricity from one interval to another. The battery is optimized in monthly blocks with interval data on a 5 minute frequency.

Optimize for price or carbon

The battery model can be optimized on one of two objectives - either price or carbon. Optimizing for price means the battery will import electricity from the grid at low prices and export it during high prices, leading to an economic saving.

Optimizing for carbon means the battery will import electricity from the grid at low marginal carbon intensity and export it during high marginal carbon intensity, leading to a carbon saving.

Below is an example of optimizing a battery for these two objectives - the left optimizing a battery for money, on the right optimizing a battery for carbon:

Comparing the optimization for price (left) and carbon (right).


An important sense check when looking at optimized battery profiles is that the battery ends the period on zero charge, which happens for both the scenarios above.

Datasets

This experiment requires data - a price signal and a carbon signal.

This study uses data from 2014 to end of 2020:

  • price signal = 30 minute trading price in South Australia,
  • carbon signal = 5 minute NEMDE data + NEM generator carbon intensity in South Australia.

The NEMDE dataset offers a marginal carbon intensity, which is different from the more commonly reported average carbon intensity.

The 30 minute price data is upsampled to 5 minutes to align with the carbon data.

Results

The chart below shows the price & carbon benefit from optimizing our battery for price and carbon:

Monthly price & carbon benefits when optimizing for price (left) and carbon (right) from 2014 to end of 2020.

When we optimize for money, we will have a negative effect on the environment for 53.5 %of our 84 months. When we optimize for carbon, we will lose money for 84.5 % of our 84 months.

The chart below again shows the data grouped by month - showing only the delta between our two worlds:

  • the price delta - the difference between the optimize for money and optimize for carbon worlds in thousands of Australian dollars per month,
  • the carbon delta - the difference between the optimize for money and optimize for carbon worlds in term of tons of carbon savings per month,
  • the monthly carbon price - the ratio of our price to carbon deltas.

Monthly deltas from 2014 to end of 2020.

The chart below shows the results grouped by year:

Annual deltas from 2014 to end of 2020.

One takeaway from the plot above is that a carbon price of below 100 $/tC would be enough to fully incentivize batteries to maximize both their economic and carbon savings.

This carbon price would be applied in proportion to the carbon intensity of the electricity produced by each market participant.

Exploring this carbon price metric

Imagine we have a system where our deltas are $500 and 50 tC, giving a carbon price of $/tC 10.

What this means is that if we could receive $500 of income by dispatching in a carbon friendly way, this would be enough to cancel out the $500 we could have made ignoring carbon and optimizing for price.

  Scenario One Scenario 2
Money saved $ 500 400
Carbon saved tC 50 50
Carbon Price $/tC 10 8

This carbon price is a break-even carbon price for the battery - it is what we would have to pay the market to offset the lost revenue of $500.

Effect of efficiency & forecast error on carbon price

If we make mistakes on the dispatch of our battery, we may end up with a delta of $400 and 50 tC, giving a carbon price of $/tC 8.

Assuming that we still have a delta of 50 tC may be a stretch (roundtrip efficiency would affect price & carbon performance equally).

I initially found this counter-intuitive. I’m so used to the idea that high electricity prices are a good thing - a high electricity price makes the business case for renewable generation and battery storage stronger. Here we see that the more expensive the electricity, the higher of carbon price to counter the value of the that electricity.

The dirtier the electricity, the lower carbon price we need to incentive to save the same amount of money. This reminds me of a similar situation in energy efficiency - highest value when replacing dirty or inefficient plant.

Criticism

Choice of data

For this study I used the 30 minute South Australia trading price and the 5 minute NEMDE data for a carbon signal.

The intensity from the NEMDE data is a marginal intensity, supplied by the NEMDE solver as the slack variable for increasing demand.

By using this signal we are assuming that any actions we took would not change how the market is dispatched - this will be true up to a point (the size of the marginal bid).

Using different price and carbon signals will change the results of this study - this isn’t a fatal criticism but it should reinforce that this study is heavily dependent on the choice of data.

We can add to this the generic but always relevant criticism of anything empirical - you can’t use the past to predict the future.

Perfect foresight

Optimizing with perfect foresight allows us to put an upper limit on both money and carbon savings. In reality, a battery will be operated with imperfect foresight of future prices.

Because we are interested in the ratio between carbon & economic savings, taking the ratio of maximum carbon to maximum economic savings is hopefully useful. We are making the assumption that the relative dispatch error (in % lost carbon or money) is the same for both objectives.

Simplistic battery model

The battery model applies a constant roundtrip efficiency onto battery export - in reality efficiency is a non-linear function of state of charge, battery age, temperature (and probably much more).

Incorrect battery configuration

This study uses a battery configuration of 1 MW power rating with 2 MWh of capacity - other batteries have different ratios of power to energy.

Only one value stream

Batteries often have access to many value streams - arbitrage of wholesale electricity is only one of them. Including other value streams (such as reducing network charges or offering fast response grid services) will change the size of the delta between our two worlds.


Thanks for reading!

If you enjoyed this post, check out Measuring Forecast Quality using Linear Programming, where I show how to use this same battery model to measure the quality of a forecast.

Cited as:

@article{green2021spacebetween,
  title   = "The Space Between Money and the Planet",
  author  = "Green, Adam Derek",
  journal = "adgefficiency.github.io",
  year    = "2021",
  url     = "https://adgefficiency.com/space-between-money-and-the-planet/"
}

Updated: