Indoor pedestrian navigation method based on self-backtracking algorithm
Technical Field
The invention relates to indoor pedestrian navigation and positioning, in particular to an indoor pedestrian navigation method based on a self-backtracking algorithm.
Background
Location-based Services (LBS) are in urgent need in military, industrial and people's life fields. Particularly, with the advent of the mobile internet era, location services play an increasingly important role in daily life, and well-known location service providers include Google maps, high-grade maps and the like, which bring convenience to people going out. The indoor navigation technology is a popular direction of current research, and has important commercial value, for example, the indoor environment of a shopping center provides position information of shops for consumers, and the shopping is faster; the system is applied to a large parking lot, and can help a parking user to quickly search a parking space or reversely search a vehicle; and has important significance in providing public service for blind people for indoor guidance and emergency help. Due to the shielding of the building on the satellite signal, the GPS cannot realize accurate positioning in an indoor complex environment. Currently, developing an indoor positioning technology with low cost and high positioning accuracy is a hot topic of many scientific research institutions and commercial companies.
Pedestrian indoor positioning and navigation technologies are mainly classified into positioning methods based on radio frequency technologies (including WIFI, low-power Bluetooth (BLE), Zigbee (Zigbee), Ultra Wideband (UWB), global system for mobile communications (e.g., 4G), etc.), positioning based on geographic features (including geomagnetic positioning, map matching, barometer height measurement,
ultrasonic ranging, etc.), positioning based on motion sensors (dead reckoning using Micro-Electro-Mechanical systems (MEMS) gyros, accelerometers), etc. The positioning method based on the radio frequency technology and the positioning method based on the geographic features are indoor positioning means which have entered into commercial projects primarily at present, mainly adopt the relation between the wireless signal strength and the distance and the indoor geographic features as reference bases for positioning, collect a large number of signals, establish a comparison database, and estimate the positioning position by algorithms such as a fingerprint algorithm and the like. However, in the method, a large number of wireless transmitting devices need to be arranged in an indoor environment in advance and corresponding landmark information needs to be obtained, and meanwhile, corresponding acquisition/mapping tool software and geomagnetic measurement equipment need to finish acquisition of indoor map information and geomagnetic information. The scheme has high cost and complex operation flow. The positioning scheme based on the motion sensor has the advantages of low cost, strong expandability, little environmental influence and poor long-time precision. The reason that the scheme based on the motion sensor has poor long-time precision is limited by the manufacturing process, and the low-cost MEMS sensor has the defects of low precision, large random error and the like. Therefore, research of many researchers at home and abroad focuses on researching the error detection compensation technology of the MEMS sensor.
Disclosure of Invention
The invention provides an indoor pedestrian navigation method based on a self-backtracking algorithm.
In order to achieve the purpose, the technical scheme of the invention is as follows:
indoor pedestrian navigation method based on self-backtracking algorithm, wherein the navigated pedestrian is worn with MEMS
A sensor, wherein the steps of the navigation method include:
step 1: the pedestrian gait calculation is carried out according to the MEMS gyroscope and the MEMS accelerometer to obtain the walking information of the pedestrian for a period of time, the walking information in the period of time is subjected to linear detection,
step 2: judging whether the walking route of the pedestrian in the time period is a straight line, if the walking of the pedestrian is in a straight line state, executing the step 3, otherwise, returning to the step 1, wherein the walking information comprises the position, the course angle and the step length of the pedestrian;
and step 3: constructing a pseudo observed quantity according to the course angle information, and detecting, correcting and compensating the navigation error by using a forward and reverse adaptive Kalman filtering algorithm;
and 4, step 4: and (4) repeating the steps 1 to 3, continuously carrying out navigation error detection and correction compensation, and simultaneously outputting the indoor navigation positioning result of the pedestrian.
The scheme is further as follows: the length of time is the length of time that the pedestrian walks 10 steps.
The scheme is further as follows: the straight line detection and determination of whether the walking route of the pedestrian in the time period is a straight line is as follows: and calculating the difference value between the maximum value and the minimum value of the course angle between the beginning and the end of the duration, if the absolute value of the difference value is less than 20 x pi/180 radians, the pedestrian is considered to walk linearly in the time period, otherwise, the pedestrian does not walk linearly.
The scheme is further as follows: the steps of constructing the pseudo observed quantity and utilizing the forward and reverse adaptive Kalman filtering algorithm to carry out navigation error detection and correction compensation are as follows:
step one, calculating and respectively acquiring course angle information of each step in the duration by using a PDR (product data Rate):
acquiring step length information of each step in the duration:
secondly, constructing a pseudo observation sequence:
thirdly, establishing an expression model associated with the course angle information of each step, the step length information of each step and the pseudo observation sequence information:
a (k) is a system state transition matrix at the time k, and H is a measurement matrix;
fourthly, navigation error detection and correction compensation are carried out on the expression model by using a self-adaptive Kalman filtering algorithm, and the specific algorithm is as follows:
Pk,k-1=A(k)Pk-1(A(k))T+Q
Pk=[I-KkH]Pk,k-1
wherein:
represents the result of the filtering of the previous step,
one-step prediction of the representative state, P
k,k-1Representing the one-step prediction error variance, K
kWhich represents the gain of the filtering, is,
is the main course, P
kRepresenting the current step filter error variance, P
k-1Represents the filtering error variance of k-1 steps, and I representsThe identity matrix of the corresponding dimension is,
represents the adaptive measurement noise variance matrix:
wherein std (Z)
pseduo) Represents the sequence Z
pseduoStandard deviation of (d); wherein the content of the first and second substances,
the self-adaptive online adjustment can be carried out along with the change of the walking mode and the walking state of the pedestrian.
And fifthly, detecting and correcting the navigation error by using a forward and reverse adaptive Kalman filtering algorithm on the basis of the fourth step, wherein the specific algorithm is as follows:
first forward adaptive filtering:
setting the initial value of the forward filtering as follows:
starting to perform forward adaptive filtering:
Pk,k-1=A(k)Pk-1(A(k))T+Q
Pk=[I-KkH]Pk,k-1
wherein k is increased from 1 to 10; and obtaining a forward filtering result:
and
and (3) carrying out reverse self-adaptive filtering:
will be provided with
And
as an initial value of the filtering, there is,
Pk-1,k=A(k-1)-1Pk(A(k-1)-1)T+Q
Pk-1=[I-KkH]Pk-1,k
wherein, A (k-1)
-1Represents the inverse matrix of A (k-1), k decreasing from 10 to 1 during the inverse filtering; obtaining a backward filtering result
And
at this time, one round of forward and reverse self-adaptive Kalman filtering is finished, and when the next round of operation is started, the next round of operation is carried out
And
and (3) providing the forward adaptive filtering algorithm to continuously repeat the operation process, and after two rounds of loop iteration, finally obtaining the result of the forward adaptive filtering algorithm:
and
the invention has the beneficial effects that:
(1) under the premise of not increasing hardware cost and not needing additional auxiliary information, the invention extracts accurate and effective walking constraint conditions from the gait characteristics of pedestrians during walking by fully exploring the gait characteristics, and estimates and compensates the navigation error of the pedestrian position and posture information by utilizing the walking constraint conditions, thereby realizing the purpose of improving the positioning and posture-fixing precision of the indoor pedestrian navigation scheme based on the motion sensor.
(2) The invention adopts a forward and reverse Kalman filtering algorithm to realize the detection of the navigation error, and the traditional one-way Kalman filtering algorithm can not obtain a better filtering result under the conditions of insufficient data volume and short filtering time, and even has the condition of larger error of the filtering result under individual conditions. And the forward and reverse Kalman filtering algorithm is adopted, and the Kalman filtering algorithm is carried out for multiple times in forward and reverse directions, so that the available information in the data is maximized, the useful information in the data is fully explored, and the filtering precision and the more stable filtering effect which are better than those of the traditional one-way Kalman filtering algorithm are obtained.
(3) The self-adaptive Kalman filtering algorithm designed by the invention does not depend on fixed filtering parameters any more, but adjusts corresponding filtering parameters dynamically on line according to the real-time change condition of the walking characteristics of pedestrians. Because different pedestrians have different walking gait characteristics and the gait characteristics can change along with the time change, at the moment, if a fixed single filtering parameter is adopted, all walking gait characteristics cannot be adapted, so that the Kalman filtering with the unchanged filtering parameter cannot obtain a satisfactory result under certain conditions. In the invention, by designing the self-adaptive Kalman filtering, the filtering parameters are self-adaptively adjusted on line according to the change of the walking characteristics of the pedestrian, so that the application range and the stability of the algorithm are effectively improved
The invention is described in detail below with reference to the figures and examples.
Drawings
FIG. 1 is a flow chart of an indoor pedestrian navigation scheme based on an online self-backtracking algorithm;
FIG. 2 is a flow chart of a walking information acquisition process
FIG. 3 is an algorithm flow diagram of a line detection algorithm;
FIG. 4 is an algorithm flow diagram of a forward and reverse adaptive Kalman filtering algorithm;
FIG. 5 is a schematic diagram of the real walking track of a pedestrian in a test area;
FIG. 6 is a graph of the variation of the pedestrian course angle calculated by the algorithm in this patent;
FIG. 7 is a graph of a pedestrian walking route calculated by the algorithm of the present patent.
Detailed Description
Indoor pedestrian navigation method based on self-backtracking algorithm, wherein the navigated pedestrian is worn with MEMS
A sensor, wherein the steps of the navigation method include:
step 1: the pedestrian gait calculation is carried out according to the MEMS gyroscope and the MEMS accelerometer to obtain the walking information of the pedestrian for a period of time, the walking information in the period of time is subjected to linear detection,
step 2: judging whether the walking route of the pedestrian in the time period is a straight line, if the walking of the pedestrian is in a straight line state, executing the step 3, otherwise, returning to the step 1, wherein the walking information comprises the position, the course angle and the step length of the pedestrian;
and step 3: constructing a pseudo observed quantity according to the course angle information, and detecting, correcting and compensating the navigation error by using a forward and reverse adaptive Kalman filtering algorithm;
and 4, step 4: and (4) repeating the steps 1 to 3, continuously carrying out navigation error detection and correction compensation, and simultaneously outputting the indoor navigation positioning result of the pedestrian.
Wherein the length of time is the length of time that the pedestrian is walking 10 steps.
In the examples: the straight line detection and determination of whether the walking route of the pedestrian in the time period is a straight line is as follows: and calculating the difference value between the maximum value and the minimum value of the course angle between the beginning and the end of the duration, if the absolute value of the difference value is less than 20 x pi/180 radians, the pedestrian is considered to walk linearly in the time period, otherwise, the pedestrian does not walk linearly.
In the examples: the steps of constructing the pseudo observed quantity and utilizing the forward and reverse adaptive Kalman filtering algorithm to carry out navigation error detection and correction compensation are as follows:
step one, calculating and respectively acquiring course angle information of each step in the duration by using a PDR (product data Rate):
acquiring step length information of each step in the duration:
secondly, constructing a pseudo observation sequence:
thirdly, establishing an expression model associated with the course angle information of each step, the step length information of each step and the pseudo observation sequence information:
a (k) is a system state transition matrix at the time k, and H is a measurement matrix;
fourthly, navigation error detection and correction compensation are carried out on the expression model by using a self-adaptive Kalman filtering algorithm, and the specific algorithm is as follows:
Pk,k-1=A(k)Pk-1(A(k))T+Q
Pk=[I-KkH]Pk,k-1
wherein:
represents the result of the filtering of the previous step,
one-step prediction of the representative state, P
k,k-1Representing the one-step prediction error variance, K
kRepresenting the filter gain, P
kRepresenting the current step filter error variance, P
k-1Represents the filtering error variance of step k-1, I represents the identity matrix of the corresponding dimension,
represents the adaptive measurement noise variance matrix:
wherein std (Z)
pseduo) Represents the sequence Z
pseduoStandard deviation of (d); wherein the content of the first and second substances,
the self-adaptive online adjustment can be carried out along with the change of the walking mode and the walking state of the pedestrian.
And fifthly, detecting and correcting the navigation error by using a forward and reverse adaptive Kalman filtering algorithm on the basis of the fourth step, wherein the specific algorithm is as follows:
first forward adaptive filtering:
setting the initial value of the forward filtering as follows:
starting to perform forward adaptive filtering:
Pk,k-1=A(k)Pk-1(A(k))T+Q
Pk=[I-KkH]Pk,k-1
wherein k is increased from 1 to 10; and obtaining a forward filtering result:
and
and (3) carrying out reverse self-adaptive filtering:
will be provided with
And
as an initial value of the filtering, there is,
Pk-1,k=A(k-1)-1Pk(A(k-1)-1)T+Q
Pk-1=[I-KkH]Pk-1,k
wherein, A (k-1)
-1Represents the inverse matrix of A (k-1), k decreasing from 10 to 1 during the inverse filtering; obtaining a backward filtering result
And
at this time, one round of forward and reverse self-adaptive Kalman filtering is finished, and when the next round of operation is started, the next round of operation is carried out
And
and (3) providing the forward adaptive filtering algorithm to continuously repeat the operation process, and after two rounds of loop iteration, finally obtaining the result of the forward adaptive filtering algorithm:
and
the principle of the embodiment is as follows: carrying out linear detection by using the gait information of the pedestrian in the walking process; when detecting that the pedestrian is in a linear motion state in the last time period, firstly determining the main course of the pedestrian in the time period, further constructing a corresponding pseudo-observation information sequence by using the main course information, and providing the pseudo-observation information sequence for a forward and reverse adaptive Kalman (Kalman) filtering algorithm, wherein the calculation process comprises the following steps: firstly, carrying out forward self-adaptive Kalman filtering once, providing a forward filtering result for a backward filtering algorithm to be used as an initial value of the backward filtering algorithm, carrying out backward filtering operation, providing the backward filtering result for the forward filtering algorithm to be used as the initial value of the forward filtering algorithm, repeatedly iterating a number of rounds to obtain a final navigation error estimation result, and carrying out compensation correction on the navigation error according to the result so as to achieve the purpose of improving the navigation precision. The overall flow chart of the method is shown in fig. 1 and fig. 2.
It should be noted that the pedestrian gait estimation PDR (pedestrian gait estimation) algorithm in this embodiment is a known technique, and this embodiment utilizes a gait result provided by the PDR algorithm and corrects the PDR result to achieve the purpose of improving the accuracy of the PDR algorithm, and the PDR algorithm is equivalent to providing original data for the specific implementation of this embodiment. The core function of the PDR is to convert the MEMS gyroscope and MEMS accelerometer into the heading information of the pedestrian and the step length information of the pedestrian, and the PDR algorithm will not be described in detail here.
The MEMS (microelectromechanical systems) related to the embodiment is called a micromechanical electromechanical system in Chinese. The driver and the sensor made by the traditional electromechanical process are widely applied to the industry, scientific research and even military industry. It is known to integrate drivers with sensors and integrated circuit chips.
For a clearer understanding, the above examples are described further below:
the specific process of the method comprises the following steps:
step 1: and (2) carrying out Pedestrian gait calculation (PDR) according to the MEMS gyroscope and the MEMS accelerometer to obtain walking history information (including position, course and step length) of the Pedestrian for a period of time, carrying out linear detection on the walking history information in the period of time, judging whether a walking route of the Pedestrian in the period of time is a straight line, if the walking route of the Pedestrian is in a linear state, executing the step 2, otherwise, continuously executing the step 1.
The main function of the straight line detection is to judge whether the pedestrian is in a straight line walking state in the previous time period; the feasibility analysis of this detection algorithm is as follows: although the accuracy of the MEMS device cannot be guaranteed for a long time, the MEMS device has a short-time accuracy meeting the requirement in a short time, that is, by selecting a short period of time (in the embodiment, the selected detection time is the time length of 10 steps of walking of the pedestrian), the navigation result obtained by the MEMS device has a high confidence.
The principle of the linear detection method is introduced as follows: and extracting the maximum value and the minimum value of the course angle information of the MEMS device in a set historical time period (the time point of the time length that the pedestrian walks for 10 steps backwards (in the direction of time reduction) with the current time as the time period end point) and calculating a difference value, wherein if the absolute value of the difference value is less than 20 x pi/180 radians, the pedestrian is considered to walk in a straight line in the time period, otherwise, the pedestrian does not walk in a straight line. The straight line detection algorithm flow is shown in fig. 3, and the specific flow is as follows:
1. storing the MEMS device information in the previous time period and the PDR information obtained by resolving;
2. extracting the maximum value and the minimum value of course angle information in the PDR information in the period of time, and simultaneously calculating the absolute value of the difference value between the maximum value and the minimum value;
3. judging whether the absolute value is less than 20 x pi/180 radians or not, and if the absolute value is less than 20 x pi/180 radians, the walking is a straight line; if it is greater than 20 x pi/180 radians, it is not a straight line.
Step 2: and determining the main course angle information of the pedestrian walking in the time period on the basis of determining that the pedestrian is in the straight walking state in the last time period. Considering the device characteristics of the MEMS device and the walking characteristics of pedestrians, the method selects the course information of the starting point and the starting moment of the time period as the main course, and defines the main course as the main course
And step 3: and on the basis of obtaining the main course angle information, constructing a pseudo observed quantity, and further performing navigation error detection and correction compensation by using a forward and reverse self-adaptive Kalman algorithm.
For convenience of description hereinafter, the variables used are defined herein:
representing course angle information of each step obtained by resolving by the PDR in the time period;
representing step length information of each step obtained by resolving by the PDR in the time period;
by using
And
construction of pseudo-Observation sequences, pseudo-Observation sequences Z
pseduoConstructed as follows
Based on the pseudo-observation sequence, forward and backward adaptive Kalman filtering algorithm operation is performed, and firstly, the system model (forward) is introduced as follows:
X(k+1)=A(k)X(k)+W(k)
Z(k)=HX(k)+V(k)
wherein k represents a system time ranging from 1 to 10, and x (k) is a discrete system state variable, specifically:
X(k)=[pXpY△Roll△Pitch△Heading]T
pX,pYthe position errors in the X direction and the Y direction in the navigation coordinate system, △Roll,△Pitch,△HeadingRoll angle error, pitch angle error and course angle error are respectively, and the unit of position error measurement is meter, and the unit of angle error measurement is radian. Z (k) is an observed value of the system, where Z (k) ═ Zpseduo{k}(Zpseduo{ k } represents the sequence ZpseduoThe k-th element of (1). A (k) is the system state transition matrix at time k, and W (k) is the system processNoise, H is the measurement matrix, and V (k) is the system measurement noise. W (k) -N (0, Q) and V (k) -N (0, R) are white Gaussian noise, and Q and R are positive definite covariance matrixes. In this patent, the specific forms of A (k) and H are as follows:
the forward and reverse adaptive Kalman filter algorithm designed in the present invention is introduced based on the above model, and for convenience of introduction, the adaptive Kalman filter algorithm part is first introduced here: applying an adaptive Kalman filter algorithm to the model described above is:
Pk,k-1=A(k)Pk-1(A(k))T+Q
Pk=[I-KkH]Pk,k-1
wherein the content of the first and second substances,
represents the result of the filtering of the previous step,
one-step prediction of the representative state, P
k,k-1Representing the one-step prediction error variance, K
kRepresenting the filter gain, P
kRepresenting the current step filter error variance, P
k-1Represents the filtering error variance of step k-1, I represents the identity matrix of the corresponding dimension,
represents the adaptive measurement noise variance matrix:
wherein std (Z)
pseduo) Represents the sequence Z
pseduoStandard deviation of (d); wherein the content of the first and second substances,
the self-adaptive online adjustment can be carried out along with the change of the walking mode and the walking state of the pedestrian.
On the basis of the adaptive Kalman filtering algorithm, a forward and reverse adaptive Kalman filtering algorithm is further introduced, the algorithm is divided into a forward adaptive Kalman filtering part and a reverse adaptive Kalman filtering part, the algorithm operation flow is shown as a figure 4, and the specific flow is as follows:
first forward adaptive filtering:
setting the initial value of the forward filtering as follows:
starting forward adaptive Kalman filtering:
Pk,k-1=A(k)Pk-1(A(k))T+Q
Pk=[I-KkH]Pk,k-1
wherein k is increased from 1 to 10; and obtaining a forward filtering result:
and
will be provided with
And
and as a filtering initial value, performing reverse self-adaptive Kalman filtering:
Pk-1,k=A(k-1)-1Pk(A(k-1)-1)T+Q
Pk-1=[I-KkH]Pk-1,k
wherein, A (k-1)
-1Represents the inverse matrix of A (k-1), k decreasing from 10 to 1 during the inverse filtering; obtaining a backward filtering result
And
at this time, a round of forward and backward adaptive Kalman filtering is finished. When the next round of operation begins, the next round of operation will be
And
and providing the forward adaptive filtering algorithm to continuously repeat the operation process. After two rounds of loop iteration, the result of the forward and reverse self-adaptive Kalman filtering algorithm is finally obtained:
and
wherein the content of the first and second substances,
the method comprises the steps of carrying out error correction compensation on a navigation result by utilizing an error item, including the position error and the angle error of pedestrian navigation at the current moment, and achieving the purpose of improving the navigation positioning precision.
And 4, step 4: and (4) repeating the steps 1-3, continuously carrying out navigation error on-line estimation and correction compensation, and simultaneously outputting a pedestrian indoor navigation positioning result. The pedestrian walking schematic diagram of the indoor pedestrian navigation method based on the online self-backtracking algorithm is shown in fig. 5 to 7, wherein fig. 5 represents a real walking route of the pedestrian, a white area is a corridor, a black area is an impassable office area, the pedestrian starts from one end of the corridor, walks to the other end and then turns back to a starting point; fig. 6 represents a course angle variation graph calculated by the algorithm in this patent for the pedestrian walking situation shown in fig. 5, and as can be seen from the walking schematic diagram of the pedestrian in fig. 5, the walking mode of the pedestrian can be divided into the following three sections: 1. straight going; 2. turning (180 degrees); 3. straight going; as can be seen from FIG. 6, the variation of the course angle calculated by the navigation algorithm designed in the present patent is very consistent with the pedestrian walking mode; fig. 7 represents a graph of the walking route of the pedestrian calculated by the algorithm in the patent, and a comparison between the walking schematic diagram (fig. 5) of the pedestrian and the graph (fig. 7) of the walking route calculated by the algorithm in the patent shows that the navigation algorithm designed by the patent has good and stable navigation positioning accuracy.
In summary, the above description is only a preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.