Keywords

1 Introduction

People are more and more concerned about their precise location information, for the purpose of positioning and navigation in daily life. GNSS, as an effective way of outdoor positioning, has become a necessary tool for traveling. Developed systems include global position system (GPS) of USA, GLONASS of Russia, BeiDou navigation satellite system of China, and Galileo system of Europe. Besides, combination of these positioning systems will also enhance the positioning accuracy.

Unfortunately, for an indoor mobile device, the satellite signal will be disrupted or blocked. Consequently, the device will be located with poor accuracy, or even unable to be located [1]. Meanwhile, indoor positioning is highly desirable since 70% of daily life is indoors. Several indoor positioning technologies have emerged, such as infrared-based positioning, ultra-wideband (UWB), radio frequency identification (RFID) positioning, and WIFI, most of which require modification of existing equipment or additional equipment, and are too costly to be used in large areas [2, 3]. With the development of wireless networks, a large amount of WIFI access points (APs) have been installed, which create a convenient condition for WIFI positioning. In addition to the good availability, a unique advantage of WIFI positioning technology is that WIFI chips have been equipped in most kinds of mobile devices. WIFI positioning systems based on the fingerprint method have been developed with accuracy between 1–5.4 m [4, 5].

Even though a sequence of technologies has been developed and infrastructures have been constructed, none of them are prospective to be accurate and efficient in both indoor and outdoor scenarios [6]. Thus, in order to provide effective location services for mobile users at anytime and anywhere, different technologies should be combined to supply an adaptive and dynamic solution, which can perform the handover between different technologies and adopt the best one available based on the environment together with the user requirements [4, 7].

The aim of this paper is to investigate the infrastructure of a seamless positioning system used in the urban region. We propose a seamless positioning system based on the GNSS, WIFI and PDR technologies. Detailed modules and self-management processes, including the signaling for communication between different modules, are discussed.

The remainder of this paper is organized as follows. After drawing state of the art in Sect. 2, we propose a hybrid positioning system in Sect. 3 followed by a handover algorithm in Sect. 4. Section 5 concerns the indoor and semi-outdoor navigation approach. Experimental and simulation results are detained in Sect. 6 and a conclusion is given in Sect. 7.

2 State of the Art

As aforementioned, most of studies on positioning have been performed for indoor and outdoor scenarios separately. Only a little attention has been paid to the seamless positioning for both scenarios.

Existing approaches include independent positioning technologies, such as ray tracing method [8], and combination of different technologies, such as GSM assisted GPS. LACB, a navigation prototype, is demonstrated in [9] to be capable of seamless outdoor-indoor navigation using RFID, WLAN, GPS, GSM, and Bluetooth. The combination of positioning systems, including satellite, UWB, RFID, and inertial measurement unit (IMU), is proposed for reliable positioning in [10,11,12].

In the combined systems above, not only different technologies are used to obtain positioning results, but also information fusion is used as the mobile devices move, such as Monte Carlo localization [13] for fusion of different sensory data and KF [14] for fusing WLAN, Bluetooth, and highly sensitive GPS positioning results with accelerometer. Moreover, some systems need modification on the device or additional equipment [15,16,17], which is difficult for mass market application.

On the other hand, an effective handover algorithm between different technologies is quite important in the seamless system, which has been thoroughly researched. In [18], the method of combining GPS and WIFI networks is put forward to achieve seamless positioning and navigation, with the switching strategy according to GPS satellite number, WIFI signal number and geometric dilution of precision (GDOP) value. For environment matching, a weighted sum algorithm and a zone identification method based on media access control (MAC) address are introduced for system selection in [19]. In [20], key aspects of the seamless handover between outdoor and indoor positioning in StreamSpain are addressed. Result of GPS is superior to that of WIFI if GPS reports position every second out of 5 s. In addition, the user can switch the system from an outdoor to an indoor environment with only a simple vocal command [21]. Most of the existing positioning handover algorithms require the GNSS and WIFI modules are always working, which is power-consuming.

3 Seamless Positioning System

The seamless system with superior property selects the proper positioning technology to provide location information in both indoor and outdoor scenarios. Besides, in order to minimize power consumption, the switching state of positioning modules, including the GNSS module and WIFI module, should indicate a corresponding technology and environment.

The system has the ability to run in both the manual and non-manual mode. While the environment information can be imported directly by the user for positioning module and technology choosing, the proposed scenario-adaptive architecture is in charge of seamless positioning in the non-manual mode.

To realize this, a new scenario detection module is proposed, which obtains changes of the environment and triggers the handover between different positioning modules and technologies. The proposed architecture could be categorized into five layers: sensor, algorithm, hardware, data, and application, denoted by L1 to L5, respectively (shown in Fig. 1).

Fig. 1.
figure 1

Architecture of the seamless positioning system

As the sensor layer, L1 consists of three modules, the user requirement module, the scenario module, and the state module. According to the user requirement, the best technology available should be chosen in terms of cost, processing time, and accuracy. When the scenario module detects an environmental change, a flag indicated handover will be sent to the handover module. Additionally, the motion state classification is performed by the state module to provide extra information for determining the update rate and improving the navigation performance [22].

L2 is the algorithm layer. All candidate technologies used for positioning are included in this layer, such as the GNSS positioning, WIFI fingerprint, PDR and so on. L3 is the hardware layer, which opens or closes the GNSS or WIFI modules according to the instruction from the handover modules Data collected from L3 will be processed for positioning in data layer: L4, by positioning algorithms and data fusion methods.

Afterwards, the location of the interested target will be showed on the map or used for other LBS applications in the application layer: L5.

To realize the self-management of the system, each layer should have the ability to exchange information with each other. A set of communication signaling based on the above architecture is proposed for applications. The signaling between the first five layers is shown in Fig. 2 and the detail parameters are as follows:

Fig. 2.
figure 2

Signaling structure

figure a

The signaling S4 is used as a feedback function to indicate whether collected data of the selected positioning technology is available or not. If the GPS_data from S3 only contains information from less than four satellites or the GDOP exceeds the required threshold, the parameter GNSS_data_flag would be false. Otherwise, it is set as true. In addition, the parameter WIFI_data_flag is determined by the comparison between the AP set measured online and the WIFI database stored in the server, which is composed by the fingerprint samples collected offline. The signaling S5 is used to transmit the WIFI data to the server for positioning calculation, when the WIFI fingerprint method is chosen. The positioning result will be contained in signaling S6.

4 Handover Algorithm

An autonomic, fast, and effective handover algorithm between different technologies is crucial for the seamless positioning system. Most available switching strategies require that the hardware of different technologies is always open to detect the availability of data at the cost of large power consumption of mobile devices [18,19,20,21]. Here, we propose an environment adaptation handover algorithm, which can perform the handover intelligently based on the information of environmental change obtained by the scenario module.

4.1 Scenario Detector and Handover Requirement

The basic premise of the proposed algorithm is an accurate and efficient scenario detector. Existing methods for detection of indoor and outdoor environment are mostly based on the image recognition technology, which is too complicated to be used in mobile devices.

Light detectors are equipped in almost all mobile devices to adjust the lightness of screens. It has been shown in [23], by monitoring the light sensor, the strength of base stations and the measurement of magnetization, IODetector achieves a high accuracy rate of distinguishing indoor and outdoor scenarios. Because the intensity of sunlight within the visible spectrum is normally much higher than that from ordinary lighting lamps, the light intensity inside buildings is typically lower than that in either outdoor or semi-outdoor scenarios even in cloudy or rainy days. However, when a mobile device in the pocket or hold by hand is passed through areas around indoor windows, a miscarriage of justice might happen. Moreover, as environment changes, it becomes difficult to determine the detection threshold since change of cellular signal strength and magnetic flux can provide very limited help.

When a mobile device is in the outside and close to a building, the signal from APs both indoors and nearby environment can be received. If several received APs are not included in the offline WIFI database of the first floor of the building, the mobile device will be confirmed out of the building to a great extent.

Consequently, we consider using the matching of WIFI AP set together with the light detector to make a distinction between indoor and outdoor scenarios. Furthermore, we prefer to detect change of environment rather than the environment itself, as it is much easier and more accurate.

Let P be the matching degree between the detected AP set and that in the database

$$ P = \sum\limits_{i = 1}^{N} {t_{{AP_{i} }} } \quad \quad t_{{AP_{i} }} = \left\{ {\begin{array}{*{20}c} {1\;\;\;\;if\;AP \in {\Theta }} \\ { - b\;\;if\;AP \notin \Theta } \\ \end{array} } \right. $$
(1)

with \( \Theta \) the AP set in the database and \( t_{{AP_{i} }} \) the matching degree of each AP. Here b is the penalty factor whose value increases as the number of all APs in the area increases, with the typical value {2, 4}.

The pseudocode of detecting scenario change is as follows:

Assume the existing light intensity is \( L_{0} \) and AP matching degree is \( p_{0} \). The following judgments will be processed after each time increment \( T_{0} \) with \( T_{total} \) the total time.

The proximity sensor firstly checks whether the light sensor is available for detection or not. If not, the information from light sensor (\( \Delta L_{t} = \left| {L_{t + 1} - L_{t} } \right| \)) will not be considered.

figure b

As the detection of light intensity is very simple and accurate in some specific scenarios, the light detector is used as the main factor. Then the AP set matching algorithm is used to confirm the environment change especially in the building with large windows or nighttime scenario. To decrease the communication between the device and database, the AP set indoor \( \Theta \) should be downloaded and stored in advance.

If the mobile device is inside of the building, the WIFI module is always open for indoor positioning and AP collection matching. On the other hand, when the device is in outside environment, the WIFI module would be switched on in the semi-outdoor area once the GNSS signal is not available. So the AP set matching for scenario change detection works well without extra power consumption from the WIFI module.

4.2 Handover Procedure

When the seamless positioning system initializes for the first response, if the user imports the information of indoors or outdoors to the system as manual mode, only the proper positioning module will be powered on. On the other hand, the system processes in the non-manual mode will execute and both GNSS and WIFI modules are powered on. After the system collects GNSS data and WIFI signal strength, the proper positioning technology module is chosen depending on their availability, with another one closed. The cellular network positioning can serve as a supplement in the case neither of the above two are available. Moreover, the A-GNSS technology is adopted to reduce the first response time if possible.

After initialization, the scenario module is used to monitor the environmental change. The handover module is then in charge of all the procedures related to the technology switching as illustrated in Fig. 3.

Fig. 3.
figure 3

Handover procedure

The handover_flag is sent out by the scenario module or the user requirement, and the handover module will be aware of the current technology from L2. Meanwhile, the data analysis result WIFI_data_flag or GNSS_data_flag from L4 will confirm the necessity of switching. The WIFI_data_flag is obtained based on the AP matching degree, while the GNSS_data_flag is obtained by the number of satellites detected.

Then, the PDR technology is used and the positioning technology management module will choose the candidate technology and asks the hardware management module to turn on the related modules in L3. If the measurement in L4 indicates the candidate technology is effective, the handover module will send out a confirmation signaling to L2; Otherwise, PDR or other reserved technologies will be selected. At last, the positioning technology module associated to the previous technology will be turned off.

As the stage of checking the availability of both present positioning technology and the candidate positioning method by the measurement exists, the wrong handover indication from the scenario detector will hardly impact the seamless system. For example, if the GNSS measurement can still works for the positioning, the handover would be stopped by the handover module.

4.3 Positioning Ping-Pang Handover Issues

The above handover procedure could perform technology switching effectively and provide location information seamlessly. However, if a user is walking along a large glass window or a street between high buildings, the GNSS technology may be unavailable frequently. Thus, handover procedures between GNSS and WIFI functions will execute repeatedly, which is called positioning Ping-Pang handover. Three typical cases of positioning Ping-Pang handover are as follows.

As shown in Fig. 4(a), a mobile device moves into the building from outside and then moves out quickly. Once the handover from GNSS to WIFI is completed, the handover from WIFI to GNSS should start right after the device moves out. If the related module is powered off after the handover, the operation of switching on and off will be too much in a short period. The same situation is in case (b). When the device is moving along the street between high buildings (case (c)), the GNSS technology will be unavailable momently and the operation on GNSS module will be too much.

Fig. 4.
figure 4

Ping-Pang handover scenarios

To avoid the frequent switching, two timekeepers are employed. The first one records the working time of current environment, denoted by T1, and the second one indicates the unavailable duration of the former technology, denoted by T2. Only if T1 and T2 satisfy certain thresholds (30 s used in the experiments), the former positioning module would be powered off.

According to the proposed approach, both GNSS and WIFI modules are online for continuous operation over complex scenarios, with PDR positioning technology as backup. The number of positioning handover will be greatly reduced and the seamless position system will run more effectively.

5 Seamless Positioning

Besides indoor and outdoor scenarios, there exist semi-outdoor regions, where the GNSS signals are not available with high SNR and the WIFI fingerprint database is not exit. Seamless positioning can be achieved by taking the three scenarios into account.

5.1 Outdoor Positioning

GNSS has been developed for many years, and is the simplest and most precise method for outdoor positioning. It is widely equipped in smart phone or mobile devices. GNSS receiver calculates the real time positioning information through obtaining, tracking navigation signals with multiple channels each for one satellite. Its update rate could be set as one Hz or more.

5.2 Indoor Positioning

Nowadays, WIFI APs are popular and accessible in many public places, such as airports, offices, hotels. These APs are used for WIFI fingerprinting positioning technology, containing offline and online phases. In the offline phase, the positioning region is divided into many grids and fingerprint samples of each grid are collected to form a radio map. Information stored in this map includes the signal strength, and the number of detected APs, together with the location of grids. In the online phase, the real time data is collected and compared with samples in the radio map. The grid with the highest similarity is considered as the location of the mobile device. Although the technology needs a lot of time for collected samples, the matching algorithm has been well developed, based on interference eliminating and machining learning.

In indoor environment, the continuous positioning has drift result for the time-variant WIFI channel and signal strength. To overcome this problem, a new tracking method: Coherent matching (CM) method is proposed, which is based on several consecutive strength vectors received in the continuous receiving. Take the case of two continuous samples for example. Let \( S_{{T_{1} }} \) and \( S_{{T_{2} }} \) be two coherent vectors during the movement of a mobile device, and \( S_{{T_{1} T_{2} }} \) be the augmented vector which is the combination of these two vectors.

$$ S_{{T_{1} }} = (rssi_{11} ,rssi_{12} , \ldots ,rssi_{1n} ) $$
(2)
$$ S_{{T_{2} }} = (rssi_{21} ,rssi_{22} , \ldots ,rssi_{2n} ) $$
(3)
$$ S_{{T_{1} T_{2} }} = (rssi_{11} ,rssi_{12} , \ldots ,rssi_{1n} ,rssi_{21} ,rssi_{22} , \ldots ,rssi_{2n} ) $$
(4)

T1 and T2 are time when a vector is collected and n is the number of the APs.

Due to limitations of network hardware and software processing, the time period to receive each signal strength vector is almost 1.4 s [24]. The online interval for information collection is \( T_{{\text{int} erval}} \), which is assumed as 2 s to ensure real-time tracking.

$$ {\text{L}} > T_{{\text{int} erval}} \times V_{0} $$
(5)

Because the normal speed of a walking person \( V_{0} \) is 0.6 m/s, the inequality (5) above is satisfied when the grid size L ≥ 1.2 m. After movement of the mobile device over interval \( T_{{\text{int} erval}} \), only two cases could happen. The device either stays in the same grid, or moves to a next grid.

Since the positioning region has been equipped with grids for offline collection, the spatial continuity can be used to change fingerprints of the two adjacent grids into a series of combined vectors. The online vector \( S_{{T_{1} T_{2} }} \) is then matched with combined database to obtain the positioning result.

As time evolves, change of location from one grid to another can be treated as a dynamic state changing process. To analyze its series pattern, the CHMM is adopted, which models a Markov process with parameters as a stochastic finite state machine. In this situation, the underlying process is the user’s sequential changes in location, with the hidden internal states, and measured signal strengths are observables. More precisely, we define a CHMM on the location-state space \( \chi \) and the observation space \( \phi \). The CHMM consists of a radio map \( \lambda = \{ P(s_{i} |l_{j} )\} \), a location-state transition matrix \( A = \{ P(l_{i} |l_{j} )\} \), and an initial state distribution \( \pi = \{ P(l_{i} )\} \). The radio map \( \lambda \) is a set of conditional probabilities which give the likelihood of obtaining measured signal strength. The transition matrix A indicates the possible movements in the state space. Consider the case that the mobility of the device is limited and it can only move to adjacent grids. For example, a mobile device can only move in the hallway but not across the wall. Thus, only a few elements in matrix A are nonzero. Moreover, the transition matrix \( A \) should be trained by a series of labeled traces with the Baum-Welch method [25].

Given a coherent observation sequence \( V_{T1T2} \), the well-known Viterbi algorithm [26] can be used to infer the most possible hidden state sequence in CHMM, which is a sequence of changes of the user’s location. Detailed steps are as follows:

$$ Initialization:\begin{array}{*{20}c} {\delta_{1} (i) = \pi_{i} b_{i} (S_{1} ),\;\;\;\; 1\; \le \;{\text{i}}\; \le \;{\text{N}}} \\ {\phi_{1} (i) = 0,\;\;\; 1\; \le \;{\text{i}}\; \le \;{\text{N}}} \\ \end{array} $$
(6)
$$ Recursion:\begin{array}{*{20}c} {\delta_{t} (j) = \mathop {\hbox{max} }\limits_{1 \le i \le N} [\delta_{t - 1} (i)a_{ij} ]b_{j} (S_{i} ),\;t = 2 ,1\; \le \;j\; \le \;N} \\ {\phi_{t} (j) = \mathop {\arg \hbox{max} }\limits_{1 \le i \le N} [\delta_{t - 1} (i)a_{ij} ],\;t = 2,1\; \le \;j\; \le \;N} \\ \end{array} $$
(7)
$$ Finalization:\;\begin{array}{*{20}c} {p^{*} = \mathop {\hbox{max} }\limits_{1 \le i \le N} [\delta_{T} (i)]} \\ {q_{T}^{*} = \mathop {\arg \hbox{max} }\limits_{1 \le i \le N} [\delta_{T} (i)]} \\ \end{array} $$
(8)
$$ Sequence\,solving:\,q_{t}^{*} = \phi_{t + 1} (q_{t + 1}^{*} ),\;\;\;t = 2,1 $$
(9)

Here \( \delta_{T} (i) \) is the maximum value at time T, \( b_{i} (S_{i} ) \) is the probability of \( S_{j} \) in location i, \( a_{ij} \) is the transition probability from location i to location j, and \( q_{T}^{ * } \) is the obtained sequence. \( p^{ * } \) and \( \phi_{t} (i) \) are intermediate variables.

5.3 Semi-outdoor Positioning

When a positioning service is requested in the semi-outdoor region for initialization, the positioning result can only be provided by the positioning based on cellular network. Positioning results will not be updated until the device moves to indoor or outdoor scenarios.

Besides, the semi-outdoor region plays an important role as an intermediate connection for the seamless indoor and outdoor. With the PDR technology, the user’s location can be easily updated over time, since accelerometers and electronic compasses are equipped in most mobile devices [27].

In order to explain the above process, let us take a route from one building to a nearby bus station for example. After the WIFI technology directs the user to the exit of the building, the positioning technology will switch to the PDR technology and the location of the exit is consider as the starting point. Through the acceleration sensor and magnetic sensor, the step number and heading can be computed separately. Displacement is then calculated by multiplying step number and step length. Adding the last position information to the displacement produces the current position.

However, results from accelerometers and electronic compasses in mobile devices are highly noisy. The good news is that the dimension of semi-outdoor regions is always small and the time duration is short. A simplified PDR technology is proposed to solve the problem and the detection of step number and step length is avoided. Firstly, a fairly accurate walking speed can be obtained when the WIFI or GNSS technology works effectively. Then, an initial segment is obtained by the time duration of location updating \( T_{update} \) multiplying the average velocity \( v \). After a set of segments perform the angular deflection obtained from the magnetic sensor, they are connected from one point to another. If the component of accelerometer measurement in Z axis indicates no change in the body’s center of gravity, the mobile device is considered as static in the updating interval and no segment will be added [6]. Thus, the tracing route will be extended periodically until another accurate positioning technology is available to replace this method.

$$ \bar{v} = s/t $$
(10)
$$ (x_{i} ,y_{i} ) = (x_{i - 1} ,y_{i - 1} ) + \bar{v} \times T_{update} \times (\cos (\alpha ),\sin (\alpha )) $$
(11)

where \( (x_{i - 1} ,y_{i - 1} ) \) and \( (x_{i} ,y_{i} ) \) are the previous and current locations, respectively. \( \alpha \) is obtained from the measurement of the compass and compensated by the difference between the geomagnetic south pole and geographic north pole.

6 Experimental Evaluation

To evaluate proposed algorithms and modules in the system, both experiments and simulations are performed for the scenario detection module, the handover module, and the indoor tracing algorithm. The experiment is taken out in the New Main Building block E in Beihang University (shown in Fig. 5), with more the 20 APs around. The area in the first floor is about 12 m * 8 m, with a large glass door. During the offline phase, 50 RSS time samples are collected for each of the 40 RPs. The RPs are evenly distributed with an average grid spacing of 2 m.

Fig. 5.
figure 5

Experiment scenario

Firstly, we collect the AP set \( \Re_{\text{indoor}} \), \( \Re_{\text{semi - out}} \) and \( \Re_{\text{outdoor}} \) for indoor, semi-outdoor and outdoor scenarios, respectively. Then, a series of samples collected from the whole area are compared with the AP set from different scenarios. As shown in Figs. 6 and 7, each cylindrical represent the number of same APs in one AP set sample. Outdoor samples match \( \Re_{\text{outdoor}} \) to a high extent, and indoor samples match \( \Re_{\text{indoor}} \) better, which provides a good foundation for the scenario detected algorithm.

Fig. 6.
figure 6

Number of matched APs with \( \Re_{\text{outdoor}} \)

Fig. 7.
figure 7

Number of matched APs with \( \Re_{\text{indoor}} \)

In practice, only \( \Re_{\text{indoor}} \) is collected and stored in the fingerprint database and the proposed \( {\text{P}} \) is the matching degree between the detected AP set and those in the database. When the mobile device move from indoor to outdoor, the matching result is obtained in Fig. 8 and the decreasing trend becomes obvious as b changes between {2, 4}.

Fig. 8.
figure 8

Matching degrees with different b value

In Fig. 9, the change of light intensity is shown as the mobile device moves from outdoor to indoor. From the curve, the transition point clearly indicates the change of the scenario. The performance of scenario detection algorithms is evaluated through 20 traces walking in and out the building in the daytime and nighttime, compared with the IODetector used in [18] (Table 1).

Fig. 9.
figure 9

Light intensity from outdoor to indoor

Table 1. Detection accuracy of the scenario detector

The proposed indoor tracing algorithm (CHMM) is evaluated in the following and experimental results are compared with the tradition probability positioning method, which adopts the maximum likelihood probability algorithm together with the Kalman filter. As shown in Figs. 10 and 11, the proposed algorithms achieve better performances in location coordinates, with the average positioning error improved from 1.45 m to 0.98 m.

Fig. 10.
figure 10

Comparisons of location error computed by different algorithms

Fig. 11.
figure 11

Comparisons of tracing error

The biggest improvement for the proposed seamless positioning framework is the less battery consumption compared to the former systems, in which the WIFI and GNSS devices are always on. As shown in Fig. 12, about 37% battery is saved due to the handover algorithm proposed in this paper.

Fig. 12.
figure 12

Battery consumption

7 Conclusion

We present a seamless positioning and navigation system for inferring indoor and outdoor user location information by means of WIFI, GNSS and PDR positioning technologies. It provides a complete organic system, including the overall hierarchical structure, the environment adaptation handover algorithm, and the positioning and navigation algorithm used in different area, especially in the building and semi-outdoor region. In such a way, various optimization technologies can be seamlessly implemented with respect to the scenario detection module and switching of the related hardware. These provide a fast handover between using the best available positioning technology and minimizing the power consumption associated with the usage of mobile devices.

A careful evaluation of the proposed system in more general situations will of great interest, including different environment and users’ speeds of motion, building layer or altitude information, which will provide a fully operational 3D positioning picture. Another challenging problem is to combine fusion technologies from indoor and outdoor maps for seamless switching and providing excellent user experiences since single outdoor or indoor maps can only provide a coarse granularity positioning and navigation results within limited regions.