Disclosure of Invention
The invention provides a track reckoning positioning method based on pedestrian motion state identification, which realizes accurate navigation positioning of pedestrians in various motion states by identifying and processing common motion states of the pedestrians and improving and correcting the existing inertial navigation positioning technology.
The technical scheme for realizing the purpose of the invention is as follows:
a dead reckoning positioning method based on pedestrian motion state identification comprises the following steps:
step one, constructing a pedestrian motion state identification classification model: acquiring training data of pedestrians in five motion states, and constructing a pedestrian motion state recognition classification model; the five motion states are walking, jogging, left striding, right striding and reversing; the training data comprises three-axis acceleration data;
step two, identifying the pedestrian motion state: collecting test data of pedestrians, and identifying a pedestrian motion state by using a pedestrian motion state identification classification model; the test data comprises triaxial acceleration data and triaxial gyroscope data;
step frequency detection is carried out to obtain single step frequency: step frequency detection is carried out on the triaxial acceleration data acquired in the step two, and single step frequency is obtained;
step four, estimating the step length: if the pedestrian motion state obtained by the identification in the step two is walking, left stepping, right stepping or reversing, estimating a single step by adopting a linear step model and combining single step frequency; if the pedestrian motion state obtained by the identification in the step two is jogging, estimating a single step size by combining a Weinberg nonlinear step size model with a single step frequency;
step five, course estimation: carrying out integral solution on the triaxial gyroscope data acquired in the step two by adopting angular velocity converted based on a quaternion coordinate system to calculate a course angle, and finishing course angle correction by adopting a heuristic offset elimination algorithm;
step six, dead reckoning: and setting the initial position coordinates and the initial course angle of the pedestrian, and updating the position of the pedestrian in the five motion states according to the pedestrian motion state obtained in the step two, the single step length obtained in the step four and the course angle corrected in the step five.
According to a further technical scheme, in the step one, a pedestrian motion state identification classification model is constructed, and the method comprises the following steps:
step 1-1: collecting training samples, and carrying out pretreatment: collecting triaxial acceleration data Acctrain of pedestrians in five motion statesx、AccTrainyAnd AccTrainzCombining to obtain combined acceleration data Acctrain; respectively carrying out acceleration filtering treatment to obtain Acctrain'x、AccTrain′y、AccTrain′zAnd AccTrain';
step 1-2: training sample segmentation: acctrain 'in five motion states'
x、AccTrain′
y、AccTrain′
zAnd Acctrain' are respectively divided to form a training sample set Train
x[i]、Train
y[i]、Train
z[i]And Train [ i ]](ii) a Wherein, i is 1 to n is the number of the training sample set,
for training the number of sample sets, N
trainFor the total number of training sample samples, n
cSample points for each training sample set [ ·]Represents rounding down; using a label TrainLabels of the training sample set to represent the category of the motion state of the training sample set;
step 1-3: calculating time domain characteristic values of a training sample set;
the time domain characteristic value of the ith training sample set is as follows:
respectively by Trainx[i]、Trainy[i]、Trainz[i]And Train [ i ]]As a time domain feature value F1i、F2i、F3iAnd F4iRespectively by Trainx[i]、Trainy[i]、Trainz[i]And Train [ i ]]Is taken as a time domain characteristic value F5i、F6i、F7iAnd F8i(ii) a By analogy, Train is used respectivelyx[i]、Trainy[i]、Trainz[i]And Train [ i ]]The variance, the mode, the maximum value, the minimum value, the quartile distance and the third quartile are used as time domain characteristic values F9i~F32iRespectively by Trainx[i]、Trainy[i]、Trainz[i]And Train [ i ]]The skewness, kurtosis and average absolute error of the time domain are taken as time domain characteristic values F36i~F47i(ii) a Respectively by Trainx[i]And Trainy[i]Cross correlation coefficient, Trainy[i]And Trainz[i]Cross correlation coefficient and Trainz[i]And Trainx[i]As a time domain feature value F33i、F34iAnd F35i;
Respectively by Train
x[i]、Train
y[i]、Train
z[i]And Train [ i ]]Intermediate variable M incorporating Hjorth parameter
4As time domain eigenvalues
By Train
x[i]Obtaining F (1) as a time domain feature value F as an input set object
52i,
Wherein d [ k ]]Representing the kth data, N, in the input set object d
dFor input of the size of the collection object d, i.e. N
d=n
c;
Step 1-4: screening effective characteristics of five types of motion states: processing time domain features F1Said time domain feature F1For time domain eigenvalues F1iThe marking of (2): according to the motion state of the training sample set characterized by the TrainLabels, n time domain characteristic values F of n training sample sets1iRespectively extracting time domain characteristic values of five types of motion states; respectively combining time domain characteristic values corresponding to the five types of motion states, and drawing a characteristic curve graph of five characteristic curves corresponding to the five types of motion states after reordering in sequence; in the characteristic curve graph, the horizontal axis/the vertical axis are the serial numbers of the time domain characteristic values after the time domain characteristic values are rearranged in sequence, and the vertical axis/the horizontal axis are the time domain characteristic values; if there is more than one characteristic curve among the five characteristic curves which is not crossed with other characteristic curves, the time domain characteristic F1Screening effective characteristics of the motion state corresponding to more than one characteristic curve which is not crossed with other characteristic curves; otherwise, time domain feature F1Effective characteristics of five motion states are not screened;
processing time domain features F according to a similar method2~F52Screening effective characteristics of five types of motion states;
step 1-5: establishing a valid feature matrix QTrainThe effective feature matrix QTrainThe size of (a) is n x m; the values in the first row are m time domain feature values corresponding to the effective features of the five types of motion states screened by the first training sample set according to the steps 1-4, and so on;
step 1-6: establishing a pedestrian motion state identification classification model: normalizing the processed QTrainAs the characteristics for training the SVM model, TrainLabels is used as a training sample label for training the SVM model, and a pedestrian motion state recognition classification model SVM-OVO is established by utilizing an SVM one-to-one multi-classifier (OVO); wherein, the kernel function of the SVM is a linear kernel function.
According to a further technical scheme, in the second step, the motion state of the pedestrian is identified, and the method comprises the following steps:
step 2-1: collecting a test sample, and carrying out pretreatment: collecting pedestrian triaxial acceleration data AccTestx、AccTestyAnd AccTestzCombining to obtain a combined acceleration AccTest; respectively carrying out acceleration filtering treatment to obtain AccTest'x、AccTest′y、AccTest′zAnd AccTest'; the sampling frequency of the test sample is equal to that of the training sample;
step 2-2: test sample segmentation: acctest'
x、AccTest′
y、AccTest′
zAnd Acctest' are respectively divided to form a Test sample set Test
x[i']、Test
y[i']、Test
z[i']And Test [ i'](ii) a Wherein i ═ 1 to n' are numbers of the test sample sets,
for testing the number of sample sets, N
testThe total number of sampling points of the test sample; n is
cSample points for each training sample set [ ·]Represents rounding down; target using test sample setLabel TestLabels characterize the category of the motion state of the test sample set; step 2-3: calculating effective characteristic values of the test sample set;
the valid eigenvalues for the ith' test sample set are:
selecting effective characteristics of five types of motion states of the pedestrian motion state recognition classification model from the time domain characteristics of the ith' test sample set, and calculating the effective characteristics according to a method for calculating the same time domain characteristic value of the training sample set;
step 2-4: establishing effective characteristic matrix Q of test sample setTestThe effective feature matrix QTestThe size of (a) is n' × m; wherein, the value of the first row is m effective characteristic values calculated according to the step 2-3 in the first test sample set, and so on;
step 2-5: recognizing the motion state of the pedestrian: normalizing the processed QTestInputting a pedestrian motion state recognition classification model SVM-OVO, and assigning values to the label TestLabels of the test sample set to obtain the motion state category of each test sample set.
In a further technical solution, the second step further includes correcting the category of the motion state of the test sample set, that is, the motion state of the test sample set is corrected
Step 2-6: the values of the labels TestLabels of the first, second, third and fourth test sample sets are made equal to W, respectively1、W2、W3And W4;
Step 2-7: such as W2≠W3&&W2≠W4&&W3≠W4&&W1=W2Or W is2≠W3&&W2≠W4&&W3≠W4&&W1=W2Not satisfying and W2=W4&&W2≠W3&&W3≠W4Then W will be3The value of the corresponding label TestLabels is corrected to W2The value of the corresponding label TestLabels; otherwise, not correcting;
step 2-8: returning to step 2-6 and replacing itChanging to: the values of the labels TestLabels of the second, third, fourth and fifth test sample sets were made equal to W, respectively1、W2、W3And W4(ii) a Then, executing the step 2-7;
step 2-9: and finishing the correction of the value of the label TestLabels of the test sample set according to the method similar to the steps 2-8.
In a preferred technical scheme, in the third step, step frequency detection is performed to obtain a single step frequency, and the method comprises the following steps:
step 3-1: collecting a test sample, and carrying out pretreatment: collecting pedestrian triaxial acceleration data AccTestx、AccTestyAnd AccTestzCombining to obtain a combined acceleration AccTest; carrying out acceleration filtering processing on the combined acceleration Acctest to obtain Acctest';
step 3-2: wave crest detection: if AccTest' j-1 is satisfied]<AccTest′[j]≤AccTest′[j+1]Then AccTest' j will be]Labeled as peak; acctest' [ j]Represents the resultant acceleration of the jth sample point after filtering processing, and j belongs to [2, N ]Test-1],NtestThe total number of sampling points of the test sample; setting the peak minimum threshold σ1And inter-peak sample point spacing constraint sigma2The reject value is less than σ1When the sampling point interval between a plurality of peaks is less than sigma2Only the peak value with the maximum retention value is discarded, and n is obtainedpeakA peak to peak value; recording the index of AccTest' corresponding to the peak value obtained by detection into an array PeakIndex [ l ]]Is the index of AccTest' corresponding to the first peak value, and l is more than or equal to 1 and less than or equal to npeak;
Step 3-3: searching the left zero point and the right zero point of each peak value: the first peak value PeakIndex [ l ]]Corresponding AccTest' [ PeakIndex [ l ]]]The value, the first zero found by the forward search is designated PeakIndex [ l ]]Left zero point Z of1[l]The second zero found by the backward search is designated PeakIndex [ l ]]Right zero point Z of2[l];
The search range for the left zero is defined as: if it is searched forward to PeakIndex [ l ]]-σ3The index position has not yet obtained the left zeroThen, the search is stopped, let AccTest' [ PeakIndex [ l ]]-σ3]Is a left zero point Z1[l],σ3Is a threshold value;
the search range for the right zero point is defined as: if search backward to PeakIndex [ l ]]+σ4If the index position has not obtained the right zero point, the search is stopped, let AccTest' [ PeakIndex [ l ]]+σ4]Is a right zero point Z2[l],σ4Is a threshold value;
the zero point is as follows:
if the conditions that Acctest 'j-1 <0 and Acctest' j > is more than or equal to 0 or Acctest 'j-1 >0 and Acctest' j > is less than or equal to 0 are met,
AccTest' j is zero;
step 3-4: calculate the step frequency for each single step: the peak value of the first wave crest corresponds to the first step, and the step frequency of the first step is fs[l]=Z2[l]-Z1[l]。
In a preferred technical scheme, in the step six, dead reckoning, the method comprises: after the initial position coordinates and the initial course angle of the pedestrians are set, the positions of the pedestrians in the five motion states are updated according to the following formula,
wherein, X [ k ]]And Y [ k ]]Indicating the position of the k-th step of the pedestrian, theta, on the two-dimensional navigation planekDenotes the heading angle of the kth step, L k]Represents the step size of the k step; if the motion state of the kth step is reverse, qkTaking 1, otherwise, taking-1; if the motion state of the kth step is left step or right step, p iskTaking 1 or-1, otherwise pkTake 0.
Compared with the prior art, the invention has the beneficial effects that:
1. aiming at the motion state of the pedestrian in a two-dimensional space, five motion states are collected, and only three-axis acceleration and three-axis gyroscope data are collected to realize the navigation and positioning of the pedestrian, so that the track calculation method has stronger practicability and is more favorable for the application and development of practical application environments.
2. The modeling of the five types of motion state recognition models and the recognition of the motion states by using the models are more complete and accurate.
3. The gait detection and the step frequency detection do not need to change the detection method according to the motion state behaviors, are more universal and accurate, and reduce the coupling with the human motion state identification method to the maximum extent.
4. And the dead reckoning can accept more complicated motion state types, and the applicability is stronger.
Detailed Description
The method comprises the steps of firstly completing data acquisition and preprocessing of pedestrians to be positioned through portable waist-bound IMU positioning equipment, then firstly constructing an SVM multi-classification model of the pedestrian movement state before carrying out movement state identification, or identifying the pedestrian real-time movement state under the established classification model, then correcting individual error identification results through an adjacent gait correlation constraint method based on the human body movement law to realize accurate identification of the movement state in the positioning process of positioning personnel, and finally completing navigation positioning of the complex movement state of the pedestrians in a two-dimensional plane through improving a step length estimation algorithm, correcting a course angle based on an HDE (empirical Drift Elimination) algorithm and designing a position updating algorithm based on the multi-movement state on the basis of a traditional PDR algorithm.
The specific embodiment for realizing the purpose of the invention mainly comprises the following steps:
A. IMU positioning data acquisition: three-axis acceleration and three-axis gyroscope data are collected through IMU equipment carried by a person to be positioned, and preprocessing such as moving average filtering is carried out on the resultant acceleration data after the gravity is removed.
B. Establishing a motion state classification model: firstly, constructing motion state features, respectively extracting time domain features of acceleration x-axis, y-axis, z-axis and three-axis combined acceleration data in 5 motion states of walking, jogging, left striding, right striding and reversing, extracting feature data of 52 feature objects in total, and numbering the feature objects as F according to extraction sequence1~F52(ii) a Then, screening the effective features, filtering the ineffective features to reduce the interference of the ineffective features on the high-precision classification recognition rate, and finally, setting the number of the effective feature objects for the motion state classification recognition to be 34; then, completing the construction of a feature matrix by using the features of the effective feature objects, and carrying out normalization processing on the features to eliminate the factor of imbalance of feature weights caused by the fact that the feature values of different measurement units are different in size; finally, construction of a human motion state recognition classification model is completed by utilizing an SVM multi-classifier (OVO), and an SVM kernel function selects a linear kernel function.
C. Step frequency detection: using the combined acceleration waveform, firstly adopting a single peak value detection method and combining the minimum peak value threshold value constraint sigma1Constraint sigma of pedestrian motion period interval2And completing pedestrian motion detection in a multi-motion state, and then performing single-step left and right zero detection through a zero searching rule, thereby completing single-step frequency detection.
D. Human motion state identification: firstly, in the positioning process, performing feature extraction on the acceleration data preprocessed in the step A according to the effective feature objects screened in the step B and constructing a corresponding feature matrix, then, completing normalization processing of feature extraction in the positioning process by combining the features normalized in the step B, and finally, on the basis of the constructed SVM-OVO classification model, recognizing the motion state of the pedestrian in motion and obtaining a corresponding recognition result.
E. And (3) modifying the motion state identification result: on the basis of the preliminary identification of the motion state, the correction of individual error identification results is realized by an adjacent gait correlation constraint method based on the human motion law.
F. And (3) pedestrian track reckoning in a multi-motion state: firstly, estimating the step length by adopting a linear or nonlinear step length model based on the final identification result of the motion state, then carrying out integral solution on the angular speed converted by a quaternion coordinate system to calculate the course angle, finishing course angle correction by means of an HDE heuristic offset elimination algorithm, and finally finishing the dead reckoning and positioning of the pedestrian in the two-dimensional plane by adopting a dead reckoning algorithm based on the motion state identification.
The process of the present invention is further described in detail below with reference to specific examples.
The steps of establishing the motion state classification model are as follows:
A. setting the motion state of positioning personnel: the positioning personnel finish the acquisition of training data in a two-dimensional indoor scene, and the movement modes of the positioning personnel comprise walking, jogging, left striding, right striding and reversing;
B. collecting training data: the positioning personnel collects training data by binding or carrying an IMU (Inertial Measurement Unit, IMU) attitude sensor at the front part of the waist, and outputs acceleration sensor data with an uncompleted preprocessing result, including triaxial acceleration data Acctrainx、AccTrainy、AccTrainz. Sampling frequency of fcAnd may be set to 50 Hz.
C. Training data preprocessing: the obtained AccTrainx、AccTrainy、AccTrainzThe resultant acceleration AccTrain is obtained through the combination calculation,
wherein Acctrain [ i ]]The resultant acceleration at time i. Acceleration filtering processing is carried out by utilizing a moving average filtering method, and an object is filtered and outputAre Acctrain respectivelyx、AccTrainy、AccTrainzAnd Acctrain, the filtered output object is Acctrain'x、AccTrain′y、AccTrain′zAnd AccTrain', the filter equation is:
wherein x [ i ] and y [ i ] respectively represent input and output at the moment i; m is the input object set size; j is the filter window size and can take a value of 3.
D. Training sample segmentation: filtering to obtain Acctrain'x、AccTrain′y、AccTrain′zAnd AccTrain' every ncRespectively cutting the sampling intervals of the training samples to form a training sample set Trainx[i]、Trainy[i]、Trainz[i]And Train [ i ]]. Here, i has a value ranging from 1 to n. n is defined as:
wherein [ ·]Denotes rounding down, NtrainFor the total number of samples of the training sample, ncFor the size of a single training sample set, n is taken in the present inventionc=1.5fc. In addition, the array train labels is used for representing the real motion states corresponding to different training sample sets, and the value range is 1: integers between 5, 1, 2, 3, 4 and 5 characterize walking, jogging, left striding, right striding and backstepping, respectively. TrainLabels [ i ]]And representing the real motion state corresponding to the ith training sample set.
E. Extracting effective characteristics of a training sample set: the obtained Trainx[i]、Trainy[i]、Trainz[i]And Train [ i ]]As an input. For Trainx[i]、Trainy[i]、Trainz[i]And Train [ i ]]Time domain feature extraction is carried out, the total number of feature data extraction objects is 52, and the feature objects are numbered as F according to the extraction sequence1~F52(ii) a Then, the effective features are screened, the invalid features are filtered to reduce the interference of the invalid features on the high-precision classification recognition rate, and the number of the effective feature objects finally used for the motion state classification recognition is 34. The specific rules of feature extraction and feature screening are as follows:
1) feature extraction
The objects for feature extraction include mean, mean of absolute value (first data absolute value is calculated and then mean is calculated), variance, mode, maximum, minimum, quarter-quanta, third quartile, cross correlation coefficient, skewness, kurtosis and mean absolute error, and are marked by a mark F1~F47Marking the different characteristics in sequence, wherein each characteristic is according to the input Trainx[i]、Trainy[i]、Trainz[i]And Train [ i ]]The objects are numbered sequentially, wherein the cross-correlation coefficient numbering order follows TrainxAnd Trainy、TrainyAxle and Trainz、TrainzAnd TrainxThe cross correlation coefficient calculation order of (1). Furthermore, an intermediate variable M of the Hjorth parameter is introduced4As feature F48~F51The numbering sequence of which follows Trainx[i]、Trainy[i]、Trainz[i]And Train [ i ]]And inputting the sequence. Introducing a custom feature F (1) as the feature F52F (1) input object is Train onlyx。M4And f (1) is calculated as:
in the formula, d [ k ]]Representing the kth data, N, in the input set object ddIs the size of the set d. Can set Nd=ncThe alternative to d is Trainx[i]、Trainy[i]、Trainz[i]And Train [ i ]]And the value range of i is 1-n.
2) Feature screening
Aiming at the fact that corresponding characteristic values exist in various types of sports along with the serial numbers of the training sample set under different characteristic objects, the characteristic values are combined into characteristic curves, then the extracted characteristic objects are subjected to characteristic curve drawing to obtain characteristic curve graphs corresponding to different characteristics, and each characteristic curve graph comprises the characteristic curves corresponding to the five motion states. The characteristic curve corresponding to a certain motion state in the characteristic curves does not have obvious curve crossing phenomenon with the characteristic curves corresponding to the rest motion states, and the characteristic can be used as the effective characteristic of the motion state. The numbers of a total of 34 feature objects used for the motion state classification after screening are shown in the following table.
TABLE 1 available characteristics
F. Training sample set feature matrix normalization: forming a feature matrix Q with the size of n × m by using the obtained features of the effective feature objectTrainAnd carrying out normalization processing on the characteristics to eliminate the factor of unbalanced weight of the characteristics caused by the great difference of the characteristic values of different metering units, and carrying out normalization processing on QTrainEach line of data is processed into [ -1,1 [ -1 [ ]]An interval. Where m is the total number of valid feature objects.
G. Establishing a motion state classification model: input normalized QTrainAs the characteristics for training the SVM model, TrainLabels is input as a training sample label for training the SVM model. The construction of a human motion state recognition classification model SVM-OVO is completed by utilizing an SVM One-to-One multi-classification model (One-Versus-One, OVO), and an SVM kernel function selects a linear kernel function.
After the human motion state classification model is established, the positioning process comprises the following steps:
A. collecting test data: a positioning person collects test data by binding or carrying an IMU (Inertial Measurement Unit) attitude sensor at the front part of the waist, and outputs acceleration sensor data with an unfinished preprocessing result, including triaxial acceleration data AccTestx、AccTesty、AccTestzAnd three-axis gyroscope data GyrTestx、GyrTesty、GyrTestz. Sampling frequency of fcTotal number of sampling points is NTest,fcThe setting should be consistent with the setting in the motion state recognition model establishing step.
B. Preprocessing test data: the obtained AccTestx、AccTesty、AccTestzThe resultant acceleration AccTest is obtained through the combination calculation,
wherein AccTest [ i ]]The resultant acceleration at the ith sample point. Acceleration filtering processing is carried out by utilizing a moving average filtering method, and filtering output objects are AccTestx、AccTesty、AccTestzAnd AccTest, the filtered output object is AccTest'x、AccTest′y、AccTest′zAnd AccTest', the filter equation is:
wherein x [ i ] and y [ i ] respectively represent input and output at the moment i; m is the input object set size; j is the filter window size and takes the value of 3.
C. Step frequency detection: AccTest' is input. In the normal positioning process, a positioning person can have two stages of starting and falling in a single step period in the 5 motion states. By using the traditional step frequency detection algorithm for reference, the invention only detects the acceleration peak value in the multi-motion state to complete the single-step motion detection, namely the gait detection. For a certain AccTest' [ i ]],i∈[2,NTest-1]If it satisfies
AccTest′[i-1]<AccTest′[i]≤AccTest′[i+1],
Acctest' i]Where is marked as the peak. Setting the peak minimum threshold σ1Inter-peak sample point spacing constraintσ2I.e. the reject value is less than σ1When the sampling point interval between a plurality of peaks is less than sigma2Only the peak mark with the largest value is retained, and the rest peaks are discarded. Obtaining the final reserved peak value number n according to the complaint detection methodpeak,npeakAlso represents the single step number contained in the motion process, and the index positions of the corresponding sampling points are recorded from small to large to npeakIn the array PeakIndex. For a certain PeakIndex [ i ]],1≤i≤npeak,PeakIndex[i]The peak position corresponding to the ith step motion. Using PeakIndex [ i ]]The sample point index represented by the value is the reference, which corresponds to AccTest' [ PeakIndex [ i ]]]The first zero point searched before is marked as the left zero point of the step, and the right zero point is the second zero point searched after the peak of the step. For a certain AccTest' [ i ]],i∈[2,NTest-1]If it satisfies
Acctest 'i-1 <0 and Acctest' i >0,
or
Acctest 'i-1 >0 and Acctest' i ≦ 0,
acctest' i]Is zero. Setting a zero point maximum search range and left and right zero point maximum search ranges sigma3And σ4. By the method, the left zero point Z corresponding to each single step can be obtained1[i]And right zero point Z2[i]I represents the ith step, i is equal to [1, N ]Test]. By calculation of
fs[i]=Z2[i]-Z1[i],
fs[i]Indicating the step frequency of the ith step.
The detection results are shown in fig. 3: in the locating process of the locator, the acceleration of the locator changes periodically, each single step movement has a gait cycle, the acceleration in each single step has a wave peak, and therefore, only the wave peak needs to be found to indicate that there is a single step. The peak position first found will include all peaks, like there will be some invalid peaks due to the acceleration jitter when there is no motion, so the peak minimum threshold σ will appear1. This occurs because multiple peaks may be detected in a single stepConstrained the interval of sampling points between peaks2. And if the peaks which do not satisfy the condition are not required, the remaining peaks and the corresponding index positions can be calibrated to form a single step. And finally, the step frequency can be calculated by searching zero points before and after the peak position.
D. Test sample segmentation: acctest 'obtained after filtering'x、AccTest′y、AccTest′zAnd AccTest' every n, respectivelycThe sampling interval of each sample is cut to form a Test sample set Testx[i]、Testy[i]、Testz[i]、Test[i]. Here, i ranges from 1 to n, n being defined as:
[. cndot. ] represents rounding down. In addition, the motion states corresponding to different test sample sets are represented by an array TestLabels, and the value range is 1: integers between 5, 1, 2, 3, 4 and 5 characterize walking, jogging, left striding, right striding and backstepping, respectively. And the TestLabels [ i ] represents the motion state corresponding to the ith training sample set. The TestLabels assignment needs to be done in step G.
E. Extracting the characteristics of the test sample: input Testx[i]、Testy[i]、Testz[i]、Test[i]Calculating characteristic values of effective characteristic items obtained in the process of establishing a human motion state model and sequentially forming a characteristic matrix Q with the size of n multiplied by mTest. And m is the total number of the effective characteristic objects obtained in the step of establishing the motion state model.
F. Test sample feature normalization: the input is QTestBy normalizing QTestEach line of data is processed into [ -1,1 [ -1 [ ]]An interval. For the test samples, the preprocessing should be consistent with the training samples, i.e., the maximum and minimum values should be the maximum and minimum values of the training set.
G. Human motion state identification: input normalized QTest. On the basis of the established SVM-OVO classification model, the pedestrian movement is carried outAnd identifying the motion state and outputting a corresponding motion state identification result. Namely, the identification process completes the assignment work of the TestLabels.
H. And (3) correcting the identification result of partial error motion state: inputting the TestLabels completing assignment work, and realizing correction of individual motion state error recognition results in the TestLabels by an adjacent gait correlation constraint method based on human motion rules. Taking the current subscript t of the array of the TestLabels as a reference, and marking the label value sequence corresponding to the subscript t-3: t of the TestLabels as W1、W2、W3、W4The value to be corrected is W3Fig. 7 shows the condition to be corrected, in which the state 1, the state 2, and the state 3 represent three different motion states. Need to mix W3The label value corresponding to the TestLabels is corrected to W2The conditions of (a) are as follows:
①W2≠W3&&W2≠W4&&W3≠W4&&W1=W2;
② does not satisfy first and W2=W4&&W2≠W3&&W3≠W4;
And thirdly, the other conditions are not corrected.
Wherein, the value sequence of t is 3 to n. In particular, W is not carried out when t is 31And (4) assigning and correcting conditions to skip the first step. And the whole correction process is executed according to the value sequence of t.
I. Step length estimation: inputting preprocessed AccTest', single step frequency fsAnd modified TestLabels, based on which the step length is estimated using a linear or non-linear step model. For walking, left striding, right striding and reverse low speed motion states, a linear step size model determined by step frequency and acceleration variance is adopted as represented by:
L[k]=A+B·fs[k]+C·var(a)
for jogging motion states, a Weinberg nonlinear step size model, which is determined only by acceleration extremes, is used as follows:
in the above formula, L [ k ]]Denotes the kth step size, fs[k]For the K step frequency, var (a) represents the single step acceleration variance, A, B and C are constants, obtained by training, K is a constant, amaxAnd aminShowing the maximum and minimum values of the single-step acceleration.
J. Course estimation: input GyrTestx、GyrTesty、GyrTestzThe course angle psi is calculated by adopting the angular velocity based on the quaternion coordinate system conversion through integral solution, and course angle correction is completed by adopting a Heuristic Drift Elimination algorithm (HDE). The four-order Rungestota method is used for resolving the quaternion, and the quaternion is expressed as follows:
Q=q0+q1i+q2j+q3k
wherein Q represents a result of a quaternion expression, and Q represents0、q1、q2、q3Is a real number, i, j, k are imaginary parts. Introduction of four elements
After counting, a rotation matrix of b-system to n-system expressed by quaternion
Can be expressed as:
and (3) obtaining a rotation matrix to complete gyroscope data conversion:
in the formula, ω
x、ω
yAnd ω
zRespectively representing the angular speeds of the x axis, the y axis and the z axis acquired by the gyroscope under the b system, namely GyrTest
x、GyrTest
y、GyrTest
z。
And
respectively, x-axis, y-axis and z-axis angular velocities converted to n-system. Then pass through the pair
The heading angle psi can be obtained by performing integral operation.
And utilizing an HDE algorithm to complete heuristic course compensation based on the turning angular speed. Based on HDE algorithm, the invention divides the main direction of the pedestrian positioning process into 8 main directions, namely the main direction delta is 45 degrees, and the system compensation factor i iscSet to 0.01.
K. And (3) dead reckoning: and based on the motion state identification result, the single step length estimation result and the corrected course angle, completing the position updating of the pedestrian in the multi-motion state, and realizing the positioning navigation. As shown in fig. 8, the formula for updating the dead reckoning position of the pedestrian in the multi-motion state defined by the present invention is defined as follows:
in the formula, X [ k ]]And Y [ k ]]Indicating the position of the k-th step of the pedestrian, theta, on the two-dimensional navigation planekIndicates the heading of the kth step, L k]Denotes the step size of the k-th step, qkAnd pkFor distinguishing different values according to different motion states, if the step is in a reverse state, the step q is in a reverse statekTaking 1, otherwise, taking-1; if the step status is left step, then pkTaking 1, if it is a right stride, then pkGet-1, otherwise pkTake 0.
The experiments using the method of the invention were as follows:
an experimental field: the southwest university of transportation library is outside rectangular square.
Experimental equipment: a smart phone is adopted as positioning equipment. A method for fixing equipment of reference waist binding type positioning personnel, wherein the positioning personnel complete the positioning process through a handheld smart phoneData acquisition, fig. 9. The data sampling rate of the intelligent mobile phone inertial navigation device is set to be 50Hz, and the sensors for positioning comprise an accelerometer and a gyroscope; the size of a moving average filtering window N used in data filtering is set to be 3; the minimum peak value threshold value constraint parameter of gait detection and the pedestrian movement period interval constraint parameter are respectively 2m/s2The maximum search ranges of the left zero point and the right zero point of the step frequency detection are respectively 12 sampling points and 25 sampling points, the specific gait detection process is shown in figure 2, the gait detection effect is shown in figure 4, and the step frequency detection result is shown in figure 3; the step length estimation model parameters are obtained according to offline training of different positioning personnel, and the values of specific parameters A, B, C and K in the experiment are 0.1616, 0.2370, 0.0139 and 0.5885 respectively; the angular interval Δ of the main direction of the heuristic heading drift elimination algorithm (HDE) algorithm is 30 °, and the feedback coefficient is set to 0.01.
The experimental contents are as follows: after the positioning equipment is worn, in the experimental process, an experimenter can randomly change the walking posture by holding the mobile phone, and the main motion modes are walking and jogging. The experiment site selects a library in the Xinan university of transportation, Rhinocpu school district, and the library is just opposite to the square for rectangular motion experiment, and the total length of the reference path is about 262.12 m. Through the system flow of fig. 1, a specific motion state recognition algorithm model is shown in fig. 6, a characteristic value diagram in a model training module is shown in fig. 5, a human motion state error recognition result correction condition based on gait constraint according to a recognition result is shown in fig. 7, a PDR-based multi-motion state track calculation method design is shown in fig. 8, and a calculation result is shown in fig. 10.
Purpose of the experiment: the simulation pedestrian carries out unpredictable motion state switching in the positioning process of the common regular indoor positioning scene, thereby carrying out motion state identification on the pedestrian, further completing self-adaptive pedestrian track calculation, and checking the positioning effect of autonomous inertial navigation in a complex motion state.
The experimental results are as follows: through the positioning effect shown in fig. 10, the calculation result of the pedestrian dead reckoning algorithm based on multi-motion state recognition designed by the invention is basically consistent with the actual route, and the motion state recognition of the pedestrian can be accurately completed. Through repeated comparison experiments under the same experiment condition, the average identification accuracy can reach 99.37%, the average positioning error can reach 1.28%, and the adaptability and the reliability of the algorithm are superior to those of the conventional pedestrian track calculation algorithm based on the complex motion state.
Compared with the existing indoor positioning technology, the invention has the obvious advantages that:
firstly, the invention does not need to plan and arrange in advance, has low requirement on equipment and high flexibility on algorithm application, can realize autonomous navigation of pedestrians in common scenes by directly utilizing a smart phone, and has important reference value for researching cheap and applicable inertial navigation products of the pedestrians.
The invention fully considers different motion modes and laws of human bodies, divides the motion of pedestrians in a two-dimensional space into 5 states of walking, jogging, left striding, right striding and reversing, and the adopted step frequency detection method is suitable for various motion states.
And thirdly, the invention fully considers the motion state of the positioning personnel in the navigation process, identifies the motion state in the positioning process, corrects the motion state identification result by utilizing the motion rule of the human body and realizes the high-precision pedestrian motion state identification.
And fourthly, the step length estimation under the multi-motion state of the pedestrian is completed by adopting a linear and nonlinear step length combined estimation model, so that different motion state modes of the pedestrian are more accurately adapted.
And fifthly, the invention improves the traditional PDR model by utilizing course changes caused by different motion modes, thereby realizing accurate pedestrian track calculation in a multi-motion state.