Indoor direction optimization method based on MEMS

文档序号:1685465 发布日期:2020-01-03 浏览:11次 中文

阅读说明:本技术 一种基于mems的室内方向优化方法 (Indoor direction optimization method based on MEMS ) 是由 卢敏 王培重 张晓东 吴彤 肖登坤 于 2018-06-26 设计创作,主要内容包括:一种基于MEMS(Micro-Electro-Mechanical System)的室内方向优化方法属于室内外定位技术领域,室内利用磁场信息计算航向,会因建筑物内铁磁性物质的影响,而无法准确的判断出终端航向信息准确性。陀螺仪计算航向角,不受外界的影响,但误差会随着时间累计。基于陀螺仪和磁航向的优缺点,设计了组合航向算法。该方法可以有效的抑制陀螺仪累计误差,判断出包括但不限于磁航向信息的可靠性,能得到较为准确的航向角信息。当MEMS芯片y轴处于竖立时,设计了载体的坐标系旋转算法,该方法避免了由于反正切函数在90°附近不稳定,造成的俯仰角波动较大问题,进而提高了与磁力计组合求解的航向角精度。(An indoor direction optimization method based on an MEMS (Micro-Electro-Mechanical System) belongs to the technical field of indoor and outdoor positioning, course information is calculated indoors by using magnetic field information, and accuracy of terminal course information cannot be accurately judged due to influence of ferromagnetic substances in a building. The gyroscope calculates the heading angle without being influenced by the outside, but the error is accumulated along with the time. Based on the advantages and disadvantages of the gyroscope and the magnetic heading, a combined heading algorithm is designed. The method can effectively inhibit the accumulated error of the gyroscope, judge the reliability of the magnetic heading information including but not limited to the magnetic heading information and obtain more accurate heading angle information. When the y axis of the MEMS chip is vertical, a coordinate system rotation algorithm of the carrier is designed, the method avoids the problem of large pitch angle fluctuation caused by instability of an arctangent function near 90 degrees, and further improves course angle precision of combined solution with a magnetometer.)

1. An indoor direction optimization method based on MEMS (Micro-Electro-Mechanical System) is characterized by comprising the following steps:

(1) and judging the state of the MEMS chip, and solving the zero offset of the gyroscope when the MEMS chip is detected to be static.

(2) When the y axis of the MEMS chip is detected to be vertical, the carrier coordinate system is rotated, and then the pitch angle and the roll angle are obtained according to the processed acceleration, including but not limited to providing a heading angle by using a magnetometer. And an initial value is assigned to the gyroscope.

(3) And judging whether the gyroscope is in straight line walking or not, and if the gyroscope is in straight line walking, estimating the drifting direction and speed of the gyroscope.

(4) And according to the allowed maximum angle error, the gyroscope drift speed and the output course angle, the accurate range of the third-party course angle can be calculated. If the third party heading angle (including but not limited to the heading angle provided by using the magnetometer) is within the range, the pitch angle and the roll angle calculated by the acceleration and the heading angle provided by the third party are used as the attitude angle of the current terminal to give an initial value to the gyroscope. Otherwise, directly using the heading angle output by the gyroscope.

2. The detection of the y-axis erection of the MEMS chip of claim 1, wherein:

comparing the three-axis acceleration values (a) output by the MEMS devicesx,ay,az) If ay|>|axI and | ay|>|azIf yes, the y axis of the current chip is considered to be in a vertical state.

3. Performing a carrier coordinate system rotation according to claim 1, characterized in that:

when the upright state is detected, the carrier coordinate system needs to be rotated. The rotation algorithm is as follows:

(1) the rotation matrix R is

Figure FSA0000166010300000011

(2) For the original triaxial acceleration (a)x,ay,az) Including but not limited to magnetometers (m)x,my,mz) Gyroscope (w)x,wy,wz) The data were processed as follows:

Figure FSA0000166010300000012

4. the method for judging whether to walk straight according to claim 1, wherein:

finding a segment TwAnd if the angle is less than the threshold value delta Cor, the walking is carried out in a straight line, otherwise, the walking is carried out in a non-straight line.

5. The method of claim 1, wherein estimating the direction and speed of gyroscope drift comprises:

when the straight line walking is satisfied, the T can be obtainedwCalculating T according to the integral angle value of the gyroscope in the time windowwWithin the time period, the difference value delta phi of the output course angle mean value of the gyroscope in the last second and the output course angle mean value in the first secondgyroThe gyro drift direction and speed δ at this time can be estimated according to the formula (3):

Figure FSA0000166010300000021

6. the method of claim 1, wherein the third party heading angle is resolved to an accurate range based on the maximum allowable angle error, the gyroscope drift velocity, and the output heading value, and wherein:

the current third party heading angle (including but not limited to the heading angle provided using the magnetometer) accuracy range formula is:

mag-(Φgyro*(tnow-to))|<ΔA (4)

in the formula: phimagIs a third party heading angle; phigyroIntegrating the angle value of the gyroscope; delta is the drift direction and speed of the gyroscope; t is tnowIs the current time; t is toFor the moment of assigning the gyroscope: Δ A is the maximum allowable angle error threshold corrected using the third party heading.

When the third-party course angle does not meet the condition in the formula (4), the current third-party course angle is unreliable, and the output angle value of the gyroscope is used as a final course angle; otherwise, the current third-party course angle is considered to be reliable, and the accuracy is high. And the pitch angle and the roll angle calculated by the acceleration and the course angle provided by the third party are used as the attitude angle of the current terminal to give an initial value to the gyroscope, so that the accumulated error of the gyroscope is eliminated.

