Spring Pendulum Simulator Back
NONLINEAR VIBRATION · CHAOS

Spring Pendulum (Elastic Pendulum) Simulator

Watch spring stretching and pendulum swinging become coupled through nonlinear dynamics. RK4 integration reveals parametric resonance, energy transfer, and chaos.

Presets
Spring & Mass Parameters
Natural Length L₀ (m)0.50
Spring Constant k (N/m)2.00
Mass m (kg)0.50
Initial Conditions
Initial Length r₀ (m)0.55
Initial Angle θ₀ (°)10
Initial dr/dt (m/s)0.00
Initial dθ/dt (rad/s)0.00
Simulation Speed
Speed1x
Resonance Check:
ω_spring = rad/s
ω_pendulum = rad/s
Ratio = (≈2 for resonance)

Equations of Motion

$$\ddot{r}= r\dot{\theta}^2 - g\cos\theta + \frac{k}{m}(L_0 - r)$$ $$\ddot{\theta}= \frac{-g\sin\theta - 2\dot{r}\dot{\theta}}{r}$$ RK4 integration, dt=0.001s
CAE Link: Flexible robot arms, cable structures, and AFM cantilevers all involve coupled stretch-rotation dynamics described by these equations.
Spring Length r (m)
Angle θ (°)
Total Energy (J)
Spring Extension (m)

Colored trail: 600-point history. Brighter = faster.

What is a Spring Pendulum?

🧑‍🎓
What exactly is a "spring pendulum"? It sounds like you just combined a spring and a regular pendulum.
🎓
Basically, yes! But the combination creates a fascinating, nonlinear system. The mass is attached by a spring instead of a rigid rod. So it can both swing like a pendulum *and* bounce up and down on the spring. Try moving the "Initial Length r₀" slider in the simulator—you'll see the starting stretch of the spring change instantly.
🧑‍🎓
Wait, really? So it's not just two motions added together? What's this "parametric resonance" mentioned in the description?
🎓
Great question! That's the key nonlinear effect. The swinging motion changes the effective length of the pendulum, which in turn drives the spring's bouncing motion, and vice-versa. When the spring's natural frequency is about *twice* the pendulum's swing frequency, a small initial bounce can get wildly amplified. In the simulator, set `k/m` so that $\sqrt{k/m}\approx 2\sqrt{g/L_0}$ and give it a tiny initial `dr/dt` to see it happen!
🧑‍🎓
That colored trail showing the history is really cool but chaotic. How do engineers predict this kind of motion? Can't use simple formulas, right?
🎓
Exactly right—you need numerical simulation, which is what this tool does using a method called RK4. Engineers use the same principles in CAE software. The equations governing the motion are coupled, meaning the `r` and `θ` variables depend on each other. Play with the "Initial dθ/dt" parameter and watch how a fast initial spin completely changes the bouncing pattern, demonstrating this coupling.

Physical Model & Key Equations

The motion is described in polar coordinates (r, θ). The first equation governs the radial (bouncing) acceleration. It has three parts: centrifugal force from swinging, gravity's radial component, and the spring's restoring force.

$$\ddot{r}= r\dot{\theta}^2 - g\cos\theta + \frac{k}{m}(L_0 - r)$$

Here, $\ddot{r}$ is radial acceleration (m/s²), $r\dot{\theta}^2$ is the centrifugal term, $-g\cos\theta$ is gravity's pull along the spring, and $\frac{k}{m}(L_0 - r)$ is the spring acceleration towards its natural length $L_0$.

The second equation governs the angular (swinging) acceleration. It's similar to a pendulum but modified by the fact the "rod" length `r` is changing.

$$\ddot{\theta}= \frac{-g\sin\theta - 2\dot{r}\dot{\theta}}{r}$$

Here, $\ddot{\theta}$ is angular acceleration (rad/s²). The term $-g\sin\theta/r$ is the pendulum-like swing. The crucial coupling term $- 2\dot{r}\dot{\theta}/r$ appears because the changing length `r` affects angular momentum conservation. This term is the source of the energy transfer between bouncing and swinging.

Real-World Applications

Flexible Robot Arms & Cranes: Long, slender robotic arms or construction crane booms can flex and sway. Their dynamics are modeled as a series of coupled spring-pendulum segments. Engineers use these simulations to prevent destructive resonant oscillations during operation.

Atomic Force Microscopy (AFM): The AFM's microscopic cantilever tip scans surfaces. It's essentially a tiny, damped spring pendulum. Understanding its nonlinear resonance is critical for improving image resolution and measuring nanoscale forces.

Cable Structures & Tethers: The dynamics of suspended cables, mooring lines for ships, or tethers for space elevators involve coupled stretch and swing. Parametric resonance from wave or wind forces can lead to unexpected, large-amplitude motions that must be designed against.

