Extended-Kalman-Filter---Matlab
Versión 0.1 (302 KB) por
Ahmed Mahfouz
Easy implementation of the extended Kalman Filter
This repo implements the extended Kalman Filter class which is a multi-purpose EKF to facilitate the implementation and verification of EKFs in Matlab for the post-processing setting.
The user has to define the following functions, and then pass them to the class initializer in order to build an instant of the EKF class:
- <math-renderer class="js-inline-math" style="display: inline" data-static-url="https://github.githubassets.com/static" data-run-id="84b5bd432c93d3ab9960635ca19df3f2">$[\pmb{y}_{k|k-1},\pmb{\Phi}_{k-1\rightarrow k}]$</math-renderer> = <math-renderer class="js-inline-math" style="display: inline" data-static-url="https://github.githubassets.com/static" data-run-id="84b5bd432c93d3ab9960635ca19df3f2">$\text{st\_model}(t_{k-1}, t_{k}, \pmb{y}_{k-1|k-1}, \pmb{P}_{k-1|k-1})$</math-renderer>, which is a propagation function of the state vector. The output of this function must be <math-renderer class="js-inline-math" style="display: inline" data-static-url="https://github.githubassets.com/static" data-run-id="84b5bd432c93d3ab9960635ca19df3f2">$\pmb{y}_{k|k-1}$</math-renderer>, the predicted value of the state vector, and <math-renderer class="js-inline-math" style="display: inline" data-static-url="https://github.githubassets.com/static" data-run-id="84b5bd432c93d3ab9960635ca19df3f2">$\pmb{\Phi}_{k-1\rightarrow k}$</math-renderer> where <math-renderer class="js-inline-math" style="display: inline" data-static-url="https://github.githubassets.com/static" data-run-id="84b5bd432c93d3ab9960635ca19df3f2">$\pmb{\Phi}_{k-1\rightarrow k}$</math-renderer> is the state transition matrix between the two time instants <math-renderer class="js-inline-math" style="display: inline" data-static-url="https://github.githubassets.com/static" data-run-id="84b5bd432c93d3ab9960635ca19df3f2">$t_{k-1}$</math-renderer> and <math-renderer class="js-inline-math" style="display: inline" data-static-url="https://github.githubassets.com/static" data-run-id="84b5bd432c93d3ab9960635ca19df3f2">$t_{k}$</math-renderer>
- <math-renderer class="js-inline-math" style="display: inline" data-static-url="https://github.githubassets.com/static" data-run-id="84b5bd432c93d3ab9960635ca19df3f2">$\pmb{z}_{k}$</math-renderer> = <math-renderer class="js-inline-math" style="display: inline" data-static-url="https://github.githubassets.com/static" data-run-id="84b5bd432c93d3ab9960635ca19df3f2">$\text{meas}(t_k)$</math-renderer> which is a function that returns the measurement vector at time <math-renderer class="js-inline-math" style="display: inline" data-static-url="https://github.githubassets.com/static" data-run-id="84b5bd432c93d3ab9960635ca19df3f2">$t_k$</math-renderer>.
- <math-renderer class="js-inline-math" style="display: inline" data-static-url="https://github.githubassets.com/static" data-run-id="84b5bd432c93d3ab9960635ca19df3f2">$[\pmb{H}_k, \pmb{H}_k, \pmb{z}_k]$</math-renderer> = <math-renderer class="js-inline-math" style="display: inline" data-static-url="https://github.githubassets.com/static" data-run-id="84b5bd432c93d3ab9960635ca19df3f2">$\text{meas\_model}(t_{k}, \pmb{y}_{k|k-1}, \pmb{z}_k)$</math-renderer>: is the measurement model function. The output must be the vector <math-renderer class="js-inline-math" style="display: inline" data-static-url="https://github.githubassets.com/static" data-run-id="84b5bd432c93d3ab9960635ca19df3f2">$\pmb{H}_k$</math-renderer> of modeled measurements, the matrix <math-renderer class="js-inline-math" style="display: inline" data-static-url="https://github.githubassets.com/static" data-run-id="84b5bd432c93d3ab9960635ca19df3f2">$\pmb{H}_k = \frac{\partial \pmb{H}_k}{\partial \pmb{y}_k}$</math-renderer>, and optionally the measrement vector after removing outlaiar measuremets.
- <math-renderer class="js-inline-math" style="display: inline" data-static-url="https://github.githubassets.com/static" data-run-id="84b5bd432c93d3ab9960635ca19df3f2">$\pmb{Q}_{k}$</math-renderer>, the state model covarience matrix (constant or callable), <math-renderer class="js-inline-math" style="display: inline" data-static-url="https://github.githubassets.com/static" data-run-id="84b5bd432c93d3ab9960635ca19df3f2">$\pmb{Q}(t_{k}, \pmb{y}_{k|k-1})$</math-renderer>
- <math-renderer class="js-inline-math" style="display: inline" data-static-url="https://github.githubassets.com/static" data-run-id="84b5bd432c93d3ab9960635ca19df3f2">$\pmb{R}_{k}$</math-renderer>: measurement covarience matrix (constant or callable), <math-renderer class="js-inline-math" style="display: inline" data-static-url="https://github.githubassets.com/static" data-run-id="84b5bd432c93d3ab9960635ca19df3f2">$\pmb{R}(t_{k}, \pmb{z}_{k})$</math-renderer>
The EKF class has some visualization cababilities, which are illustrated in the example.
Citar como
Ahmed Mahfouz (2024). Extended-Kalman-Filter---Matlab (https://github.com/AhmedTahaha/Extended-Kalman-Filter---Matlab/releases/tag/v0.1), GitHub. Recuperado .
Compatibilidad con la versión de MATLAB
Se creó con
R2021b
Compatible con cualquier versión
Compatibilidad con las plataformas
Windows macOS LinuxEtiquetas
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Descubra Live Editor
Cree scripts con código, salida y texto formateado en un documento ejecutable.
examples
src/@EKF
src/@Filter
Versión | Publicado | Notas de la versión | |
---|---|---|---|
0.1 |
Para consultar o notificar algún problema sobre este complemento de GitHub, visite el repositorio de GitHub.
Para consultar o notificar algún problema sobre este complemento de GitHub, visite el repositorio de GitHub.