Friday, July 13, 2018

Science Series Part I: Synchronisation of Chaotic Networks

I am going to run a three-part series about the science and mathematics underlying my summer research at the University of Maryland TREND program (Training and Research Experience in Nonlinear Dynamics). I am currently working on the experimental side of the field of nonlinear dynamics and chaos. I will explain this is as the series progresses. The posts will build up so that when I talk about my work in the third post, I can reference to the earlier ones. I will talk about the following subjects:

Part 1: Nonlinear and chaotic systems
Part 3: Nonlinear networks at my lab

What are Models?
Physics is somewhat different to other sciences: instead of seeking to categorise and inventorise the natural world, it seeks to reduce natural phenomena to their essence and describe the behaviour of these processes. Physics mainly proceeds with models. These are, in the most general sense, (quantitative) assumptions, which combined with mathematics, can be used to model these behaviours and make predictions. Often the hardest part is to find the right assumptions for one's model, and then the mathematics falls into place. Other problems have simple assumptions, but are harder on the mathematical side to solve. The hardest problems in general, are those with non-obvious, complicated effects combined with tricky mathematics.

Differential Equations
Arguably the most important tool in physics is the differential equation: this is an equation that describes how, based on the assumptions of a model, the different involved quantities (numbers) influence and change each other. A simple example is the following: the rate of cooling of a hot object is proportional to the difference in temperature between its own and that of its surroundings. That is to say, when a stone is 200 degrees hotter than its surroundings, it will cool twice as fast as if it were only 100 degrees hotter. This is perhaps obvious. What is however not so obvious is that the time for the stone to cool from 200C to 100C is much shorter than the time it takes the stone to cool the last 100 degrees, since when it is hot, it loses heat faster, and so the hotter stone will need less than twice the time to cool down fully. Differential equations are necessary to make this reasoning precise. They can describe almost anything: from falling, to the pressure in the atmosphere, to the neurons driving your heart.

An important part of differential equations are the so-called initial conditions. These are the quantities with which we program our system to start off with. For example, the location and velocity of a skydiver, or the initial temperature of our stone. Setting initial conditions and evolving the system permits us to make predictions about what happens later.
The differential equation describing the cooling down of a hot stone.
On the left the rate of change of the temperature is proportional to the negative of the temperature on the right.
So a hot object loses heat more quickly!


Types of Differential Equations
Differential Equations pop up everywhere, and often, their shape recurs. The DE (differential equation) describing the cooling down of an object, for example, is the same as the DE that describes the pressure in the atmosphere. The DE that describes falling, also describes braking of a car! These are examples of so-called linear differential equations: they have a property called linearity that makes them relatively easy to solve and handle. All those outside of this category are called nonlinear. The DE describing the firing of your neurons is nonlinear. Physicists like to approximate everything to be linear for simplicity, but truth be told, most things are not linear. That is why studying these nonlinear systems is so important. The field I am doing research in does exactly that. Nonlinear systems can show all sorts of interesting behaviour that linear ones cannot: they can blow-up: i.e. go to infinity in a finite amount of time, they can have different equilibriums and they may even exhibit chaos.
The class of Linear differential equations is a tiny subset of the whole

Chaos
Chaos is a phenomenon that pops up in some nonlinear systems. To put it briefly, a system is chaotic when it is generally fiddly. More precisely, chaos boils down to sensitive dependence on initial conditions (Strogatz). A hot soup will take approximately the same amount of time to become luke warm if it were 90C instead of 91C. This system is not chaotic. Florida being 27C rather than 26.9C in April can however matter very much. It can totally change the weather, perhaps even be the difference between a hurricane and a good summer's day a month's down the line. This is called the butterfly effect: given enough time for the effect to propagate, a butterfly flapping its wings somewhere may induce a storm in another place! Weather is very sensitive on initial conditions and so is definitely an example of a chaotic system. A fascinating example of chaos is called the double pendulum.

Poincaré: Stability of the Solar System
The first time that the subject of chaos and sensitive dependence on initial conditions came up, was when the Swedish King Oscar II initiated a mathematics competition to prove that the solar system is stable. Poincaré's partial solution won, but on revising his work, he discovered a mistake. He realised that in the long run, tiny deviations in the orbits of the planets, will cause two seemingly similar orbits to completely diverge. Since we cannot know the positions of the planets exactly, we will never be able to predict their movements into the far future. To this day, the stability of our solar system has not been mathematically proven! You can read more about this story and the work of other astronomers in "Newton's Clock: Chaos in the Solar System" by Ivars Peterson.

Three-body problem
The simple case that Poincaré examined is called the three-body problem: here we have three bodies, exerting gravity on each other, influencing each others movements. This is a famous Physics problem upon which many excellent mathematicians ranging from Newton to Lagrange have broken their teeth. Poincaré only examined the case of the so-called restricted three-body problem: here the third mass is a so-called 'test mass' moving in the same plane, meaning that it exerts no pull on the other bodies, and is completely at the mercy of their gravity, like a tiny satellite so-to-speak! As stated earlier, he found that tiny differences in the initial conditions would have huge differences down the line.

