## coupled oscillators

it’s time for a long post on coupled oscillators. i love teaching this in dynamical systems class. it all starts with a pair of identical or near-identical systems expressing periodic behavior. let’s say we have two pendula, and we let them go. what happens?

well, they just do their thing. same mass; same length; but because of the different initial conditions, their motions are distinct. now here’s the idea (going back at least to huygens): if we allow each to slightly influence the other — say through small oscillations transmitted through the rod by which they hang — then the pendula become synchronized, even though they have different energies to begin with. let’s take a look.

this is cool! i wonder if it works in more generality? the way i teach it in class is through a spinner — an abstract agent with configuration space a circle and whose dynamics are simple, linear escalation of angle. if you start with two such spinners having the same natural frequency but different phase, then, like the uncoupled pendula above, they will remain out of phase. however, if you let each influence the other very slightly, then, over time, they converge to synchronized evolution, like so:

that’s simple enough, and easy to analyze. you can even say what the rate of convergence is, based on linearization of the dynamical system about the equilibrium of phase zero. but then come all the questions… what happens if you have more than two spinners? does it matter how you network their influences? well…

nine identical spinners are given the same initial conditions. the system on the right has all-to-all coupling: everyone influences everyone. on the left is a ring topology, with nearest-neighbor coupling. the all-to-all network topology converges rapidly to a synchronized state. the ring topology converges too, but more slowly, and it is “off phase” a little bit from the all-to-all, even though they all started at the same place.

so, that’s fun. but that’s not all that can happen. in the all-to-all case, it seems as though it will always converge to a synchronized state. (is that so? hmmmm…). this is not the case in the ring topology; with a bit of luck, you can happen upon an initial condition that gives non-synchronized behavior. what is it?

ah, it’s the wave. the reason this is possible is because of the topology of the network — like, literally. the circular topology means that the angular data over the base has a cohomology class in H^1(S^1)=Z — otherwise known as a winding number. this is why you don’t get this phenomena in the all-to-all topology — no holes (upon completion to a flag complex). i’ve used the cohomology class of a networked S^1-valued dynamical system to automate sleep-wake cycles for sensor networks in building interiors, for example: very useful stuff.

well, that escalated quickly.

let’s go back to thinking about synchronization. what happens if you have a larger, less homogeneous network? here’s an example:

you can almost see the different eigenvalues of the graph laplacian. in plainer terms, the higher the local connectivity, the faster the network synchronizes.

but what happens if the network changes over time, as it does for flocks of birds, schools of fish, & crowds of people? ah, that is where a lot of modern research comes in to play.

## visualizing 1-d flows

visualization is so central to dynamical systems. one great place to get started is with 1-d continuous-time autonomous systems: ODEs of the form dx/dt=f(x). there are a lot of ways to illustrate such systems. one is to plot the solution x(t) for an initial condition x(0). that’s ok, but it’s even better to look at the flow, where you look at all initial conditions at once and let them evolve. but it does not end there. i like to supress time altogether, and plot x versus dx/dt. this makes it possible to visualize the dynamics as that of a vector field on the x-axis. you can see all of these perspectives illustrated below:

## the bouncing ball…

one of the classic examples of a simple discrete-time dynamical system comes from a bouncing ball. if you let a ball go above a table, then, assuming everything is perfectly flat, etc., a simple model for the dynamics is x(n+1)=r x(n), where 0<r<1 is the coefficient of restitution and x(n) is the height of the n-th bounce. very well: that has a simple explicit solution that ends with the ball coming to rest.

but what happens if we give the table a sinusoidal oscillation? let’s take a look…

this is likewise modeled as a dynamical system, but no longer 1-dimensional — it is a 2-dimensional discrete-time dynamical system. without going into a derivation, let me say that the two variables are related to the time-between-bounces and the velocity-upon-impact. indexed by n, the bounce number, this leads to complicated behaviors. of course, everything depends as well on parameters, such as ball size, mass, frequency of oscillation, and initial condition, as you can see from the following simulation.

this system goes straight to the heart of why 2-d discrete-time dynamics can be chaotic. we won’t go into details on this quite yet… but let me say that this is one of the four chaotic dynamical systems that appears in the beginning of the seminal text of guckenheimer & holmes. phil homles (my phd advisor) studied this system in 1982. this simulation is a bit easier to “see” that the static picture appearing in that classic text, but the picture painted by the mathematics is every bit as beautiful & illustrative.

## staircase diagrams

i think the best way to begin learning about discrete-time dynamical systems is with the following well-known example. take a calculator; set it to radians; type in a random number; then hit the cosine button over & over. what happens is convvergence to a stable equilibrium. the way the covergence happens is through over- then under-shooting. why? let’s take a look…

for discrete-time 1-d dynamics, the best way to visualize is via a staircase diagram, in which you plot x_{n+1} versus x_n, where x_{n+1} = f(x_n). this allows you to investigate what happens for arbitrary functions f.

if you look closely, you can see the differences between stable and unstable equilibria. of course, more interesting things can happen, but we’ll talk about that later…

## joint types, pendula, & configurations

one of the things i loved most in my engineering undergraduate education was learning kinematics — all kinds of cool mechanisms. the pendula that we’ve been looking at have some interesting joints. the planar pendulum has a simple hinge joint, easily built using a high-quality low-friction bearing. the spherical pendulum, on the other hand, has a ball-and-socket joint, which in practice could be effected by a spherical bearing. these are beautiful mechanisms that use lubrication and/or tiny ball bearings to get a nice clean swivel.

but this is not the only joint type with multiple degrees of freedom. consider the universal joint, built by fusing two transverse hinges, as illustrated below.

wouldn’t it be fun to simulate a double-pendulum with universal joints and compare it to the analogous system with spherical joints? what a good idea…

this is so much fun to play with… with the bottom views in particular, you sense that the universal joints give very different behavior than the spherical joints. the universals are more… jerky… constrainted. the spherical joints seem more free.

but are they? are they equivalent in some way? how would you tell? i like to think in terms of the configuration space of a joint (or system of joints). a universal joint has configuration space a 2-dimensional torus (one circle for each hinge joint). of course, this ignores physical constraints such as rigid bars colliding, but there you have it. the spherical joint, on the other hand, as a full SO(3) configuration space, which is three-dimensional, not 2-d like the universal. so, in one sense, this is why a spherical joint “feels” more free. it’s also the reason why a spherical joint cannot transmit torque the way that universal joints can. (universals — or rather pairs of them — are very helpful in automobiles to transmit power from the axles to the wheels…)

## the sublime spherical double pendulum

i like pendula in all forms as a way to visualize interesting dynamical systems. i’m most interest in the mathematics behind it all, but occasionally, i let my initial training in mechanical engineering get the best of me. this is one of those times.

consider what happens when you have a double-pendulum, but where the joints are spherical as opposed to planar (or “hinge”) in nature. this is really beautiful.

this can be a little difficult to visualize properly, since there is motion out of the plane of view. let’s take a look at the exacy same simulation, but from below…

ah… that’s a nice double pendulum!

## a spherical pendulum

all of the pendula below are “planar” or have “hinge” joints that constrict motion to a plane. if we replace said hinge joints with a “ball-and-socket” joint, then we have what one calls a spherical pendulum. these have an increased range of motion and lead to some lovely behavior when viewing multiple initial conditions.

you might rightly complain that these “spherical” pendula do not take advantage of their increased degrees of freedom. if you look carefully, each pendulum above moves within a single plane. this is a consequence of there being no initial velocity.

let’s change that, and see what motion ensues…

## pendula without rods

so what happens if we build a multi-pendulum with structures other than rigid rods? using hoops (solid tori) is especially mesmerizing, and leads one to believe that the dynamics is very different that the rigid-rod case…

a more careful analysis would show that using rings is equivalent to using rods, as long as you are careful about the equivalent mass (becuase of moment of inertia, the mass of the solid rod and that of the corresponding ring are not the same).

of course, this is be taken to foolish extremes. i do not recommend that you build the following system:

## pendumonium

double pendula lead to chaotic dynamics: good. but what happens if we make things a bit more… complicated? what about a triple pendulum? would it be even more chaotic? let’s see…

well, why stop there? if we take this to a ridiculous extreme, we get ridiculously complicated behavior…

of course, there’s no reason to consider only chains of pendula. the following compound pendulum has multiple bars and ends, and it is one of my favorite things to look at.

## double pendula & chaos

of course, instead of shaking a pendulum horizontally or vertically, one can go meta and hang a pendulum from a pendulum. let’s see what happens with a such a double pendulum.

that looks chaotic, doesn’t it? but what is meant by chaos? that takes a long time to learn properly. for now, let’s focus on one crucial requirement for chaos: sensitive dependence on initial conditions. this is the idea that nearby initial conditions diverge in behavior exponentially quickly. let’s take a look:

why is the double pendulum chaotic when the single pendulum is not (unless shaken in the right way)? it’s all about topology. the configuration space of a single pendulum is two-dimensional — one for the angle and one for the angular velocity. the configuration space is the tangent bundle of a circle, homeomorphic to an annulus. that’s not enough room for a flow to get chaotic. but the double pendulum has twice the dimension — it’s a 4-d tangent bundle of a torus — and that is plenty of room for chaos to creep in.