Extended-Kalman-Filter---Matlab

버전 0.1 (302 KB) 작성자: Ahmed Mahfouz
Easy implementation of the extended Kalman Filter
다운로드 수: 323
업데이트 날짜: 2022/3/1

Extended-Kalman-Filter---Matlab

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:

  1. <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>
  2. <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>.
  3. <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.
  4. <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>
  5. <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.

View Extended-Kalman-Filter---Matlab on File Exchange

인용 양식

Ahmed Mahfouz (2024). Extended-Kalman-Filter---Matlab (https://github.com/AhmedTahaha/Extended-Kalman-Filter---Matlab/releases/tag/v0.1), GitHub. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2021b
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
버전 게시됨 릴리스 정보
0.1

이 GitHub 애드온의 문제를 보거나 보고하려면 GitHub 리포지토리로 가십시오.
이 GitHub 애드온의 문제를 보거나 보고하려면 GitHub 리포지토리로 가십시오.