The Space Between Money and the Planet

Is there an opportunity cost for using batteries to save carbon?

11 minute read

A few months ago I completed a piece of work I’ve been working towards for three years - answering the question - is there a tradeoff between making money and saving carbon with batteries?

The conclusion is that there is - a world where we optimize for price will not maximize carbon savings - in fact often focusing only on profit will wipe out any environmental benefit.

This result is specific to the dataset used here (South Australian wholesale & marginal intensity data) - but hopefully helps to combat the common mindset that we can ignore carbon signals and focus only on economic optimization - not only in electricity but throughout the economy.



Batteries are a key technology in the clean energy transition - enabling low carbon renewable generation to replace dirty electricity.

Operating a battery requires making decisions to achieve a goal. What do we want our battery to do?

Two natural goals for a battery are to maximize profit or save carbon. A common mindset in energy is to assume that these are the same thing - that optimizing for money will also optimize carbon savings.

This work shows this mindset is wrong - that there is a trade-off between making money and saving carbon when operating a battery.

This work shows that maximizing profit will completely wipe out any environmental benefit 50% of the time, and calculates the carbon price needed to correct for this misalignment between price and carbon signals.

The ‘just make money’ fallacy

In my career I’ve encountered (and held!) the following perspective:

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

It’s often backed up with the view that renewables are low variable cost generators, able to bid into electricity markets at lower prices than high variable cost generators (like gas and coal).

This viewpoint (and viewpoints similar to it) is convenient - just make money, ignore the carbon side and you are also saving the planet. The central point of this work is the opposite - we cannot rely only on economic optimization to maximize carbon savings.

A similar view was recently shared in The Economist:

Many funds claim that there is no trade-off between maximising profits and green investing, which seems unlikely for as long as the externalities created by polluting firms are legal and untaxed.

This post supports this intuition - there is a difference between making money and saving versus the planet.

The 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. Yet with batteries, wind and solar, one of these things is not like the other.

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 world, 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 charges with dirty electricity and displaces clean electricity increases carbon emissions. Charging increases the load on the dirtier generator, and discharging decreases the load on the cleaner 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.

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

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:

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

Looking at the delta between our two worlds 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 price gives some indication about the level of support (via a revenue neutral carbon tax on electricity market participants - of course!) required to counteract the misalignment between our price and carbon signals.

We would be giving the market $150 to balance out what we lose when optimizing for carbon, and receive 10 tC of carbon savings in for our lost money.

Reproducing these results

I’ve done a bunch of technical work for this project - if you aren’t interested in the technical stuff, feel free to skip to Results.

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 and make 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.

Download the results

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

Install the awscli Python package (you’ll need Python installed) and use $ aws s3 sync to sync the results folder to notebooks/results (this is where the notebooks in 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.

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 Python CLI for downloading Australian electricity market data:

$ 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 or carbon 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 the Australian National Electricity Market (NEM) from 2014 to end of 2020:

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

The NEMDE dataset offers a marginal carbon generator, which allows calculation of a marginal carbon intensity - 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 80 $/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. Doing this is 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: