David Spivak and I have been thinking about compositional physics recently, and out of these discussions I had a thought about fast/slow dynamics that I wanted to share.

This came up because we realized that collisions were an example of fast/slow dynamics. In a traditional game physics engine, there are two parts. One is “dynamics”, which essentially is just an integrator for Newton’s laws. The other has to do with collisions. When a collision is detected between two objects, the collision is resolved by sending impulses to both objects along the direction of impact in such a way that the total momentum and total kinetic energy is conserved, or in the case of an inelastic collision, the total kinetic energy may decrease.

You can think of this as an approximation to the actual system, in which the objects compress and expand to store and release energy that pushes them away. This compression and expansion happens at a much faster time scale than the traditional 60 frames per second that we run a game engine at, so we approximate it by a different method than the normal differential equation dynamics of the system.

We can think about this as a hybrid dynamical system, where there is a “jump” whenever there is a collision.

However, this is not the only possible result of a fast/slow dynamics. In Michaelis-Menten dynamics, we use the fact that part of the reaction is happening much faster than the rest to just assume that two quantities are always in equilibrium, and thus we eliminate a variable. More generally, fast/slow dynamics can impose a *constraint* on a system. For instance, we assume that the voltages on each end of a short are always equal, because if they are not equal then there will be a large current until they are equalized.

So there are at least two ways in which fast/slow dynamics can produce systems that are mathematically complicated from dynamical systems specified just by continuous vector fields: in the limit as the two timescales fully separate they can add constraints or jumps to the picture.

And all of this is relevant if you actually want to simulate these systems, because if you choose a large time step, your fast dynamics become inaccurate, and if you choose a small time step, you won’t get your results fast enough. So you have to work with the constrained, hybrid dynamical system instead, which is challenging.

I’ve heard that Sophie Libkind is working on formalizing this kind of stuff in her thesis, and I’m looking forward to seeing the results of that!