CN109883451A - An adaptive gain complementary filtering method and system for pedestrian orientation estimation - Google Patents
An adaptive gain complementary filtering method and system for pedestrian orientation estimation Download PDFInfo
- Publication number
- CN109883451A CN109883451A CN201910300517.5A CN201910300517A CN109883451A CN 109883451 A CN109883451 A CN 109883451A CN 201910300517 A CN201910300517 A CN 201910300517A CN 109883451 A CN109883451 A CN 109883451A
- Authority
- CN
- China
- Prior art keywords
- gyroscope
- coordinate system
- accelerometer
- magnetometer
- quaternion
- 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.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 58
- 230000003044 adaptive effect Effects 0.000 title claims abstract description 43
- 230000000295 complement effect Effects 0.000 title claims abstract description 40
- 238000001914 filtration Methods 0.000 title claims abstract description 21
- 238000005259 measurement Methods 0.000 claims abstract description 45
- 238000005457 optimization Methods 0.000 claims abstract description 36
- 238000004422 calculation algorithm Methods 0.000 claims abstract description 27
- 238000004364 calculation method Methods 0.000 claims abstract description 13
- 239000013598 vector Substances 0.000 claims description 24
- 230000008859 change Effects 0.000 claims description 21
- 230000001133 acceleration Effects 0.000 claims description 19
- 238000004590 computer program Methods 0.000 claims description 4
- 230000008901 benefit Effects 0.000 abstract description 5
- 230000033001 locomotion Effects 0.000 description 19
- 230000007774 longterm Effects 0.000 description 7
- 239000011159 matrix material Substances 0.000 description 6
- 230000005484 gravity Effects 0.000 description 5
- 230000010354 integration Effects 0.000 description 5
- 238000009825 accumulation Methods 0.000 description 3
- 238000002474 experimental method Methods 0.000 description 3
- 230000006870 function Effects 0.000 description 3
- 230000004927 fusion Effects 0.000 description 3
- 230000008569 process Effects 0.000 description 3
- 238000004458 analytical method Methods 0.000 description 2
- 238000006243 chemical reaction Methods 0.000 description 2
- QBWCMBCROVPCKQ-UHFFFAOYSA-N chlorous acid Chemical compound OCl=O QBWCMBCROVPCKQ-UHFFFAOYSA-N 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 230000004807 localization Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000011282 treatment Methods 0.000 description 2
- NAWXUBYGYWOOIX-SFHVURJKSA-N (2s)-2-[[4-[2-(2,4-diaminoquinazolin-6-yl)ethyl]benzoyl]amino]-4-methylidenepentanedioic acid Chemical compound C1=CC2=NC(N)=NC(N)=C2C=C1CCC1=CC=C(C(=O)N[C@@H](CC(=C)C(O)=O)C(O)=O)C=C1 NAWXUBYGYWOOIX-SFHVURJKSA-N 0.000 description 1
- CWYNVVGOOAEACU-UHFFFAOYSA-N Fe2+ Chemical compound [Fe+2] CWYNVVGOOAEACU-UHFFFAOYSA-N 0.000 description 1
- 208000006011 Stroke Diseases 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000013480 data collection Methods 0.000 description 1
- 230000007812 deficiency Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 201000010099 disease Diseases 0.000 description 1
- 208000037265 diseases, disorders, signs and symptoms Diseases 0.000 description 1
- 239000003814 drug Substances 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000011156 evaluation Methods 0.000 description 1
- 230000003203 everyday effect Effects 0.000 description 1
- 238000009472 formulation Methods 0.000 description 1
- 230000005021 gait Effects 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 239000000463 material Substances 0.000 description 1
- 230000000116 mitigating effect Effects 0.000 description 1
- 239000000203 mixture Substances 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 230000007659 motor function Effects 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 238000013139 quantization Methods 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 238000005070 sampling Methods 0.000 description 1
- 230000003595 spectral effect Effects 0.000 description 1
Landscapes
- Gyroscopes (AREA)
Abstract
本公开提出了一种用于行人方位估计的自适应增益互补滤波方法及系统,包括:数据采集;基于陀螺仪的方向估计;利用高斯‑牛顿优化方法计算加速度计和磁力计测量值的方向;自适应滤波器的时变参数被设为每个方向的权值,增益是根据基于高斯‑牛顿优化算法的低通频率的收敛率和基于陀螺仪的高通频率的发散率进行自适应调节,获得陀螺仪最后的方向估计。将来自于高斯‑牛顿优化算法的收敛率和来自于陀螺仪的发散率进行有效的互补,它不仅具有一次迭代计算的优点,而且计算负荷小,从而可以实时地获得陀螺仪测量误差的精确方向。
The present disclosure provides an adaptive gain complementary filtering method and system for pedestrian orientation estimation, including: data acquisition; gyroscope-based orientation estimation; using Gauss-Newton optimization method to calculate the orientation of accelerometer and magnetometer measurement values; The time-varying parameters of the adaptive filter are set as weights in each direction, and the gain is adaptively adjusted according to the convergence rate of the low-pass frequency based on the Gauss-Newton optimization algorithm and the divergence rate of the high-pass frequency based on the gyroscope. The final orientation estimate of the gyroscope. The convergence rate from the Gauss-Newton optimization algorithm and the divergence rate from the gyroscope are effectively complemented. It not only has the advantage of one iteration calculation, but also has a small calculation load, so that the precise direction of the gyroscope measurement error can be obtained in real time. .
Description
技术领域technical field
本公开涉及滤波数据处理技术领域,特别是涉及一种用于行人方位估计的自适应增益互补滤波方法及系统。The present disclosure relates to the technical field of filtering data processing, and in particular, to an adaptive gain complementary filtering method and system for pedestrian orientation estimation.
背景技术Background technique
最近,人体运动捕捉系统(运动追踪)的发展受到临床医学的高度刺激,其中步态分析是运动捕捉的主要应用。通过这些系统获得的高分辨率、定量数据可用于更好地了解多种疾病的原因,从而形成有效的治疗方法,比如对于失去运动功能的门诊患者或中风患者的康复。持续监测患者在自由生活环境中的人体运动可提供更有价值的反馈来指导临床治疗。然而,超越实验室环境并获得人体活动的准确测量,尤其是在自由生活环境下,这是极具挑战性的。目前,商业人体运动捕捉系统拥有出色捕捉和重建系统,但需要外部设备(如相机),并且不能为用户提供日常环境下的重要信息。Recently, the development of human motion capture systems (motion tracking) has been highly stimulated by clinical medicine, where gait analysis is the main application of motion capture. The high-resolution, quantitative data obtained through these systems can be used to better understand the causes of a variety of diseases, leading to effective treatments, such as the rehabilitation of outpatients who have lost motor function or stroke patients. Continuous monitoring of a patient's body movements in a free-living environment can provide more valuable feedback to guide clinical treatment. However, going beyond laboratory settings and obtaining accurate measurements of human activity, especially in free-living settings, is extremely challenging. Currently, commercial human motion capture systems have excellent capture and reconstruction systems, but require external equipment (such as cameras) and cannot provide users with important information in their everyday environment.
通常,人体可以被建模为由关节连接的多节段的连杆系统,其被称为运动链。如果可以确定相对于每个节段的方位,则可以计算出基于该运动链的人体的整体运动。因此,关节角的准确估计在人体运动分析中具有重要的作用。可以通过附着于人体的惯性传感器模块来测量各个节段的方向。这种传感器模块通常由三轴加速度计,三轴陀螺仪和三轴磁力计组成,尺寸紧凑,可称为可穿戴惯性传感器。Generally, the human body can be modeled as a multi-segment linkage system connected by joints, which is called a kinematic chain. If the orientation relative to each segment can be determined, the overall motion of the human body based on that kinematic chain can be calculated. Therefore, accurate estimation of joint angles plays an important role in human motion analysis. The orientation of each segment can be measured by inertial sensor modules attached to the human body. This sensor module usually consists of a three-axis accelerometer, a three-axis gyroscope, and a three-axis magnetometer, and is compact in size and can be called a wearable inertial sensor.
然而,使用惯性传感器估计方向存在两个主要的挑战。首先,直接对三轴陀螺仪的角速度进行积分,是一个挑战;因为惯性传感器固有的物理限制会对方向的估计精度产生负面影响,惯性传感器在输出数据的同时会产生噪声,并在长期跟踪中迅速引起漂移误差累积。长期跟踪过程中积累的漂移误差阻碍了其在人体运动捕捉评估中的有效应用。其次,作为用于减轻方向漂移的辅助传感器:三轴加速度计和磁力计,它们分别被用作垂直(地球重力)和水平(地球磁场)参考。然而,加速度计在动态运动条件下对身体的多余加速度敏感(除重力之外),而磁力计测量很容易受到局部地球磁场变化的影响,例如由电器或由黑色金属材料制成的物体引起的地球磁场方向的变化,从而影响所需的方向估计。此外,加速度计和磁力计的输出也包含测量误差。However, there are two main challenges in estimating orientation using inertial sensors. First, it is a challenge to directly integrate the angular velocity of the three-axis gyroscope; because the inherent physical limitations of inertial sensors can negatively affect the accuracy of orientation estimation, inertial sensors can generate noise while outputting data, and in long-term tracking Quickly cause drift errors to accumulate. The drift error accumulated during long-term tracking hinders its effective application in human motion capture evaluation. Second, as auxiliary sensors for mitigating directional drift: a three-axis accelerometer and a magnetometer, which are used as vertical (Earth gravity) and horizontal (Earth magnetic field) references, respectively. However, accelerometers are sensitive to excess acceleration of the body (in addition to gravity) under dynamic motion conditions, while magnetometer measurements are susceptible to changes in local Earth's magnetic field, such as those caused by electrical appliances or objects made of ferrous materials Changes in the orientation of the Earth's magnetic field, thereby affecting the desired orientation estimate. In addition, the outputs of the accelerometers and magnetometers also contain measurement errors.
发明内容SUMMARY OF THE INVENTION
为了解决现有技术的不足,本公开实施例子提供了一种用于行人方位估计的自适应增益互补滤波方法,将来自于高斯-牛顿优化算法的收敛率和来自于陀螺仪的发散率进行有效的互补,它不仅具有一次迭代计算的优点,减少计算负荷,而且还可获得陀螺仪测量误差的精确方向。In order to solve the deficiencies of the prior art, the embodiments of the present disclosure provide an adaptive gain complementary filtering method for pedestrian orientation estimation, which effectively combines the convergence rate from the Gauss-Newton optimization algorithm and the divergence rate from the gyroscope. Complementary, it not only has the advantage of one iterative calculation to reduce the computational load, but also can obtain the precise direction of the gyroscope measurement error.
本说明书实施例子公开了一种用于行人方位估计的自适应增益互补滤波方法,通过以下技术方案实现:The embodiment of this specification discloses an adaptive gain complementary filtering method for pedestrian orientation estimation, which is realized by the following technical solutions:
包括:include:
数据采集:利用集成三轴加速度计、三轴陀螺仪、三轴磁力计的惯性传感器获得行人载体的三轴的加速度、角速度和磁场强度;Data acquisition: use the inertial sensor integrated with a three-axis accelerometer, a three-axis gyroscope, and a three-axis magnetometer to obtain the three-axis acceleration, angular velocity and magnetic field strength of the pedestrian carrier;
基于陀螺仪的方向估计:将三轴的陀螺仪测量的数据使用四元数表示,利用四元数的导数描述传感器坐标系相对于地球坐标系下的方向变化率,在已知初始条件下,通过对四元数的导数的积分获得传感器坐标系相对于对地球坐标系下的方向;Direction estimation based on gyroscope: The data measured by the three-axis gyroscope is represented by a quaternion, and the derivative of the quaternion is used to describe the direction change rate of the sensor coordinate system relative to the earth coordinate system. Under known initial conditions, The orientation of the sensor coordinate system relative to the earth coordinate system is obtained by integrating the derivative of the quaternion;
利用高斯-牛顿优化方法计算加速度计和磁力计测量值的方向;Calculate the orientation of the accelerometer and magnetometer measurements using the Gauss-Newton optimization method;
自适应滤波器的时变参数被设为每个方向的权值,增益是根据基于高斯-牛顿优化算法的低通频率的收敛率和基于陀螺仪的高通频率的发散率进行自适应调节,获得陀螺仪最后的方向估计。The time-varying parameters of the adaptive filter are set as the weights in each direction, and the gain is adaptively adjusted according to the convergence rate of the low-pass frequency based on the Gauss-Newton optimization algorithm and the divergence rate of the high-pass frequency based on the gyroscope. The final orientation estimate of the gyroscope.
本说明书实施例子公开了一种用于行人方位估计的自适应增益互补滤波系统,通过以下技术方案实现:The embodiment of this specification discloses an adaptive gain complementary filtering system for pedestrian orientation estimation, which is realized by the following technical solutions:
包括:include:
数据采集单元,被配置为:利用集成三轴加速度计、三轴陀螺仪、三轴磁力计的惯性传感器获得行人载体的三轴的加速度、角速度和磁场强度;The data acquisition unit is configured to: obtain the three-axis acceleration, angular velocity and magnetic field strength of the pedestrian carrier by using an inertial sensor integrating a three-axis accelerometer, a three-axis gyroscope, and a three-axis magnetometer;
基于陀螺仪的方向估计单元,被配置为:将三轴的陀螺仪测量的数据使用四元数表示,利用四元数的导数描述传感器坐标系相对于地球坐标系下的方向变化率,在已知初始条件下,通过对四元数的导数的积分获得传感器坐标系相对于对地球坐标系下的方向;The gyroscope-based direction estimation unit is configured to: represent the data measured by the three-axis gyroscope with a quaternion, and use the derivative of the quaternion to describe the direction change rate of the sensor coordinate system relative to the earth coordinate system. Under the known initial conditions, the direction of the sensor coordinate system relative to the earth coordinate system is obtained by integrating the derivative of the quaternion;
加速度计和磁力计测量值的方向计算单元,被配置为:利用高斯-牛顿优化方法计算加速度计和磁力计测量值的方向;an orientation calculation unit for the measured values of the accelerometer and the magnetometer, configured to: use a Gauss-Newton optimization method to calculate the orientation of the measured values of the accelerometer and the magnetometer;
陀螺仪最后的方向估计单元,被配置为:自适应滤波器的时变参数被设为每个方向的权值,增益是根据基于高斯-牛顿优化算法的低通频率的收敛率和基于陀螺仪的高通频率的发散率进行自适应调节,获得陀螺仪最后的方向估计。The final direction estimation unit of the gyroscope is configured as: the time-varying parameters of the adaptive filter are set as the weights of each direction, and the gain is based on the convergence rate of the low-pass frequency based on the Gauss-Newton optimization algorithm and the gyroscope-based The divergence rate of the high-pass frequency is adaptively adjusted to obtain the final orientation estimate of the gyroscope.
本说明书实施例子公开了一种用于行人方位估计的自适应增益互补滤波器,所述滤波器被配置为执行以下内容:Embodiments of this specification disclose an adaptive gain complementary filter for pedestrian orientation estimation, the filter being configured to perform the following:
基于陀螺仪的方向估计:将三轴的陀螺仪测量的数据使用四元数表示,利用四元数的导数描述传感器坐标系相对于地球坐标系下的方向变化率,在已知初始条件下,通过对四元数的导数的积分获得传感器坐标系相对于地球坐标系的方向;Direction estimation based on gyroscope: The data measured by the three-axis gyroscope is represented by a quaternion, and the derivative of the quaternion is used to describe the direction change rate of the sensor coordinate system relative to the earth coordinate system. Under known initial conditions, Obtain the orientation of the sensor coordinate system relative to the earth coordinate system by integrating the derivative of the quaternion;
利用高斯-牛顿优化方法计算加速度计和磁力计测量值的方向;Calculate the orientation of the accelerometer and magnetometer measurements using the Gauss-Newton optimization method;
自适应滤波器的时变参数被设为每个方向的权值,增益是根据基于高斯-牛顿优化算法的低通频率的收敛率和基于陀螺仪的高通频率的发散率进行自适应调节,获得陀螺仪最后的方向估计。The time-varying parameters of the adaptive filter are set as the weights in each direction, and the gain is adaptively adjusted according to the convergence rate of the low-pass frequency based on the Gauss-Newton optimization algorithm and the divergence rate of the high-pass frequency based on the gyroscope. The final orientation estimate of the gyroscope.
与现有技术相比,本公开的有益效果是:Compared with the prior art, the beneficial effects of the present disclosure are:
本公开的技术方案将来自于高斯-牛顿优化算法的收敛率和来自于陀螺仪的发散率进行有效的互补,它不仅具有一次迭代计算的优点,而且计算负荷小,从而可以实时地获得陀螺仪测量误差的精确方向。The technical solution of the present disclosure effectively complements the convergence rate from the Gauss-Newton optimization algorithm and the divergence rate from the gyroscope. It not only has the advantage of one-time iterative calculation, but also has a small calculation load, so that the gyroscope can be obtained in real time. Precise direction of measurement error.
附图说明Description of drawings
构成本公开的一部分的说明书附图用来提供对本公开的进一步理解,本公开的示意性实施例及其说明用于解释本公开,并不构成对本公开的不当限定。The accompanying drawings that constitute a part of the present disclosure are used to provide further understanding of the present disclosure, and the exemplary embodiments of the present disclosure and their descriptions are used to explain the present disclosure and do not constitute an improper limitation of the present disclosure.
图1为本公开实施好例子的自适应增益互补滤波器算法的主要架构图;FIG. 1 is a main architectural diagram of an adaptive gain complementary filter algorithm of a good example of the present disclosure;
图2为本公开实施好例子的传感器坐标系和地球坐标系之间的转换关系。本专利中传感器坐标系记为s,地球坐标系记为e;FIG. 2 is a conversion relationship between the sensor coordinate system and the earth coordinate system of a good example of the present disclosure. In this patent, the sensor coordinate system is recorded as s, and the earth coordinate system is recorded as e;
图3为本公开实施好例子的自适应增益互补滤波器算法的具体公式化框图,它是图一的具体公式化形式;FIG. 3 is a specific formula block diagram of the adaptive gain complementary filter algorithm of a good example of the present disclosure, which is the specific formula form of FIG. 1;
图4为本公开实施好例子的含有磁铁干扰情况下,三个轴的磁干扰情况。在摆动磁铁的时刻,三轴的磁干扰情况明显;FIG. 4 shows the magnetic interference of three axes when the magnetic interference is included in a good example of the present disclosure. At the moment of swinging the magnet, the magnetic interference of the three axes is obvious;
图5为本公开实施好例子所提出的适应增益互补滤波器算法和Medgwick方法在磁干扰情况下的方向估计的比较;5 is a comparison of the direction estimation of the adaptive gain complementary filter algorithm proposed by the present disclosure and the Medgwick method in the case of magnetic interference;
图6为本公开实施好例子的突然快速运动下的加速度数据变化值;FIG. 6 is a change value of acceleration data under a sudden and rapid movement of a good example of the present disclosure;
图7为本公开实施好例子的突然快速运动下的方向估计;FIG. 7 is the direction estimation under sudden and fast motion of a good example of the present disclosure;
图8为本公开实施好例子的陀螺仪x,y和z轴偏差的估计结果。FIG. 8 is an estimation result of gyroscope x, y and z axis deviations according to a good example of the present disclosure.
具体实施方式Detailed ways
应该指出,以下详细说明都是例示性的,旨在对本公开提供进一步的说明。除非另有指明,本文使用的所有技术和科学术语具有与本公开所属技术领域的普通技术人员通常理解的相同含义。It should be noted that the following detailed description is exemplary and intended to provide further explanation of the present disclosure. Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this disclosure belongs.
需要注意的是,这里所使用的术语仅是为了描述具体实施方式,而非意图限制根据本公开的示例性实施方式。如在这里所使用的,除非上下文另外明确指出,否则单数形式也意图包括复数形式,此外,还应当理解的是,当在本说明书中使用术语“包含”和/或“包括”时,其指明存在特征、步骤、操作、器件、组件和/或它们的组合。It should be noted that the terminology used herein is for the purpose of describing specific embodiments only, and is not intended to limit the exemplary embodiments according to the present disclosure. As used herein, unless the context clearly dictates otherwise, the singular is intended to include the plural as well, furthermore, it is to be understood that when the terms "comprising" and/or "including" are used in this specification, it indicates that There are features, steps, operations, devices, components and/or combinations thereof.
术语解释部分:高斯-牛顿优化算法(Gauss-Newton optimization algorithm,GNA)。Terminology explanation part: Gauss-Newton optimization algorithm (Gauss-Newton optimization algorithm, GNA).
实施例子一Example 1
该实施例子公开了一种用于行人方位估计的自适应增益互补滤波方法,该方法能够1)准确估计陀螺仪测量误差以校正陀螺仪的瞬时测量值;2)处理磁场失真;3)减少计算负荷和降低传感器的误差累积。This embodiment discloses an adaptive gain complementary filtering method for pedestrian orientation estimation, which can 1) accurately estimate the measurement error of the gyroscope to correct the instantaneous measurement value of the gyroscope; 2) deal with the magnetic field distortion; 3) reduce the calculation load and reduce sensor error accumulation.
在该实施例子中,自适应增益互补滤波器算法,它是以高斯-牛顿优化算法(GNA)的收敛率和陀螺仪发散率为基础,关键技术主要包括:(1)数据采集;(2)四元数表示;(3)陀螺积分;(4)矢量观测;(5)互补滤波器;(6)补偿方案;(7)滤波增益。In this example, the adaptive gain complementary filter algorithm is based on the convergence rate and gyroscope divergence rate of the Gauss-Newton optimization algorithm (GNA), and the key technologies mainly include: (1) data acquisition; (2) Quaternion representation; (3) Gyro integration; (4) Vector observation; (5) Complementary filter; (6) Compensation scheme; (7) Filter gain.
图1中,自适应增益互补滤波方法主要由四部分组成:1)陀螺积分2)矢量观察3)互补滤波器4)补偿方案;对传感器进行校正,由于本传感器中集成了三轴的加速度计,三轴的磁力计和三轴的陀螺仪,在传感器出厂时,已经校正过,因此不需要重新校正。首先是陀螺积分,对从陀螺仪中输出的角速度进行一次积分,输出结果作为3)互补滤波器的输入;其次是矢量观察,先将从加速度计中输出的加速度和从磁力计中输出的磁力强度作为4)补偿方案的输入,进而进行测量矢量的选择,然后再将输出结果作为高斯-牛顿方法的输入,高斯-牛顿方法的输出作为3)互补滤波器的另外一个输入,最终从互补滤波器中输出当前时刻的最优方位估计。In Figure 1, the adaptive gain complementary filtering method is mainly composed of four parts: 1) Gyro integration 2) Vector observation 3) Complementary filter 4) Compensation scheme; to correct the sensor, because the sensor integrates a three-axis accelerometer , the three-axis magnetometer and the three-axis gyroscope have been calibrated when the sensor leaves the factory, so there is no need to recalibrate. The first is gyro integration, the angular velocity output from the gyroscope is integrated once, and the output is used as the input of 3) the complementary filter; the second is vector observation, the acceleration output from the accelerometer and the magnetic force output from the magnetometer are first 4) The intensity is used as the input of the compensation scheme, and then the measurement vector is selected, and then the output result is used as the input of the Gauss-Newton method, and the output of the Gauss-Newton method is used as another input of 3) the complementary filter, and finally from the complementary filter The optimal orientation estimate at the current moment is output in the device.
在该实施例子中,关于数据采集部分,使用LPMS-B2惯性传感器进行数据采集,它集成三轴加速度计、三轴陀螺仪、三轴磁力计,欧拉角的取值范围:滚转角:(±180°),俯仰角:(±90°),偏航角(±180°),通过蓝牙与上位机软件LpmsContro连接,可实时地获得三轴的加速度、角速度和磁场强度,实时地计算载体的姿态方向,线性加速度等信息。所测的数据的最终目的是对数据进行分析处理,估计行人的方位。本实验的数据采集频率为50Hz。通过LpmsContro软件获得实时的加速度、角速度和磁力数据。In this example, regarding the data acquisition part, the LPMS-B2 inertial sensor is used for data acquisition, which integrates a three-axis accelerometer, a three-axis gyroscope, and a three-axis magnetometer. The value range of the Euler angle: roll angle: ( ±180°), pitch angle: (±90°), yaw angle (±180°), connected with the host computer software LpmsContro through Bluetooth, the acceleration, angular velocity and magnetic field strength of the three axes can be obtained in real time, and the carrier can be calculated in real time The attitude direction, linear acceleration and other information. The ultimate purpose of the measured data is to analyze and process the data to estimate the orientation of pedestrians. The data collection frequency of this experiment is 50Hz. Real-time acceleration, angular velocity and magnetic force data are obtained through LpmsContro software.
在一实施例子中,惯性传感器可根据需要放置于人的手臂上。In one embodiment, inertial sensors can be placed on a person's arm as desired.
在该实施例子中,关于四元数表示,本实施例子中用到了两个坐标系:载体坐标系(记为s)和地球坐标系(记为e),在实际解算的过程中,需要将载体坐标系的坐标转换到地球坐标系,因此需要知道两个坐标系的转换关系。当载体的坐标系方向相对于绝对坐标系指定时,可以确定载体在空间中的方向,绝对坐标系通常称为地球坐标系e(xe轴指向局部磁北和ze轴指向重力的相反方向),如图2所示。为了方便以下叙述,这里将各个变量的名称列出:In this embodiment, regarding the quaternion representation, two coordinate systems are used in this embodiment: the carrier coordinate system (denoted as s) and the earth coordinate system (denoted as e). Convert the coordinates of the carrier coordinate system to the earth coordinate system, so you need to know the conversion relationship between the two coordinate systems. When the direction of the coordinate system of the carrier is specified relative to the absolute coordinate system, the direction of the carrier in space can be determined. The absolute coordinate system is usually called the earth coordinate system e (the x e axis points to the local magnetic north and the z e axis points to the opposite direction of gravity) ,as shown in picture 2. For the convenience of the following description, the names of each variable are listed here:
s:固联于传感器的下传感器坐标系;s: the lower sensor coordinate system fixed to the sensor;
e:地球坐标系;e: Earth coordinate system;
g:重力矢量;g: gravity vector;
sa:传感器坐标系下加速度的测量值; s a: the measured value of the acceleration in the sensor coordinate system;
sω:传感器坐标系下角速度的测量值; s ω: the measured value of the angular velocity in the sensor coordinate system;
sm:传感器坐标系下磁力的测量值; s m: the measured value of the magnetic force in the sensor coordinate system;
t时刻,传感器坐标系s到地球坐标系e下基于四元数的方向; At time t, the direction from the sensor coordinate system s to the earth coordinate system e based on the quaternion;
t时刻,陀螺仪数据得出的方向估计; At time t, the orientation estimate derived from the gyroscope data;
t时刻从加速度计和磁力计得出的方向估计; orientation estimates from the accelerometer and magnetometer at time t;
t时刻来经过互补滤波融合之后得出的方向估计。 The direction estimate obtained after complementary filtering and fusion at time t.
为了方便表示这两个坐标系之间的旋转,常用的三种旋转表示分别为:欧拉角,旋转矩阵和四元数。欧拉角法虽参数较少,但存在极点,而旋转矩阵法具有更多的参数且计算效率较低。因此本实施例子中使用四元数法来表示这两个坐标系之间的旋转。In order to conveniently represent the rotation between these two coordinate systems, three commonly used rotation representations are: Euler angle, rotation matrix and quaternion. Although the Euler angle method has fewer parameters, it has poles, while the rotation matrix method has more parameters and is less computationally efficient. Therefore, the quaternion method is used in this embodiment to represent the rotation between the two coordinate systems.
具体的,四元数可以被认为是一个具有四个分量的向量,可以由标量s和普通向量u组成,可以通过四元数来计算关于单位矢量v=[vx,vy,vz]相对于角度θ的旋转。如果这个单位矢量v是在s坐标系下定义,对应的在e坐标系下的位置可以通过在s坐标系下围绕这个单位矢量v旋转θ得到,所以s坐标系和e坐标系之间的相对方向可以用单位四元数表示。Specifically, a quaternion can be regarded as a vector with four components, which can be composed of a scalar s and an ordinary vector u, and can be calculated by the quaternion about the unit vector v=[v x , v y , v z ] Rotation relative to angle θ. If the unit vector v is defined in the s coordinate system, the corresponding position in the e coordinate system can be obtained by rotating θ around the unit vector v in the s coordinate system, so the relative relationship between the s coordinate system and the e coordinate system Orientation can use unit quaternions express.
如上所述,坐标系e可以通过在传感器坐标系s下绕单位向量sv旋转θ得到(上标s表明这个矢量是定义在坐标系s中),坐标系s相对于坐标系e的方向可以用单位四元数表示。所以这个单位矢量是定义在e坐标系下,对应关系如公式(3)As mentioned above, the coordinate system e can be obtained by rotating θ around the unit vector s v under the sensor coordinate system s (the superscript s indicates that this vector is defined in the coordinate system s), and the direction of the coordinate system s relative to the coordinate system e can be Use unit quaternions express. So this unit vector is defined in the e coordinate system, and the corresponding relationship is as formula (3)
是的共轭,实际上等于因此, Yes the conjugate of , which is actually equal to therefore,
在该实施例子中,基于陀螺仪的方向估计,此处基于陀螺仪方向的估计是根据公式(5),(6),(7)得出来的。初始系统中,我们默认t=0时刻,地球坐标系和传感器坐标系是重合的,地球坐标系是固定的,而传感器坐标系是变化的,而在实际计算的时候,需要将传感器坐标系转换到地球坐标系,进行解算。In this embodiment, the direction estimation based on the gyroscope, here the estimation based on the direction of the gyroscope is obtained according to formulas (5), (6), (7). In the initial system, we default to time t=0, the earth coordinate system and the sensor coordinate system are coincident, the earth coordinate system is fixed, and the sensor coordinate system changes, and in the actual calculation, the sensor coordinate system needs to be converted. Go to the earth coordinate system and perform the solution.
在传感器坐标系s下,三轴的陀螺仪测量的数据用sω表示,sω可被重新定义为一个含有4个元素的行向量:sω=[0 ωx ωy ωz],使用四元数表示。四元数的导数用来描述传感器坐标系相对于地球坐标系下的方向变化率,可以使用公式(5)计算:In the sensor coordinate system s , the data measured by the three-axis gyroscope is represented by s ω, which can be redefined as a row vector with 4 elements: s ω = [0 ω x ω y ω z ], using Quaternion representation. Derivatives of Quaternions It is used to describe the direction change rate of the sensor coordinate system relative to the earth coordinate system, which can be calculated using formula (5):
其中,Ω(sω)是四元数sω=[0 ωx ωy ωz]的斜对称矩阵,where Ω( s ω) is the obliquely symmetric matrix of the quaternion s ω=[0 ω x ω y ω z ],
因此,在已知初始条件的前提下,在时刻t+Δt传感器坐标系相对于地球坐标系下的方向可以通过对积分获得,如公式(7)所列。Therefore, under known initial conditions Under the premise that the direction of the sensor coordinate system relative to the earth coordinate system at time t+Δt can be Points are obtained as listed in Equation (7).
其中,Δt是采样时间,为时刻t从陀螺仪数据得出的方向估计。这里只是将三轴的陀螺仪测量的数据使用四元数表示,利用四元数的导数描述传感器坐标系相对于地球坐标系下的方向变化率,在已知初始条件下,通过对四元数的导数的积分获得传感器坐标系相对于地球坐标系下的方向,具体求解如公式(7)。where Δt is the sampling time, The orientation estimate derived from the gyroscope data for time t. Here, the data measured by the three-axis gyroscope is represented by a quaternion, and the derivative of the quaternion is used to describe the direction change rate of the sensor coordinate system relative to the earth coordinate system. The integration of the derivative of , obtains the direction of the sensor coordinate system relative to the earth coordinate system, and the specific solution is as formula (7).
在该实施例子中,将高斯-牛顿方法应用到矢量观测(加速度计和磁力计测得的三轴加速度数据和磁力数据),由于加速度计和磁力计可以测量相对于地球的绝对方向,因此可以使用一种称为快速收敛方法来计算其测量值的方向,这种方法被称为高斯-牛顿优化方法。在地球坐标系下它们的归一化参考方向(加速度计eza=[0 0 0 1],磁力计并且初始时刻smt=0/||smt=0||,可根据当前磁力计的测量值和上一时刻的最优值自适应地改变。如图3中的组1.2,当磁力干扰发生时,它的归一化测量值可以由(8)得出:In this example, the Gauss-Newton method is applied to vector observations (three-axis acceleration data and magnetic force data measured by accelerometers and magnetometers), since accelerometers and magnetometers can measure absolute directions relative to the earth, it is possible to The direction of its measurements is calculated using a method called fast convergence, which is known as the Gauss-Newton optimization method. their normalized reference orientations in Earth coordinates (accelerometer ez a = [0 0 0 1], magnetometer And the initial moment s m t=0 /|| s m t=0 || can be adaptively changed according to the current measurement value of the magnetometer and the optimal value at the previous moment. Group 1.2 in Figure 3, when magnetic interference occurs, its normalized measurement can be derived from (8):
通过以下步骤将高斯-牛顿方法建模计算出单位四元数 The Gauss-Newton method is modeled by the following steps to calculate the unit quaternion
寻找: Look for:
最小化: minimize:
其中: in:
满足条件: To meet the conditions:
其中f是价值函数,将其定义为误差函数ε=[εa εm]T的平方,ε由加速度误差εa和磁力计误差εm组成。通过之前定义的eza,ezm,t,sAt,sMt和四元数乘法得出:where f is the value function, which is defined as the square of the error function ε = [ε a ε m ] T , and ε consists of the acceleration error ε a and the magnetometer error ε m . By multiplying ez a , ez m,t , s A t , s M t and quaternion as previously defined:
考虑到自然存在的动态运动和磁场干扰现象,以及传感器固有的误差,加速度计和陀螺仪的误差因数可以用ρa和ρm表示。误差的目标函数可以重写为 Taking into account the naturally existing dynamic motion and magnetic field interference phenomena, as well as the inherent error of the sensor, the error factors of accelerometers and gyroscopes can be expressed in terms of ρ a and ρ m . The objective function of error can be rewritten as
2)快高斯-牛顿方法2) Fast Gauss-Newton method
本专利提出一种新的快速高斯-牛顿方法,只需要一次迭代运算。根据上述公式化问题,传统的高斯-牛顿方法包括以下优化步骤:This patent proposes a new fast Gauss-Newton method, which requires only one iterative operation. According to the above formulation problem, the traditional Gauss-Newton method includes the following optimization steps:
其中k是迭代次数,J(k)是∈的雅克比行列式,可通过公式(10)计算得出。K表示的6×4常数矩阵,ρa由矩阵的前三行组成,ρm是由其余的行组成。运算符.*代表的是矩阵的点乘。公式(9)描述的是在已知初始值的前提下使用高斯-牛顿方法针对多次迭代运算得到的的一次方向估计结果。公式(9)可以进一步被优化为公式(11)。where k is the number of iterations and J(k) is the Jacobian determinant of ∈ , which can be calculated by formula (10). A 6×4 constant matrix represented by K, ρ a consists of the first three rows of the matrix, and ρ m consists of the remaining rows. The operator .* represents the dot product of a matrix. Equation (9) describes the known initial value Using the Gauss-Newton method for multiple iterations under the premise of A direction estimation result of . Equation (9) can be further optimized as Equation (11).
实际上是在时间t+Δt最后的优化方向,表示为(下标a表示的是依靠加速度计和磁力计估计的方向),是指在之前时刻t估计的方向,被记为(下标f表示的是在互补滤波器融合之后的方向估计),λk将在每次迭代中更改为最优值。由(12)中所示的λt+Δt控制的收敛速率等于或大于方向的变化率,因此,每个时间段计算一次迭代是可接受的。λt+Δt的最优值保证了的收敛速度,它受到通过陀螺仪测量数据计算的方向变化率的限制,从而避免了由于不必要的大步长而造成的过度调节。因此公式(11)可以简单写成仅含有一次迭代计算的公式(12),λt+Δt的优化值可以通过公式(13)计算得出。 In fact, it is the last optimization direction at time t+Δt, which is expressed as (The subscript a represents the direction estimated by the accelerometer and magnetometer), refers to the direction estimated at the previous time t, and is denoted as (The subscript f denotes the orientation estimate after complementary filter fusion), λk will be changed to the optimal value at each iteration. The rate of convergence controlled by λt +Δt shown in (12) is equal to or greater than the rate of change of direction, so it is acceptable to compute one iteration per time period. The optimal value of λ t+Δt guarantees that the rate of convergence, which is subject to the rate of change of orientation calculated from the gyroscope measurement data , thus avoiding over-regulation due to unnecessarily large step sizes. Therefore, formula (11) can be simply written as formula (12) with only one iteration calculation, and the optimal value of λ t+Δt can be calculated by formula (13).
其中,α是考虑到加速度计和磁力计存在噪声时λ的增加值。where α is the increase in λ considering the presence of noise in the accelerometer and magnetometer.
在该实施例子中,关于自适应增益互补滤波器,互补滤波器主要针对两个具有互补光谱特征的噪声源设计,本实施例子中将低通滤波器处理的加速度及磁力信号和高通滤波器处理的陀螺仪信号组合起来得到最终的最优速率。通常情况下,用于测量噪声的传统互补滤波器的增益是一个常数,本实施例子提出的自适应滤波器结合了互补滤波器和卡尔曼滤波器的优点,时变参数和1-kt被设为每个方向的权值,并且能够得到鲁棒性的结果。最优化时变参数和增益可以提高自适应滤波器在估计方向时候的收敛速度和稳定性,由公式(14)表示,增益kt是根据基于高斯-牛顿优化算法的低通频率的收敛率和基于陀螺仪的高通频率的发散率β进行自适应调节。如图3中的组3所示。In this embodiment, regarding the adaptive gain complementary filter, the complementary filter is mainly designed for two noise sources with complementary spectral characteristics. In this embodiment, the acceleration and magnetic force signals processed by the low-pass filter and the high-pass filter are processed The gyroscope signals are combined to obtain the final optimal rate. Usually, the gain of the traditional complementary filter used to measure noise is a constant, the adaptive filter proposed in this example combines the advantages of complementary filter and Kalman filter, time-varying parameters and 1-k t are set as weights in each direction, and robust results can be obtained. Optimizing the time-varying parameters and gain can improve the convergence speed and stability of the adaptive filter when estimating the direction, which is represented by Equation (14), the gain k t is based on the low-pass frequency based on the Gauss-Newton optimization algorithm The convergence rate of and the divergence rate β of the high-pass frequency based on the gyroscope is adaptively adjusted. As shown in group 3 in Figure 3.
因此,可获得最后的方向估计:Therefore, the final orientation estimate can be obtained:
其中,为估计的方向速率,可以用来自于陀螺仪的方向变化率陀螺仪测量误差的幅值(通常为零均值误差)β和来自于加速度计和磁力计的方向误差变化率表示。in, For the estimated rate of orientation, the rate of orientation change from the gyroscope can be used Magnitude of gyroscope measurement error (usually zero mean error) β and rate of change of orientation error from accelerometer and magnetometer express.
在一实施例子中,关于补偿方案:In one example, with respect to the compensation scheme:
1)陀螺仪的零偏漂移补偿:由于长时间的跟踪,惯性传感器会产生累积漂移误差,该实施例子用表示陀螺仪零偏漂移补偿。角速率误差sωe,角速率偏差sωb,角速度sωc经过每次陀螺仪补偿之后,得到归一化后的方向如图3组2所示。1) Zero offset drift compensation of gyroscope: due to long-term tracking, the inertial sensor will generate accumulated drift error. Indicates the zero offset drift compensation of the gyroscope. Angular rate error s ω e , angular rate deviation s ω b , angular velocity s ω c After each gyroscope compensation, the normalized direction is obtained As shown in Figure 3 Group 2.
其中ζ表示为消除非零均值之后陀螺仪测量误差的收敛速度,通过数次实验可以得出它近似于β。Among them, ζ represents the convergence rate of the gyroscope measurement error after eliminating the non-zero mean value, and it can be concluded that it is approximate to β through several experiments.
2)加速度计和磁力计补偿:为了在传感器测量值中选择最可靠的矢量作为滤波器的输入,需要对加速度计和磁强计的测量值进行补偿。例如,在快速运动的情况下sAt测量值和临时磁干扰的情况下sMt测量值都不能作为可靠的数据信息。因此,在这些情况下,sω为更可信的测量信息。2) Accelerometer and magnetometer compensation: In order to select the most reliable vector in the sensor measurement value as the input of the filter, the measurement value of the accelerometer and magnetometer needs to be compensated. For example, neither the s A t measurement in the case of fast motion nor the s M t measurement in the case of temporary magnetic disturbances can be used as reliable data information. Therefore, in these cases, sω is the more reliable measurement information.
通过以上的这些概念,输入矢量sA(重力相关)和sM(磁力相关)在高斯-牛顿优化算法中可以通过以下步骤进行补偿(见图3组1.1):(a)参考矢量ezm在时刻t可以在地球磁场中自适应变化。(b)参考矢量选为eza或eza,t;(c)自适应调整滤波器增益,不仅可以对快速运动和磁干扰的情况进行补偿,也可以对陀螺仪积分造成的累积方向误差进行补偿。Through these concepts above, the input vectors s A (gravity related) and s M (magnetic related) can be compensated in the Gauss-Newton optimization algorithm by the following steps (see Figure 3 Group 1.1): (a) Reference vector e z m At time t, it can adaptively change in the earth's magnetic field. (b) The reference vector is selected as ez a or ez a,t ; (c) The gain of the filter is adaptively adjusted, which can not only compensate for the situation of fast motion and magnetic interference, but also can compensate for the accumulated direction caused by the integration of the gyroscope. error is compensated.
在一实施例子中,关于滤波增益:In an embodiment, with respect to filter gain:
滤波器增益β解释了所有零-均值陀螺仪测量误差,前面步骤中的陀螺仪的零偏漂移补偿中提到了角速率误差sωe,角速率偏差sωb。这些误差通常来自传感器噪声、信号混叠、量化误差、校准误差、传感器错位和频率响应特性。滤波器增益ζ表示收敛速度,尤其是去除非零均值陀螺仪测量误差,也表示为四元数导数的大小。这两个误差都表示陀螺仪的偏差。本实施例子使用和来定义β和ζ,表示为三轴(x,y,z)的陀螺仪测量平均误差的估计值,表示的是为三轴的陀螺仪的零偏漂移的估计速率。和的值可以通过数次实验确定。根据公式(5)描述的关系,β和ζ可以通过公式(18)和公式(19)分别确定,其中是任意的单位四元数。The filter gain β accounts for all zero-mean gyroscope measurement errors, the angular rate error s ω e , and the angular rate deviation s ω b mentioned in the zero-offset drift compensation of the gyroscope in the previous step. These errors typically come from sensor noise, signal aliasing, quantization errors, calibration errors, sensor misalignment, and frequency response characteristics. The filter gain ζ represents the rate of convergence, especially the removal of non-zero mean gyroscope measurement errors, and is also represented as the magnitude of the quaternion derivative. Both of these errors represent the bias of the gyroscope. This example uses and to define β and ζ, is an estimate of the mean error of gyroscope measurements expressed as three axes (x, y, z), is the estimated rate of bias drift for a three-axis gyroscope. and The value of can be determined by several experiments. According to the relationship described by Equation (5), β and ζ can be determined by Equation (18) and Equation (19), respectively, where is an arbitrary unit quaternion.
图4为含有磁铁干扰情况下,三个轴的磁干扰情况。在摆动磁铁的时刻,三轴的磁干扰情况明显。图5为本公开技术方案所提出的自适应增益互补滤波器算法和Medgwick方法在在磁干扰情况下的方向估计的比较,Madgwick方法是一种较为成熟的九轴融合的算法,本公开技术方案通过与该方法进行比较。主要从偏航角,俯仰角和横滚角的角度进行分析比较,从图中可以看出,在无运动的磁干扰下,我们所提出的方法所获得的三个角度的摆动几乎接近于0,而Medgwick方法的角度变化较为明显。图6为突然快速运动下的加速度数据变化值。图7为突然快速运动下的方向估计。在磁性均匀环境中突然快速运动,与Vicon系统(Vicon是一个动作捕捉系统,该系统的准确性好,精度高)的测量结果相比,即使在这种情况下,我们所提出的算法提供了相当准确的估计性能。然而,使用Madgwick方法,相应的估计角度远离实际值,并且在返回初始状态后有明显的漂移。图8为陀螺仪x,y和z轴偏差的估计结果,它是对具有磁干扰的零偏漂移的补偿,从这些结果可以看出,即使在磁干扰中,本专利所提出的自适应增益互补滤波方法也可以成功地估计陀螺仪的偏差,而Madgwick的方法得出了错误的估计。Figure 4 shows the magnetic interference of three axes with magnetic interference. At the moment of swinging the magnet, the magnetic interference of the three axes is obvious. 5 is a comparison of the direction estimation of the adaptive gain complementary filter algorithm proposed by the technical solution of the present disclosure and the Medgwick method in the case of magnetic interference. The Madgwick method is a relatively mature nine-axis fusion algorithm, and the technical solution of the present disclosure is By comparison with this method. Mainly analyze and compare the angles of yaw angle, pitch angle and roll angle. It can be seen from the figure that the swing of the three angles obtained by our proposed method is almost close to 0 without the magnetic interference of motion. , while the Medgwick method has a more obvious change in angle. Figure 6 shows the change in acceleration data under sudden and rapid motion. Figure 7 shows the direction estimation under sudden and fast motion. Sudden and rapid motion in a magnetically homogeneous environment, compared to the measurement results of the Vicon system (Vicon is a motion capture system with good accuracy and high precision), even in this case, our proposed algorithm provides A fairly accurate estimate of performance. However, with Madgwick's method, the corresponding estimated angles are far from the actual values and drift significantly after returning to the initial state. Figure 8 shows the estimation results of the x, y and z axis deviation of the gyroscope, which is the compensation for the zero offset drift with magnetic interference. It can be seen from these results that even in the magnetic interference, the adaptive gain proposed in this patent The complementary filtering method can also successfully estimate the bias of the gyroscope, while Madgwick's method yields an erroneous estimate.
本公开提出了一种用于行人方位估计的自适应增益互补滤波方法及系统,它解决了依靠惯导在长期跟踪过程中引起漂移误差累积问题,以及受周围磁场影响而引起的误差和磁场失真问题。它不仅具有一次迭代计算的优点,减少计算负荷,准确估计陀螺仪测量误差以校正陀螺仪的瞬时测量值,而且还可获得陀螺仪测量误差的精确方向。自适应增益互补滤波方法,它是以高斯-牛顿优化算法(GNA)的收敛率和陀螺仪发散率为基础,将收敛率和来自于陀螺仪的发散率进行有效的互补,整个过程由:陀螺积分,对方向进行估计;将高斯-牛顿方法应用到矢量观测;自适应增益互补滤波器;补偿方案四部分组成,该方法的特点包括陀螺偏差的精确估计、陀螺瞬时测量误差的校正、快速运动和磁畸变条件下的鲁棒估计。实验结果验证了该方法的有效性,表明该方法比几种常用的定位估计方法具有更好的定位精度。The present disclosure proposes an adaptive gain complementary filtering method and system for pedestrian azimuth estimation, which solves the problem of drift error accumulation caused by relying on inertial navigation in the long-term tracking process, as well as errors and magnetic field distortion caused by the influence of surrounding magnetic fields question. It not only has the advantage of one-time iterative calculation, reduces the computational load, accurately estimates the gyro measurement error to correct the instantaneous measurement value of the gyro, but also obtains the precise direction of the gyro measurement error. The adaptive gain complementary filtering method is based on the convergence rate of the Gauss-Newton optimization algorithm (GNA) and the divergence rate of the gyroscope, and effectively complements the convergence rate and the divergence rate from the gyroscope. The whole process consists of: gyroscope Integral to estimate the direction; the Gauss-Newton method is applied to the vector observation; the adaptive gain complementary filter; the compensation scheme is composed of four parts. and robust estimation under magnetic distortion conditions. The experimental results verify the effectiveness of the method and show that the method has better localization accuracy than several commonly used localization estimation methods.
实施例子二Example 2
该实施例子公开了一种用于行人方位估计的自适应增益互补滤波系统,包括:This embodiment discloses an adaptive gain complementary filtering system for pedestrian orientation estimation, including:
数据采集单元,被配置为:利用集成三轴加速度计、三轴陀螺仪、三轴磁力计的惯性传感器获得行人载体的三轴的加速度、角速度和磁场强度;The data acquisition unit is configured to: obtain the three-axis acceleration, angular velocity and magnetic field strength of the pedestrian carrier by using an inertial sensor integrating a three-axis accelerometer, a three-axis gyroscope, and a three-axis magnetometer;
基于陀螺仪的方向估计单元,被配置为:将三轴的陀螺仪测量的数据使用四元数表示,利用四元数的导数描述传感器坐标系相对于地球坐标系下的方向变化率,在已知初始条件下,通过对四元数的导数的积分获得传感器坐标系相对于对地球坐标系下的方向;The gyroscope-based direction estimation unit is configured to: represent the data measured by the three-axis gyroscope with a quaternion, and use the derivative of the quaternion to describe the direction change rate of the sensor coordinate system relative to the earth coordinate system. Under the known initial conditions, the direction of the sensor coordinate system relative to the earth coordinate system is obtained by integrating the derivative of the quaternion;
加速度计和磁力计测量值的方向计算单元,被配置为:利用高斯-牛顿优化方法计算加速度计和磁力计测量值的方向;an orientation calculation unit for the measured values of the accelerometer and the magnetometer, configured to: use a Gauss-Newton optimization method to calculate the orientation of the measured values of the accelerometer and the magnetometer;
陀螺仪最后的方向估计单元,被配置为:自适应滤波器的时变参数被设为每个方向的权值,增益是根据基于高斯-牛顿优化算法的低通频率的收敛率和基于陀螺仪的高通频率的发散率进行自适应调节,获得陀螺仪最后的方向估计。The final direction estimation unit of the gyroscope is configured as: the time-varying parameters of the adaptive filter are set as the weights of each direction, and the gain is based on the convergence rate of the low-pass frequency based on the Gauss-Newton optimization algorithm and the gyroscope-based The divergence rate of the high-pass frequency is adaptively adjusted to obtain the final orientation estimate of the gyroscope.
该实施例子还包括:陀螺仪的零偏漂移补偿单元,由于惯性传感器因长时间跟踪而产生漂移误差累计,使用表示陀螺仪零偏漂移补偿。This embodiment further includes: a zero-offset drift compensation unit of the gyroscope, because the inertial sensor generates drift error accumulation due to long-term tracking, using Indicates the zero offset drift compensation of the gyroscope.
加速度计和磁力计补偿单元:为了在传感器测量值中选择最可靠的矢量作为滤波器的输入,需要对加速度计和磁力计的测量值进行补偿。Accelerometer and Magnetometer Compensation Unit: In order to select the most reliable vector among the sensor measurements as the input to the filter, the accelerometer and magnetometer measurements need to be compensated.
实施例子三Example three
该实施例子公开了一种用于行人方位估计的自适应增益互补滤波器,所述滤波器被配置为执行以下内容:This embodiment discloses an adaptive gain complementary filter for pedestrian orientation estimation, the filter being configured to perform the following:
基于陀螺仪的方向估计:将三轴的陀螺仪测量的数据使用四元数表示,利用四元数的导数描述传感器坐标系相对于地球坐标系下的方向变化率,在已知初始条件下,通过对四元数的导数的积分获得传感器坐标系相对于地球坐标系下的方向;Direction estimation based on gyroscope: The data measured by the three-axis gyroscope is represented by a quaternion, and the derivative of the quaternion is used to describe the direction change rate of the sensor coordinate system relative to the earth coordinate system. Under known initial conditions, Obtain the orientation of the sensor coordinate system relative to the earth coordinate system by integrating the derivative of the quaternion;
利用高斯-牛顿优化方法计算加速度计和磁力计测量值的方向;Calculate the orientation of the accelerometer and magnetometer measurements using the Gauss-Newton optimization method;
自适应滤波器的时变参数被设为每个方向的权值,增益是根据基于高斯-牛顿优化算法的低通频率的收敛率和基于陀螺仪的高通频率的发散率进行自适应调节,获得陀螺仪最后的方向估计。The time-varying parameters of the adaptive filter are set as the weights in each direction, and the gain is adaptively adjusted according to the convergence rate of the low-pass frequency based on the Gauss-Newton optimization algorithm and the divergence rate of the high-pass frequency based on the gyroscope. The final orientation estimate of the gyroscope.
实施例子四Example 4
该实施例子公开了一种计算机设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,其特征在于,所述处理器执行所述程序时实现以下步骤:This embodiment discloses a computer device, including a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor implements the following steps when executing the program:
数据采集:利用集成三轴加速度计、三轴陀螺仪、三轴磁力计的惯性传感器获得行人载体的三轴的加速度、角速度和磁场强度;Data acquisition: use the inertial sensor integrated with a three-axis accelerometer, a three-axis gyroscope, and a three-axis magnetometer to obtain the three-axis acceleration, angular velocity and magnetic field strength of the pedestrian carrier;
基于陀螺仪的方向估计:将三轴的陀螺仪测量的数据使用四元数表示,利用四元数的导数描述传感器坐标系相对于地球坐标系下的方向变化率,在已知初始条件下,通过对四元数的导数的积分获得传感器坐标系相对于地球坐标系下的方向;Direction estimation based on gyroscope: The data measured by the three-axis gyroscope is represented by a quaternion, and the derivative of the quaternion is used to describe the direction change rate of the sensor coordinate system relative to the earth coordinate system. Under known initial conditions, Obtain the orientation of the sensor coordinate system relative to the earth coordinate system by integrating the derivative of the quaternion;
利用高斯-牛顿优化方法计算加速度计和磁力计测量值的方向;Calculate the orientation of the accelerometer and magnetometer measurements using the Gauss-Newton optimization method;
自适应滤波器的时变参数被设为每个方向的权值,增益是根据基于高斯-牛顿优化算法的低通频率的收敛率和基于陀螺仪的高通频率的发散率进行自适应调节,获得陀螺仪最后的方向估计。The time-varying parameters of the adaptive filter are set as the weights in each direction, and the gain is adaptively adjusted according to the convergence rate of the low-pass frequency based on the Gauss-Newton optimization algorithm and the divergence rate of the high-pass frequency based on the gyroscope. The final orientation estimate of the gyroscope.
还包括:Also includes:
陀螺仪的零偏漂移补偿,由于长时间的跟踪,惯性传感器会产生累积漂移误差,该实施例子用表示陀螺仪零偏漂移补偿。The zero offset drift compensation of the gyroscope, due to the long-term tracking, the inertial sensor will produce accumulated drift error, this example uses Indicates the zero offset drift compensation of the gyroscope.
加速度计和磁力计补偿:为了在传感器测量值中选择最可靠的矢量作为滤波器的输入,需要对加速度计和磁强计的测量值进行补偿。Accelerometer and Magnetometer Compensation: In order to select the most reliable vector among the sensor measurements as the input to the filter, the accelerometer and magnetometer measurements need to be compensated.
关于该实施例子的相关步骤的技术内容可参见实施例子一中的具体技术内容,此处不再赘述。For the technical content of the relevant steps in this embodiment example, reference may be made to the specific technical content in the first embodiment, which will not be repeated here.
实施例子五Example 5
该实施例子公开了一种计算机可读存储介质,其上存储有计算机程序,其特征在于,该程序被处理器执行时实现以下步骤:This embodiment discloses a computer-readable storage medium on which a computer program is stored, and is characterized in that, when the program is executed by a processor, the following steps are implemented:
数据采集:利用集成三轴加速度计、三轴陀螺仪、三轴磁力计的惯性传感器获得行人载体的三轴的加速度、角速度和磁场强度;Data acquisition: use the inertial sensor integrated with a three-axis accelerometer, a three-axis gyroscope, and a three-axis magnetometer to obtain the three-axis acceleration, angular velocity and magnetic field strength of the pedestrian carrier;
基于陀螺仪的方向估计:将三轴的陀螺仪测量的数据使用四元数表示,利用四元数的导数描述传感器坐标系相对于地球坐标系下的方向变化率,在已知初始条件下,通过对四元数的导数的积分获得传感器坐标系相对于地球坐标系下的方向;Direction estimation based on gyroscope: The data measured by the three-axis gyroscope is represented by a quaternion, and the derivative of the quaternion is used to describe the direction change rate of the sensor coordinate system relative to the earth coordinate system. Under known initial conditions, Obtain the orientation of the sensor coordinate system relative to the earth coordinate system by integrating the derivative of the quaternion;
利用高斯-牛顿优化方法计算加速度计和磁力计测量值的方向;Calculate the orientation of the accelerometer and magnetometer measurements using the Gauss-Newton optimization method;
自适应滤波器的时变参数被设为每个方向的权值,增益是根据基于高斯-牛顿优化算法的低通频率的收敛率和基于陀螺仪的高通频率的发散率进行自适应调节,获得陀螺仪最后的方向估计。The time-varying parameters of the adaptive filter are set as the weights in each direction, and the gain is adaptively adjusted according to the convergence rate of the low-pass frequency based on the Gauss-Newton optimization algorithm and the divergence rate of the high-pass frequency based on the gyroscope. The final orientation estimate of the gyroscope.
还包括:Also includes:
陀螺仪的零偏漂移补偿,由于长时间的跟踪,惯性传感器会产生累积漂移误差,该实施例子用表示陀螺仪零偏漂移补偿。The zero offset drift compensation of the gyroscope, due to the long-term tracking, the inertial sensor will produce accumulated drift error, this example uses Indicates the zero offset drift compensation of the gyroscope.
加速度计和磁力计补偿:为了在传感器测量值中选择最可靠的矢量作为滤波器的输入,需要对加速度计和磁强计的测量值进行补偿。Accelerometer and Magnetometer Compensation: In order to select the most reliable vector among the sensor measurements as the input to the filter, the accelerometer and magnetometer measurements need to be compensated.
关于该实施例子的相关步骤的技术内容可参见实施例子一中的具体技术内容,此处不再赘述。For the technical content of the relevant steps in this embodiment example, reference may be made to the specific technical content in the first embodiment, which will not be repeated here.
以上所述仅为本公开的优选实施例而已,并不用于限制本公开,对于本领域的技术人员来说,本公开可以有各种更改和变化。凡在本公开的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本公开的保护范围之内。The above descriptions are only preferred embodiments of the present disclosure, and are not intended to limit the present disclosure. For those skilled in the art, the present disclosure may have various modifications and changes. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present disclosure shall be included within the protection scope of the present disclosure.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910300517.5A CN109883451A (en) | 2019-04-15 | 2019-04-15 | An adaptive gain complementary filtering method and system for pedestrian orientation estimation |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910300517.5A CN109883451A (en) | 2019-04-15 | 2019-04-15 | An adaptive gain complementary filtering method and system for pedestrian orientation estimation |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109883451A true CN109883451A (en) | 2019-06-14 |
Family
ID=66937367
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910300517.5A Pending CN109883451A (en) | 2019-04-15 | 2019-04-15 | An adaptive gain complementary filtering method and system for pedestrian orientation estimation |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109883451A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110864684A (en) * | 2019-11-29 | 2020-03-06 | 中国科学院电子学研究所 | User posture measuring and calculating method |
CN112179342A (en) * | 2020-09-21 | 2021-01-05 | 中国安全生产科学研究院 | A method and system for estimating the attitude of an unmanned aerial vehicle |
CN112550297A (en) * | 2020-12-16 | 2021-03-26 | 陕西法士特齿轮有限责任公司 | Weight and gradient calculation method of pure electric commercial vehicle based on three-axis accelerometer |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101799934A (en) * | 2010-04-02 | 2010-08-11 | 北京大学软件与微电子学院无锡产学研合作教育基地 | Real time human movement capture system based on micro electro mechanical inertia sensing network |
CN102323854A (en) * | 2011-03-11 | 2012-01-18 | 中国科学院研究生院 | Human motion capture device |
CN106500695A (en) * | 2017-01-05 | 2017-03-15 | 大连理工大学 | A kind of human posture recognition method based on adaptive extended kalman filtering |
CN106709223A (en) * | 2015-07-29 | 2017-05-24 | 中国科学院沈阳自动化研究所 | Sampling inertial guidance-based visual IMU direction estimation method |
CN106705968A (en) * | 2016-12-09 | 2017-05-24 | 北京工业大学 | Indoor inertial navigation algorithm based on posture recognition and step length model |
CN107830861A (en) * | 2017-12-07 | 2018-03-23 | 智灵飞(北京)科技有限公司 | Based on adaptive gain complementary filter moving object attitude measurement method and device |
CN108225308A (en) * | 2017-11-23 | 2018-06-29 | 东南大学 | A kind of attitude algorithm method of the expanded Kalman filtration algorithm based on quaternary number |
US20180231374A1 (en) * | 2017-02-13 | 2018-08-16 | National Tsing Hua University | Object pose measurement system based on mems imu and method thereof |
CN109579836A (en) * | 2018-11-21 | 2019-04-05 | 阳光凯讯(北京)科技有限公司 | A kind of indoor pedestrian's bearing calibration method based on MEMS inertial navigation |
-
2019
- 2019-04-15 CN CN201910300517.5A patent/CN109883451A/en active Pending
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101799934A (en) * | 2010-04-02 | 2010-08-11 | 北京大学软件与微电子学院无锡产学研合作教育基地 | Real time human movement capture system based on micro electro mechanical inertia sensing network |
CN102323854A (en) * | 2011-03-11 | 2012-01-18 | 中国科学院研究生院 | Human motion capture device |
CN106709223A (en) * | 2015-07-29 | 2017-05-24 | 中国科学院沈阳自动化研究所 | Sampling inertial guidance-based visual IMU direction estimation method |
CN106705968A (en) * | 2016-12-09 | 2017-05-24 | 北京工业大学 | Indoor inertial navigation algorithm based on posture recognition and step length model |
CN106500695A (en) * | 2017-01-05 | 2017-03-15 | 大连理工大学 | A kind of human posture recognition method based on adaptive extended kalman filtering |
US20180231374A1 (en) * | 2017-02-13 | 2018-08-16 | National Tsing Hua University | Object pose measurement system based on mems imu and method thereof |
CN108225308A (en) * | 2017-11-23 | 2018-06-29 | 东南大学 | A kind of attitude algorithm method of the expanded Kalman filtration algorithm based on quaternary number |
CN107830861A (en) * | 2017-12-07 | 2018-03-23 | 智灵飞(北京)科技有限公司 | Based on adaptive gain complementary filter moving object attitude measurement method and device |
CN109579836A (en) * | 2018-11-21 | 2019-04-05 | 阳光凯讯(北京)科技有限公司 | A kind of indoor pedestrian's bearing calibration method based on MEMS inertial navigation |
Non-Patent Citations (2)
Title |
---|
YA TIAN 等: "A fast Adaptive-Gain Orientation Filter of inertial/magnetic data for human motion tracking in free-living environments", 《2012 ANNUAL INTERNATIONAL CONFERENCE OF THE IEEE ENGINEERING IN MEDICINE AND BIOLOGY SOCIETY》 * |
YA TIAN 等: "An Adaptive-Gain Complementary Filter for Real-Time Human Motion Tracking With MARG Sensors in Free-Living Environments", 《IEEE TRANSACTIONS ON NEURAL SYSTEMS AND REHABILITATION ENGINEERING》 * |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110864684A (en) * | 2019-11-29 | 2020-03-06 | 中国科学院电子学研究所 | User posture measuring and calculating method |
CN112179342A (en) * | 2020-09-21 | 2021-01-05 | 中国安全生产科学研究院 | A method and system for estimating the attitude of an unmanned aerial vehicle |
CN112179342B (en) * | 2020-09-21 | 2021-08-27 | 中国安全生产科学研究院 | Method and system for estimating attitude of unmanned aerial vehicle |
CN112550297A (en) * | 2020-12-16 | 2021-03-26 | 陕西法士特齿轮有限责任公司 | Weight and gradient calculation method of pure electric commercial vehicle based on three-axis accelerometer |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Tian et al. | An adaptive-gain complementary filter for real-time human motion tracking with MARG sensors in free-living environments | |
US10352959B2 (en) | Method and system for estimating a path of a mobile element or body | |
CN110398245B (en) | Indoor pedestrian navigation attitude estimation method based on foot-worn inertial measurement unit | |
KR102017404B1 (en) | How to update the full posture angle of agricultural machinery based on 9 axis MEMS sensor | |
Madgwick et al. | Estimation of IMU and MARG orientation using a gradient descent algorithm | |
CN108939512B (en) | A Swimming Attitude Measurement Method Based on Wearable Sensors | |
CN108225308A (en) | A kind of attitude algorithm method of the expanded Kalman filtration algorithm based on quaternary number | |
Luinge | Inertial sensing of human movement | |
US6820025B2 (en) | Method and apparatus for motion tracking of an articulated rigid body | |
Calusdian et al. | Adaptive-gain complementary filter of inertial and magnetic data for orientation estimation | |
US20100250177A1 (en) | Orientation measurement of an object | |
CN113793360B (en) | Three-dimensional human body reconstruction method based on inertial sensing technology | |
Lin et al. | Development of the wireless ultra-miniaturized inertial measurement unit WB-4: Preliminary performance evaluation | |
CN107490378B (en) | Indoor positioning and navigation method based on MPU6050 and smart phone | |
CN106123900B (en) | Indoor pedestrian navigation magnetic heading calculation method based on modified complementary filter | |
CN108731676B (en) | An attitude fusion enhanced measurement method and system based on inertial navigation technology | |
CN110174121A (en) | A kind of aviation attitude system attitude algorithm method based on earth's magnetic field adaptive correction | |
CN109883451A (en) | An adaptive gain complementary filtering method and system for pedestrian orientation estimation | |
Yang et al. | A calibration process for tracking upper limb motion with inertial sensors | |
CN110319840A (en) | Conjugate gradient attitude algorithm method towards abnormal gait identification | |
Daponte et al. | Experimental comparison of orientation estimation algorithms in motion tracking for rehabilitation | |
KR101950453B1 (en) | Apparatus and method for wearing position proposal of measuring sensor | |
CN108507571B (en) | IMU attitude capturing method and system under high-speed kinematics | |
Tao et al. | Biomechanical model-based multi-sensor motion estimation | |
CN116817905A (en) | Wearable multi-MEMS quasi-real-time collaborative navigation system and method |
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 | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20190614 |