AleksandarHaber / Disciplined-Python-Implementation-of-the-Recursive-Least-Squares-Method

This is a disciplined Python implementation of the Recursive Least Squares Method

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Disciplined-Python-Implementation-of-the-Recursive-Least-Squares-Method

This is a disciplined Python implementation of the Recursive Least Squares Method.

Rationale:

Recursive Least Squares (RLS) method is one of the fundamental methods for parameter estimation and control. It is used as the basis of Kalman filtering, adaptive control, recursive subspace identification method, as well as the basis of many other estimation, control, and machine learning methods.

We created a tutorial that explains how to easily derive the recursive least squares method. The tutorial is given here: https://aleksandarhaber.com/introduction-to-kalman-filter-derivation-of-the-recursive-least-squares-method-with-python-codes/

Also, we created a tutorial that explains the Python implementation of the codes posted in this reposity. The tutorial is given here https://aleksandarhaber.com/introduction-to-kalman-filter-disciplined-python-implementation-of-recursive-least-squares-method/

In that tutorial, we also provide an example in order to numerically investigate the performance of the recursive least squares method.

Description of the included files

"RecursiveLeastSquares.py" - contains the class that implements the recursive least squares method

"driverCode.py" - explains how to use the recursive least squares class object defined in "RecursiveLeastSquares.py". Also this file implements an example we constructed in https://aleksandarhaber.com/introduction-to-kalman-filter-disciplined-python-implementation-of-recursive-least-squares-method/

data.png and plots.png - are plots generated by "driverCode.py". These plots visualize the simulation and estimation results.

Figure below shows the convergence of the recursive least squares method for estimating the initial position, initial velocity, and acceleration. This plot is generated by the file "driverCode.py", and this is the file "plots.png"

My Image

About

This is a disciplined Python implementation of the Recursive Least Squares Method


Languages

Language:Python 100.0%