Pedestrian tracking using inertial sensors

A personal navigation system is proposed in the present paper. This system is based on the use of inertial sensors and will be a complement for the Global Positioning System in places where GPS signals are not available. Such places are indoors and outdoors without a clear visibility of the sky (urban canyons, places under dense foliage...). A known initial position is required for this method for it to be able to estimate the trajectory of the pedestrian using inertial sensors attached to the foot. The developed method and the approximations taken into account are explained. Finally, the results of several tests carried out are shown.

Abstract-A personal navigation system is proposed in the present paper.This system is based on the use of inertial sensors and will be a complement for the Global Positioning System in places where GPS signals are not available.Such places are indoors and outdoors without a clear visibility of the sky (urban canyons, places under dense foliage…).
A known initial position is required for this method for it to be able to estimate the trajectory of the pedestrian using inertial sensors attached to the foot.
The developed method and the approximations taken into account are explained.Finally, the results of several tests carried out are shown.Index Terms-JoPhA,Inertial sensors, GPS, Odometry, MTi, IMU, INS.

I. INTRODUCTION oday, LBS (Location
Services), such as car navigators or personal navigators, are based on the use of GPS receptors.However, limitations of the GPS system are well known to users, jamming being the main problem, as shown in (Fig. 1).
GPS signals are not always available because they can be blocked by high buildings, canyons or forests among others.It can be a great problem in certain situations, such as military maneuvers or even for emergency responders.Usually, pedestrians are not in places with a high visibility of the sky, so the reception of the GPS signal will not be as good as the Raúl Feliz.E-mail: raufel@cartif.es.Fundación Cartif Eduardo Zalama.ezalama@eis.uva.es,Universidad de Valladolid.Jaime Gómez.jaigom@eis.uva.es,Universidad de Valladolid.system needs.A soldier can be in hidden places, and a firefighter can be indoors.Both are places in which a good placement of aerials is not possible.The combined use of inertial sensors and GPS will yield a high accuracy in the estimation of the pedestrian's location even when outdoor and indoor placements are crossed.This work tries to extend the studies done in vehicles and robots with inertial sensors to personal navigation.
The INS (Inertial Navigation System) gives a solution for personal navigation by using inertial sensors such as accelerometers and gyroscopes which have no relation with the place in which pedestrians are located.The IN Systems are a perfect solution for personal navigation due to the frequent GPS signal jamming both indoors and outdoors.The main disadvantage is the increasing error of the system over time and a method able to correct it is required.
Many studies done to determine the location and displacement of people have been focused on the use of inertial sensors and, in some cases, magnetic sensors.Some methods are based on step counters and estimate the distance covered using an average step length [1], [2], [3].Other methods are based on doubly integrating the acceleration measurements during the walking movement [4], [5], [6].Yet others try to determine the direction in which the pedestrian is walking to estimate a trajectory.In many studied cases, results obtained using expensive gadgets have not been better than those obtained with simples commercial pedometers.
Simple pedometers focus on counting steps.Based on this step count and an average step length, a pedometer unit can estimate distance traveled [2], [3].Pedometers do not have the ability to differentiate between different types of gait such as running, shuffling or side stepping.Overshoots tend to occur at slower velocities.Undershoots tend to occur at higher velocities.Pedometers must be calibrated for the stride length of the user and they produce large errors when the user moves in any other way than his or her normal walking pattern.A very sophisticated pedometer-like approach was introduced by [1].This system uses a two-axes accelerometer and a twoaxes magnetometer located on the user's boot.Step length is estimated from accelerometer readings that are passed through a neural network, and advanced Kalman Filter techniques are aimed at reducing the effect of magnetic disturbances.

Pedestrian tracking using inertial sensors
Raúl Feliz, Eduardo Zalama, Jaime Gómez García-Bermejo T Fig. 1: Problems in the reception of a GPS system Another way of implementing absolute position estimation is computer vision [7], [8].Images are compared and matched against a pre-compiled database.Computer vision has the advantage that the environment does not need to be modified, but the approach requires potentially very large databases.Work is also being done on so-called Simultaneous Location and Mapping (SLAM) methods, which don't require a precompiled database.However, SLAM systems are not as reliable, may accrue errors over time and distance, and poor visibility and unfavorable light conditions can result in completely false position estimation.
More sophisticated solutions actually measure the length of every stride in real-time.One such solution using ultrasonic sensors attached to the user's boots is explained in [10].Ultrasonic sensors require a direct line of "sight" between the boots, which may be a problem on rough terrain.Another approach measures the RF phase change between a reference signal located in a waist pack and the one coming from a transmitter located on each boot [11].A significant drawback of these technologies is that position estimation is restricted to 2-D environments since these systems cannot determine altitude changes and assume that any change is horizontal.Another potential problem is that these technologies use active emissions, which are undesirable for military applications, and they are vulnerable to external interference from the environment or from other units.
Finally, in the current methods, acceleration measurements must be integrated twice to yield position [12].For this, specific sensors have to be attached to the pedestrian's body.There are many possibilities depending on the part of the body on which the sensor is worn.Authors have attached it to the head [13], to the leg [14], to the waist [15], or to the foot [4], [5], [6], [16]- [19].
The developed method is based on the last point.As explained below, the sensor will be attached to the foot, and acceleration measurements will be corrected when the foot is set on the ground.The main proposals for improving the developed solutions is the use of the compass and gyroscope in the determination of the trajectory, improvements in the correction of acceleration measurements, and the use of the integrated barometer in the height measurements (3dimensional movement).

A. Procedure
The procedure followed to determine the position of the pedestrian is the double integration of the momentary accelerations measurements.For this work, the inertial unit MTi of Xsens Technologies, and its variant MTi-G, which integrates a GPS and a barometer (Fig. 2), have been used.The MTi is a miniature, gyro-enhanced Attitude and Heading Reference System (AHRS).Its internal low-power signal processor provides drift-free 3D orientation as well as calibrated 3D acceleration, 3D rate of turn and 3D earthmagnetic field data.The MTi is an excellent measurement unit for stabilization and control of cameras, robots, vehicles and other (un)manned equipment.Moreover, it is an excellent measurement unit for the orientation measurement of human body segments.
It is well known that the position values obtained by this method are reliable for just a short period of time.This is due to the accelerometer's inherent drift error, which means that when the double integration of the acceleration measurements is performed to get, first the speed and then the position, an error that is accumulated over time is not insignificant, so the estimated position will be far from the actual position.
The method followed to avoid this accumulated error, or at least to reduce it as much as possible, has been to estimate it in each step a pedestrian walks.This ensures a couple of points: first of all, the distance computed by this method will be very close to the actual travelled distance, and the second and most important point is that the small error produced, when speed and position estimation are computed for any step, will not influence the speed and position estimation for the next step.So the inertial system's inherent accumulated error is corrected.This is why it has been decided to attach the inertial sensor to the instep (Fig. 3).When a person walks, the movement of the foot can be divided into two phases, as seen in (Fig. 4).The first one is the stance phase, which is when the sole is on the ground.The other is the swing phase, which is when the foot is in movement.In the stance phase, linear and angular velocity of the foot must be nil.There is no movement in this phase, so any kind of velocity higher than zero means that there is an error produced by a wrong measurement of the acceleration values by the inertial sensor.
In this phase, linear velocities will be corrected, so the error will not be accumulated for the next step.The linear velocity values are reset to zero and all the measurements obtained for this step are recalculated according to the estimated error.The correction procedure is represented in (Fig. 5).

