Indoor positioning method and device

文档序号:1718685 发布日期:2019-12-17 浏览:4次 中文

阅读说明:本技术 室内定位方法及装置 (Indoor positioning method and device ) 是由 蔡成林 汪忠 李鹏 周彦 蔡逸豪 于 2019-08-13 设计创作,主要内容包括:本发明公开了一种室内定位方法及装置,该方法包括:接收惯性传感器所采集的航向角数据以及加速度数据、磁力计所采集的地磁数据以及弯曲传感器所采集的弯曲度;通过所述航向角数据、所述加速度数据以及所述弯曲度进行零速检测,并根据零速检测的结果得到待定位对象的步频;通过自适应步长估计算法得到所述步频所对应的步长;根据零速检测的结果对非零速状态下的所述加速度数据进行处理得到当前位移;通过所述步长对所述当前位移进行修正,并根据修正后的当前位移对所述待定位对象进行室内定位。通过上述方法能够提高定位精度。(The invention discloses an indoor positioning method and device, wherein the method comprises the following steps: receiving course angle data and acceleration data acquired by an inertial sensor, geomagnetic data acquired by a magnetometer and curvature acquired by a curvature sensor; carrying out zero-speed detection through the course angle data, the acceleration data and the curvature, and obtaining the step frequency of the object to be positioned according to the result of the zero-speed detection; obtaining a step length corresponding to the step frequency through a self-adaptive step length estimation algorithm; processing the acceleration data in a non-zero speed state according to a zero speed detection result to obtain current displacement; and correcting the current displacement according to the step length, and performing indoor positioning on the object to be positioned according to the corrected current displacement. The positioning accuracy can be improved by the method.)

1. an indoor positioning method, characterized in that the method comprises:

receiving course angle data and acceleration data acquired by an inertial sensor, geomagnetic data acquired by a magnetometer and curvature acquired by a curvature sensor;

carrying out zero-speed detection through the course angle data, the acceleration data and the curvature, and obtaining the step frequency of the object to be positioned according to the result of the zero-speed detection;

obtaining a step length corresponding to the step frequency through a self-adaptive step length estimation algorithm;

Processing the acceleration data in a non-zero speed state according to a zero speed detection result to obtain current displacement;

and correcting the current displacement according to the step length, and performing indoor positioning on the object to be positioned according to the corrected current displacement.

2. The method of claim 1, wherein the detecting zero velocity from the heading angle data, the acceleration data, and the bend angle comprises:

calculating an acceleration module value corresponding to the acceleration data and a course angle module value corresponding to the course angle data;

Judging whether the acceleration module value is within a first threshold range or not and whether the course angle module value is within a second threshold range or not;

And when the acceleration module value is within a first threshold range and the course angle module value is within a second threshold range, the object to be positioned is in a zero-speed state currently.

3. The method of claim 2, wherein before the object to be located is currently in a zero velocity state, further comprising:

Calculating course angle variance corresponding to the course angle data and acceleration variance corresponding to the acceleration data;

judging whether the acceleration variance is within a third threshold range or not and whether the course angle variance is within a fourth threshold range or not;

And when the acceleration variance is within a third threshold range and the course angle variance is within a fourth threshold range, the object to be positioned is in a zero-speed state.

4. The method of claim 2, wherein before calculating the acceleration mode value corresponding to the acceleration data and the heading angle mode value corresponding to the heading angle data, the method further comprises:

calculating an acceleration variance corresponding to the acceleration data according to the acceleration data;

Judging whether the object to be positioned is in a walking mode or a running mode according to the acceleration variance;

and when the object to be positioned is in a walking mode, continuously calculating an acceleration module value corresponding to the acceleration data and a course angle module value corresponding to the course angle data.

5. the method of claim 4, further comprising:

When the object to be positioned is in a running mode, smoothing the curvature output by the curvature sensor;

Generating a curvature curve according to the smoothed curvature;

and calculating a minimum value of the curvature curve, and determining a zero-speed state according to the adjacent minimum value.

6. The method according to any one of claims 1 to 5, wherein the processing the acceleration data in the non-zero velocity state according to the result of the zero velocity detection to obtain the current displacement comprises:

Obtaining the speed of the current state according to the speed of the previous state and the acceleration data in the non-zero speed state under the geographic coordinate system;

and integrating the speed of the current state to obtain the current displacement.

7. The method of claim 6, further comprising:

acquiring a gravity vector and a geomagnetic vector under a geographic coordinate system, and converting the gravity vector and the geomagnetic vector into a carrier coordinate system to obtain a first standard vector corresponding to the gravity vector and a second standard vector corresponding to the geomagnetic vector;

comparing the first standard vector with the gravity acceleration measured under a carrier coordinate system to obtain a first error vector, and comparing the second standard vector with the geomagnetic vector measured under the carrier coordinate system to obtain a first error vector;

correcting the quaternion and the course angle data through the first error vector and the second error vector;

And processing the acceleration data acquired by the inertial sensor through the corrected quaternion to obtain the acceleration data in a non-zero-speed state under a geographic coordinate system.

8. an indoor positioning device, the device comprising:

the receiving module is used for receiving course angle data and acceleration data acquired by the inertial sensor, geomagnetic data acquired by the magnetometer and curvature acquired by the curvature sensor;

the zero-speed detection module is used for performing zero-speed detection through the course angle data, the acceleration data and the curvature and obtaining the step frequency of the object to be positioned according to the result of the zero-speed detection;

the step length calculation module is used for obtaining the step length corresponding to the step frequency through a self-adaptive step length estimation algorithm;

the zero-speed correction module is used for processing the acceleration data in a non-zero-speed state according to a zero-speed detection result to obtain current displacement;

And the dead reckoning module is used for correcting the current displacement according to the step length and carrying out indoor positioning on the object to be positioned according to the corrected current displacement.

9. a computer device comprising a memory and a processor, the memory storing a computer program, wherein the processor implements the steps of the method of any one of claims 1 to 7 when executing the computer program.

10. a computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 7.

Technical Field

the invention relates to an indoor positioning method and device, and belongs to the field of indoor positioning.

Background

with the development of human beings and the progress of society, people have more and more social activities, and people have more and more travel without leaving the demand for location services. At present, most activities of people are carried out indoors, and in an indoor environment, because signals of a global satellite navigation system are shielded by buildings and other electromagnetic interference, the signals received indoors are extremely weak and even cannot be received, so that people in the room cannot obtain own position information through the global satellite navigation system, at this moment, an indoor positioning system is required to be used for providing support, and the indoor positioning system is used for providing an indoor accurate position for pedestrians.

Disclosure of Invention

In view of the above problems in the prior art, an object of the present invention is to provide an indoor positioning method and apparatus.

In order to achieve the purpose, the invention adopts the following technical scheme:

A method of indoor positioning, the method comprising:

receiving course angle data and acceleration data acquired by an inertial sensor, geomagnetic data acquired by a magnetometer and curvature acquired by a curvature sensor;

carrying out zero-speed detection through the course angle data, the acceleration data and the curvature, and obtaining the step frequency of the object to be positioned according to the result of the zero-speed detection;

Obtaining a step length corresponding to the step frequency through a self-adaptive step length estimation algorithm;

Processing the acceleration data in a non-zero speed state according to a zero speed detection result to obtain current displacement;

And correcting the current displacement according to the step length, and performing indoor positioning on the object to be positioned according to the corrected current displacement.

in one embodiment, the performing zero-speed detection through the heading angle data, the acceleration data, and the bending angle includes:

Calculating an acceleration module value corresponding to the acceleration data and a course angle module value corresponding to the course angle data;

judging whether the acceleration module value is within a first threshold range or not and whether the course angle module value is within a second threshold range or not;

and when the acceleration module value is within a first threshold range and the course angle module value is within a second threshold range, the object to be positioned is in a zero-speed state currently.

In one embodiment, before the object to be positioned is currently in the zero speed state, the method further includes:

Calculating course angle variance corresponding to the course angle data and acceleration variance corresponding to the acceleration data;

Judging whether the acceleration variance is within a third threshold range or not and whether the course angle variance is within a fourth threshold range or not;

And when the acceleration variance is within a third threshold range and the course angle variance is within a fourth threshold range, the object to be positioned is in a zero-speed state.

in one embodiment, before the calculating the acceleration module value corresponding to the acceleration data and the heading angle module value corresponding to the heading angle data, the method further includes:

Calculating an acceleration variance corresponding to the acceleration data according to the acceleration data;

Judging whether the object to be positioned is in a walking mode or a running mode according to the acceleration variance;

and when the object to be positioned is in a walking mode, continuously calculating an acceleration module value corresponding to the acceleration data and a course angle module value corresponding to the course angle data.

in one embodiment, the method further comprises:

When the object to be positioned is in a running mode, smoothing the curvature output by the curvature sensor;

generating a curvature curve according to the smoothed curvature;

and calculating a minimum value of the curvature curve, and determining a zero-speed state according to the adjacent minimum value.

in one embodiment, the processing the acceleration data in the non-zero speed state according to the result of the zero speed detection to obtain the current displacement includes:

Obtaining the speed of the current state according to the speed of the previous state and the acceleration data in the non-zero speed state under the geographic coordinate system;

And integrating the speed of the current state to obtain the current displacement.

In one embodiment, the method further comprises:

acquiring a gravity vector and a geomagnetic vector under a geographic coordinate system, and converting the gravity vector and the geomagnetic vector into a carrier coordinate system to obtain a first standard vector corresponding to the gravity vector and a second standard vector corresponding to the geomagnetic vector;

comparing the first standard vector with the gravity acceleration measured under a carrier coordinate system to obtain a first error vector, and comparing the second standard vector with the geomagnetic vector measured under the carrier coordinate system to obtain a first error vector;

correcting the quaternion and the course angle data through the first error vector and the second error vector;

and processing the acceleration data acquired by the inertial sensor through the corrected quaternion to obtain the acceleration data in a non-zero-speed state under a geographic coordinate system.

An indoor positioning device, the device comprising:

The receiving module is used for receiving course angle data and acceleration data acquired by the inertial sensor, geomagnetic data acquired by the magnetometer and curvature acquired by the curvature sensor;

The zero-speed detection module is used for performing zero-speed detection through the course angle data, the acceleration data and the curvature and obtaining the step frequency of the object to be positioned according to the result of the zero-speed detection;

The step length calculation module is used for obtaining the step length corresponding to the step frequency through a self-adaptive step length estimation algorithm;

The zero-speed correction module is used for processing the acceleration data in a non-zero-speed state according to a zero-speed detection result to obtain current displacement;

and the dead reckoning module is used for correcting the current displacement according to the step length and carrying out indoor positioning on the object to be positioned according to the corrected current displacement.

A computer device comprising a memory storing a computer program and a processor implementing the steps of any of the methods described above when the processor executes the computer program.

A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method of any of the above.

compared with the prior art, the indoor positioning method and the indoor positioning device provided by the invention have the following advantages:

The method comprises the steps that data acquisition of pedestrian walking information is achieved through an inertial sensor, wherein the data acquisition comprises acceleration data, course angle data and geomagnetic data obtained through a magnetometer; judging the walking step length of the pedestrian through a self-adaptive step length estimation algorithm; the sensor error is corrected through the bending sensor and the zero-speed correction algorithm, and finally higher indoor positioning accuracy of the pedestrian can be achieved.

drawings

fig. 1 is an application environment diagram of an indoor positioning method provided by the present invention;

FIG. 2 is a flow chart of an indoor positioning method provided by the present invention;

FIG. 3 is a diagram illustrating the change of the leg state of an object to be positioned during movement according to an embodiment;

FIG. 4 is a graph of step frequency versus step size in one embodiment;

FIG. 5 is a waveform of acceleration amplitude in one embodiment;

FIG. 6 is a diagram of an object location trajectory in one embodiment;

FIG. 7 is a block diagram of an indoor positioning unit in one embodiment.

Detailed Description

The present invention will be described more fully with reference to the following examples and comparative examples.

the indoor method provided by the application can be applied to the application environment shown in fig. 1. Therein, the interest sensor 102, the magnetometer 104, and the bending sensor 106 communicate with the main control chip 108 via a network. The device comprises an inertial measurement unit, a magnetometer, a main control chip and a memory card, wherein the inertial measurement unit, the magnetometer, the main control chip and the memory card are integrated together through design and are arranged at the toe cap position of a pedestrian, a bending sensor is arranged at the knee joint position of the pedestrian, the inertial measurement unit comprises a gyroscope sensor and an acceleration sensor, and the gyroscope sensor and the acceleration sensor respectively collect course angle data and acceleration data of the pedestrian. The magnetometer collects geomagnetic data of pedestrians, the bending sensor collects knee joint bending degree of the pedestrians during walking, the inertia measurement unit, the magnetometer and the bending sensor collect data which are processed through the main control chip 108, and positioning results are stored through the storage card. The main control chip 108 is used for calculating and processing the acquired data to obtain indoor positioning data of the pedestrian; the invention strapped the inertial sensor at the position of the toe of the pedestrian to acquire the motion information of the pedestrian. As is known, when walking, a pedestrian has a characteristic that the foot performs a periodic reciprocating motion, which can be roughly divided into two states: static state and pendulum dynamic state. When the foot is in contact with the ground and the toe completely leaves the ground, the speed of the foot of the pedestrian is zero, and the position of the pedestrian is not changed, and the state can be considered as a static state; beyond the resting state, the state of the foot may be referred to as a pendulum motion. In a static state, under the condition that the feet do not slide, the drift error of the acceleration data can be estimated by utilizing the characteristics that the speed of the feet is zero and the direction is unchanged, and then the speed of the feet in the dynamic state of the pendulum is corrected. Through the processing, the error caused by the drift of the inertial sensor can be obviously reduced, and the indoor positioning precision of the pedestrian is effectively improved.

In an embodiment, as shown in fig. 2, an indoor positioning method is provided, which is described by taking an example that the method is applied to the main control chip in fig. 1, and includes the following steps:

S202: and receiving course angle data and acceleration data acquired by the inertial sensor, geomagnetic data acquired by the magnetometer and curvature acquired by the curvature sensor.

Specifically, in an ideal state, the output of the accelerometer and the gyroscope in the inertial sensor in a static state should not change, but in actual measurement, the output of the sensor is unstable due to the error of the sensor caused by drift. This feature can be used to correct errors in the quiescent state. Wherein the detection of the stationary state, i.e. the zero velocity state, becomes a critical issue for research.

s204: and carrying out zero-speed detection through the course angle data, the acceleration data and the curvature, and obtaining the step frequency of the object to be positioned according to the result of the zero-speed detection.

specifically, in order to ensure the accuracy of the zero-velocity detection, the present embodiment utilizes the periodic variation of the triaxial data output by the accelerometer and the triaxial data output by the gyroscope, and utilizes variance processing on the output sensor data and the triaxial data respectively to comprehensively judge the gait of the pedestrian. For example, the output module values of the accelerometer and the gyroscope are calculated, the speed of the foot of the human body is zero in a static state, obviously, the output module value of the accelerometer should be the local gravity acceleration under an ideal condition, and the output of the gyroscope is zero. However, in actual test, the output of the sensor is not the same, and the zero speed judgment of the pedestrian can be carried out by setting a corresponding threshold value.

After the zero-velocity interval is obtained through judgment, the step frequency corresponding to the object to be positioned can be obtained according to the zero-velocity interval, specifically, refer to fig. 3, where fig. 3 is a leg state change diagram of the object to be positioned during movement in one embodiment. Therefore, the step frequency of the object to be positioned can be obtained according to the zero-speed interval. I.e. the frequency of the interval of zero velocity.

S206: and obtaining the step length corresponding to the step frequency through a self-adaptive step length estimation algorithm.

specifically, referring to fig. 4, fig. 4 is a graph of a relationship between a step frequency and a step length in an embodiment, where it can be found that the faster the step frequency of walking of a pedestrian is, the larger the corresponding step length is to keep body balance, and the slower the step frequency of walking is, the shorter the corresponding step length is, and the obtained step frequency can be used to obtain the corresponding step length.

s208: and processing the acceleration data in a non-zero speed state according to a zero speed detection result to obtain the current displacement.

specifically, after the zero-speed state is obtained, acceleration data, heading angle data, geomagnetic data and the like corresponding to the non-zero-speed state can be determined, the main control chip can process the data to obtain the current speed, and obtain corresponding displacement according to the current speed, so that the current position is determined.

S210: and correcting the current displacement according to the step length, and performing indoor positioning on the object to be positioned according to the corrected current displacement.

Specifically, the main control chip calculates the displacement according to the step length and the corresponding time interval to correct the current displacement obtained by positioning, so that the indoor positioning of the object to be positioned can be determined according to the corrected current displacement.

compared with the prior art, the indoor positioning method provided by the invention has the following advantages:

The method comprises the steps that data acquisition of pedestrian walking information is achieved through an inertial sensor, wherein the data acquisition comprises acceleration data, course angle data and geomagnetic data obtained through a magnetometer; judging the walking step length of the pedestrian through a self-adaptive step length estimation algorithm; the sensor error is corrected through the bending sensor and the zero-speed correction algorithm, and finally higher indoor positioning accuracy of the pedestrian can be achieved.

In one embodiment, the performing zero-speed detection through the heading angle data, the acceleration data, and the bending angle includes: calculating an acceleration module value corresponding to the acceleration data and a course angle module value corresponding to the course angle data; judging whether the acceleration module value is within a first threshold range or not and whether the course angle module value is within a second threshold range or not; and when the acceleration module value is within a first threshold range and the course angle module value is within a second threshold range, the object to be positioned is in a zero-speed state currently.

In one embodiment, before the object to be positioned is currently in the zero speed state, the method further includes: calculating course angle variance corresponding to the course angle data and acceleration variance corresponding to the acceleration data; judging whether the acceleration variance is within a third threshold range or not and whether the course angle variance is within a fourth threshold range or not; and when the acceleration variance is within a third threshold range and the course angle variance is within a fourth threshold range, the object to be positioned is in a zero-speed state.

In one embodiment, before the calculating the acceleration module value corresponding to the acceleration data and the heading angle module value corresponding to the heading angle data, the method further includes: calculating an acceleration variance corresponding to the acceleration data according to the acceleration data; judging whether the object to be positioned is in a walking mode or a running mode according to the acceleration variance; and when the object to be positioned is in a walking mode, continuously calculating an acceleration module value corresponding to the acceleration data and a course angle module value corresponding to the course angle data.

In one embodiment, the method further comprises: when the object to be positioned is in a running mode, smoothing the curvature output by the curvature sensor; generating a curvature curve according to the smoothed curvature; and calculating a minimum value of the curvature curve, and determining a zero-speed state according to the adjacent minimum value.

specifically, in order to ensure the accuracy of the zero-velocity detection, the present embodiment utilizes the periodic variation of the triaxial data output by the accelerometer and the triaxial data output by the gyroscope, and utilizes variance processing on the output sensor data and the triaxial data respectively to comprehensively judge the gait of the pedestrian. The specific method can be judged by the following steps.

1) and calculating the output module values of the accelerometer and the gyroscope. In a static state, the speed of the foot of the human body is zero, obviously, under an ideal condition, the modulus output by the accelerometer should be local gravity acceleration, and the output of the gyroscope is zero. However, in actual test, the output of the sensor is not the same, and the zero speed judgment of the pedestrian can be carried out by setting a corresponding threshold value. The output modulus of the triaxial accelerometer is:

in the formula (I), the compound is shown in the specification,Andthe acceleration values output by the x axis, the y axis and the z axis under the carrier coordinate system are respectively. The modulus of the triaxial angular velocity output is:

in the formula (I), the compound is shown in the specification,AndThe angular velocity values output by the x axis, the y axis and the z axis under the carrier coordinate system are respectively.

the zero speed state is judged by setting a corresponding threshold value:

In the formula, tha minAnd tha maxminimum and maximum values of threshold values, th, respectively, set for accelerationωthe threshold value is set for the angular velocity, and the size of the threshold value can be set according to the gait characteristics of different pedestrians. And if the pedestrian is in the threshold value range, the pedestrian is considered to be in a static state and is represented by 1, otherwise, the pedestrian is considered to be in a swing state and is represented by 0.

The pedestrian zero-speed interval detected by only applying the method has partial errors, so that the pedestrian zero-speed interval cannot be judged by only using the method, and further screening is needed.

2) And judging the acceleration variance and the angular velocity variance. It is considered that the pedestrian is in a stationary state when the variance of the acceleration is below a set threshold and the variance of the angular velocity is below a set threshold for a certain period of time. Wherein the acceleration variance is:

In the formula (I), the compound is shown in the specification,and s is the set window size of the mean value of the modulus of the data measured by the accelerometer. And (3) judging the zero speed state in a certain interval by setting a corresponding threshold value:

In the formula (I), the compound is shown in the specification,for the set acceleration variance threshold value, the acceleration variance is set,the size of the angular velocity variance threshold can be set according to the gait of different pedestrians.

After all the conditions are met, the pedestrian is considered to be in the zero-speed state.

Since a person may run during the activity as well as walking, it is not sufficient to perform effective zero-velocity detection only for the pedestrian in the walking state, and it is necessary to accurately determine the zero-velocity interval of the pedestrian in the running state. The contact time of the foot of the person with the ground in the running state is much shorter than that in the walking state, which may cause a large error in the zero speed detection of the zero speed detection algorithm in the running state of the person.

the main factors influencing the accuracy of the zero-speed detection algorithm can be obtained by analysis as follows:

1) When a person runs, the contact time of the foot and the ground is shortened, so that the zero-speed interval is narrowed, and the accuracy of zero-speed detection is influenced.

2) when a person runs, the feet of the person can generate great impact when contacting with the ground, and then the sensor can generate violent shake.

the above two factors are the main causes of the increase of the zero-speed detection error. If the high-precision indoor positioning can be realized in walking and running states of the pedestrian, other sensors can be introduced to assist the inertial sensor to improve the accuracy of zero-speed detection.

the bending sensor can detect the bending degree of an object and is applied to intelligent robots and intelligent arms. The invention introduces the bending sensor to carry out auxiliary detection on the zero-speed interval by the inertial sensor.

When the pedestrian is in a motion state, the knee joint angle of the leg part is changed regularly, and the leg part state change during running can be represented as shown in fig. 2.

The leg transformation of the person in the running state can be understood by the graph of fig. 2, and the analysis shows that the change of the knee joint angle has a certain rule and can be followed. As can be seen by examination, the range of the normal human knee angle is 0 ° to 135 °, and the present embodiment detects the change of the human knee angle during running by installing a bending sensor at the human knee position.

the bending sensor is made of piezoelectric materials, and when the bending degree of a measured object changes, the resistance of the sensor changes along with the change, and the change characteristic is that the resistance is smaller when the bending is larger.

the resistance value is calculated by the formula:

RRFP=(V+/VOUT-1)*R1 (8)

Wherein, V+Represents the input voltage, VOUTrepresents the output voltage, R1Representing a voltage dividing resistance. The sensor outputs voltage variation value, the voltage of the sensor is converted into digital signal through AD conversion, corresponding bending angle is recorded, the voltage variation corresponds to the variation of bending degree, and the bending is foundAn algorithmic curve of the relationship between curvature and voltage change. Assuming that the bending degree of the bending sensor is y, and the voltage change rate of the bending sensor is x, the bending characteristic correspondence relationship can be expressed by the following formula:

y=a0+a1x+a2x2+a3x3+a4x4+a5x5 (9)

in the formula a0、a1、a2、a3、a4、a5The coefficients representing the bending characteristics, whose values can be calculated by means of curve fitting.

after installing the sensor knee joint position, measuring the knee joint angle change of pedestrian under running state, there is interference noise at the measurement process, and this embodiment adopts the moving average filtering algorithm to carry out smooth processing to the signal, and the moving average filtering convolution implementation form is:

in the formula, x (i + j) represents an input signal, y (i) represents an output signal, and M is the number of points required for averaging.

It can be found from the analysis that in a gait cycle, the bending degree of the knee joint reaches a minimum value when the heel of the pedestrian touches the ground and reaches a minimum value when the toe of the pedestrian leaves the ground, and then the bending degree gradually increases. The state between two adjacent minimum values is the stage of foot landing, and the interval is a zero-speed interval, namely the foot speed is zero.

In order to further explore the relationship between the step length and the acceleration characteristic value, an experiment is performed in this embodiment, an experimenter holds a mobile phone to walk along a straight path, first walks 10 steps at a normal speed, and then walks 10 steps quickly after staying for a period of time, so as to obtain an acceleration waveform as shown in fig. 5:

it can be seen from fig. 5 that the acceleration amplitude fluctuation intervals of the normal mode and the fast walking mode are obviously different, the variance is a characteristic value representing the data dispersion degree, training is performed through a large amount of data in advance, a variance threshold value can be obtained, if the acceleration variance of the pedestrian in one step is larger than the threshold value, it is determined that the pedestrian is in the fast walking mode, and if the acceleration variance is smaller than the threshold value, it is determined that the pedestrian is in the normal walking mode. Through a large number of data experimental training, the variance of normal walking is between 1.33 and 3.12, and the variance of fast walking is between 6.38 and 14.49. Therefore, the acceleration variance threshold is set to 5, and when the acceleration variance of the pedestrian walking is greater than 5, the pedestrian is determined to be in the fast walking mode, and when less than 5, the pedestrian is determined to be in the normal walking mode.

in one embodiment, the processing the acceleration data in the non-zero speed state according to the result of the zero speed detection to obtain the current displacement includes: obtaining the speed of the current state according to the speed of the previous state and the acceleration data in the non-zero speed state under the geographic coordinate system; and integrating the speed of the current state to obtain the current displacement.

in one embodiment, the method further comprises: acquiring a gravity vector and a geomagnetic vector under a geographic coordinate system, and converting the gravity vector and the geomagnetic vector into a carrier coordinate system to obtain a first standard vector corresponding to the gravity vector and a second standard vector corresponding to the geomagnetic vector; comparing the first standard vector with the gravity acceleration measured under a carrier coordinate system to obtain a first error vector, and comparing the second standard vector with the geomagnetic vector measured under the carrier coordinate system to obtain a first error vector; correcting the quaternion and the course angle data through the first error vector and the second error vector; and processing the acceleration data acquired by the inertial sensor through the corrected quaternion to obtain the acceleration data in a non-zero-speed state under a geographic coordinate system.

In a strapdown inertial navigation system, indoor positioning of pedestrians is realized by using an inertial sensor, and attitude calculation is indispensable. Firstly, data collected in a carrier coordinate system needs to be converted into a geographic coordinate system, and then the speed and the attitude of the pedestrian are calculated, so that the indoor position of the pedestrian is obtained. The transformation of the coordinate system is usually performed by using the following two methods, namely a directional cosine matrix based on the euler angle and a transformation matrix represented by a quaternion. In the embodiment, the quaternion method is adopted to solve the pedestrian attitude.

Defining a vector in a carrier coordinate systemCan be expressed as:It can be represented as r in the geographic coordinate systemn. Is r isn=qrbq*whereinq*Is the complex conjugate of q.

the euler angle can represent a quaternion as:

if a quaternion is used to represent the relationship between the carrier coordinate system and the geographic coordinate system, the quaternion, i.e. the rotation matrix, can be corrected by means of the inertial sensor data in the two coordinate systems. The gravity vector can be expressed as (0,0, g) in a geographic coordinate system, can be transformed to a carrier coordinate system through a rotation matrix, and the rotation matrix can be corrected by comparing the measured data with the transformed data. The specific process is as follows.

1) by using hx、hy、hzRespectively representing geomagnetic measurement data rotated to a geographical coordinate system, wherein:

hx=2*mx(0.5f-q2q2-q3q3)+2*my(q1q2-q0q3)+2*mz(q1q3-q0q2) (12)

hy=2*my(0.5f-q1q1-q3q3)+2*mx(q1q2-q0q3)+2*mz(q2q3-q0q1) (13)

hz=2*mz(0.5f-q1q1-q2q2)+2*mx(q1q3-q0q2)+2*my(q2q3-q0q1) (14)

By bx、by、bzRepresenting the components in the x, y, z directions, respectively, q0、q1、q2、q3Four elements m representing quaternions represent geomagnetism measurement data in a carrier coordinate system, mx、my、mzrespectively, in the x, y, z directions, wherein byis 0, bzAnd hzthe same is that:

bx=sqrt((hx*hx)+(hy*hy)) (15)

by=0 (16)

bz=hz (17)

2) And performing left multiplication operation on the gravity vector (0,0, g) and the magnetic field vector to transform into a carrier coordinate system:

vx=2*(q1q3-q0q2) (18)

vy=2*(q0q1+q2q3) (19)

vz=q0q0-q1q1-q2q2+q3q3 (20)

wx=2*bx*(0.5-q2q2-q3q3)+2*bz*(q1q3-q0q2) (21)

wy=2*bx*(q1q2-q0q3)+2*bz*(q0q1+q2q3) (22)

wz=2*bx*(q0q2+q1q3)+2*bz*(0.5-q1q1-q2q2) (23)

3) Comparing the vector obtained in the step (2) with the measurement data of the accelerometer and the gyroscope to obtain an error vector, and correcting the quaternion and the gyroscope data, wherein a represents the acceleration measurement data in the carrier coordinate system, ax, ay and as represent the components in the directions of the x axis, the y axis and the s axis respectively, m represents the gyroscope measurement data in the carrier coordinate system, and m represents the gyroscope measurement data in the carrier coordinate systemx、my、mzrepresenting components in the x, y, z directions, respectively, e1、e2、e3、e4、e5、e6Is an error vector.

e1=ax-vx (24)

e2=ay-vy (25)

e3=az-vz (26)

e4=mx-wx (27)

e5=my-wy (28)

e6=mz-wz (29)

4) and (3) the gyroscope error and the magnitude of the error vector are in a direct proportion relation, and the quaternion and the gyroscope data can be corrected by multiplying the error vector obtained in the step (3) by a gain matrix K.

T=[e1 e2 e3 e4 e5 e6] (30)

Y=K*T′ (31)

Normalization of quaternion:

Then:

5) Converting quaternions to euler angles:

The position estimation algorithm is described in detail below:

the speed of the pedestrian may be expressed in a geographic coordinate system as:

In the formula, vnwhich is indicative of the speed of the pedestrian,The acceleration of the coriolis acceleration is expressed,Denotes centripetal acceleration, gnrepresenting a local gravitational acceleration value, C representing a rotation matrix;

when the displacement of the pedestrian is calculated, error compensation needs to be carried out on the acceleration, so that the system error is reduced;

when calculating the speed of the pedestrian, the coriolis acceleration and the centripetal acceleration are negligible, so the obtainable speed update expression is:

In the formula, Δ t is a sampling period.

the position of the pedestrian is obtained by integrating the speed, and the formula can be expressed as:

further available location update formulas are:

the position estimation data of the current position of the target pedestrian can be obtained from the above equation.

and (3) updating the position:

The strapdown inertial navigation system can represent the speed of the carrier under a local geographic coordinate system by the following formula:

In the formula, vnIndicating the speed of the vehicle, i.e. the pedestrian, gnIndicating the gravitational acceleration of the location.

if the navigation coordinate system is an ideal platform coordinate system, the above equation is the specific force equation. The specific force equation is expressed whenbafter the acceleration is converted into the local geographic coordinate system, before the acceleration is integrated, harmful acceleration needs to be added into the acceleration for error compensation, and the error in the operation process can be effectively reduced by performing integration operation on data after the harmful acceleration is added. Wherein the harmful acceleration mainly includes: acceleration of brother typeCentripetal accelerationAnd acceleration of gravity gnThese three parts.

as can be seen from the above, when the pedestrian walksthe generated centripetal acceleration is very weak compared with the centripetal acceleration generated when carriers such as airplanes, ships, missiles and the like move, and the generated centripetal acceleration is used for navigation calculation of pedestriansCan be ignored; it should be noted that the gyroscope has large noise and cannot sensitively sense the coriolis accelerationSuch a small amount is therefore negligible. After ignoring the second order small quantity, the velocity update formula can be expressed as:

In the formula, Δ t represents a sampling period of the system.

If the navigation coordinate system is the local geographic coordinate system, the position of the strapdown inertial navigation system can be expressed as:

ignoring the second order part, the recursive update formula for the position is:

The relative displacement of the pedestrian is obtained by the calculation of the above formula, so that the reference datum of the position needs to be set in advance before navigation, and the error of positioning can be reduced. Specifically, as shown in fig. 6, fig. 6 is a positioning track diagram of an object to be positioned in an embodiment.

it should be understood that, although the steps in the flowchart of fig. 2 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in a strict order unless explicitly stated in the present embodiment, and may be performed in other orders. Moreover, at least a portion of the steps in fig. 2 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performance of the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.

In one embodiment, as shown in fig. 7, there is provided an indoor positioning device including: the system comprises a receiving module 100, a zero-speed detection module 200, a step length calculation module 300, a zero-speed correction module 400 and a track calculation module 500, wherein:

The receiving module 100 is configured to receive heading angle data and acceleration data acquired by the inertial sensor, geomagnetic data acquired by the magnetometer, and curvature acquired by the curvature sensor.

And the zero-speed detection module 200 is configured to perform zero-speed detection according to the heading angle data, the acceleration data, and the curvature, and obtain a step frequency of the object to be positioned according to a result of the zero-speed detection.

A step size calculating module 300, configured to obtain, through an adaptive step size estimation algorithm, a step size corresponding to the step frequency.

and the zero-speed correction module 400 is configured to process the acceleration data in a non-zero-speed state according to a zero-speed detection result to obtain a current displacement.

And the dead reckoning module 500 is configured to correct the current displacement according to the step length, and perform indoor positioning on the object to be positioned according to the corrected current displacement.

In one embodiment, the zero-speed detection module 200 includes:

and the module value calculating unit is used for calculating an acceleration module value corresponding to the acceleration data and a course angle module value corresponding to the course angle data.

And the first judgment unit is used for judging whether the acceleration module value is within a first threshold value range or not and whether the course angle module value is within a second threshold value range or not.

And the first output unit is used for determining that the object to be positioned is in a zero-speed state currently when the acceleration module value is within a first threshold range and the course angle module value is within a second threshold range.

In one embodiment, the zero-speed detection module 200 further includes:

and the first variance calculating unit is used for calculating the course angle variance corresponding to the course angle data and the acceleration variance corresponding to the acceleration data.

And the second judging unit is used for judging whether the acceleration variance is within a third threshold value range or not and whether the course angle variance is within a fourth threshold value range or not.

and the second output unit is used for determining that the object to be positioned is in a zero-speed state when the acceleration variance is within a third threshold range and the course angle variance is within a fourth threshold range.

In one embodiment, the zero-speed detection module 200 further includes:

And the second variance calculating unit is used for calculating the acceleration variance corresponding to the acceleration data according to the acceleration data.

And the mode judging unit is used for judging whether the object to be positioned is in a walking mode or a running mode according to the acceleration variance.

And the first mode judging unit is used for continuously calculating an acceleration module value corresponding to the acceleration data and a course angle module value corresponding to the course angle data when the object to be positioned is in a walking mode.

In one embodiment, the method zero speed detection module 200 further includes:

And the second mode judging unit is used for smoothing the curvature output by the curvature sensor when the object to be positioned is in a running mode.

And the curve generating unit is used for generating a curve according to the smoothed curve.

and the third output unit is used for calculating the minimum value of the curvature curve and determining the zero-speed state according to the adjacent minimum value.

In one embodiment, the stall correction module 400 includes:

And the speed acquisition unit is used for acquiring the speed of the current state according to the speed of the previous state and the acceleration data in the non-zero speed state in the geographic coordinate system.

And the displacement acquisition unit is used for integrating the speed of the current state to obtain the current displacement.

In one embodiment, the apparatus further comprises:

and the conversion unit is used for acquiring a gravity vector and a geomagnetic vector in a geographic coordinate system, and converting the gravity vector and the geomagnetic vector into a carrier coordinate system to obtain a first standard vector corresponding to the gravity vector and a second standard vector corresponding to the geomagnetic vector.

And the error acquisition unit is used for comparing the first standard vector with the gravity acceleration measured under the carrier coordinate system to obtain a first error vector, and comparing the second standard vector with the geomagnetic vector measured under the carrier coordinate system to obtain a first error vector.

and the correcting unit is used for correcting the quaternion and the course angle data through the first error vector and the second error vector.

and the processing unit is used for processing the acceleration data acquired by the inertial sensor through the corrected quaternion to obtain the acceleration data in a non-zero-speed state under a geographic coordinate system.

For specific definition of the indoor positioning device, reference may be made to the definition of the indoor positioning method above, and details are not described here. The modules in the indoor positioning device can be wholly or partially realized by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.

In one embodiment, a computer device is provided, which may be a server. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database of the computer device is used for storing the data collected by the sensor. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement an indoor positioning method.

In one embodiment, a computer device is provided, comprising a memory and a processor, the memory having a computer program stored therein, the processor implementing the following steps when executing the computer program: receiving course angle data and acceleration data acquired by an inertial sensor, geomagnetic data acquired by a magnetometer and curvature acquired by a curvature sensor; carrying out zero-speed detection through the course angle data, the acceleration data and the curvature, and obtaining the step frequency of the object to be positioned according to the result of the zero-speed detection; obtaining a step length corresponding to the step frequency through a self-adaptive step length estimation algorithm; processing the acceleration data in a non-zero speed state according to a zero speed detection result to obtain current displacement; and correcting the current displacement according to the step length, and performing indoor positioning on the object to be positioned according to the corrected current displacement.

in one embodiment, said zero speed detection by said heading angle data, said acceleration data, and said bend angle implemented when the processor executes the computer program comprises: calculating an acceleration module value corresponding to the acceleration data and a course angle module value corresponding to the course angle data; judging whether the acceleration module value is within a first threshold range or not and whether the course angle module value is within a second threshold range or not; and when the acceleration module value is within a first threshold range and the course angle module value is within a second threshold range, the object to be positioned is in a zero-speed state currently.

In one embodiment, the processor, when executing the computer program, further comprises before the object to be positioned is currently in the zero speed state: calculating course angle variance corresponding to the course angle data and acceleration variance corresponding to the acceleration data; judging whether the acceleration variance is within a third threshold range or not and whether the course angle variance is within a fourth threshold range or not; and when the acceleration variance is within a third threshold range and the course angle variance is within a fourth threshold range, the object to be positioned is in a zero-speed state.

