Van der Pol oscillator

step 0
Loading the engineShared by all simulations, so the next one opens instantly.
λ₁ (Lyapunov)·
The physics

In the 1920s the Dutch physicist Balthazar van der Pol studied electrical circuits built around triode valves that oscillate on their own. For small currents the valve acts like a negative resistance and feeds energy into the oscillation; for large currents it drains energy. Whatever the starting point, the circuit settles on one oscillation of fixed amplitude, a limit cycle. In 1926 van der Pol called the strongly nonlinear version a relaxation oscillation, a slow build-up followed by a sudden discharge, and in 1928, with Jan van der Mark, he used such oscillators as a model of the heartbeat.

What you see

The phase plane (x,x˙) with the last 2000 states drawn as a line that fades from blue (old) to white (new). The view is scaled to fit that trail, so the axes change as the orbit grows or shrinks. Each preset sets μ and the starting position x0 and starts at rest; at the default timestep, one unit of time takes about 1.7 s on screen.

Limit cycle (μ=1): from x0=0.1 the orbit spirals outward and settles on a closed cycle that reaches x=±2, with a period of about 6.7.

Relaxation oscillations (μ=5): from x0=0.5. The cycle is far from an ellipse: x creeps slowly from about 2 down to 1, then jumps quickly to −2, where the same happens with the opposite sign. The fast jumps show up as tall excursions in x˙.

Strongly nonlinear (μ=10): from x0=0.1. The slow creeping and the fast jumps separate even more. The period grows roughly in proportion to μ, approaching (3−2ln⁡2)μ≈1.61μ for large μ.

Nearly sinusoidal (μ=0.1): from x0=0.5. The amplitude grows slowly over many periods to the same value of 2, and the cycle is nearly a circle. The motion is almost a pure sine wave with period close to 2π.

The λ₁ (Lyapunov) readout estimates the largest Lyapunov exponent from the separation of a nearby shadow trajectory. Without forcing it tends to zero on the limit cycle, as for any periodic orbit of an autonomous system: a shift along the orbit neither grows nor decays.

Governing equation

x¨−μ(1−x2)x˙+x=Asin⁡ωt.

The middle term is a damping that changes sign: for |x|<1 it pumps energy in, for |x|>1 it removes it, and the balance over one cycle fixes the amplitude. For small μ, averaging gives a nearly circular cycle of radius 2. The simulation integrates the two first-order equations for (x,x˙) with fourth-order Runge-Kutta by default, in four substeps per step, or twenty when μ > 3, where the equation becomes stiff.

Parameters

μ (nonlinearity): 0.01 to 10, default 1.

Initial x₀: the starting position, −4 to 4, default 0.1. The velocity always starts at zero.

drive amp, drive freq: amplitude A (0 to 5, default 0) and angular frequency ω (0 to 20 rad/s, default 1) of the forcing. An amplitude of 0 leaves the oscillator autonomous. A forced van der Pol oscillator can lock to the drive, drift quasi-periodically, or move chaotically.

timestep dt: 0.001 to 0.05, default 0.01.