B. Error correction description
The detection of the swing and stance stages should be done at the first point.For this task, values of the angular velocity in each of the three axes provided by the gyroscope integrated into the IMU (Inertial Measurement Unit) have been used.Acceleration due to gravity is always present in the linear acceleration measurements.Specifically, total angular velocity has been used.(# being J angular velocity measurements in the three axes given by the IMU during the instants of the data acquisition time.Total angular velocity will be: In ideal conditions, this velocity should be zero in the stance phase.In fact, however, the total angular velocity will not be zero, but it should be lower than a given threshold.If this is true, it is considered that the sole is on the ground.The threshold used in this paper has been ŵ JIˤ J 9 .A result of one of the tests done is shown in (Fig. 5), where total angular velocity signal It is necessary to filter the signal in order to eliminate small fluctuations (momentary values of 3 when the movement is actually in the swing phase, and viceversa (Fig. 6)).This filter takes into account the values of the previous and subsequent measurements, and the X and Yaxes angular acceleration (corresponding to the pitch and roll angles).
Once a signal is obtained, the step-phase of the foot is known and, consequently, the integration and correction of acceleration measurements can be done (Fig. 7).Accelerations have to be referred to global coordinates for their integration.This is necessary as the measurements given by the IMU are referred to local coordinates.
Global coordinate conversion is carried out using the rotation matrix which relates local coordinates to global ones.Rotation matrix is defined by the Euler angles, which are given by the MTi/MTi-G either directly or indirectly.The disadvantages of the direct version are the singularities when the values are close to /%Ŵ .To avoid these singularities, quaternion mode has been used in the data acquisition.This is one of the advantages of using the MTi/MTi-G.Working with quaternion allows the mentioned singularity to be avoided and the conversion from quaternion to Euler angles is very easy.Moreover, it is possible to obtain the rotation matrix from the quaternion values.
Then, acceleration in global coordinates are integrated to compute linear velocities for subsequent correction.
The correction method would be as in the following short  mathematical description: 1. Let ˰ (# be the linear velocity values in the X-axis to be corrected.2. The method is applied to each step as follows: a. Let ˮ be the start time of the step's movement phase (swing), so that the value of the velocity at this moment will be ˰ ,ˮ will be the moment when the stance phase (in which the foot is on the floor again) starts, and ˰ will be the value of the velocity at this moment.Finally,ˮ will be the moment in which the stance phase ends and the next step starts, with its velocity value ˰ being a binary signal that satisfies: b.The mean velocity value is computed for the stance phase: # ˰ ( c.The linear velocity values are corrected as follows: The procedure to obtain Ӝ˰ ӝ (# and ˰ (# would be the same.The graphic representation of the described procedure is shown in (Fig. 8).
Each step fits a wave of the signal represented.It can be clearly seen how the accumulated error results in the velocity always having a negative value from the sixth step.This would mean that the subject would be moving, which is impossible, due to the given form of the signal.The zone between two consecutive waves (steps) corresponds to the stationary phase.As mentioned above, it is known that in this period the velocity has to be null, so this condition will be used to correct the error.

C. Yaw/Heading selection.
The Yaw angle, referred to global coordinates, will determine the trajectory followed by the inertial sensor when it is in motion.In the case of the MTI/MTI-G sensor, this angle can be obtained through two procedures.On the one hand, the integrated compass provides the angle formed by the sensor and the magnetic north.This is very reliable outdoors, but not so much in the presence of metallic environments (such as metal doors, handrails, frames...) which are present indoors.In this case, the compass will be affected, leading to erroneous measurements.
On the other hand, the integration of angular velocities given by the gyroscope will determine the angular variations between the current instant and an initial known state.The advantage is that the computed angle variation is not affected by magnetic fields in metallic environments.But the main drawback of this procedure is that angular velocity measurement is only reliable over short intervals of time (just a few seconds).This happens because of the inherent error.When the angle variations are computed by integrating the angular velocity measurement, the degree of error increases.In the linear velocity and displacement calculation, this was not a problem because the values were corrected when the foot was stationary.The same procedure is not feasible here, because the foot can rotate when it is on the floor, so it would not be appropriate to assume that the angular velocity at this phase is null.

A. Outdoor tests
The outdoor tests are characterized by the reliability of the measurements obtained through the integrated compass of the sensor.
Test 1: In this test, a rectangular trajectory of about 30 m in length is covered Both trajectory determination methods (gyroscope and compass measurements) are compared.The results of this comparison are shown in (Fig. 9).The exact result has not been achieved in either the first nor the second case, as the trajectory was not closed.However, the result shows a higher accuracy in the compass test.The proximity of surrounding metals, such as cars or handrails may have influenced this.The error percentage versus traveled distance is: Test 2: In this test, the distance has been increased to 90m.The trajectory is rectangular, as in the previous test, and the comparison of both methods is shown in (Fig. 10).
The trajectory followed by the sensor, according to the angle given by the compass, is quite similar to the expected one.This is due to the absence of metallic environments which disturb the measurement.In the case of the gyroscope, once again, the long distance has meant that the result was affected by the presence of an accumulated error, the point where the trajectory turns 90 degrees being significative.
• Gyroscope error: ŶŹ % ˭ 7 Ŷ% źŷ • Compass error: Ŵ % ˭ 7 ŵ Ŵź Test 3: In this test, a block of 680m long has been covered.Only the trajectory computed by the angle given by the compass has been represented.The trajectory obtained according to the gyroscope will be wrong, due to the long distance traveled and the accumulated error.The trajectory has been superimposed over a satellite image obtained from Google Earth.The result is shown in (Fig. 11).
The trajectory was not closed.This means that an error is present.However, this error, in comparison with the distance traveled, is acceptable.
• Compass error: ŵŹ ŻŹ ˭ 7 Ŷ ŷŵ Indoor tests There will be two types of indoor test.Those done in places with metallic objects around and those without the presence of such objects.
Test 4: The trajectory followed in this test is a square of about 20 meters long in an environment where metals and computer equipment are present (Fig. 12).
The results are shown in (Fig. 13).In this case, the computed trajectory using the angle determined by the compass is far from the expected square.This is because, in the trajectory followed in the test, multiple elements that might distort the measurement of the compass, such as metal gates and computer equipment, have been crossed or passed around.So in this case, it is hoped that the measurement of the gyroscope is more reliable as it is not affected by magnetic fields.Moreover, the short distance traveled means that the error does not affect it disproportionately.
• Gyroscope error: Ŷ ŵ˭ 7 % ŵ% • Compass error: ŷ Ż˭ 7 ŵź Ŷ% Test 5: In this test, a straight corridor is covered.The tester goes to the end of the corridor, turns 180 degrees and returns to the starting point.The distance traveled is about 30 m. (Fig. 14).
The test was done in an indoor environment characterized by the lack of metallic objects around the sensor.The trajectory followed is shown in (Fig 15) In this case, the measurement of the compass has been reliable even in an indoor environment.The result was predictable because, as mentioned earlier, the scenario was favorable.This is due to the lack of elements that distort the measurement (metallic doors, computers, loudspeaker magnets ...).By contrast, the gyroscope's angle measurement has not led to the expected results, due to the accumulated error, although the trajectory's representation in the first 15 meters is the expected one.The biggest error occurred on the 180-degree turn in mid trajectory.

B. Test at different heights
This test aimed to show how the sensor works when it describes a 3-dimensional trajectory.This trajectory not only belongs to the XY plane.It also describes variations in height, such as movements between different floors in a building.
Test 6: In this test, an indoor staircase of 5m in height was climbed.The staircase has two flights and a thick metallic handrail, as shown in (Fig. 16).
Both trajectories, obtained according to the accelerometer and the barometer, are shown in (Fig. 17    The XY trajectory is affected by the proximity of the handrails, which reduces the accuracy of the compass.In the XZ plane, the height obtained by both methods is quite similar.The computed signal obtained according to the double integration of z-axis acceleration shows a smoother evolution.This signal shows the movement described by the foot in a precise way.However, this method has attached an accumulated error, typically inherent in accelerometers, and another error due to the difficulty of subtracting the gravity acceleration from the accelerometer's measurements.On the other hand, the signal obtained from the barometer is rough, and has a slower response time.However, the advantage of this sensor is the lack of accumulated error in all measurements.Therefore, the variation in height will be sufficiently precise to differentiate jumps in the sensor's measurements to decide on which floor inside a building the person is.

IV. CONCLUSION
The aim of this work has been the research and development of a system that will enable personal navigation in areas where the GPS signal is compromised and, at the same time, will allow indoor navigation.The system is designed to cover three points: − Ability to obtain a better estimate of a pedestrian's position in real time.
− 3D location of the user in a building (being able to discern the floor where the user is located in a building with several floors).
− To achieve a continuous transition between outdoor and indoor areas.
The method developed for the estimation of the pedestrian's movement starts from the idea of the correction of acceleration measurements during the stance phase (the one in which the sole is on the ground), an idea which was proposed previously by other authors.A number of improvements have been done in this respect.
One is the development of a filter which will allow us to determine if the foot is on the ground or in movement with a higher accuracy.While other authors just correct measures at the low angular velocity point, this filter is able to identify the start and the end of the stance phase and consequently the acceleration measurement correction is done in the whole period.The stance phase's length depends on the walking speed.
The MTi/MTi-G sensor provides the possibility of working with highly reliable measurements.Furthermore, it provides the possibility of using calibrated and non calibrated measurements.The calibrated ones are corrected by an Xsens own Kalman filter to achieve higher accuracy.
A barometer is used in the test for different heights.When the global Z-axis acceleration is integrated twice, the problem of the accumulated error is present.It is not possible to subtract the acceleration due to gravity with a high accuracy as the conversion from local coordinates to global ones is not perfect at all.This leads to an accumulated error, especially over long distances.
The sensor integrates a compass and a gyroscope.This means the heading calculation can be done in two ways, as mentioned before.On the one hand, compass measurements, and on the other hand, gyroscope measurements.Moreover, MTi has a high accuracy, about a thousandth of all measurements.
Looking at the results obtained, even over long distances, the accuracy of the trajectory estimation has been demonstrated.Nevertheless, there are issues that should be improved in order to achieve a higher reliability in the estimation of trajectories.In future work, these issues will hopefully be developed: 1) Study of surrounding magnetic fields in order to estimate the reliability of the compass in the trajectory computation.If the reliability is not verified, gyroscope measurements will be used.2) Comparison between compass and gyroscope measurements to detect wrong behaviors in either, and the development of a Kalman filter which integrates both measurements.3) Integration of the Inertial Unit with a GPS/AGPS system.When a GPS measurement is available, the position estimated by the IMU will be updated in order to eliminate the accumulated error.4) To increase the accuracy when the gravity acceleration value is subtracted from accelerometer measurements.The presence of this value, or a residual part of it, will lead to a wrong estimation of velocity and position.5) Development of a voice-system which allows pedestrians to interact with it in a natural way.The user will be able to help the navigation system by using his/her voice, giving clues like turning left, going straight on… or setting landmarks (door, window…), which allows the position to be estimated in the case of passing through the same place again.6) Use of computer vision to recognize patterns such as doors, stairs, windows…will make an environment simulation (using SLAM) possible with landmarks which allow the position to be estimated in the case of passing through the same place again.
V. APPLICATIONS The navigation system is focused on the following applications: • To achieve a precise location of soldiers indoors, in urban canyons or places under dense foliage … • Location of civilians in commercial buildings, finding departments in universities… • Service based location, as tourist guides in museums.
• Navigation system for blind people.
• Applications for public institutions: tracking the position of firefighters, police officers or to recognize different rooms inside a particular building…

Fig. 5 :
Fig. 5: a) time spent in every step phase.b) Linear speed representation for each step.Without correction (red line) and corrected (black line).

Fig. 8 :
Fig. 8: a) Global x-axis acceleration.b) Obtained and corrected speed from the acceleration shown in (Fig.8-a).

Fig. 11 :
Fig. 11: Trajectory followed by the sensor in the XY plane.

Fig. 13 :
Fig.13: Trajectory followed by the sensor in the XY plane.

Fig. 9 :
Fig. 9: Trajectory followed by the sensor in the XY plane.

Fig. 15 :
Fig. 15: Trajectory followed by the sensor in the XY plane according to the compass and the gyroscope.

Fig. 14 :
Fig. 14: Corridor without surroundig metallic objects Fig. 17: a) Trajectory followed by the sensor in XZ plane according to the double integered z-axis acceleration.b) Trajectory followed by the sensor in XZ plane according the measurement given by the barometer.
Fig. 17: a) Trajectory followed by the sensor in XZ plane according to the double integered z-axis acceleration.b) Trajectory followed by the sensor in XZ plane according the measurement given by the barometer.