Warning, long text

Power Outage in Spain – An Analysis

Solar energy comes out of your panels as direct current (DC). That’s all well and good, but homes and grids run on alternating current (AC). Enter the inverter – the humble box that turns solar wizardry into household juice.

Now, inverters aren’t just fancy plug adapters. They have to sync up with the grid – which means they generate exactly the same frequency as the rest of the system. No grid? No syncing. In that case, the inverter goes into what’s called island mode and produces power only for local use. So, if my solar system isn’t connected to the external grid, it can’t run the house – but it can still power two little emergency sockets. Cheers, I guess.

Normally, the grid runs at 50 Hz – that’s hertz, not some obscure Scandinavian metal band. But this frequency can wobble a bit. Physically and technically speaking, it rises when there’s too much power and not enough consumption, and falls when there’s a hungry grid and not enough electricity to feed it.

To keep the grid safe, inverters have an emergency shutdown feature: if the frequency goes over a set limit (apparently around 50.2 Hz), they also jump ship and go into island mode.

Spain’s energy mix is a bit unusual: lots of nuclear, lots of renewables – and a large chunk of those renewables are solar. Makes perfect sense in a country where “cloudy” means three fluffy cotton balls drifted by.

Now, nuclear energy comes with two charming quirks. First, you can’t change its output quickly – it’s not a dimmer switch, more like a cruise ship rudder. Second, nuclear plants cost nearly the same to run at half speed as they do at full throttle. So, naturally, you want to keep them purring along at max capacity.

Then came Monday, with weather conditions perfect enough to make a solar engineer weep with joy: loads of sun, plenty of wind. By 9 a.m., Spain’s energy needs were entirely met by nuclear and renewables. In fact, they had surplus electricity and began exporting it by the bucketload. They shut down everything easy to shut down – but nuclear? No chance. It stayed full steam ahead.

Then, two unfortunate things happened: one transmission line to France caught fire (as you do), and another developed resonances due to meteorological oddities.

So far, this is all well documented. Now we step into speculation territory.

These instabilities meant Spain couldn’t get rid of its excess electricity. The grid frequency rose past that critical 50.2 Hz mark – and boom: many solar systems switched to island mode. At that moment, they were providing nearly 15 gigawatts – around 60% of the national supply. And just like that, poof – they were gone.

Suddenly, two-thirds of the electricity vanished. Wind, nukes, and batteries couldn’t keep up – quite the opposite, in fact. To prevent damage, the nuclear plants initiated emergency shutdowns. Not great. (More on why that’s bad in a bit.) Within seconds, the entire grid collapsed. The solar systems were poised to help – but there was no grid left to sync with.

Everything went dark.

Portugal and southern France were also knocked offline, as they’d been happily sipping from Spain’s excess power. The European grid wasn’t amused and unceremoniously kicked Spain out of the club. France, with a bit of backup and a stiff upper lip, restored its network fairly quickly. My home automation system even picked up the moment the frequency dipped and France cranked up its own generation.

Portugal got the rough end of the stick. With fewer reserves and being smaller in size, they couldn’t help themselves – and no one else could help either, since Spain’s their only neighbour.

Rebooting the Grid – Why It’s a Right Pain

Restarting a collapsed grid isn’t just a matter of flipping a giant switch. It’s tricky for two reasons:

  • Generation and consumption have to be in perfect balance. If not, we’re back to square one.
  • Nuclear power plants can’t just be turned back on. After an emergency shutdown, they suffer from something called xenon poisoning (yes, one of the very same issues that made Chernobyl a household name). You’ve got to wait for that to wear off – which means the reactors were still offline two days later.

The fix? You split the grid into smaller bits. For each chunk, you build up some capacity, bring it online, then move on to the next. Rinse and repeat. This takes hours. Meanwhile, the sun moves across the sky – and even if you do reconnect the solar arrays, they won’t produce nearly as much as before. Come 8 p.m., they’re more or less useless.

So Spain needed outside help. They were gradually reconnected to the European grid – in small, careful steps. Without that assistance, large parts of Spain would probably still be in the dark. That’s why electricity came back first in places like Barcelona, close to the French border, while Portugal endured the longest wait.

Notes & Musings

  • Considering the scale of the event, the recovery was impressively quick. In San Sebastian, power was back within 2 hours. (For comparison: Wismar in Germany had a 45-minute outage last year because one substation had a wobble.) Portugal got its power back after 23 hours. I had expected one to two days.
  • This was the largest blackout in Europe in 40 years. If, as suspected, climate-related factors helped spark (pun intended) the situation, then modernising the grid to better handle volatility is absolutely essential. That includes implementing the long-debated power zones in Germany.
@masek
Nuclear power: slow and expensive to build, slow to steer and catastrophic to all life when it goes wrong but still it has its diehard advocates. 🙃
@adritheonly @masek Depends, the new generations are extremely expensive (for a combo of political, technical and financial reasons), but the previous one weren't (e.g. this allowed France's electricity to be and remain cheaper than its neighbors for years). As for the safety, it clearly has its risks, but they are fairly well mitigated and burning coal is far worse (it kills *a lot* of people every year due to pollution and - ironically - natural radioactivity of coal ash).
1/
@adritheonly @masek So in hindsight, the choice to build nuclear plants decades ago (where the alternative was oil and coal) is IMHO the good one. That said, I'm unsure of the best choice for *future* construction.
Another aspect that you didn't mention is that nuclear reactors (and coal/gas plants, and hydroelectric stations) have turbines, which is good to maintain and stabilize the network frequency.
As for the "slow to steer" argument, that's undoubtedly true, but not a problem
2/
@adritheonly @masek as long as you use it for baseload.
In addition, some plants actually do load-following (France does for example, because they have too much nuclear power to do without). Cf. https://en.wikipedia.org/wiki/Load-following_power_plan: «Modern nuclear plants with light water reactors are designed to have maneuvering capabilities in the 30-100% range with 5%/minute slope, up to 140 MW/minute.»
@adritheonly @masek I say all this not to defend nuclear power (my opinion won't change the choices that my government makes either way), but to say that electricity generation is a tradeoff between solutions that each have advantages and problems.
And that I believe 50 years ago that choice made total sense. Today, I don't know, there is so many parameters and renewables are making progress very fast, so I am holding my judgment on that one :)
@nightmared @masek Sure. Humanity has come a long way since happily spraying DDT on school kids. The trick is to keep up and adopt what is better, decommission what proves disastrous in the long run. France could easily slowly change from nuclear to other sources of power, it has the money and tech.
@adritheonly @masek Well, I don't know about the money part (that a hot topic currently in the country, because our debt is deemed too high), but we clearly do not have the technical ability to do so: I'm fairly sure the PV cells we buy all come for Asia, and I doubt we have the industry or the financial capacity to bootstrap our own supply chain.
@nightmared @masek China started somewhere. If I remember correctly, it was by turning other countries' rubbish into cheap consumer products and focusing heavily on tech education. It can be done.
@adritheonly @masek We live in a short-term, profit oriented society. I doubt there is enough goodwill to develop the technology, and China were able to do so because they have a lot of cheap energy, a strong industry (because of that manufacturing you mentioned) and the desire to finance for years on end the development of technology in the hope that it proves usable later. I'm too pessimistic to believe private companies will behave like that. I'm sure we will deploy a lot of renewables, I am
@adritheonly @masek happy about that, but I'm also certain these renewables (at least for PV) will come from Asia. I have accepted that, even if I'm unhappy about it.
@nightmared @masek Perhaps then, it is time for society to realize it has a problem and change? From where I'm residing at the very South, Europe appears stagnant. Very dangerous, stagnation usually leads to death.
@adritheonly @masek I deeply agree, but I don't make decisions: I'm but a lowly computer engineer, the decisions regarding energy policies or supply chains are kilometers above my "pay grade"
@adritheonly @masek Also: that is my opinion, but I'm not at all an expert in the matter, and I may well be wrong. So take everything I say with a grain of salt.
@adritheonly @masek Also, what I was trying to say is that I understand that some may dislike nuclear power, but it was the correct choice back in the 70's, that did not prove disastrous at all: the difference of CO2 emitted in the atmosphere in the last 50 years by Germany vs. France is ridiculously high. Had we succeeded at launching a new plant generation a decade ago (technically, we have, but the cost was far too high to say it is a viable model), it could have been a good choice.
@nightmared @masek It worked at the time, now it is time for change.
@adritheonly @masek I deeply regret the political choice to abandon research and industrial ventures for the 4G of nuclear plants, that aimed at "closing the cycle" (which would have made us both more energy-independent and allowed to reduce our existing nuclear waste). This, in my opinion, mad no technical sense and actually ensure that nuclear is not a technology for the future generations (that it could have been, and perhaps could still be if we look at the current developments in Asia).
@nightmared @masek Oh yes, nuclear waste. The problem no-one wants to discuss... Ours keep piling up on a large piece of land that cannot be used for, well, forever and we only have the one plant. Where does France dump its nuclear waste?
@adritheonly @masek The amount of nuclear waste is actually not that high in volume or weight (we even store and treat nuclear waste from foreign countries) when you look at the fact that it's the result of >2000 years of reactor operation (50 reactors * 40 years).
The current plan is to store long-lived waste in a stable (hopefully), deep underground storage facility: https://en.wikipedia.org/wiki/Cig%C3%A9o
Cigéo - Wikipedia

@adritheonly @masek This is a very political subject in France indeed, and the fact that France has a partnership with Rosatom (which, like most significant nuclear companies, also have military ties) doesn't help.
@nightmared @masek Oh dear, Rosatom! The company that tried to sell us a nuclear plant until we, the people, put a stop to it.
Ha yes, the topic of the nuclear waste where everyone "forget" that every project to solve the issue are sabotaged by anti-nuke activists. I wonder why...