Restricted Three Body Problem simulation
I have made a Python program that simulates this problem, and exhibits chaos. I published the code here. It gives very interesting and attractive images! In my program, I placed two test masses very near each other. As the simulation progresses, the test masses diverge and the tiny initial distance grows exponentially, as can be seen on the graph. Once the distance between them reaches the top of the graph, they have completely separated and have started to move independently. This demonstrates sensitive dependence on initial conditions.
Here the Lyapunov exponent lambda is approximately 10/25s = 0.4 s-1 i.e. 50% divergence per second!
These divergence times may vary, for some orbits may be more sensitive to chaos than others. Below I have made a second simulation, with different starting conditions, where you can see that divergence can in fact happen a lot faster. Certain types of chaotic systems have the property that they diverge at an, on average, constant rate. These systems have a so-called Lyapunov Exponentλ, which quantifies this rate. It is essentially equal to the steepness of the line on the logarithmic divergence plot. When a system diverges at lower than exponential speed, it has a Lyapunov Exponent of zero. This is an alternative definition for a non-chaotic system, i.e. a chaotic system must have a positive exponent.
Here the Lyapunov exponent lambda is approximately 10/100s = 0.1 s-1 i.e. 10% divergence per second!
Chaos as a buzzword
The term ' Chaos'  gets thrown around a great deal. It is important to stress that a system being messy or complex does not necessarily meet the definition of chaos. Chaos is about very tiny differences in situations being amplified to totally different behaviours in the long run. This amplification must be exponentially fast. Below you can see the exponential equation giving the average growth of the difference between a system's solutions. If λ is negative, the solutions will converge, meaning that they will go to some equilibrium together, if λ is positive, the solutions will diverge, regardless of how close they are.

This equation describes the approximate exponential growth between two initially close solutions, where λ is the Lyapunov exponent

Monday, July 9, 2018

Weeks 3, 4 and 5: Fireworks going up, boats going down

This weekly posting business hasn't really worked out so I will cease assigning blogs to fixed weeks. Below is a selection of interesting things that I have been up to lately. In other news, Tatiana, my colleague, has lent me a steel strings acoustic guitar, meaning that I have now naturally commenced studying 'Otherside' from the Red Hot Chilli Peppers. If anyone else has good song/piece ideas, please inform me.
During a visit to the cinema watching Deadpool 2 with John (front), Josh (middle), Nishad (rear),
I discoverd that American cinemas have lazy recliner seats for napping!
I have also just finished reading the book "The Name of the Rose" by the Italian author Umberto Eco. It is a grizzly and fascinating book about monastic life, the eternal battle against sin, the power of the medieval Catholic Church, whether Jesus and his disciples owned anything, and the English Franciscan William solving the murder mystery of a series of sinister killings of monks. I would recommend it with the reservation that it takes a while to get interesting and you have to be prepared to flip back and forth to the back to find the translations of many Latin quotes inserted in the text. If anyone has read the book and is interested in talking about it, please message me.

Petrushka by Symphonic Orchestra Institute
I bought tickets for a concert on the 24th of June in memory of the 100th birthday of the great American composer and conductor Bernstein. Upon arriving at the UMD Clarice hall were the concert would take place, I discovered that I was totally wrong, no-one was there, and I in fact bought tickets for a different concert, on the 30th. Oh well...
Orchestra performing Dukas' piece.
They projected video on the large decorated screen during Petrushka
One week later I found myself at the same place, same time, and now for the piece Petrushka, by Stravinsky. First the orchestra played "The sorcerer's apprentice" by the French composer Paul Dukas, followed by Symphonic Dances by Sergei Rachmaninoff, and then we came to the comedic piece Petrushka, the meat of the night. This was originally performed as a ballet and is about the plight of the Russian puppet 'Petrushka' at a carnaval. It is funny and grim at the same time. This time, the orchestra neither performed it as a ballet, or as a mere music piece. They got three puppeteers to play the puppets, combined this with smart use of live filming and pre-recorded video, and also used members of the orchestra when they did not have to play, using very witty props, hats and little moves to embellish the piece!

I must confess, I had started to fall asleep during the two earlier pieces but I was wide awake paying good attention during the last one because it was so intriguing. It is hard to explain all the individual parts that made the whole great but as an example I will give the random groups of musicians standing up during the carnaval at the start drinking wodka, one of the bassists coming forward and juggling with handkerchiefs outrageously for a few minutes later in the piece, and the funny dances that involved the entire orchestra standing up and changing seats in seconds!

4th of July
On the 4th we had the day off-quite relaxing. In the evening I went with Nishad, John and Josh to see the fireworks in Washington DC. It was quite exciting. After some initial delays to do with getting hamburgers, we made our way to the mall, where they barricaded the entire area around the Lincoln and Washington monument. This forced us to go through a narrow security check area, where hundreds of people were. Fortunately it went quickly! We sat beside the Washington monument, the large obelisk, looking right towards the Lincoln Memorial, where all the fireworks were going to be set off, it was very busy and a mighty event was about to start.
Panaroama view of where we sat

Fire 'em up
9pm came and dusk, then night came upon Washington DC. As soon as this had completed, around 9.15pm, faint sounds of a national anthem were to be heard from speakers far away, I was told by others, but they did not reach us. The first rocket went into the sky and exploded, illuminating the whole area and leaving a trail of smoke behind. Many others followed over the following period. I believe I even saw a hamburger, and a baseball shaped firework! At the end I believe I saw the letters USA, but because we were looking at it from the side, it was pretty much invisible..! The fireworks were really cool and it was a non-stop barrage. Then the end came. There was a dramatic outpour of people and we managed to scramble out of this mess which felt like an apocalyptic scene from a zombie movie, into the metro station Archives, where we met three Dutch girls from Maastricht, who were not so talkative, and then took off on a different train soon afterwards ;-p!

The star-spangled banner on our way out
Windtunnel
Last week we visited the local UMD windtunnel. First built in 1948, this thing has been in continuous use since then, and was even used to test the original Ford GT! The same technology from 1948 is still used to drive the wind in the tunnel. The scale which they use in the tunnel to measure forces on the test objects is also still the same to this day, with minor modifications. Unfortunately they were not operating the wind tunnel that day... Despite this, the windtunnel visit blew our previous campus nuclear reactor visit out of the water.
The enormous fan used the same propellor as a B-29 Superfortress,
used to drop the atomic bomb.
 
The rear of the fan smooths the air movements out.



The actual windtunnel section was smaller because the large air currents
had to be compressed together for higher wind speed.

Nuclear Reactor
Earlier, we had the change to go to the campus nuclear reactor but that was a big let down. It was kept in the nuclear engineering and materials science building and was in fact not used to generate power. In fact, there is no longer nuclear engineering department! Changing the name is just too costly. I asked our guide what it was used for and it turns out almost no research is done there, it is mainly used for giving tours at and it is nice because in the winter months it keeps the building a bit warmer due to the heat it gives off.

Large reactors have large water cooling towers. This one was so small (250 kW), that it did not need cooling. The operator, an undergraduate student, seemed to be boring his brains out. I was left with the feeling that the reason the reactor is still operational is because tearing it down would be too costly although I was too polite and refrained from that question. On the plus side, we did see Cherenkov radiation, the green-bluish tinge given off by reactor fuel rods. We were forbidden to take pictures so I have nothing to show for it.

Canoe Chaos
This Sunday I went out to Little Seneca Lake together with my flatmate Nishad and colleague Keshav. We drove out to Black Hills regional park and went for a short hike, followed by canoeing. We briefly considered taking a more stable rowing boat but then decided to be bad asses and went with the canoe. I distinctly remember the guy saying "People usually don't capsize". I also distinctly remember the rentals man saying to the other "Maybe you should have explained how it works" the moment that we set off. You can guess where this is leading to. Jiggling around, often turning full 360-degree circles due to our poor boat control and co-ordination, we steadily made our way around the lake, with capsizing always a possibility.  On the last half-mile stretch back to our boat house all was going well, and then we flipped. I basically had no say in the matter. I have no idea what caused it but some tiny shift caused us all three to be in the water two seconds later with no consent!
An image I nicked of an ideal canoe experience on
the fateful Little Seneca Lake
Is there a way to right a canoe?
Turns out there is no good way to empty a canoe and get going again! General practice is to swim to the shore and then empty it there. If we had only known that! We were in a bit of a pickle, although the warm water offset this slightly and made capsizing quite comfortable. Luckily we had left our phones and wallets in the car but this still meant that we had no way of contacting the boat people to get some help, of which we were in dire need. Fortunately this Chinese family consisting of two parents and a daughter with no English at all, and a teenage son, with some English came along on a rowing boat towards our frantic waving.

"911 my boat sank, fish me out here!"
We told them to call the people from whom we rented the boats but, partially due to the language barrier, partially due to the confusion, they ended up calling 911. This ended up with Nishad, whilst still swimming, talking out of the water into their phone, confusing them, and being confused himself, not realising that he was speaking to 911. These darned people kept on offering medical assistance and to send officers when all we needed was someone to bloody well drag us out the water! In the meanwhile the Chinese dad had gotten to work and slowly but surely, managed to find a way to drag our canoe out of the water and empty it. This permitted me to climb in. Nishad made it into their rowing boat, but Keshav was still stuck and couldn't manage to hoist himself in/get lifted into the boat. Him entering the boat required manoeuvring to the side of the lake with much difficulty, permitting him to step in.

All's well that ends well
A lake patrol boat came in the end to pick them up and bring them back. I in the meanwhile had managed to retrieve a lost ore and had started to head back solo as there was nothing more I could do to fix the state of affairs. The two of them were dropped off at the harbour, awaited by three police cars, one ambulance, a fire truck and much hilarity. I subsequently graciously glided into the harbour with a slightly water logged canoe. In Nishad's words, I was the one who had "managed to save most face, because at least you looked like you knew what you were doing on the boat". We were told by the boat rental people that this was their most over-the-top capsizing ever, since no-one every calls 911. In the end we were all fine and made it off only being the subject of laughter of all, although with Nishad unfortunately losing his glasses.