A robust indoor positioning heading angle estimation method
By combining IMU, magnetometer, and map information, the system determines pedestrian walking trajectories and eliminates magnetic interference, achieving robust indoor heading angle estimation. This solves the problems of heading angle drift and magnetic field interference, improving the accuracy and reliability of the heading angle.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- WUHAN UNIV
- Filing Date
- 2021-01-20
- Publication Date
- 2026-05-29
Smart Images

Figure CN112902962B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of indoor positioning technology, and more specifically, relates to a robust method for estimating the heading angle of indoor positioning. Background Technology
[0002] Indoor positioning technology, as a crucial component of the Internet of Things, is transforming people's daily lives and playing a vital role in areas such as child and elderly monitoring, emergency safety and prevention, and personalized marketing. Inertial Measurement Units (IMUs), composed of three-axis gyroscopes and accelerometers, are small, inexpensive, and consume little power. Indoor positioning technology based on IMUs has been widely applied, for example in mobile phone positioning, robotic vacuum cleaners, and mobile measurement vehicles.
[0003] Due to IMU sensor errors and device integration mechanisms, the drift of its heading angle has always been a major bottleneck in indoor positioning, and it will have a significant impact on actual positioning, making it crucial for positioning accuracy and reliability.
[0004] To overcome heading angle drift, the most common method is to obtain the absolute heading angle using information from the Earth's magnetic field to overcome gyroscope heading angle drift. However, in indoor environments, it is difficult to obtain stable and reliable magnetic field information due to the influence of the building's own magnetic field and electromagnetic interference from electronic devices. To detect indoor magnetic field interference, a local magnetic field reference model is often used as a reference benchmark; in addition, information on changes in the gyroscope's heading angle can also be used to detect magnetic abrupt changes. However, due to the complexity of indoor environments, methods relying solely on magnetic fields often cannot provide stable and reliable heading information. Summary of the Invention
[0005] This invention provides a robust method for estimating the heading angle of indoor positioning, thereby addressing the problems of low accuracy and poor reliability in existing indoor positioning technologies.
[0006] This invention provides a robust method for estimating the heading angle for indoor positioning, comprising the following steps:
[0007] Step 1: Acquire IMU data and magnetometer data during the pedestrian's movement; determine whether the pedestrian's walking trajectory is a straight path based on the IMU data and the magnetometer data; if it is a straight path, determine the length of the straight path the pedestrian walks with the help of the classic step length model;
[0008] Step 2: Obtain coarse positioning information via WiFi or Bluetooth. Based on the coarse positioning information and the length of the straight path the pedestrian is walking, determine the scene area type corresponding to the pedestrian's current location and obtain scene information. The scene information includes all the candidate straight trajectories corresponding to the current scene.
[0009] Step 3: Compare the magnetometer data with the local magnetic field model to eliminate gross errors in magnetic interference; Based on the pedestrian motion information obtained in Step 1, obtain the average magnetic angle when the pedestrian walks in a straight line to eliminate gross errors in magnetic heading angle.
[0010] Step 4: Combine the pedestrian movement information obtained in Step 1 and the scene information obtained in Step 2 to perform building map angle matching to obtain the first heading angle; use the average magnetic angle of pedestrians walking in a straight line obtained in Step 3 to correct the first heading angle to obtain the final selected building map heading angle.
[0011] Preferably, in step 1, the IMU data includes raw gyroscope three-axis data and raw accelerometer three-axis data, wherein the raw gyroscope three-axis data is denoted as ω. x ω y ω z The raw triaxial data of the accelerometer is denoted as a. x a y a z The magnetometer data includes the raw triaxial data of the magnetometer, denoted as m. x m y m z ;
[0012] The following formula is used to determine whether a pedestrian's walking trajectory is a straight path:
[0013]
[0014] |θ k -θ k -1|<γ2 (2)
[0015] If formulas (1) and (2) are satisfied, then the pedestrian's walking trajectory is determined to be a straight path;
[0016] Where N is the number of raw three-axis gyroscope data collected by a pedestrian within the length of the straight detection window; Let σ be the gyroscope measurement in the vertical direction in the local horizontal coordinate system at time i, and let θ be the gyroscope noise. k Let θ be the heading angle corresponding to the k-th step of the pedestrian's journey. k-1 The heading angle is the angle corresponding to the (k-1)th step of the pedestrian's walk. The heading angle is obtained by combining the raw data of the magnetometer triaxial axis and the raw data of the accelerometer triaxial axis; γ1 is the first detection threshold and γ2 is the second detection threshold.
[0017] Preferably, in step 1, the length of the straight path taken by the pedestrian is obtained using the following formula:
[0018]
[0019] Where D is the length of the straight path walked by the pedestrian, S is the number of straight steps taken by the pedestrian, which is obtained by detecting the number of peaks in the acceleration amplitude; K is the scale factor term in the classic step length model; a max and a min This refers to the maximum and minimum acceleration amplitude detected at each step during the pedestrian's straight-line movement; a max and a min It is obtained by transforming the raw triaxial data of the accelerometer.
[0020] Preferably, in step 2, the indoor environment is divided into multiple scene areas by combining map information and the actual building view;
[0021] Based on whether the coordinates corresponding to the coarse positioning information are within the coordinate range of a certain scene area, and combined with the relationship between the length of the pedestrian's straight walking path and the third detection threshold, the scene area type corresponding to the pedestrian's current location is determined.
[0022] Preferably, the indoor environment is divided into a wide area, an office area, and a corridor area;
[0023] The following formula is used to determine the scene area type corresponding to the pedestrian's current location:
[0024]
[0025] Among them, P M This represents M consecutive coarse positioning positions, where D is the length of the straight path the pedestrian walks, and γ3 is the third detection threshold.
[0026] Preferably, in step 3, the following formula is used to eliminate gross magnetic interference:
[0027]
[0028] Where, m x m y and m z γ is the measured value of the magnetometer, M0 is the local reference magnetic field amplitude, and γ4 is the fourth detection threshold.
[0029] Preferably, in step 3, the gross error in the magnetic heading angle is eliminated using the following formula:
[0030]
[0031]
[0032] in, Let θ be the average magnetic angle when a pedestrian walks in a straight line. iγ is the heading angle corresponding to the i-th step of the pedestrian, S is the number of straight steps the pedestrian takes, and γ5 is the fifth detection threshold.
[0033] Preferably, in step 4, the first heading angle is obtained by matching the building map angles using the following formula:
[0034]
[0035] Where, θ building The heading angle corresponding to the selected straight trajectory is denoted as the first heading angle; θ line Let θ be the heading angle corresponding to the candidate straight trajectory. The argmin(θ) function represents taking the minimum angle.
[0036] Preferably, in step 4, after obtaining the first heading angle, the method further includes: comparing the length of the pedestrian walking straight path with the straight distance corresponding to the selected straight trajectory; the straight distance corresponding to the second longest length of the selected straight trajectory is recorded as the second length; if the length of the pedestrian walking straight path is greater than the second length, it is determined that the building map angle matching is successful.
[0037] Preferably, in step 4, the first heading angle is corrected using the following formula:
[0038]
[0039] Among them, γ6 is the sixth detection threshold.
[0040] One or more technical solutions provided in this invention have at least the following technical effects or advantages:
[0041] The invention proposes an indoor positioning heading angle estimation method that intelligently integrates magnetic field and map information, effectively overcoming the influence of indoor gyroscope heading angle drift and improving the robustness of heading angle estimation. It also proposes an online magnetic interference estimation method based on pedestrian walking characteristics, effectively mitigating indoor magnetic interference and providing a solution for the robust use of magnetic heading angles indoors. Furthermore, it effectively combines indoor building angles, scene information, and pedestrian movement information, thereby improving the matching rate of building map heading angles and enhancing the stability of heading angle estimation. Attached Figure Description
[0042] Figure 1 A flowchart illustrating a robust indoor positioning heading angle estimation method provided in this embodiment of the invention. Detailed Implementation
[0043] To better understand the above technical solutions, the following will provide a detailed explanation of the technical solutions in conjunction with the accompanying drawings and specific implementation methods.
[0044] This embodiment provides a robust method for estimating the heading angle for indoor positioning, including the following steps:
[0045] Step 1: Acquire IMU data and magnetometer data during the pedestrian's movement; determine whether the pedestrian's walking trajectory is a straight path based on the IMU data and the magnetometer data; if it is a straight path, determine the length of the straight path the pedestrian walks with the help of the classic step length model.
[0046] This involves combining IMU and magnetometer data to analyze the characteristics of changes in heading angular rate and heading angle during pedestrian movement, determining whether the pedestrian's walking trajectory is a straight path, and using the classical step length model to determine the length of the straight path of the pedestrian, thereby enhancing motion perception.
[0047] Specifically, the IMU data includes raw gyroscope data (three axes) and raw accelerometer data (three axes), with the raw gyroscope data denoted as ω. x ω y ω z The raw triaxial data of the accelerometer is denoted as a. x a y a z The magnetometer data includes the raw triaxial data of the magnetometer, denoted as m. x m y m z .
[0048] When a pedestrian is walking normally, the changes in the gyro angular velocity and heading angle of the pedestrian in each step are analyzed to determine whether the pedestrian is walking in a straight line, as shown in formulas (1) and (2). If formulas (1) and (2) are satisfied, the pedestrian's walking trajectory is determined to be a straight path. After determining that the pedestrian's walking trajectory is a straight path, the straight distance D of the pedestrian is obtained according to the classic step-length Weinberg model, as shown in formula (3).
[0049]
[0050] |θ k -θ k -1|<γ2 (2)
[0051]
[0052] Where N represents the number of raw three-axis gyroscope data acquisitions within the length of the pedestrian straight-line detection window (e.g., time per step). Let θ be the vertical gyroscope measurement value in the local horizontal coordinate system at time i, σ be the gyroscope noise (initialized by statically acquiring a window of IMU data and calculating the variance of this data segment to obtain the noise σ), and θ be the gyroscope noise. kLet θ be the heading angle of the pedestrian at step k. k-1 The heading angle corresponds to the (k-1)th step of the pedestrian's journey. This heading angle is obtained by combining the raw triaxial data from the magnetometer and the raw triaxial data from the accelerometer. γ1 and γ2 are the first and second detection thresholds, respectively. D is the length of the straight path the pedestrian walks, S is the number of straight steps (the number of peaks in the detected acceleration amplitude, i.e., the number of straight steps), K is the scale factor in the classic Weinberg step size model, and a... max and a min This refers to the maximum and minimum acceleration amplitude detected at each step during the pedestrian's straight-line movement; a max and a min It is obtained by transforming the raw triaxial data of the accelerometer.
[0053] Step 2: Obtain coarse positioning information via WiFi or Bluetooth. Based on the coarse positioning information and the length of the straight path the pedestrian is walking, determine the scene area type corresponding to the pedestrian's current location and obtain scene information. The scene information includes all the candidate straight trajectories corresponding to the current scene.
[0054] This involves combining the distance of a pedestrian's straight path with the coarse positioning results provided by WiFi / Bluetooth to determine the type of the current scene area, thereby enhancing scene awareness.
[0055] Specifically, by combining map information and real-world building views, the indoor environment is divided into multiple scene areas. Based on whether the coordinates corresponding to the coarse positioning information fall within the coordinate range of a certain scene area, and considering the relationship between the length of the pedestrian's straight-line path and the third detection threshold, the scene area type corresponding to the pedestrian's current location is determined. In other words, indoor scenes are divided based on the indoor environment.
[0056] For example, the indoor environment is divided into three common scenarios: wide area, office area and corridor area (based on map information and actual building view, subjectively divided by human); and the current scene area type T is determined based on the distance of the pedestrian's straight path and the coarse positioning results provided by WiFi / Bluetooth, as shown in formula (4).
[0057]
[0058] Among them, P M This represents M consecutive coarse positioning positions, where the value of M is determined by the experimental scenario; D is the straight-line distance of the pedestrian, and γ3 is the third detection threshold.
[0059] Step 3: Compare the magnetometer data with the local magnetic field model to eliminate gross errors in magnetic interference; based on the pedestrian motion information obtained in Step 1, obtain the average magnetic angle when the pedestrian walks in a straight line to eliminate gross errors in magnetic heading angle.
[0060] This involves combining motion sensing data to correct magnetic interference online, mitigating the impact of indoor magnetic interference on the magnetic field angle, and thus suppressing large errors in the gyroscope's heading angle.
[0061] Specifically, the measured value of the magnetometer (m) x m y and m z The magnetic interference gross error is compared with the local magnetic field model to eliminate the gross error of magnetic interference (that is, the magnetometer data that does not meet the formula (5) are removed). Formula (5) is used to eliminate the gross error of magnetic interference.
[0062]
[0063] Based on the results of step 1, the average magnetic angle when a pedestrian walks in a straight line is obtained. Eliminate gross errors in magnetic heading angles (i.e., θ that does not satisfy formula (6)) i To eliminate gross errors in magnetic heading angles (by removing outdated information), the following formula is used:
[0064]
[0065]
[0066] Where, m x m y and m z The values are the measured values from the magnetometer, and M0 is the local reference magnetic field amplitude. Let θ be the average magnetic angle when a pedestrian walks in a straight line. i γ is the heading angle corresponding to the i-th step of the pedestrian's walking, calculated by the magnetometer; S is the number of straight steps taken by the pedestrian; γ4 and γ5 are the fourth and fifth detection thresholds, respectively.
[0067] Step 4: Combine the pedestrian movement information obtained in Step 1 and the scene information obtained in Step 2 to perform building map angle matching to obtain the first heading angle; use the average magnetic angle of pedestrians walking in a straight line obtained in Step 3 to correct the first heading angle to obtain the final selected building map heading angle.
[0068] This involves combining motion perception and context perception with magnetic field information to match the map angle of the building and correctly correct the gyroscope's heading angle.
[0069] Specifically, by combining the pedestrian movement information obtained in step 1 with the scene information obtained in step 2, feasible candidate straight trajectories are matched nearby. If the straight trajectory of the pedestrian exceeds the second length of the pre-selected trajectory, map angle matching is performed (that is, the length of the straight path of the pedestrian is compared with the straight distance corresponding to the straight trajectory selected by the matching; the straight distance corresponding to the second length of the straight trajectory selected by the matching is recorded as the second length; if the length of the straight path of the pedestrian is greater than the second length, it is determined that the map angle of the building is successfully matched). The magnetic angle obtained in step 3 is used as a control threshold to prevent matching errors, as shown in formulas (8) and (9).
[0070]
[0071]
[0072] Where, θ building The heading angle corresponding to the selected straight trajectory is denoted as the first heading angle; θ line Let θ be the heading angle corresponding to the candidate straight trajectory, and let argmin(θ) be the minimum angle. γ6 is the average magnetic angle of the pedestrian walking in a straight line, as determined in step 3, and γ6 is the sixth detection threshold.
[0073] Based on the above records, such as Figure 1 As shown, this invention provides a robust method for estimating the heading angle for indoor positioning, which mainly includes the following steps:
[0074] By combining the measurements from the IMU sensor and the magnetometer, it can be determined whether the pedestrian is walking in a straight line, and the straight-line distance can be obtained.
[0075] By combining the straight-line distance to pedestrians and the coarse positioning results of WiFi / Bluetooth, the indoor scene where the pedestrian is located can be distinguished to achieve enhanced scene awareness;
[0076] By combining the local magnetic field model, magnetic interference is estimated online, and gross errors in magnetic heading angle are proposed. Furthermore, by combining the straight-line distance of pedestrians, the heading angle of building maps is matched.
[0077] Combining the information from the previous three sources, utilizing the IMU angle integration operation characteristics, and employing the classic Kalman filter model, robustly estimating and correcting the IMU attitude angle, thereby achieving robust output of the indoor positioning heading angle.
[0078] In summary, the method provided by this invention uses a mobile phone as a platform, intelligently combining the phone's built-in IMU, magnetic field, and map information. It enhances heading angle estimation through motion scenario perception and further assists in heading angle estimation by incorporating scene information from map data, providing high-precision and stable heading angles in complex indoor environments. This method is also applicable to other indoor positioning application platforms.
[0079] The robust indoor positioning heading angle estimation method provided by this invention has at least the following technical advantages:
[0080] 1) A robust indoor heading angle estimation algorithm is proposed. This algorithm intelligently integrates magnetic field and map information, effectively overcomes the influence of indoor gyroscope heading angle drift, and improves the robustness of heading angle estimation.
[0081] 2) Based on the characteristics of pedestrian walking (pedestrians often choose the shortest straight path to reach their destination), an online method for estimating magnetic interference is proposed, which effectively alleviates indoor magnetic interference and provides a solution for the robust use of magnetic heading angles indoors.
[0082] 3) It effectively combines indoor building angles, scene information and pedestrian movement information, thereby improving the matching rate of building map heading angles and enhancing the stability of heading angle estimation.
[0083] Finally, it should be noted that the above specific embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to examples, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.
Claims
1. A robust method for estimating the heading angle for indoor positioning, characterized in that, Includes the following steps: Step 1: Acquire IMU data and magnetometer data during pedestrian movement; Based on the IMU data and the magnetometer data, determine whether the pedestrian's walking trajectory is a straight path; If it is a straight path, the length of the straight path for the pedestrian is determined with the help of the classic step length model; Step 2: Obtain coarse positioning information via WiFi or Bluetooth. Based on the coarse positioning information and the length of the straight path the pedestrian is walking, determine the scene area type corresponding to the pedestrian's current location and obtain scene information. The scene information includes all the candidate straight trajectories corresponding to the current scene. Step 3: Compare the magnetometer data with the local magnetic field model to eliminate gross errors in magnetic interference; Based on the pedestrian motion information obtained in Step 1, obtain the average magnetic angle when the pedestrian walks in a straight line to eliminate gross errors in magnetic heading angle. The following formula is used to eliminate gross errors in magnetic heading angle: In the formula, The average magnetic angle when a pedestrian walks in a straight line. For pedestrians walking i The heading angle corresponding to each step, where S is the number of straight steps a pedestrian takes. The fifth detection threshold; Step 4: Combine the pedestrian movement information obtained in Step 1 and the scene information obtained in Step 2 to perform building map angle matching to obtain the first heading angle; use the average magnetic angle of pedestrians walking in a straight line obtained in Step 3 to correct the first heading angle to obtain the final selected building map heading angle; The first heading angle is obtained by matching building map angles using the following formula: In the formula, The heading angle corresponding to the selected straight trajectory is denoted as the first heading angle; The heading angle corresponding to the candidate straight trajectory. argmin ( θ The function represents taking the minimum angle.
2. The robust indoor positioning heading angle estimation method according to claim 1, characterized in that, In step 1, the IMU data includes raw gyroscope three-axis data and raw accelerometer three-axis data, wherein the raw gyroscope three-axis data is denoted as... ω x , ω y , ω z The raw triaxial data of the accelerometer are denoted as a x , a y , a z The magnetometer data includes the raw triaxial data of the magnetometer, denoted as... m x , m y , m z ; The following formula is used to determine whether a pedestrian's walking trajectory is a straight path: If the above two formulas are satisfied, then the pedestrian's walking trajectory is determined to be a straight path; in, N The number of raw three-axis gyroscope data collected from pedestrians within the length of the straight-line detection window; In the first i The gyroscope measurement value in the vertical direction in the local horizontal coordinate system at that moment. This is gyroscope noise; θ k For pedestrians walking k The heading angle corresponding to the step, θ k-1 For pedestrians walking k -1 step corresponds to the heading angle, which is obtained by combining the original triaxial data of the magnetometer and the original triaxial data of the accelerometer; The first detection threshold, This is the second detection threshold.
3. The robust indoor positioning heading angle estimation method according to claim 2, characterized in that, In step 1, the length of the straight path taken by the pedestrian is obtained using the following formula: in, D This represents the length of the straight-line path a pedestrian walks. S The number of straight steps taken by a pedestrian is obtained by detecting the number of peaks in the acceleration amplitude. K This refers to the scale factor term in the classic step size model. and These represent the maximum and minimum acceleration amplitude detected at each step during the pedestrian's straight-line movement. and It is obtained by transforming the raw triaxial data of the accelerometer.
4. The robust indoor positioning heading angle estimation method according to claim 1, characterized in that, In step 2, the indoor environment is divided into multiple scene areas by combining map information and the actual building view; Based on whether the coordinates corresponding to the coarse positioning information are within the coordinate range of a certain scene area, and combined with the relationship between the length of the pedestrian's straight walking path and the third detection threshold, the scene area type corresponding to the pedestrian's current location is determined.
5. The robust indoor positioning heading angle estimation method according to claim 4, characterized in that, The interior environment is divided into a wide area, an office area, and a corridor area. The following formula is used to determine the scene area type corresponding to the pedestrian's current location: in, Indicates continuity M A rough positioning position. D This represents the length of the straight-line path a pedestrian walks. This is the third detection threshold.
6. The robust indoor positioning heading angle estimation method according to claim 1, characterized in that, In step 3, the following formula is used to eliminate gross magnetic interference: in, , and These are the measured values from the magnetometer. M0 This is the local reference magnetic field amplitude. This is the fourth detection threshold.
7. The robust indoor positioning heading angle estimation method according to claim 1, characterized in that, In step 4, after obtaining the first heading angle, the method further includes: comparing the length of the pedestrian walking straight path with the straight distance corresponding to the selected straight trajectory; the straight distance corresponding to the second longest length of the selected straight trajectory is recorded as the second length; if the length of the pedestrian walking straight path is greater than the second length, it is determined that the building map angle matching is successful.
8. The robust indoor positioning heading angle estimation method according to claim 1, characterized in that, In step 4, the first heading angle is corrected using the following formula: in, This is the sixth detection threshold.