Pedestrian positioning method and device based on IMU (Inertial Measurement Unit), electronic equipment and storage medium
By using the Kalman filtering algorithm and heading constraint model in the IMU-based pedestrian PDR positioning system, the problem of poor long-distance positioning accuracy in the GNSS denial environment is solved, and a higher positioning accuracy is achieved.
Patent Information
- Application Number
- CN202510138281.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-08
- Publication Date
- 2025-03-07
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing IMU-based pedestrian PDR positioning system has the problem of poor long-distance positioning accuracy in the GNSS denial environment.
By obtaining the current motion data of the target pedestrian, the heading angle is estimated using the Kalman filtering algorithm, and the heading is constrained based on the covariance and threshold of the heading angle, a second heading angle closer to the actual heading angle is obtained, thereby improving the positioning accuracy.
This method significantly improves the pedestrian long-distance positioning accuracy in the GNSS denial environment, and reduces the error impact of pedestrian lateral swing on heading angle through the heading constraint model.
Smart Images

Figure CN119573715A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure belongs to the field of positioning technology, and in particular relates to an IMU-based pedestrian positioning method, device, electronic device and storage medium. Background Art
[0002] The Global Navigation Satellite System (GNSS) is one of the most commonly used positioning systems and is widely used in various fields. However, the positioning accuracy of GNSS will drop significantly or even fail to be achieved in environments such as urban canyons, indoor environments, or where satellite signals are interfered with.
[0003] In order to solve the problem of pedestrian positioning in the above environment, the existing technology uses the Pedestrian Dead Reckoning (PDR) positioning system to accurately locate and navigate pedestrians, which plays an important role in the fields of indoor pedestrian positioning, emergency rescue, health monitoring, etc. The PDR positioning system uses sensors such as accelerometers and gyroscopes in the inertial measurement unit (IMU) to measure the acceleration, angular velocity and other motion data of the pedestrian's foot, combined with gait detection, step length and direction calculation algorithms, to achieve accurate positioning of pedestrians.
[0004] However, existing IMU-based pedestrian PDR positioning systems generally have the problem of poor long-distance positioning accuracy. Therefore, how to improve the long-distance positioning accuracy of pedestrians in a GNSS-denied environment is an issue that needs to be urgently addressed in this field. Summary of the invention
[0005] To solve the above problems, the present disclosure provides an IMU-based pedestrian positioning method, device, electronic device and storage medium, which aims to improve the long-distance positioning accuracy of pedestrians.
[0006] In order to achieve the above objectives, the present disclosure mainly provides the following technical solutions: In a first aspect, the present disclosure provides an IMU-based pedestrian positioning method, comprising: Acquire current motion data of the target pedestrian, where the current motion data is obtained according to IMU measurement; Estimate the target pedestrian's heading using the current motion data to obtain a current first heading angle and a covariance of the current first heading angle; Based on the current first heading angle, the heading of the target pedestrian is constrained by using the covariance and a first threshold to obtain a current second heading angle, wherein the first threshold is used to indicate the amplitude of the lateral swing of the target pedestrian during walking; The current position information of the target pedestrian is determined based on the current second heading angle.
[0007] Further, based on the current first heading angle, the target pedestrian heading is constrained by using the covariance and the first threshold to obtain a current second heading angle, including: Determining whether the covariance is greater than or equal to a first threshold; If yes, updating the first threshold to the covariance, and determining the current second heading angle to be the current first heading angle; If not, it is determined that the current second heading angle is zero.
[0008] Further, the target pedestrian heading is estimated by using the current motion data to obtain a current first heading angle and a covariance of the current first heading angle, including: Based on the Kalman filter algorithm, the heading of the target pedestrian is estimated using the current motion data to obtain a current first heading angle; Acquire a plurality of historical first heading angles within a recent first time period, wherein the plurality of historical first heading angles include the current first heading angle; Calculating an average value of the multiple historical first heading angles to obtain a current third heading angle; Based on the difference between the current first heading angle and the current third heading angle, a covariance of the current first heading angle is obtained.
[0009] Furthermore, before determining the current position information of the target pedestrian based on the current second heading angle, the method further includes: Obtaining various motion data in the most recent second period to obtain multiple historical accelerations; determining peak accelerations among the plurality of historical accelerations; Deleting peak accelerations less than or equal to a second threshold value from each peak acceleration to obtain at least one target peak acceleration; The number of the target peak accelerations is counted, and the number is determined as the number of steps of the target pedestrian, so as to determine the current position information based on the number of steps.
[0010] Furthermore, the current motion data of the target pedestrian is obtained, including: Obtain the original data of the target pedestrian measured by IMU; The sliding window is used to process the original data to obtain the current motion data.
[0011] Furthermore, the original data are processed using a sliding window to obtain current motion data, including: Based on a preset sliding window size, extracting a plurality of original data within the latest third time period from each original data; removing the maximum acceleration, the minimum acceleration, the maximum angular velocity, and the minimum angular velocity from the plurality of original data; The average value of each acceleration in the plurality of original data and the average value of each angular velocity are calculated to obtain the current motion data of the target pedestrian.
[0012] In a second aspect, the present disclosure provides an IMU-based pedestrian positioning device, the device comprising: An acquisition unit, used to acquire current motion data of the target pedestrian, wherein the current motion data is obtained according to IMU measurement; an estimating unit, configured to estimate the target pedestrian's heading using the current motion data, and obtain a current first heading angle and a covariance of the current first heading angle; a constraint unit, configured to constrain the target pedestrian's heading based on the current first heading angle by using the covariance and a first threshold to obtain a current second heading angle, wherein the first threshold is used to indicate an amplitude of lateral swing of the target pedestrian during walking; A determination unit is used to determine the current position information of the target pedestrian based on the current second heading angle.
[0013] On the other hand, the present disclosure further provides a storage medium, which is used to store a computer program, wherein when the computer program is running, the device where the storage medium is located is controlled to execute the method of the first aspect above.
[0014] On the other hand, the present disclosure also provides an electronic device, comprising at least one processor, and at least one memory and a bus connected to the processor; wherein the processor and the memory communicate with each other through the bus; and the processor is used to call program instructions in the memory to execute the method of the first aspect as described above.
[0015] Compared with the prior art, the present invention has the following advantages: The present invention obtains the current motion data of the target pedestrian, estimates the heading of the target pedestrian using the current motion data, and obtains the current first heading angle and the covariance of the current first heading angle. Since the target pedestrian will swing left and right during walking, the swing amplitude will cause the current first heading angle to deviate from the actual heading angle of the target pedestrian, and in the case of long distance, the deviation value between the first heading angle and the actual heading angle will become larger and larger. Therefore, the present invention uses the first threshold and the covariance of the current first heading angle to constrain the heading of the target pedestrian, and obtains the current second heading angle that is closer to the actual heading angle. The more accurate current second heading angle is used to calculate the current position information of the target pedestrian, thereby improving the long-distance positioning accuracy of the pedestrian.
[0016] Other features and advantages of the present disclosure will be described in the following description, and partly become apparent from the description, or be understood by implementing the present disclosure. The purpose and other advantages of the present disclosure can be realized and obtained by the structures pointed out in the description, claims and drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0018] Figure 1 A schematic diagram of a pedestrian PDR positioning system based on an IMU sensor is shown; Figure 2 A schematic diagram of a process of a pedestrian positioning method based on an IMU according to an embodiment of the present disclosure is shown; Figure 3 A schematic diagram of a flow chart of another IMU-based pedestrian positioning method according to an embodiment of the present disclosure is shown; Figure 4 A schematic diagram of a raw data preprocessing process according to an embodiment of the present disclosure is shown; Figure 5 A schematic structural diagram of an IMU-based pedestrian positioning device according to an embodiment of the present disclosure is shown; Figure 6 A schematic diagram of the structure of an electronic device according to an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0019] In order to make the purpose, technical solution and advantages of the embodiments of the present disclosure clearer, the technical solution in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present disclosure.
[0020] like Figure 1As shown, the existing PDR positioning technology uses the IMU sensor bound to the pedestrian's shoes to measure the pedestrian's acceleration and angular velocity, builds a step detection and step length estimation model through the acceleration, estimates the number of steps and step length of the pedestrian, and uses the angular velocity to build a posture estimation model to estimate the pedestrian's heading information, realize pedestrian status information recognition in a GNSS-denied environment, locate the pedestrian's position and calculate the pedestrian's track. However, the existing PDR positioning technology generally has the problem of poor long-distance positioning accuracy. To solve this problem, high-precision IMU sensors can be used, but high-precision IMU sensors are too expensive, which hinders the promotion of corresponding products. Therefore, how to solve the problem of poor long-distance positioning accuracy under the condition of using ordinary precision IMU sensors is a problem that needs to be solved in this field.
[0021] The present disclosure provides an IMU-based pedestrian positioning method for improving the long-distance positioning accuracy of pedestrians. Figure 2 As shown, the pedestrian positioning method based on IMU in the embodiment of the present disclosure includes: 101. Obtain current motion data of the target pedestrian.
[0022] The current motion data is obtained according to the IMU measurement. The current motion data includes the current acceleration and the current angular velocity. The current motion data in the disclosed embodiment may be the acceleration and angular velocity directly measured by the IMU sensor; or it may be pre-processed data, that is, after obtaining the acceleration and angular velocity directly measured by the IMU sensor, the acceleration and angular velocity are pre-processed to obtain the current motion data.
[0023] 102. Estimate the target pedestrian's heading using the current motion data to obtain a current first heading angle and a covariance of the current first heading angle.
[0024] The current first heading angle is a heading angle obtained based on a Kalman filter algorithm using current motion data.
[0025] The disclosed embodiment uses the current motion data to obtain the current first heading angle through the Kalman filter algorithm. The Kalman filter algorithm can estimate the target pedestrian's posture, which includes the roll angle, pitch angle and heading angle. The estimation includes two parts: state prediction and state update. Among them, the Kalman filter algorithm state prediction is as follows:
[0026] In the formula, represents the system state vector; represents the system state transfer matrix; represents the system state covariance matrix; Represents the process noise of the system The covariance matrix of ; express The predicted state of express The predicted status.
[0027] The Kalman filter algorithm state update consists of three parts:
[0028] In the formula, represents the system state transition matrix; represents the covariance matrix of the observation noise; represents the state gain matrix; Represents the difference between the observed value and the predicted value; Represents the identity matrix of dimension 3.
[0029] Above The first heading angle is included. In order to improve the heading accuracy of the pedestrian, after obtaining the current first heading angle, the embodiment of the present disclosure provides a heading constraint model, and uses the heading constraint model to calculate the covariance of the current first heading angle, so as to use the covariance to obtain a more accurate heading angle.
[0030] 103. Based on the current first heading angle, the covariance and the first threshold are used to constrain the heading of the target pedestrian to obtain a current second heading angle.
[0031] The first threshold is used to indicate the amplitude of the lateral swing of the target pedestrian during walking. The heading constraint model in the disclosed embodiment pre-sets the first threshold based on the empirical value. During the positioning process, the first threshold changes with the swing amplitude of the target pedestrian. The current second heading angle is the heading angle used to calculate the current position information of the pedestrian.
[0032] Normally, pedestrians do not walk in a straight line. As the left and right feet move forward, they will swing left and right on both sides of the straight line (if the straight line is determined to be in the longitudinal direction, then the swinging left and right on both sides of the straight line is the lateral swing). Each swing will produce an angle that deviates from the straight line, thereby changing the pedestrian's heading angle. When pedestrians walk long distances, such as walking for 10-20 minutes, the error in the heading angle will be continuously accumulated, eventually resulting in a large error between the calculated heading angle and the actual heading angle of the pedestrian. The disclosed embodiment uses a first threshold to suppress the lateral swing amplitude of the target pedestrian, so that the calculated heading angle, that is, the current second heading angle, is close to the actual heading angle of the pedestrian, so that the current position information of the target pedestrian calculated using the current second heading angle is more accurate.
[0033] 104. Determine current position information of the target pedestrian based on the current second heading angle.
[0034] In this step, the current position information of the target pedestrian is determined based on the current second heading angle, the number of steps and the step length of the target pedestrian.
[0035] In an embodiment of the present disclosure, current motion data of a target pedestrian is acquired, and the heading of the target pedestrian is estimated using the current motion data to obtain a current first heading angle and the covariance of the current first heading angle. Since the target pedestrian will swing left and right during walking, the swing amplitude will cause the current first heading angle to deviate from the actual heading angle of the target pedestrian, and over long distances, the deviation value between the first heading angle and the actual heading angle will become larger and larger. Therefore, an embodiment of the present disclosure utilizes a first threshold value and the covariance of the current first heading angle to constrain the heading of the target pedestrian, and obtains a current second heading angle that is closer to the actual heading angle. The more accurate current second heading angle is used to calculate the current position information of the target pedestrian, thereby improving the long-distance positioning accuracy of the pedestrian.
[0036] In order to explain in more detail a pedestrian positioning method based on IMU proposed in the present disclosure, the present disclosure proposes another embodiment of a pedestrian positioning method based on IMU. The specific implementation steps of the embodiment of the present disclosure are as follows: Figure 3 As shown, including: 201. Obtain the original data of the target pedestrian measured by the IMU.
[0037] Among them, the original data are the acceleration and angular velocity directly measured by the IMU sensor.
[0038] In this step, the IMU sensor installed on the target pedestrian's shoes measures the pedestrian's acceleration and angular velocity to obtain raw data. The raw data is the X, Y, and Z axis data. The raw data at time t includes acceleration and angular velocity .
[0039] 202. Process each original data using a sliding window to obtain current motion data.
[0040] The current motion data includes an average value of acceleration and an average value of angular velocity within the sliding window.
[0041] In this step, after obtaining the raw data, the current motion data will be obtained using the raw data obtained in the most recent period of time, that is, using the sliding window, based on the sliding window size and step size, the maximum and minimum values in the raw data in the sliding window are removed, and the average value of the acceleration and angular velocity in the sliding window is obtained ( ) .like Figure 4 As shown in the figure, the original data in the sliding window are the data at each time t1...tM. The maximum and minimum values in the sliding window (the data in the box) are removed, and the average value of the remaining original data is calculated to obtain and .
[0042] It should be noted that the embodiments of the present disclosure may remove the maximum and minimum values of the acceleration and angular velocity in the sliding window respectively, and may also remove the maximum and minimum values of the overall data in the sliding window.
[0043] In one achievable method, the specific steps of obtaining the current motion data are as follows: Step 1: Based on a preset sliding window size, extract a plurality of original data within the latest third time period from each original data.
[0044] The third time period corresponds to a preset sliding window size for processing raw data.
[0045] Step 2: Remove the maximum acceleration, minimum acceleration, maximum angular velocity, and minimum angular velocity from the multiple original data.
[0046] Step 3: Calculate the average value of each acceleration in the multiple original data, and calculate the average value of each angular velocity to obtain the current motion data of the target pedestrian.
[0047] The current motion data includes the current acceleration and the current angular velocity.
[0048] The disclosed embodiment uses a sliding window to perform data preprocessing on each raw data, and obtains the current acceleration and current angular velocity by removing the maximum and minimum values in the sliding window and taking the average. The disclosed embodiment removes the error caused by the maximum value to the measurement data, and obtains more accurate data, so as to calculate the accurate target pedestrian position information based on the accurate data.
[0049] 203. Based on the Kalman filter algorithm, the target pedestrian's heading is estimated using the current motion data to obtain the current first heading angle.
[0050] The current first heading angle is a heading angle obtained according to a Kalman filter algorithm.
[0051] In this step, the roll angle, pitch angle and heading angle are estimated according to the traditional Kalman filter algorithm to obtain the current first heading angle, so as to calculate the covariance based on the current first heading angle.
[0052] 204. Calculate the covariance of the current first heading angle by using the current first heading angle and the heading constraint model.
[0053] Among them, the heading constraint model is used to constrain the heading of the target pedestrian. The model uses the current first heading angle estimated by the Kalman filter algorithm to calculate its covariance, and determines the heading angle for calculating the target pedestrian's position information by comparing the covariance with the first threshold, thereby constraining the heading of the target pedestrian.
[0054] In one possible implementation, the specific steps for calculating the covariance are as follows: Step 1: Obtain multiple historical first heading angles within the most recent first period.
[0055] The first time period corresponds to the window size of the sliding window for calculating the covariance. The multiple historical first heading angles include the current first heading angle.
[0056] In this step, a sliding window is used to obtain all historical first heading angles in the most recent first time period, including the current first heading angle, and the covariance of the current first heading angle is calculated using this part of the historical first heading angles.
[0057] Step 2: Calculate the average value of multiple historical first heading angles to obtain the current third heading angle.
[0058] The current third heading angle is an average value of the first heading angles in the most recent first time period.
[0059] In the disclosed embodiment, the formula for the third heading angle is:
[0060] In the formula, represents the first heading angle at the i-th moment; represents the third heading angle at the i-th moment; Indicates the total number of first heading angles in the sliding window.
[0061] Step three: based on the difference between the current first heading angle and the current third heading angle, obtain the covariance of the current first heading angle.
[0062] In the embodiment of the present disclosure, the formula for the covariance of the first heading angle is:
[0063] In the formula, represents the covariance of the first heading angle at the i-th moment, represents the first heading angle at the i-th moment; represents the third heading angle at the i-th moment; Indicates the total number of first heading angles in the sliding window.
[0064] 205. Obtain a current second heading angle by using the current first heading angle, the covariance, and a first threshold in the heading constraint model.
[0065] In this step, the covariance is compared with the first threshold, and the current second heading angle is determined according to the comparison result.
[0066] In one achievable manner, the specific steps of obtaining the current second heading angle are as follows: Step 1: Determine whether the covariance is greater than or equal to a first threshold.
[0067] In this step, it is determined whether the covariance is greater than or equal to the first threshold, if so, execute step 2, otherwise, execute step 3.
[0068] Step 2: Update the first threshold to the covariance, and determine the current second heading angle to be the current first heading angle.
[0069] Step 3: Determine that the current second heading angle is zero.
[0070] In the disclosed embodiment, during the process of locating the position of the target pedestrian, it is determined whether the covariance of the current first heading angle is greater than or equal to the first threshold value. If so, it means that the target pedestrian's walking posture swings left and right to a large extent, so the first threshold value is adjusted higher, that is, adjusted to the current covariance, in order to adapt to the crowd with large left and right walking swings. When it is determined that the covariance is less than the first threshold value, it means that the difference between the heading angle at the current moment and the heading angle at the previous moment is very small, that is, it is believed that the difference is caused by the left and right swing of the target pedestrian's feet, not the target pedestrian's intentional adjustment of the walking direction, so the disclosed embodiment will ignore the current heading angle deviation value, that is, the current second heading angle is zero. The disclosed embodiment uses the comparison result of the covariance and the first threshold value to eliminate the error of the heading angle caused by the left and right swing of the target pedestrian.
[0071] The pedestrian position information formula in the embodiment of the present disclosure may be as follows:
[0072]
[0073] In the formula, and They represent the X-direction position information of the target pedestrian at time k-1 and time k respectively. and They represent the position information of the target pedestrian in the Y direction at time k-1 and time k respectively. is the second heading angle at time k.
[0074] 206. Use the raw data to determine the number of steps taken by the target pedestrian.
[0075] In the related art, the formula for detecting the number of pedestrian steps using acceleration is:
[0076] In the formula, represents the comprehensive acceleration of the pedestrian, and g represents the local acceleration information.
[0077] Pedestrians walking The peak value of this periodic change usually corresponds to the moment when the foot lands, because the pedestrian's body will experience an obvious acceleration pulse at this time. By analyzing these peak values in the acceleration data, step count detection is achieved. This method is called the peak detection method. There is also a threshold detection method in the related art, which also relies on The characteristic changes in the acceleration, especially the periodic peak acceleration generated when walking, are used to set one or more acceleration thresholds to achieve effective detection of the number of steps. However, the multiple peaks in the peak detection method will lead to errors in the step detection, that is, some peaks do not correspond to the steps of the target pedestrian. Threshold detection requires setting multiple acceleration thresholds, which requires high computing power. The disclosed embodiment combines peak detection and threshold detection, and uses the peak detection fusion threshold detection method to identify the steps of the target pedestrian. The fusion can avoid the occurrence of step detection errors caused by multiple peaks, and can also overcome the need to set multiple acceleration thresholds in the threshold detection method to achieve the purpose of accurate step detection.
[0078] In one achievable manner, the specific steps of determining the number of steps in the embodiment of the present disclosure are as follows: Step 1: Obtain each motion data in the most recent second period to obtain multiple historical accelerations.
[0079] In this step, the acceleration in the most recent second period, that is, a plurality of historical accelerations, is stored, and the peak value detection is performed using the historical accelerations.
[0080] Step 2: determine each peak acceleration among multiple historical accelerations.
[0081] The peak acceleration is an acceleration greater than both the acceleration at the previous moment and the acceleration at the next moment.
[0082] Step 3: Delete the peak accelerations less than or equal to the second threshold value from the peak accelerations to obtain at least one target peak acceleration.
[0083] The disclosed embodiment utilizes peak detection to obtain multiple peak accelerations. Since the walking process of a person is random, there are some peak accelerations that cannot correspond to the number of steps. Therefore, the disclosed embodiment sets a preset threshold, i.e., a second threshold. Only when the peak acceleration is greater than the second threshold, will it be determined that the peak acceleration is a valid peak acceleration, i.e., the corresponding number of steps is actually generated.
[0084] Step 4: Count the number of target peak accelerations and determine the number as the number of steps of the target pedestrian, so as to determine the current position information based on the number of steps.
[0085] The disclosed embodiment combines peak detection and threshold detection to improve the accuracy of the target pedestrian's step count.
[0086] The disclosed embodiment may also use the Weiberg model to estimate the step length of pedestrians, and the step length formula is:
[0087] In the formula, and They are the maximum and minimum acceleration of the IMU sensor Z axis, is the unit conversion constant.
[0088] 207. Determine the current position information of the target pedestrian based on the current second heading angle and the number of steps.
[0089] In this step, the current position information of the target pedestrian is determined according to the current second heading angle, the number of steps and the step length of the target pedestrian, so as to achieve accurate positioning of the target pedestrian.
[0090] Based on the above method, the embodiment of the present disclosure provides an IMU-based pedestrian positioning device, which is used to improve the long-distance positioning accuracy of pedestrians. The embodiment of the device corresponds to the aforementioned method embodiment. For ease of reading, this embodiment will no longer repeat the details of the aforementioned method embodiment one by one, but it should be clear that the device in this embodiment can correspond to all the contents of the aforementioned method embodiment. Specifically, Figure 5 As shown, the device comprises: An acquisition unit 31 is used to acquire current motion data of a target pedestrian, where the current motion data is obtained according to IMU measurement; An estimating unit 32, configured to estimate the target pedestrian's heading using the current motion data, and obtain a current first heading angle and a covariance of the current first heading angle; A constraint unit 33 is used to constrain the target pedestrian's heading based on the current first heading angle by using the covariance and a first threshold to obtain a current second heading angle, wherein the first threshold is used to indicate an amplitude of lateral swing of the target pedestrian during walking; The determination unit 34 is configured to determine the current position information of the target pedestrian based on the current second heading angle.
[0091] Furthermore, the constraint unit includes: A judging module, used to judge whether the covariance is greater than or equal to a first threshold; an updating module, configured to update the first threshold to the covariance and determine the current second heading angle to be the current first heading angle when the judging module judges that the result is yes; The determination module is used to determine that the current second heading angle is zero when the determination module determines that the current second heading angle is no.
[0092] Furthermore, the estimation unit includes: An estimation module, configured to estimate the target pedestrian's heading using the current motion data based on a Kalman filter algorithm to obtain a current first heading angle; An acquisition module, configured to acquire a plurality of historical first heading angles within a recent first time period, wherein the plurality of historical first heading angles include the current first heading angle; An averaging module, used to average the multiple historical first heading angles to obtain a current third heading angle; A difference calculation module is used to obtain the covariance of the current first heading angle based on the difference between the current first heading angle and the current third heading angle.
[0093] Furthermore, the device further includes a step number estimation unit including: An acquisition module, used to acquire various motion data in the most recent second period of time, and obtain multiple historical accelerations; A determination module, configured to determine each peak acceleration among the plurality of historical accelerations; A deleting module, used to delete the peak accelerations less than or equal to the second threshold value from the peak accelerations, to obtain at least one target peak acceleration; A statistical module is used to count the number of the target peak accelerations and determine the number as the number of steps of the target pedestrian, so as to determine the current position information based on the number of steps.
[0094] Furthermore, the acquisition unit includes: An acquisition module is used to obtain various raw data of the target pedestrian measured by the IMU; The data processing module is used to process the original data using a sliding window to obtain current motion data.
[0095] Furthermore, the data processing module is specifically used for: Based on a preset sliding window size, extracting a plurality of original data within the latest third time period from each original data; removing the maximum acceleration, the minimum acceleration, the maximum angular velocity, and the minimum angular velocity from the plurality of original data; The average value of each acceleration in the plurality of original data and the average value of each angular velocity are calculated to obtain the current motion data of the target pedestrian.
[0096] Furthermore, the embodiment of the present disclosure also provides a processor, the processor is used to run a program, wherein the program executes the above Figure 2-4 The method described in .
[0097] Furthermore, the embodiment of the present disclosure also provides a storage medium, wherein the storage medium is used to store a computer program, wherein when the computer program is running, the device where the storage medium is located is controlled to execute the above Figure 2-4 The method described in .
[0098] Furthermore, the present disclosure provides an electronic device 4, such as Figure 6 As shown, the device includes at least one processor 41, at least one memory 42 and a bus 43 connected to the processor 41; the processor 41 and the memory 42 communicate with each other through the bus 43; the processor 41 is used to call the program instructions in the memory 42 to execute the above-mentioned IMU-based pedestrian positioning method. The device in this article can be a server, PC, PAD, mobile phone, etc.
[0099] Furthermore, the present disclosure also provides a computer program product, which, when executed on a data processing device, is suitable for executing a program that initializes the steps of the inspection method for network devices as described above.
[0100] Although the present disclosure has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present disclosure.
Claims
1. A pedestrian positioning method based on IMU, characterized in that: The method comprises: Acquire current motion data of the target pedestrian, where the current motion data is obtained according to IMU measurement; estimating the target pedestrian's heading using the current motion data to obtain a current first heading angle and a covariance of the current first heading angle; Based on the current first heading angle, the heading of the target pedestrian is constrained by using the covariance and a first threshold to obtain a current second heading angle, wherein the first threshold is used to indicate the amplitude of the lateral swing of the target pedestrian during walking; The current position information of the target pedestrian is determined based on the current second heading angle.
2. The method according to claim 1, characterized in that: Based on the current first heading angle, the target pedestrian heading is constrained by using the covariance and the first threshold to obtain a current second heading angle, including: Determining whether the covariance is greater than or equal to a first threshold; If yes, updating the first threshold to the covariance, and determining the current second heading angle to be the current first heading angle; If not, it is determined that the current second heading angle is zero.
3. The method according to claim 1, characterized in that: The target pedestrian heading is estimated by using the current motion data to obtain a current first heading angle and a covariance of the current first heading angle, including: Based on the Kalman filter algorithm, the heading of the target pedestrian is estimated using the current motion data to obtain a current first heading angle; Acquire a plurality of historical first heading angles within a recent first time period, wherein the plurality of historical first heading angles include the current first heading angle; averaging the multiple historical first heading angles to obtain a current third heading angle; Based on the difference between the current first heading angle and the current third heading angle, a covariance of the current first heading angle is obtained.
4. The method according to claim 1, characterized in that: Before determining the current position information of the target pedestrian based on the current second heading angle, the method further includes: Obtaining various motion data in the most recent second period to obtain multiple historical accelerations; determining peak accelerations among the plurality of historical accelerations; Deleting peak accelerations less than or equal to a second threshold value from each peak acceleration to obtain at least one target peak acceleration; The number of the target peak accelerations is counted, and the number is determined as the number of steps of the target pedestrian, so as to determine the current position information based on the number of steps.
5. The method according to claim 1, characterized in that Get the current motion data of the target pedestrian, including: Obtain the original data of the target pedestrian measured by IMU; The sliding window is used to process the original data to obtain the current motion data.
6. The method according to claim 5, characterized in that Use the sliding window to process the original data to obtain the current motion data, including: Based on a preset sliding window size, extracting a plurality of original data within the latest third time period from each original data; removing the maximum acceleration, the minimum acceleration, the maximum angular velocity, and the minimum angular velocity from the plurality of original data; The average value of each acceleration in the plurality of original data and the average value of each angular velocity are calculated to obtain the current motion data of the target pedestrian.
7. A pedestrian positioning device based on IMU, characterized in that: The device comprises: An acquisition unit, used to acquire current motion data of the target pedestrian, wherein the current motion data is obtained according to IMU measurement; an estimating unit, configured to estimate the target pedestrian's heading using the current motion data, and obtain a current first heading angle and a covariance of the current first heading angle; a constraint unit, configured to constrain the target pedestrian's heading based on the current first heading angle by using the covariance and a first threshold to obtain a current second heading angle, wherein the first threshold is used to indicate an amplitude of lateral swing of the target pedestrian during walking; A determination unit is used to determine the current position information of the target pedestrian based on the current second heading angle.
8. The device according to claim 7, characterized in that The constraint unit comprises: A judging module, used to judge whether the covariance is greater than or equal to a first threshold; an updating module, configured to update the first threshold to the covariance and determine the current second heading angle to be the current first heading angle when the judging module judges to be yes; The determination module is used to determine that the current second heading angle is zero when the determination module determines that the current second heading angle is no.
9. An electronic device, characterized in that: The device includes at least one processor, and at least one memory and a bus connected to the processor; wherein the processor and the memory communicate with each other through the bus; and the processor is used to call program instructions in the memory to execute the method as described in any one of claims 1-6.
10. A computer storage medium, characterized in that: The storage medium is used to store a computer program, wherein when the computer program is running, the device where the storage medium is located is controlled to execute the method according to any one of claims 1 to 6.