[go: up one dir, main page]

CN112461224A - Magnetometer calibration method based on known attitude angle - Google Patents

Magnetometer calibration method based on known attitude angle Download PDF

Info

Publication number
CN112461224A
CN112461224A CN202011247295.4A CN202011247295A CN112461224A CN 112461224 A CN112461224 A CN 112461224A CN 202011247295 A CN202011247295 A CN 202011247295A CN 112461224 A CN112461224 A CN 112461224A
Authority
CN
China
Prior art keywords
magnetometer
coordinate system
magnetic field
axis
matrix
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.)
Granted
Application number
CN202011247295.4A
Other languages
Chinese (zh)
Other versions
CN112461224B (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.)
Wuhan University WHU
Original Assignee
Wuhan University WHU
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 Wuhan University WHU filed Critical Wuhan University WHU
Priority to CN202011247295.4A priority Critical patent/CN112461224B/en
Publication of CN112461224A publication Critical patent/CN112461224A/en
Application granted granted Critical
Publication of CN112461224B publication Critical patent/CN112461224B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C17/00Compasses; Devices for ascertaining true or magnetic north for navigation or surveying purposes
    • G01C17/38Testing, calibrating, or compensating of compasses
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C25/00Manufacturing, calibrating, cleaning, or repairing instruments or devices referred to in the other groups of this subclass
    • G01C25/005Manufacturing, calibrating, cleaning, or repairing instruments or devices referred to in the other groups of this subclass initial alignment, calibration or starting-up of inertial devices
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01RMEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
    • G01R35/00Testing or calibrating of apparatus covered by the other groups of this subclass

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Remote Sensing (AREA)
  • Manufacturing & Machinery (AREA)
  • Measuring Magnetic Variables (AREA)

Abstract

The invention provides a magnetometer calibration method based on a known attitude angle. Based on the assumption that the total magnetic field strength of a fixed position is unchanged and the projection component of the magnetic field strength of the fixed position in the same coordinate system is unchanged, the observed value of the magnetometer is projected to a local coordinate system by using a known attitude angle according to a magnetometer measurement model, and magnetometer calibration parameters are obtained through least square iterative solution. Compared with the prior calibration technology, the method has the advantages of simple algorithm and higher efficiency. Meanwhile, the calibration of the soft and hard magnetic effects of the magnetometer is realized, and the coordinate system of the magnetometer is aligned with the coordinate system of the inertial sensor, so that the information of the magnetometer and the inertial sensor is put in a common frame, and the magnetometer and the inertial sensor can play an important role in the fusion positioning of the multisource sensor and the sensor array.

Description

一种基于已知姿态角的磁力计标定方法A Magnetometer Calibration Method Based on Known Attitude Angle

技术领域technical field

本发明属于磁力计标定领域,特别涉及姿态角已知时磁力计标定方法。The invention belongs to the field of magnetometer calibration, in particular to a magnetometer calibration method when the attitude angle is known.

背景技术Background technique

磁力计是用来测量磁感应强度的传感器,它可以提供对磁北的参考,是低成本高性能导航系统中用于姿态估计的关键信息源。磁力计由于加工工艺的限制,会存在零偏误差、交轴耦合误差、比例因子误差等问题,影响磁力计的测量精度;而且磁力计容易受到周围环境的磁干扰,这些干扰分为软磁干扰和硬磁干扰。因此为测量更准确的磁场信息,需对磁力计进行标定。此外,在多源融合传感器定位中,将磁力计和惯性传感器的信息放在一个公共框架中是实现高精度定位的基础,但由于安装工艺、软磁干扰等原因,磁力计与惯性传感器的轴系难以实现完全一致,故磁力计与惯性传感器进行交叉对准标定是一个关键点和亟需解决的问题。A magnetometer is a sensor used to measure the magnetic induction intensity, which can provide a reference to magnetic north and is a key information source for attitude estimation in low-cost, high-performance navigation systems. Due to the limitation of the processing technology, the magnetometer will have problems such as zero offset error, quadrature axis coupling error, scale factor error, etc., which will affect the measurement accuracy of the magnetometer; and the magnetometer is susceptible to magnetic interference from the surrounding environment, which is divided into soft magnetic interference. and hard magnetic interference. Therefore, in order to measure more accurate magnetic field information, the magnetometer needs to be calibrated. In addition, in the multi-source fusion sensor positioning, putting the information of the magnetometer and the inertial sensor in a common frame is the basis to achieve high-precision positioning, but due to the installation process, soft magnetic interference and other reasons, the axis of the magnetometer and the inertial sensor It is difficult to achieve complete consistency, so the cross-alignment calibration of the magnetometer and the inertial sensor is a key point and an urgent problem to be solved.

目前根据国内外的文献来看,基于极大似然估计法的椭球拟合是目前最常用的磁力计内在校准方法,它的标定与姿态无关,利用了磁力计在局部位置或均匀磁场中的测量值无论方向如何都是恒定的这一事实。对于传感器之间的交叉标定,主要通过依靠局部重力信息完成,但这种标定方法依赖加速计测量值。At present, according to domestic and foreign literatures, ellipsoid fitting based on maximum likelihood estimation method is the most commonly used intrinsic calibration method for magnetometers. The fact that the measured value of is constant regardless of orientation. For cross-calibration between sensors, it is mainly done by relying on local gravity information, but this calibration method relies on accelerometer measurements.

综上,在磁力计标定时,如何快速完成磁力计内在标定及交叉标定是需要解决的关键问题。本发明以最小二乘法,包括但不限于此应用场景,无需依赖姿态、重力信息,提出一种简单有效的磁力计标定及与惯性传感器交叉标定方法。To sum up, when the magnetometer is calibrated, how to quickly complete the internal calibration and cross-calibration of the magnetometer is a key problem that needs to be solved. The present invention proposes a simple and effective method of magnetometer calibration and cross-calibration with inertial sensors based on the least squares method, including but not limited to this application scenario, without relying on attitude and gravity information.

发明内容SUMMARY OF THE INVENTION

针对磁力计快速校准的需求以及磁力计轴系与IMU惯性传感器轴系不对齐的问题,本发明提出了一种在姿态角已知的情况下在基于最小二乘原理完成磁力计的内在标定以及IMU惯性传感器的交叉标定,即可以快速实现标定磁力计交轴耦合误差、比例因子误差、零位偏置误差、软磁误差、硬磁误差,并实现磁力计与IMU惯性传感器轴系对齐。本发明无需借助任何外界设备,无需参数设置,简单可行,具有很好的普适性,同时能够满足现场快速(20s左右)标定的要求,具有良好的标定精度。Aiming at the requirement of quick calibration of the magnetometer and the problem that the shaft system of the magnetometer is not aligned with the shaft system of the IMU inertial sensor, the present invention proposes a method to complete the intrinsic calibration of the magnetometer based on the principle of least squares when the attitude angle is known. The cross-calibration of the IMU inertial sensor can quickly calibrate the magnetometer quadrature axis coupling error, scale factor error, zero offset error, soft magnetic error, hard magnetic error, and realize the axis alignment of the magnetometer and the IMU inertial sensor. The invention does not need any external equipment and parameter setting, is simple and feasible, has good universality, can meet the requirements of rapid (about 20s) calibration on site, and has good calibration accuracy.

本发明采用如下的技术方案:一种基于最小二乘方法完成磁力计的内在标定以及与IMU惯性传感器的轴系对齐,主要是通过旋转智能手机完成标定,在基于某一位置的地磁场强度在当地坐标系下三轴磁场分量不变及磁场总强度不变的假设下,通过对磁力计的测量模型进行建模,使用泰勒展开及最小二乘方法,得到磁力计标定参数;所述的技术方案包括以下步骤:The present invention adopts the following technical scheme: an internal calibration of the magnetometer based on the least squares method and the alignment with the axis of the IMU inertial sensor are mainly completed by rotating the smart phone, and the geomagnetic field strength based on a certain position is Under the assumption that the three-axis magnetic field components in the local coordinate system are constant and the total magnetic field strength is constant, the magnetometer calibration parameters are obtained by modeling the measurement model of the magnetometer, using Taylor expansion and the least squares method; The protocol includes the following steps:

步骤1,在室外空旷区域选择任意选择一个位置,并根据位置的经纬度坐标查询地球磁场参考模型,得到该位置的磁场总强度参考值;Step 1, select an arbitrary location in an outdoor open area, and query the earth magnetic field reference model according to the latitude and longitude coordinates of the location to obtain the reference value of the total magnetic field strength of the location;

步骤2,以传感器测量中心为旋转中心,使其绕着载体坐标系的X、Y、Z三轴各旋转多圈,并获取标定过程中每个历元的姿态角(即俯仰角、横滚角、航向角)及磁场信息;Step 2, take the sensor measurement center as the rotation center, make it rotate multiple times around the X, Y, and Z axes of the carrier coordinate system, and obtain the attitude angle of each epoch during the calibration process (ie pitch angle, roll angle, heading angle) and magnetic field information;

步骤3,建立磁力计测量模型,确定待估参数,将磁力计的测量模型进行泰勒展开,使用最小二乘法迭代求得待估参数。Step 3: Establish a magnetometer measurement model, determine parameters to be estimated, perform Taylor expansion on the measurement model of the magnetometer, and use least squares to iteratively obtain parameters to be estimated.

进一步的,对磁力计的测量模型进行建模时,考虑磁力计受到软磁误差、比例因子误差、交轴耦合误差、零位偏置误差、硬铁误差及传感器噪声,载体坐标系下磁力计的测量模型如下:Further, when modeling the measurement model of the magnetometer, it is considered that the magnetometer is subject to soft magnetic error, scale factor error, quadrature coupling error, zero offset error, hard iron error and sensor noise, and the magnetometer in the carrier coordinate system. The measurement model is as follows:

Figure BDA0002770454800000021
Figure BDA0002770454800000021

对磁力计原始观测数据mb_init进行均值滤波,降低磁力计噪声nM,得到mb;将

Figure BDA0002770454800000022
的乘积作为一个待估矩阵,记为
Figure BDA0002770454800000023
将bM和bHI之和作为一个待估矩阵,记为BM,模型简化后如下式,待估参数为
Figure BDA0002770454800000024
和BM;Perform mean filtering on the original observation data m b_init of the magnetometer to reduce the noise n M of the magnetometer to obtain m b ;
Figure BDA0002770454800000022
The product of , as a matrix to be estimated, is denoted as
Figure BDA0002770454800000023
The sum of b M and b HI is taken as a matrix to be estimated, denoted as B M , the model is simplified as follows, and the parameters to be estimated are
Figure BDA0002770454800000024
and BM ;

Figure BDA0002770454800000025
Figure BDA0002770454800000025

其中,b表示载体坐标系b系,b系是以惯性传感器IMU相位中心为原点,x轴指向载体前进方向,y轴垂直于x轴指向载体右侧,z轴与x轴和y轴垂直并构成右手系;

Figure BDA0002770454800000026
表示载体坐标系下磁场强度的真实值;
Figure BDA0002770454800000027
表示磁力计坐标系到惯性传感器IMU坐标系的姿态旋转矩阵,为3×3方阵;CSI表示软磁效应变化矩阵;CNO是磁力计三轴由非正交转化为正交的变化矩阵,为3×3方阵,主对角线元素为0;SM为比例因子,为3×3方阵,只有主对角线元素有数据,其余元素为0;mb_init表示磁力计原始观测数据;bM表示磁力计零位偏置;bHI表示硬磁效应误差;nM为磁力计噪声矢量。Among them, b represents the carrier coordinate system b, the b system is based on the inertial sensor IMU phase center as the origin, the x-axis points to the forward direction of the carrier, the y-axis is perpendicular to the x-axis and points to the right side of the carrier, and the z-axis is perpendicular to the x-axis and the y-axis. form a right-handed system;
Figure BDA0002770454800000026
Represents the true value of the magnetic field strength in the carrier coordinate system;
Figure BDA0002770454800000027
Represents the attitude rotation matrix from the magnetometer coordinate system to the inertial sensor IMU coordinate system, which is a 3×3 square matrix; CSI represents the soft magnetic effect change matrix; C NO is the change matrix of the magnetometer three-axis transformation from non-orthogonal to orthogonal , is a 3×3 square matrix, and the main diagonal element is 0; S M is the scale factor, which is a 3×3 square matrix, only the main diagonal element has data, and the other elements are 0; m b_init represents the original magnetometer observation data; b M is the magnetometer zero offset; b HI is the hard magnetic effect error; n M is the magnetometer noise vector.

进一步的,对磁力计测量模型进行迭代计算时,首先以mb作为初次迭代计算时载体坐标系下磁场强度参考真值,即

Figure BDA0002770454800000028
之后迭代计算时
Figure BDA0002770454800000029
通过
Figure BDA00027704548000000210
求得,然后求得当地坐标系下的磁场强度真值
Figure BDA00027704548000000211
计算关系如下式:Further, when iterative calculation is performed on the magnetometer measurement model, m b is firstly used as the reference true value of the magnetic field strength in the carrier coordinate system during the initial iterative calculation, that is,
Figure BDA0002770454800000028
After iterative calculation
Figure BDA0002770454800000029
pass
Figure BDA00027704548000000210
Obtained, and then obtained the true value of the magnetic field strength in the local coordinate system
Figure BDA00027704548000000211
The calculation relationship is as follows:

Figure BDA0002770454800000031
Figure BDA0002770454800000031

式中,k表示第k个历元,j表示历元的总个数;

Figure BDA0002770454800000032
表示第k个历元载体坐标系到当地坐标系的姿态旋转矩阵,
Figure BDA0002770454800000033
表示第k个历元载体坐标系下磁场强度参考真值;n表示当地坐标n系,n系是以惯性传感器IMU相位中心为原点,x轴平行于当地水平面指向正北,y轴平行于当地水平面指向正东,z轴垂直于当地水平面向下,三者构成右手系;In the formula, k represents the k-th epoch, and j represents the total number of epochs;
Figure BDA0002770454800000032
Represents the attitude rotation matrix from the kth epoch carrier coordinate system to the local coordinate system,
Figure BDA0002770454800000033
Represents the true value of the magnetic field strength in the kth epoch carrier coordinate system; n represents the local coordinate n system, the n system takes the inertial sensor IMU phase center as the origin, the x-axis is parallel to the local horizontal plane and points to true north, and the y-axis is parallel to the local The horizontal plane points to the due east, and the z-axis is perpendicular to the local horizontal plane downward, and the three constitute a right-handed system;

在基于磁强总强度不变的假设下,根据Mn_CGRF求得其磁场总强度||Mn_CGRF||,通过计算出

Figure BDA0002770454800000034
与||Mn_CGRF||的比例关系,将
Figure BDA0002770454800000035
各轴的数据等比例变化,得到Mn_ture,将其作为当地坐标系下的磁场真值,进而得到载体坐标系下磁场强度参考真值
Figure BDA0002770454800000036
Mn_ture
Figure BDA0002770454800000037
计算过程如下:Under the assumption that the total magnetic intensity remains unchanged, the total magnetic field intensity ||M n_CGRF || can be obtained according to Mn_CGRF , and by calculating
Figure BDA0002770454800000034
proportional to ||M n_CGRF ||, the
Figure BDA0002770454800000035
The data of each axis changes in equal proportion to obtain M n_ture , which is used as the true value of the magnetic field in the local coordinate system, and then the reference true value of the magnetic field strength in the carrier coordinate system is obtained.
Figure BDA0002770454800000036
M n_ture and
Figure BDA0002770454800000037
The calculation process is as follows:

Figure BDA0002770454800000038
Figure BDA0002770454800000038

Figure BDA0002770454800000039
Figure BDA0002770454800000039

其中,

Figure BDA00027704548000000310
表示当地坐标系到载体坐标系的姿态旋转矩阵;in,
Figure BDA00027704548000000310
Represents the attitude rotation matrix from the local coordinate system to the carrier coordinate system;

进一步的,通过一阶泰勒展开将简化模型

Figure BDA00027704548000000311
线性化,根据最小二乘法迭代求得待估参数,具体实现方式如下:Further, the first-order Taylor expansion will simplify the model
Figure BDA00027704548000000311
Linearization, the parameters to be estimated are iteratively obtained according to the least squares method, and the specific implementation is as follows:

待估参数

Figure BDA00027704548000000312
为3×3方阵,待估参数BM为3×1矩阵,具体表现为:Parameters to be estimated
Figure BDA00027704548000000312
is a 3×3 square matrix, and the parameter to be estimated B M is a 3×1 matrix, which is specifically expressed as:

Figure BDA00027704548000000313
Figure BDA00027704548000000313

将式子

Figure BDA00027704548000000314
展开,the formula
Figure BDA00027704548000000314
expand,

Figure BDA00027704548000000315
Figure BDA00027704548000000315

待求参数共计12个,记为X,There are a total of 12 parameters to be found, denoted as X,

X=[a1 a2 a3 a4 a5 a6 a7 a8 a9 b1 b2 b3]T X=[a 1 a 2 a 3 a 4 a 5 a 6 a 7 a 8 a 9 b 1 b 2 b 3 ] T

由于该式子为非线性,按泰勒公式展开,舍弃二阶项和高阶项,上标i表示迭代次数,如下式:Since this formula is nonlinear, it is expanded according to Taylor's formula, discarding second-order terms and higher-order terms, and the superscript i represents the number of iterations, as follows:

Figure BDA0002770454800000041
Figure BDA0002770454800000041

其中Δ表示残差,令:where Δ represents the residual, let:

Figure BDA0002770454800000042
Figure BDA0002770454800000042

令:xi=Xi-Xi-1

Figure BDA0002770454800000043
Let: x i =X i -X i-1 ,
Figure BDA0002770454800000043

式(7)简化为:Equation (7) is simplified to:

Figure BDA0002770454800000044
Figure BDA0002770454800000044

Figure BDA0002770454800000045
将式(8)写为残差方程的形式,make
Figure BDA0002770454800000045
Write equation (8) in the form of the residual equation,

Figure BDA0002770454800000046
Figure BDA0002770454800000046

通过最小二乘法即可求式(9)的解算结果,各观测值等权,P为单位阵,求得The solution result of Equation (9) can be obtained by the least square method, each observation value is equal weight, P is the identity matrix, and we can obtain

x=(HTPH)-1HTPz (10)x = (H T PH) -1 H T Pz (10)

Xi=xi+Xi-1 (11)X i =x i +X i-1 (11)

式中,Xi为磁力计原始观测数据mb_in进行均值滤波后得到的mb,通过

Figure BDA0002770454800000051
更新
Figure BDA0002770454800000052
重复该迭代过程直至收敛,得到参数结果。In the formula, X i is the m b obtained by the mean filtering of the original observation data m b_in of the magnetometer.
Figure BDA0002770454800000051
renew
Figure BDA0002770454800000052
This iterative process is repeated until convergence, and the parametric results are obtained.

进一步的,最小二乘法的初值通过以下方式获取,Further, the initial value of the least squares method is obtained in the following way,

对于

Figure BDA0002770454800000053
磁力计和惯性传感器坐标系之间的旋转角为小角度,故
Figure BDA0002770454800000054
接近单位阵;CSI各个元素值都比较小;CNO主对角线元素为0,其余元素也较小;SM只有主对角线元素,各元素数值接近1;故
Figure BDA0002770454800000055
的初值为单位阵I3×3;for
Figure BDA0002770454800000053
The rotation angle between the magnetometer and the inertial sensor coordinate system is a small angle, so
Figure BDA0002770454800000054
It is close to the unit matrix; the value of each element of CSI is relatively small; the main diagonal element of C NO is 0, and the other elements are also small; SM has only main diagonal elements, and the value of each element is close to 1; therefore
Figure BDA0002770454800000055
The initial value of the unit matrix I 3 × 3 ;

对于BM的初值,只考虑磁力计受零偏误差影响,通过进一步简化模型,即

Figure BDA0002770454800000056
将磁力计原始观测数据mb_init作为第一次迭代计算时载体坐标系下的磁场真值,即
Figure BDA0002770454800000057
根据每个历元的
Figure BDA0002770454800000058
(
Figure BDA0002770454800000059
表示每个历元的载体坐标系到当地坐标系的姿态旋转矩阵),求得当地坐标系下各轴的磁场强度的均值
Figure BDA00027704548000000510
作为当地坐标系下的磁场强度的真值。在基于磁强总强度不变的假设下,根据Mn_CGRF求得其磁场总强度||Mn_CGRF||。通过计算出
Figure BDA00027704548000000511
与||Mn_CGRF||的比例关系,将
Figure BDA00027704548000000512
各轴的数据等比例变化,得到Mn_ture,将其作为当地坐标系下的磁场真值。进而得到载体坐标系下磁场强度参考真值
Figure BDA00027704548000000513
For the initial value of BM , only the magnetometer is affected by the bias error, and by further simplifying the model, that is,
Figure BDA0002770454800000056
The original observation data m b_init of the magnetometer is taken as the true value of the magnetic field in the carrier coordinate system during the first iterative calculation, namely
Figure BDA0002770454800000057
According to each epoch
Figure BDA0002770454800000058
(
Figure BDA0002770454800000059
Represents the attitude rotation matrix from the carrier coordinate system of each epoch to the local coordinate system), and obtains the mean value of the magnetic field strength of each axis in the local coordinate system
Figure BDA00027704548000000510
as the true value of the magnetic field strength in the local coordinate system. Under the assumption that the total magnetic intensity remains unchanged, the total magnetic field intensity ||M n_CGRF || is obtained according to Mn_CGRF . by calculating
Figure BDA00027704548000000511
proportional to ||M n_CGRF ||, the
Figure BDA00027704548000000512
The data of each axis is changed proportionally to obtain M n_ture , which is taken as the true value of the magnetic field in the local coordinate system. And then get the reference true value of the magnetic field strength in the carrier coordinate system
Figure BDA00027704548000000513

将原始数据mb_init

Figure BDA00027704548000000514
求差得到每个历元的零偏,再将其求平均得到BM;Compare the original data m b_init with
Figure BDA00027704548000000514
Calculate the difference to get the zero offset of each epoch, and then average it to get BM ;

Figure BDA00027704548000000515
Figure BDA00027704548000000515

当本次迭代求得的BM和上次迭代求得的BM各轴之差小于0.1mGauss时,认为零偏标定完成,否则更新

Figure BDA00027704548000000516
重复上述过程,最终求得BM,将其作为泰勒展开中的初值。When the difference between the BM obtained in this iteration and the BM obtained in the previous iteration is less than 0.1mGauss , the zero offset calibration is considered to be completed, otherwise it is updated.
Figure BDA00027704548000000516
Repeat the above process, and finally obtain B M , which is used as the initial value in Taylor expansion.

本发明具有以下有益效果:The present invention has the following beneficial effects:

(1)本发明在获取高精度姿态角的基础上完成了磁力计的内在标定及与惯性传感器的交叉标定,可以减少零偏误差、交轴耦合误差、比例因子误差、软磁干扰和硬磁干扰以及磁力计与惯性传感器的轴系不对齐误差,标定效果较好。(1) The present invention completes the internal calibration of the magnetometer and the cross-calibration with the inertial sensor on the basis of obtaining the high-precision attitude angle, which can reduce the zero offset error, quadrature axis coupling error, scale factor error, soft magnetic interference and hard magnetic Interference and shaft misalignment error between magnetometer and inertial sensor, the calibration effect is better.

(2)本发明操作简单,易于实现,操作时间短。只需以智能手机(即载体)的中心为旋转中心,绕着载体坐标系的X、Y、Z三轴各旋转720°即可完成标定工作,对姿态无要求,标定效率较高。(2) The present invention is simple to operate, easy to implement, and has a short operation time. It only needs to take the center of the smartphone (ie, the carrier) as the rotation center, and rotate 720° around the X, Y, and Z axes of the carrier coordinate system to complete the calibration work. There is no requirement for the posture, and the calibration efficiency is high.

(3)本发明实现了将磁力计坐标系与惯性传感器坐标系对齐,使得磁力计和惯性传感器的信息放在一个公共框架中,可以在传感器阵列发挥重要作用。(3) The present invention realizes that the magnetometer coordinate system is aligned with the inertial sensor coordinate system, so that the information of the magnetometer and the inertial sensor is placed in a common frame, which can play an important role in the sensor array.

附图说明Description of drawings

图1为手机标定动作示意图。Figure 1 is a schematic diagram of the mobile phone calibration action.

图2为迭代求解磁力计标定参数的流程图。Figure 2 is a flow chart of iteratively solving the calibration parameters of the magnetometer.

具体实施方式Detailed ways

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

步骤1,选择室外某一空旷位置作为标定位置,获取该位置的经纬度坐标及高度,通过查询国际地磁参考场IGRF(International Geomagnetic Reference Field)模型获取该位置的磁场强度Mn_IGRFStep 1, select a certain open position outdoors as the calibration position, obtain the longitude and latitude coordinates and the height of the position, obtain the magnetic field intensity M n_IGRF of the position by querying the International Geomagnetic Reference Field IGRF (International Geomagnetic Reference Field) model;

步骤2,如图1所示,以智能手机(即载体)的中心为旋转中心,使其绕着载体坐标系的X、Y、Z三轴各旋转720°;Step 2, as shown in Figure 1, take the center of the smartphone (ie, the carrier) as the center of rotation, and rotate it around the X, Y, and Z axes of the carrier coordinate system by 720°;

步骤3,通过专利“MEMS陀螺自动标定方法”的方法,通过伪位置约束和反向平滑获取该标定过程中高精度的每个历元的载体坐标系到当地坐标系的姿态旋转矩阵

Figure BDA0002770454800000061
(姿态旋转矩阵的作用是实现矢量由一个坐标系投影变换到另一个坐标系);Step 3: Obtain the high-precision attitude rotation matrix from the carrier coordinate system of each epoch to the local coordinate system in the calibration process through the method of the patented "MEMS gyroscope automatic calibration method" through pseudo-position constraints and reverse smoothing
Figure BDA0002770454800000061
(The role of the attitude rotation matrix is to realize the projection transformation of the vector from one coordinate system to another coordinate system);

步骤4,建立磁力计测量模型,建立当地坐标系下磁场强度与载体坐标系下磁场强度之间的关系,通过对磁力计测量模型的迭代计算得到标定参数,计算流程如图2所示;Step 4, establish a magnetometer measurement model, establish the relationship between the magnetic field intensity in the local coordinate system and the magnetic field intensity in the carrier coordinate system, and obtain calibration parameters by iterative calculation of the magnetometer measurement model, and the calculation process is shown in Figure 2;

而且,步骤4的实现方式包括以下子步骤,Moreover, the implementation of step 4 includes the following sub-steps,

41)对磁力计的测量模型进行建模。受制造工艺、加工精度等的影响,磁力计存在交轴耦合误差、比例因子误差、零位偏置误差及传感器噪声。此外,磁力计容易受到周围环境的磁干扰,这些干扰分为软磁干扰和硬磁干扰,它们的表现形式与交轴耦合误差、比例因子误差、零位偏置误差相同。故需同时完成上述误差的标定。此外,还存在磁力计轴系与惯性传感器轴系不对齐误差。本发明认为载体坐标系与惯性传感器坐标系轴系相同,故在载体坐标系下磁力计的测量模型如下:41) Model the measurement model of the magnetometer. Affected by the manufacturing process and machining accuracy, the magnetometer has quadrature coupling error, scale factor error, zero offset error and sensor noise. In addition, magnetometers are susceptible to magnetic interference from the surrounding environment. These interferences are divided into soft magnetic interference and hard magnetic interference. Their manifestations are the same as quadrature coupling error, scale factor error, and zero offset error. Therefore, it is necessary to complete the calibration of the above errors at the same time. In addition, there is a misalignment error between the magnetometer shaft system and the inertial sensor shaft system. The present invention considers that the carrier coordinate system is the same as the inertial sensor coordinate system axis, so the measurement model of the magnetometer in the carrier coordinate system is as follows:

Figure BDA0002770454800000062
Figure BDA0002770454800000062

式中,b表示载体坐标系b系,b系是以惯性传感器IMU相位中心为原点,x轴指向载体前进方向,y轴垂直于x轴指向载体右侧,z轴与x轴和y轴垂直并构成右手系;n表示当地坐标n系,n系是以惯性传感器IMU相位中心为原点,x轴平行于当地水平面指向正北,y轴平行于当地水平面指向正东,z轴垂直于当地水平面向下,三者构成右手系;

Figure BDA0002770454800000071
表示载体坐标系下磁场强度的真实值;
Figure BDA0002770454800000072
表示磁力计坐标系到惯性传感器IMU坐标系的姿态旋转矩阵,为3×3方阵;CSI表示软磁效应变化矩阵;CNO是磁力计三轴由非正交转化为正交的变化矩阵,为3×3方阵,主对角线元素为0;SM为比例因子,为3×3方阵,只有主对角线元素有数据,其余元素为0;mb_init表示磁力计原始观测数据,bM表示磁力计零位偏置;bHI表示硬磁效应误差;nM为磁力计噪声矢量。In the formula, b represents the carrier coordinate system b, the b system is based on the inertial sensor IMU phase center as the origin, the x-axis points to the forward direction of the carrier, the y-axis is perpendicular to the x-axis and points to the right side of the carrier, and the z-axis is perpendicular to the x-axis and the y-axis. And form a right-handed system; n represents the local coordinate n system, the n system is based on the inertial sensor IMU phase center as the origin, the x-axis is parallel to the local horizontal plane and points to the north, the y-axis is parallel to the local horizontal plane and points to the east, and the z-axis is perpendicular to the local horizontal plane. Face down, the three form a right-hand system;
Figure BDA0002770454800000071
Represents the true value of the magnetic field strength in the carrier coordinate system;
Figure BDA0002770454800000072
Represents the attitude rotation matrix from the magnetometer coordinate system to the inertial sensor IMU coordinate system, which is a 3×3 square matrix; CSI represents the soft magnetic effect change matrix; C NO is the change matrix of the magnetometer three-axis transformation from non-orthogonal to orthogonal , is a 3×3 square matrix, and the main diagonal element is 0; S M is the scale factor, which is a 3×3 square matrix, only the main diagonal element has data, and the other elements are 0; m b_init represents the original magnetometer observation data, b M is the magnetometer zero offset; b HI is the hard magnetic effect error; n M is the magnetometer noise vector.

42)对磁力计原始观测数据mb_init进行均值滤波,降低磁力计噪声nM,得到mb42) Perform mean filtering on the original observation data m b_init of the magnetometer to reduce the noise n M of the magnetometer to obtain m b .

43)将式(1)中

Figure BDA0002770454800000073
的乘积作为一个待估矩阵,记为
Figure BDA0002770454800000074
用mb代替mb_init和nM之和;将bM和bHI之和作为一个待估矩阵,记为BM。磁力计测量模型简化后如下式,待估参数为
Figure BDA0002770454800000075
和BM。43) Put the formula (1) in
Figure BDA0002770454800000073
The product of , as a matrix to be estimated, is denoted as
Figure BDA0002770454800000074
Use m b to replace the sum of m b_init and n M ; take the sum of b M and b HI as a matrix to be estimated, denoted as B M . The magnetometer measurement model is simplified as follows, and the parameters to be estimated are
Figure BDA0002770454800000075
and BM .

Figure BDA0002770454800000076
Figure BDA0002770454800000076

44)以mb作为初次迭代计算时载体坐标系下磁场强度参考真值,即

Figure BDA0002770454800000077
之后迭代计算时
Figure BDA0002770454800000078
通过
Figure BDA0002770454800000079
求得,然后求得当地坐标系下的磁场强度真值
Figure BDA00027704548000000710
计算关系如下式:44) Take m b as the reference true value of the magnetic field strength in the carrier coordinate system in the initial iterative calculation, namely
Figure BDA0002770454800000077
After iterative calculation
Figure BDA0002770454800000078
pass
Figure BDA0002770454800000079
Obtained, and then obtained the true value of the magnetic field strength in the local coordinate system
Figure BDA00027704548000000710
The calculation relationship is as follows:

Figure BDA00027704548000000711
Figure BDA00027704548000000711

式中,k(k=1,2...j)表示第k个历元,j表示历元的总个数;

Figure BDA00027704548000000712
表示第k个历元载体坐标系到当地坐标系的姿态旋转矩阵,
Figure BDA00027704548000000713
表示第k个历元载体坐标系下磁场强度参考真值。In the formula, k(k=1,2...j) represents the kth epoch, and j represents the total number of epochs;
Figure BDA00027704548000000712
Represents the attitude rotation matrix from the kth epoch carrier coordinate system to the local coordinate system,
Figure BDA00027704548000000713
Indicates the reference true value of the magnetic field strength in the kth epoch carrier coordinate system.

45)在基于磁强总强度不变的假设下,根据Mn_CGRF求得其磁场总强度||Mn_CGRF||.通过计算出

Figure BDA00027704548000000714
与||Mn_CGRF||的比例关系,将
Figure BDA00027704548000000715
各轴的数据等比例变化,得到Mn_ture。将其作为当地坐标系下的磁场真值,进而得到载体坐标系下磁场强度参考真值
Figure BDA00027704548000000716
Mn_ture
Figure BDA00027704548000000717
计算过程如下:45) Under the assumption that the total magnetic intensity remains unchanged, the total magnetic field intensity ||M n_CGRF || is obtained according to Mn_CGRF . By calculating
Figure BDA00027704548000000714
proportional to ||M n_CGRF ||, the
Figure BDA00027704548000000715
The data of each axis is changed proportionally to obtain M n_ture . Take it as the true value of the magnetic field in the local coordinate system, and then obtain the reference true value of the magnetic field strength in the carrier coordinate system
Figure BDA00027704548000000716
M n_ture and
Figure BDA00027704548000000717
The calculation process is as follows:

Figure BDA0002770454800000081
Figure BDA0002770454800000081

Figure BDA0002770454800000082
Figure BDA0002770454800000082

其中,

Figure BDA0002770454800000083
表示当地坐标系到载体坐标系的姿态旋转矩阵;in,
Figure BDA0002770454800000083
Represents the attitude rotation matrix from the local coordinate system to the carrier coordinate system;

46)对简化后的模型(式2)进行一阶泰勒展开,完成对模型的线性化处理,然后用最小二乘法求出待估参数

Figure BDA0002770454800000084
和BM,具体实现方式如下,46) Perform first-order Taylor expansion on the simplified model (Equation 2) to complete the linearization of the model, and then use the least squares method to obtain the parameters to be estimated
Figure BDA0002770454800000084
and B M , the specific implementation is as follows,

待估参数

Figure BDA0002770454800000085
为3×3方阵,待估参数BM为3×1矩阵,具体表现为:Parameters to be estimated
Figure BDA0002770454800000085
is a 3×3 square matrix, and the parameter to be estimated B M is a 3×1 matrix, which is specifically expressed as:

Figure BDA0002770454800000086
Figure BDA0002770454800000086

将式子

Figure BDA0002770454800000087
展开,the formula
Figure BDA0002770454800000087
expand,

Figure BDA0002770454800000088
Figure BDA0002770454800000088

待求参数共计12个,记为X,There are a total of 12 parameters to be found, denoted as X,

X=[a1 a2 a3 a4 a5 a6 a7 a8 a9 b1 b2 b3]T X=[a 1 a 2 a 3 a 4 a 5 a 6 a 7 a 8 a 9 b 1 b 2 b 3 ] T

由于该式子为非线性,按泰勒公式展开,舍弃二阶项和高阶项,上标i表示迭代次数,如下式:Since this formula is nonlinear, it is expanded according to Taylor's formula, discarding second-order terms and higher-order terms, and the superscript i represents the number of iterations, as follows:

Figure BDA0002770454800000089
Figure BDA0002770454800000089

其中Δ表示残差,令:where Δ represents the residual, let:

Figure BDA0002770454800000091
Figure BDA0002770454800000091

令:xi=Xi-Xi-1

Figure BDA0002770454800000092
Let: x i =X i -X i-1 ,
Figure BDA0002770454800000092

式(7)简化为:Equation (7) is simplified to:

Figure BDA0002770454800000093
Figure BDA0002770454800000093

Figure BDA0002770454800000094
将式(8)写为残差方程的形式,make
Figure BDA0002770454800000094
Write equation (8) in the form of the residual equation,

Figure BDA0002770454800000095
Figure BDA0002770454800000095

通过最小二乘法即可求式(9)的解算结果,本发明认为各观测值等权,P为单位阵,求得The solution result of Equation (9) can be obtained by the least squares method. The present invention considers that each observation value has equal weight, and P is the unit matrix.

x=(HTPH)-1HTPz (10)x = (H T PH) -1 H T Pz (10)

Xi=xi+Xi-1 (11)X i =x i +X i-1 (11)

Xi的值即为步骤42)中的mb;通过

Figure BDA0002770454800000096
更新
Figure BDA0002770454800000097
重复步骤43)~46),直至迭代收敛,得到待估参数结果。The value of Xi is m b in step 42);
Figure BDA0002770454800000096
renew
Figure BDA0002770454800000097
Steps 43) to 46) are repeated until the iteration converges, and the parameter result to be estimated is obtained.

进一步的,最小二乘法的初值通过如下方式获得,Further, the initial value of the least squares method is obtained as follows:

由于

Figure BDA0002770454800000098
磁力计和惯性传感器坐标系之间的旋转角为小角度,故
Figure BDA0002770454800000099
接近单位阵,CSI各个元素值都比较小,CNO主对角线元素为0,其余元素也较小,SM只有主对角线元素,各元素数值接近1,故
Figure BDA0002770454800000101
的初值为单位阵I3×3;because
Figure BDA0002770454800000098
The rotation angle between the magnetometer and the inertial sensor coordinate system is a small angle, so
Figure BDA0002770454800000099
Close to the unit matrix, the value of each element of CSI is relatively small, the main diagonal element of C NO is 0, and the other elements are also small, SM has only the main diagonal element, and the value of each element is close to 1, so
Figure BDA0002770454800000101
The initial value of the unit matrix I 3 × 3 ;

对于BM,其初值的给定方法如下:For B M , its initial value is given as follows:

对于手机磁力计而言,零偏造成的误差远大于交轴耦合和比例因子等的误差,因此在进行泰勒展开获取初值时,只考虑磁力计受零偏误差影响,故进一步简化磁力计的测量模型为:For the mobile phone magnetometer, the error caused by the zero bias is much larger than the error caused by the quadrature axis coupling and the scale factor. Therefore, when the Taylor expansion is performed to obtain the initial value, only the magnetometer is affected by the zero bias error, so the magnetometer is further simplified. The measurement model is:

Figure BDA0002770454800000102
Figure BDA0002770454800000102

将磁力计原始观测数据mb_init作为第一次迭代计算时载体坐标系下的磁场真值,即

Figure BDA0002770454800000103
根据每个历元的
Figure BDA0002770454800000104
求得当地坐标系下各轴的磁场强度的均值,作为当地坐标系下的磁场强度的真值,设共有j个历元的数据,计算过程如下:The original observation data m b_init of the magnetometer is taken as the true value of the magnetic field in the carrier coordinate system during the first iterative calculation, namely
Figure BDA0002770454800000103
According to each epoch
Figure BDA0002770454800000104
The mean value of the magnetic field strength of each axis in the local coordinate system is obtained as the true value of the magnetic field strength in the local coordinate system. If there are j epochs of data in total, the calculation process is as follows:

Figure BDA0002770454800000105
Figure BDA0002770454800000105

在基于磁强总强度不变的假设下,根据Mn_CGRF求得其磁场总强度||Mn_CGRF||,通过计算出

Figure BDA0002770454800000106
与||Mn_CGRF||的比例关系,将
Figure BDA0002770454800000107
各轴的数据等比例变化,得到Mn_ture,将其作为当地坐标系下的磁场真值,进而得到载体坐标系下磁场强度参考真值
Figure BDA0002770454800000108
Mn_ture
Figure BDA0002770454800000109
计算过程如下:Under the assumption that the total magnetic intensity remains unchanged, the total magnetic field intensity ||M n_CGRF || can be obtained according to Mn_CGRF , and by calculating
Figure BDA0002770454800000106
proportional to ||M n_CGRF ||, the
Figure BDA0002770454800000107
The data of each axis changes in equal proportion to obtain M n_ture , which is used as the true value of the magnetic field in the local coordinate system, and then the reference true value of the magnetic field strength in the carrier coordinate system is obtained.
Figure BDA0002770454800000108
M n_ture and
Figure BDA0002770454800000109
The calculation process is as follows:

Figure BDA00027704548000001010
Figure BDA00027704548000001010

根据每个历元的

Figure BDA00027704548000001011
求得每个历元的载体坐标系下的磁场强度,在只考虑零偏误差的条件下,将所有历元的载体坐标系下的磁场强度有差异的原因是由于存在零偏造成的,由于标定动作为绕轴旋转,通过平均即可得到载体坐标系下的磁场强度真值,计算过程如下:According to each epoch
Figure BDA00027704548000001011
The magnetic field strength in the carrier coordinate system of each epoch is obtained. Under the condition that only the zero offset error is considered, the reason why the magnetic field strength in the carrier coordinate system of all epochs is different is due to the existence of zero offset. The calibration action is to rotate around the axis, and the true value of the magnetic field strength in the carrier coordinate system can be obtained by averaging. The calculation process is as follows:

Figure BDA00027704548000001012
Figure BDA00027704548000001012

将原始数据mb_init与上式中的

Figure BDA00027704548000001013
求差得到每个历元的零偏,再将其求平均得到BM Combine the original data m b_init with in the above formula
Figure BDA00027704548000001013
Calculate the difference to get the zero offset of each epoch, and then average it to get B M

Figure BDA00027704548000001014
Figure BDA00027704548000001014

当本次迭代求得的BM和上次迭代求得的BM各轴之差小于0.1mGauss时,认为零偏标定完成,否则根据式(12)更新

Figure BDA0002770454800000111
重复上述过程。最终求得BM,将其作为泰勒展开中的初值。When the difference between the BM obtained in this iteration and the BM obtained in the previous iteration is less than 0.1mGauss , the zero offset calibration is considered to be completed, otherwise it is updated according to formula (12).
Figure BDA0002770454800000111
Repeat the above process. Finally, B M is obtained, which is used as the initial value in the Taylor expansion.

本文中所描述的具体实施例仅仅是对本发明精神作举例说明。本发明所属技术领域的技术人员可以对所描述的具体实施例做各种各样的修改或补充或采用类似的方式替代,但并不会偏离本发明的精神或者超越所附权利要求书所定义的范围。The specific embodiments described herein are merely illustrative of the spirit of the invention. Those skilled in the art to which the present invention pertains can make various modifications or additions to the described specific embodiments or substitute in similar manners, but will not deviate from the spirit of the present invention or go beyond the definitions of the appended claims range.

Claims (6)

