curve.fit

Damped Oscillator

A sine wave whose amplitude decays exponentially, centered on a constant level. Use it for damped pendulums, mass–spring systems and ringing electrical circuits.

Fit the example dataStart with your own data

Example: simulated position of a damped mass on a spring, 61 points with y uncertainties, opened as a new copy you can edit.

Parameters

Amplitude of the decaying envelope at x = 0.
Decay rate, in inverse units of x. The amplitude falls by a factor of e over a distance 1/b in x.
Angular frequency, in radians per unit of x. The period is 2π/ω.
Phase, in radians. Reported between −π and π.
The constant level the oscillation is centered on.

Tips

  • Automatic starting values take ω from the strongest frequency in the data and solve the amplitude, phase and offset exactly. If the fit settles on the wrong frequency, enter guesses: ω ≈ 2π divided by the period you see, and b ≈ the natural logarithm of the ratio of two successive peak heights (measured from C), divided by the period.
  • Include several points per cycle and enough cycles to show the decay.
  • A negative Aₒ with δ shifted by π describes the same curve.

Related models