Earth Notes: Hey Siri, Flatten the Duck!

#FlattenTheDuck: green the grid, and help off-grid users too.

Executive Summary

With Apple's tight control over, and integration of, its hardware and software, there are some simple tweaks that it could make to its battery charging controls to effectively add significant chunks of storage to various electricity grids around the world and make them greener and more efficient.

Related adjustments would also help off-grid users of Apple's rechargeable battery-powered devices, from phones to laptops.

I tried to find ways to engineer these things myself, for my MacBook Air, but haven't found out how to, yet. I think that some may only require a software tweak by Apple to make possible; others may require some hardware tweaks too. Exposing and documenting features to make these things possible would allow Apple or third parties to quietly make things "just work" better by "flattening the duck", and help save the planet!

Flattening The Duck?

California invents lots of things, including cute names for shared problems! To quote "We have come to flatten the duck":

In California, fossil fuel power plants have been complaining that solar panels steal their business during the day, and stop producing when the sun goes down. This happens exactly when everyone gets home and switches on air con, cookers, TVs etc.

So a massive ramp up in production is the result. [and results in a load curve that looks like a duck[PDF]]


The shape of the curve is very California-specific, but the problem is similar across the globe.


Solar may be part of the answer, storage and demand response the other part.

More directly Flatten the Duck says:

Energy Storage has emerged as a leading solution for smoothing out the duck curve. By absorbing some of the excess energy generated by solar during the daytime and supplying it to building loads or feeding back into the grid in the afternoon and evening, it creates a flatter demand curve that will make it possible to accelerate the acceptance of renewable energy resources.

So how can Apple help, at home in sunny CA, and elsewhere in the world?

There seems not to be "an app for that" yet, possibly because the right controls are not made available by the operating system.

Some slight cleverness injected into its operating systems (and Apple lives by that, yes?) would turn its legions of battery-powered devices into virtual storage helping the grid avoid dirty and expensive fuels and use more renewables, at zero cost.


Technical Stuff

As Upside says "The electricity grid is under stress. At peak times, it is forced to use its oldest, dirtiest, most expensive power stations to meet demand."

Furthermore, the grid has to be sized to cope with peak demand, in terms of pylons, generators, etc, building in higher costs that appear on bills and waste embodied energy too.

So What Tweaks Are Needed?

The operating systems (MacOS/iOS) already have a notion of where the machine is in the world from location services, eg used to automatically set the timezone for the clock.

From that location (and the season) it is easy to know roughly when peak demand happens, eg winter evenings 4pm to 9pm in the UK, from a built-in database that would be easy to maintain.

In many cases it will be possible to work out which grid the machine is likely connected to. And also to discover dynamically over the Internet (when available) when the grid is under stress, eg from tools such as this using CO2 intensity as a proxy, or from live stats from organisations such as ENTSO-E for Europe, or the ISOs in the US. Possibly behind a server run by Apple to avoid flinging millions of extra queries at these third-party systems.

Other openADR service providers and aggregators may be happy to oblige, being paid to manage this free demand response.

Upside itself co-ordinates UPSes (Uninteruptable Power Supplies) for companies' computers to provide exactly this kind of service.

The algorithm to provide virtual storage to the grid might look like:

All of this is only needed when the device (laptop, phone, etc) is accepting power from what it thinks is an AC mains adaptor.

All of this could be overridden by settings in "Energy Saver" System Preferences "Power Adaptor" panel.

Bingo: 1 million laptops deferring 20% of their 50Wh battery charge would defer 10MWh of demand on the grid until it was in better shape. No pain, no cost, can be turned off by the user easily, and unlikely to cause any major pain in any case.

Note that even relatively small amounts of storage are valuable both to contribute to a large pool, and depending on how fast that storage can respond. Typical grid managers use a range of services with response times from the order of seconds to hours. The laptop virtual storage pool can be at the faster end of that.

Further, see off-grid section below, in may be reasonable to expect to curtail each laptop's peak consumption by 50% by carefully controlling charging, which might be 30W per laptop or 30MWh, which represents a chunky expensive emergency diesel generator that does not need to be fired up.

Available Virtual Storage Capacity Estimate

This is an initial estimate, for which I would welcome better values for different grid catchment areas.

In the UK (for the GB grid) at least one million laptops plugged in to AC mains at times when they could make a difference, with (say) 10Wh deferrable charging/capacity each out of a 50Wh battery (so 20%, eg not charging beyond 80% full when the grid is stressed) for 10MWh of aggregate virtual storage.

(Note that smartphones and tablets, while containing much less battery than laptops, are much more numerous, so may make a similar virtual storage contribution if plugged in at peak times and/or when the grid needs emergency support such as when a major generator trips off the grid unexpectedly.)

Gross grid demand in peak hours for (say) the GB grid in winter is of the order of 5h * 45GW = 225GWh, so the 10MWh of virtual storage is clearly in 'balancing' territory, as part of a wider pool of grid services and support.


I have a modest off-grid solar PV system with batteries, that supplies some light loads, separate from the grid-tie system on my roof. What I describe would apply just as much to someone living and working off-grid in a solar-powered cabin in the woods or van on the road, etc!

In the graph below, just before noon, my Internet connection hardware (eg router) automatically switched off-grid taking ~16W. A little later I plugged my MacBook Air into the off-grid system with the MBA's battery at about 20%. Whoomph! Another 60W from my off-grid system! If the sun had not been out some of that would have had to come from storage, wasting energy in the round trip and eating a little of its cycle life. And 60W is quite hard on various off-grid system components, considering that the average MBA load (see about 16h00) is more like 10--20W.

greedy battery charging!

I was in no particular hurry to recharge my MBA at that point, and indeed I am usually not hugely time limited in my access to a charging source. (Maybe I am, just occasionally, when in a café on business.)

It would be good if we could tell our Apple devices in software to cap their additional charging demand to something like the typical non-charging demand to reduce the stress on upstream devices, or even not charge at all temporarily or unless below some low-water mark such as 80%. These could be advanced controls on the "Energy Saver" System Preferences panel, and indeed overlap with the grid-friendly features mentioned above. The only penalty is a slower charge, but the battery life could well be extended by the more gentle management.

2017/03/11 footnote: macOS 10.12.3 Terminal has crashed maybe 20 times so far while I have been editing this HTML file with vim. I have never had to use "vi -r" so many times ever in one day, maybe possibly not in my entire 30+ years of *nix editing in total. Grrr.



The machine that serves this site is powered by local off-grid solar and wind renewable energy as far as possible, backed up by on-grid renewables including as of 2008/03 a substantial grid-tie solar PV system, and 100% renewable grid power (mainly wind) from Ecotricity; power draw is ~1W.
Please email corrections, comments and suggestions.
Please read our privacy policy.
Mobile site
Copyright © Damon Hart-Davis 2007-2017.