# Personnel Positioning System Method in Building Based on Inertial Sensor

Authors: Qingjun Wang; Zhendong Mu
Journal: Security and Communication Networks
 (2022)

---

## Abstract

At present, the global positioning system has been widely used in outdoor positioning and navigation, but in buildings, thick walls made of cement and bricks have a certain blocking effect on satellite signals, resulting in severely weakened GPS signals, and also extremely it may have an impact on the positioning accuracy, so that the positioning task cannot be completed. Inertial sensor is a kind of sensor mainly detecting and measuring acceleration tilt impact vibration rotation and multi-degree-of-freedom motion, is an important part to solve navigation orientation and motion carrier control. Therefore, we need to study the positioning system and positioning method of the people in the building according to the indoor positioning technology. This article mainly uses inertial sensors as indoor positioning technology for related research. This technology mainly includes linked inertial navigation algorithm and pedestrian dead reckoning algorithm. This paper uses pedestrian dead reckoning algorithm to study the positioning system. The research shows that the PDR algorithm designed this time is more accurate for the positioning of pedestrian movement in the scene of the building. Compared with the previous algorithm research, it has increased by 1%-2% accuracy meets the expected accuracy requirements.


---

## Body

## 1. Introduction

### 1.1. Background

With the rapid development of the Internet of Things and communication technology, GPS navigation has become a household name. GPS navigation can quickly and accurately locate the geographic location information of outdoor personnel, but it is not so friendly for personnel positioning in buildings, so this article will be used for indoors. There are more and more references to the range of inertial sensors, such as the application of the current inertial night sweat system can greatly help the public’s daily travel. The positioning system and method are emphatically experimented and researched. With the rapid development of society, the demand for precise positioning and navigation technology in both daily life and national defense has increased, such as finding and obtaining surrounding shops information, banking services and traffic information; precise positioning of rescuers at disaster sites; and precision military applications such as guidance and individual positioning.


### 1.2. Significance

Indoor positioning technology is a solution to the problem of increasing demand for location information in buildings, and its impact on people has been extended to all aspects of daily life. At present, the actual application scenarios of indoor positioning technology are constantly expanding, and these new applications have sprung up in front of people. With the gradual improvement of the accuracy and stability of indoor positioning technologies, emerging indoor positioning technologies appear in more and more fields. For example, in the field of public safety, when major safety accidents such as fires and earthquakes occur, time is life, and buildings The internal positioning technology can accurately obtain the location information of the trapped person, improve the rescue efficiency of search and rescue personnel, and reduce the risk of secondary injury to the trapped person; in the field of smart parking lots, the positioning technology in the building can help car owners to check parking spaces in time. The number of vehicles and the location information of their own vehicles after parking. When returning, they can accurately obtain the route to find the car, helping the car owner find the parking place of the car in a timely and effective manner. In the commercial field, building positioning technology can help the public accurately find the mall buildings they need and timely and accurately find the goods they need, which can make shopping more convenient for the public.


### 1.3. Related Work

The improvement and capability optimization of wireless network reliability for positioning is an urgent problem to be solved. Yuan et al. proposes that underground maps of known special locations are determined by matching. However, due to the complexity of the process, the practicability of this positioning method is reduced [1]. Luo et al. proposed a new vehicle positioning technology, which mainly uses the related technologies of wireless sensors to locate the location of the vehicle and collect related information [2]. But their research project is only applicable to mobile vehicles in outdoor open spaces, and there has not been an in-depth study of mobile vehicles in buildings. At the same time, Gan et al. proposed a method of Doppler positioning through research on satellite systems [3]. But the project they are studying needs to provide a large amount of basic hardware facilities, and the research cost is relatively high. Through the use of GPS technology, He et al. assist the intelligent positioning and identification method proposed by it, so as to accurately and quickly identify the environment [4], but the positioning system they developed has higher requirements for electrical equipment. If indoors in remote areas, this technology will also be difficult to achieve. But the data results in the filtering stage are not very accurate [5]. Aiming at the problem of inefficient allocation of product designers due to the diversity of task execution by designers and differences in knowledge structure, the authors proposed a method of allocation of product designers based on knowledge similarity and learning ability. The practicability of this method is not high, and the results also have errors [6].


### 1.4. Innovation

Pedestrian track estimation algorithm in buildings: the current research on indoor positioning using inertial sensors requires a premise that the IMU is fixed on the pedestrian during walking, and the relative position is fixed, such as foot-mount-based indoor positioning and navigation for pedestrians The algorithm requires the inertial navigation unit to be fixed on the foot, and then uses the zero-speed update algorithm to complete the error estimation, and the accuracy of the inertial navigation unit is very high. This paper explores the in-depth physical laws of pedestrians and studies an indoor pedestrian track estimation algorithm with higher practical application value.


## 1.1. Background

With the rapid development of the Internet of Things and communication technology, GPS navigation has become a household name. GPS navigation can quickly and accurately locate the geographic location information of outdoor personnel, but it is not so friendly for personnel positioning in buildings, so this article will be used for indoors. There are more and more references to the range of inertial sensors, such as the application of the current inertial night sweat system can greatly help the public’s daily travel. The positioning system and method are emphatically experimented and researched. With the rapid development of society, the demand for precise positioning and navigation technology in both daily life and national defense has increased, such as finding and obtaining surrounding shops information, banking services and traffic information; precise positioning of rescuers at disaster sites; and precision military applications such as guidance and individual positioning.


## 1.2. Significance

Indoor positioning technology is a solution to the problem of increasing demand for location information in buildings, and its impact on people has been extended to all aspects of daily life. At present, the actual application scenarios of indoor positioning technology are constantly expanding, and these new applications have sprung up in front of people. With the gradual improvement of the accuracy and stability of indoor positioning technologies, emerging indoor positioning technologies appear in more and more fields. For example, in the field of public safety, when major safety accidents such as fires and earthquakes occur, time is life, and buildings The internal positioning technology can accurately obtain the location information of the trapped person, improve the rescue efficiency of search and rescue personnel, and reduce the risk of secondary injury to the trapped person; in the field of smart parking lots, the positioning technology in the building can help car owners to check parking spaces in time. The number of vehicles and the location information of their own vehicles after parking. When returning, they can accurately obtain the route to find the car, helping the car owner find the parking place of the car in a timely and effective manner. In the commercial field, building positioning technology can help the public accurately find the mall buildings they need and timely and accurately find the goods they need, which can make shopping more convenient for the public.


