# Calculate frequency of 1D time series using autoregressive model parameters

I'm modeling some periodic data with a second-order autoregressive model, as follows:

$$x_3 = a_{1}x_1 + a_{2}x_2$$ $$x_4 = a_{1}x_2 + a_{2}x_3$$ $$...$$ $$x_n = a_{1}x_{n-2} + a_{2}x_{n-1}$$

I'm modeling the raw data here (imagine $x_i$ as a scalar pixel value, say, for $n$ time points) so I'm not worried about error terms, at least not yet. I can set this up as a system of equations and solve for the parameters $a_1$ and $a_2$.

Is there any way to determine the frequency of this 1D datasets using the calculated AR parameters, since the system intrinsically models harmonic oscillators? I'm actually trying to avoid using fourier transforms, if possible.

Thanks!

• The parameterization of your last equation does not match the first two equations. I used the parameterization of the first two in my answer. – Rob Hyndman Dec 11 '11 at 22:31
• Absolutely correct, my apologies. Fixed now. – Magsol Dec 12 '11 at 0:21

When $a_2^2+4a_1<0$, the average period of the cycles is $$\frac{2\pi}{\text{arc cos}\left(-a_2(1-a_1)/(4a_1)\right)}.$$
• Would you suggest AR(1) for truly periodic data? There is some noise in the in which I'm particularly interested. Furthermore, what about the case where $a_{2}^{2} + 4a_{1}$ is greater than 0? My intuition for AR models is not fully realized; I am not certain as to the physical meanings of these constraints. – Magsol Dec 14 '11 at 1:59
• No, the AR(1) model cannot even by cyclic. There is no AR model that is periodic. For the AR(2) model, if $a_2^2+4a_1>0$, the model is not cyclic. If you really mean periodic rather than cyclic, then consider a seasonal model or a periodic AR model. – Rob Hyndman Dec 14 '11 at 2:08