# Calculating time-dependent frequency of oscillations

+ 3 like - 0 dislike
262 views

I have a curve (example shown below) which oscillates with a slowly-decreasing amplitude and offset and a slowly-changing frequency. What's a good way to estimate these values as functions of time? Any two of these values can be calculated reliably given the other, but I'm not sure where to start.

Here are some methods I've considered, but I'm not sure how effective they will be:

- estimating the maxima and calculating periods

- doing Fourier decomposition over a sliding window

- fitting a function like $C(t) + \sum A(t) \sin(\omega t) + B(t)\cos(\omega t)$

Thanks!

asked Mar 31, 2015
reopened Mar 31, 2015

I have heared (without fully grasping the method) that wavelet theory can be of use to analyse situations where the amplitudes and frequencies (or wavenumbers) of a signal depend on time (or position).

@dilaton: Wavelets give a multiresolution analysis appropriate, e.g., for the analysis of sound, music say. My first thought was wavelets, too. But it is not quite the right tool for what this particular question asks - an estimate of how a single (or two) amplitude and frequency change with time.

+ 3 like - 0 dislike

I would use nonlinear least squares to fit an expression $C(t)+A(t) \cos \omega(t)$ with low degree polynomials $C,A,\omega$, trying different degrees for the different pieces and using BIC to decide on the best degree combination.

You may need to choose good starting values: Begin with $\omega(t)= a+bt$ with $a,b$ estimated from a Fourier transform. With $\omega(t)$ fixed you have a linear least squares problem for the coefficients of $C$ and $A$. Use the result with $\omega(t)= a+bt+0t^2+\ldots$ as a starting point for the nonlinear fit.

There seems to be a second high-frequency component in your data - inspect the residual to see whether this is noise or something significant. If the latter, add an additional term $+A_2(t) \cos \omega_2(t)$ and repeat. Here the starting point is chosen by working on the residual similarly as before.

answered Mar 31, 2015 by (15,448 points)

 Please use answers only to (at least partly) answer questions. To comment, discuss, or ask for clarification, leave a comment instead. To mask links under text, please type your text, highlight it, and click the "link" button. You can then enter your link URL. Please consult the FAQ for as to how to format your post. This is the answer box; if you want to write a comment instead, please use the 'add comment' button. Live preview (may slow down editor)   Preview Your name to display (optional): Email me at this address if my answer is selected or commented on: Privacy: Your email address will only be used for sending these notifications. Anti-spam verification: If you are a human please identify the position of the character covered by the symbol $\varnothing$ in the following word:p$\hbar$ysic$\varnothing$OverflowThen drag the red bullet below over the corresponding character of our banner. When you drop it there, the bullet changes to green (on slow internet connections after a few seconds). To avoid this verification in future, please log in or register.