简体   繁体   English

间接(错误状态)卡尔曼滤波器的结构是什么?误差方程是如何导出的?

[英]What is the structure of an indirect (error-state) Kalman filter and how are the error equations derived?

I have been trying to implement a navigation system for a robot that uses an Inertial Measurement Unit (IMU) and camera observations of known landmarks in order to localise itself in its environment. 我一直在尝试为使用惯性测量单元(IMU)和相机观察已知地标的机器人实施导航系统,以便在其环境中进行本地化。 I have chosen the indirect-feedback Kalman Filter (aka Error-State Kalman Filter, ESKF) to do this. 我选择了间接反馈卡尔曼滤波器(又名误差状态卡尔曼滤波器,ESKF)来做到这一点。 I have also had some success with an Extended KF. 我在扩展KF方面取得了一些成功。

I have read many texts and the two I am using to implement the ESKF are " Quaternion kinematics for the error-state KF " and " A Kalman Filter-based Algorithm for IMU-Camera Calibration " (pay-walled paper, google-able). 我已经阅读了很多文本,我用来实现ESKF的两个是“ 用于错误状态KF的四元数运动学 ”和“ 用于IMU相机校准的基于卡尔曼滤波器的算法 ”(付费壁纸,google-able) 。 I am using the first text because it better describes the structure of the ESKF, and the second because it includes details about the vision measurement model. 我使用的是第一个文本,因为它更好地描述了ESKF的结构,第二个是因为它包含了有关视觉测量模型的详细信息。 In my question I will be using the terminology from the first text: 'nominal state', 'error state' and 'true state'; 在我的问题中,我将使用第一个文本中的术语:'名义状态','错误状态'和'真实状态'; which refer to the IMU integrator, Kalman Filter, and the composition of the two (nominal minus errors). 它指的是IMU积分器,卡尔曼滤波器,以及两者的组成(标称减去误差)。

The diagram below shows the structure of my ESKF implemented in Matlab/Simulink; 下图显示了我在Matlab / Simulink中实现的ESKF的结构; in case you are not familiar with Simulink I will briefly explain the diagram. 如果您不熟悉Simulink,我将简要介绍该图表。 The green section is the Nominal State integrator, the blue section is the ESKF, and the red section is the sum of the nominal and error states. 绿色部分是标称状态积分器,蓝色部分是ESKF,红色部分是标称状态和错误状态的总和。 The 'RT' blocks are 'Rate Transitions' which can be ignored. 'RT'块是'Rate Transitions',可以忽略。

在此输入图像描述

My first question: Is this structure correct? 我的第一个问题: 这个结构是否正确?

My second question: How are the error-state equations for the measurement models derived? 我的第二个问题: 测量模型的误差状态方程是如何导出的? In my case I have tried using the measurement model of the second text, but it did not work. 在我的情况下,我尝试使用第二个文本的测量模型,但它没有用。

Kind Regards, 亲切的问候,

Your block diagram combines two indirect methods for bringing IMU data into a KF: 您的框图结合了两种间接方法,用于将IMU数据导入KF:

  1. You have an external IMU integrator (in green, labelled "INS", sometimes called the mechanization , and described by you as the "nominal state", but I've also seen it called the "reference state"). 你有一个外部IMU集成商(绿色,标记为“INS”,有时称为机械化 ,并被你描述为“名义状态”,但我也看到它称为“参考状态”)。 This method freely integrates the IMU externally to the KF and is usually chosen so you can do this integration at a different (much higher) rate than the KF predict/update step (the indirect form). 这种方法可以自由地将IMU外部集成到KF中,并且通常选择这样,您可以以与KF预测/更新步骤(间接形式)不同(更高)的速率进行此集成。 Historically I think this was popular because the KF is generally the computationally expensive part. 从历史上看,我认为这很受欢迎,因为KF通常是计算上昂贵的部分。
  2. You have also fed your IMU into the KF block as u , which I am assuming is the "command" input to the KF. 还将您的IMU作为u馈送到KF块中,我假设它是KF的“命令”输入。 This is an alternative to the external integrator. 这是外部积分器的替代品 In a direct KF you would treat your IMU data as measurements . 在直接KF中,您可以将IMU数据视为测量值 In order to do that, the IMU would have to model (position, velocity, and) acceleration and (orientation and) angular velocity: Otherwise there is no possible H such that Hx can produce estimated IMU output terms). 为了做到这一点,IMU必须建模(位置,速度和)加速度和(方向和)角速度:否则没有可能的H使得Hx可以产生估计的IMU输出项。 If you instead feed your IMU measurements in as a command, your predict step can simply act as an integrator, so you only have to model as far as velocity and orientation. 如果您将IMU测量值作为命令输入,则预测步骤可以简单地充当积分器,因此您只需要建模速度和方向。

You should pick only one of those options. 您应该只选择其中一个选项。 I think the second one is easier to understand, but it is closer to a direct Kalman filter, and requires you to predict/update for every IMU sample, rather than at the (I assume) slower camera framerate. 我认为第二个更容易理解,但它更接近直接卡尔曼滤波器,并且需要您预测/更新每个IMU样本,而不是(我假设)较慢的相机帧速率。

