Burg and Levinson-Durbin AR tools ================================= .. admonition:: Tutorial goal Estimate AR coefficients using autocorrelation/Levinson and Burg-style recursions. .. note:: New to the terminology? See the :doc:`lattice DSP concept map <../../algorithms/concept_map>` and the :doc:`causality/data-use guide <../../theory/causality_and_data_use>` for how online, offline, block, and MIMO examples should be read. Context ------- This tutorial compares two common AR estimation routes. Levinson-Durbin solves the Yule-Walker equations from autocorrelations. Burg estimates reflection coefficients from forward/backward prediction errors. Key idea and equations ---------------------- The AR model is .. math:: x[n]+a_1x[n-1]+\cdots+a_px[n-p]=e[n]. How to read the result ---------------------- Compare the estimated coefficients with the known synthetic model and check the final prediction error values. Run command ----------- .. code-block:: bash python examples/burg_levinson_ar_tools.py Source code ----------- .. literalinclude:: ../../../examples/burg_levinson_ar_tools.py :language: python :linenos: