雷达通信基于matlab联邦滤波算法惯性+GPS+地磁组合导航仿真含Matlab源码 1276期

Posted 紫极神光

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了雷达通信基于matlab联邦滤波算法惯性+GPS+地磁组合导航仿真含Matlab源码 1276期相关的知识,希望对你有一定的参考价值。

一、联邦滤波算法简介

面对未来大规模无人机集群任务,若采用集中式的信息融合,计算和通信负担重,并且容错性差。而联邦滤波算法作为一种新型的分散化滤波方法,降低了算法的复杂性,提高了算法的容错性与可靠性,而且联邦滤波算法易于实现,信息分配方式灵活,计算量小。
联邦滤波器中,主滤波器与各子滤波器的状态方程相同,如式所示。假设对式进行n次独立的测量,相应的量测方程如式所示。设Xˆg(k|k)和Pg(k|k)为联邦滤波器的最优估计和协方差阵,Xˆi(k|k)和Pi(k|k)为第i个子滤波器的估计值与协方差阵(i=1,2,⋯,n),Xˆm(k|k)和Pm(k|k)为主滤波器的估计值和协方差阵。联邦滤波器的一般结构如图所示。

图 联邦滤波结构框架
联邦滤波器的工作流程分为4个步骤。
步骤1信息分配。系统的信息Q−1(k)和P−1g(k|k)在子滤波器与主滤波器的信息分配原则为

步骤2时间更新。子滤波器与主滤波器的时间更新相互独立,其中i=1,2,⋯,n,m,则时间更新方程为

步骤3量测更新。量测更新只在子滤波器中进行,即i=1,2,⋯,n,则量测更新方程为


步骤4信息融合。将各个局部滤波器的局部估计值进行融合,得到全局最优估计,即

二、部分源代码

% GPS/INS/地磁组合导航,采用联邦滤波算法

clear
R=6378137;
omega=7292115.1467e-11;
g=9.78;
T=14.4;
time=3750;
yinzi1=0.5;
yinzi2=0.5;

%initial value
fai0=30*pi/180;
lamda0=30*pi/180;
vxe0=0.01;
vye0=0.01;

faie0=2.0/60*pi/180;
lamdae0=2.0/60*pi/180;
afae0=3.0/60*pi/180;
beitae0=3.0/60*pi/180;
gamae0=5.0/60*pi/180;

hxjz=pi/4;
vx=20*1852/3600*sin(hxjz);
vy=20*1852/3600*cos(hxjz);
%
weichagps=25;%GPS位置误差
suchagps=0.05;%GPS速度误差
gyroe0=(0.01/3600)*pi/180;
gyrotime=1/7200;%陀螺漂移反向相关时间
atime=1/1800;
gyronoise=(0.001/3600)/180*pi;%陀螺漂移白噪声
beta_d=1/6000.0;     %速度偏移误差反向相关时间
beta_drta=1/6000.0;  %偏流角误差反向相关时间

%matrix of system equation

fai=fai0;
lamada=lamda0;

zong=0*pi/180;
heng=0*pi/180;
hang=45*pi/180;


F(16,16)=0;
G(16,9)=0;




%initial value
x1(16,1)=0;

%the error of sins

xx=x1;

xx(1)=faie0;  %ljn
xx(2)=lamdae0;

xx(5)=afae0;
xx(6)=beitae0;
xx(7)=gamae0;
xx(8)=(0.01/3600)*pi/180;
xx(9)=(0.01/3600)*pi/180;
xx(10)=(0.01/3600)*pi/180;
xx(11)=0.0005;
xx(12)=0.0005;
xx(13)=0.0005;


%w=[gyronoise,gyronoise,gyronoise,gyronoise,gyronoise,gyronoise,g*1e-5,g*1e-5]';
g1=randn(1,time);
g2=randn(1,time);
g3=randn(1,time);
g4=randn(1,time);
g5=randn(1,time);
g6=randn(1,time);
g7=randn(1,time);
g8=randn(1,time);
g9=randn(1,time);


% attitude change matrix

cbn(1,1)=cos(zong)*cos(hang)+sin(zong)*sin(heng)*sin(hang);
cbn(1,2)=-cos(zong)*sin(hang)+sin(zong)*sin(heng)*cos(hang);
cbn(1,3)=-sin(zong)*cos(heng);
cbn(2,1)= cos(heng)*sin(hang);
cbn(2,2)=cos(heng)*cos(hang);
cbn(2,3)=sin(heng);
cbn(3,1)= sin(zong)*cos(hang)-cos(zong)*sin(heng)*sin(hang);
cbn(3,2)=-sin(zong)*sin(hang)-cos(zong)*sin(heng)*cos(hang);
cbn(3,3)=cos(zong)*cos(heng);