## 1.3. Related Work

The improvement and capability optimization of wireless network reliability for positioning is an urgent problem to be solved. Yuan et al. proposes that underground maps of known special locations are determined by matching. However, due to the complexity of the process, the practicability of this positioning method is reduced [1]. Luo et al. proposed a new vehicle positioning technology, which mainly uses the related technologies of wireless sensors to locate the location of the vehicle and collect related information [2]. But their research project is only applicable to mobile vehicles in outdoor open spaces, and there has not been an in-depth study of mobile vehicles in buildings. At the same time, Gan et al. proposed a method of Doppler positioning through research on satellite systems [3]. But the project they are studying needs to provide a large amount of basic hardware facilities, and the research cost is relatively high. Through the use of GPS technology, He et al. assist the intelligent positioning and identification method proposed by it, so as to accurately and quickly identify the environment [4], but the positioning system they developed has higher requirements for electrical equipment. If indoors in remote areas, this technology will also be difficult to achieve. But the data results in the filtering stage are not very accurate [5]. Aiming at the problem of inefficient allocation of product designers due to the diversity of task execution by designers and differences in knowledge structure, the authors proposed a method of allocation of product designers based on knowledge similarity and learning ability. The practicability of this method is not high, and the results also have errors [6].


## 1.4. Innovation

Pedestrian track estimation algorithm in buildings: the current research on indoor positioning using inertial sensors requires a premise that the IMU is fixed on the pedestrian during walking, and the relative position is fixed, such as foot-mount-based indoor positioning and navigation for pedestrians The algorithm requires the inertial navigation unit to be fixed on the foot, and then uses the zero-speed update algorithm to complete the error estimation, and the accuracy of the inertial navigation unit is very high. This paper explores the in-depth physical laws of pedestrians and studies an indoor pedestrian track estimation algorithm with higher practical application value.


## 2. Method of Locating People in Buildings

### 2.1. Target Tracking and Positioning

In the survey of Table1, it can be seen that many inertial measurement unit comparisons contain the required accelerometer measurement unit. Although the accuracy will be high, the cost is too high [7]. Table 2 is the accelerometer sensitivity of MPU-6050. After reading the datasheet, the user can customize the control measurement range and has an excellent power management control system.Table 1
Commonly used inertial sensor models and prices.
IMUIMU internal structureData transfer methodPriceInterSense, wireless, IntertialCube3Endevco, mems, MAG3110FCR1RF radio frequency wireless transmissionThousands of dollarsXsense, MTi sensorEndevco, mems, MAG3110FCR1RS-232$2900MEMSsense, IMUEndevco, mems, MAG3110FCR1RF radio frequency wireless transmissionThousands of dollarsMicrostrain, 3DM-GX1Endevco, mems, MAG3110FCR1RS-232$3500Table 2
Sensitivity of acceleration.
AFS_SELFull scale rangeLSV sensitivity1±2.1 g16494.2 LSB/g2±4.2 g8134.8 LSB/g3±8.1 g4124.3 LSB/g4±16.2 g2101.2 LSB/gThe target location technology based on sensor network is to use multiple receivers distributed in different geographical locations to collect scattered echoes from different directions, and realize target location by fusing the echo signals of multiple receivers [8, 9]. Commonly used traditional sensor network target positioning methods include azimuth measurement positioning method, time difference positioning method and azimuth time difference positioning method. Figure 1 shows a schematic diagram of the sensor system structure:Figure 1
Structure of the sensor system.With the development of time synchronization technology, the accuracy of the time difference positioning method has been greatly improved, and it is widely used in sensor network positioning [10, 11]. It is related to the mode of acoustic emission wave excitation mode, the surface shape of the material to be inspected and even the weather conditions, so it is very difficult to calculate the wave velocity. The best method is to measure the wave velocity through experiments in advance. One-dimensional linear positioning can be used for the positioning of weld defects and conveying pipeline defects. For multitarget positioning, the time difference positioning method still faces great challenges. The multitarget localization method of sensor network based on imaging strategy can realize two-dimensional. The resolution of the sparse antenna array applies the principle of radar imaging to multitarget positioning. Figure 2 shows a brief positioning diagram [12]:Figure 2
Schematic diagram of positioning.As can be seen from Figure2, the INERTIAL positioning system will collect signals from the construction personnel from all directions and then locate the specific location of the construction personnel. Target tracking is a data processing process that filters the measurement information to estimate the state information of the moving target [13, 14]. Target tracking can only be achieved by using the measurement information obtained from target positioning. For a maneuvering target, there may be multiple motion models [15]. The interactive multimodel algorithm (IMM) uses the interaction of multiple models to improve the tracking accuracy of maneuvering targets. Figure 3 shows a diagram of target tracking.Figure 3
Diagram of target tracking.


### 2.2. Indoor Inertial Positioning

Traditional inertial navigation and positioning systems generally use accelerometers and gyroscopes as the original data acquisition units, and obtain the position and attitude information of the moving target through attitude calculation, acceleration coordinate transformation, and navigation calculation methods [16]. To obtain the position and attitude information of the moving target, the gyroscope can be more likely to frequency off some interference signals, so that the position positioning is more accurate. Figure 4 shows a diagram of the directional sensor data acquisition function module.Figure 4
Directional sensor data acquisition.The gyroscope collects the angular velocity information of the moving target. From the measured angular velocity information, the attitude quaternion is calculated through the quaternion differential equation [17, 18]. The initial attitude quaternion is solved by the initial attitude, and the attitude matrix can be obtained from the attitude quaternion. The current absolute position information of the moving target can be obtained by combining the initial position information, and the attitude matrix can be used to solve the heading angle and attitude angle of the moving target through the heading and attitude calculation [19]. So as to realize all the functions of the inertial navigation and positioning system, the principal block diagram of the indoor inertial positioning system is shown in Figure 5:Figure 5
Block diagram of indoor inertial positioning system.


### 2.3. Indoor Positioning Based on Inertial Sensors

Early inertial sensor-based positioning systems are common in the field of vehicles and robotics. The inertial sensors are fixed on the upper or waist of the pedestrian positioning system [20]. These sensors are usually some specially made combination sensor circuit boards, or used directly integrated inertial measurement unit. Researchers believe that all PDR methods used to estimate distance can be divided into two categories. A brief diagram is shown in Figure 6.Figure 6
Schematic diagram of positioning.


