Recently I was reminded of this demo of coupled oscillators, using metronomes on a moving platform:
Even though the metronomes are set to different frequencies and start at different points, by connecting their motion through the table, they come into sync automatically. I was curious if I could make a simple simulator that would exhibit the same effect. Each metronome has a number of torques acting to make the bob swing back and forth: there's gravity pulling down on the bob, a spring pulling the bob upright, a drag force that depends on the velocity, and an external force from the platform. In many ways this resembles the resonant pendulum I posted so long ago, but the coupling from having many oscillators makes things interesting. We can write the torque on each metronome as
The force from the platform is the sum of all the metronomes, since swinging the bob around applies a reaction force at the base of the metronome. I set up this simulation and threw in a bunch of numbers for the various parameters. After a bit of tweaking, I got something that looked pretty good:
This gets reasonably good looking by the end, but still a little out of sync. If we run it for even longer, we can look at the error between the angle of each metronome and the average angle:
It takes about 100,000 steps for them to get into a good synchronization – Not quite like the video above, but another fun toy to play with!
No comments:
Post a Comment