Technical Field

The invention belongs to the technical field of indoor and outdoor positioning

Background

Inertial devices become standard configurations of most intelligent devices such as mobile phones and flat panels, and the inertial devices are widely applied to solving course angles by using acceleration and magnetometers. However, in the indoor environment, due to the influence of the ferromagnetic substance in the building, the magnetic heading error is large, and therefore when the inertial navigation technology is used, the final positioning result deviates from the real position greatly due to the direction error.

The invention combines the characteristics that the gyroscope is not influenced by external environment and the error is accumulated, combines the acceleration and the gyroscope and the course angle provided by but not limited to the magnetometer to judge the course, improves the reliability and the accuracy of the indoor course angle, and reduces the positioning error caused by inaccurate course angle. In addition, when the y axis of a carrier coordinate system of an MEMS (Micro-Electro-mechanical system) chip is vertical, the acceleration meter and the magnetometer are used for resolving the big fluctuation of the course angle, the coordinate rotation algorithm of the carrier is provided, the fluctuation of the magnetic course angle is reduced, and the precision of the course angle is improved.

Disclosure of Invention

The method combines the advantages and the disadvantages of the gyroscope and the magnetic heading, can inhibit the accumulated error of the gyroscope, can judge the accuracy including but not limited to the magnetic heading at present, and improves the precision and the reliability of the indoor direction.

The detailed resolving process of the method is as follows:

step 01: reading IMU sensor data. Including accelerometer, gyroscope, magnetometer data.

Step 02: judging whether the y axis of the carrier coordinate system is in an upright state, and entering step 03 when the y axis of the carrier coordinate system is in the upright state; otherwise, entering the steps 04 and 05.

Step 03: the carrier coordinate system is rotated. Rotation matrix

Figure BSA0000166010310000011

Then to the original triaxial acceleration (a)x,ay,az) Including but not limited to magnetometers (m)x,my,mz) Gyroscope (w)x,wy,wz) The data were processed as follows:

step 04: including but not limited to magnetic heading angle Φ resolved using acceleration and magnetometer datamag

Step 05: the initial value is given to the gyroscope by utilizing the pitch angle and the roll angle calculated by the acceleration and the course angle including but not limited to the calculation by the magnetometer, and then the course angle phi is calculated by integrating the gyroscopegyro

Step 06: recording the time t of initial value given to the gyroscopeoAnd the current time tnowΔ T is how often to begin determining whether to use a time interval that includes, but is not limited to, a correction of magnetic heading to the current angle. When satisfied, executing step 10; otherwise step 11 is performed.

Step 07: solving for TwThe difference between the maximum and minimum heading angle values within the time window.

Step 08: judging whether the difference between the maximum value and the minimum value is less than delta Cor or not, and entering step 09 if the difference meets the requirement; otherwise step 10 is entered.

Step 09: the gyroscope drift direction plus and minus and velocity are estimated. When the straight line walking is judged, T is usedwWithin the time period, the difference value delta phi of the average value of the output angles of the gyroscope in the last second and the average value of the output angles of the gyroscope in the first secondgyroThe gyro drift direction and speed δ at this time can be estimated according to the following formula:

Figure BSA0000166010310000013

step 10: according to the formula | Φmag-(Φgyro-δ*(tnow-to) < Δ a determines whether to correct the current angle using, including but not limited to, magnetic heading. In the formula: phimagIncluding but not limited to magnetic heading values; phigyroIntegrating the angle value of the gyroscope; delta is the drift direction and speed of the gyroscope; t is tnowIs the current time; t is toThe moment of assigning a value to the gyroscope; Δ A is the maximum allowable angle error threshold including but not limited to magnetic heading correction.

The direction value is resolved based on the estimated gyro drift velocity and it is determined whether the direction value given at this time, including but not limited to magnetic heading, is in its vicinity and, when satisfied, step 12 is entered. The representation currently includes, but is not limited to, that the magnetic heading is relatively accurate, which is used to correct the gyroscope angle value. Otherwise, step 11 is entered, indicating that the magnetic heading, including but not limited to, is not reliable, and the heading value of the gyroscope is still used.

Step 11: and taking the output value of the gyroscope as a final heading angle.

Step 12: the current heading angle is corrected using values including, but not limited to, magnetic heading angle, and the gyroscope is initialized with the attitude angle calculated from the acceleration, magnetometer, and the like.

Step 13: update time to. The current time tnowTo give to

Step 14: the current angle value, including but not limited to the magnetic heading, is taken as the final heading angle.

Step 15: and outputting the final heading angle.

The invention aims to improve the course angle resolving accuracy of indoor navigation positioning and obtain a more accurate course angle by utilizing an MEMS chip. Compared with the prior art, the invention has the following advantages and beneficial effects:

(1) the invention adopts the technical method of rotating the carrier coordinate system, can effectively avoid the problem that the heading angle fluctuation is larger by using the acceleration and the magnetometer when the y axis of the carrier coordinate system is vertical, and improves the resolving precision of the magnetic heading angle.

(2) The invention solves the accurate range including but not limited to the magnetic heading angle according to the maximum allowable angle error, the gyroscope drift speed and the output angle, thereby not only effectively inhibiting the drift of the gyroscope, but also improving the reliability including but not limited to the magnetic heading angle, and further achieving the effect of accurately estimating the heading.

Drawings

FIG. 1: indoor direction optimization method based on MEMS

Detailed Description

The present invention will be described in further detail with reference to examples and drawings, but the present invention is not limited thereto.

7页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:车辆定位方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!