#### 2.3.1. Acceleration Double Integral

The biggest drawback of this method is that the accumulated time error is too large. Zero-speed update refers to when the pointer of the update speed sensor returns to “zero,” but the update speed does not “disappear,” and there is an internal error correction system and correction function. Although the zero-velocity update (ZUPT, zero velocity updates) can effectively reduce this error, the so-called ZUPT means that when the sole of the foot is completely in contact with the ground for a short period of time, the speed is zero, so this method is suitable for the scenario where the IMU is installed on the foot, and the practicality is not very strong, so it has gradually become unpopular research.


#### 2.3.2. Accelerometer Step Detection

Estimating step length, combined with gyroscope or electronic compass (SHSs): in the modern era, the indoor building environment is complex, especially the indoor metal doors and windows and other decorations, which make the magnetometer (electronic compass) vulnerable to greater electromagnetic interference. In addition, the low-cost sensor itself is noisy, and the heading estimation has always been a key technology in SHSs [21, 22].


### 2.4. Yaw Angle Estimation Method

The starting position of the pedestrian att0 is (X0, Y0), the displacement is S0 along the heading angle α, and the position (X1, Y1) is reached at T1, and at T1, it starts to walk along the heading angle ß by displacement S1, T2 The position reached at time (X2, Y2) starts to travel along the heading angle γ and the displacement S2, the position reached at time T3 (X3, Y3), the positional relationship between T1 and T2 [4-5] is shown in formulas (1) and (2):(1)XT2=XT1+S1sinα,(2)YT2=YT1+S1cosβ.Therefore, based on the acceleration obtained by the inertial navigation sensor and the acceleration and angular velocity obtained by the gyroscope, calculate the specific walking distance to obtain formulas (3) and (4) yaw angle calculation formulas:(3)Xk=Xk−1+L•sin∑j=1kθy=∑i=1kL•sin∑j=1iθj,(4)Yk=∑i=1kL•cos∑j=1iθy,where k represents the K-th step, θj represents the yaw angle of the j-th step, and L represents the estimated step length.


### 2.5. Step Estimation Method

(1)
In fact, the easiest way to estimate the step length is to calculate it as a constant, but the step length of different people is different, and the same person’s step length will be more different in the process of walking. Weinberg reported that the distance difference between different pedestrians in the same step can reach 40%, and the difference in walking speed can reach 50%. So, he noticed that the participants in the test in a short time have to walk along the designated route. If you want to assume that they are all walking according to the natural foot frequency and step length, this estimate is too optimistic. So, we estimate the step length of each step based on the data measured by the inertial navigation device mounted on the smart mobile terminal.(1)
Assuming that the step length isL, the step length is estimated as(5)L=ρ4amaxt−amint,ρ=drealdestimated.Among them,a is the acceleration, t is the world, ρ is a constant, and d is the distance.(2)
Assuming that the step length isL, (G is a constant), the step length is estimated to be L, then the step length is estimated as(6)L=G•awer−aminamax−amin.


### 2.6. Acceleration Sensor Principle

At present, due to the huge cost reduction, three-axis equipment is becoming more and more common. Figure7 describes the axis direction of a three-axis accelerometer.Figure 7
Three-axis accelerometer.Figure8 is a depiction of a simplified accelerometer model. For the displacement during the measurement, there are(7)md2dtd+x=Fx.Figure 8
Accelerometer model.A simple mechanical analysis shows the following relationships:(8)Fx=−cdxdt−kx,and therefore,(9)md2dtd+x+cdxdt+kx=0.In the end, the following relationship can be obtained:(10)md2xdt+cdxdt+kx=−ma.In the case of knownm, the displacement x of the detection mass can calculate the magnitude of acceleration a. The block diagram is shown in Figure 9.Figure 9
Block diagram of simple accelerometer model.


### 2.7. Gyro Principle

Figure10 shows the drawing of a three-axis gyroscope part drawing.Figure 10
Three-axis gyroscope.When the external force acts on the rotating ring to make the given shaft rotate, the direction of the gyro rotor does not change, and the angle change can be measured according to the angle difference between the rotor and the rotating ring [23]. The schematic diagram of the gyroscope principle is shown in Figure 11.Figure 11
Schematic diagram of gyroscope.The working principle is shown in Figure12.Figure 12
Coriolis force rotation rate measurement.Figure13 shows the graphics of the MEMS gyroscope.Figure 13
MEMS structure of gyroscope.


### 2.8. Naive Bayes

The solution formula for explaining the conditional probability is as follows:(11)PA|B=PABPB.The expression of Bayes’ theorem is as follows:(12)PB|A=PA|BPBPA.In the above formula,A and B represent two sets of signals of the location of the construction personnel. Which category the category item belongs to. It is named Naive Bayes Classification because of its simple classification idea. The algorithm process is as follows:(1)
Assume(13)x=a1,a2,a3…am.(2)
Let the category set be(14)C=y1,y2,y3…yn.(3)
Calculate(15)Py1|x,Py2|x…Pyn|x.(4)
If(16)Pyk|x=maxPy1|x,Py2|x…Pyn|x,then x belongs to class yk.(17)Pa1|y1,Pa2|y1…Pam|y1;Pa1|y2,Pa2|y2…Pam|y2;…Pa1|yn,Pa2|yn…Pam|yn.When each characteristic attribute is conditionally independent, the following derivation is based on Bayes’ theorem:(18)Pyi|x=Px|yiPyiPx.Px|yiPyi=Pyi∏j=1mPaj|yi,In this way, the problem is transformed into a problem of estimating the conditional probability of the data to be tested.According to the above analysis, the Naive Bayesian process can be represented by the following Figure14. The biggest advantage of naive Bayesian classification is that it is simple to use, fast in calculation, clear and easy to understand, and requires less training data, but it also has obvious shortcomings.Figure 14
Naive Bayesian classification process.


### 2.9.K-Nearest Neighbor Algorithm

When the number of sample points in a certain category occupies the majority, the point to be tested also belongs to this category [24].Since the classification result of the K-NN algorithm is only related to a few training samples closest to the test sample, and has nothing to do with each sample domain. Figure15 shows the classification principle of a K-NN algorithm.Figure 15
K classification principle of nearest neighbor algorithm.The distance between objects often uses the Euclidean distance Manhattan distance, and its expression is as follows:Euclidean distance:(19)d1x,y=∑i=1nxi−yi2.Manhattan distance:(20)d2x,y=∑i=1nxi−yi.AlthoughK-nearest neighbors are good at classification situations with more overlaps, they are lazy algorithms. The so-called K-nearest neighbor algorithm is to find K instances closest to the instance in the training data set for a new input instance given a training data set. When classifying test samples, it is necessary to calculate the distance between all points of the test object and the training sample [25]. The calculation amount is too large, and as the feature dimension increases, Europe the distinguishing ability of the Cleveland distance deteriorates, and different features have different effects on the distance when calculating the Euclidean distance, so the features need to be normalized first.


## 2.1. Target Tracking and Positioning

In the survey of Table1, it can be seen that many inertial measurement unit comparisons contain the required accelerometer measurement unit. Although the accuracy will be high, the cost is too high [7]. Table 2 is the accelerometer sensitivity of MPU-6050. After reading the datasheet, the user can customize the control measurement range and has an excellent power management control system.Table 1
Commonly used inertial sensor models and prices.
IMUIMU internal structureData transfer methodPriceInterSense, wireless, IntertialCube3Endevco, mems, MAG3110FCR1RF radio frequency wireless transmissionThousands of dollarsXsense, MTi sensorEndevco, mems, MAG3110FCR1RS-232$2900MEMSsense, IMUEndevco, mems, MAG3110FCR1RF radio frequency wireless transmissionThousands of dollarsMicrostrain, 3DM-GX1Endevco, mems, MAG3110FCR1RS-232$3500Table 2
Sensitivity of acceleration.
AFS_SELFull scale rangeLSV sensitivity1±2.1 g16494.2 LSB/g2±4.2 g8134.8 LSB/g3±8.1 g4124.3 LSB/g4±16.2 g2101.2 LSB/gThe target location technology based on sensor network is to use multiple receivers distributed in different geographical locations to collect scattered echoes from different directions, and realize target location by fusing the echo signals of multiple receivers [8, 9]. Commonly used traditional sensor network target positioning methods include azimuth measurement positioning method, time difference positioning method and azimuth time difference positioning method. Figure 1 shows a schematic diagram of the sensor system structure:Figure 1
Structure of the sensor system.With the development of time synchronization technology, the accuracy of the time difference positioning method has been greatly improved, and it is widely used in sensor network positioning [10, 11]. It is related to the mode of acoustic emission wave excitation mode, the surface shape of the material to be inspected and even the weather conditions, so it is very difficult to calculate the wave velocity. The best method is to measure the wave velocity through experiments in advance. One-dimensional linear positioning can be used for the positioning of weld defects and conveying pipeline defects. For multitarget positioning, the time difference positioning method still faces great challenges. The multitarget localization method of sensor network based on imaging strategy can realize two-dimensional. The resolution of the sparse antenna array applies the principle of radar imaging to multitarget positioning. Figure 2 shows a brief positioning diagram [12]:Figure 2
Schematic diagram of positioning.As can be seen from Figure2, the INERTIAL positioning system will collect signals from the construction personnel from all directions and then locate the specific location of the construction personnel. Target tracking is a data processing process that filters the measurement information to estimate the state information of the moving target [13, 14]. Target tracking can only be achieved by using the measurement information obtained from target positioning. For a maneuvering target, there may be multiple motion models [15]. The interactive multimodel algorithm (IMM) uses the interaction of multiple models to improve the tracking accuracy of maneuvering targets. Figure 3 shows a diagram of target tracking.Figure 3
Diagram of target tracking.


## 2.2. Indoor Inertial Positioning

Traditional inertial navigation and positioning systems generally use accelerometers and gyroscopes as the original data acquisition units, and obtain the position and attitude information of the moving target through attitude calculation, acceleration coordinate transformation, and navigation calculation methods [16]. To obtain the position and attitude information of the moving target, the gyroscope can be more likely to frequency off some interference signals, so that the position positioning is more accurate. Figure 4 shows a diagram of the directional sensor data acquisition function module.Figure 4
Directional sensor data acquisition.The gyroscope collects the angular velocity information of the moving target. From the measured angular velocity information, the attitude quaternion is calculated through the quaternion differential equation [17, 18]. The initial attitude quaternion is solved by the initial attitude, and the attitude matrix can be obtained from the attitude quaternion. The current absolute position information of the moving target can be obtained by combining the initial position information, and the attitude matrix can be used to solve the heading angle and attitude angle of the moving target through the heading and attitude calculation [19]. So as to realize all the functions of the inertial navigation and positioning system, the principal block diagram of the indoor inertial positioning system is shown in Figure 5:Figure 5
Block diagram of indoor inertial positioning system.


## 2.3. Indoor Positioning Based on Inertial Sensors

Early inertial sensor-based positioning systems are common in the field of vehicles and robotics. The inertial sensors are fixed on the upper or waist of the pedestrian positioning system [20]. These sensors are usually some specially made combination sensor circuit boards, or used directly integrated inertial measurement unit. Researchers believe that all PDR methods used to estimate distance can be divided into two categories. A brief diagram is shown in Figure 6.Figure 6
Schematic diagram of positioning.


### 2.3.1. Acceleration Double Integral

The biggest drawback of this method is that the accumulated time error is too large. Zero-speed update refers to when the pointer of the update speed sensor returns to “zero,” but the update speed does not “disappear,” and there is an internal error correction system and correction function. Although the zero-velocity update (ZUPT, zero velocity updates) can effectively reduce this error, the so-called ZUPT means that when the sole of the foot is completely in contact with the ground for a short period of time, the speed is zero, so this method is suitable for the scenario where the IMU is installed on the foot, and the practicality is not very strong, so it has gradually become unpopular research.


### 2.3.2. Accelerometer Step Detection

Estimating step length, combined with gyroscope or electronic compass (SHSs): in the modern era, the indoor building environment is complex, especially the indoor metal doors and windows and other decorations, which make the magnetometer (electronic compass) vulnerable to greater electromagnetic interference. In addition, the low-cost sensor itself is noisy, and the heading estimation has always been a key technology in SHSs [21, 22].


## 2.3.1. Acceleration Double Integral

The biggest drawback of this method is that the accumulated time error is too large. Zero-speed update refers to when the pointer of the update speed sensor returns to “zero,” but the update speed does not “disappear,” and there is an internal error correction system and correction function. Although the zero-velocity update (ZUPT, zero velocity updates) can effectively reduce this error, the so-called ZUPT means that when the sole of the foot is completely in contact with the ground for a short period of time, the speed is zero, so this method is suitable for the scenario where the IMU is installed on the foot, and the practicality is not very strong, so it has gradually become unpopular research.


## 2.3.2. Accelerometer Step Detection

Estimating step length, combined with gyroscope or electronic compass (SHSs): in the modern era, the indoor building environment is complex, especially the indoor metal doors and windows and other decorations, which make the magnetometer (electronic compass) vulnerable to greater electromagnetic interference. In addition, the low-cost sensor itself is noisy, and the heading estimation has always been a key technology in SHSs [21, 22].


## 2.4. Yaw Angle Estimation Method

The starting position of the pedestrian att0 is (X0, Y0), the displacement is S0 along the heading angle α, and the position (X1, Y1) is reached at T1, and at T1, it starts to walk along the heading angle ß by displacement S1, T2 The position reached at time (X2, Y2) starts to travel along the heading angle γ and the displacement S2, the position reached at time T3 (X3, Y3), the positional relationship between T1 and T2 [4-5] is shown in formulas (1) and (2):(1)XT2=XT1+S1sinα,(2)YT2=YT1+S1cosβ.Therefore, based on the acceleration obtained by the inertial navigation sensor and the acceleration and angular velocity obtained by the gyroscope, calculate the specific walking distance to obtain formulas (3) and (4) yaw angle calculation formulas:(3)Xk=Xk−1+L•sin∑j=1kθy=∑i=1kL•sin∑j=1iθj,(4)Yk=∑i=1kL•cos∑j=1iθy,where k represents the K-th step, θj represents the yaw angle of the j-th step, and L represents the estimated step length.


## 2.5. Step Estimation Method

(1)
In fact, the easiest way to estimate the step length is to calculate it as a constant, but the step length of different people is different, and the same person’s step length will be more different in the process of walking. Weinberg reported that the distance difference between different pedestrians in the same step can reach 40%, and the difference in walking speed can reach 50%. So, he noticed that the participants in the test in a short time have to walk along the designated route. If you want to assume that they are all walking according to the natural foot frequency and step length, this estimate is too optimistic. So, we estimate the step length of each step based on the data measured by the inertial navigation device mounted on the smart mobile terminal.(1)
Assuming that the step length isL, the step length is estimated as(5)L=ρ4amaxt−amint,ρ=drealdestimated.Among them,a is the acceleration, t is the world, ρ is a constant, and d is the distance.(2)
Assuming that the step length isL, (G is a constant), the step length is estimated to be L, then the step length is estimated as(6)L=G•awer−aminamax−amin.


## 2.6. Acceleration Sensor Principle

At present, due to the huge cost reduction, three-axis equipment is becoming more and more common. Figure7 describes the axis direction of a three-axis accelerometer.Figure 7
Three-axis accelerometer.Figure8 is a depiction of a simplified accelerometer model. For the displacement during the measurement, there are(7)md2dtd+x=Fx.Figure 8
Accelerometer model.A simple mechanical analysis shows the following relationships:(8)Fx=−cdxdt−kx,and therefore,(9)md2dtd+x+cdxdt+kx=0.In the end, the following relationship can be obtained:(10)md2xdt+cdxdt+kx=−ma.In the case of knownm, the displacement x of the detection mass can calculate the magnitude of acceleration a. The block diagram is shown in Figure 9.Figure 9
Block diagram of simple accelerometer model.


## 2.7. Gyro Principle

Figure10 shows the drawing of a three-axis gyroscope part drawing.Figure 10
Three-axis gyroscope.When the external force acts on the rotating ring to make the given shaft rotate, the direction of the gyro rotor does not change, and the angle change can be measured according to the angle difference between the rotor and the rotating ring [23]. The schematic diagram of the gyroscope principle is shown in Figure 11.Figure 11
Schematic diagram of gyroscope.The working principle is shown in Figure12.Figure 12
Coriolis force rotation rate measurement.Figure13 shows the graphics of the MEMS gyroscope.Figure 13
MEMS structure of gyroscope.


## 2.8. Naive Bayes

The solution formula for explaining the conditional probability is as follows:(11)PA|B=PABPB.The expression of Bayes’ theorem is as follows:(12)PB|A=PA|BPBPA.In the above formula,A and B represent two sets of signals of the location of the construction personnel. Which category the category item belongs to. It is named Naive Bayes Classification because of its simple classification idea. The algorithm process is as follows:(1)
Assume(13)x=a1,a2,a3…am.(2)
Let the category set be(14)C=y1,y2,y3…yn.(3)
Calculate(15)Py1|x,Py2|x…Pyn|x.(4)
If(16)Pyk|x=maxPy1|x,Py2|x…Pyn|x,then x belongs to class yk.(17)Pa1|y1,Pa2|y1…Pam|y1;Pa1|y2,Pa2|y2…Pam|y2;…Pa1|yn,Pa2|yn…Pam|yn.When each characteristic attribute is conditionally independent, the following derivation is based on Bayes’ theorem:(18)Pyi|x=Px|yiPyiPx.Px|yiPyi=Pyi∏j=1mPaj|yi,In this way, the problem is transformed into a problem of estimating the conditional probability of the data to be tested.According to the above analysis, the Naive Bayesian process can be represented by the following Figure14. The biggest advantage of naive Bayesian classification is that it is simple to use, fast in calculation, clear and easy to understand, and requires less training data, but it also has obvious shortcomings.Figure 14
Naive Bayesian classification process.


## 2.9.K-Nearest Neighbor Algorithm

When the number of sample points in a certain category occupies the majority, the point to be tested also belongs to this category [24].Since the classification result of the K-NN algorithm is only related to a few training samples closest to the test sample, and has nothing to do with each sample domain. Figure15 shows the classification principle of a K-NN algorithm.Figure 15
K classification principle of nearest neighbor algorithm.The distance between objects often uses the Euclidean distance Manhattan distance, and its expression is as follows:Euclidean distance:(19)d1x,y=∑i=1nxi−yi2.Manhattan distance:(20)d2x,y=∑i=1nxi−yi.AlthoughK-nearest neighbors are good at classification situations with more overlaps, they are lazy algorithms. The so-called K-nearest neighbor algorithm is to find K instances closest to the instance in the training data set for a new input instance given a training data set. When classifying test samples, it is necessary to calculate the distance between all points of the test object and the training sample [25]. The calculation amount is too large, and as the feature dimension increases, Europe the distinguishing ability of the Cleveland distance deteriorates, and different features have different effects on the distance when calculating the Euclidean distance, so the features need to be normalized first.


## 3. Experiments on the Personnel Positioning System and Positioning Method in a Building

### 3.1. Establish a Positioning Network

First of all, place a certain number of multifunctional substations in the areas and lanes where people need to be tracked in the building according to the specific needs of the site. According to the actual situation of the site, every 300 meters in the column (the same as the position of the building power interface), work with a surface distance of 80 meters, set up a substation at an appropriate position (such as the top) of the column, and the substation can use batteries or other power sources as energy supply. In other places where network connection and positioning are needed, corresponding substation modules are also installed; in order to avoid the influence of complex underground environment on wireless signals, wireless network modules use anti-interference direct sequence spread spectrum communication methods, and each module has Received signal strength indicator function (RSSI). Spread spectrum technology has the advantages of multiple access, good concealment and anti-interference, so it is especially suitable for wireless mobile communication environment. Direct sequence spread spectrum technology has good confidentiality, flexible channel allocation ability and strong resistance to multipath and multiple access interference. Under the condition of not increasing spread spectrum gain, the received signal is pretreated by signal processing before the receiver expands, which can significantly increase the anti-interference ability of the system.The installed substations automatically form a communication network. Each module must be able to communicate with at least two modules, that is, to avoid “single-wire communication contact.” This constitutes a positioning network, and each network node is an anchor point. Compared with the RFID positioning method, the network node of the system can also determine the location of the moving target by receiving the signal strength of the moving target. In addition, the volume of the substation network nodes is much smaller, and the communication between the network nodes does not need to use additional communication cables or optical fibers to connect [26].


### 3.2. Design of the Personnel Positioning System in the Building

This experiment uses the pedestrian track method to collect inertial data in the current state based on inertial sensors and process the data accordingly. The principle is to obtain information such as speed, angle, and moving length based on the distance equal to the step length multiplied by the number of steps, and use this information to calculate the current position. The principal flow is shown in Figure16:Figure 16
Schematic diagram of inertial sensor positioning.The position of the previous step is known, and the current position can be calculated, but when a person is walking, even if he walks straight, he will shake left and right. Therefore, in the process of calculating the actual distance, the step length is multiplied by a number, but the distance and deviation angle must also be considered. Pedestrians normally walk indoors along an L-shaped area once, and the obtained yaw angle and walking trajectory positioning are shown in Figures17 and 18:Figure 17
Schematic diagram of the yaw angle of the pedestrian track algorithm.Figure 18
PDR positioning results of pedestrians walking in a circle along the L-shaped area in the building.In Figure17, the X and Y axes are the starting point to initialize a vertical direction that does not change during walking (denoted as the geographic coordinate system), x and y represent the coordinates of the inertial sensor, and α, β, and γ are the yaw angles. The formula can calculate the personnel step length.After the walking experiment of people in the building was over, we conducted a running experiment of people in the building, and collected and sorted the data collected by the inertial sensors. The statistical results are shown in Tables3 and 4:Table 3
PDR location results of pedestrians walking a circle along the indoor L-shaped area.
Experiment numberDistance (m)Error (%)End-to-end error (%)Error (m)10.480.840.400.7520.450.950.350.6330.320.870.420.7540.540.900.380.7050.440.800.310.60Table 4
PDR location results of pedestrians running a circle along the indoor L-shaped area.
Experiment numberDistance (m)Error (%)End-to-end error (%)Error (m)152.151.540.981.48254.681.321.011.91354.621.640.961.68452.231.220.881.52553.981.180.841.66Combining Tables3 and 4, it can be concluded that when pedestrians move in an indoor scene, the average distance error obtained by using the proposed PDR positioning algorithm is 1.68%, and the average end-to-end error is 1.25%. This shows that the proposed PDR positioning algorithm is relatively accurate for the positioning of pedestrian movement in indoor scenes, and meets the expected accuracy requirements.According to the data in Table5, different postures have different effects on the speed, which brings a lot of trouble to the positioning algorithm. Our method is performed in a theoretical environment, so we need to smooth the data.Table 5
Step acceleration and average value.
Attitude1234Analog value9.99.759.7910X0.199−0.5−6.76.6Y−9.80.13−6.36.3Z−0.47100.22−3.2According to the data in Table6 and Figure 19, this experiment has explored the inspection steps of steps 7, 12, and 17. According to the structure obtained, it is not difficult to find that the accuracy of the third group is the highest, and the accuracy of the other groups is relatively average.Table 6
Comparison of steps test results.
Quantity71217TextPVTTextPVTTextPVTFalse detection probability00.100.0470.0230.11Probability of missed detection00.020.03200.0510Probability of accuracy10.950.970.960.970.92Figure 19
Positioning error distance detection.


### 3.3. Comparison of Classification and Recognition Results

Use extreme learning machine to carry out the classification experiment of traditional pattern recognition. The sampling frequency of the system is 200 Hz, and the accelerometer collects three-axis acceleration data every 5 milliseconds. Too few training sets may lead to incomplete construction of the neural network model. Therefore, during the verification, the accuracy of the recognition results will not be too high, so the sample libraries are respectively 60%, 40%, 80%, 20%, and 90%, 10%. At the same time, in order to verify whether the increase of the sample library will affect the recognition results, the sample lengths of 5 s, 10 s, 15 s, and 20 s were collected for experiments. At the same time, compare the recognition effects of the extreme learning machine and the fuzzy neural network model.For this purpose, sample 5 s, 10 s, 15 s, 20 s, divide the training set into 91%, 92%, 93%, 94%, 95%, and test the recognition running time, and get Tables7–10.Table 7
Information identification comparison (5 s sample length).
Training set ratio (%)ELM (s)FNN (s)900.2950.802910.3020.830920.3100.851930.3110.862940.3190.869950.3200.876Table 8
Information identification comparison (10 s sample length).
Training set ratio (%)ELM (s)FNN (s)900.4951.142910.5091.163920.5151.172930.5311.193940.5451.209950.5631.231Table 9
Information identification comparison (15 s sample length).
Training set ratio (%)ELM (s)FNN (s)900.7551.14910.7611.163920.7731.172930.7901.193940.7821.209950.8191.231Table 10
Information identification comparison (20 s sample length).
Training set ratio (%)ELM (s)FNN (s)901.1021.912911.1131.925921.2111.929931.2191.935941.2231.941951.2331.950


