A NEW UBIQUITOUS-BASED INDOOR POSITIONING SYSTEM WITH MINIMUM EXTRA HARDWARE USING SMART PHONES

Knowing the position has been an ambition in many areas such as science, military, business, etc. GPS was the realization of this wish in 1970s. Technological advances such as ubiquitous computing, as a conquering perspective, requires any service to work for any user, any place, anytime, and via any network. As GPS cannot provide services in indoor environments, many scientists began to develop indoor positioning systems (IPS). Smart phones penetrating our everyday lives were a great platform to host IPS applications. Sensors in smart phones were another big motive to develop IPS applications. Many researchers have been working on the topic developing various applications. However, the applications introduced lack simplicity. In other words, they need to install a step counter or smart phone on the ankle, which makes it awkward and inapplicable in many situations. In the current study, a new IPS methodology is introduced using only the usual embedded sensors in the smart phones. The robustness of this methodology cannot compete with those of the aforementioned approaches. The price paid for simplicity was decreasing robustness and complicating the methods and formulations. However, methods or tricks to harness the errors to an acceptable range are introduced as the future works.


INTRODUCTION
Ubiquitous computing has gained superior importance after two decades of its first introduction by Mark Weiser (Weiser, 1993).Other than variety of academic research, the topic is welcomed by the industry.It hasmore or lesspaved its way through our everyday lives.In some countries, like South Korea, ubiquitous technologies are so advanced that they are like coming from another planet for others.The strange terms heard these days such as smart home, smart TV, and ubiquitous classroom are among the ubiquitous advances.
Ubiquitous technology is an idealistic means to overcome boundaries.It is characterized by five "any"s namely: any user, anytime, anyplace, any service, and any network.It means that the technology should be available for any user at any place and any time through every network and service.
Stepping ubiquitous technologies in geospatial sciences triggered a huge revolution.Every discipline in GIS was forced to consider ubiquity.Positioning was among the many that benefited the idea the most.Geographic position of people is an important information that can be used in emergency situations, navigation, advertisements and many more (Parnandi et al., 2010).Global Positioning System (GPS) is a well-studied technology to provide geographic positions that is now an undetachable part of our lives.However, it fails to provide service in some situations such as indoors (Parnandi et al., 2010).Thus, positioning in indoor environments is a challenge in ubiquitous computing (Link et al., 2011).
Until the 1990's, technology has been a blocking factor for research about indoor positioning.A first attempt to design an indoor positioning system was made by Want et al (1992) in Xerox Research Park in Palo Alto.This basic system used the * Corresponding author.security badges of employees to locate them in the building (Loulier, 2011).
Recently, by the advances of smart phones, various sensors are being added to them day-by-day.Sensors such as accelerometer, gyroscope, and thermometer are among them.Many research have been conducted to use the embedded sensors of smart phones for indoor positioning.Constandache et al (2010) used the accelerometer and gyroscope to calculate the velocity and direction of movement.They recommended using this method as a complement to other methods.Hynes et al (2009) used the accelerometer to detect whether the user is standing or walking.Dekel and Schiller (2010) used the accelerometer to detect the steps of the user.Parnandi et al (2010) classified users' activities in classes such as standing, walking, climbing up or down the stairs, and moving in an elevator.Also Serra et al (2010) developed an application to position in an indoor environment using the accelerometer and compass of a smart phone.
In this research, a ubiquitous-based indoor positioning technique based on the available hardware of smart phones minimizing using external facilities is proposed.The technique is based on the accelerometer and gyroscope embedded in many smart phones.The initial point in the building is captured by GPS or by scanning a QR code on the building entrance.Furthermore, it is required to have a metric and topologic graph of the building and use map matching algorithms and scene space to alleviate the accuracy problem of the system.Using embedded sensors in smart phones has become popular (Loulier, 2011) and will continue to evolve as the sensors are improving both quantitatively and qualitatively.
The most fundamental difference between the current research with Ojeda and Borenstiein (2007), Parnandi et al (2010), Bebek et al (2010) and Nam (2011) is that their approach is based on installing a smart phone or step counter on the ankle of the user as shown in Figure 1.The smart phone, in this study, is held in the hands of the user and steps are counted by analyzing the accelerometer data.Then positioning is done by counting the steps, having the length of each step, and acquiring the direction by the gyroscope of the smart phone using dead reckoning method.

TITLE AND ABSTRACT BLOCK
a Equation ( 1) is the basis of positioning using dead reckoning method.
where X, Y are unknown current position, X 0 , Y 0 are initial points, l is the length of a step, and α is the azimuth of movement.
The positioning problem with smart phones is categorized into the following steps considering equation (1):  Counting the steps.


Having a reliable estimation of the step length and its variance.


Acquiring the direction of movement.
The first step in positioning provides an initial position  0 and  0 that can be achieved in two ways.If the user is outdoors, the last point acquired by GPS can be regarded as the initial position of the system.Also, QR codes can be used to provide the initial position for the system.The steps are counted and the direction is acquired from the gyroscope whenever a step is completed.
There are two approaches to estimate the length of a step.The easiest way implemented in many research is to provide a static number as the step length.To be more accurate, some researchers differentiated between men and women and provided two static step lengths for each (Parnandi et al 2010, Serra et al 2010).
The studies described above have oversimplified the problem.Considering a static number for every user cannot be effective in practice.Thus, a novel method is utilized in this study.Each user is required to go through an initialization phase.In this phase, users are required to walk outdoors, where GPS can provide location.The steps are counted and compared with the distance he/she has traversed and calculate an exact value for step length for each user.Also the variance of the step lengths can be extracted to better inform us about the pattern of his/her walking i.e. whether he/she walks in a uniform manner or not.Also, in case of user's willingness, he/she is requested to perform the procedure several times with different circumstances to train the system that will be discussed subsequently.
This positioning procedure used un this paper is accompanied by cumulative error for the following reasons:


