Ok, my approach is very different from the ones I have seen. I followed four premises:
a) The pendulum is essential linear, and the nonlinearity of the angle is not relevant. (This is an assumption, and I make no attempt to verify it.)
b) Any coupling between n resonators creates n resonance frequencies that are diverging with increasing coupling, so no synchronisation here.
c) A metronome is driven by a spring to compensate for the friction, and the direction of the force switches a bit after the metronome has passed angle 0.
d) Synchronisation happens because the shared based shifts this switching point to earlier or later (the angle remains the same).
Just run the file, and you will see it happening pretty soon. This model is based on the Simulink model of xianfa zeng, which is a really nice framework. The pendulum model is very different, though. Both are inspired by "Challenge: Metronome and Cart Equations of Motion" on Seth's blog.
Thomas Steffen (2023). Metronome with Driving Force (https://www.mathworks.com/matlabcentral/fileexchange/21742-metronome-with-driving-force), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform CompatibilityWindows macOS Linux
Inspired by: Metronome Synchronization
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!