## 3.1. Establish a Positioning Network

First of all, place a certain number of multifunctional substations in the areas and lanes where people need to be tracked in the building according to the specific needs of the site. According to the actual situation of the site, every 300 meters in the column (the same as the position of the building power interface), work with a surface distance of 80 meters, set up a substation at an appropriate position (such as the top) of the column, and the substation can use batteries or other power sources as energy supply. In other places where network connection and positioning are needed, corresponding substation modules are also installed; in order to avoid the influence of complex underground environment on wireless signals, wireless network modules use anti-interference direct sequence spread spectrum communication methods, and each module has Received signal strength indicator function (RSSI). Spread spectrum technology has the advantages of multiple access, good concealment and anti-interference, so it is especially suitable for wireless mobile communication environment. Direct sequence spread spectrum technology has good confidentiality, flexible channel allocation ability and strong resistance to multipath and multiple access interference. Under the condition of not increasing spread spectrum gain, the received signal is pretreated by signal processing before the receiver expands, which can significantly increase the anti-interference ability of the system.The installed substations automatically form a communication network. Each module must be able to communicate with at least two modules, that is, to avoid “single-wire communication contact.” This constitutes a positioning network, and each network node is an anchor point. Compared with the RFID positioning method, the network node of the system can also determine the location of the moving target by receiving the signal strength of the moving target. In addition, the volume of the substation network nodes is much smaller, and the communication between the network nodes does not need to use additional communication cables or optical fibers to connect [26].


## 3.2. Design of the Personnel Positioning System in the Building

This experiment uses the pedestrian track method to collect inertial data in the current state based on inertial sensors and process the data accordingly. The principle is to obtain information such as speed, angle, and moving length based on the distance equal to the step length multiplied by the number of steps, and use this information to calculate the current position. The principal flow is shown in Figure16:Figure 16
Schematic diagram of inertial sensor positioning.The position of the previous step is known, and the current position can be calculated, but when a person is walking, even if he walks straight, he will shake left and right. Therefore, in the process of calculating the actual distance, the step length is multiplied by a number, but the distance and deviation angle must also be considered. Pedestrians normally walk indoors along an L-shaped area once, and the obtained yaw angle and walking trajectory positioning are shown in Figures17 and 18:Figure 17
Schematic diagram of the yaw angle of the pedestrian track algorithm.Figure 18
PDR positioning results of pedestrians walking in a circle along the L-shaped area in the building.In Figure17, the X and Y axes are the starting point to initialize a vertical direction that does not change during walking (denoted as the geographic coordinate system), x and y represent the coordinates of the inertial sensor, and α, β, and γ are the yaw angles. The formula can calculate the personnel step length.After the walking experiment of people in the building was over, we conducted a running experiment of people in the building, and collected and sorted the data collected by the inertial sensors. The statistical results are shown in Tables3 and 4:Table 3
PDR location results of pedestrians walking a circle along the indoor L-shaped area.
Experiment numberDistance (m)Error (%)End-to-end error (%)Error (m)10.480.840.400.7520.450.950.350.6330.320.870.420.7540.540.900.380.7050.440.800.310.60Table 4
PDR location results of pedestrians running a circle along the indoor L-shaped area.
Experiment numberDistance (m)Error (%)End-to-end error (%)Error (m)152.151.540.981.48254.681.321.011.91354.621.640.961.68452.231.220.881.52553.981.180.841.66Combining Tables3 and 4, it can be concluded that when pedestrians move in an indoor scene, the average distance error obtained by using the proposed PDR positioning algorithm is 1.68%, and the average end-to-end error is 1.25%. This shows that the proposed PDR positioning algorithm is relatively accurate for the positioning of pedestrian movement in indoor scenes, and meets the expected accuracy requirements.According to the data in Table5, different postures have different effects on the speed, which brings a lot of trouble to the positioning algorithm. Our method is performed in a theoretical environment, so we need to smooth the data.Table 5
Step acceleration and average value.
Attitude1234Analog value9.99.759.7910X0.199−0.5−6.76.6Y−9.80.13−6.36.3Z−0.47100.22−3.2According to the data in Table6 and Figure 19, this experiment has explored the inspection steps of steps 7, 12, and 17. According to the structure obtained, it is not difficult to find that the accuracy of the third group is the highest, and the accuracy of the other groups is relatively average.Table 6
Comparison of steps test results.
Quantity71217TextPVTTextPVTTextPVTFalse detection probability00.100.0470.0230.11Probability of missed detection00.020.03200.0510Probability of accuracy10.950.970.960.970.92Figure 19
Positioning error distance detection.


## 3.3. Comparison of Classification and Recognition Results

Use extreme learning machine to carry out the classification experiment of traditional pattern recognition. The sampling frequency of the system is 200 Hz, and the accelerometer collects three-axis acceleration data every 5 milliseconds. Too few training sets may lead to incomplete construction of the neural network model. Therefore, during the verification, the accuracy of the recognition results will not be too high, so the sample libraries are respectively 60%, 40%, 80%, 20%, and 90%, 10%. At the same time, in order to verify whether the increase of the sample library will affect the recognition results, the sample lengths of 5 s, 10 s, 15 s, and 20 s were collected for experiments. At the same time, compare the recognition effects of the extreme learning machine and the fuzzy neural network model.For this purpose, sample 5 s, 10 s, 15 s, 20 s, divide the training set into 91%, 92%, 93%, 94%, 95%, and test the recognition running time, and get Tables7–10.Table 7
Information identification comparison (5 s sample length).
Training set ratio (%)ELM (s)FNN (s)900.2950.802910.3020.830920.3100.851930.3110.862940.3190.869950.3200.876Table 8
Information identification comparison (10 s sample length).
Training set ratio (%)ELM (s)FNN (s)900.4951.142910.5091.163920.5151.172930.5311.193940.5451.209950.5631.231Table 9
Information identification comparison (15 s sample length).
Training set ratio (%)ELM (s)FNN (s)900.7551.14910.7611.163920.7731.172930.7901.193940.7821.209950.8191.231Table 10
Information identification comparison (20 s sample length).
Training set ratio (%)ELM (s)FNN (s)901.1021.912911.1131.925921.2111.929931.2191.935941.2231.941951.2331.950