1.一种基于已知姿态角的磁力计标定方法,其特征在于,包括如下步骤:1. a magnetometer calibration method based on known attitude angle, is characterized in that, comprises the steps: 步骤1,在室外空旷区域选择任意选择一个位置,并根据位置的经纬度坐标查询地球磁场参考模型,得到该位置的磁场总强度参考值;Step 1, select an arbitrary location in an outdoor open area, and query the earth magnetic field reference model according to the latitude and longitude coordinates of the location to obtain the reference value of the total magnetic field strength of the location; 步骤2,以传感器测量中心为旋转中心,使其绕着载体坐标系的X、Y、Z三轴各旋转多圈,并获取标定过程中每个历元的姿态角及磁场信息;Step 2, take the sensor measurement center as the rotation center, make it rotate multiple times around the X, Y, and Z axes of the carrier coordinate system, and obtain the attitude angle and magnetic field information of each epoch in the calibration process; 步骤3,建立磁力计测量模型,确定待估参数,将磁力计的测量模型进行泰勒展开,使用最小二乘法迭代求得待估参数。Step 3: Establish a magnetometer measurement model, determine parameters to be estimated, perform Taylor expansion on the measurement model of the magnetometer, and use least squares to iteratively obtain parameters to be estimated. 2.根据权利要求1所述一种基于已知姿态角的磁力计标定方法,其特征在于:对磁力计的测量模型进行建模时,考虑磁力计受到软磁误差、比例因子误差、交轴耦合误差、零位偏置误差、硬铁误差及传感器噪声,载体坐标系下磁力计的测量模型如下:2. a kind of magnetometer calibration method based on known attitude angle according to claim 1 is characterized in that: when the measurement model of magnetometer is modeled, consider that magnetometer is subject to soft magnetic error, scale factor error, quadrature axis Coupling error, zero offset error, hard iron error and sensor noise, the measurement model of the magnetometer in the carrier coordinate system is as follows:
Figure FDA0002770454790000011
Figure FDA0002770454790000011
对磁力计原始观测数据mb_init进行均值滤波,降低磁力计噪声nM,得到mb;将
Figure FDA0002770454790000012
的乘积作为一个待估矩阵,记为
Figure FDA0002770454790000013
将bM和bHI之和作为一个待估矩阵,记为BM;模型简化后如下式,待估参数为
Figure FDA0002770454790000014
和BM
Perform mean filtering on the original observation data m b_init of the magnetometer to reduce the noise n M of the magnetometer to obtain m b ;
Figure FDA0002770454790000012
The product of , as a matrix to be estimated, is denoted as
Figure FDA0002770454790000013
Take the sum of b M and b HI as a matrix to be estimated, denoted as B M ; the model is simplified as follows, and the parameters to be estimated are
Figure FDA0002770454790000014
and BM ;
Figure FDA0002770454790000015
Figure FDA0002770454790000015
其中,b表示载体坐标系b系,b系是以惯性传感器IMU相位中心为原点,x轴指向载体前进方向,y轴垂直于x轴指向载体右侧,z轴与x轴和y轴垂直并构成右手系;
Figure FDA0002770454790000016
表示载体坐标系下磁场强度的真实值;
Figure FDA0002770454790000017
表示磁力计坐标系到惯性传感器IMU坐标系的姿态旋转矩阵,为3×3方阵;CSI表示软磁效应变化矩阵;CNO是磁力计三轴由非正交转化为正交的变化矩阵,为3×3方阵,主对角线元素为0;SM为比例因子,为3×3方阵,只有主对角线元素有数据,其余元素为0;mb_init表示磁力计原始观测数据;bM表示磁力计零位偏置;bHI表示硬磁效应误差;nM为磁力计噪声矢量。
Among them, b represents the carrier coordinate system b, the b system is based on the inertial sensor IMU phase center as the origin, the x-axis points to the forward direction of the carrier, the y-axis is perpendicular to the x-axis and points to the right side of the carrier, and the z-axis is perpendicular to the x-axis and the y-axis. form a right-handed system;
Figure FDA0002770454790000016
Represents the true value of the magnetic field strength in the carrier coordinate system;
Figure FDA0002770454790000017
Represents the attitude rotation matrix from the magnetometer coordinate system to the inertial sensor IMU coordinate system, which is a 3×3 square matrix; CSI represents the soft magnetic effect change matrix; C NO is the change matrix of the magnetometer three-axis transformation from non-orthogonal to orthogonal , is a 3×3 square matrix, and the main diagonal element is 0; S M is the scale factor, which is a 3×3 square matrix, only the main diagonal element has data, and the other elements are 0; m b_init represents the original magnetometer observation data; b M is the magnetometer zero offset; b HI is the hard magnetic effect error; n M is the magnetometer noise vector.
3.根据权利要求2所述一种基于已知姿态角的磁力计标定方法,其特征在于:对磁力计测量模型进行迭代计算时,首先以mb作为初次迭代计算时载体坐标系下磁场强度参考真值,即
Figure FDA00027704547900000112
之后迭代计算时
Figure FDA00027704547900000111
通过
Figure FDA00027704547900000110
求得,然后求得当地坐标系下的磁场强度真值
Figure FDA0002770454790000021
计算关系如下式:
3. a kind of magnetometer calibration method based on known attitude angle according to claim 2, is characterized in that: when magnetometer measurement model is carried out iterative calculation, at first with m b as the magnetic field intensity under the carrier coordinate system during initial iterative calculation The reference truth value, i.e.
Figure FDA00027704547900000112
After iterative calculation
Figure FDA00027704547900000111
pass
Figure FDA00027704547900000110
Obtained, and then obtained the true value of the magnetic field strength in the local coordinate system
Figure FDA0002770454790000021
The calculation relationship is as follows:
Figure FDA0002770454790000022
Figure FDA0002770454790000022
式中,k表示第k个历元,j表示历元的总个数;
Figure FDA00027704547900000215
表示第k个历元载体坐标系到当地坐标系的姿态旋转矩阵,
Figure FDA0002770454790000023
表示第k个历元载体坐标系下磁场强度参考真值;n表示当地坐标n系,n系是以惯性传感器IMU相位中心为原点,x轴平行于当地水平面指向正北,y轴平行于当地水平面指向正东,z轴垂直于当地水平面向下,三者构成右手系;
In the formula, k represents the k-th epoch, and j represents the total number of epochs;
Figure FDA00027704547900000215
Represents the attitude rotation matrix from the kth epoch carrier coordinate system to the local coordinate system,
Figure FDA0002770454790000023
Represents the true value of the magnetic field strength in the kth epoch carrier coordinate system; n represents the local coordinate n system, the n system takes the inertial sensor IMU phase center as the origin, the x-axis is parallel to the local horizontal plane and points to true north, and the y-axis is parallel to the local The horizontal plane points to the due east, and the z-axis is perpendicular to the local horizontal plane downward, and the three constitute a right-handed system;
在基于磁强总强度不变的假设下,根据Mn_CGRF求得其磁场总强度||Mn_CGRF||,通过计算出
Figure FDA0002770454790000024
与||Mn_CGRF||的比例关系,将
Figure FDA0002770454790000025
各轴的数据等比例变化,得到Mn_ture,将其作为当地坐标系下的磁场真值,进而得到载体坐标系下磁场强度参考真值
Figure FDA0002770454790000026
Mn_ture
Figure FDA0002770454790000027
计算过程如下:
Under the assumption that the total magnetic intensity remains unchanged, the total magnetic field intensity ||M n_CGRF || can be obtained according to Mn_CGRF , and by calculating
Figure FDA0002770454790000024
proportional to ||M n_CGRF ||, the
Figure FDA0002770454790000025
The data of each axis changes in equal proportion to obtain M n_ture , which is used as the true value of the magnetic field in the local coordinate system, and then the reference true value of the magnetic field strength in the carrier coordinate system is obtained.
Figure FDA0002770454790000026
M n_ture and
Figure FDA0002770454790000027
The calculation process is as follows:
Figure FDA0002770454790000028
Figure FDA0002770454790000028
Figure FDA0002770454790000029
Figure FDA0002770454790000029
其中,
Figure FDA00027704547900000210
表示当地坐标系到载体坐标系的姿态旋转矩阵。
in,
Figure FDA00027704547900000210
Represents the attitude rotation matrix from the local coordinate system to the carrier coordinate system.
4.根据权利要求3所述一种基于已知姿态角的磁力计标定方法,其特征在于:通过一阶泰勒展开将简化模型
Figure FDA00027704547900000211
线性化,根据最小二乘法迭代求得待估参数,具体实现方式如下:
4. a kind of magnetometer calibration method based on known attitude angle according to claim 3, is characterized in that: will simplify model by first-order Taylor expansion
Figure FDA00027704547900000211
Linearization, the parameters to be estimated are iteratively obtained according to the least squares method, and the specific implementation is as follows:
待估参数
Figure FDA00027704547900000212
为3×3方阵,待估参数BM为3×1矩阵,具体表现为:
Parameters to be estimated
Figure FDA00027704547900000212
is a 3×3 square matrix, and the parameter to be estimated B M is a 3×1 matrix, which is specifically expressed as:
Figure FDA00027704547900000213
Figure FDA00027704547900000213
将式子
Figure FDA00027704547900000214
展开,
the formula
Figure FDA00027704547900000214
expand,
Figure FDA0002770454790000031
Figure FDA0002770454790000031
待求参数共计12个,记为X,There are a total of 12 parameters to be found, denoted as X, X=[a1 a2 a3 a4 a5 a6 a7 a8 a9 b1 b2 b3]T X=[a 1 a 2 a 3 a 4 a 5 a 6 a 7 a 8 a 9 b 1 b 2 b 3 ] T 由于该式子为非线性,按泰勒公式展开,舍弃二阶项和高阶项,上标i表示迭代次数,如下式:Since this formula is nonlinear, it is expanded according to Taylor's formula, discarding second-order terms and higher-order terms, and the superscript i represents the number of iterations, as follows:
Figure FDA0002770454790000032
Figure FDA0002770454790000032
其中Δ表示残差,令:where Δ represents the residual, let:
Figure FDA0002770454790000033
Figure FDA0002770454790000033
令:xi=Xi-Xi-1
Figure FDA0002770454790000034
Let: x i =X i -X i-1 ,
Figure FDA0002770454790000034
式(7)简化为:Equation (7) is simplified to:
Figure FDA0002770454790000035
Figure FDA0002770454790000035
Figure FDA0002770454790000036
将式(8)写为残差方程的形式,
make
Figure FDA0002770454790000036
Write equation (8) in the form of the residual equation,
Figure FDA0002770454790000041
Figure FDA0002770454790000041
通过最小二乘法即可式(9)的解算结果,各观测值等权,P为单位阵,求得The solution result of Equation (9) can be obtained by the least square method, each observation value is equal weight, P is the identity matrix, and we can obtain x=(HTPH)-1HTPz (10)x = (H T PH) -1 H T Pz (10) Xi=xi+Xi-1 (11)X i =x i +X i-1 (11) 式中,Xi为磁力计原始观测数据mb_init进行均值滤波后得到的mb,通过
Figure FDA0002770454790000042
更新
Figure FDA0002770454790000043
重复该迭代过程直至收敛,得到参数结果。
In the formula, X i is the m b obtained by the mean filtering of the original observation data m b_init of the magnetometer.
Figure FDA0002770454790000042
renew
Figure FDA0002770454790000043
This iterative process is repeated until convergence, and the parametric results are obtained.
5.根据权利要求4所述一种基于已知姿态角的磁力计标定方法,其特征在于:最小二乘法的初值通过以下方式获取,5. a kind of magnetometer calibration method based on known attitude angle according to claim 4 is characterized in that: the initial value of least squares method is obtained by the following manner, 对于
Figure FDA0002770454790000044
磁力计和惯性传感器坐标系之间的旋转角为小角度,故
Figure FDA0002770454790000045
接近单位阵,CSI各个元素值都比较小,CNO主对角线元素为0,其余元素也较小,SM只有主对角线元素,各元素数值接近1,故
Figure FDA0002770454790000046
的初值为单位阵I3×3
for
Figure FDA0002770454790000044
The rotation angle between the magnetometer and the inertial sensor coordinate system is a small angle, so
Figure FDA0002770454790000045
Close to the unit matrix, the value of each element of CSI is relatively small, the main diagonal element of C NO is 0, and the other elements are also small, SM has only the main diagonal element, and the value of each element is close to 1, so
Figure FDA0002770454790000046
The initial value of the unit matrix I 3 × 3 ;
对于BM的初值,只考虑磁力计受零偏误差影响,通过进一步简化模型,即
Figure FDA0002770454790000047
将磁力计原始观测数据mb_init作为第一次迭代计算时载体坐标系下的磁场真值,即
Figure FDA0002770454790000048
根据每个历元的
Figure FDA0002770454790000049
Figure FDA00027704547900000410
表示每个历元的载体坐标系到当地坐标系的姿态旋转矩阵,求得当地坐标系下各轴的磁场强度的均值
Figure FDA00027704547900000411
作为当地坐标系下的磁场强度的真值;在基于磁强总强度不变的假设下,根据Mn_CGRF求得其磁场总强度||Mn_CGRF||,通过计算出
Figure FDA00027704547900000412
与||Mn_CGRF||的比例关系,将
Figure FDA00027704547900000413
各轴的数据等比例变化,得到Mn_ture,将其作为当地坐标系下的磁场真值,进而得到载体坐标系下磁场强度参考真值
Figure FDA00027704547900000414
For the initial value of BM , only the magnetometer is affected by the bias error, and by further simplifying the model, that is,
Figure FDA0002770454790000047
The original observation data m b_init of the magnetometer is taken as the true value of the magnetic field in the carrier coordinate system during the first iterative calculation, namely
Figure FDA0002770454790000048
According to each epoch
Figure FDA0002770454790000049
Figure FDA00027704547900000410
Represents the attitude rotation matrix from the carrier coordinate system of each epoch to the local coordinate system, and obtains the mean value of the magnetic field strength of each axis in the local coordinate system
Figure FDA00027704547900000411
As the true value of the magnetic field strength in the local coordinate system; under the assumption that the total magnetic strength is constant, the total magnetic field strength ||M n_CGRF || is obtained from Mn_CGRF , and by calculating
Figure FDA00027704547900000412
proportional to ||M n_CGRF ||, the
Figure FDA00027704547900000413
The data of each axis changes in equal proportion to obtain M n_ture , which is used as the true value of the magnetic field in the local coordinate system, and then the reference true value of the magnetic field strength in the carrier coordinate system is obtained.
Figure FDA00027704547900000414
将原始数据mb_init
Figure FDA0002770454790000051
求差得到每个历元的零偏,再将其求平均得到BM
Compare the original data m b_init with
Figure FDA0002770454790000051
Calculate the difference to get the zero offset of each epoch, and then average it to get BM ;
Figure FDA0002770454790000052
Figure FDA0002770454790000052
当本次迭代求得的BM和上次迭代求得的BM各轴之差小于0.1mGauss时,认为零偏标定完成,否则根据
Figure FDA0002770454790000053
更新
Figure FDA0002770454790000054
重复上述过程,最终求得BM,将其作为泰勒展开中的初值。
When the difference between the BM obtained from this iteration and the BM obtained from the previous iteration is less than 0.1mGauss , the zero-bias calibration is considered to be completed; otherwise, according to
Figure FDA0002770454790000053
renew
Figure FDA0002770454790000054
Repeat the above process, and finally obtain B M , which is used as the initial value in Taylor expansion.
6.根据权利要求1所述一种基于已知姿态角的磁力计标定方法,其特征在于:步骤2中,使传感器绕着载体坐标系的X、Y、Z三轴各旋转720度,所述姿态角包括俯仰角、横滚角、航向角。6. A magnetometer calibration method based on a known attitude angle according to claim 1, characterized in that: in step 2, the sensor is rotated 720 degrees around the X, Y, and Z axes of the carrier coordinate system, so that The attitude angle includes pitch angle, roll angle, and heading angle.
CN202011247295.4A 2020-11-10 2020-11-10 Magnetometer calibration method based on known attitude angle Active CN112461224B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011247295.4A CN112461224B (en) 2020-11-10 2020-11-10 Magnetometer calibration method based on known attitude angle

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011247295.4A CN112461224B (en) 2020-11-10 2020-11-10 Magnetometer calibration method based on known attitude angle