Regarding measurement equations for version (1), in any KF you can only predict things you can know from your state. 关于版本(1)的测量方程,在任何KF中,您只能预测您可以从您的州知道的事情。 The KF state in this case is a vector of error terms, and thus you can only predict things like "position error". 在这种情况下,KF状态是错误术语的向量,因此您只能预测“位置错误”之类的内容。 As a result you need to pre-condition your measurements in z to be position errors. 因此,您需要将z的测量值预先调整为位置误差。 So make your measurement the difference between your "estimated true state" and your position from "noisy camera observations". 因此,通过“嘈杂的相机观察”,使您的“估计真实状态”与您的位置之间的差异。 This exact idea may be represented by the xHat input to the indirect KF. 这个确切的想法可以通过间接KF的xHat输入来表示。 I don't know anything about the MATLAB/Simulink stuff going on there. 我对那里发生的MATLAB / Simulink事情一无所知。

Regarding real-world considerations for the summing block (in red) I refer you to another answer about indirect Kalman filters . 关于求和块的实际考虑因素(红色),我将向您介绍有关间接卡尔曼滤波器的另一个答案

Q1) Your SIMULINK model looks to be appropriate. Q1)您的SIMULINK模型看起来合适。 Let me shed some light on quaternion mechanization based KF's which I've worked on for navigation applications. 让我阐述一下基于KF的四元数机械化,我曾为导航应用做过工作。

Since Kalman Filter is an elegant mathematical technique which borrows from the science of stochastics and measurement, it can help you reduce the noise from the system without the need for elaborately modeling the noise. 由于卡尔曼滤波器是一种优雅的数学技术,它借鉴了随机和测量的科学,它可以帮助您降低系统噪声,而无需对噪声进行精细建模。

All KF systems start with some preliminary understanding of the model that you want to make free of noise. 所有KF系统都首先要对您想要消除噪音的模型有一些初步的了解。 The measurements are fed back to evolve the states better (the measurement equation Y = CX). 反馈测量值以更好地演变状态(测量方程式Y = CX)。 In your case, the states that you are talking about are errors in quartenions which would be the 4 values, dq1, dq2, dq3, dq4. 在你的情况下,你所谈论的状态是四分之一的误差,即4个值,dq1,dq2,dq3,dq4。

KF working well in your application would accurately determine the attitude/orientation of the device by controlling the error around the quaternion. KF在您的应用程序中运行良好,可以通过控制四元数周围的误差来准确地确定设备的姿态/方向。 The quaternions are spatial orientation of any body, understood using a scalar and a vector, more specifically an angle and an axis. 四元数是任何物体的空间定向,使用标量和矢量,更具体地说是角度和轴来理解。

The error equations that you are talking about are covariances which contribute to Kalman Gain. 你所谈论的误差方程是有助于卡尔曼增益的协方差。 The covariances denote spread around the mean and they are useful in understanding how the central/ average behavior of the system is changing with time. 协方差表示均值周围的扩散,它们有助于理解系统的中心/平均行为如何随时间变化。 Low covariances denote less deviation from the mean behavior for any system. 低协方差表示对任何系统的平均行为的偏差较小。 As KF cycles run the covariances keep getting smaller. 随着KF循环运行,协方差不断变小。

The Kalman Gain is finally used to compensate for the error between the estimates of the measurements and the actual measurements that are coming in from the camera. 卡尔曼增益最终用于补偿测量估计与来自摄像机的实际测量之间的误差。

Again, this elegant technique first ensures that the error in the quaternion values converge around zero. 同样,这种优雅的技术首先确保四元数值中的误差收敛于零。

Q2) EKF is a great technique to use as long as you have a non-linear measurement construction technique. Q2)只要您拥有非线性测量构造技术,EKF就是一种很好的技术。 Be very careful in using EKF if their are too many transformations in your system, ie don't try to reconstruct measurements using transformation on your states, this seriously affects the model sanctity and since noise covariances would not undergo similar transformations, there would be a chance of hitting singularity as soon as matrices are non-invertible. 如果系统中的转换过多,请小心使用EKF,即不要尝试使用状态转换来重建测量,这会严重影响模型的神圣性,并且由于噪声协方差不会经历类似的转换,因此会有一旦矩阵不可逆,就有机会击中奇点。

You could look at constant gain KF schemes, which would save you from covariance propagation and save substantial computation effort and time. 您可以查看恒定增益KF方案,这将使您免于协方差传播并节省大量的计算工作量和时间。 These techniques are quite new and look very promising. 这些技术非常新颖,看起来非常有前景。 They actively absorb P(error covariance), Q(model noise covariance) and R(measurement noise covariance) and work well with EKF schemes. 它们主动吸收P(误差协方差),Q(模型噪声协方差)和R(测量噪声协方差),并与EKF方案一起使用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM