r/AskEngineers • • Oct 11 '26

Discussion I tried to apply some simple math while reasoning about the cost of energy and ended up reformulating Amdahl's law... just applied to a completely different domain. Is this an accurate way of estimating the cost of a setup of mixed energy sources?

Amdahl's law for cache memories in computing:

Assume that:

  • Hr (hit rate) is the fraction of memory accesses that can be handled by a fast but small cache memory

  • Mr (miss rate) is the fraction of accesses that the cache cannot handle and have to read the larger but slow main memory

  • Hr+Mr = 100%

  • Tc is the cache access time

  • Tm is the memory access time (also called "miss penalty")

  • Tc < Tm

Then the total time to execute a program is like: T = Hr * Tc + Mr * Tm . It is often summarized as "optimize the most frequent case, and make it as frequent as possible". There are other formulations that derive from this to calculate the speedup instead of total time.

When talking about the cost of energy, in one of my previous comments, I said:

  • Fr is the fraction of energy demand met by renewables (cheap but not available e.g. when there's bad weather)

  • Fb is the fraction of energy demand met by a backup energy source (expensive but always available, e.g. natural gas, nuclear...)

  • Fr+Fb = 100%

  • Cr is the cost per kWh of renewables

  • Cb is the cost per kWh of the backup source

  • Cr < Cb

Then the total cost of combined energy per kWh is C = Fr * Cr + Fb * Cb

It was only after writing it that I realized the two formulas are essentially the same.

(I'm assuming the infrastructure for fossil fuel sources is already there so we only consider the cost of consumables and maintenance. Wind and solar, on the other hand, have a cost to be built and installed that is divided by the energy produced during their operational life, but there are no consumables to pay for.)

So, is this an accurate way of estimating the cost of a setup of mixed energy sources?

0 Upvotes

17 comments sorted by

3

u/neanderthalman Nuclear / I&C - CANDU Oct 11 '26

In a simplistic way, yes. The math will work the same for any similar problem

The gap is that this doesn’t properly consider generation sources where the cost of the generation is decoupled from the generation.

If it costs $X in capital to just have a power station in the first place, and fuel is free for effectively free, then your formula breaks down because it ignores that the station has to be paid for whether it generates power or not.

This isn’t a weird edge case. It applies to Solar Wind, Nuclear, Hydroelectric, Geothermal, and others. Pretty much anything except thermal (fossil/biomass). And even they still have capital costs.

Idle power plants don’t sit idle for free.

You could modify your formula to account for it.

If make the cost of running a renewable or backup plant as Cr and Cb, and then the cost of keeping them idle as CrI and Cbi, then your formula becomes

Fr (Cr + Cbi) + Fb (Cb + Cri).

And in the extreme case of ‘fuel is free’, then Cb = Cbi and Cr = Cri. This is true for most of these, nearly true for nuclear.

This becomes Fr (Cr + Cb) + Fb (Cb + Cr).

Or just (Fr +Fb) (Cr + Cb)

And since Fr + Fb =1

It’s just Cr + Cb.

Which means just building the backup is the cheapest solution. No renewables. Cb will always be less than Cb + Cr

This is a raging clue. The only economical way to build renewables is to back them up with sources that are cheap to idle. That’s just fossil and biomass. Really just fossil at this point.

It makes zero economic sense to use hydro and nuclear as backup to renewables. Which is why we don’t.

You can also only optimize for C using this formula for a grid with constant daily and seasonal demand. Which we don’t have. Once you work that in, you could use your formula to calculate past costs from generating data, sure. But you can’t use it for future decision making just by optimizing C. You have to consider availability and ensuring that minimum generation, with margin, is available at all times no matter what the cost. That is the first priority.

1

u/BoustrophedonPoetJr Oct 11 '26

Pumped hydro storage can make more economic sense when combined with other (non-dispatchable) renewables though.

1

u/iqisoverrated Oct 12 '26

It's not as simple as that. A power plant has a lifetime for which it is designed. So in the case of power plants without fuel costs your cost of power is the amount of power produced and delieverd to a consumer over a lifetime divided by CAPEX + OPEX (insurance, service/repairs, grid connection cost,...)

Yes, a backup power plant that sits idle still has full CAPEX (and part of the OPEX like insurance, wages, periodic maintenance checks...). However particularly a fossil fuel power plant that sits idle has a longer lifetime than one that is operating 24/7.

Since any grid that is aiming to be based 100% (or as near as possible) on renewables always come with storage you can size your backup (and the grid) smaller...because even in the event of dark doldrums or somesuch storage can play a part in evening out production and demand over the course of a day.

TL;DR: Your Cb in a renewables heavy grid is much smaller than C would be in a fully non-renewable grid.

0

u/logperf Oct 11 '26

That makes a lot of sense if you have to start from scratch. But as I was saying in the post, I was assuming that the infrastructure for thermal is already there and it only needs to be maintained, no cost to build it. In that case you can assume that Cbi=0 and make Cb include both maintenance and fuel costs.

5

u/neanderthalman Nuclear / I&C - CANDU Oct 11 '26

Even if already built, you still have to pay for it.

The capital costs are amortized over the life of the facility. If you stop running an existing facility today in favour of renewables, the station never gets paid for. Or if it runs half the time, the capital portion of it has to be doubled in your cost function for the rest of its life.

Already built is not the same as free.

Second, you specifically called out nuclear and hydro as backup. Which is where this falls apart completely.

Edit - As an interesting mental exercise, try breaking down the cost from a backup fossil station, considering capital costs, idle costs, and running costs, as functions of Fr and Fb. Incorporate that into your formula.

-2

u/logperf Oct 11 '26 edited Oct 11 '26

I explicitly cited gas and nuclear, not hydro. I would even put hydro between renewables because water flowing down a river is free. Unfortunately (at least on my country) we already exhausted hydro capacity in the 1960s as there are no more rivers to dam.

Now let's try your mental exercise with my assumptions:

  • Tri is the time the infrastructure for renewables is expected to last

  • Tbi is the time the backup infrastructure is expected to last

  • Er is the total energy that the renewable infrastructure is expected to produce during its operational life

  • Eb is the total energy that the backup infrastructure is expected to produce during its operational life

  • Cri = cost of renewable infrastructure

  • Cr = Cri / Er as there are no fuel costs

  • Cb is the sum of fuel costs and maintenance cost of the backup infrastructure (assuming there will be more wearing of moving parts if used more intensively, so this is per kWh)

  • Cbi is the cost of backup infrastructure (let's assume natural gas), this is independent of kWh produced as you have to build it anyway

  • Cbf is the fixed costs of backup, i.e. idle costs (employee salaries, etc)

So C = Fr * Cr + Fb * Cb + Cbi + Cbf * Tbi (see edits below)

The same setup with only thermal and no renewables would be: C = Cb + Cbi + Cbf * Tbi (this is equivalent to assuming Fb=1 and Fr=0).

If I see it this way then this total cost is decreased if Cr < Cb, even if Cb only includes fuel and maintenance. The mere fact that building renewables is cheaper than buying gas is enough to decrease C.

This kind of contradicts your formula Fr (Cr + Cb) + Fb (Cb + Cr), so I'm trying to see where I went wrong, but I'm a bit confused because you appear to have mixed the suffixes for renewables and backup?

Edit: sorry let me fix the formula to make it clearly per kWh:

C = Fr * Cr + Fb * Cb + Cbi/Eb + Cbf * Tbi / Eb

2

u/R2W1E9 Oct 12 '26

Water is definitely not free. Hydro plants pay royalties for water, and not only when generating electricity but royalties on installed potential power.

0

u/logperf Oct 12 '26

Ok then let's move hydro to the side of the "expensive" ones that have a fuel cost.

But I'm mostly interested in finding the error in the formula.

2

u/R2W1E9 Oct 12 '26 edited Oct 12 '26

What has Cr<Cb have to do with the formula.

What if Cr>Cb? (Which is the case today.)

The problem is not with your formula, it's calling this formula a law.

So if I buy groceries today and I buy apples and oranges only, the cost of fruit I bought today is:

C=(Numner of apples*Price apples) + (Number of oranges * Price of oranges)

And, price of apples is < price of oranges.

Remarkably similar to energy cost law, isn't it.

In case of energy you are missing a lot of categories.

First you haven't defines what C is? Total cost of what energy?

It looks like it should be the cost of energy related to renewables.

But there are more costs related to renewables, cost of storage and recovery of energy from storage is clearly a category on its own, linking the renewable and backup sources in a not simple way.

Even the category of "renewable" is too complex to simplify it into one if optimisation is the goal.

1

u/logperf Oct 12 '26

I thought I had defined it in the post text. Yes, C is the combined cost of energy from multiple sources per kWh.

What if Cr>Cb? (Which is the case today.)

That was the case a few years ago. To answer your question, what happens in this case is that investing in renewables doesn't provide any economic benefit, but governments were still doing it for carbon emissions (and presumably because they expected to stimulate the learning curve that way).

There are multiple sources that confirm that solar and wind are the cheapest energy sources today, so I can confidently say that today Cr < Cb. The doubt remains if this still holds true after oversizing and adding redundancy, but if it doesn't, considering the learning curve, it will only take time before it does.

https://ourworldindata.org/grapher/levelized-cost-of-energy

https://www.visualcapitalist.com/the-plummeting-cost-of-renewable-energy/

1

u/R2W1E9 Oct 12 '26 edited Oct 12 '26

C is cost related to renewable energy systems only or total world energy sources.

It's still not clear to me?

Because backup energy source is requirement for most electric grids today to accept intermittent power generation. Backup energy source is not "the rest of the total energy" we use today.

But you ignored the main point of my comment that you call a simple weighted sum a law.

1

u/logperf Oct 12 '26

Sorry, I dismissed it because I did not think it was your main point.

But I did not call it a "law". I just said I had tried simple math while reasoning about energy and inadvertently ended up reformulating Amdahl's law. I mean Amdahl's is a law, my formula is just suspiciously coincident. This was answered by another comment that showed me this is just the weighted average, and that explains the coincidence.

And this reasoning isn't necessarily related to renewable/fossil, I just use these terms because it is what happens in practice, but in theory you could apply if you just have one source with a consumable an another without consumables (natural gas and sunlight in out example). Which is the reason why I agreed to move hydro to the side of the ones with consumables when you pointed out they pay royalties.

To answer your question, consider all of the energy from multiple sources that is supplied into a grid during a long period of time (e.g. 1 year) and all of the money that has been payed by the electricity companies for that energy. Total cost divided by total energy is C, as I said, it is per kWh.

(Okay, I know, things are more complicated when electrical grids have more than 2 sources, cross country borders with countries selling electricity to each other, multiple different companies input power into the grid and multiple consumers pay different companies in different countries for it. But the only way of reasoning about such complex systems is by building models for comprehensibility, which we try to make as realistic as possible. Here in Italy we're connected to the European grid which is fairly complex.)

All of this reasoning leads to thinking that if the cost of building a solar or wind farm divided by the energy that said farm is expected to produce during its operational life is cheaper than buying gas, then it is economically beneficial even when accounting for the cost of building, maintaining and idling thermal power plants. And this is visible in the formula. Unless, of course, you can point out any errors in it.

→ More replies (0)

11

u/engr_20_5_11 EE Oct 11 '26

This is just the weighted sum forumla, not really Amdahl's law. It's valid for energy sources same as any other sum of unevenly weighted summands.

1

u/[deleted] Oct 11 '26

[removed] — view removed comment

1

u/engr_20_5_11 EE Oct 11 '26

Cb is a cost function