F(1,4)=1/R;
F(2,3)=1/(R*cos(fai));
%F(3,1)=2*omega*vx*cos(fai)+vx*vy*sec(fai)^2/R;
F(3,1)=2*omega*vy*cos(fai)+vx*vy*sec(fai)^2/R;
%F(3,3)=vx*tan(fai)/R;
F(3,3)=vy*tan(fai)/R;
F(3,4)=vx*tan(fai)/R+2*omega*sin(fai);
F(3,6)=-g;
%F(4,1)=-(2*omega*vx*cos(fai)+vx^2*sec(fai)^2/R);
F(4,1)=-(2*omega*vx*sin(fai)+vx^2*sec(fai)^2/R);
F(4,3)=-2*(vx*tan(fai)/R+omega*sin(fai));
F(4,5)=g;
%F(4,7)=-g;
F(5,4)=-1/R;
F(5,6)=omega*sin(fai)+vx*tan(fai)/R;
F(5,7)=-(omega*cos(fai)+vx/R);
F(5,8)=1;
F(6,1)=-omega*sin(fai);
%F(6,3)=-1/R;
F(6,3)=1/R;
F(6,5)=-(omega*sin(fai)+vx*tan(fai)/R);
%F(6,7)=-vx/R;
F(6,7)=-vy/R;
F(6,9)=1;
F(7,1)=omega*cos(fai)+vx*sec(fai)^2/R;
F(7,3)=tan(fai)/R;
F(7,5)=omega*cos(fai)+vx/R;
%F(7,6)=vx/R;
F(7,6)=vy/R;
F(7,10)=1;
F(8,8)=-gyrotime;
F(9,9)=-gyrotime;
F(10,10)=-gyrotime;

F(3,11)=cbn(1,1);
F(3,12)=cbn(1,2);
F(3,13)=cbn(1,3);

F(4,11)=cbn(2,1);
F(4,12)=cbn(2,2);
F(4,13)=cbn(2,3);

F(5,8)=cbn(1,1);
F(5,9)=cbn(1,2);
F(5,10)=cbn(1,3);

F(6,8)=cbn(2,1);
F(6,9)=cbn(2,2);
F(6,10)=cbn(2,3);

F(7,8)=cbn(3,1);
F(7,9)=cbn(3,2);
F(7,10)=cbn(3,3);

F(11,11)=-atime;
F
F(16,16)=0;


G=[0,0,0,0,0,0,0,0,0;
    0,0,0,0,0,0,0,0,0;
    0,0,0,0,0,0,0,0,0;
    0,0,0,0,0,0,0,0,0;
    0,0,0,0,0,0,0,0,0;
    0,0,0,0,0,0,0,0,0;
    0,0,0,0,0,0,0,0,0;
    1,0,0,0,0,0,0,0,0;
    0,1,0,0,0,0,0,0,0;
    0,0,1,0,0,0,0,0,0;
    0,0,0,1,0,0,0,0,0;
    0,0,0,0,1,0,0,0,0;
    0,0,0,0,0,1,0,0,0;
    0,0,0,0,0,0,1,0,0;
    0,0,0,0,0,0,0,1,0;
    0,0,0,0,0,0,0,0,1];

[A,B]=c2d(F,G,T);

for i=1:time
    w(1,1)=gyronoise*g1(1,i);
    w(2,1)

以上是关于雷达通信基于matlab联邦滤波算法惯性+GPS+地磁组合导航仿真含Matlab源码 1276期的主要内容,如果未能解决你的问题,请参考以下文章

雷达通信基于matlab间接卡尔曼滤波IMU与GPS融合含Matlab源码 1360期

雷达通信基于matlab GPS和INS联合导航含Matlab源码 1814期

滤波跟踪基于matlab不变扩展卡尔曼滤波器对装有惯性导航系统和全球定位系统IMU+GPS进行滤波跟踪含Matlab源码 2232期

滤波跟踪基于matlab扩展卡尔曼滤波器 (EKF) GPS 数据滤波跟踪含Matlab源码 2316期

滤波跟踪基于matlab扩展卡尔曼滤波器 (EKF) GPS 数据滤波跟踪含Matlab源码 2316期

雷达通信基于matlab CDIF算法雷达信号分选含Matlab源码 1186期