Fingerprint library and multi-sensor fusion indoor positioning method, system and device
By employing an indoor positioning method that combines fingerprint database and multi-sensor fusion, and utilizing WiFi signal fingerprint matching and multi-sensor data fusion, the problem of low indoor positioning accuracy is solved, achieving high-precision indoor positioning.
Patent Information
- Application Number
- CN202411335560.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-24
- Publication Date
- 2025-11-21
- Estimated Expiration
- 2044-09-24
AI Technical Summary
In complex indoor environments, single signal positioning methods or sensor positioning methods are prone to low positioning accuracy due to error accumulation, especially serious positioning deviations during long-term navigation.
An indoor positioning method using fingerprint database and multi-sensor fusion is adopted. A rough absolute position is obtained by matching WiFi signal fingerprints, and the relative position is calculated by combining data from gyroscope, magnetometer and accelerometer. The data is then fused using an unscented Kalman filter algorithm to output the accurate target position.
It significantly improves indoor positioning accuracy, combining the absolute position constraints provided by fingerprint positioning with the continuous relative position advantages of multi-sensor PDR algorithms to achieve high-precision and seamless positioning results.
Smart Images

Figure CN119300140B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of indoor positioning, in particular to a fingerprint database and a multi-sensor fusion indoor positioning method, system and device. BACKGROUND
[0002] Indoor positioning technology makes up for the shortcomings of satellite positioning indoors, and is widely used in many fields such as shopping mall navigation, hospital management, industrial safety, and elderly care monitoring. It provides accurate location services, optimizes navigation experience, improves efficiency and safety, and becomes an important cornerstone of digital transformation.
[0003] Indoor positioning technology is mainly divided into signal-based positioning methods or sensor-based positioning methods. However, in complex indoor structures such as multi-story buildings or large shopping malls, relying on a single signal positioning method or sensor positioning, especially during long navigation, will cause positioning deviation due to error accumulation, resulting in low indoor positioning accuracy. SUMMARY
[0004] The present application provides a fingerprint database and a multi-sensor fusion indoor positioning method, system and device, which can improve the positioning accuracy indoors.
[0005] In a first aspect, the present application provides a fingerprint database and a multi-sensor fusion indoor positioning method, which comprises:
[0006] Obtaining the positioning result of the target to be measured in the fingerprint database;
[0007] Obtaining sensor data of a sensor network, calculating the forward information of the target to be measured based on the sensor data, the sensor network at least including a gyroscope, a magnetic sensor, and an acceleration sensor;
[0008] Calculating the heading angle based on the sensor data, and calculating the position information of the target to be measured based on the forward information and the heading angle;
[0009] Determining the target positioning result of the target to be measured based on the positioning result and the position information.
[0010] By adopting the technical scheme, the WiFi signal fingerprint matching algorithm is used to obtain the rough absolute position of the target device, then the data of the gyroscope, the magnetometer and the accelerometer are collected by the multi-sensor network installed on the target device, the forward distance and the heading angle of the target are calculated based on the sensor data to determine the relative position information of the target. Finally, the fingerprint positioning result and the relative position calculated by the multi-sensor are fused, the unscented Kalman filtering algorithm is adopted to output the fused accurate target position by comprehensively utilizing the advantages of the two positioning results. The advantages of the absolute position constraint provided by the WiFi signal fingerprint positioning and the continuous relative position provided by the PDR algorithm of the multi-sensor are fully utilized. Through the cooperation and data fusion of the two, the positioning system can not only obtain the initial position and correct the position drift by the fingerprint positioning, but also can rely on the PDR to provide continuous positioning state prediction, thereby significantly improving the indoor positioning accuracy.
[0011] Optionally, before the positioning result of the target to be measured in the fingerprint database is acquired, the method further comprises:
[0012] dividing the target indoor area into grids to obtain a plurality of grid points;
[0013] taking each of the grid points as a reference point, collecting signals of each of the reference points to obtain signal strengths corresponding to each of the reference points;
[0014] constructing a fingerprint database based on the signal strengths corresponding to each of the reference points.
[0015] By adopting the technical scheme, the sampling workload can be effectively reduced by sampling the grid division of the area, and the WiFi signal distribution in the grid area can be represented. The completed fingerprint database contains the WiFi hotspot signal features of the target area. When the target device needs to be positioned, the measured online WiFi signal of the target device can be matched with the fingerprint information in the database to realize efficient indoor positioning.
[0016] Optionally, the positioning result of the target to be measured in the fingerprint database comprises:
[0017] collecting the WiFi signal of the target to be measured and performing data preprocessing on the WiFi signal;
[0018] matching the preprocessed WiFi signal of the target to be measured with the fingerprint database to obtain a matching result;
[0019] determining the positioning result of the target to be measured in the fingerprint database based on the matching result.
[0020] By adopting the technical scheme, the effective signal can be improved by filtering out the noise through pre-processing of the collected signal, and then the WiFi signal is matched with the fingerprint database to quickly and efficiently determine the similarity of the signal, so that accurate positioning can be realized by using the fingerprint database.
[0021] Optionally, the calculating the advancing information of the target to be measured based on the sensor data comprises:
[0022] Obtaining Y-axis acceleration collected by the acceleration sensor in the sensor data, the Y-axis acceleration comprising maximum acceleration and minimum acceleration;
[0023] Substituting the maximum acceleration and the minimum acceleration into a preset first calculation formula to obtain the step length of the target to be measured, and taking the step length as the advancing information;
[0024] The first calculation formula is:
[0025] Wherein, L is the step length, K is the step length model coefficient, a max is the maximum acceleration, and a min is the minimum acceleration.
[0026] By adopting the technical scheme, the step length of the target to be measured can be estimated in real time by detecting the acceleration peak-valley characteristics of the Y-axis direction of the accelerometer in the walking process of the target to be measured, extracting the maximum and minimum accelerations of the step cycle, and bringing the two accelerations into the first calculation formula.
[0027] Optionally, the calculating the heading angle based on the sensor data comprises:
[0028] Obtaining magnetic force data collected by the magnetic force sensor, acceleration data collected by the acceleration sensor, and gyroscope data collected by the gyroscope in the sensor data;
[0029] Calculating the pitch angle and the yaw angle based on the acceleration data and the magnetic force data;
[0030] Determining the heading angle based on the magnetic force data, the pitch angle, the yaw angle, and the gyroscope data.
[0031] By adopting the technical scheme, the advantages of the magnetometer, the accelerometer, and the gyroscope are comprehensively utilized to jointly solve the heading angle. First, the pitch angle and the yaw angle of the device are calculated according to the data of the accelerometer and the magnetometer, and then the two angles are taken as the initial orientation. The drift of the gyroscope is corrected in combination with the data of the magnetometer, the orientation angle is integrated through the data of the gyroscope, and the accurate heading angle is obtained.
[0032] Optionally, determining the heading angle based on the magnetic data, the pitch angle and yaw angle, and the gyroscope data includes:
[0033] Calculate the initial heading angle based on the magnetic data, as well as the pitch and yaw angles;
[0034] The rotation angles around the X, Y, and Z axes are calculated based on the gyroscope data.
[0035] The rotation angle and the initial heading angle are fused to obtain the fused heading angle.
[0036] By adopting the above technical solution, the advantages of the magnetometer in providing accurate initial orientation and the gyroscope in continuously capturing rotational motion are fully utilized. By organically combining the two, real-time updates of the heading angle can be achieved, avoiding the error accumulation caused by relying on a single sensor.
[0037] Optionally, determining the target positioning result of the target under test based on the positioning result and the location information includes:
[0038] The localization result and the location information are fused based on unscented Kalman filtering, and the output of the unscented Kalman filtering is used as the target localization result of the target to be tested.
[0039] By adopting the above technical solution, an unscented Kalman filter model is used, with fingerprint positioning results as observations and continuous positions calculated by the inertial system as state variables. During the recursive filtering process, state prediction and measurement updates are repeatedly performed, and the optimal fused target positioning result is output in real time, providing high-precision and seamless positioning performance.
[0040] A second aspect of this application provides an indoor positioning system based on a fingerprint database and multi-sensor fusion, the system comprising:
[0041] The location result acquisition module is used to acquire the location result of the target under test in the fingerprint database;
[0042] A forward information acquisition module is used to acquire sensor data from a sensor network and calculate the forward information of the target to be measured based on the sensor data. The sensor network includes at least a gyroscope, a magnetometer, and an accelerometer.
[0043] The position information calculation module is used to calculate the heading angle based on the sensor data, and to calculate the position information of the target to be measured based on the forward information and the heading angle;
[0044] The positioning result determination module is used to determine the target positioning result based on the positioning result and the location information.
[0045] A third aspect of this application provides a computer storage medium storing a plurality of instructions adapted for loading by a processor and executing the method steps described above.
[0046] A fourth aspect of this application provides an electronic device comprising: a processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and to execute the method steps described above.
[0047] In summary, one or more technical solutions provided in the embodiments of this application have at least the following technical effects or advantages:
[0048] This application first uses a WiFi signal fingerprint matching algorithm to obtain the approximate absolute position of the target device. Then, through a multi-sensor network installed on the target device, data from gyroscopes, magnetometers, and accelerometers are collected. Based on this sensor data, the target's forward distance and heading angle are calculated to determine the target's relative position information. Finally, the fingerprint positioning result and the relative position calculated by the multi-sensor network are fused. An unscented Kalman filter algorithm is used to combine the advantages of both positioning results and output the fused accurate target position. This fully utilizes the advantage of WiFi signal fingerprint positioning providing absolute position constraints and the advantage of multi-sensor PDR algorithm providing continuous relative position. Through the synergy and data fusion of these two methods, the positioning system can both use fingerprint positioning to obtain the initial position and correct position drift, and rely on PDR to provide continuous positioning state prediction, significantly improving indoor positioning accuracy. Attached Figure Description
[0049] Figure 1 This is a flowchart illustrating an indoor positioning method based on fingerprint database and multi-sensor fusion provided in an embodiment of this application.
[0050] Figure 2 This is a schematic diagram illustrating the principle of a Kalman filter-optimized heading angle algorithm provided in an embodiment of this application;
[0051] Figure 3 This is a schematic diagram illustrating the principle of indoor positioning provided in an embodiment of this application;
[0052] Figure 4 This is a schematic diagram of a fingerprint database and multi-sensor fusion indoor positioning system provided in an embodiment of this application;
[0053] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.
[0054] Explanation of reference numerals in the attached figures: 500, electronic device; 501, processor; 502, communication bus; 503, user interface; 504, network interface; 505, memory. DETAILED DESCRIPTION
[0055] In order for those skilled in the art to better understand the technical solutions in the specification, the technical solutions in the specification will be clearly and completely described below in combination with the accompanying drawings in the specification embodiments. Obviously, the described embodiments are only some of the embodiments of the present application, not all the embodiments.
[0056] In the description of the embodiments of the present application, the words such as "for example" or "for instance" are used to represent an example, illustration or description. Any embodiment or design scheme described as "for example" or "for instance" in the embodiments of the present application should not be interpreted as more preferred or more advantageous than other embodiments or design schemes. Rather, the words such as "for example" or "for instance" are intended to present the relevant concept in a specific manner.
[0057] In the description of the embodiments of the present application, the term "a plurality of" means two or more. For example, a plurality of systems means two or more systems, and a plurality of screen terminals means two or more screen terminals. In addition, the terms "first" and "second" are used only for the purpose of description, and should not be understood as indicating or implying relative importance or implicitly indicating the indicated technical features. Therefore, the features defined with "first" and "second" can explicitly or implicitly include one or more features. The terms "include", "contain", "have" and their variants mean "include but are not limited to", unless otherwise specifically emphasized.
[0058] The technical solutions in the embodiments of the present application will be clearly and completely described below in combination with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, not all the embodiments.
[0059] Please refer to Figure 1 , a flowchart of a fingerprint database and multi-sensor fusion indoor positioning method is specifically proposed. The method can be realized by relying on a computer program, can be realized by relying on a single-chip microcomputer, and can run on a fingerprint database and multi-sensor fusion indoor positioning system. The computer program can be integrated in a computer device, or can run as an independent tool application. Specifically, the method includes steps 10 to 40, and the above steps are as follows.
[0060] As an optional embodiment, before obtaining the positioning result of the target to be measured in the fingerprint database, the fingerprint database establishment process can also be included, which specifically includes the following steps.
[0061] Step 001: The target indoor area is divided into a plurality of grid points.
[0062] Specifically, in order to construct the fingerprint database, the target indoor area needs to be processed first. The embodiment of the application divides the target area into multiple grids by using grid division, and the center point of each grid is taken as a sampling reference point. This is because, for an indoor environment, considering the propagation law of WiFi signals, the signals in the same grid area can be regarded as similar. The size of the grid is set according to the actual situation, and is usually set to about 1 meter x 1 meter, thereby obtaining multiple grid points.
[0063] Step 002: Take each grid point as a reference point, and collect signals for each reference point to obtain the signal strength corresponding to each reference point.
[0064] Specifically, after completing the grid division of the indoor area, WiFi signal collection needs to be performed on the center point of each grid to construct the fingerprint database. The center point of the grid is selected as the reference point because it can represent the WiFi signal distribution in the corresponding grid area. For each reference point, a signal collection device (such as a smart phone) is used to collect the signals of multiple WiFi hotspots (routers) multiple times, and the MAC address and signal strength value of each WiFi hotspot at each reference point are recorded. Repeat the process until each reference point collects enough valid signal samples. After preprocessing such as removing outliers, the average signal strength value of each WiFi hotspot at each reference point can be calculated.
[0065] Step 003: Construct a fingerprint database based on the signal strength corresponding to each reference point.
[0066] Specifically, in order to realize indoor positioning based on WiFi signals, a fingerprint database containing the WiFi signal characteristics of the entire target area needs to be constructed. After obtaining the WiFi signal strength data of all reference points, the fingerprint database can be constructed. Specifically, the position coordinates of each reference point and the MAC addresses and corresponding signal strength values of the multiple WiFi hotspots covered thereby are combined to form a feature vector, which is taken as the fingerprint feature of the reference point. Then, the feature vectors of all reference points are combined and stored in the database, with the reference points indexed by MAC addresses, to form the fingerprint database. When a device to be positioned needs to be positioned, the WiFi hotspots and signal strengths scanned thereby are extracted first to form an online signal vector. Then, the online signal vector is compared with the fingerprint feature vectors of all reference points in the database. A machine learning algorithm is usually used to calculate the similarity between the vectors, and finally determine which reference point vector is most similar to the online signal vector, so that it is considered that the device to be positioned is close to the position of this reference point.
[0067] Step 10: Obtain the positioning result of the target to be measured in the fingerprint database.
[0068] The target to be measured in the embodiment of the application refers to a mobile device or a person that needs to be positioned.
[0069] The fingerprint database in the embodiments of the present application refers to a database established by collecting WiFi signal features in a target area, which is used for matching with the signal of a to-be-measured target for positioning.
[0070] The positioning result in the embodiments of the present application refers to the position information of the to-be-measured target obtained by matching the fingerprint database.
[0071] Specifically, in order to improve the accuracy of indoor positioning, the rough position of the to-be-measured target needs to be determined by a fingerprint positioning algorithm first. Specifically, the target area is first divided, and WiFi signals are collected at each grid point to construct a fingerprint database containing WiFi signal features of each grid point. In positioning, the WiFi signal of the to-be-positioned device is first collected and preprocessed, such as denoising and filtering. Then the processed signal is matched with the signal in the fingerprint database, and the most similar reference point is determined by the matching algorithm, that is, the positioning result of the to-be-measured target in the fingerprint database, because the indoor WiFi signal is relatively stable, and the fingerprint database can provide the approximate position information of the to-be-measured target.
[0072] On the basis of the above embodiments, as an optional embodiment, the step of obtaining the positioning result of the to-be-measured target in the fingerprint database can further include the following steps:
[0073] Step 101: Collecting the WiFi signal of the to-be-measured target and performing data preprocessing on the WiFi signal.
[0074] Specifically, after the fingerprint database is established, when a to-be-measured target needs to be positioned, the first step is to collect the WiFi signal of the environment where the to-be-measured target is located. The WiFi module built-in the mobile device (such as a mobile phone) of the to-be-measured target can be used to scan and obtain the signal strength of the surrounding WiFi hotspots. In order to improve the effect of matching positioning, the collected WiFi original signal needs to be preprocessed. First, remove the records with signal strength of 0 to filter out unusable WiFi information. Then, take the average value of the signal strengths of multiple hotspots to reduce the influence of signal transient fluctuations. Then, perform smoothing filtering, such as Kalman filtering to smooth the signal value. Finally, other signal calibration, coordinate conversion and other operations can be performed to obtain the processed online signal fingerprint representing the WiFi signal distribution of the target position.
[0075] Step 102: Matching the preprocessed WiFi signal of the to-be-measured target with the fingerprint database to obtain a matching result.
[0076] Specifically, after the collected target WiFi signal is preprocessed, the next step is to match with the pre-constructed fingerprint database to determine the location of the target. In the matching process, the online WiFi signal fingerprint obtained by preprocessing is compared with all reference point fingerprints in the database in turn, the similarity or distance measure between the signal feature vectors is calculated, and it is taken as the matching result.
[0077] Step 103: determining the positioning result of the target in the fingerprint database based on the matching result.
[0078] Specifically, the fingerprint matching result gives the reference point closest to the target WiFi signal, that is, the reference point with the highest similarity. Since the position coordinates of each reference point are known when the fingerprint database is constructed, according to the most similar reference point given in the matching result, the coordinates of the reference point can be taken as the positioning result of the target in the fingerprint database. This is equivalent to completing the fingerprint positioning process and giving a rough estimate of the target location. The coordinates of this positioning result may not be accurate, but it provides a rough prior information of the target location.
[0079] Step 20: obtaining sensor data of the sensor network, and calculating the advance information of the target based on the sensor data, the sensor network at least including a gyroscope, a magnetic sensor, and an acceleration sensor.
[0080] Specifically, in order to achieve more accurate indoor positioning, the sensor network of the embodiments of the present application adopts a multi-sensor fusion scheme in the PDR technology, which requires integrating a multi-sensor module including a gyroscope, a magnetic sensor, and an acceleration sensor on the mobile device. In the positioning process, three-axis linear acceleration data is collected using the acceleration sensor, which can calculate the step frequency, stride, and other advance information of the user, i.e., determine how long the user has walked a step, and thus calculate the relative displacement. In addition, the three-axis gyroscope can measure angular velocity, and after integration, the angle of rotation of the device in three directions can be obtained. The magnetic sensor measures the earth's magnetic field and can obtain the azimuth reference information. By integrating these sensor data, the motion direction and relative displacement of the device can be accurately determined. Compared with fingerprint positioning, it can provide continuous positioning data, and the two complement each other to improve positioning accuracy and continuity.
[0081] Based on the above embodiments, as an optional embodiment, the step of calculating the advance information of the target based on the sensor data can further include the following steps:
[0082] Step 201: obtaining Y-axis acceleration collected by the acceleration sensor in the sensor data, the Y-axis acceleration including maximum acceleration and minimum acceleration.
[0083] Step 202: Substitute the maximum acceleration and the minimum acceleration into a preset first calculation formula to obtain a step length of the target to be measured, and take the step length as the forward information.
[0084] Specifically, in the multi-sensor fusion positioning system, in order to calculate the forward distance of the user, a key is to obtain the step length information of the user. The embodiment of the application adopts a step length estimation method based on an acceleration sensor. The acceleration sensor is installed on a mobile device on the body of the user, and can detect the acceleration change of the body of the user in the vertical direction Y axis when the user walks. When the user completes a complete step cycle, the acceleration signal will appear periodic fluctuation on the Y axis, and the corresponding maximum acceleration and minimum acceleration can represent the acceleration characteristics of a step. The system extracts the acceleration component in the Y axis direction (vertically downward) from the collected data of the acceleration sensor, and detects the wave crest and trough to obtain the maximum acceleration a max and the minimum acceleration a min in the step cycle. Then, a max and a min are substituted into a first calculation formula, so that the step length L of the user can be estimated. The first calculation formula is as follows: wherein L is the step length, K is a step length model coefficient, a max is the maximum acceleration, and a min is the minimum acceleration. The first calculation formula establishes the relationship between the step length and the acceleration peak-valley difference, and k is a step length model coefficient. The step length is calculated by using the least square method based on a plurality of experimental results. The step length is the distance of the user in the step cycle, that is, the forward information of the user.
[0085] Step 30: Calculate the heading angle based on the sensor data, and calculate the position information of the target to be measured based on the forward information and the heading angle.
[0086] Specifically, after obtaining the forward information (step length) of the target, another key is to determine the walking direction of the user, that is, the heading angle. The three-axis gyroscope can measure the angular velocity of the device in the three-dimensional space, and after processing, the azimuth angle change of the device at different times can be obtained, so that the azimuth angle integral in a time period, that is, the heading angle, can be calculated. The heading angle is corrected by the magnetometer data. After obtaining the step length and the heading angle of the user motion, the real-time motion trajectory and the current relative position of the user can be calculated according to the vector superposition. Assuming that the initial position of the user is known, then every step, the displacement distance of the user can be determined according to the step length, and the displacement direction can be determined in combination with the heading angle. The position information of the target to be measured can be updated through vector superposition. With time stepping, the continuous motion trajectory of the user can be obtained.
[0087] On the basis of the above embodiment, as an optional embodiment, the step of calculating the heading angle based on the sensor data can further include the following steps:
[0088] Step 301: Obtain the magnetic force data collected by the magnetic force sensor, the acceleration data collected by the acceleration sensor, and the gyroscope data collected by the gyroscope in the sensor data.
[0089] Specifically, in the multi-sensor fusion indoor positioning system, the magnetometer, the accelerometer, and the gyroscope are three types of key motion sensors for collecting different physical signals describing the motion state of the device. Among them: the magnetometer measures the magnetic field strength and direction in the environment, which can provide an absolute direction reference for correcting the direction angle calculation. The accelerometer measures the specific force generated during motion, which can calculate motion acceleration, speed, displacement, etc., while the gyroscope measures the angular velocity of each axis, which can calculate the azimuth angle and direction change of the device.
[0090] Step 302: Calculate the pitch angle and yaw angle based on the acceleration data and the magnetic force data.
[0091] Specifically, the pitch angle and yaw angle are obtained by combining the magnetic force sensor and the acceleration sensor to obtain the ground data, and the calculation formula is as follows: where θ is the pitch angle, is the yaw angle, A x , A y , and A z are the acceleration information measured by the acceleration sensor on the x, y, and z axes, respectively, and g is the gravitational acceleration.
[0092] Step 303: Determine the heading angle based on the magnetic force data, the pitch angle and the yaw angle, and the gyroscope data.
[0093] Specifically, the initial heading angle ω m is calculated based on the magnetic force data and the pitch angle and the yaw angle as follows: where ω is the magnetic field information obtained by the sensor on each axis, and the heading angle ω m is corrected by combining the magnetic declination angle α d to calculate the azimuth angle information ω n pointing in the positive Y-axis direction, as follows: ω n = ω m + α d ; the rotation angles around the X, Y, and Z axes are calculated based on the gyroscope data, as follows: β = ξ · δt, where β is the angle of rotation of the sensor around the corresponding axis within the time δt, ξ is the angular velocity within the time δt, and δt is the time difference between the current time and the previous time obtained by the gyroscope. The rotation angle and the initial heading angle are fused to obtain the fused heading angle ω k+1 : ω k+1 = ω k ± ξ · δt + V k · δt; where ωk+1 is the fused heading angle, v k is the increment of the angular velocity integration, v k is the increment of the angular velocity integration. The angles obtained by fusing the magnetic field, gyroscope and accelerometer using Kalman filtering are used to reduce cumulative errors and improve the accuracy of the heading angle.
[0094] See Figure 2 , a schematic diagram of a Kalman filter optimization heading angle algorithm provided by the embodiment of the application;
[0095] As Figure 2 shown, magnetic force data collected by a magnetic force sensor, acceleration data collected by an acceleration sensor and gyroscope data collected by a gyroscope in the sensor data are obtained, then the pitch angle and yaw angle are calculated according to the acceleration data and the magnetic force data, the initial heading angle is calculated according to the pitch angle and the yaw angle, the rotation angles around the X-axis, the Y-axis and the Z-axis are calculated according to the gyroscope data, and the rotation angles and the initial heading angle are fused based on Kalman filtering to obtain the fused heading angle.
[0096] Step 40: determining the target positioning result of the target to be measured based on the positioning result and the position information.
[0097] Specifically, the positioning result refers to the positioning result of the target to be measured in the fingerprint library matched by using the WiFi fingerprint positioning algorithm; and the position information refers to the azimuth angle and displacement information of the device to be positioned relative to the initial point calculated based on the PDR multi-sensor algorithm.
[0098] It should be noted that the Pedestrian Dead Reckoning (PDR) algorithm uses sensor data such as accelerometers, gyroscopes and magnetometers to track the user's gait and calculate their position. It can be used for positioning indoors without relying on signal coverage, and has high positioning accuracy. However, the PDR algorithm is susceptible to cumulative sensor errors, which can cause accuracy to decline over time, and still needs to be further improved and optimized. In addition, the fingerprint library algorithm has been widely applied and researched in the field of indoor positioning, and has the characteristics of a wide range of applicable scenarios and low hardware cost, so it can use existing devices to realize position recognition by establishing and comparing a fingerprint database. However, this method requires a large amount of fingerprint database support and may be affected by the quality and update frequency of the database.
[0099] Therefore, the embodiment of the application proposes a multi-sensor fusion indoor positioning method based on a fingerprint library and PDR, which fuses the fingerprint library and the multi-sensor fusion using an unscented Kalman filter algorithm to achieve real-time high-precision positioning.
[0100] Specifically, after obtaining the fingerprint positioning result of the target to be positioned and the relative position information calculated by the PDR, in order to fully fuse the advantages of the two and improve the positioning accuracy, the embodiment of the application adopts a multi-sensor data fusion method of unscented Kalman filtering.
[0101] The position information obtained by the PDR algorithm is taken as a parameter of a state equation, and the model is as follows:
[0102] Wherein, x k and y k are position information calculated by the PDR algorithm at k time, L is a step length of the target to be measured at k time, ω k is heading angle information at k time, and W k-1 is system process noise.
[0103] The WiFi positioning information and the fused heading angle are taken as parameters of an observation equation, and the model is as follows: Wherein, x k and y k are positioning results obtained by fingerprint positioning of the target to be measured at k time, ω k , ω k-1 are heading angle information at k time and k-1 time, ω k is a heading angle change at k time, V k-1 is system observation noise.
[0104] Unscented Kalman filtering is used for fusion, and the output result of the unscented Kalman filtering is taken as a positioning result. The process of the unscented Kalman filtering algorithm is as follows:
[0105] 2n+1 sampling points are calculated, and the formula is as follows:
[0106]
[0107] Wherein, n is a system state dimension, λ=γ 2 (n+κ)-n is a parameter for obtaining a sampling point, the dispersion degree of the sampling point is determined according to the value of γ, κ is a to-be-selected parameter, and P is a state error covariance matrix.
[0108] The corresponding weight of the sampling point is calculated, and the formula is as follows:
[0109] Wherein, the subscripts m and c are mean and covariance respectively.
[0110] The prediction update equation is as follows:
[0111]
[0112]
[0113]
[0114] wherein Q k is a process noise covariance matrix.
[0115] The observation update equation is as follows:
[0116]
[0117]
[0118]
[0119] wherein R k is a measurement noise covariance matrix.
[0120] The result output by the unscented Kalman filter is taken as the target positioning result of the current target to be measured, and when the next positioning is performed, pre-positioning is performed according to the step heading angle, and if the positioning result enters or leaves the range of the fingerprint database compared with the last step positioning result, the positioning result of the fingerprint database is used as the observation input of the step.
[0121] Please refer to Figure 3 , which is a schematic diagram of the principle of indoor positioning provided by the embodiment of the present application.
[0122] As Figure 3 indicated, first, the signal of the target to be measured is received online, and the signal is matched with the fingerprint database to obtain the positioning result of the target to be measured in the fingerprint database, then the related sensor data of the target to be measured is obtained from the sensor network, and positioning is performed based on PDR to obtain position information, and finally the positioning result of the fingerprint database and the position information positioned by PDR are fused based on the unscented Kalman filter to output the target positioning result.
[0123] Please refer to Figure 4 , which is a module schematic diagram of the indoor positioning system of fingerprint database and multi-sensor fusion provided by the embodiment of the present application. The indoor positioning system of fingerprint database and multi-sensor fusion can include a positioning result acquisition module, an advance information acquisition module, a position information calculation module, and a positioning result determination module, wherein:
[0124] The positioning result acquisition module is configured to acquire the positioning result of the target to be measured in the fingerprint database.
[0125] The advance information acquisition module is configured to acquire the sensor data of the sensor network, and calculate the advance information of the target to be measured based on the sensor data. The sensor network at least includes a gyroscope, a magnetic sensor, and an acceleration sensor.
[0126] The position information calculation module is configured to calculate a heading angle based on the sensor data, and calculate position information of the target to be measured based on the forward movement information and the heading angle.
[0127] The positioning result determination module is configured to determine a target positioning result based on the positioning result and the position information.
[0128] Optionally, the positioning result acquisition module is further configured to divide a target indoor area into a plurality of grid points, take each of the grid points as a reference point, collect signals of each of the reference points to obtain signal strengths corresponding to each of the reference points, and construct a fingerprint database based on the signal strengths corresponding to each of the reference points.
[0129] Optionally, the positioning result acquisition module is further configured to collect a WiFi signal of a target to be measured, pre-process the WiFi signal of the target to be measured, match the pre-processed WiFi signal of the target to be measured with the fingerprint database to obtain a matching result, and determine a positioning result of the target to be measured in the fingerprint database based on the matching result.
[0130] Optionally, the forward movement information acquisition module is further configured to acquire Y-axis acceleration collected by the acceleration sensor in the sensor data, the Y-axis acceleration including maximum acceleration and minimum acceleration.
[0131] substitute the maximum acceleration and the minimum acceleration into a preset first calculation formula to obtain a step length of the target to be measured, and take the step length as the forward movement information; the first calculation formula is: wherein, L represents the step length, K represents a step length model coefficient, a max represents the maximum acceleration, and a min represents the minimum acceleration.
[0132] Optionally, the position information calculation module is further configured to acquire magnetic force data collected by a magnetic force sensor, acceleration data collected by the acceleration sensor, and gyroscope data collected by the gyroscope in the sensor data, calculate a pitch angle and a yaw angle based on the acceleration data and the magnetic force data, and determine the heading angle based on the magnetic force data, the pitch angle, the yaw angle, and the gyroscope data.
[0133] Optionally, the position information calculation module is further configured to acquire magnetic force data collected by a magnetic force sensor, acceleration data collected by the acceleration sensor, and gyroscope data collected by the gyroscope in the sensor data, calculate a pitch angle and a yaw angle based on the acceleration data and the magnetic force data, and determine the heading angle based on the magnetic force data, the pitch angle, the yaw angle, and the gyroscope data.
[0134] Optionally, the position information calculation module is further configured to calculate an initial heading angle based on the magnetic force data and the pitch angle and the yaw angle; calculate rotation angles around the X-axis, the Y-axis and the Z-axis based on the gyroscope data; and fuse the rotation angles and the initial heading angle to obtain the fused heading angle.
[0135] It should be noted that the system provided in the above embodiments is only used as an example to divide the above functional modules when implementing the functions. In actual applications, the above functions can be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the above described functions. In addition, the system and method embodiments provided in the above embodiments belong to the same concept, and the specific implementation process is described in the method embodiments, which will not be described here.
[0136] The computer storage medium provided in the embodiments of the present application can store a plurality of instructions, and the instructions are suitable for being loaded by a processor and executing the above-described fingerprint library and multi-sensor fusion indoor positioning method. The specific execution process can be referred to the specific description of the above embodiments, which will not be described here.
[0137] Please refer to Figure 5 The present application also discloses an electronic device. Figure 5 is a structural schematic diagram of an electronic device disclosed by the embodiments of the present application. The electronic device 500 can include at least one processor 501, at least one network interface 504, a user interface 503, a memory 505, and at least one communication bus 502.
[0138] The communication bus 502 is used to realize the connection communication between the components.
[0139] The user interface 503 can include a display screen (Display), a camera (Camera), and optionally the user interface 503 can also include a standard wired interface and a wireless interface.
[0140] The network interface 504 can optionally include a standard wired interface and a wireless interface (such as a WI-FI interface).
[0141] The processor 501 can include one or more processing cores. The processor 501 connects various parts within the server through various interfaces and lines, performs various functions of the server and processes data by running or executing instructions, programs, code sets or instruction sets stored in the memory 505, and calling data stored in the memory 505. Alternatively, the processor 501 can be implemented in at least one of a hardware form of a digital signal processing (DSP), a field-programmable gate array (FPGA), and a programmable logic array (PLA). The processor 501 can integrate a combination of one or more of a central processing unit (CPU), a graphics processing unit (GPU), and a modem. Among them, the CPU mainly processes operating systems, user interfaces, and application programs; the GPU is responsible for rendering and drawing the content to be displayed on the display screen; and the modem is used for processing wireless communication. It can be understood that the above-mentioned modem can also not be integrated into the processor 501, but can be realized by a separate chip.
[0142] The memory 505 can include a random access memory (RAM) and a read-only memory (ROM). Optionally, the memory 505 includes a non-transitory computer-readable storage medium. The memory 505 can be used to store instructions, programs, codes, code sets or instruction sets. The memory 505 can include a program storage area and a data storage area, wherein the program storage area can store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing the above-mentioned various method embodiments, etc.; the data storage area can store data involved in the above-mentioned various method embodiments, etc. The memory 505 can also be at least one storage device located away from the aforementioned processor 501. Referring to Figure 5 The memory 505 as a kind of computer storage medium can include an operating system, a network communication module, a user interface module, a fingerprint library and an application program of a multi-sensor fusion indoor positioning method.
[0143] In Figure 5The electronic device 500 shown, the user interface 503 is mainly used for providing the interface for the user to input, obtaining the data input by the user; and the processor 501 can be used to call the application program stored in the memory 505, and the fingerprint library and the multi-sensor fusion indoor positioning method, when executed by one or more processors 501, make the electronic device 500 execute the method as described in one or more of the above embodiments. It should be noted that for the foregoing method embodiments, in order to simply describe, they are all expressed as a series of action combinations, but those skilled in the art should know that the application is not limited to the described action sequence, because according to the application, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should know that the embodiments described in the specification all belong to preferred embodiments, and the actions and modules involved are not necessarily required by the application.
[0144] In the above embodiments, the description of each embodiment has its own focus, and the parts not described in detail in a certain embodiment can be referred to the related description of other embodiments.
[0145] In several embodiments provided in the present application, it should be understood that the disclosed device can be implemented in other ways. For example, the device embodiments described above are only schematic, and the division of units is only a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units shown or discussed can be indirect coupling or communication connection through some service interface, device or unit, and can be electrical or other forms.
[0146] The units described as separate components can or can not be physically separate, and the components shown as units can or can not be physical units, that is, they can be located in one place, or can be distributed on a plurality of network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiment scheme.
[0147] In addition, each functional unit in each embodiment of the present application can be integrated in one processing unit, or each unit can exist physically, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of software functional unit.
[0148] The integrated unit, if implemented in the form of a software function unit and sold or used as an independent product, can be stored in a computer readable memory. Based on such understanding, the technical solutions of the present application essentially or the part that contributes to the prior art or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a memory and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server or a network device, etc.) to execute all or part of the steps of the embodiments of the present application. The aforementioned memory includes: a U disk, a mobile hard disk, a magnetic disk or an optical disk, and various media that can store program codes.
[0149] The above-described are only exemplary embodiments of the present disclosure, and cannot limit the scope of the present disclosure. That is, any equivalent changes and modifications made in accordance with the teachings of the present disclosure are still within the scope of the present disclosure. Other embodiments of the present disclosure will be readily apparent to those skilled in the art upon considering the specification and practicing the true principles of the present disclosure.
[0150] The present application is intended to cover any variations, uses, or adaptive changes of the present disclosure that follow the general principles of the present disclosure and include common knowledge or conventional technical means in the technical field not recorded in the present disclosure. The specification and examples are only considered as exemplary, and the scope and spirit of the present disclosure are defined by the claims.
Claims
1. An indoor positioning method that integrates a fingerprint database and multiple sensors, characterized in that, The method includes: Obtain the location results of the target in the fingerprint database; Acquire sensor data from the sensor network, and acquire the Y-axis acceleration collected by the accelerometer from the sensor data, wherein the Y-axis acceleration includes the maximum acceleration and the minimum acceleration; The maximum and minimum accelerations are substituted into a preset first calculation formula to obtain the step size of the target under test, and the step size is used as forward information. The first calculation formula is: ; Where L is the step size and K is the step size model coefficient. For maximum acceleration, To achieve the minimum acceleration, the sensor network includes at least a gyroscope, a magnetometer, and an accelerometer. The magnetic data collected by the magnetic sensor, the acceleration data collected by the accelerometer, and the gyroscope data collected by the gyroscope are obtained from the sensor data. The pitch angle and yaw angle are calculated based on the acceleration data and the magnetic force data. The initial heading angle is calculated based on the magnetic data, pitch angle, and yaw angle; the initial heading angle... for: ;in The magnetic field information on each axis obtained by the sensor is expressed through the heading angle. Combined with magnetic declination After correction, the azimuth information pointing in the positive direction of the Y-axis is calculated. The formula is as follows: The rotation angles around the X, Y, and Z axes are calculated based on the gyroscope data, using the following formulas: ,in, for The angle by which the sensor rotates around the corresponding axis within a given time period. for angular velocity over time, The time difference between the current moment and the previous moment obtained by the gyroscope; the rotation angle and the initial heading angle are fused to obtain the fused heading angle; The rotation angles around the X, Y, and Z axes are calculated based on the gyroscope data. The rotation angle and the initial heading angle are fused to obtain the fused heading angle, and the position information of the target under test is calculated based on the forward information and the heading angle. The target positioning result of the target to be measured is determined based on the positioning result and the location information.
2. The indoor positioning method based on fingerprint database and multi-sensor fusion according to claim 1, characterized in that, Before obtaining the location result of the target in the fingerprint database, the method further includes: The target indoor area is divided into grids, resulting in multiple grid points; Each of the grid points is used as a reference point, and signals are acquired at each of the reference points to obtain the signal strength corresponding to each reference point. A fingerprint database is constructed based on the signal strength corresponding to each of the aforementioned reference points.
3. The indoor positioning method based on fingerprint database and multi-sensor fusion according to claim 1, characterized in that, The process of obtaining the location result of the target in the fingerprint database includes: Collect the WiFi signal of the target under test and perform data preprocessing on the WiFi signal; The preprocessed WiFi signal of the target to be tested is matched with the fingerprint database to obtain the matching result; Based on the matching results, the location result of the target in the fingerprint database is determined.
4. The indoor positioning method based on fingerprint database and multi-sensor fusion according to claim 1, characterized in that, Determining the target location result of the target under test based on the positioning result and the location information includes: The localization result and the location information are fused based on unscented Kalman filtering, and the output of the unscented Kalman filtering is used as the target localization result of the target to be tested.
5. An indoor positioning system that integrates a fingerprint database and multiple sensors, characterized in that, For implementing the indoor positioning method using a fingerprint database and multi-sensor fusion as described in claim 1, the system comprises: The location result acquisition module is used to acquire the location result of the target under test in the fingerprint database; A forward information acquisition module is used to acquire sensor data from a sensor network and calculate the forward information of the target to be measured based on the sensor data. The sensor network includes at least a gyroscope, a magnetometer, and an accelerometer. The position information calculation module is used to calculate the heading angle based on the sensor data, and to calculate the position information of the target to be measured based on the forward information and the heading angle; The positioning result determination module is used to determine the target positioning result based on the positioning result and the location information.
6. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a plurality of instructions adapted to be loaded by a processor and executed as described in any one of claims 1-4.
7. An electronic device, characterized in that, The device includes a processor, a memory, a user interface, and a network interface. The memory is used to store instructions, the user interface and the network interface are used to communicate with other devices, and the processor is used to execute the instructions stored in the memory to cause the electronic device to perform the method as described in any one of claims 1-4.
Citation Information
Patent Citations
Multi-source information fusion positioning method based on FM signal and inertial sensor signal
CN117109570A
Method and apparatus for determining object position
US20190186925A1