I have two waves, and I would like to quantify the difference between them.

They are exponential sine waves where the frequency decreases with time.

I'm interested in the difference in decay constant between the signals. I thought maybe I could use some kind of FFT method to get the envelope, but I don't know what to do with the varying frequency.

  • $\begingroup$ If these are reasonably "clean" sine waves, an electrical engineer would figure out a frequency to voltage converter (which is a diode, a resistor, and a capacitor) and just compare the rate of change of the two voltages. $\endgroup$ Commented Jul 3, 2012 at 20:48
  • $\begingroup$ Are you trying to track the amplitude decay or the frequency decay? Or both? And do you have a model for how the frequency is changing? Is it exponential as well, or just linear? $\endgroup$
    – datageist
    Commented Jul 3, 2012 at 20:58
  • $\begingroup$ I'm just trying to compare the amplitude decay. $\endgroup$
    – Christina
    Commented Jul 6, 2012 at 20:01

1 Answer 1


For a relatively easy answer you can use a short-time Fourier transform and use the largest value as the estimate of your sinusoid frequency. The basic idea is that you do short Fourier transforms at different points in time to see how it changes. The problem with that is that you have a tradeoff between time resolution and frequency resolution. Shortening the Fourier transform improves the time resolution at the expense of the frequency resolution. Conversely, making the Fourier transform longer improves the frequency resolution at the expense of the time resolution.

The frequency resolution can be improved by using quadratic interpolation to get a finer estimate of the true sinusoid peak.

Another way to go that can get you very good frequency estimation at every point in time is with a phase-locked loop. Phase-locked loops are a little trickier to set up though, because you have to get the feedback gains right. There is also a tradeoff in regards to responsiveness (akin to time resolution) and resistance to noise.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.