The sensors embedded in the smart phones are based on MEMS1 technology and hence, they suffer greatly of imprecision.


Error occurring in every stage is carried to the next stage.The reason is that the current X and Y position is the initial X0 and Y0 (based on Equation 1) for the next step and the error is moved to next steps that is shown in Figure 2. The solid line is the actual path and the dash-dot one is recorded by the system.The more distant the user goes, the more is the error.In other words, the error propagates as the user proceeds.


The robustness of the procedure is low.Because many unforeseen activities of the user may bias the position.For example, shaking the smart phone, taking steps unequally, climbing up or down the stairs, walking laterally or semi-laterally, etc.
Although all these challenges exist, we have devised methods to overcome them or reduce their effect.

Detection of the Steps
To detect the steps, the three dimensional values for the accelerometer, gyroscope, and gravity were studied.Considering different circumstances, it was concluded that combining the accelerometer values along the y and z axes is the most appropriate case to detect steps.The combination of the accelerometer values along the y and z axes is shown in Equation 2.
where y and z are the accelerometer value along the y and z axes respectively and v is the combination value used to detect steps.
As shown in Figure 3, the z axis is perpendicular to the smart phone surface.The y axis is along the path the user is traversing.However, the x axis is perpendicular to the movement path.As the direction of movement is acquired using the gyroscope, the x axis is of no use to detect steps.An example of the log file of the determined value shown in Equation ( 2) is shown in Figure 4.
The log plot shows that the data suffers from noise.The noise has two causes as follows:


The sensor itself produces random noise.This fault was tested by placing the device on a fixed surface like a table and observed the noise that is shown in Figure 5a.
 Shaking the device also causes noise.Assume a user is holding the smart phone without walking.He / she may shake the device unintentionally as the hands may have some unnoticed movements as shown in Figure 5b.
Figure 2. The error drift added to the system in every step.
Figure 3. Three axes of the smart phone (Loulier, 2011) Considering the huge amount of bothering noise, a low-pass filter was used to suppress it.Having studied low-pass filters, butterworth low-pass filter was chosen among many others such as Chebyshev filter, elliptic filter, Bessel Filter, Gaussian filter, Linkwitz-Rilet filter, etc.
The idea behind this process is that walking consists of successive process of lifting one foot, moving it in the air along the moving path, and landing it.The landing of one foot is simultaneous with lifting the other.Hence, when we walk, either one of our feet is on the ground or both.Having a foot on the air usually takes less than a second and no atypical forces are applied to us.However, at the moment of landing the foot, we receive a shock from the floor in return of the force we exert to it based on Newton's third law of motion.Thus, the moments when the foot lands on the floor can be extracted using the accelerometer log plot.
To do so, the idea of thresholds (Serra et al 2010) was used in this research.Two values as the upper and the lower bounds were used.Using two values for threshold is necessary as some noise may have been remained even after the filtering process and thus causes imprecision in counting the steps.
A fluctuation pattern in the log file is considered a step, if:  There are two successive points where the diagram crosses the lower threshold called v1 and v2 respectively.


The diagram crosses the upper bound at least for two times between v1 and v2 as shown in Figure 6.
Steps being counted incorrectly using one threshold method are shown in Figure 7.As one can see, four steps have been taken, however, the one threshold method counts seven steps.11.5 was regarded as the upper threshold and 10.5 as the lower threshold based on various experiments with different data and different people.Finally, the real data using two thresholds method is shown in Figure 8.As one can see, the user has walked and stopped iteratively.The first phase of walking steps was counted 10, the second 11, and the third 10.The real numbers of steps were 9, 11 and 9 respectively.Although, it is obvious from the accelerometer log in Figure 8 that the user has walked differently in each phase i.e. walking normally, slowly, and jogging respectively.
The results show that using two threshold method produces more accurate estimation of steps discarding movements other that walking.However, these movements should not be too violent.Non-typical phone shaking affects the process of counting the steps that results in degrading the positioning.Since, the accuracy of the position is severely dependent on the accuracy of step counting process.
Figure 7. Steps being counted incorrectly when using one threshold.
Figure 8.Using two threshold method on real accelerometer data.

CONCLUSION AND FUTURE WORKS
A new method was introduced for indoor positioning using smart phones.However, the proposed approachunlike many other research in this fieldneither uses extra sensors such as step counters nor attaches the smart phones to the ankle to count the steps.A simple pattern matching algorithm was used utilizing two thresholds to detect steps in the accelerometer log.However, the approach lacks reliability as unconsidered activities may increase the positioning error such as shaking the device, lateral movement, moving with various step lengths, etc. GPS is an ideal tool to assess the step lengths systematically that will be implemented in the next phase.Also adaptive threshold can be a huge step forward through personalizing the system.Other activities mentioned before can also be detected by studying the accelerometer log file.Finally, using QR codes, scene space, and map matching algorithms can also be a remedy to improve the positioning accuracy without interfering hardware.Also, the results of the presented methodology shows that combining this approach with techniques such as map matching and space partitioning can improve the accuracy of the positioning process.However, calibrating the sensors is of the utmost importance that severely affects the accuracy.Furthermore, to stop the accumulating nature of the errors, QR codes are used.

Figure 1 .
Figure 1.Installing a smart phone on the ankle of the user to count the steps (Parnandi et al, 2010)

Figure 4 .
Figure 4.The plot of the log file of the value parameters calculated in Equation (2).

Figure 5 .
Figure 5.The plot of log file of (a) the smart phones lying on a table and (b) the smart phone being held in hand without walking