How Chaos Control Is Changing The World (Patreon)
Content
[This is a transcript with references]
Chaos control is not easy, as all parents knows. Indeed, it’s so difficult you might think it’s just impossible. After all, true chaos means that even the tiniest changes can have large and, in practice, unpredictable consequences. Like the butterfly in China that causes a tornado in Texas. If chaotic systems are so sensitive to small perturbations, trying to correct them could just make things worse. Maybe it’s easier to let little Paul throw the spaghetti at the wall and clean up later. But surprisingly it’s indeed possible to control chaos. Just exactly what is chaos control? How does it work and what can we do with it? That’s what we’ll talk about today.
Chaos sounds mysterious, like something anomalous, a disruption of the normal order of things. But in fact, chaos is everywhere.
The solar system, for example, is chaotic. In illustrations, the solar system looks like the most orderly thing ever, but we only know it to be stable for the next few million years. After that, it’s possible that one or the other planets gets spontaneously derailed from its orbit.
The planet that’s most susceptible to this is luckily not Earth but Mercury. That’s because its orbit gets close to the sun in almost the same time interval as Jupiter. If the two planets fall into resonance that will probably destabilize the orbit of Mercury because Jupiter is so much heavier.
According to computer simulations, what will happen then is that either Mercury gets ejected from the solar system, or it falls into the sun, or it collides with Venus. Which way it pans out depends very sensitively on the exact orbits of the two planets, so we don’t know whether it will happen. Either way though, it’ll be quite a spectacle, so mark your calendar for the year 5 million.
More seriously, this is how chaos was discovered: by studying the solar system. In 1887, the King of Sweden offered a prize to whoever could show that solar systems in general, but ours in particular, are stable, and the planets will orbit patiently around the sun, until the sun runs out of nuclear fuel. Henri Poincare thought he could show it but ended up proving the opposite. He found that the paths of the planets depend very sensitively on the initial conditions. He had discovered chaos, and he did win the prize.
The topic didn’t receive much attention for a couple of decades, which might have had something to do with two world wars getting in the way of science. But chaos was rediscovered in the 1950s by Edward Lorenz. Lorenz was making weather predictions with one of the first computers. By sheer coincidence, he noticed that when he rounded off the numbers that the simulation started from to three digits after the point rather than six, he’d get vastly different results. Those additional tiny digits made a big difference for the outcome.
But the equations that describe weather are really complicated. To understand better what was going on, Lorenz took all those weather equations and simplified them. He wanted to extract the essence of this weird chaotic behavior. Lorenz arrived at a set of just three equations. They are now called the Lorenz model.
The Lorenz model describes a curve in an abstract 3-dimensional space. This curve will rapidly approach a shape in the middle that coincidentally looks somewhat like a butterfly. But the curve will seemingly randomly continue to switch back and forth between the two sides. You can loosely think about these two sides of the Lorenz model as two weather situations. Say, the one sunny sky no rain, the other grey and rainy. This shape that the curves approaches is called the “attractor” because it’s like the curves are “attracted to it". Though strictly speaking what you see in this figure is not actually the attractor. It’s just a curve that’s very, very close to the attractor.
The way that chaos shows up in Lorenz’s simplified model is that initial conditions with just a tiny difference will rapidly run apart. Here is an example for this. Initially the difference is so small you can barely see it. But wait a bit and the curves each do their own thing. This is why weather prediction is difficult.
Is there a way to prevent this from happening? This is the question that the research area of chaos control tries to address. It’s a way to nudge a chaotic system into a regular, non-chaotic behavior that becomes predictable.
Chaos control was theoretically proposed already in 1990s. At this time, physicists and mathematicians had figured out that those attractors of chaotic systems are made of an infinite number of orbits which are periodic and therefore predictable, but they are also unstable. The actual path of the system switches between those unstable periodic orbits. But since the system is so close to the periodic orbits, it only takes very small corrections to keep it on them.
That’s an amazing insight because it’s so counter intuitive. You’d think that perturbing a chaotic system just makes the chaos worse, but not so.
In the years after the first paper on chaos control, a couple of different methods were proposed for it. Here is a particularly simple example for chaos control on the Lorenz model. As you see, it stabilizes the system on a periodic orbit on one side of the attractor. If you keep in mind our weather analogy for the Lorenz model, you’ve just made sure it’s raining forever, congratulations.
These periodic orbits can become really difficult and in general it’s not so simple to figure out just what correction you need to keep the system on one of those orbits. However, one can use machine learning to do this, or to use the expression that you more commonly read in the headlines, you can use artificial intelligence.
In a paper from last year, two researchers from the University of Munich in Germany did exactly this. They trained artificial intelligence to provide feedback into the Lorenz model and stabilized it on a number of different periodic orbits. There are two things to take away from this. First: Artificial intelligence and chaos control work together very well because the AI learns just what a necessary correction is to control the chaos. And second, this is a very recent development.
But the Lorenz model is a fairly abstract example. A somewhat more tangible example is the double pendulum.
As the name says that’s a pendulum but rather than just having one straight arm, it’s got a second joint, so it has more ways to move. The motion of a double pendulum is highly chaotic. In this little animation you see two copies of the double pendulum with slightly different initial conditions, though they are so similar you initially can’t see the difference. They quickly run apart and then each do their own thing. In this animation you see an overlay of ten different initial conditions for the double pendulum. Initially the motions are strongly correlated but after just a few seconds they become entirely uncorrelated. That’s chaos in action.
Can you prevent the double pendulum from being chaotic? Yeah, just let it hang down. This is a stable solution and it’s easy to reach but admittedly one doesn’t learn much from it. What’s more difficult to control is keeping the double pendulum stable when it’s pointing up. This is called the inverted double pendulum. One can indeed train an artificial intelligence to keep it stable as you see in this very impressive video from the technical university in Vienna.
Here is another cute example of chaos control by machine learning, where the software learns to keep a toy car on a racing track.
These videos are more than 10 years old, so basically from the stone age of YouTube. Since then the field of chaos control has totally exploded because artificial intelligence has become so much easier to use. And that in return is partly because of the easier access to computing power and to algorithms, education, and training.
So we have this really beautiful conjunction of developments in different fields. This is one of the reasons why robots can suddenly walk, whereas for a long time they’d just fall over. It’s because artificial intelligence has become so much easier to use and so much more powerful at chaos control.
The other part of the reason is that computer models of robots are now so good that training the AI can be done on a computer. The robots don’t have to walk around and fall in reality. They fall in a virtual world. This way they can learn dramatically faster.
But making robots walk isn’t the only thing you can do with chaos control. We’re not anywhere close to controlling the weather, it’s just too big a system and also, the places where you’d have to inject your chaos control move around, which is in itself difficult to predict. I think that one day we *will be able to control the weather because it’s theoretically possible, but it’s not going to happen in my lifetime.
One thing I’m sure is going to happen in my lifetime is chaos control in nuclear fusion plasma. I’m sure about this because it’s been done.
In 2019, a group of researchers from Harvard and Princeton trained an artificially intelligent system on data from the Joint European Torus, that’s currently the largest tokamak in the world, and another tokamak, that’s currently the biggest in the United States. They taught it to recognize data-patterns that signal an impending plasma instability. And they were able to do this with good success. In their hindsight analysis, they correctly identified an imminent instability one second ahead in somewhat more than 80 percent of cases; 30 milliseconds ahead, they saw almost all instabilities coming.
And that’s super interesting but what you really want to do is use this ability to predict what’s coming to prevent it from happening. You want to control the chaos. This was recently done by researchers from Deepmind. In a paper earlier this year they reported they’d actively controlled plasma in a test reactor. This is a tokamak device called TCV located at the Swiss Plasma Center in Lausanne. It’s fairly small, with a size of about two meters in each direction. In it, the plasma is held by strong magnetic fields that can be manipulated with a number of controllers.
This tokamak runs only for a few seconds at a time and it’s difficult to get run time on it because many groups want to do experiments with it. Quite often the biggest problem in science are other scientists.
To shortcut this problem, the people from Deepmind trained their artificial intelligence on a tokamak simulator, that has also been developed by the group in Lausanne. So: Take the AI, train it to control another software to save time, then take the trained AI to control the real thing.
And their AI control of the plasma worked out beautifully. In this movie on the left you see the measurement of the actual plasma inside the tokamak. On the right you see the reconstructed shape of the plasma. The Deepmind people were able to coax the plasma into a large number of different shapes including a triangular one, and two separate droplets which had never been done before. I find this an remarkable achievement and I’m sure it’ll become super important for nuclear fusion reactors in the future.
In my mind nuclear fusion is not a problem that can be solved by building bigger things. It’s really a fine-tuning problem that must be addressed both by making sure the reactor vessel is equipped with ample measuring devices and controllers, and by hooking it up to an AI to provide feedback in real time. It’s not just that I think building bigger reactors isn’t going to help in this case, it’s also that building bigger things also takes a lot of time and by the time the thing is done, the technology is already out of date. This, I am afraid, will be the problem with ITER.
If chaos is so common, then why does the world look so orderly? That’s one of the biggest unsolved problems in science at the moment. It seems that naturally occurring adaptive systems increase their complexity until they’re just about barely not chaotic. Naturally occurring adaptive systems are for example living creatures, plants and us, but also institutions and societies. Stuart Kauffman called it poetically the “Edge of Chaos” that we live on, but it’s more technically referred to as “Self-organized Criticality”.
Just why the world is that way, no one really knows. But loosely speaking it seems that if you want to get something done, then both too much order and too much chaos is bad. Or, to put it differently, some chaos in your life is good. You just have to know how to keep it under control.