Publications (2)

Publication Number Publication Date
CN112461224A true CN112461224A (en) 2021-03-09
CN112461224B CN112461224B (en) 2021-09-14

Family

ID=74825540

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011247295.4A Active CN112461224B (en) 2020-11-10 2020-11-10 Magnetometer calibration method based on known attitude angle

Country Status (1)

Country Link
CN (1) CN112461224B (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113074752A (en) * 2021-03-11 2021-07-06 清华大学 Dynamic calibration method and system for vehicle-mounted geomagnetic sensor
CN113310505A (en) * 2021-06-15 2021-08-27 苏州挚途科技有限公司 External parameter calibration method and device of sensor system and electronic equipment
CN114383631A (en) * 2021-12-10 2022-04-22 中国兵器工业集团第二一四研究所苏州研发中心 Real-time calibration method based on least square, Taylor expansion and comprehensive residual combination
CN115839726A (en) * 2023-02-23 2023-03-24 湖南二零八先进科技有限公司 Method, system and medium for jointly calibrating magnetic sensor and angular speed sensor
CN119413183A (en) * 2025-01-07 2025-02-11 中国科学院空天信息创新研究院 Iterative least square artificial magnetic field positioning method and device not affected by gesture
CN119555022A (en) * 2025-01-17 2025-03-04 之江实验室 Vector magnetic measuring and attitude determining method and device, storage medium and electronic equipment
CN119555022B (en) * 2025-01-17 2025-04-18 之江实验室 A vector magnetometer attitude determination method, device, storage medium and electronic equipment

Citations (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5165269A (en) * 1990-10-29 1992-11-24 Iimorrow, Inc. Electronic flux gate compass calibration technique
EP1985233A1 (en) * 2007-04-25 2008-10-29 Commissariat à l'Energie Atomique Method and device for detecting a substantially invariant axis of rotation
CN102735268A (en) * 2012-07-10 2012-10-17 中国人民解放军国防科学技术大学 Strapdown three-shaft magnetometer calibrating method based on posture optimization excitation
CN103175616A (en) * 2011-12-20 2013-06-26 弗卢克公司 Thermal imaging camera with compass calibration
DE102012013516A1 (en) * 2012-07-06 2014-01-09 Giesecke & Devrient Gmbh Calibrating a magnetic sensor
CN103630137A (en) * 2013-12-02 2014-03-12 东南大学 Correction method used for attitude and course angles of navigation system
CN104613983A (en) * 2015-02-03 2015-05-13 中国航天时代电子公司 Whole machine magnetometer calibration method applied to micro unmanned plane
CN105043380A (en) * 2015-06-29 2015-11-11 武汉大学 Indoor navigation method based on a micro electro mechanical system, WiFi (Wireless Fidelity) positioning and magnetic field matching
CN105180968A (en) * 2015-09-02 2015-12-23 北京天航华创科技股份有限公司 IMU/magnetometer installation misalignment angle online filter calibration method
CN105571578A (en) * 2015-12-14 2016-05-11 武汉大学 In-situ rotating modulating north-seeking method utilizing pseudo-observation instead of precise turntable
CN105676302A (en) * 2015-11-12 2016-06-15 东南大学 Magnetometer random noise error compensation method based on improved least square method
CN106323334A (en) * 2015-06-25 2017-01-11 中国科学院上海高等研究院 Magnetometer calibration method based on particle swarm optimization
CN108225378A (en) * 2018-01-25 2018-06-29 陕西土豆数据科技有限公司 A kind of computational methods of compass and accelerometer fix error angle
CN109459020A (en) * 2018-12-24 2019-03-12 哈尔滨工程大学 A kind of inertia and magnetometer combine self-adapting anti-jamming method
US20190133531A1 (en) * 2017-02-13 2019-05-09 National Tsing Hua University Object pose measurement system based on mems imu and method thereof
CN110174123A (en) * 2019-05-08 2019-08-27 苏州大学 A kind of Magnetic Sensor real-time calibration method
EP3620752A1 (en) * 2018-09-05 2020-03-11 Sword Health, S.A. Method and system for calibrating sensors
CN112334736A (en) * 2018-06-13 2021-02-05 西斯纳维 Method for calibrating a magnetometer of an object

Patent Citations (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5165269A (en) * 1990-10-29 1992-11-24 Iimorrow, Inc. Electronic flux gate compass calibration technique
EP1985233A1 (en) * 2007-04-25 2008-10-29 Commissariat à l'Energie Atomique Method and device for detecting a substantially invariant axis of rotation
CN103175616A (en) * 2011-12-20 2013-06-26 弗卢克公司 Thermal imaging camera with compass calibration
DE102012013516A1 (en) * 2012-07-06 2014-01-09 Giesecke & Devrient Gmbh Calibrating a magnetic sensor
CN102735268A (en) * 2012-07-10 2012-10-17 中国人民解放军国防科学技术大学 Strapdown three-shaft magnetometer calibrating method based on posture optimization excitation
CN103630137A (en) * 2013-12-02 2014-03-12 东南大学 Correction method used for attitude and course angles of navigation system
CN104613983A (en) * 2015-02-03 2015-05-13 中国航天时代电子公司 Whole machine magnetometer calibration method applied to micro unmanned plane
CN106323334A (en) * 2015-06-25 2017-01-11 中国科学院上海高等研究院 Magnetometer calibration method based on particle swarm optimization
CN105043380A (en) * 2015-06-29 2015-11-11 武汉大学 Indoor navigation method based on a micro electro mechanical system, WiFi (Wireless Fidelity) positioning and magnetic field matching
CN105180968A (en) * 2015-09-02 2015-12-23 北京天航华创科技股份有限公司 IMU/magnetometer installation misalignment angle online filter calibration method
CN105676302A (en) * 2015-11-12 2016-06-15 东南大学 Magnetometer random noise error compensation method based on improved least square method
CN105571578A (en) * 2015-12-14 2016-05-11 武汉大学 In-situ rotating modulating north-seeking method utilizing pseudo-observation instead of precise turntable
US20190133531A1 (en) * 2017-02-13 2019-05-09 National Tsing Hua University Object pose measurement system based on mems imu and method thereof
CN108225378A (en) * 2018-01-25 2018-06-29 陕西土豆数据科技有限公司 A kind of computational methods of compass and accelerometer fix error angle
CN112334736A (en) * 2018-06-13 2021-02-05 西斯纳维 Method for calibrating a magnetometer of an object
EP3620752A1 (en) * 2018-09-05 2020-03-11 Sword Health, S.A. Method and system for calibrating sensors
CN109459020A (en) * 2018-12-24 2019-03-12 哈尔滨工程大学 A kind of inertia and magnetometer combine self-adapting anti-jamming method
CN110174123A (en) * 2019-05-08 2019-08-27 苏州大学 A kind of Magnetic Sensor real-time calibration method

Non-Patent Citations (8)

* Cited by examiner, † Cited by third party
Title
GEBRE-EGZIABHER, D ET AL.: "A gyro-free quaternion-based attitude determination system suitable for implementation using low cast sensors", 《IEEE 2000. POSITION LOCATION AND NAVIGATION SYMPOSIUM》 *
HENKEL, P.ET AL.: "Calibration of magnetic field sensors with two mass-market GNSS receivers", 《2014 11TH WORKSHOP ON POSITIONING, NAVIGATION AND COMMUNICATION (WPNC)》 *
JIAN KUANG ET AL.: "Robust pedestrain dead reckoning based on MEMS-IMU for smartphones", 《SENSORS》 *
JIAN KUANG ET AL.: "Robust Pedestrian Dead Reckoning Based on MEMS-IMU for Smartphones", 《SENSORS》 *
ZHIJIAN DING ET AL.: "Novel low cost calibration methods for MEMS inertial/magnetic integrated sensors", 《PROCEEDINGS OF 2014 IEEE CHINESE GUIDANCE, NAVIGATION AND CONTROL CONFERENCE》 *
张鹏 等: "基于PDR、WiFi指纹识别、磁场匹配组合的室内行人导航定位", 《测绘地理信息》 *
李泰宇 等: "基于磁强计阵列的室内行人定位算法研究", 《传感技术学报》 *
郑元勋 等: "高精度磁信标中心位置与姿态角标定方法", 《中国惯性技术学报》 *

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113074752A (en) * 2021-03-11 2021-07-06 清华大学 Dynamic calibration method and system for vehicle-mounted geomagnetic sensor
CN113310505A (en) * 2021-06-15 2021-08-27 苏州挚途科技有限公司 External parameter calibration method and device of sensor system and electronic equipment
CN113310505B (en) * 2021-06-15 2024-04-09 苏州挚途科技有限公司 External parameter calibration method and device of sensor system and electronic equipment
CN114383631A (en) * 2021-12-10 2022-04-22 中国兵器工业集团第二一四研究所苏州研发中心 Real-time calibration method based on least square, Taylor expansion and comprehensive residual combination
CN115839726A (en) * 2023-02-23 2023-03-24 湖南二零八先进科技有限公司 Method, system and medium for jointly calibrating magnetic sensor and angular speed sensor
CN119413183A (en) * 2025-01-07 2025-02-11 中国科学院空天信息创新研究院 Iterative least square artificial magnetic field positioning method and device not affected by gesture
CN119555022A (en) * 2025-01-17 2025-03-04 之江实验室 Vector magnetic measuring and attitude determining method and device, storage medium and electronic equipment
CN119555022B (en) * 2025-01-17 2025-04-18 之江实验室 A vector magnetometer attitude determination method, device, storage medium and electronic equipment

Also Published As

Publication number Publication date
CN112461224B (en) 2021-09-14

Similar Documents

Publication Publication Date Title
CN112461224B (en) Magnetometer calibration method based on known attitude angle
CN104406610B (en) A kind of magnetometer real time correction device and method
CN107024674B (en) A fast on-site calibration method of magnetometer based on recursive least squares method
CN103591949B (en) The quadrature compensation method of three-axis attitude measuring system nonorthogonality error
CN110146839A (en) A Calibration Method for Magnetic Gradient Tensor System of Mobile Platform
CN109084806B (en) Scalar field MEMS inertial system calibration method
Tabatabaei et al. A fast calibration method for triaxial magnetometers
WO2022160391A1 (en) Magnetometer information assisted mems gyroscope calibration method and calibration system
CN113866688B (en) A three-axis magnetic sensor error calibration method under the condition of small attitude angle
CN110160554A (en) A kind of single-shaft-rotation Strapdown Inertial Navigation System scaling method based on optimizing method
CN112113564B (en) Positioning method and system based on image sensor and inertial sensor
CN116817896B (en) Gesture resolving method based on extended Kalman filtering
CN107024673B (en) Three axis magnetometer total error scaling method based on gyroscope auxiliary
CN102435140A (en) A Method for Constructing a Geographical Coordinate System for a Laser Tracker
CN109059960B (en) A kind of calibration method of three-dimensional electronic compass
CN115420305B (en) Error Compensation Method for Three-axis Magnetic Sensor Based on Adaptive Assignment of Sampling Point Weight
CN108088431B (en) A self-calibrating electronic compass and its calibration method
Li et al. Robust heading measurement based on improved berry model for bionic polarization navigation
Chen et al. A novel calibration method for tri-axial magnetometers based on an expanded error model and a two-step total least square algorithm
CN108037536A (en) The half aviation transient electromagnetic receiving coil posture antidote based on three-axis reference
CN113375693B (en) A Geomagnetic Heading Error Correction Method
CN109931956A (en) Three-axis magnetometer and inertial navigation installation error correction method in strapdown three-component magnetic measurement system
Cui et al. Three-axis magnetometer calibration based on optimal ellipsoidal fitting under constraint condition for pedestrian positioning system using foot-mounted inertial sensor/magnetometer
CN110398702B (en) A real-time online magnetic calibration method based on multi-sensor fusion
CN110375773B (en) Attitude initialization method for MEMS inertial navigation system

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