I have a signal which is (more or less) the superposition of multiple damped oscillators. There are relatively few oscillators involved, 2-3 would account for most of the signal. They have periods which are not multiples of each other (ie not harmonics), and they all have different damping coefficients / time constants. They also are not necessarily in phase initially.
I would like to recover the periods, damping coefficients and phases of the oscillators from the signal.
A synthetic example of a signal like this can be produced by the following python code:
from pylab import *
x = linspace(0,1000,num=1000)
y1 = 1 * sin(2*pi*x/11 + 0) * exp(-x/300)
y2 = 0.5 * sin(2*pi*x/17 + 1.2) * exp(-x/300)
y3 = 2 * sin(2*pi*x/50 - 0.25) * exp(-x/50)
y = y1 + y2 + y3
figure(figsize=(20,10))
plot(y)
This looks pretty similar to the real signal qualitatively, including having some beat frequencies, and a pretty large initial low-frequency component.
This seems like a pretty common problem when analyzing a physical system with multiple coupled oscillators, eg a vibrating object with multiple resonances.
UPDATE Using direct curve-fitting works pretty well, even for strongly damped signals - depending on the choice of initial conditions, that is:
from scipy.optimize import curve_fit
def func(x, a, b, c, d):
return a * sin(2*pi*x/b - c) * exp(-x/d)
p, pcov = curve_fit(func, x, y, p0=(1,100,0,1000))
print(p)
# [ 1.78453351 51.53572084 0.05566558 55.10643076]
This recovers the largest-amplitude (but very strongly damped: time constant = 1 period) part of the signal.