[go: up one dir, main page]

CN107621261B - Adaptive optimal-REQUEST algorithm for inertial-geomagnetic combined attitude calculation - Google Patents

Adaptive optimal-REQUEST algorithm for inertial-geomagnetic combined attitude calculation Download PDF

Info

Publication number
CN107621261B
CN107621261B CN201710804083.3A CN201710804083A CN107621261B CN 107621261 B CN107621261 B CN 107621261B CN 201710804083 A CN201710804083 A CN 201710804083A CN 107621261 B CN107621261 B CN 107621261B
Authority
CN
China
Prior art keywords
attitude
matrix
calculation
calculate
vector
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710804083.3A
Other languages
Chinese (zh)
Other versions
CN107621261A (en
Inventor
戎海龙
彭翠云
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Changzhou University
Original Assignee
Changzhou University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Changzhou University filed Critical Changzhou University
Priority to CN201710804083.3A priority Critical patent/CN107621261B/en
Publication of CN107621261A publication Critical patent/CN107621261A/en
Application granted granted Critical
Publication of CN107621261B publication Critical patent/CN107621261B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Navigation (AREA)
  • Gyroscopes (AREA)

Abstract

本发明提供一种用于惯性‑地磁组合姿态解算的自适应optimal‑REQUEST算法,采用一种自适应调整策略对姿态解算算法的观测矢量的权值进行动态调整,从而使得姿态解算算法在载体静止时主要依靠加速度计和地磁传感器实现姿态解算以提高静态精度,而在载体运动时主要依靠陀螺仪实现姿态解算以提高动态精度。上述自适应调整策略的核心是判断重力加速度矢量和地磁场矢量这两个矢量的观测值的夹角是否在某一个给定值附近,并同时判断重力加速度矢量的观测值的模是否在另一个给定值的附近,如果都在给定值附近则载体处于静止状态,否则载体处于运动状态。上述两个给定值可以简单地通过载体静止时加速度计和地磁传感器的测量值获得。

Figure 201710804083

The invention provides an adaptive optimal-REQUEST algorithm for inertia-geomagnetic combined attitude calculation. An adaptive adjustment strategy is used to dynamically adjust the weight of the observation vector of the attitude calculation algorithm, so that the attitude calculation algorithm can be adjusted dynamically. When the carrier is stationary, it mainly relies on the accelerometer and the geomagnetic sensor to realize the attitude calculation to improve the static accuracy, and when the carrier is moving, it mainly relies on the gyroscope to realize the attitude calculation to improve the dynamic accuracy. The core of the above-mentioned adaptive adjustment strategy is to judge whether the angle between the observed values of the two vectors, the gravitational acceleration vector and the geomagnetic field vector, is near a given value, and at the same time to judge whether the modulus of the observed value of the gravitational acceleration vector is in the other. Near the given value, if all are near the given value, the carrier is in a static state, otherwise the carrier is in a moving state. The above two given values can be obtained simply by the measured values of the accelerometer and the geomagnetic sensor when the carrier is stationary.

Figure 201710804083

Description

用于惯性-地磁组合姿态解算的自适应optimal-REQUEST算法Adaptive optimal-REQUEST algorithm for inertial-geomagnetic combined attitude calculation

技术领域technical field

本发明涉及姿态解算算法技术领域,特别是涉及一种用于惯性-地磁组合姿态解算的自适应optimal-REQUEST算法。The invention relates to the technical field of attitude calculation algorithms, in particular to an adaptive optimal-REQUEST algorithm for inertial-geomagnetic combined attitude calculation.

背景技术Background technique

惯性-地磁测量组合由三轴陀螺仪、三轴加速度计及三轴地磁传感器组成,通过感知角速度矢量、重力加速度矢量及地磁场矢量在载体坐标系三轴向的投影来确定载体坐标系相对于世界坐标系的姿态及其变化。由于这种测量组合不需要任何外部源信息,因而在人体姿态跟踪、机器人、小型无人机等方面获得了广泛应用。用于实现传感器数据融合以确定姿态的解算算法通常为卡尔曼算法(EKF),这种算法的原理为利用欧拉角微分方程或四元数微分方程(由陀螺仪数据获得姿态)构建状态方程,以Gauss-Newton算法、TRIAD算法、QUEST算法或矢量的坐标系变换方程等(由加速度计及地磁传感器数据获得姿态)构建测量方程,最后利用卡尔曼算法(如果采用矢量的坐标系变换方程,则利用扩展卡尔曼算法)进行融合。上述融合带来的好处是:1、状态方程充分利用了姿态的历史测量信息,并发挥了陀螺仪在动态姿态测量方面优于加速度计和地磁传感器组合的性能;2、测量方程依靠每个采样时刻的加速度计和地磁传感器数据获得载体坐标系相对于世界坐标系的姿态,从而可以补偿由于陀螺仪测量误差的积分而出现的姿态发散现象。The inertial-geomagnetic measurement combination is composed of a three-axis gyroscope, a three-axis accelerometer and a three-axis geomagnetic sensor. By sensing the projection of the angular velocity vector, the gravitational acceleration vector, and the geomagnetic field vector on the three axes of the carrier coordinate system, it is determined that the carrier coordinate system is relative to the carrier coordinate system. The pose of the world coordinate system and its changes. Since this measurement combination does not require any external source information, it has been widely used in human body attitude tracking, robots, and small UAVs. The solution algorithm used to fuse sensor data to determine attitude is usually the Kalman algorithm (EKF), which uses Euler angle differential equations or quaternion differential equations (the attitude is obtained from gyroscope data) to construct the state Equation, construct the measurement equation with Gauss-Newton algorithm, TRIAD algorithm, QUEST algorithm or vector coordinate system transformation equation (obtain attitude from accelerometer and geomagnetic sensor data), and finally use Kalman algorithm (if the vector coordinate system transformation equation is used) , the extended Kalman algorithm is used for fusion. The advantages of the above fusion are: 1. The state equation makes full use of the historical measurement information of attitude, and gives play to the performance of the gyroscope in dynamic attitude measurement over the combination of accelerometer and geomagnetic sensor; 2. The measurement equation depends on each sampling The attitude of the carrier coordinate system relative to the world coordinate system is obtained from the accelerometer and geomagnetic sensor data at the moment, so that the attitude divergence phenomenon due to the integration of the gyroscope measurement error can be compensated.

除了卡尔曼算法(EKF)之外,近年来,相关领域的学者已经提出了不少姿态解算算法,并且研究表明,在状态方程或者观测方程具有非常严重的非线性时,这些算法的性能要优于EKF。虽然这些算法都适用于惯性-地磁组合,然而这些算法要么基于统计滤波技术(如粒子滤波(PF)和无迹卡尔曼滤波算法(UKF),要么基于最小二乘技术(如backwards-smoothing EKF,extended QUEST,two-step attitude estimator)等,考虑到计算时间、采样速率以及处理器等问题,EKF仍然是适用于惯性-地磁组合且目前应用最广的姿态解算算法。In addition to the Kalman algorithm (EKF), in recent years, scholars in related fields have proposed a number of attitude solving algorithms, and studies have shown that when the state equation or the observation equation has a very serious nonlinearity, the performance of these algorithms must be better than EKF. Although these algorithms are suitable for inertial-geomagnetic combinations, these algorithms are either based on statistical filtering techniques (such as particle filter (PF) and unscented Kalman filtering algorithm (UKF) or least squares techniques (such as backwards-smoothing EKF, extended QUEST, two-step attitude estimator), etc. Considering the calculation time, sampling rate and processor, EKF is still the most widely used attitude solution algorithm for inertial-geomagnetic combination.

在QUEST算法的基础上发展而来的REQUEST算法以及optimal-REQUEST算法主要应用于航天领域,用于实现卫星等空间飞行器定姿。如果参数设置合理,optimal-REQUEST算法的动静态性能与扩展卡尔曼算法(EKF)相当,但是计算耗时更少,前者的计算耗时大约只有后者的一半,因此,对于只安装有嵌入式处理器的惯性-地磁组合来说,前者无疑是更合适的。The REQUEST algorithm and the optimal-REQUEST algorithm developed on the basis of the QUEST algorithm are mainly used in the aerospace field to achieve attitude determination of space vehicles such as satellites. If the parameters are set reasonably, the dynamic and static performance of the optimal-REQUEST algorithm is comparable to the extended Kalman algorithm (EKF), but the calculation time is less. In terms of the inertial-geomagnetic combination of the processor, the former is undoubtedly more suitable.

发明内容SUMMARY OF THE INVENTION

在载体高速运动情形下,由于加速度计测得的重力加速度信息是相当不准确的,因此姿态解算算法在此情形下应当舍弃加速度计信息,而单独依靠陀螺仪信息实现姿态解算。In the case of the carrier moving at high speed, since the gravitational acceleration information measured by the accelerometer is quite inaccurate, the attitude calculation algorithm should discard the accelerometer information in this case, and rely solely on the gyroscope information to realize the attitude calculation.

目前决定加速度计信息取舍的方法主要有两种,这两种方法均以由加速度输出所构成的三维矢量的模作为评判的依据。第一种方法是带有阈值的离散式方法,该方法不断记录上述矢量模的最近n个采样值,并判断在这n个采样值内是否任意一个采样值大于某个预先设定的阈值,如果结论成立,则完全舍弃加速度计输出信息,否则完全利用加速度计信息。第二种方法是不带有阈值的连续式方法,该方法在载体运动时并不完全舍弃加速度计信息,并且只记录当前时刻的上述矢量的模,其将加速度计信息乘上一个代表其利用率的权值,之后再将上述测量信息用于姿态解算。第一种方法在采样率较低且加速度计的测量噪声较大时判断精度普遍不高,第二种方法在载体线加速度较高时由于加速度计信息舍弃不完全,因而仍会给姿态解算带来较大误差。At present, there are mainly two methods for deciding the choice of accelerometer information, both of which are based on the modulus of the three-dimensional vector formed by the acceleration output. The first method is a discrete method with a threshold. This method continuously records the latest n sampled values of the vector modulus, and judges whether any sampled value in the n sampled values is greater than a preset threshold. If the conclusion is established, the accelerometer output information is completely discarded, otherwise the accelerometer information is completely used. The second method is a continuous method without a threshold. This method does not completely discard the accelerometer information when the carrier is moving, and only records the modulus of the above vector at the current moment, which multiplies the accelerometer information by a value representing its utilization. The weights of the rate, and then the above measurement information is used for attitude calculation. In the first method, the judgment accuracy is generally not high when the sampling rate is low and the measurement noise of the accelerometer is large. In the second method, when the linear acceleration of the carrier is high, the information of the accelerometer is not completely discarded, so the attitude will still be solved. bring larger errors.

本发明采用optimal-REQUEST算法作为姿态解算算法,并且提出一种自适应取舍加速度计信息的方法,进而将该方法与optimal-REQUEST算法进行有机整合,从而提出一种新的适用于惯性-地磁组合的姿态解算算法。The present invention adopts the optimal-REQUEST algorithm as the attitude calculation algorithm, and proposes a method for self-adaptive selection of accelerometer information, and then organically integrates the method with the optimal-REQUEST algorithm, so as to propose a new method suitable for inertia-geomagnetic Combined pose solving algorithm.

本发明采用的技术方案是:一种用于惯性-地磁组合姿态解算的自适应optimal-REQUEST算法,包括陀螺仪、加速度计和地磁传感器,以陀螺仪、加速度计和地磁传感器输出构成的三维观测矢量作为输入变量,并包括以下步骤,The technical scheme adopted in the present invention is: an adaptive optimal-REQUEST algorithm for inertial-geomagnetic combined attitude calculation, including a gyroscope, an accelerometer and a geomagnetic sensor; The observation vector is taken as input variable and consists of the following steps,

步骤一:在每个采样时刻k,计算Step 1: At each sampling time k, calculate

Figure BDA0001402274560000031
Figure BDA0001402274560000031

其中,

Figure BDA0001402274560000032
Figure BDA0001402274560000033
分别为k时刻由加速度计和地磁传感器输出构成的三维观测矢量;||·||表示取模;×表示取向量积;asin()表示取反正弦;
Figure BDA0001402274560000034
代表
Figure BDA0001402274560000035
Figure BDA0001402274560000036
这两个矢量的夹角。在载体静止的情况下,由于不受载体线加速度影响,加速度计将只测得重力加速度,即
Figure BDA00014022745600000312
表示的是重力加速度矢量,又由于重力加速度矢量和地磁场矢量在一定地域内是不变化的,因此其夹角不变,即
Figure BDA0001402274560000037
是一个恒定值,该恒定值现表示为θ(例如在常州地区,θ=47.49°)。在载体运动的情况下,由于加速度计的测量值是重力加速度和载体线加速度的叠加,因此
Figure BDA0001402274560000038
并不表示重力加速度矢量,这就意味着
Figure BDA0001402274560000039
并不等于θ,两者偏离程度越大,表示载体线加速度越大。因此
Figure BDA00014022745600000310
可以作为动态调整optimal-REQUEST算法的观测矢量的权值的一个因子(另一个因子是步骤二表示的
Figure BDA00014022745600000311
),使得optimal-REQUEST算法在载体运动时降低依靠加速度计和地磁传感器的程度从而主要依靠陀螺仪实现姿态解算,进而提高姿态解算精度。可以说本步骤计算
Figure BDA0001402274560000041
的目的是为步骤二进一步计算
Figure BDA0001402274560000042
做准备。in,
Figure BDA0001402274560000032
and
Figure BDA0001402274560000033
are the three-dimensional observation vectors formed by the output of the accelerometer and the geomagnetic sensor at time k, respectively; ||·|| represents the modulo; × represents the orientation vector product; asin() represents the inverse sine;
Figure BDA0001402274560000034
represent
Figure BDA0001402274560000035
and
Figure BDA0001402274560000036
The angle between these two vectors. When the carrier is stationary, since it is not affected by the linear acceleration of the carrier, the accelerometer will only measure the gravitational acceleration, that is,
Figure BDA00014022745600000312
Represents the gravitational acceleration vector, and since the gravitational acceleration vector and the geomagnetic field vector do not change in a certain area, the included angle does not change, that is
Figure BDA0001402274560000037
is a constant value, which is now expressed as θ (eg, in the Changzhou area, θ=47.49°). In the case of carrier motion, since the measurement value of the accelerometer is the superposition of the acceleration of gravity and the linear acceleration of the carrier, so
Figure BDA0001402274560000038
does not represent the gravitational acceleration vector, which means that
Figure BDA0001402274560000039
It is not equal to θ. The greater the degree of deviation between the two, the greater the linear acceleration of the carrier. therefore
Figure BDA00014022745600000310
It can be used as a factor to dynamically adjust the weight of the observation vector of the optimal-REQUEST algorithm (the other factor is expressed in step 2).
Figure BDA00014022745600000311
), so that the optimal-REQUEST algorithm reduces the degree of relying on the accelerometer and the geomagnetic sensor when the carrier is moving, and mainly relies on the gyroscope to achieve attitude calculation, thereby improving the attitude calculation accuracy. It can be said that this step calculates
Figure BDA0001402274560000041
The purpose is to further calculate for step two
Figure BDA0001402274560000042
prepare.

由于加速度计和地磁传感器输出噪声的双重影响,式(1)的计算结果会含有很大的噪声,可采用各种滤波技术对式(1)的计算结果进行去噪。由式(1)得到的

Figure BDA0001402274560000043
在[-π/2,π/2]区间内,须利用
Figure BDA0001402274560000044
的计算结果将式(1)转换至[0,π]区间,以满足本技术方案后续步骤的要求,其中·表示代数积。可以但不建议利用
Figure BDA0001402274560000045
实现
Figure BDA0001402274560000046
的估算,因为此时将无法采用经典的卡尔曼滤波技术实现去噪。Due to the dual influence of the output noise of the accelerometer and the geomagnetic sensor, the calculation result of formula (1) will contain a lot of noise, and various filtering techniques can be used to de-noise the calculation result of formula (1). obtained from formula (1)
Figure BDA0001402274560000043
In the interval [-π/2,π/2], use
Figure BDA0001402274560000044
The calculation result of , converts the formula (1) into the [0, π] interval to meet the requirements of the subsequent steps of this technical solution, where · represents the algebraic product. Possible but not recommended
Figure BDA0001402274560000045
accomplish
Figure BDA0001402274560000046
, because the classical Kalman filtering technique cannot be used for denoising at this time.

步骤二:计算Step 2: Calculate

Figure BDA0001402274560000047
Figure BDA0001402274560000047

其中,abs(·)表示取绝对值,g为当地重力加速度矢量;把

Figure BDA0001402274560000048
作为动态调整optimal-REQUEST算法的观测矢量的权值的另一个因子的原因同
Figure BDA0001402274560000049
类似。α1和α2为比例因子,下面分析这两个比例因子的取值范围。首先分析α1的取值范围,由于
Figure BDA00014022745600000410
因此应取α1>1,以保证只要
Figure BDA00014022745600000411
稍微偏离θ,
Figure BDA00014022745600000412
就能够快速衰减至0,至于为何需要该值衰减至0,请见步骤三的解释。Among them, abs( ) means taking the absolute value, and g is the local gravitational acceleration vector;
Figure BDA0001402274560000048
As another factor for dynamically adjusting the weight of the observation vector of the optimal-REQUEST algorithm, the reason is the same
Figure BDA0001402274560000049
similar. α 1 and α 2 are scale factors, and the value ranges of these two scale factors are analyzed below. First analyze the value range of α 1 , because
Figure BDA00014022745600000410
Therefore, α 1 > 1 should be taken to ensure that as long as
Figure BDA00014022745600000411
slightly off θ,
Figure BDA00014022745600000412
It can quickly decay to 0. As for why this value needs to decay to 0, please see the explanation in step 3.

下面分析α2的取值范围。不失一般性,设无噪声影响的由加速度计输出构成的三维矢量为

Figure BDA00014022745600000413
The value range of α 2 is analyzed below. Without loss of generality, let the three-dimensional vector composed of the output of the accelerometer without the influence of noise be
Figure BDA00014022745600000413

施加噪声后为:

Figure BDA00014022745600000414
其中
Figure BDA00014022745600000415
为白噪声,且方差相同。由于After applying noise:
Figure BDA00014022745600000414
in
Figure BDA00014022745600000415
is white noise with the same variance. because

Figure BDA00014022745600000416
Figure BDA00014022745600000416

but

Figure BDA00014022745600000417
Figure BDA00014022745600000417

因此therefore

Figure BDA0001402274560000051
Figure BDA0001402274560000051

其中D()表示取方差。由式(5)可以看出,需要取0<α2≤1/3,使得加速度矢量测量噪声的存在对preg造成影响较小。where D() represents the variance. It can be seen from formula (5) that 0<α 2 ≤1/3 needs to be taken, so that the existence of the acceleration vector measurement noise has less influence on pre g .

需要指出的是,由于It should be pointed out that since

Figure BDA0001402274560000052
Figure BDA0001402274560000052

其中acos()表示取反余弦,因此由式(6)得到where acos() represents the inverse cosine, so it is obtained from equation (6)

Figure BDA0001402274560000053
Figure BDA0001402274560000053

从式(7)可以看出,

Figure BDA0001402274560000054
噪声较大,加之α1>1,因此测量噪声的存在肯定会使preg产生较大波动。步骤二已经指出,必须利用各种滤波技术实现对
Figure BDA0001402274560000055
的去噪。From equation (7), it can be seen that,
Figure BDA0001402274560000054
The noise is relatively large, and α 1 >1, so the existence of measurement noise will definitely make pre g fluctuate greatly. Step 2 has already pointed out that various filtering techniques must be used to achieve
Figure BDA0001402274560000055
denoising.

本发明对上述两个比例因子的推荐值是α1=100/π、α2=0.01。The recommended values of the present invention for the above two scale factors are α 1 =100/π, α 2 =0.01.

本步骤计算出的

Figure BDA0001402274560000056
并不直接用于调整optimal-REQUEST算法的观测矢量的权值,还需要下面的步骤三的进一步转化。Calculated in this step
Figure BDA0001402274560000056
It is not directly used to adjust the weight of the observation vector of the optimal-REQUEST algorithm, and further transformation in the following step 3 is required.

步骤三:计算Step 3: Calculate

Figure BDA0001402274560000057
Figure BDA0001402274560000057

由步骤二可以看出,

Figure BDA0001402274560000058
的取值范围为
Figure BDA0001402274560000059
因此
Figure BDA00014022745600000510
并不能直接用于调整optimal-REQUEST算法的观测矢量的权值。式(8)的目的是将
Figure BDA00014022745600000511
取值范围单调地转化为[0,1]区间。所得到的
Figure BDA00014022745600000512
将用于步骤四的optimal-REQUEST算法的的观测矢量的权值的调整。由式(8)可以看出,只要α1和α2取得合适的值,那么一旦
Figure BDA00014022745600000513
稍微偏离θ或者
Figure BDA00014022745600000514
稍微增大而导致
Figure BDA00014022745600000515
稍微增大,
Figure BDA00014022745600000516
就会立刻衰减至0,这一结果正是我们想要的,因为它可以使得optimal-REQUEST算法在载体运动时主要依靠陀螺仪实现姿态解算,从而提高姿态解算精度。As can be seen from step 2,
Figure BDA0001402274560000058
The value range of is
Figure BDA0001402274560000059
therefore
Figure BDA00014022745600000510
It cannot be directly used to adjust the weights of the observation vector of the optimal-REQUEST algorithm. The purpose of formula (8) is to convert
Figure BDA00014022745600000511
The range of values is monotonically converted to the interval [0,1]. obtained
Figure BDA00014022745600000512
It will be used for the adjustment of the weights of the observation vector of the optimal-REQUEST algorithm in step 4. It can be seen from formula (8) that as long as α 1 and α 2 obtain appropriate values, once
Figure BDA00014022745600000513
slightly off theta or
Figure BDA00014022745600000514
slightly increased due to
Figure BDA00014022745600000515
slightly increased,
Figure BDA00014022745600000516
It will immediately decay to 0, which is exactly what we want, because it can make the optimal-REQUEST algorithm mainly rely on the gyroscope to achieve attitude calculation when the carrier is moving, thereby improving the attitude calculation accuracy.

步骤四:根据步骤三得到的

Figure BDA0001402274560000061
计算姿态的“新息”δKk,即式(9)所示的4×4维矩阵Step 4: Obtained according to Step 3
Figure BDA0001402274560000061
Calculate the "innovation" δK k of the attitude, that is, the 4×4-dimensional matrix shown in equation (9)

Figure BDA0001402274560000062
Figure BDA0001402274560000062

计算矩阵δKk的流程是,(1)计算

Figure BDA0001402274560000063
该数值表示optimal-REQUEST算法赋予所有观测向量的权值的和,为一个标量;(2)根据
Figure BDA0001402274560000064
和由步骤(1)计算出的δmk计算
Figure BDA0001402274560000065
该数值为一个标量,没有物理意义;(3)根据
Figure BDA0001402274560000066
和由步骤(1)计算出的δmk计算
Figure BDA0001402274560000067
该数值为一个3×3维的矩阵,没有物理意义;(4)根据步骤(3)计算出的矩阵B计算S=B+BT,该数值仍为一个3×3维的矩阵,没有物理意义;(5)根据
Figure BDA0001402274560000068
和由步骤(1)计算出的δmk计算
Figure BDA0001402274560000069
该数值为一个3×1维的向量,没有物理意义;(6)根据步骤(1)-(5)的计算结果,按照式(9)构成矩阵δKk。需要注意的是
Figure BDA00014022745600000610
Figure BDA00014022745600000611
分别为同一观测矢量在载体坐标系和世界坐标系下的表示。一共有两个观测矢量,即
Figure BDA00014022745600000612
Figure BDA00014022745600000613
举个例子,由加速度计输出构成的三维矢量为
Figure BDA00014022745600000614
那么该向量在载体坐标系下的表示即为
Figure BDA00014022745600000615
而该矢量在世界坐标系下的表示则为
Figure BDA00014022745600000616
而如果将上述三维矢量换成
Figure BDA00014022745600000617
(由地磁传感器输出构成),则该三维矢量在载体坐标系和世界坐标系下的表示则分别为
Figure BDA00014022745600000618
Figure BDA00014022745600000619
式(9)中的I表示为3×3维的单位矩阵。The process of calculating the matrix δK k is, (1) calculate
Figure BDA0001402274560000063
This value represents the sum of the weights assigned to all observation vectors by the optimal-REQUEST algorithm, which is a scalar; (2) According to
Figure BDA0001402274560000064
and δm k calculated by step (1)
Figure BDA0001402274560000065
The value is a scalar and has no physical meaning; (3) According to
Figure BDA0001402274560000066
and δm k calculated by step (1)
Figure BDA0001402274560000067
The value is a 3×3-dimensional matrix, which has no physical meaning; (4) Calculate S=B+ BT according to the matrix B calculated in step (3), and the value is still a 3×3-dimensional matrix without physical meaning. meaning; (5) according to
Figure BDA0001402274560000068
and δm k calculated by step (1)
Figure BDA0001402274560000069
The value is a 3×1-dimensional vector, which has no physical meaning; (6) According to the calculation results of steps (1)-(5), a matrix δK k is formed according to formula (9). have to be aware of is
Figure BDA00014022745600000610
and
Figure BDA00014022745600000611
are the representations of the same observation vector in the carrier coordinate system and the world coordinate system, respectively. There are two observation vectors in total, namely
Figure BDA00014022745600000612
and
Figure BDA00014022745600000613
For example, the three-dimensional vector formed by the output of the accelerometer is
Figure BDA00014022745600000614
Then the representation of the vector in the carrier coordinate system is
Figure BDA00014022745600000615
And the representation of the vector in the world coordinate system is
Figure BDA00014022745600000616
And if the above three-dimensional vector is replaced by
Figure BDA00014022745600000617
(composed of the output of the geomagnetic sensor), then the representation of the three-dimensional vector in the carrier coordinate system and the world coordinate system is respectively
Figure BDA00014022745600000618
and
Figure BDA00014022745600000619
I in Equation (9) is represented as a 3×3-dimensional identity matrix.

式(9)意味着,赋予optimal-REQUEST算法的每个观测矢量的权值均为式(8)表示的

Figure BDA00014022745600000620
因此一旦载体存在运动,那么
Figure BDA00014022745600000621
立即衰减至0,从而使得optimal-REQUEST算法不再依靠观测矢量实现姿态解算,而主要依靠陀螺仪的输出来完成,从而提高姿态解算精度。Equation (9) means that the weight of each observation vector assigned to the optimal-REQUEST algorithm is expressed by Equation (8).
Figure BDA00014022745600000620
So once the carrier has motion, then
Figure BDA00014022745600000621
Immediately attenuates to 0, so that the optimal-REQUEST algorithm no longer relies on the observation vector to achieve attitude calculation, but mainly relies on the output of the gyroscope to complete the attitude calculation accuracy.

矩阵δKk表示的是用于姿态解算的“新息”,用于实现姿态“预测”的修正,只要不是初始时刻,不直接用于姿态解算。The matrix δK k represents the "innovation" used for attitude calculation, which is used to realize the correction of attitude "prediction". As long as it is not the initial moment, it is not directly used for attitude calculation.

步骤五:计算姿态的“预测”Kk/k-1Step 5: Calculate the "predicted" K k/k-1 of the pose,

如果k=0,即初始计算时刻,由于没有姿态的“预测”,则令Kk/k=δKk,mk=δmk,Pk/k=Rk,其中Rk为观测噪声协方差阵,然后直接跳至步骤七,利用4×4维矩阵Kk/k实现姿态解算。mk为累加权值和,表示自时刻起,将每个时刻的δmk进行累加,一直到当前时刻。Pk/k表示姿态验后估计的估计误差的协方差矩阵。mk和Pk/k全部用于步骤六的计算。If k=0, that is, at the initial calculation moment, since there is no "prediction" of attitude, then let K k/k =δK k , m k =δm k , P k/k =R k , where R k is the observation noise covariance Then jump directly to step 7, and use the 4×4-dimensional matrix K k/k to realize the attitude calculation. m k is the sum of the accumulated weights, which means that from the moment, the δm k of each moment is accumulated until the current moment. P k/k represents the covariance matrix of the estimation error of the posterior estimation of the pose. Both m k and P k/k are used in the calculation of step six.

如果k≠0,则利用上一时刻的姿态验后估计误差的协方差矩阵Kk-1/k-1根据式(10)计算姿态的“预测”,即4×4维的Kk/k-1矩阵,If k≠0, use the covariance matrix K k-1/k-1 of the posterior estimation error of the attitude at the previous moment to calculate the "prediction" of the attitude according to equation (10), that is, the 4 × 4-dimensional K k/k -1 matrix,

Figure BDA0001402274560000071
Figure BDA0001402274560000071

然后利用式(11)计算姿态“预测”,即姿态先验估计的估计误差的协方差矩阵Pk/k-1Then use equation (11) to calculate the attitude "prediction", that is, the covariance matrix P k/k-1 of the estimation error of the attitude prior estimation,

Figure BDA0001402274560000072
Figure BDA0001402274560000072

其中,Qk-1为过程噪声协方差阵;Φk-1为状态转移阵,且Φk-1=exp(Ωk-1Δt),Ωk-1为反对称阵,且反对称阵Ωk-1定义为:Among them, Q k-1 is the process noise covariance matrix; Φ k-1 is the state transition matrix, and Φ k-1 =exp(Ω k-1 Δt), Ω k-1 is an antisymmetric matrix, and the antisymmetric matrix Ω k-1 is defined as:

Figure BDA0001402274560000073
Figure BDA0001402274560000073

其中,ωk-1为由陀螺仪输出构成的三维矢量;Among them, ω k-1 is a three-dimensional vector formed by the output of the gyroscope;

本步骤已经获得了姿态的“预测”Kk/k-1,而上一个步骤也已经获得了姿态的“新息”δKk,下一步骤将利用姿态的“新息”实现对姿态“预测”的修正,即得到Kk/kIn this step, the "prediction" K k/k-1 of the attitude has been obtained, and the "innovation" δK k of the attitude has also been obtained in the previous step, and the next step will use the "innovation" of the attitude to realize the "prediction" of the attitude ” to get K k/k .

步骤六:首先利用上一时刻的累加权值和mk-1、步骤四得到的权值和δmk和步骤五得到的姿态先验估计误差的协方差矩阵Pk/k-1计算加权因子ρkStep 6: First use the accumulated weight sum m k-1 at the previous moment, the weight sum δm k obtained in step 4, and the covariance matrix P k/k-1 of the attitude prior estimation error obtained in step 5 to calculate the weighting factor ρ k ,

Figure BDA0001402274560000081
Figure BDA0001402274560000081

然后利用上一时刻的累加权值和mk-1和步骤四得到的权值和δmk计算当前时刻的累加权值和mkThen use the accumulated weight sum m k-1 at the previous moment and the weight sum δm k obtained in step 4 to calculate the accumulated weight sum m k at the current moment,

mk=(1-ρk)mk-1kδmk (14)m k =(1-ρ k )m k-1k δm k (14)

有了当前时刻的累加权值和mk和加权因子ρk,就可以实现对姿态的修正,即得到矩阵Kk/kWith the accumulated weight value and m k and weighting factor ρ k of the current moment, the attitude correction can be realized, that is, the matrix K k/k is obtained,

Figure BDA0001402274560000082
Figure BDA0001402274560000082

最后计算当前时刻的姿态验后估计误差的协方差矩阵Pk/kFinally, the covariance matrix P k/k of the posterior estimation error of the attitude at the current moment is calculated,

Figure BDA0001402274560000083
Figure BDA0001402274560000083

Pk/k和mk将会被保存,以便于进行下一轮的计算,因为下一时刻到来时将会重复上述步骤,而步骤五和步骤六将会用到这两个量。P k/k and m k will be saved for the next round of calculation, because the above steps will be repeated when the next time comes, and these two quantities will be used in steps 5 and 6.

获得Kk/k矩阵后,下面一个步骤将会根据该矩阵计算当前时刻的姿态。After obtaining the K k/k matrix, the next step will calculate the pose at the current moment based on the matrix.

步骤七:计算与矩阵Kk/k的最大特征值相对应的归一化的特征向量,该特征向量为该计算时刻以四元数表示的姿态qk至此当前时刻k的姿态计算结束。返回至步骤一,继续进行下一时刻的姿态计算过程,直至在某个时刻停止姿态计算。Step 7: Calculate the normalized eigenvector corresponding to the maximum eigenvalue of the matrix K k/k , where the eigenvector is the attitude q k represented by the quaternion at the calculation moment. At this point, the calculation of the attitude at the current moment k is completed. Returning to step 1, the attitude calculation process at the next moment is continued until the attitude calculation is stopped at a certain moment.

本发明的有益效果是:本发明提供的一种用于惯性-地磁组合姿态解算的自适应optimal-REQUEST算法,能够使得optimal-REQUEST算法在载体运动时降低依靠加速度计和地磁传感器的程度从而主要依靠陀螺仪实现姿态解算,而在载体静止时又能主要依靠加速度计和地磁传感器实现姿态解算(因为此时这两种传感器对重力加速度矢量和地磁场矢量的测量精度很高),从而提高optimal-REQUEST算法的静动态性能。The beneficial effects of the present invention are: an adaptive optimal-REQUEST algorithm for inertial-geomagnetic combined attitude calculation provided by the present invention can make the optimal-REQUEST algorithm reduce the degree of relying on the accelerometer and the geomagnetic sensor when the carrier moves, thereby reducing the It mainly relies on the gyroscope to realize the attitude calculation, and when the carrier is stationary, it can mainly rely on the accelerometer and the geomagnetic sensor to realize the attitude calculation (because these two sensors have high measurement accuracy for the gravitational acceleration vector and the geomagnetic field vector), Thereby improving the static and dynamic performance of the optimal-REQUEST algorithm.

附图说明Description of drawings

下面结合附图和实施例对本发明作进一步说明。The present invention will be further described below with reference to the accompanying drawings and embodiments.

图1是本发明最佳实施例的示意图。Figure 1 is a schematic diagram of a preferred embodiment of the present invention.

具体实施方式Detailed ways

现在结合附图对本发明作详细的说明。此图为简化的示意图,仅以示意方式说明本发明的基本结构,因此其仅显示与本发明有关的构成。The present invention will now be described in detail with reference to the accompanying drawings. This figure is a simplified schematic diagram, and only illustrates the basic structure of the present invention in a schematic manner, so it only shows the structure related to the present invention.

如图1所示,本发明的一种用于惯性-地磁组合姿态解算的自适应optimal-REQUEST算法,包括陀螺仪、加速度计和地磁传感器,以陀螺仪、加速度计和地磁传感器输出构成的三维观测矢量作为输入变量,并包括以下步骤,As shown in FIG. 1, an adaptive optimal-REQUEST algorithm for inertial-geomagnetic combined attitude calculation of the present invention includes a gyroscope, an accelerometer and a geomagnetic sensor, and is composed of the outputs of the gyroscope, the accelerometer and the geomagnetic sensor. The 3D observation vector is used as input variable and consists of the following steps,

步骤一:在每个采样时刻k,计算Step 1: At each sampling time k, calculate

Figure BDA0001402274560000091
Figure BDA0001402274560000091

其中,

Figure BDA0001402274560000092
Figure BDA0001402274560000093
分别为k时刻由加速度计和地磁传感器输出构成的三维观测矢量;||·||表示取模;×表示取向量积;asin()表示取反正弦;
Figure BDA0001402274560000094
代表
Figure BDA0001402274560000095
Figure BDA0001402274560000096
这两个矢量的夹角。在载体静止的情况下,由于不受载体线加速度影响,加速度计将只测得重力加速度,即
Figure BDA0001402274560000097
表示的是重力加速度矢量,又由于重力加速度矢量和地磁场矢量在一定地域内是不变化的,因此其夹角不变,即
Figure BDA0001402274560000098
是一个恒定值,该恒定值现表示为θ(例如在常州地区,θ=47.49°)。在载体运动的情况下,由于加速度计的测量值是重力加速度和载体线加速度的叠加,因此
Figure BDA0001402274560000099
并不表示重力加速度矢量,这就意味着
Figure BDA0001402274560000101
并不等于θ,两者偏离程度越大,表示载体线加速度越大。因此
Figure BDA0001402274560000102
可以作为动态调整optimal-REQUEST算法的观测矢量的权值的一个因子(另一个因子是步骤二表示的
Figure BDA0001402274560000103
),使得optimal-REQUEST算法在载体运动时降低依靠加速度计和地磁传感器的程度从而主要依靠陀螺仪实现姿态解算,进而提高姿态解算精度。可以说本步骤计算
Figure BDA0001402274560000104
的目的是为步骤二进一步计算
Figure BDA0001402274560000105
做准备。in,
Figure BDA0001402274560000092
and
Figure BDA0001402274560000093
are the three-dimensional observation vectors formed by the output of the accelerometer and the geomagnetic sensor at time k, respectively; ||·|| represents the modulo; × represents the orientation vector product; asin() represents the inverse sine;
Figure BDA0001402274560000094
represent
Figure BDA0001402274560000095
and
Figure BDA0001402274560000096
The angle between these two vectors. When the carrier is stationary, since it is not affected by the linear acceleration of the carrier, the accelerometer will only measure the gravitational acceleration, that is,
Figure BDA0001402274560000097
Represents the gravitational acceleration vector, and since the gravitational acceleration vector and the geomagnetic field vector do not change in a certain area, the included angle does not change, that is
Figure BDA0001402274560000098
is a constant value, which is now expressed as θ (eg, in the Changzhou area, θ=47.49°). In the case of carrier motion, since the measurement value of the accelerometer is the superposition of the acceleration of gravity and the linear acceleration of the carrier, so
Figure BDA0001402274560000099
does not represent the gravitational acceleration vector, which means that
Figure BDA0001402274560000101
It is not equal to θ. The greater the degree of deviation between the two, the greater the linear acceleration of the carrier. therefore
Figure BDA0001402274560000102
It can be used as a factor to dynamically adjust the weight of the observation vector of the optimal-REQUEST algorithm (the other factor is expressed in step 2).
Figure BDA0001402274560000103
), so that the optimal-REQUEST algorithm reduces the degree of relying on the accelerometer and the geomagnetic sensor when the carrier is moving, and mainly relies on the gyroscope to achieve attitude calculation, thereby improving the attitude calculation accuracy. It can be said that this step calculates
Figure BDA0001402274560000104
The purpose is to further calculate for step two
Figure BDA0001402274560000105
prepare.

由于加速度计和地磁传感器输出噪声的双重影响,式(1)的计算结果会含有很大的噪声,可采用各种滤波技术对式(1)的计算结果进行去噪。由式(1)得到的

Figure BDA0001402274560000106
在[-π/2,π/2]区间内,须利用
Figure BDA0001402274560000107
的计算结果将式(1)转换至[0,π]区间,以满足本技术方案后续步骤的要求,其中·表示代数积。可以但不建议利用
Figure BDA0001402274560000108
实现
Figure BDA0001402274560000109
的估算,因为此时将无法采用经典的卡尔曼滤波技术实现去噪。Due to the dual influence of the output noise of the accelerometer and the geomagnetic sensor, the calculation result of formula (1) will contain a lot of noise, and various filtering techniques can be used to de-noise the calculation result of formula (1). obtained from formula (1)
Figure BDA0001402274560000106
In the interval [-π/2,π/2], use
Figure BDA0001402274560000107
The calculation result of , converts the formula (1) into the [0, π] interval to meet the requirements of the subsequent steps of this technical solution, where · represents the algebraic product. Possible but not recommended
Figure BDA0001402274560000108
accomplish
Figure BDA0001402274560000109
, because the classical Kalman filtering technique cannot be used for denoising at this time.

步骤二:计算Step 2: Calculate

Figure BDA00014022745600001010
Figure BDA00014022745600001010

其中,abs(·)表示取绝对值,g为当地重力加速度矢量;把

Figure BDA00014022745600001011
作为动态调整optimal-REQUEST算法的观测矢量的权值的另一个因子的原因同
Figure BDA00014022745600001012
类似。α1和α2为比例因子,下面分析这两个比例因子的取值范围。首先分析α1的取值范围,由于
Figure BDA00014022745600001013
因此应取α1>1,以保证只要
Figure BDA00014022745600001014
稍微偏离θ,
Figure BDA00014022745600001015
就能够快速衰减至0,至于为何需要该值衰减至0,请见步骤三的解释。Among them, abs( ) means taking the absolute value, and g is the local gravitational acceleration vector;
Figure BDA00014022745600001011
As another factor for dynamically adjusting the weight of the observation vector of the optimal-REQUEST algorithm, the reason is the same
Figure BDA00014022745600001012
similar. α 1 and α 2 are scale factors, and the value ranges of these two scale factors are analyzed below. First analyze the value range of α 1 , because
Figure BDA00014022745600001013
Therefore, α 1 > 1 should be taken to ensure that as long as
Figure BDA00014022745600001014
slightly off θ,
Figure BDA00014022745600001015
It can quickly decay to 0. As for why this value needs to decay to 0, please see the explanation in step 3.

下面分析α2的取值范围。不失一般性,设无噪声影响的由加速度计输出构成的三维矢量为

Figure BDA00014022745600001016
The value range of α 2 is analyzed below. Without loss of generality, let the three-dimensional vector composed of the output of the accelerometer without the influence of noise be
Figure BDA00014022745600001016

施加噪声后为:

Figure BDA00014022745600001017
其中
Figure BDA00014022745600001018
为白噪声,且方差相同。由于After applying noise:
Figure BDA00014022745600001017
in
Figure BDA00014022745600001018
is white noise with the same variance. because

Figure BDA0001402274560000111
Figure BDA0001402274560000111

but

Figure BDA0001402274560000112
Figure BDA0001402274560000112

因此therefore

Figure BDA0001402274560000113
Figure BDA0001402274560000113

其中D()表示取方差。由式(5)可以看出,需要取0<α2≤1/3,使得加速度矢量测量噪声的存在对preg造成影响较小。where D() represents the variance. It can be seen from formula (5) that 0<α 2 ≤1/3 needs to be taken, so that the existence of the acceleration vector measurement noise has less influence on pre g .

需要指出的是,由于It should be pointed out that since

Figure BDA0001402274560000114
Figure BDA0001402274560000114

其中acos()表示取反余弦,因此由式(6)得到where acos() represents the inverse cosine, so it is obtained from equation (6)

Figure BDA0001402274560000115
Figure BDA0001402274560000115

从式(7)可以看出,

Figure BDA0001402274560000116
噪声较大,加之α1>1,因此测量噪声的存在肯定会使preg产生较大波动。步骤二已经指出,必须利用各种滤波技术实现对
Figure BDA0001402274560000117
的去噪。From equation (7), it can be seen that,
Figure BDA0001402274560000116
The noise is relatively large, and α 1 >1, so the existence of measurement noise will definitely make pre g fluctuate greatly. Step 2 has already pointed out that various filtering techniques must be used to achieve
Figure BDA0001402274560000117
denoising.

本发明对上述两个比例因子的推荐值是α1=100/π、α2=0.01。The recommended values of the present invention for the above two scale factors are α 1 =100/π, α 2 =0.01.

本步骤计算出的

Figure BDA0001402274560000118
并不直接用于调整optimal-REQUEST算法的观测矢量的权值,还需要下面的步骤三的进一步转化。Calculated in this step
Figure BDA0001402274560000118
It is not directly used to adjust the weight of the observation vector of the optimal-REQUEST algorithm, and further transformation in the following step 3 is required.

步骤三:计算Step 3: Calculate

Figure BDA0001402274560000119
Figure BDA0001402274560000119

由步骤二可以看出,

Figure BDA00014022745600001110
的取值范围为
Figure BDA00014022745600001111
因此
Figure BDA00014022745600001112
并不能直接用于调整optimal-REQUEST算法的观测矢量的权值。式(8)的目的是将
Figure BDA00014022745600001113
取值范围单调地转化为[0,1]区间。所得到的
Figure BDA0001402274560000121
将用于步骤四的optimal-REQUEST算法的的观测矢量的权值的调整。由式(8)可以看出,只要α1和α2取得合适的值,那么一旦
Figure BDA0001402274560000122
稍微偏离θ或者
Figure BDA0001402274560000123
稍微增大而导致
Figure BDA0001402274560000124
稍微增大,
Figure BDA0001402274560000125
就会立刻衰减至0,这一结果正是我们想要的,因为它可以使得optimal-REQUEST算法在载体运动时主要依靠陀螺仪实现姿态解算,从而提高姿态解算精度。As can be seen from step 2,
Figure BDA00014022745600001110
The value range of is
Figure BDA00014022745600001111
therefore
Figure BDA00014022745600001112
It cannot be directly used to adjust the weights of the observation vector of the optimal-REQUEST algorithm. The purpose of formula (8) is to convert
Figure BDA00014022745600001113
The range of values is monotonically converted to the interval [0,1]. obtained
Figure BDA0001402274560000121
It will be used for the adjustment of the weights of the observation vector of the optimal-REQUEST algorithm in step 4. It can be seen from formula (8) that as long as α 1 and α 2 obtain appropriate values, once
Figure BDA0001402274560000122
slightly off theta or
Figure BDA0001402274560000123
slightly increased due to
Figure BDA0001402274560000124
slightly increased,
Figure BDA0001402274560000125
It will immediately decay to 0, which is exactly what we want, because it can make the optimal-REQUEST algorithm mainly rely on the gyroscope to achieve attitude calculation when the carrier is moving, thereby improving the attitude calculation accuracy.

步骤四:根据步骤三得到的

Figure BDA0001402274560000126
计算式(9)所示的4×4维矩阵Step 4: Obtained according to Step 3
Figure BDA0001402274560000126
Calculate the 4×4-dimensional matrix shown in equation (9)

Figure BDA0001402274560000127
Figure BDA0001402274560000127

计算矩阵δKk的流程是,(1)计算

Figure BDA0001402274560000128
该数值表示optimal-REQUEST算法赋予所有观测向量的权值的和,为一个标量;(2)根据
Figure BDA0001402274560000129
和由步骤(1)计算出的δmk计算
Figure BDA00014022745600001210
该数值为一个标量,没有物理意义;(3)根据
Figure BDA00014022745600001211
和由步骤(1)计算出的δmk计算
Figure BDA00014022745600001212
该数值为一个3×3维的矩阵,没有物理意义;(4)根据步骤(3)计算出的矩阵B计算S=B+BT,该数值仍为一个3×3维的矩阵,没有物理意义;(5)根据
Figure BDA00014022745600001213
和由步骤(1)计算出的δmk计算
Figure BDA00014022745600001214
该数值为一个3×1维的向量,没有物理意义;(6)根据步骤(1)-(5)的计算结果,按照式(9)构成矩阵δKk。需要注意的是
Figure BDA00014022745600001215
Figure BDA00014022745600001216
分别为同一观测矢量在载体坐标系和世界坐标系下的表示。一共有两个观测矢量,即
Figure BDA00014022745600001217
Figure BDA00014022745600001218
举个例子,由加速度计输出构成的三维矢量为
Figure BDA00014022745600001219
那么该向量在载体坐标系下的表示即为
Figure BDA00014022745600001220
而该矢量在世界坐标系下的表示则为
Figure BDA00014022745600001221
而如果将上述三维矢量换成
Figure BDA00014022745600001222
(由地磁传感器输出构成),则该三维矢量在载体坐标系和世界坐标系下的表示则分别为
Figure BDA00014022745600001223
Figure BDA00014022745600001224
式(9)中的I表示为3×3维的单位矩阵。The process of calculating the matrix δK k is, (1) calculate
Figure BDA0001402274560000128
This value represents the sum of the weights assigned to all observation vectors by the optimal-REQUEST algorithm, which is a scalar; (2) According to
Figure BDA0001402274560000129
and δm k calculated by step (1)
Figure BDA00014022745600001210
The value is a scalar and has no physical meaning; (3) According to
Figure BDA00014022745600001211
and δm k calculated by step (1)
Figure BDA00014022745600001212
The value is a 3×3-dimensional matrix, which has no physical meaning; (4) Calculate S=B+ BT according to the matrix B calculated in step (3), and the value is still a 3×3-dimensional matrix without physical meaning. meaning; (5) according to
Figure BDA00014022745600001213
and δm k calculated by step (1)
Figure BDA00014022745600001214
The value is a 3×1-dimensional vector, which has no physical meaning; (6) According to the calculation results of steps (1)-(5), a matrix δK k is formed according to formula (9). have to be aware of is
Figure BDA00014022745600001215
and
Figure BDA00014022745600001216
are the representations of the same observation vector in the carrier coordinate system and the world coordinate system, respectively. There are two observation vectors in total, namely
Figure BDA00014022745600001217
and
Figure BDA00014022745600001218
For example, the three-dimensional vector formed by the output of the accelerometer is
Figure BDA00014022745600001219
Then the representation of the vector in the carrier coordinate system is
Figure BDA00014022745600001220
And the representation of the vector in the world coordinate system is
Figure BDA00014022745600001221
And if the above three-dimensional vector is replaced by
Figure BDA00014022745600001222
(composed of the output of the geomagnetic sensor), then the representation of the three-dimensional vector in the carrier coordinate system and the world coordinate system is respectively
Figure BDA00014022745600001223
and
Figure BDA00014022745600001224
I in Equation (9) is represented as a 3×3-dimensional identity matrix.

式(9)意味着,赋予optimal-REQUEST算法的每个观测矢量的权值均为式(8)表示的

Figure BDA0001402274560000131
因此一旦载体存在运动,那么
Figure BDA0001402274560000132
立即衰减至0,从而使得optimal-REQUEST算法不再依靠观测矢量实现姿态解算,而主要依靠陀螺仪的输出来完成,从而提高姿态解算精度。Equation (9) means that the weight of each observation vector assigned to the optimal-REQUEST algorithm is expressed by Equation (8).
Figure BDA0001402274560000131
So once the carrier has motion, then
Figure BDA0001402274560000132
Immediately attenuates to 0, so that the optimal-REQUEST algorithm no longer relies on the observation vector to achieve attitude calculation, but mainly relies on the output of the gyroscope to complete the attitude calculation accuracy.

矩阵δKk表示的是用于姿态解算的“新息”,用于实现姿态“预测”的修正,只要不是初始时刻,不直接用于姿态解算。如果k=0,即初始计算时刻,由于没有姿态的“预测”,则令Kk/k=δKk,mk=δmk,Pk/k=Rk,其中Rk为观测噪声协方差阵,然后直接跳至步骤七,利用4×4维矩阵Kk/k实现姿态解算。mk为累加权值和,表示自时刻起,将每个时刻的δmk进行累加,一直到当前时刻。Pk/k表示姿态验后估计的估计误差的协方差矩阵。mk和Pk/k全部用于步骤六的计算。The matrix δK k represents the "innovation" used for attitude calculation, which is used to realize the correction of attitude "prediction". As long as it is not the initial moment, it is not directly used for attitude calculation. If k=0, that is, at the initial calculation moment, since there is no "prediction" of attitude, then let K k/k =δK k , m k =δm k , P k/k =R k , where R k is the observation noise covariance Then jump directly to step 7, and use the 4×4-dimensional matrix K k/k to realize the attitude calculation. m k is the sum of the accumulated weights, which means that from the moment, the δm k of each moment is accumulated until the current moment. P k/k represents the covariance matrix of the estimation error of the posterior estimation of the pose. Both m k and P k/k are used in the calculation of step six.

步骤五:如果k≠0,则利用上一时刻的姿态验后估计误差的协方差矩阵Kk-1/k-1根据式(10)计算姿态的“预测”,即4×4维的Kk/k-1矩阵,Step 5: If k≠0, use the covariance matrix K k-1/k-1 of the posterior estimation error of the attitude at the previous moment to calculate the "prediction" of the attitude according to formula (10), that is, the 4×4-dimensional K k/k-1 matrix,

Figure BDA0001402274560000133
Figure BDA0001402274560000133

然后利用式(11)计算姿态“预测”,即姿态先验估计的估计误差的协方差矩阵Pk/k-1Then use equation (11) to calculate the attitude "prediction", that is, the covariance matrix P k/k-1 of the estimation error of the attitude prior estimation,

Figure BDA0001402274560000134
Figure BDA0001402274560000134

其中,Qk-1为过程噪声协方差阵;Φk-1为状态转移阵,且Φk-1=exp(Ωk-1Δt),Ωk-1为反对称阵,且反对称阵Ωk-1定义为Among them, Q k-1 is the process noise covariance matrix; Φ k-1 is the state transition matrix, and Φ k-1 =exp(Ω k-1 Δt), Ω k-1 is an antisymmetric matrix, and the antisymmetric matrix Ω k-1 is defined as

Figure BDA0001402274560000135
Figure BDA0001402274560000135

其中,ωk-1为由陀螺仪输出构成的三维矢量;Among them, ω k-1 is a three-dimensional vector formed by the output of the gyroscope;

本步骤已经获得了姿态的“预测”Kk/k-1,而上一个步骤也已经获得了姿态的“新息”δKk,下一步骤将利用姿态的“新息”实现对姿态“预测”的修正,即得到Kk/kIn this step, the "prediction" K k/k-1 of the attitude has been obtained, and the "innovation" δK k of the attitude has also been obtained in the previous step, and the next step will use the "innovation" of the attitude to realize the "prediction" of the attitude ” to get K k/k .

步骤六:首先利用上一时刻的累加权值和mk-1、步骤四得到的权值和δmk和步骤五得到的姿态先验估计误差的协方差矩阵Pk/k-1计算加权因子ρkStep 6: First use the accumulated weight sum m k-1 at the previous moment, the weight sum δm k obtained in step 4, and the covariance matrix P k/k-1 of the attitude prior estimation error obtained in step 5 to calculate the weighting factor ρ k ,

Figure BDA0001402274560000141
Figure BDA0001402274560000141

然后利用上一时刻的累加权值和mk-1和步骤四得到的权值和δmk计算当前时刻的累加权值和mkThen use the accumulated weight sum m k-1 at the previous moment and the weight sum δm k obtained in step 4 to calculate the accumulated weight sum m k at the current moment,

mk=(1-ρk)mk-1kδmk (14)m k =(1-ρ k )m k-1k δm k (14)

有了当前时刻的累加权值和mk和加权因子ρk,就可以实现对姿态的修正,即得到矩阵Kk/kWith the accumulated weight value and m k and weighting factor ρ k of the current moment, the attitude correction can be realized, that is, the matrix K k/k is obtained,

Figure BDA0001402274560000142
Figure BDA0001402274560000142

最后计算当前时刻的姿态验后估计误差的协方差矩阵Pk/kFinally, the covariance matrix P k/k of the posterior estimation error of the attitude at the current moment is calculated,

Figure BDA0001402274560000143
Figure BDA0001402274560000143

Pk/k和mk将会被保存,以便于进行下一轮的计算,因为下一时刻到来时将会重复上述步骤,而步骤五和步骤六将会用到这两个量。P k/k and m k will be saved for the next round of calculation, because the above steps will be repeated when the next time comes, and these two quantities will be used in steps 5 and 6.

获得Kk/k矩阵后,下面一个步骤将会根据该矩阵计算当前时刻的姿态。After obtaining the K k/k matrix, the next step will calculate the pose at the current moment based on the matrix.

步骤七:计算与矩阵Kk/k的最大特征值相对应的归一化的特征向量,该特征向量为该计算时刻以四元数表示的姿态qk至此当前时刻k的姿态计算结束。返回至步骤一,继续进行下一时刻的姿态计算过程,直至在某个时刻停止姿态计算。Step 7: Calculate the normalized eigenvector corresponding to the maximum eigenvalue of the matrix K k/k , where the eigenvector is the attitude q k represented by the quaternion at the calculation moment. At this point, the calculation of the attitude at the current moment k is completed. Returning to step 1, the attitude calculation process at the next moment is continued until the attitude calculation is stopped at a certain moment.

以上述依据本发明的理想实施例为启示,通过上述的说明内容,相关的工作人员完全可以在不偏离本发明的范围内,进行多样的变更以及修改。本项发明的技术范围并不局限于说明书上的内容,必须要根据权利要求范围来确定其技术性范围。Taking the above ideal embodiments according to the present invention as inspiration, and through the above description, relevant personnel can make various changes and modifications without departing from the scope of the present invention. The technical scope of the present invention is not limited to the contents in the specification, and the technical scope must be determined according to the scope of the claims.

Claims (2)

1.一种用于惯性-地磁组合姿态解算的自适应optimal-REQUEST算法,其特征在于:包括陀螺仪、加速度计和地磁传感器,以陀螺仪、加速度计和地磁传感器输出构成的三维观测矢量作为输入变量,并包括以下步骤,1. a self-adaptive optimal-REQUEST algorithm for inertial-geomagnetic combined attitude solution is characterized in that: comprise gyroscope, accelerometer and geomagnetic sensor, with the three-dimensional observation vector that gyroscope, accelerometer and geomagnetic sensor output form as input variables and include the following steps, 步骤一:在每个采样时刻k,计算Step 1: At each sampling time k, calculate
Figure FDA0002579218740000011
Figure FDA0002579218740000011
其中,
Figure FDA0002579218740000012
Figure FDA0002579218740000013
分别为k时刻由加速度计和地磁传感器输出构成的三维观测矢量;||·||表示取模;×表示取向量积;asin()表示取反正弦;
Figure FDA0002579218740000014
代表
Figure FDA0002579218740000015
Figure FDA0002579218740000016
这两个矢量的夹角;
in,
Figure FDA0002579218740000012
and
Figure FDA0002579218740000013
are the three-dimensional observation vectors formed by the output of the accelerometer and the geomagnetic sensor at time k, respectively; ||·|| represents the modulo; × represents the orientation vector product; asin() represents the inverse sine;
Figure FDA0002579218740000014
represent
Figure FDA0002579218740000015
and
Figure FDA0002579218740000016
the angle between these two vectors;
步骤二:计算Step 2: Calculate
Figure FDA0002579218740000017
Figure FDA0002579218740000017
其中,α1和α2为比例因子,abs(·)表示取绝对值,g为当地重力加速度矢量;Among them, α 1 and α 2 are scale factors, abs( ) represents the absolute value, and g is the local gravitational acceleration vector; 步骤三:为了将步骤二中
Figure FDA0002579218740000018
取值范围单调地转化为[0,1]区间,因此,计算
Step 3: In order to convert the
Figure FDA0002579218740000018
The value range is monotonically transformed into the [0,1] interval, therefore, computing
Figure FDA0002579218740000019
Figure FDA0002579218740000019
步骤四:根据步骤三得到的
Figure FDA00025792187400000110
计算姿态的“新息”δKk
Step 4: Obtained according to Step 3
Figure FDA00025792187400000110
Calculate the "innovation" δK k of the attitude,
Figure FDA00025792187400000111
Figure FDA00025792187400000111
式中,各符号定义如下:
Figure FDA00025792187400000112
该数值表示optimal-REQUEST算法赋予所有观测向量的权值和;
Figure FDA00025792187400000113
S=B+BT
Figure FDA00025792187400000114
I为单位矩阵;
Figure FDA00025792187400000115
Figure FDA00025792187400000116
分别为同一观测矢量在载体坐标系和世界坐标系下的表示;其中
Figure FDA00025792187400000117
在载体坐标系和世界坐标系下的表示分别为
Figure FDA00025792187400000118
Figure FDA00025792187400000119
Figure FDA00025792187400000120
在载体坐标系和世界坐标系下的表示分别为
Figure FDA00025792187400000121
Figure FDA00025792187400000122
In the formula, each symbol is defined as follows:
Figure FDA00025792187400000112
This value represents the sum of the weights assigned to all observation vectors by the optimal-REQUEST algorithm;
Figure FDA00025792187400000113
S=B+B T ,
Figure FDA00025792187400000114
I is the identity matrix;
Figure FDA00025792187400000115
and
Figure FDA00025792187400000116
are the representations of the same observation vector in the carrier coordinate system and the world coordinate system; where
Figure FDA00025792187400000117
The representations in the carrier coordinate system and the world coordinate system are respectively
Figure FDA00025792187400000118
and
Figure FDA00025792187400000119
and
Figure FDA00025792187400000120
The representations in the carrier coordinate system and the world coordinate system are respectively
Figure FDA00025792187400000121
and
Figure FDA00025792187400000122
步骤五:计算姿态的“预测”Kk/k-1,如果k=0,即初始计算时刻,则令Kk/k=δKk,mk=δmk,Pk/k=Rk,其中Rk为观测噪声协方差阵,则直接跳至步骤七,否则利用上一时刻的姿态验后估计误差的协方差矩阵Kk-1/k-1根据式(10)计算姿态的“预测”,即4×4维的Kk/k-1矩阵,Step 5: Calculate the "prediction" K k/k-1 of the attitude, if k=0, that is, the initial calculation moment, then let K k/k =δK k , m k =δm k , P k/k =R k , where R k is the observation noise covariance matrix, then skip directly to step 7, otherwise use the covariance matrix K k-1/k-1 of the post-estimation error of the attitude at the previous moment to calculate the "prediction" of the attitude according to equation (10). ”, that is, a 4×4-dimensional K k/k-1 matrix,
Figure FDA0002579218740000021
Figure FDA0002579218740000021
然后利用式(11)计算姿态“预测”,即姿态先验估计的估计误差的协方差矩阵Pk/k-1Then use equation (11) to calculate the attitude "prediction", that is, the covariance matrix P k/k-1 of the estimation error of the attitude prior estimation,
Figure FDA0002579218740000022
Figure FDA0002579218740000022
其中,Qk-1为过程噪声协方差阵;Φk-1为状态转移阵,且Φk-1=exp(Ωk-1Δt),Ωk-1为反对称阵,且反对称阵Ωk-1定义为Among them, Q k-1 is the process noise covariance matrix; Φ k-1 is the state transition matrix, and Φ k-1 =exp(Ω k-1 Δt), Ω k-1 is an antisymmetric matrix, and the antisymmetric matrix Ω k-1 is defined as
Figure FDA0002579218740000023
Figure FDA0002579218740000023
其中,ωk-1为由陀螺仪输出构成的三维矢量;Among them, ω k-1 is a three-dimensional vector formed by the output of the gyroscope; 步骤六:利用姿态的“新息”实现对姿态“预测”的修正,即得到Kk/kStep 6: Utilize the "innovation" of the attitude to realize the correction of the attitude "prediction", namely obtain K k/k ; 首先,利用上一时刻的累加权值和mk-1、步骤四得到的权值和δmk和步骤五得到的姿态先验估计误差的协方差矩阵Pk/k-1计算加权因子ρkFirst, use the accumulated weight sum m k-1 at the previous moment, the weight sum δm k obtained in step 4, and the covariance matrix P k/k-1 of the attitude prior estimation error obtained in step 5 to calculate the weighting factor ρ k ,
Figure FDA0002579218740000024
Figure FDA0002579218740000024
然后利用上一时刻的累加权值和mk-1和步骤四得到的权值和δmk计算当前时刻的累加权值和mkThen use the accumulated weight sum m k-1 at the previous moment and the weight sum δm k obtained in step 4 to calculate the accumulated weight sum m k at the current moment, mk=(1-ρk)mk-1kδmk (14)m k =(1-ρ k )m k-1k δm k (14) 有了当前时刻的累加权值和mk和加权因子ρk,就可以实现对姿态的修正,即得到矩阵Kk/kWith the accumulated weight value and m k and weighting factor ρ k of the current moment, the attitude correction can be realized, that is, the matrix K k/k is obtained,
Figure FDA0002579218740000025
Figure FDA0002579218740000025
最后计算当前时刻的姿态验后估计误差的协方差矩阵Pk/kFinally, the covariance matrix P k/k of the posterior estimation error of the attitude at the current moment is calculated,
Figure FDA0002579218740000031
Figure FDA0002579218740000031
保存Pk/k和mk,以便于进行下一轮的计算;Save P k/k and m k for the next round of calculation; 步骤七:获得Kk/k矩阵后,将会根据该矩阵计算当前时刻的姿态,计算与矩阵Kk/k的最大特征值相对应的归一化的特征向量,该特征向量为该计算时刻以四元数表示的姿态计算结果;返回至步骤一以便进行下一时刻姿态解算,直至在某个时刻用户停止姿态计算。Step 7: After the K k/k matrix is obtained, the attitude at the current moment will be calculated according to the matrix, and the normalized eigenvector corresponding to the maximum eigenvalue of the matrix K k/k will be calculated, and the eigenvector is the calculation moment. The attitude calculation result represented by the quaternion; return to step 1 for the next moment attitude calculation, until the user stops the attitude calculation at a certain moment.
2.如权利要求1所述的用于惯性-地磁组合姿态解算的自适应optimal-REQUEST算法,其特征在于:采用滤波技术对式(1)的计算结果进行去噪。2 . The adaptive optimal-REQUEST algorithm for inertial-geomagnetic combined attitude calculation according to claim 1 , wherein the calculation result of formula (1) is denoised by using a filtering technique. 3 .
CN201710804083.3A 2017-09-08 2017-09-08 Adaptive optimal-REQUEST algorithm for inertial-geomagnetic combined attitude calculation Active CN107621261B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710804083.3A CN107621261B (en) 2017-09-08 2017-09-08 Adaptive optimal-REQUEST algorithm for inertial-geomagnetic combined attitude calculation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710804083.3A CN107621261B (en) 2017-09-08 2017-09-08 Adaptive optimal-REQUEST algorithm for inertial-geomagnetic combined attitude calculation

Publications (2)

Publication Number Publication Date
CN107621261A CN107621261A (en) 2018-01-23
CN107621261B true CN107621261B (en) 2020-09-08

Family

ID=61088431

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710804083.3A Active CN107621261B (en) 2017-09-08 2017-09-08 Adaptive optimal-REQUEST algorithm for inertial-geomagnetic combined attitude calculation

Country Status (1)

Country Link
CN (1) CN107621261B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108871319B (en) * 2018-04-26 2022-05-17 李志� Attitude calculation method based on earth gravity field and earth magnetic field sequential correction
CN109029435B (en) * 2018-06-22 2021-11-02 常州大学 A method for improving the precision of inertial-geomagnetic combination dynamic attitude determination
CN112082529A (en) * 2020-07-29 2020-12-15 上海谷感智能科技有限公司 Small household appliance attitude measurement method based on inertial sensor and attitude identification module
CN115574812A (en) * 2022-08-31 2023-01-06 凌宇科技(北京)有限公司 Attitude data processing method, device, electronic device and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102168979A (en) * 2010-12-08 2011-08-31 北京航空航天大学 Isoline matching method for passive navigation based on triangular constraint model
CN102322858A (en) * 2011-08-22 2012-01-18 南京航空航天大学 Geomagnetic matching navigation method for geomagnetic-strapdown inertial navigation integrated navigation system
CN102826064A (en) * 2012-08-30 2012-12-19 黑龙江省博凯科技开发有限公司 Heavy-duty vehicle rollover warning device based on micro-inertia/satellite/geomagnetic combined measurement
US9014975B2 (en) * 2012-05-23 2015-04-21 Vectornav Technologies, Llc System on a chip inertial navigation system
JP5933398B2 (en) * 2012-08-31 2016-06-08 本田技研工業株式会社 Variable field motor and electric vehicle
CN106248081A (en) * 2016-09-09 2016-12-21 常州大学 A kind of blind person's indoor navigation method combining Wi Fi auxiliary positioning based on inertial navigation
CN107084722A (en) * 2017-04-24 2017-08-22 常州大学 A method for improving static and dynamic comprehensive performance of inertia-geomagnetic combination

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102168979A (en) * 2010-12-08 2011-08-31 北京航空航天大学 Isoline matching method for passive navigation based on triangular constraint model
CN102322858A (en) * 2011-08-22 2012-01-18 南京航空航天大学 Geomagnetic matching navigation method for geomagnetic-strapdown inertial navigation integrated navigation system
US9014975B2 (en) * 2012-05-23 2015-04-21 Vectornav Technologies, Llc System on a chip inertial navigation system
CN102826064A (en) * 2012-08-30 2012-12-19 黑龙江省博凯科技开发有限公司 Heavy-duty vehicle rollover warning device based on micro-inertia/satellite/geomagnetic combined measurement
JP5933398B2 (en) * 2012-08-31 2016-06-08 本田技研工業株式会社 Variable field motor and electric vehicle
CN106248081A (en) * 2016-09-09 2016-12-21 常州大学 A kind of blind person's indoor navigation method combining Wi Fi auxiliary positioning based on inertial navigation
CN107084722A (en) * 2017-04-24 2017-08-22 常州大学 A method for improving static and dynamic comprehensive performance of inertia-geomagnetic combination

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
基于多传感器融合的动态手势识别研究分析;马正华等;《计算机工程与应用》;20170930(第17期);第153-159页 *
基于惯性-地磁组合的运动体姿态测量算法分析;戎海龙等;《计算机应用研究》;20140630;第31卷(第6期);第1657-1660页 *

Also Published As

Publication number Publication date
CN107621261A (en) 2018-01-23

Similar Documents

Publication Publication Date Title
US8913134B2 (en) Initializing an inertial sensor using soft constraints and penalty functions
CN107621261B (en) Adaptive optimal-REQUEST algorithm for inertial-geomagnetic combined attitude calculation
CN105180937B (en) A kind of MEMS IMU Initial Alignment Methods
Jin et al. The adaptive Kalman filter based on fuzzy logic for inertial motion capture system
CN104964685B (en) A kind of decision method of mobile phone athletic posture
CN114111843B (en) A method of initial alignment of optimal moving base for strapdown inertial navigation system
CN108981696B (en) Sins random misalignment angle non-singular rapid transfer alignment method
CN110174121A (en) A kind of aviation attitude system attitude algorithm method based on earth&#39;s magnetic field adaptive correction
CN105865448A (en) Indoor positioning method based on IMU
CN109029435B (en) A method for improving the precision of inertial-geomagnetic combination dynamic attitude determination
CN103776449A (en) Moving base initial alignment method for improving robustness
CN105066996B (en) Adaptive matrix Kalman filtering Attitude estimation method
CN107084722B (en) Method for improving inertia-geomagnetic combined static and dynamic comprehensive performance
CN105136150B (en) A kind of attitude determination method based on the fusion of multiple star sensor metrical information
CN110375773B (en) Attitude initialization method for MEMS inertial navigation system
Brückner et al. Evaluation of inertial sensor fusion algorithms in grasping tasks using real input data: Comparison of computational costs and root mean square error
CA2983574C (en) Initializing an inertial sensor using soft constraints and penalty functions
CN116793391A (en) Dynamic base initial alignment method and device for low-precision strapdown inertial navigation system
CN107679016A (en) A kind of marine strapdown inertial navigation system horizontal damping method based on LMS algorithm
Bruckner et al. Evaluation of inertial sensor fusion algorithms in grasping tasks using real input data: Comparison of computational costs and root mean square error
Yamagishi et al. The Extended Kalman Filter With Reduced Computation Time for Pedestrian Dead Reckoning
Zhou et al. Pedestrian navigation with foot-mounted inertial sensors in wearable body area networks
Shi et al. Pedestrian trajectory projection based on adaptive interpolation factor linear interpolation quaternion attitude estimation method
CN115615437B (en) Factor graph integrated navigation method
CN108762528A (en) Attitude algorithm method suitable for aerial flying squirrel

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant