This video introduces chaotic dynamical systems, which exhibit sensitive dependence on initial conditions. These systems are ubiquitous in natural and engineering systems, from turbulent fluids to the motion of objects in the solar system. Here, we discuss how to recognize chaos and how to numerically integrate these systems.
0:00 Overview of Chaotic Dynamics
8:49 Example: Planetary Dynamics
14:31 Example: Double Pendulum
19:12 Flow map Jacobian and Lyapunov Exponents
26:33 Symplectic Integration for Chaotic Hamiltonian Dynamics
33:41 Examples of Chaos in Fluid Turbulence
37:16 Synchrony and Order in Dynamics
Transcript
Overview of Chaotic Dynamics
0:01
[Music] foreign
0:09
So it's been a pretty interesting series of discussions on differential equations and dynamical systems.
0:16
In the last few videos I've shown you how to integrate differential equations and systems of differential equations. Even if they're non-linear we can integrate them on a
0:25
computer using numerical simulation techniques like Runge-Kutta schemes or Euler schemes and
0:31
I mentioned in passing that there are certain systems that are chaotic, that are especially
0:38
hard to simulate... to integrate accurately forward in time. They amplify uncertainty and
0:45
errors exponentially in forward time and so today I'm going to dive in a little bit more to what I
0:51
mean by chaos and chaotic systems. I'm going to give you some definitions and some examples and we're also going to work out with math some of the implications of what it means to be chaotic
1:01
and how we can interpret these solutions and also it'll give us an idea of what we might be
1:06
able to do to improve our numerical algorithms to simulate these kinds of tricky systems.
1:12
So this is a video in Python and Matlab to simulate the Lorentz 1963 problem, this
1:21
chaotic system of three differential equations, and what I did was I took an initial condition and added a cube of uncertainty... this red cube of uncertainty... and integrated all of those
1:31
trajectories forward in time. And you can see that the trajectories initially stay together but
1:36
after a very short amount of time they start to stretch and fold and mix onto this chaotic Lorenz
1:43
attractor. So this is kind of pictorial evidence of the first main point I want to make which is
1:50
oftentimes chaos is defined as a system that has sensitive dependence on its initial conditions. So
1:57
you can think of this red blob of uncertainty as some uncertainty in my initial condition and very
2:03
soon as I integrate this this dynamical system that uncertainty grows and grows and grows until
2:10
after some finite amount of time that initial grid of particles could be anywhere on this attractor.
2:16
This is in stark contrast to a non-chaotic system such as a pendulum or a mass on a spring
2:24
where even if the pendulum is non-linear... it has non-linear terms "d^2/dt theta = -sin(theta)" it
2:32
still does not have the sensitive dependence on initial conditions. If I start with a blob of initial conditions around some nominal "theta" and I let all of those go they're going to basically
2:41
stay together in the same kind of clockwork and there will be some predictability in the future
2:47
based based on those initial conditions, whereas in a chaotic system you truly have this sensitive dependence on initial conditions.
2:54
And so that actually causes some big issues... for example, when we talked about our numerical integrators
3:03
we were trying to find some numerical trajectory, let's say you know I have x_0 and then I want to integrate it forward to get some x_1 and integrate
3:14
that forward to x_2 and so on and so forth and we developed schemes like the Runge-Kutta scheme and
3:21
analyze the error properties at each time step. And so for example we showed that the fourth order
3:29
Runga Kutta a scheme has error that is on the order of delta T to the fifth power where delta
3:38
T is my time Step at every single step of the integrator I have order delta T to the fifth error
3:45
now for deterministic systems what you can do this is this is what's called the so-called local error this is um kind of local uh at each DT at each delta T and for a deterministic system
4:00
not like this chaotic system but more like the pendulum system you can compute from this local error what is the global error across the trajectory because essentially these errors
4:09
will just add up and each time step you're accruing this order delta T to the Fifth Air
4:15
and the length of my trajectory you know if I make delta T smaller I have more steps for that
4:20
to accrue and so the global error is often uh just this number divided by delta T so the global error
4:29
would normally be order delta T to the fourth
4:35
true for chaotic systems This Global error doesn't make sense for chaotic systems I'm about to show you why so this is not true for chaos or for chaotic systems
4:48
and the reason is is because at each little time step when I accrue this very very small order
4:54
delta T to the fifth error so I have you know I take one time step and my simulated trajectory
5:01
deviates from my true trajectory by some teeny tiny little Epsilon so instead of going to X1 I
5:07
go to X1 plus Epsilon that Epsilon so you know I basically go to X One Plus Epsilon that's the
5:16
error in my numerical scheme it's teeny tiny but over time because of the sensitive dependence on
5:22
initial conditions because of a chaotic system my this Epsilon is going to grow exponentially
5:28
in forward time so my my trajectory my simulated trajectory and my true trajectory are going to
5:34
diverge even if I'm only introducing these teeny tiny little order delta T to the fifth errors at
5:39
every time step so the way that these local errors compound for chaotic systems is way way worse than
5:47
for non-chaotic systems and so this notion of global error that we think of for pendula and
5:52
spring Mass dampers just doesn't apply to chaotic systems it's much worse than that you essentially have something like each of these little errors these little local delta T errors at every time
6:02
step get magnif to magnified by some exponential function some e to the Lambda T where Lambda is a
6:10
positive number called the lyapan of exponent liabunov exponent and that essentially says
6:17
that every single time step these little errors are growing exponentially in time and so this is going to motivate better integrators or at least different integrators for these chaotic
6:26
systems oftentimes so for example if I have a hamiltonian system or some mechanical system
6:32
governed by the Euler LaGrange equations there are special custom tailor-made integrators that
6:39
are designed for those systems if they're chaotic to to give you better properties and kind of stay
6:44
on the solution manifold more Faithfully okay so I'll tell you about that a little bit more in a
6:51
minute I'll just mention here that leaponov this is one of the most controversially spelled names in all of mathematics I think I've seen at least three different spellings of leaponov this is the
7:01
one I grew up with so this is the one I'm using that when you Google the App and on there's going to be like at least three different ways to spell this and so often what we try to do is we try to
7:11
use a small enough delta T that our runga cutter error is actually very very small to begin with
7:17
so order delta T to the fifth we want that to be as close to machine precision as possible you know 10 to the minus 12 10 to the minus 16. but even if this Epsilon is 10 to the minus 16 for a positive
7:28
Lambda it doesn't take very long for this error to grow to order one to a big significant error in
7:35
our in our simulation and last thing I'll point out before I give you some examples is in this
7:40
chaotic lorentz system because the trajectory is kind of bound to this white attractor this is the
7:47
so-called strange attractor or the lorentz butterfly attractor that that Epsilon grows
7:53
initially exponentially but then eventually uh it the trajectory is still stuck adhering onto this
8:01
um this strange attractor and so I can actually get away with using something like rk4 if all I
8:08
care about is the rough shape of this attractor or the rough statistics of this tractor maybe I don't
8:13
care if this is the exact uh perfect trajectory that that initial condition would take this is
8:18
a representative trajectory because it's going to you know do the representative thing uh on
8:24
this Lorentz system if I wanted a you know very quantitatively accurate trajectory that followed
8:30
the exact true Dynamics I might need to use something more fancy than a runga cutter scheme so
8:36
we'll come back to this in a minute and we'll talk more about these kind of numerical considerations
8:42
the other examples I like to think about so this is kind of one of our canonical simplest examples it's a three-state ode that happens to be chaotic.
Example: Planetary Dynamics
8:50
The solar system is another great example. Chaos was actually discovered, or at least codified mathematically
8:58
by Henri Poincare in the early 1900s... I think it might have been 1906, right around the time
9:05
Einstein was making his great discoveries. Poincare was solidifying this theory of
9:12
chaotic dynamical systems, and actually a lot of the dynamical systems and differential equations that we use even to this day come from Poincare about a century ago. And so the idea is that there
9:25
are chaotic trajectories in the solar system. And it's pretty easy to understand this if you
9:30
think about... I don't know it's a little hard to see but let's pretend that that's Earth and let's pretend that the Moon is somewhere over here... but between the Earth and the moon there is this
9:40
equal gravity point, this saddle point. It's literally a fixed point of that dynamical system where it has saddle eigenvalues, so it has one positive real and one negative real eigenvalue,
9:52
and what that means is if I am at this equal gravity point between the Earth and the moon, and I'm perfectly on that point then I'll stay at that equal spacing... that equal gravity distance
10:03
between the Earth and the moon but if I perturb myself a teeny tiny bit towards the moon I'll
10:09
accelerate towards the moon, and if I perturb myself a teeny tiny bit towards the Earth I'll accelerate towards the Earth. And so you can see that at least locally to that fixed point I get
10:18
this exponential splitting of my trajectories because of that saddle point and so that is
10:25
one of the hallmark features in chaos is that usually there is some kind of a saddle point
10:30
that's mediating the stretching and exponential growth of trajectories in that system. Actually
10:37
if I go back to this Lorenz system you'll see that this bundle of trajectories actually stays
10:43
pretty close together until it gets close to this saddle point here. So it's still on the same lobe, but now they're going to pull down and get close to the saddle point and that's what
10:52
causes them to really stretch in this exponential positive Lyapunov exponent way.
10:58
And I'll mention that this this technically these trajectories don't split monotonically... the
11:04
separation between two neighboring trajectories with this sensitive dependence on initial conditions it's not monotonic exponential growth; it's on average exponential growth. Sometimes
11:13
they come closer together before they move apart and it's usually driven by how close they get to these saddle points. So saddle points are really essential in this picture of chaos. Again this is
11:24
a whole class that I hope to offer at some point in the future... many lectures and hours of videos
11:32
here. I'm just giving you the very high level, especially as it relates to how do you numerically simulate ordinary differential equations. And so in the solar system I want to point out that
11:42
having a saddle doesn't mean you are guaranteed to be chaotic, it just means you locally will have
11:48
trajectories separate. Consider a pendulum... if I look at the pendulum up condition that also has
11:53
a saddle point, and trajectories will diverge locally in time but in a very predictable way.
12:00
But if I have enough saddles and I have a high enough dimensional system like this interplanetary solar system network, often times that gives rise to really chaotic trajectories
12:11
and it turns out in this case you can actually harness these chaotic trajectories and harness this exponential growth for very efficient transport to very different regions of the
12:21
solar system. That's kind of depicted here in this artist's representation, is that if I can get near one of these points where I get this very large sensitivity and this large spreading, then with
12:31
a small amount of fuel burn, a little "Delta V" of my rocket ship, I can go from ... I can jump
12:37
from this tube to this tube and go to completely different places in the solar system for for
12:43
small amounts of energy. Now this epsilon would be like a small amount of energy, and it allows me to to get this large amplification. So chaos is not always a bad thing, but it is hard to predict and
12:52
it's hard to simulate, and it's hard to estimate. There are in fact special integrators used to to integrate this dynamical system from our various global space agencies for super computer
13:05
simulations of what the solar system and all of its objects will look like at some time in the
13:11
future. And these are very very tricky simulations because of the chaotic nature of the system.
13:19
To give in my class a sensitive dependence on initial condition is the double pendulum. The double pendulum is probably the simplest mechanical system that exhibits chaos. And by
13:30
double pendulum I literally mean it's one pendulum with another pendulum attached to it... so there's
13:37
two "thetas" there's theta_1 and theta_2 and this double pendulum you can picture how this thing
13:44
would would swing and maybe do some pretty crazy things so what I did was I actually build this for
13:49
my first class ever teaching here at University of Washington. I built an apparatus where I have
13:56
two double pendulum right next to each other, so it's called the tandem double pendulum. I got
14:01
this idea from the controls and dynamical systems library at Caltech where I believe Jerry Marsden
14:09
was gifted a tandem double pendulum. So it's two double pendula right next to each other and you
14:17
can start them at the same initial condition and when you let them go they their trajectories do
14:22
agree for a little while, and then at some point they diverge because of this sensitive dependence
14:28
on initial conditions. So I built one of those for my class and that's what we're visualizing here I start them at the same initial condition and then let go they're actually agreeing pretty well until
Example: Double Pendulum
14:38
they don't and now they've diverged into totally different solutions. Small changes in the initial
14:43
condition, small changes in the system parameters -- the friction, the length of the pendula -- will
14:50
eventually cause these trajectories to diverge in this kind of exponential Lyapunov exponent way,
14:57
which is really cool. And you can try this thing from different initial conditions... maybe at some point I'll take a video outside ... actually I tried to bring it in here but the lighting is
15:06
just not good enough for these, they kind of blend in... and we can try different initial
15:12
conditions so for example if I start with my my tandem double pendulum where they're both in the down down position and I perturb them a small amount they actually that is not chaotic they
15:22
basically will act like little pendulum clocks and they'll almost perfectly track each other forever until they die out to zero um and I actually chose this initial condition where you know one of them
15:33
was at this kind of 90 degree angle because that is an initial condition that has enough energy
15:39
that you kind of excite the chaos in the system and so that's another key principle here is that
15:44
a lot of times for mechanical systems for the the planetary Dynamics there is a certain energy
15:49
level above which uh these chaotic Dynamics are really excited and activated and again it has
15:55
to do with the saddle points in the system so in this uh this double pendulum system the pendulum
16:02
uh if I if I linearize the Dynamics we know how to linearize the Dynamics the down down
16:10
um configuration just the kind of really easy down down configuration with you know small perturbations that is actually a linear center it's got a plus or minus I Omega plus or minus
16:21
I Omega eigenvalues and so it's neutrally stable it's not chaotic but when I increase the energy
16:27
and so now I have the first pendulum arm down and the second pendulum arm up so kind of the down
16:34
up configuration if I linearize this system you should do this yourself at home if you linearize
16:41
these Dynamics you'll find out that it has a saddle Direction in that fixed Point there's one set of plus minus real eigenvalues and this saddle point is where the chaos comes from so if
16:54
I start with energy Above This saddle point I'll get chaotic Solutions like this so that's why I start from that initial condition because this is where you'll see that sensitive dependence
17:02
on initial conditions is for energies Above This saddle point we actually just wrote a couple of
17:08
cool papers showing that the Dynamics of this pendulum are almost mathematically identical to
17:14
the Dynamics of the the three body problem that we've been studying you know for over 100 years
17:19
in in planetary Dynamics making this double pendulum kind of a cool tabletop experiment
17:25
to start understanding chaotic transport in the solar system and again in both of those systems
17:30
we need good numerical integrators and we need to understand how our error grows through these these
17:36
chaotic systems through this sensitive dependence on initial conditions again that's the key Point
17:41
here is sensitive dependence on initial conditions you're going to hear that over and over again there are other things people use to describe chaos kind of Hallmark features but that's really
17:50
the one that I always keep coming back to is um that you know a small change in initial conditions
17:57
often gets Amplified kind of exponentially at least for a while in these chaotic systems
18:03
good uh and you can actually you know since I built this about 10 years ago we've actually built
18:08
a few much better experimental rigs in the lab so you can control a chaotic system so we've pumped
18:14
in a lot of energy so it's well above the chaotic threshold but with feedback control and with a
18:20
good enough integration scheme a good enough kind of model predictive controller we can actually
18:26
swing this pendulum up and stabilize a condition that's normally unstable and definitely with enough energy that you would classify if I let the system go it would have a chaotic Dynamic okay
18:37
this is actually the the third generation double pendulum that we built in my lab I think we're on
18:43
to the fourth generation now which is even kind of fancier and nicer than this where you can do all
18:49
kinds of cool acrobatic control again using the fact leveraging this chaotic Dynamics to put in
18:55
only a small amount of energy at the right time and using kind of the internal chaotic Dynamics
19:00
to to get the system to behave the way you want it to so really cool stuff again just just kind
19:06
of illustrating that you can in fact control these systems uh sometimes if you're lucky okay
Flow map Jacobian and Lyapunov Exponents
19:15
I want to tell you about um so we've talked about how chaotic systems involve this exponential
19:22
growth of small perturbations mathematically maybe I want to show you actually mathematically how you
19:28
would write this down because I think this is pretty useful so let's say you have your differential equation uh x dot equals f of x now technically this could vary in time as well this
19:39
could be f of x comma T no big deal nothing's going to change and what I write it's just a little more complicated and often what we will say is that um the numerical solution X at some
19:52
future time T is equal to X naught exit time 0. plus an integral from times 0 to time T of the
20:02
Dynamics F of and now X is is my trajectory X is my trajectory which is a function of time and so
20:11
you evaluate F at each of these intermediate times from 0 to T along a trajectory and you integrate
20:19
this up using a dummy variable Tau now you can kind of carefully convince yourself you know
20:24
that this is in fact how how you would integrate the system mathematically this is kind of an
20:30
idealization of what we would do in these these rangakatta schemes or Euler schemes this is like
20:37
a mathematical expression that if you perfectly did this integral and you perfectly integrated up all of these contributions of f to x dot and kept adding those up along along the trajectory and you
20:47
kept updating f as X changed as X moves along that trajectory then this will step your your system
20:54
forward in time and oftentimes I call this the the flow map operator sometimes I call this this big
21:00
flow map from 0 to T of some X naught and it steps me forward from t 0 to T to time T okay this is a
21:10
mathematical object and what we'll find is that for chaotic systems so this is actually like the
21:16
one of the first papers I ever wrote In fact the first paper I ever wrote when I was a grad student was about analyzing the properties of this flow map when you add a teeny perturbation when you
21:27
add a little Epsilon to your X so what I'm going to do is I'm going to say what if I had instead
21:34
of X naught I had X naught plus an Epsilon so if I have Phi you know my flow map I'm integrating uh
21:43
from X naught but what if I have X naught plus an Epsilon plus a teeny tiny little Epsilon of
21:49
perturbation and this Epsilon could be from a numerical artifact it could be 10 to the minus 16 round off error in how I stored this it could be an order delta T to the fifth error for my
21:59
runga cut a scheme whatever it is I want to know how that error propagates through this flow map
22:04
and so you can tailor expand this because this Epsilon is small so we can tailor expand around this is a function it's a it's a smooth function typically and so
22:13
I can tailor expand and this is going to equal the flow map that I want this V 0 t of X naught
22:21
plus the Jacobian of this flow map plus d uh let's say d Phi DX
22:30
yeah zero to T evaluated at X naught times my Epsilon plus I could write out more and more
22:39
terms plus higher order terms in epsilon plus order let's say epsilon squared and higher terms
22:45
okay and so essentially this is the true flow map this is the true trajectory X at time T this is
22:52
what I actually want and this is my leading error term so this is my kind of leading error term
23:01
leading error and this is actually how we compute this Lambda at least approximately for for finite
23:10
time trajectories for finite time t uh kind of the leading eigenvalue of well the leading
23:17
singular value of this Matrix of derivatives evaluated at X naught is going to give me an
23:23
estimate of my my lyapana of exponent Lambda because essentially what this does is this says
23:29
this Jacobian this is a matrix when I evaluate this set of partial derivatives with respect to
23:34
X naught this is a matrix and I can compute this numerically using things like the finite timely
23:40
opponent of exponent so I have a whole video on that you can check out of how to actually compute this thing and approximate it from trajectory data but the long story short is that
23:50
this is a matrix when I evaluated at X naught and it tells me that that Matrix has you know
23:56
eigenvalues and eigenvectors and singular values and singular vectors there are directions that
24:02
that Matrix makes bigger and there's directions that that Matrix makes smaller and so if my error
24:08
is aligned with one of the bad directions of this this amplifying Matrix then my error is going to
24:14
get Amplified and so what we find is that this Matrix has oftentimes for chaotic systems this
24:22
Matrix will have large singular values meaning there are directions that if error is in that
24:27
direction those will get Amplified exponentially and so what you do mathematically I'll just write
24:32
this down in case you're curious you don't have to understand all the steps there's a whole video and a whole papers about this is that you could basically pick the max singular value of this dvdx
24:47
and that is going to equal essentially approximately this e to the Lambda T so
24:54
you could approximately your lyapanov exponent Lambda by taking the logarithm of this the maximum
25:01
singular value and dividing by the integration time T so that gives you a way of estimating how this error propagates through your system and this kind of synthesizes a lot of things we thought
25:10
about in this series on differential equations so this is the perfect trajectory integration
25:15
scheme if I had infinitesimal truly DT delta T is like truly calculus infinitesimal DTS this
25:23
would be exact and true this would give me the trajectory at any point in time but we know that we're chopping up our trajectory into finite Delta T's that accrue some error some Epsilon error and
25:33
so if I assume that at each time step I introduce this error Epsilon maybe it's even 10 to the minus
25:38
16. maybe I have an amazing integrator and it's as good as my computer can represent numbers but
25:43
I'm still going to have some representation error 10 to the minus 16 at the you know best case here
25:49
I can tailor expand that out and I get these interesting terms for my Taylor series where I can
25:55
isolate that this is the leading error term and the point I'm trying to make is that for chaotic
26:00
systems this leading error term amplifies like e to the Lambda T okay which is a big deal that's
26:07
really bad that means that even my 10 to the minus 16 error is going to amplify and stretch and grow
26:12
and so there's ways you can control that and there's ways you can understand how big that Lambda is numerically using these finite Timely app on all exponents by actually
26:20
Computing the singular value decomposition of this or if you like the eigenvalue decomposition of this times its transpose um the koshy green stress stress tensor
26:31
um so I think that that's pretty interesting uh something else I think I want to to tell you about is if I take a mechanical system like this double pendulum so in fact exactly like
Symplectic Integration for Chaotic Hamiltonian Dynamics
26:43
this double pendulum let's assume that there is no friction on these bearings so we're going to make an idealized you know perfect hamiltonian system or lagrangian system of no dissipation we
26:55
know that the energy should be conserved in this system okay so if I literally plot you know energy
27:01
versus time there should be a constant line for any trajectory that I integrate starting
27:08
from X naught to some x t that energy should be constant now this is actually a really good
27:14
exercise you should write down the double pendulum equations of motion you can do this from the Euler LaGrange equations or from the hamiltonian equations pretty pretty easy to
27:24
do it's a little messy you're going to get all the Sines and cosines right but it's not so hard and you should write down an rk4 integrator for that problem and simulate that trajectory forward
27:34
in time and compute the energy at each time step and what you'll find is that the energy of the rk4
27:43
is going to be a mess it's going to diverge from this constant maybe it'll go to negative Infinity
27:49
maybe it'll go to positive Infinity but it's not going to be a constant it's far from a constant when you integrate these mechanical systems basic basic fundamental conservation laws
28:00
like conservation of energy are being violated and like truly violated here um I feel violated when
28:07
I integrate A system that should be conservative with an RK scheme and you should too and so there
28:13
are better numerical algorithms for integrating these kinds of chaotic systems if there's that
28:18
additional structure if we know that our system is hamiltonian so for hamiltonian systems
28:26
uh hamiltonian there are integrators called simplexic integrators simplexic
28:33
and they essentially let's say symplectic integrators there's some really good algorithms out there for some plectic integrators where essentially we know that hamiltonian systems
28:43
generally have this kind of um skew symmetric structure between positions and momentum so
28:51
that you have something something some some skew symmetric structure like this in your equations and what simplectic integrators do is that they build the numerical updating scheme so
29:02
that every time step this is this structure is exactly preserved so if you like all of
29:07
these errors even when they accrue they are still being kind of projected back onto a manifold where the basic physics the basic energy conservation is being satisfied so
29:19
those algorithms like a simplectic maybe I'll make this in green something like simplectic
29:26
you know even when the integrator tries to you know pull it off of this energy surface it's kind of constantly correcting it and staying very very close to that energy surface so these are
29:37
Reef you want to integrate you know a spaceship through the solar system or if you want to know how a space rock is going to be hurtling through the solar system you better be using
29:45
a smart integrator or else you're going to get garbage you're not going to know if it's going to hit Earth in 50 years or not because your simulator is completely off base
29:53
okay just like there are simplectic integrators there are also and that preserves hamiltonian
29:59
structure structure if you have something that is you know if you want to start from the lagrangian
30:05
um which these are kind of equivalent um you know ways of representing mechanical systems
30:10
the Euler LaGrange equations if you want to discreetly in a computer integrator satisfy
30:16
the lagrangian the Euler LaGrange equations these are called variational integrators variational and
30:23
I might you know I spent a lot of time developing variational and simplexic integrators in research
30:29
and you know back um you know a decade ago maybe I'll have a whole video on variational
30:34
and simplexic integrators because they're so important for integrating hard chaotic systems
30:39
where you really need to know uh good trajectories good answers for a specific initial condition
30:45
again in that lorentz case I was showing you I just wanted to know kind of the statistics of how things happened and so it didn't really matter I wasn't I didn't care about that single trajectory
30:55
and where it went as much as the statistics but if I'm following an asteroid or you know a space Rock
31:01
in the solar system I really want to know that specific trajectory where it's going to be I need these better variational and simplexic integrators now it turns out kind of a fun happenstance that
31:12
a an rk78 integrator this is sometimes called the rkf the runga cut of felberg seven eight
31:20
rkf78 it turns out that our kf78 is nearly symplectic for lots of problems and so it's
31:30
actually an amazing integrator it has kind of all of the properties of an RK integrator very small
31:35
single step error so very accurate and single steps and it approximately is simplectic on
31:41
lots of problems I couldn't tell you why to be honest this is something I've heard people say and I've observed it myself that when you simulate these chaotic systems this tends
31:50
to work much much better than this because of some structural property here so that's interesting too
31:59
um good yeah so this is really important um and and you you sometimes need these these better uh integrators you know again for for
32:09
things like control applications I can't have my energy blowing up in my model prediction uh for
32:15
really tricky prediction problems I can't have my my error blowing up for these systems okay good
32:25
that I think are really cool so I'm going to bring up some more videos I'm going to erase this really quickly and then bring up those videos and then I'll conclude
32:32
foreign and I'll also point out I got this interesting advice once when I was an
32:38
undergraduate that you know a human life is also chaotic it feels very chaotic sometimes sometimes
32:44
it feels more deterministic sometimes it feels fully chaotic um but you know the choices you
32:50
make can often have these large kind of Divergent effects right so this is a it's an interesting
32:56
it's an interesting meta perspective that you know small changes to what you do can add up to large
33:02
changes over time uh and so you know understanding having some model predictive control understanding
33:08
where you think you're going and where you want to go and figuring out you know am I at one of these critical points where things could go totally differently and you know if in those
33:17
cases I'm going to slow down I'm going to decrease my delta T I'm going to think harder uh about you
33:23
know about what decisions decisions I'm making so anyway kind of interesting I thought that was uh that was fun this was like a cocktail party when I was an undergrad and and uh Jerry Marsden
33:33
told me about you know like the butterfly effect and how decisions you know you make now can make a big difference later on and he was absolutely right okay so some other cool examples
Examples of Chaos in Fluid Turbulence
33:45
fluid flows are often chaotic and so specifically turbulence when someone talks about turbulence
33:52
or a turbulent fluid flow often we model that turbulence as a chaotic dynamical system so there
33:58
is a deep deep relationship for you know many decades researchers in turbulence have studied
34:05
chaotic dynamical systems and researchers in chaos have used turbulence to motivate what they're
34:10
doing I feel like I'm getting a little bit trapped here and so this is a cool example of a thermal
34:17
convection you have a hot plate on the bottom and a cold plate on top and you get this kind of thermal convection this is actually exactly what lorentz was uh was studying in this Lorenz 1963
34:28
model was the chaotic convection in the Earth's atmosphere so you know the Noonday Sun let's say
34:35
you wake up in the morning the Sun starts beating down on the planes it heats up the planes and it
34:40
creates these large thermal convection patterns you often get big thunderstorms and supercell
34:45
clouds and things like that and this system can be at least approximated by this chaotic differential
34:54
equation on the right and so this um you know was observed that similar conditions from day to day
35:02
at you know starting conditions can often lead to very very different cloud formation and weather formation and precipitation and all kinds of things that are captured in this model
35:12
so this uncertainty and sensitivity of chaotic convection was captured in this 1963 Lorenz model
35:19
I always add Fetter and Hamilton um Linda Fetter and Margaret Hamilton when I put
35:26
this author list down because they were the grad students who actually ran the simulations that Lorenzo used to build these models by modern collaboration standards they
35:35
would almost certainly be co-authors on that work and I don't think we should forget their contribution to this extremely important chaotic dynamical system that we all use
35:46
um and more generally in fluid dynamics you can kind of picture how this this chaos arises
35:52
if you think about sensitive dependence on initial conditions this is super cool work um by the kth group I love this video I've used this video before and I'm a huge fan of
36:03
their their simulations and their work where they simulate this super super high fidelity numerical
36:09
simulation of the turbulence over over wings and things like that and so the fluid flow itself is
36:14
chaotic if I perturbed one of these vortices by even a little bit the flow the exact configuration
36:20
would change quite rapidly and give you a totally different distribution so it would give you the
36:25
same distribution of vortices but a different instance a different realization this Vortex
36:31
might be over here and this one might be over here and things like that so small changes in
36:37
the flow field itself will cause the flow field to change over time things get Amplified as it
36:43
goes through this flow and down here small changes up here will have big changes down here that's one
36:49
one interpretation of chaos another one that I like is imagine you're a little particle this is
36:55
kind of fun or a little particle and we're you know in this flow if I start one Epsilon to the
37:00
left or one Epsilon to the right I'm going to get pulled into a whole different network of vortices and my path is going to be completely different even with a teeny tiny Epsilon perturbation to
37:10
my initial condition so a lot of Chaos in this system as well and this is where I want to point
Synchrony and Order in Dynamics
37:17
out you know when I was kind of growing up in dynamical systems I was deep into this three-body
37:25
problem Solar System Dynamics planetary Dynamics fluid dynamics where chaos is just a part of our
37:30
life it's everywhere and I kind of thought to myself well how could you possibly have a high
37:36
dimensional dynamical system with the x dot equals f of x that wasn't chaotic and I met some friends
37:43
in grad school who had high dimensional dynamical systems that were in fact very much non-chaotic
37:48
and they actually kind of self-organized and self-ordered if you think about it your body
37:53
is an incredibly High dimensional incredibly High dimensional dynamical system and all there
38:00
although there are aspects of chaos locally it's extremely well regulated and ordered and kind of
38:07
these emergent patterns reinforce and and persist right like your metabolic regulation kind of says
38:16
that at least those variables are not diverging you can you can eat a Snickers bar or I can skip
38:22
lunch and typically you know those perturbations don't cause my system to go completely chaotic
38:27
sometimes they can certainly but you have a lot of kind of stability and determinism built into this
38:33
very high dimensional system so clearly chaos is not a universal property of all dynamical systems
38:39
so even in really really complicated fluid flows oftentimes you get these coherent structures these
38:47
patterns that keep coming up and keep forming over and over again even in very turbulent flows
38:53
that this is locally chaotic but there are these large-scale emergent synchronizations and patterns
38:59
um you know this you can see I think this is a great example this um flow this is an atmospheric flow past Guadalupe Island where again this is a chaotic system we
39:09
know that weather is chaotic fundamentally and fluid Flows In in general are also but
39:15
you still get the emergence of these large-scale structures and so one of the my favorite videos is
39:21
this uh metronome synchronization video so I've been playing this for my class for the last 10 years I love this video where you basically have this initial condition so someone comes in and
39:33
they start all these these uh metronomes these little pendulum at different initial conditions
39:39
and um so that's totally disorganized and I'm going to turn up my volume here because
39:45
I kind of actually want you to hear all the clicking they're all over the place
39:56
and you'll notice that they're on this kind of table that is Loosely able to vibrate so
40:02
sometimes the example I've seen you can build one of these at home you take two cans of you
40:08
know Soda Coke and you put a little plank on top of it and then you put your little metronomes
40:16
on top of here and the weak Epsilon coupling between these uh because this this can can uh the
40:24
plank can roll on top of this uh these cylinders will eventually cause these to synchronize
40:30
and so uh what you're and this is a common phenomena in lots of high dimensional systems that are weakly coupled let me keep watching this
40:43
so at some point there's going to be a phase change where they start to synchronize
40:51
[Music] it's almost happened you can almost see now like half of them have started to synchronize
40:56
and some of them are out of phase but they're they're definitely starting to synchronize almost
41:03
and it's almost happened now
41:11
and the more they synchronize the more they synchronize so this table you can actually see
41:18
the table wobbling now now it's giving a very strong force in keeping them all synchronized
41:26
and this guy over here this one's my hero that one's not that one's gonna take the longest to synchronize
41:34
that one uh over there is going to take the longest to synchronize so it doesn't you know some of these will will take a little while but you can see that this emergent Behavior Uh does
41:43
exist in these systems and sometimes all it takes is a little Epsilon coupling so that you get this feedback um to kind of bring them into synchrony so you know we've known for a long time uh when
41:56
soldiers cross a bridge in formation they're supposed to break uh you know break their their
42:03
marching cadence or else they could bring the bridge down this is this has been known for a long
42:08
time you're supposed to break step when you cross bridges in large groups the Millennium bridge in
42:14
London that really cool Bridge walking bridge with the cool cables that had a weak coupling
42:21
so that when people walked across it when one person stepped and it caused the bridge to move
42:27
a little bit to one side everyone else brace themselves out of phase and caused another
42:32
force and those eventually cause everyone to synchronize just like this and that almost broke the bridge down everyone had to like drop on all fours and crawl off because of this kind
42:42
of emergent synchronization so I guess the point I'm trying to make here is that High dimensional
42:48
dynamical systems uh can be chaotic they can be deterministic they can synchronize they can
42:55
desynchronize there's a lot of super duper Rich phenomena in these systems that you can observe
43:00
and predict and estimate and control but you know really understanding how the numerics works and
43:07
how you would simulate these in a computer how small perturbations can grow exponentially you
43:13
know those are all really really important this is a rich field it's one of the most interesting fields in all of mathematics because it ties together you know differential equations and
43:22
linear algebra and numerics and computation and physics and it it explains and allows us
43:29
to describe the world that we observe around us which changes in time and evolves according to
43:35
rules and has instabilities and synchronizations and all of it and it's super fascinating I'm glad
43:41
you have been with me on this series and I hope I hope that there are more and that you get you know
43:49
interested in in following in some of these these leads and threads thank you all so much [Music]