## 4. Personnel Positioning System and Positioning Method in Buildings

### 4.1. Error of Positioning System

In the personnel indoor positioning system based on inertial sensors, the main sources of positioning errors are the drift of the accelerometer and gyroscope, the poor dynamic performance of the accelerometer, the accuracy of the step length estimation algorithm and other unavoidable objective factors. However, we can use some verification methods to minimize the impact of these positioning errors on our experiments. Finally, because the magnetic field distribution in the external environment is unpredictable, there is no better way to solve the influence of external magnetic field interference on the heading angle estimation, which is also a problem that still exists in indoor positioning.


### 4.2. Error of Positioning Method

The inertial device also includes a magnetometer. Through the change of the geomagnetism, the direction of travel can be judged by the change of the geomagnetism between two points. However, in the indoor environment due to iron frames, iron doors and other facilities that can have a greater impact on the magnetic field, the universality of the method is not very strong either. In addition, in this experiment, the traveling state is counterclockwise. This is because the data collected by the accelerometer and gyroscope cannot be used to match the coordinate system of the inertial device with the geographic coordinate system. Direction, which is also the characteristic of pedestrian track method, infer the current position from the position and status information of the previous point.


### 4.3. The Accuracy of the Trajectory Calculation Algorithm

Design an experimental route and collect data, and calculate the error rate. The evaluation method used in this paper is to determine the initial position of the pedestrian, calculate the difference between the final pedestrian’s staying position and the estimated position of the algorithm, and then divide by the total length of the route.Figure20 is a comparison between the estimated pedestrian track and the real trajectory. The icon annotations are from top to bottom. The blue dashed line is based on acceleration as heading combined with the footstep detection state machine to calculate the trajectory, and the pink virtual PHA and PD do the footsteps. The detected trajectory, the dark red dotted line is the PHA combined with ZC to do the footstep detection trajectory, the red solid line is the real trajectory graph, the starting point and the stopping point are the same position, the complete trajectory is equivalent to a rectangle, the total length is 200 meters, Start from the green circle. It can be seen that when using peak detection PD and zero-crossing detection ZC to do footstep detection, due to the detection of false footsteps, some sides of the track are too long, or some sides are too short, from the start point to the end point It can be seen that the use of peak detection PD and zero-crossing detection ZC combined with PHA to do the track estimation distance is very large, while the use of PCA for heading estimation combined with state machine detection footsteps almost coincide at the starting point and ending point.Figure 20
Comparison of estimated and real trajectory of building personnel.


## 4.1. Error of Positioning System

In the personnel indoor positioning system based on inertial sensors, the main sources of positioning errors are the drift of the accelerometer and gyroscope, the poor dynamic performance of the accelerometer, the accuracy of the step length estimation algorithm and other unavoidable objective factors. However, we can use some verification methods to minimize the impact of these positioning errors on our experiments. Finally, because the magnetic field distribution in the external environment is unpredictable, there is no better way to solve the influence of external magnetic field interference on the heading angle estimation, which is also a problem that still exists in indoor positioning.


## 4.2. Error of Positioning Method

The inertial device also includes a magnetometer. Through the change of the geomagnetism, the direction of travel can be judged by the change of the geomagnetism between two points. However, in the indoor environment due to iron frames, iron doors and other facilities that can have a greater impact on the magnetic field, the universality of the method is not very strong either. In addition, in this experiment, the traveling state is counterclockwise. This is because the data collected by the accelerometer and gyroscope cannot be used to match the coordinate system of the inertial device with the geographic coordinate system. Direction, which is also the characteristic of pedestrian track method, infer the current position from the position and status information of the previous point.


## 4.3. The Accuracy of the Trajectory Calculation Algorithm

Design an experimental route and collect data, and calculate the error rate. The evaluation method used in this paper is to determine the initial position of the pedestrian, calculate the difference between the final pedestrian’s staying position and the estimated position of the algorithm, and then divide by the total length of the route.Figure20 is a comparison between the estimated pedestrian track and the real trajectory. The icon annotations are from top to bottom. The blue dashed line is based on acceleration as heading combined with the footstep detection state machine to calculate the trajectory, and the pink virtual PHA and PD do the footsteps. The detected trajectory, the dark red dotted line is the PHA combined with ZC to do the footstep detection trajectory, the red solid line is the real trajectory graph, the starting point and the stopping point are the same position, the complete trajectory is equivalent to a rectangle, the total length is 200 meters, Start from the green circle. It can be seen that when using peak detection PD and zero-crossing detection ZC to do footstep detection, due to the detection of false footsteps, some sides of the track are too long, or some sides are too short, from the start point to the end point It can be seen that the use of peak detection PD and zero-crossing detection ZC combined with PHA to do the track estimation distance is very large, while the use of PCA for heading estimation combined with state machine detection footsteps almost coincide at the starting point and ending point.Figure 20
Comparison of estimated and real trajectory of building personnel.


## 5. Conclusion

These two experiments are the walking experiment of the building and the running experiment of the building. Under different moving states of experimenters, the end-to-end positioning error and distance error of the proposed positioning algorithm are both less than 2%. The experimental results of running experiments show that the proposed positioning algorithm is also applicable to pedestrians running, which means that the algorithm has good dynamic performance. After the analysis in Sections4.1 and 4.2, the positioning error mainly comes from the drift of the accelerometer and gyroscope and some unavoidable objective factors. Finally, the comparison with the experimental results of other similar studies shows the effectiveness of the low-cost inertial sensor-based positioning algorithm proposed in this paper. It not only realizes precise positioning, but also obtains spatial height information, which expands the scope of use of the indoor inertial positioning system. To systematically study the theoretical knowledge involved in indoor inertial positioning. However, there are still many undiscovered features of the physical laws of pedestrians, and exploring more available physical laws can better improve the positioning accuracy. The extraction of features can rely on a variety of mathematical methods in the fast-developing field of machine learning to construct a neural network that takes the original collected sensor information as input and the step length and heading as output. The fast-developing chip technology is also for deep learning. It is possible to be applied in the field of navigation and positioning with high real-time requirements. However, the construction personnel positioning system studied in this paper will still be affected by a large number of interference signals, so that the specific location of the construction personnel will deviate. It is hoped that this problem can be solved in the future research.



---

*Source: 5945604-2022-04-16.xml*