参考文献《Recursive Noise Adaptive Kalman Filtering by Variational Bayesian Approximations》中的算法,用matlab编写了一个小程序测试了一下(demo版本)。程序是按照文章中的内容实现的。
下面是主程序:
clear all;
close all;
%%%%%Model parameters%%%%%%%
nxp = 10;
nx = 4; % number of state variables
nz = 2; % number of measures
T = 1;
q = 1;
r = 1;
F = [eye(2) T*eye(2);zeros(2) eye(2)];
H = [eye(2) zeros(2)];
Q0 = q * [T^3/3*eye(2) T^2/2*eye(2);T^2/2*eye(2) T*eye(2)];
R0 = r * [1 0.5;0.5 1];
L = 1000;
Tn = L;
N = 5; %%%%%%The number of variational iteration
times_Of_R = 5;
%%%%%Initial values
x_Ini = [100;100;10;10];
P_Ini = diag([100 100 100 100]);
X = zeros(4,L);
XKF_True = zeros(4,L);
XKF_Const = zeros(4,L);
XKF_VB = zeros(4,L);
mse_Kf_1 = zeros(L,nxp);
mse_Kf_2 = zeros(L,nxp);
mse_Ktf_1 = zeros(L,nxp);
mse_Ktf_2 = zeros(L,nxp);
mse_VB_1 = zeros(L,nxp);
mse_VB_2 = zeros(L,nxp);
for k = 1:nxp
x=x_Ini;
X(:,1) = x;
%%%%Kalman filter with nominal noise covariance matrices (KFNCM

本文介绍了一种基于变分贝叶斯近似的递归噪声自适应卡尔曼滤波算法,并提供了MATLAB实现代码。通过与传统卡尔曼滤波进行比较,展示了该算法在不确定噪声环境下的鲁棒性和准确性。
最低0.47元/天 解锁文章
727

被折叠的 条评论
为什么被折叠?