in one embodiment, before said calculating the acceleration module value corresponding to the acceleration data and the heading angle module value corresponding to the heading angle data, which is implemented when the processor executes the computer program, the method further comprises: calculating an acceleration variance corresponding to the acceleration data according to the acceleration data; judging whether the object to be positioned is in a walking mode or a running mode according to the acceleration variance; and when the object to be positioned is in a walking mode, continuously calculating an acceleration module value corresponding to the acceleration data and a course angle module value corresponding to the course angle data.

In one embodiment, the processor, when executing the computer program, further performs the steps of: when the object to be positioned is in a running mode, smoothing the curvature output by the curvature sensor; generating a curvature curve according to the smoothed curvature; and calculating a minimum value of the curvature curve, and determining a zero-speed state according to the adjacent minimum value.

in one embodiment, the processing of the acceleration data in the non-zero velocity state according to the result of the zero velocity detection to obtain the current displacement, which is implemented when the processor executes the computer program, includes: obtaining the speed of the current state according to the speed of the previous state and the acceleration data in the non-zero speed state under the geographic coordinate system; and integrating the speed of the current state to obtain the current displacement.

in one embodiment, the processor, when executing the computer program, further performs the steps of: acquiring a gravity vector and a geomagnetic vector under a geographic coordinate system, and converting the gravity vector and the geomagnetic vector into a carrier coordinate system to obtain a first standard vector corresponding to the gravity vector and a second standard vector corresponding to the geomagnetic vector; comparing the first standard vector with the gravity acceleration measured under a carrier coordinate system to obtain a first error vector, and comparing the second standard vector with the geomagnetic vector measured under the carrier coordinate system to obtain a first error vector; correcting the quaternion and the course angle data through the first error vector and the second error vector; and processing the acceleration data acquired by the inertial sensor through the corrected quaternion to obtain the acceleration data in a non-zero-speed state under a geographic coordinate system.

In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of: receiving course angle data and acceleration data acquired by an inertial sensor, geomagnetic data acquired by a magnetometer and curvature acquired by a curvature sensor; carrying out zero-speed detection through the course angle data, the acceleration data and the curvature, and obtaining the step frequency of the object to be positioned according to the result of the zero-speed detection; obtaining a step length corresponding to the step frequency through a self-adaptive step length estimation algorithm; processing the acceleration data in a non-zero speed state according to a zero speed detection result to obtain current displacement; and correcting the current displacement according to the step length, and performing indoor positioning on the object to be positioned according to the corrected current displacement.

In one embodiment, the zero speed detection by the heading angle data, the acceleration data, and the bend angle implemented when the computer program is executed by a processor comprises: calculating an acceleration module value corresponding to the acceleration data and a course angle module value corresponding to the course angle data; judging whether the acceleration module value is within a first threshold range or not and whether the course angle module value is within a second threshold range or not; and when the acceleration module value is within a first threshold range and the course angle module value is within a second threshold range, the object to be positioned is in a zero-speed state currently.

in one embodiment, before the object to be positioned is currently in the zero speed state, the computer program, when executed by the processor, further comprises: calculating course angle variance corresponding to the course angle data and acceleration variance corresponding to the acceleration data; judging whether the acceleration variance is within a third threshold range or not and whether the course angle variance is within a fourth threshold range or not; and when the acceleration variance is within a third threshold range and the course angle variance is within a fourth threshold range, the object to be positioned is in a zero-speed state.

in one embodiment, before said calculating the acceleration mode value corresponding to the acceleration data and the heading angle mode value corresponding to the heading angle data, the computer program when executed by the processor further comprises: calculating an acceleration variance corresponding to the acceleration data according to the acceleration data; judging whether the object to be positioned is in a walking mode or a running mode according to the acceleration variance; and when the object to be positioned is in a walking mode, continuously calculating an acceleration module value corresponding to the acceleration data and a course angle module value corresponding to the course angle data.

In one embodiment, the computer program when executed by the processor further performs the steps of: when the object to be positioned is in a running mode, smoothing the curvature output by the curvature sensor; generating a curvature curve according to the smoothed curvature; and calculating a minimum value of the curvature curve, and determining a zero-speed state according to the adjacent minimum value.

In one embodiment, the processing of the acceleration data in the non-zero velocity state to obtain the current displacement according to the result of the zero velocity detection implemented when the computer program is executed by the processor includes: obtaining the speed of the current state according to the speed of the previous state and the acceleration data in the non-zero speed state under the geographic coordinate system; and integrating the speed of the current state to obtain the current displacement.

In one embodiment, the computer program when executed by the processor further performs the steps of: acquiring a gravity vector and a geomagnetic vector under a geographic coordinate system, and converting the gravity vector and the geomagnetic vector into a carrier coordinate system to obtain a first standard vector corresponding to the gravity vector and a second standard vector corresponding to the geomagnetic vector; comparing the first standard vector with the gravity acceleration measured under a carrier coordinate system to obtain a first error vector, and comparing the second standard vector with the geomagnetic vector measured under the carrier coordinate system to obtain a first error vector; correcting the quaternion and the course angle data through the first error vector and the second error vector; and processing the acceleration data acquired by the inertial sensor through the corrected quaternion to obtain the acceleration data in a non-zero-speed state under a geographic coordinate system.

Finally, it must be said here that: the above embodiments are only used for further detailed description of the technical solutions of the present invention, and should not be understood as limiting the scope of the present invention, and the insubstantial modifications and adaptations made by those skilled in the art according to the above descriptions of the present invention are within the scope of the present invention.

22页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种应用于低成本芯片的扫地机器人清扫路径规划导航算法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!