MATLAB在卡尔曼滤波器中应用的理论与实践Kalman
MATLAB在卡尔曼滤波器中应用的理论与实践KalmanKALMAN FILTERINGTheory and Practice Using MATLABThird editionMOHINDER S GREWALCalifornia State University at FullertonANGUS P. ANDREWSRockwell Science Center (retired)WILEYA JOHN WILEY & SONS, INC. PUBLICATIONCopyright 2008 by John Wiley sons, Inc. All rights reservedPublished by John Wiley sons, InC, Hoboken, New JerseyPublished simultaneously in CanadaNo part of this publication may be reproduced, stored in a retrieval system, or transmitted in any form or byany means, electronic, mechanical, photocopying, recording, scanning, or otherwise, except as permittedunder Section 107 or 108 of the 1976 United States Copyright Act, without either the prior writtenpermission of the Publisher, or authorization through payment of the appropriate per-copy fee to theCopyright Clearance Center, Inc, 222 Rosewood Drive, Danvers, MA 01923,(978)750-8400, fax(978)750-4470,oronthewebatwww.copyright.com.RequeststothePublisherforpermissionshouldbe addressed to the Permissions Department, John Wiley Sons, Inc, lll River Street, Hoboken, NJ07030,(201)748-6011,fax(201)748-6008,oronlineathttp://www.wiley.com/go/permissionimit of liability Disclaimer of Warranty: While the publisher and author have used their best efforts inpreparing this book, they make no representations or warranties with respect to the accuracy or completeness of the contents of this book and specifically disclaim any implied warranties of merchantability orfitness for a particular purpose. No warranty may be created or extended by sales representatives orwritten sales materials. The advice and strategies contained herein may not be suitable for your situationYou should consult with a professional where appropriate. Neither the publisher nor author shall be liablefor any loss of profit or any other commercial damages, including but not limited to special, incidentalconsequential, or other damagesFor general information on our other products and services or for technical support, please contact ourCustomer Care Department within the United States at(800)762-2974, outside the United States at(317)572-3993 or fax(317)572-4002Wiley also publishes its books in a variety of electronic formats. Some content that appears in print maynot be available in electronic format. For more information about wiley products, visit our web site atwww.wiley.comLibrary of Congress Cataloging- in-Publication DataGrewal. Mohinder sKalman filtering: theory and practice using MATLAB/Mohinder S. GrewalAngus p. andrews. 3rd edIncludes bibliographical references and indexISBN978-0-470-17366-4( cloth)1. Kalman filtering. 2. MATLAB. I. Andrews, Angus P. II. TitleQA402.3.G69520086298312—dc22200803733Printed in the United States of america10987654321CONTENTSPrefaceAcknowledgmentsXIIIList of abbreviationsXV1 General Information1.1 On Kalman Filtering1.2 On Optimal Estimation Methods, 51. 3 On the notation Used In This book 231. 4 Summary, 25Problems. 262 Linear Dvnamic Systems2. 1 Chapter focus, 312.2 Dynamic System Models, 362. 3 Continuous Linear Systems and Their Solutions, 402.4 Discrete Linear Systems and Their Solutions, 532.5 Observability of Linear Dynamic System Models, 552.6 Summary, 61Problems. 643 Random Processes and Stochastic Systems3.1 Chapter Focus, 673.2 Probability and random Variables (rvs), 703.3 Statistical Properties of RVS, 78CONTEN3.4 Statistical Properties of Random Processes(RPs),803.5 Linear rp models. 883.6 Shaping Filters and State Augmentation, 953.7 Mean and Covariance propagation, 993.8 Relationships between Model Parameters, 1053.9 Orthogonality principle 1143.10 Summary, 118Problems. 1214 Linear Optimal Filters and Predictors1314.1 Chapter Focus, 1314.2 Kalman Filter. 1334.3 Kalman-Bucy filter, 1444.4 Optimal Linear Predictors, 1464.5 Correlated noise Sources 1474.6 Relationships between Kalman-Bucy and wiener Filters, 1484.7 Quadratic Loss Functions, 1494.8 Matrix Riccati Differential Equation. 1514.9 Matrix Riccati Equation In Discrete Time, 1654.10 Model equations for Transformed State Variables, 1704.11 Application of Kalman Filters, 1724.12 Summary, 177Problems. 1795 Optimal Smoothers5.1 Chapter Focus, 1835.2 Fixed-Interval Smoothing, 1895.3 Fixed-Lag Smoothing, 2005.4 Fixed-Point Smoothing, 2135.5 Summary, 220Problems. 226 Implementation Methods2256. 1 Chapter Focus, 2256.2 Computer Roundoff, 2276.3 Effects of roundoff errors on Kalman filters 2326.4 Factorization Methods for Square-Root Filtering, 2386. 5 Square-Root and UD Filters, 2616.6 Other Implementation Methods, 2756.7 Summary, 288Problems. 2897 Nonlinear Filtering2937.1 Chapter Focus, 2937.2 Quasilinear Filtering, 296CONTENTS7.3 Sampling Methods for Nonlinear Filtering, 3307.4 Summary, 345Problems. 3508 Practical Considerations3558.1 Chapter Focus. 3558.2 Detecting and Correcting Anomalous behavior, 3568.3 Prefiltering and Data Rejection Methods, 3798.4 Stability of Kalman Filters, 3828. 5 Suboptimal and reduced- Order Filters, 3838.6 Schmidt-Kalman Filtering, 3938.7 Memory, Throughput, and wordlength Requirements, 4038.8 Ways to Reduce Computational requirements 4098.9 Error Budgets and Sensitivity Analysis, 4148.10 Optimizing Measurement Selection Policies, 4198.11 Innovations analysis, 4248.12 Summary, 425Problems. 4269 Applications to Navigation4279.1 Chapter focus, 4279.2 Host vehicle dynamics, 4319.3 Inertial Navigation Systems(INS), 4359. 4 Global Navigation Satellite Systems(GNSS), 4659.5 Kalman Filters for GNSS. 4709.6 Loosely Coupled GNSS/INS Integration, 4889.7 Tightly Coupled GNSS /INS Integration, 4919. 8 Summary, 507Problems. 508Appendix A MATLAB Software511A 1 Notice. 511A 2 General System Requirements, 511A 3 CD Directory Structure, 512A 4 MATLAB Software for Chapter 2, 512A. 5 MATLAB Software for Chapter 3, 512A6 MATLAB Software for Chapter 4, 512A. 7 MATLAB Software for Chapter 5, 513A 8 MATLAB Software for Chapter 6, 513A 9 MATLAB Software for Chapter 7, 514A10 MATLAB Software for Chapter 8, 515A 11 MATLAB Software for Chapter 9, 515A 12 Other Sources of software 516CONTENAppendix b A Matrix Refresher519B. 1 Matrix Forms. 519B 2 Matrix Operations, 523B 3 Block matrix Formulas. 527B 4 Functions of Square Matrices, 531B 5 Norms. 538B6 Cholesky decomposition, 541B7 Orthogonal Decompositions of Matrices, 543B 8 Quadratic Forms, 545B 9 Derivatives of matrices. 546Bibliography549Index565PREFACEThis book is designed to provide familiarity with both the theoretical and practicalaspects of Kalman filtering by including real-world problems in practice as illustrativeexamples. The material includes the essential technical background for Kalman filter-ing and the more practical aspects of implementation: how to represent the problem ina mathematical model, analyze the performance of the estimator as a function ofsystem design parameters, implement the mechanization equations in numericallystable algorithms, assess its computational requirements, test the validity of resultsitor the filteThetant attributes ofthe subject that are often overlooked in theoretical treatments but are necessary forapplication of the theory to real-world problemsIn this third edition, we have included important developments in the implemen-tation and application of Kalman filtering over the past several years, including adaptations for nonlinear filtering, more robust smoothing methods, and develelopingapplications in navigationWe have also incorporated many helpful corrections and suggefrom ourreaders, reviewers, colleagues, and students over the past several years for theoverall improvement of the textbookAll software has been provided in MatLab so that users can take advantage ofits excellent graphing capabilities and a programming interface that is very close tothe mathematical equations used for defining Kalman filtering and its applicationsSee Appendix a for more information on MATLAB softwareThe inclusion of the software is practically a matter of necessity because Kalmanfiltering would not be very useful without computers to implement it. It provides aMATLAB is a registered trademark of The Mathworks, IncEFACEbetter learning experience for the student to discover how the Kalman filter works byobserving it in actionThe implementation of Kalman filtering on computers also illuminates some of thepractical considerations of finite-wordlength arithmetic and the need for alternativealgorithms to preserve the accuracy of the results. If the student wishes to applywhat she or he learns, then it is essential that she or he experience its workingsand failings--and learn to recognize the differenceThe book is organized as a text for an introductory course in stochastic processes atthe senior level and as a first-year graduate-level course in Kalman filtering theory andapplicationIt can also be used for self-instruction or for purposes of review by practi-cing engineers and scientists who are not intimately familiar with the subject. Theorganization of the material is illustrated by the following chapter-level dependencygraph, which shows how the subject of each chapter depends upon material in otherchapters. The arrows in the figure indicate the recommended order of study. Boxesabove another box and connected by arrows indicate that the material represented bythe upper boxes is background material for the subject in the lower boxAPPENDIX B: A MATRIX REFRESHERGENERAL INFORMATION2. LINEAR DYNAMIC SYSTEMSRANDOM PROCESSES AND STOCHASTIC SYSTEMS4. OPTIMAL LINEAR FILTERS AND PREDICTORS5. OPTIMAL SMOOTHERS6. IMPLEMENTATIONMETHODS7. NONLINEAR8. PRACTICAL9. APPLICATIONSFILTERINGCONSIDERATIONSTO NAVIGATIONAPPENDIX A: MATLAB SOFTWAREChapter l provides an informal introduction to the general subject matter by wayof its history of development and application. Chapters 2 and 3 and Appendix b coverthe essential background material on linear systems, probability, stochastic processesand modeling. These chapters could be covered in a senior-level course in electricalcomputer, and systems engineeringChapter 4 covers linear optimal filters and predictors, with detailed examples ofapplications. Chapter 5 is a new tutorial-level treatment of optimal smoothing
- 2020-12-01下载
- 积分:1
adams仿真案例讲解
adams分析实例,定轴轮系和行星轮系传动模拟和仿真3.5在 ADAMS/view中位置方向库中选择位置旋转( Position: Rotate.)图标一,在角度(Ange一栏中输入90,表示将对象旋转90度。如图3-3所示。在 ADAMS/View窗口中用鼠标左键选择圆柱体,将出来一个白色箭头移动光标,使白色箭头的位置和指向如图3-8所示。然后点击鼠标左键,旋转后的圆柱体如图3-9所示。gravity图3-8圆柱体的位置旋转图3-9旋转90后的圆柱体4.创建旋转副、齿轮副、旋转驱动4.1选择 ADAMS/wiew约束库中的旋转副( Joint: Revolute图标。,参数选择2Bod1loc和 Normal to grid,在ADAMS/view工作窗口中先用鼠标左键选择齿轮(PART2)然后选择机架( ground),接着选择齿轮上的PART2cm如图4-1所示。图中显亮的部分就是所创建的旋转副( JOINT_1该旋转副连接机架和齿轮,使齿轮能相对机架旋转4-1齿轮上的旋转副4.2再次选择 ADAMS/iew约束厍中的旋转副( Joint:Revolute)图标参数选择2Bod-1Loc和 Normal ToGrid。在 ADAMS/wew工作窗口中先月鼠标左键选择齿轮PART3),然后选择机架〔 ground),接着选择齿轮上的PART3.cm,如图4-2所示。图中显亮的部分就是所创建的旋转副( JOINT_2)该旋转副连接机架和齿轮使齿轮能相对机架旋转图42蜗杆上的旋转副43创建完两个定轴齿轮上的旋转副后,还要创建两个定轴齿轮的啮合点( MARKER)。齿轮副的啮合点和旋转刮必须有相同的参考连杆(机架),并且啮合点Z轴的方向与齿轮的传动方向相同。所以在本题中,啮合点( MARKER)必须定义在机架( ground)上,机架可以看作机架选择 ADAMSAVIew工具箱的动态选择( Dynamic Pick)图标,将两个齿轮的啮合处进行放大,再选择动态旋转图标鬥,进行适当的旋转。选择 ADAMS/View零件库中的标记点工具图标数选择如图4-3所示。选择坐标为(100,50,0),如图4-4所示,图中显亮的部分就是所创建的啮合点( MARKER14)。MarkerAdd to groundLyOrientati onlobal xY图4-3标记点的选项图44蜗轮蜗杆的啮合点4.4下面将对上面做出的啮合点进行位置移动和方位旋转,使该啮合点位于两齿轮中心线上,并使啮合点的Z轴方向与齿轮旋转方向相同。在ADAMS/View窗口中,在两个齿轮啮合处点击鼠标右键,运择 - Maker:rr-Clr de: CYLINDER_1MARKER14 Modify,如图45所示。在弹出的对话框中,将 LocationAl: raSelct栏的值1000.50.0,00改为100.0,25,00(位置移动)将 Orientation栏中的值0.0,0.0,0.0修改为0,90,0方位旋转)如图46所示。点击对话椎下而的OKApea『ane键讲行确定,旋转后的啮合点( MARKER_14)如图4-7所不。从图中可以看出,啮合点的Z轴(蓝色)Z轴的方向与齿轮的啮合方向相同图4-5属性修改对话框Nanedingzhoulaensi two. cround MARKER_ 7Inn n. 25. nLocation Relative Ta. dingzhouluerutitws0.0,90.0,0.0Ori entation Relative Td. dingzhoulueas i twoirer」[spy]a0写糖图4-7旋转后的啮合点图4-6进行坐标轴的旋转45选择 ADAMS/View约束库中的齿轮副(Gear)图标在弹出的对话框中的 Joint Name栏中,点击鼠标右键分别选择 JOINT1、JONr2。如图4-7所示。在 Common Velocity Marker栏中,点击鼠标右键选择啮合点( MARKER14)。如图4-8所示,然后点击对话框下面的OK按钮,两个齿轮的齿轮副创建出来,如图49所示1 Constraint Create Complex Joint Gearme[mhte×1cmmndingrhoulNeni GEAR 1Gear Nemedinczhouluenxi two GEAR_1Adms工dCommentsJoint NameN 1, JOINT 2Common Velocity MarkerCommon veloci ty Markey鬥 AREER1ParameterizedingzhouluenxiApplyCaneelJoINT 247齿轮副的创建对话框图48齿轮副的创建要素图4-9定轴齿轮的齿轮副46在 ADAMS/View驱动库中选择旋转驱动( Rotational joint Motion)按钮,在sped-栏中输入360,360表示旋转驱动每秒钟旋转360度。在 ADAMS/View工作窗口中,两个齿轮中仟选一个作为丰动齿轮,本设计中选择左边的齿轮(红色的),用鼠标左键点击齿轮上的旋转副( JOINT1),一个旋转驱动创建出来,如图4-10所示,图中显亮的部分为旋转驱动。图4-10齿轮上的旋转驱动5仿真模型5.1点击彷真按钮圖设置仿真终止时间〔 End Time冫为1,仿真工作步长( Step Size)为0.01然后点击开始仿真按钮进行仿真52对小齿轮的进行运动分析。因为太齿轮的齿数为x1=50,小齿轮的齿数2=25,模数m=4mm,因此根据机械原理可以知道,对于标准外啮合渐开线直齿圆柱体齿轮传动,小齿轮的转速为大齿轮的2倍。对小齿轮的旋转副 JOINT2进行角位置分析。在 ADAMS/View工作窗口中用鼠标右键点击小齿轮的旋转副JOINT2,选择 Modify命令,如图5-1所示,在弹出的修改对话框中选-CyInder: CYUND-R 2择测量( Measures)图标如图52所示。在弹出的测量对话框中-M=rsr:cri-Marker: MAR ER 5将 Characteristic栏设置为Ax/Ay! Az Projected Rotation,将st gourdComponent栏设置为Z,将From/At栏设置为PART3. MARKER5(或者ground MARKER6),其他的设置如图5-3所示。然后点击对话框下面的Jark::JoI_2OK”确认。生成的时间-角度曲线如图5-4所示。1 Joint MeasureMeasure namedingchouluensi two. JOINT_2 MEA 2JointJUINT 2Characteristic: Art/ Ay/Ar Projected Rotation图5-1旋转副属性修改命令ComponentC(ZFrom/此tC PART 3, MARKER 5tameI 2HARKER 6Crientati onSecond BodyRepresent coordinates inTypel revoluteForce Display Honev Create Strip Chartpose Mations)图5-3测量力对话框的设置团网」」_sy」cd图5-2修改对话框1 J0INT_2_MEA_17500Tine:1.000Current: 72037500.510图54时间和角度的曲线图由图5-4可以知道,当大齿轮每秒逆时针转过360度时,小齿轮顺时针转过的角度为720度符合标准外啮合渐开线直齿圆柱体齿轮传动角速度与齿轮的分度圆半径成反比。ADAMS分析实例-定轴轮系和行星轮系传动模拟有一对外聩合洧开线直圆柱体齿轮传动已知x1=50,32=25,m=4mm,=20°。两个齿轮的厚度都是5mm。1.启动 ADAMS双击桌面上 ADAMS/View的快捷图标,打开 ADAMS/View在欢迎对话框中选择“ Create a new model”,在模型名称( Model name)栏中输入; xingxingchiluen:在重力名称( Gravity)栏巾选择“ Earth normal(- Global y)”;在单位名称( Units)栏中选择“MMKS-mm,kg, N s, deg”。如图1-1所示。How would you l:ke to proceed?C Open an existing databaseImport a fileADAMSStart it D: AllAlS12Model name ing:ingchiluenGravity Earth Normal (-Global r)inits MMES-m,kg趴,degWurkiny Gril Fellingsv Show冒 orkime Grid图1-1欢迎对话框C Rectangular C Folar2.设置工作环境2.1对于这个模型,网格间距需要设置成更高的精度以满足要求。szC750mn)(500mm)在 ADAMS/View菜单栏中,选择设置(〈stim)下拉菜单中的工作sp网格( Working grid)命令。系统弹出设置T作网格对話框,将网格ColorWeight的尺寸Sie)中的X和Y分别设置成750mm和500m,间距( Spacing) Dots Contrast1中的X和Y都设置成50mm。然后点击“OK”确定。如图21所表 Ares Contrast1Lines Contrast厂 Triad Solid2.2用鼠标左键点击选择( Select)图标,控制面板出现在| Set location工具箱中。Set orientationQ23用鼠标左键点击动态放大( Dynamic Zo0m)图标Applyance在模型窗口中,点击鼠标左键并按住不放,移动鼠标进行放大或缩小。创建齿轮图2-1设置工作网格对话框3.1在 ADAMS/View零件库中选择圆柱Cylinder体 Cylinder)图标参数选择为“NewNew PartPart”,长度( Length)选择50mm(齿轮Y Length的厚度),半径( Radius)选择100mmm×ZV Radius210))。如图31所示。4×50100图3-1设置圆柱体选项3.2在 ADAMS/view工作窗凵中先用鼠标任意左键选择点(,,0)mm,然后选择点(0,50,0)。则一个圆柱体(PART2)创建出来。如图3-2所示。3-2创建圆柱体(齿轮)33在 ADAMS/iew中位置/方向库中选择位置旋转( Pusillum: Rotate,,)Selectedopy图标,在角度(Ange一栏中输入90.表示将对象旋转90度。如图33| About所示。在 ADAMS/wiew窗口中用鼠标左键选择圆柱体,将出来一个白色箭Angle头,移动光标,使白色箭头的位置和指向如图3-4所示。然后点击鼠标左键旋转后的圆柱体如佟3-5所示。图3-3位置旋转选项图3-4圆柱体的位置旋转35旋转90后的圆柱体34在 ADAMS/View零件库中选择圆柱体( Cylinder)图标,参数选择为“ New part”,长度( Length)选择50mm(齿轮的厚度),半径( Radius)选择50mm(m×z4×25=50)如图3-1所示。在 ADAMS/iew工作窗口口先用鼠标左键选择点(150,0,0)mm,然后选择点(150,50,0)。则一个圆柱体(PART3)创建出来。如图3-6所小。图3-6创建圆柱体(齿纶)3.5在 ADAMS/View中位置/方向库中选择位置旋转( Position: Rotate.)图标"一,在角度(Ange)一栏中输入90,表示将对象旋转90度。如图3-3所示。在 ADAMS/View窗口中用鼠标左键选择圆柱体,将出来一个自色箭头,移动光标,使白色箭头的位置和指向如图3-7所示。然后点击鼠标左键,旋转后的陨柱体如图3-8所示。3-7圆柱体的位置旋转图3-8旋转90后的圆杜体36在 ADAMS/VIew零件库中选择杆仁ik图标,,参数选择为如图39所示。在 ADAMS/View工作窗口中先用鼠标左键选择点PART2 MARKER1,然后选择点PART3 MARKER2。则一个连杆(PART4)创建出来。如图3-10所示。图3-10创建的连杆4.创建旋转副、齿轮副、固定副、旋转驱动4.1在本改计选择左边的齿轮(红色的)为固定齿轮选择 ADAMSaView约束库中的旋转副( Joint: Revolute)图标参数选择2Bod-1Loc和 Normal to grid。在ADAMS/View工作窗口中先用鼠标左键选择连杆aJ LDr3(PART_4),然后选择机架( ground),接着选择齿轮上的PART4 MARKER3,如图4-1所示。图中显亮的部分就是所创建的旋转副( JOINT1),该旋转副连接机架和连杆,使连杆能相对机架旋转。图4-1连杆的旋转别4.2再次选择 ADAMS/view约東库中的旋转副( Joint: Revolute)图标参数选择2Bod-lIoc和 Normal to grid。在 ADAMS/view工作窗口中先用鼠标左键选择齿轮(PART_2),然后选择连杆(PART_4),接着选择齿轮上的PART2cm(或者PART2 MARKER1),如图42所示。图中显亮的部分就是所创建的旋转副( JOINT2),该旋转副连接连杆和固定齿轮,使连杆能对固定齿轮旋转。因为 JOINT1和JOINT2重合在一起,所以从图4-2中区分不出来图4-2固定齿轮的旋转副43再次选择 ADAMS/view约束库中的旋转副( Joint: Revolute)饜标",参数近择2Bod-1Loc和Normal to grid。在 ADAMS/view工作窗口中先用鼠标左键选择齿轮(PART3),然后选择连杆(PART4),接着选择齿轮上的PART3cm(或者PART3 MARKER2),如图43所示。图中显亮的部分就是所创建的旋转副( JOINT3),该旋转副连接连杆和行星轮使迕杆能带动行星轮旋转。图4-3行星轮的旋转副44创建完两个齿轮和连杆上的旋转副后,还要创建两个齿轮的啮合点( MARKER)。因为行星轮要在定齿轮上做圆周运动,所以行星轮和固定齿轮的啮合点不是匝定不动的,它随着行星轮的运动而不断地变化,因此,可以把啮合点固定在连杆上,因为迕杆和行星轮一起做园周运动,并且两齿轮旋转中心的连线一定经过啮合点。下面我们将把啮合点围在连杆,并且使啮合点Z轴的方向与齿轮的传动方向相同。选择 ADAMS/view零件库中的标记点工具图标参数选择如图44所示。选择连杆(PART4)在选择连杆上点PART4cm,如图45所示,图中显亮的部分就是所创建的啮合点( MARKER_11)arherAdd to partOrientationGlobal xY图44标记点的选项图4-5固定齿轮和行星轮之间的啮合点45上面所创建的啮合点不在两个齿轮的分度圆的交线上,下面将对上面做出的啮合点进行位置移动和方位旋转使该啮合点位于两齿轮交线上,并仅啮合点的Z轴方向与齿轮旋转方向相同。在 ADAMS/VIew窗口中,在两个齿轮啮合处点击鼠标右键,选拦- Maker: MARKER14→ Modify,如图4-5所示。在弹出的对话框中,将 Location栏的值75.0.25.0,-25.改为100.0,25.0.-250(位置移动),将 Orientation栏中的值0.0.0.0.
- 2021-05-06下载
- 积分:1