加速度计与陀螺仪融合一阶互补滤波、二阶互补滤波、卡尔曼滤波核心程序.docx

上传人:王** 文档编号:1678462 上传时间:2024-12-16 格式:DOCX 页数:8 大小:25.69KB
下载 相关 举报
加速度计与陀螺仪融合一阶互补滤波、二阶互补滤波、卡尔曼滤波核心程序.docx_第1页
第1页 / 共8页
加速度计与陀螺仪融合一阶互补滤波、二阶互补滤波、卡尔曼滤波核心程序.docx_第2页
第2页 / 共8页
加速度计与陀螺仪融合一阶互补滤波、二阶互补滤波、卡尔曼滤波核心程序.docx_第3页
第3页 / 共8页
加速度计与陀螺仪融合一阶互补滤波、二阶互补滤波、卡尔曼滤波核心程序.docx_第4页
第4页 / 共8页
加速度计与陀螺仪融合一阶互补滤波、二阶互补滤波、卡尔曼滤波核心程序.docx_第5页
第5页 / 共8页
加速度计与陀螺仪融合一阶互补滤波、二阶互补滤波、卡尔曼滤波核心程序.docx_第6页
第6页 / 共8页
加速度计与陀螺仪融合一阶互补滤波、二阶互补滤波、卡尔曼滤波核心程序.docx_第7页
第7页 / 共8页
加速度计与陀螺仪融合一阶互补滤波、二阶互补滤波、卡尔曼滤波核心程序.docx_第8页
第8页 / 共8页
亲,该文档总共8页,全部预览完了,如果喜欢就下载吧!
资源描述

《加速度计与陀螺仪融合一阶互补滤波、二阶互补滤波、卡尔曼滤波核心程序.docx》由会员分享,可在线阅读,更多相关《加速度计与陀螺仪融合一阶互补滤波、二阶互补滤波、卡尔曼滤波核心程序.docx(8页珍藏版)》请在优知文库上搜索。

1、一阶互补/a=tau/(tau+1.ooptime)UnewAng1.e=ang1.emeasuredwiatan2using(heacce1.erometer加速度传感器输出值UncwRatc=ang1.emeasuredusingthegyro/100ptime=1.ooptimeinni1.1.is()f1.oat1.au=0.075:f1.oata=0.():f1.oatCon1.enentary(f1.oatnewAng1.e,f1.oatnewRate,int100ptinie)(f1.oat.具体卡尔曼滤波*-4-indcnt-tabs-nxicf11c-basic-offsct

2、rX:tab-width:8:-vi:setIJi=8: $1.d:tih.c.1200327/0918:23:29johnExpS衾 1dimensiona1.1.i1.tsensorusingdua1.axisaixe1.eroneter andsing1.eaxisangu1.arrategyro.hctwosensorsarcfused viaatwostateKa1.manfi1.ter,withonestatebeingtheang1.e tandheothersta1.ebeingthegyrobias. Gyrobiasisautomatica1.1.ytrackedbythe

3、fi1.ter.Thisseems 1.ikemagic.今 P1.easenoteIhaUhekarc1.otsofcomnen1.sin(hefunc1.kmsandoinb1.ocksbeforetheFunctions.Ka1.manfi1.teringisana1.readycomp1.ex subject,madeevenmoresobyextensivehandoptimizationstotheCcode分(hatimp1.ementsthefi1.ter.vetriedtomakeaneffo11ofexp1.aining thep1.irniz4iti0ns.bu1.fee

4、1.freetosendmai1.Iothe11ui1.ing1.ist. autopi1.ot-,withquestionsaboutthiscode.* (c)2003Trarnme1.1.Hudson衾 *Thisparioftheautopi1.otOfIbOanIcodepackage. Autapi1.acisfreesoftware;youcanredistributeitndrormodify titUix1.erthetermsoftheGNUGenera1.Pub1.ic1.icenseaspub1.ishedby (heFreeSoftwareFoundation:eit

5、herversion2ofIhc1.icense,or (atyouroption)any1.aterversion., Autopi1.otisdistributedinthehopethatitwi1.1.beusefu1. butWITHOUTANYWARRANTY:withoutevenIhCimp1.iedwarrantyof MERCHANTABI1.ITYorHTNESSEORAPARneU1.ARPURPOSE.Seethe GNUGenera1.Pub1.ic1.icenseformoredetai1.s.*终Ywshou1.dhavereceivedacopyoftheGN

6、UGenera1.Pub1.ic1.icense a1.ongwithAutopi1.ot:ifnot.writetotheFreeSoftware Foundacion,Inc.,59Temp1.eP1.ace,Suite330.Bos1.on,MA021.1.1.-1.307USA#inc1.udcOurupdaterate.,Ihisishowoftenourstateisupdatedwithgyroratemeasurements.Fornow,WCdoiteverytimean8bitcounterrunningatC1.K/1024exis.Youwi1.1.havetochan

7、geIhisva1.ueityouupdatea1.adifferentra1.e.staticconstf1.oatdt=(1024.0256.0)/KwMK)O().0; Ourcovariancematrix.Thisisupdatedateverytinwstep1.o分determinehowwe1.1.thesensorsaretracking(heactua1.state.Wstaticf1.oatP2112=(,O1.(O,1.s*Ourtwos1.ates,theang1.eandthegybias.Asabyp111.uc1.ofcmpu1.ing* theang1.e,w

8、ca1.sohaveanunbiasedangu1.arrateavai1.ab1.e.Thesearc* read-on1.ytotheuserofthemodu1.e.Vf1.oatang1.e:Hoatq_bias:t1.oatrate;* RrepresentsIhCmeasurementcovariancenoise.Inthisease,sei(isaIx1.matrixthatsaysIha1.Weexpect0.3radjitterWfmIhCacix1.erme1.er./staticconstf1.oatRUng1.C=0.3;* Qisa2x2matrixthatrcpr

9、cscntstheprocesscovariancenoise.* Inthiscase,itindicateshowmuchWe(rust(heacce1.e)nuer* tre1.ativeIoIhCgys./staticconstf1.oatQ.ang1.c=0.001;staticconstf1.oatQ_gyro=0.003;s(a(e_u|xiateisca1.1.edeverydtwithabiasedgyromeasuremenbytheuserofthemodu1.e.I1.updatestheCUrTUn1.ang1.eandrateestimate.JtThepitchg

10、yromeasunemshou1.dbesca1.edintora1.units,but* doesno1.needanybiasremova1.Thefi1.terwi1.1.Inickthebias.Ourstatevectoris:* X=Iang1.e.gyro_bias* 1(runsthestateestimationfbrardviathestatefunctions:分XXdo1.=Iang1.c_do1.gyro_bias_do* ang1.c-dH=gyro-gyro_biasjgyro_bias_doi=O* Andupdatesthecovariancematrixvi

11、athefunction:.* P(Jo=A*P+P*A+Q* AistheJacobianofXdowithrespecttothestates:* A=d(ang1.e_do(yd(ang1.e)dang1.e_do_bias_do1.Vd(ang1.e)d(gyro_bias_dot)/d(gyro_bias)* =IO-I1* (OOIyDuctothesma1.1.CPUavai1.ab1.eonthemicrocontro1.1.er,weve* handoptimizedtheCcodeIoon1.ycomputethetermsthatarc食exp1.kidynon-zex),a$we1.1.asexpandedoutIhematrix11th* 1.obedoneinasfewstepsaspossib1.e.Thisdemakeitharder* tor

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 论文 > 期刊/会议论文

copyright@ 2008-2023 yzwku网站版权所有

经营许可证编号:宁ICP备2022001189号-2

本站为文档C2C交易模式,即用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。装配图网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知装配图网,我们立即给予删除!