Energy Harvesting Devices: Some prototypes use a spring pendulum mechanism to capture energy from ambient vibrations (like bridges or machinery). The chaotic, wide-frequency response of the system can make it efficient at harvesting energy from irregular real-world vibrations.

Common Misconceptions and Points to Note

First, you might tend to think that "a softer spring makes the pendulum's motion slower," but in reality, it's not that simple. While it's true that reducing the spring constant k makes the spring's extension and contraction slower, the period of the pendulum's swing is primarily determined by its initial length. If you make k extremely small, creating a "floppy" state, the extension/contraction and the swing become strongly coupled, sometimes resulting in motion that appears irregular. This isn't about the motion being slower; it's about it becoming more complex.

Next, a pitfall when setting parameters: do not confuse the "natural length L0" with the "initial length r0". The length of the spring at the start of the simulation is r0. For example, if you set L0=1.0m and r0=1.5m, the spring is initially at rest while stretched by 0.5m. If you gently release it from this state (zero initial velocity), the weight will begin pendulum motion while falling straight down—an unexpected movement. To create your intended initial state, be mindful of the relationship between r0 and L0.

Finally, regarding the interpretation of simulation results: it's crucial to understand that while the law of conservation of energy always holds in an ideal system without damping, the spring energy and the pendulum energy are *not* individually conserved. The essence of the system is that the two vigorously exchange energy over time. Even if the breakdown of energy fluctuates wildly on the graph, if the total sum remains constant, your simulation is working correctly. In reality, motion almost never starts from a state where energy is completely biased to one side.

Related Engineering Fields

The concepts of "coupled oscillation with two degrees of freedom" and "nonlinear dynamics" handled in this spring pendulum simulation are directly connected to various advanced engineering fields. For instance, the design of "seismic isolation and vibration control devices" for automobiles and buildings. Base isolation, which supports a building (mass) with springs and dampers, is an evolution of a one-dimensional spring pendulum model. Furthermore, when a building sways (pendulum motion) due to wind or earthquakes, the springs and dampers in the isolation devices move (extension/contraction motion), absorbing and dispersing energy. This is a direct application of coupled oscillation.

Another important application is in the analysis of "spin stability" and "fuel sloshing (liquid surface oscillation)" in the aerospace field. If the rotational motion of a rocket body (the pendulum) couples with the sloshing of liquid fuel in its tanks (a spring-like reciprocating motion), it can risk inducing unexpected unstable vibrations (similar to parametric resonance). Observing how complex orbits emerge by changing k or m in this simulator serves as training for visualizing such dangerous coupled modes.

Moving to a microscopic scale, it also relates to the modeling of "interatomic potentials" in molecular dynamics simulations. In a diatomic molecule, the bond between atoms behaves like a spring (harmonic oscillator approximation), while the molecule as a whole rotates (pendulum motion). The equations of motion for the spring pendulum can be considered a fundamental model for understanding the vibration-rotation spectra of such molecules.

For Further Learning

Once you are comfortable with this simulator, as a next step, I strongly recommend learning the concepts of "phase plane portraits" and "Poincaré maps." Right now, you are observing the orbit over time. However, if you plot the trajectory on a "phase plane" with the horizontal axis representing position (r or θ) and the vertical axis representing velocity ($\dot{r}$ or $\dot{\theta}$), the essential structure of the motion (stable/unstable points, limit cycles) becomes immediately apparent. Especially in chaotic motion, this phase plane portrait reveals a complex, tangled "strange attractor."

If you wish to deepen the mathematical background, study "Lagrangian mechanics." The equations of motion here were derived from Newton's laws, but for more complex multi-degree-of-freedom systems, the Lagrangian formulation, which starts from energy, allows for more systematic derivation. By defining the kinetic energy $T = \frac{1}{2}m(\dot{r}^2 + r^2\dot{\theta}^2)$ and potential energy $U = \frac{1}{2}k(r-L_0)^2 - mgr\cos\theta$ for the spring pendulum, and constructing the Lagrangian $L=T-U$, you can automatically obtain the two equations of motion shown earlier. This method is essential in fields like robotic arm dynamics modeling.

Finally, as a future topic, I suggest exploring "forced oscillations and the path to chaos." Currently, we are only dealing with free oscillation. However, if you apply a periodic external force, such as oscillating the pivot point up and down (forced oscillation), even richer phenomena emerge. For example, trying to stop the pendulum's swing by shaking the pivot might instead cause resonance, making it swing more violently. This could be your gateway into the profound world of nonlinear dynamics: "the route to chaos via period-doubling bifurcations."