扩展Kalman滤波(EKF)和无迹卡尔曼滤波(ukf)剖析.ppt

扩展Kalman滤波(EKF)和无迹卡尔曼滤波(ukf)剖析.ppt

  1. 1、本文档共29页,可阅读全部内容。
  2. 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
扩展Kalman滤波(EKF)和无迹卡尔曼滤波(ukf)剖析

三、无迹卡尔曼滤波算法(UKF) %---------------滤波算法---------------- for t=t0:h:tf ? ? [state,stater,yc]=track(state,stater); %轨迹发生器:标准轨迹和输出 ? ? [xc,p]=UKFfiter(@systemfun,@measurefun,xc,yc,p); ? ? error=xc-stater;? ?? ?? ?? ???%滤波处理后的误差 ? ? staterout=[staterout,stater]; ? ? stateout=[stateout,state]; ? ? errorout=[errorout,error]; ? ? xcout=[xcout,xc];?? ? ? tout=[tout,t]; end? %---------------状态信息图像--------------- figure; plot(tout,xcout(1,:),r,tout,staterout(1,:),g,... ? ???tout,stateout(1,:),black); legend(滤波后,真实值,无滤波); grid on; xlabel(时间 t(s)); ylabel(系统状态A); title(无迹卡尔曼滤波); figure; 三、无迹卡尔曼滤波算法(UKF) plot(tout,xcout(2,:),r,tout,staterout(2,:),g,... ? ???tout,stateout(2,:),black); grid on; legend(滤波后,真实值,无滤波); xlabel(时间 t(s)); ylabel(系统状态B); title(无迹卡尔曼滤波); figure; plot(tout,xcout(3,:),r,tout,staterout(3,:),g,... ? ???tout,stateout(3,:),black); grid on; legend(滤波后,真实值,无滤波); xlabel(时间 t(s)); ylabel(系统状态C); title(无迹卡尔曼滤波); figure; plot(tout,xcout(4,:),r,tout,staterout(4,:),g,... ? ???tout,stateout(4,:),black); 三、无迹卡尔曼滤波算法(UKF) grid on; legend(滤波后,真实值,无滤波); xlabel(时间 t(s)); ylabel(系统状态D); title(无迹卡尔曼滤波); figure; plot(tout,errorout(1,:),r,tout,errorout(2,:),g,... ? ???tout,errorout(3,:),black,tout,errorout(4,:),b); grid on; legend(A,B,C,D); xlabel(时间 t(s)); ylabel(滤波后的状态误差); title(无迹卡尔曼滤波误差); %--------------------------------------------- toc;??%计算仿真程序运行时间 end ) 三、无迹卡尔曼滤波算法(UKF) function [state,stater,yout]=track(state0,stater0 %----------------------------------- %轨迹发生函数 %----------------------------------- T=3; F=[1 T 0 0;0 1 0 0;0 0 1 T;0 0 0 1]; G=[T^2/2 0;0 T;T^2/2 0;0 T]; V=0.005*randn(2,1); W=0.008*randn(1,1); state=F*state0+G*V; stater=F*stater0; yout=atan(stater0(3)/stater0(1))+W; %用真实值得到测量值,在滤波时结果才会与真实值重合。 end function??state=systemfun(state0) %------------------------- %系统方程 %------------------------- ? ?? T=3; F=[1 T 0 0;0 1 0 0;0 0 1 T;0 0 0 1]; state=F*state0; end 三、无迹卡尔曼滤波算法(UKF) function??yout=measurefun(state0) %---------------------------- %测量方程 %------

文档评论(0)

wyjy + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档