A WiFi-Based Weighted Screening Method for Indoor Positioning Systems

Past studies of WiFi-based indoor positioning systems (IPS) have mainly been divided into three types of positioning: proximity, trilateration, and scene analysis. This paper proposes a WiFi-based weighted screening method (WSM) to improve displacement error in trilateration. WSM is designed for part of pedestrian navigation in indoor environment which most likely use smart phone as the WiFi signal detector. Thus the less computational power consuming, irregular deploying position of APs and the irregular RSSI variation are all take into consideration when designing WSM. Experiment results show that this method performs better than conventional matrix method and the error correction algorithm, one trilateration in IPS.


Introduction
In wireless indoor positioning systems (IPS), because of the presence of numerous variables, such as structural complexity of the building itself, the influence of the indoor crowd, the coverage and stability of the wireless signal, and the accuracy and sensitivity of the positioning instrument when measure the wireless signal, it is difficult for any technological solutions to current problems in IPS to be comprehensive.Therefore, system performance can be analyzed in the following six directions [1]: • Accuracy: Accuracy measures the size of the gap between the actual observed position of a point (called observation point hereafter) and the position of the same point estimated by the IPS (called estimation point hereafter), also referred to as system estimation error.Common calculation methods involve estimation error averaging.In IPS, the system positioning performance is primarily based on the accuracy.• Precision: Precision is a measure of the size of the gap between the estimation points.An accurate cumulative distribution function (CDF) can be used to calculate the strengths and weaknesses of the precision; where the higher the concentration of the distribution curves, the higher the precision.The main factors affecting the precision include the stability of the signal source (transmitter) and the merits of the system positioning algorithm.• Complexity: Complexity is defined as the amount of computing time required for the positioning algorithm; i.e., the speed of real-time positioning.The lower the positioning complexity, the faster the locating rate.• Robustness: Good system robustness is such that when during the positioning process, even if one of the signal sources acts abnormally or cannot be received, the IPS can still perform normal positioning under a certain level of accuracy.• Scalability: Scalability is the range supported by the IPS, including signal coverage, geographical service area, and 2D/3D spatial positioning.• Cost: System construction costs include time consumed, money spent, or even the size, weight, and power consumption of hardware.They are all within the scope of consideration.
The six directions above show the core design ideas for the IPS.At present, most common IPS use a variety of wireless transmission technologies, such as WiFi [2][3][4][5][6], Bluetooth [7], infrared [8], radio frequency identification (RFID) [9], Cell-ID based signals [10], ultrasonic sensors [11], image recognition [12], and laser [13].Among these techniques, additional equipment is required for ultrasonic sensors and laser technologies and is too expensive.Due to the short coverage range of the Bluetooth, a large number of Bluetooth signal sources are required to cover the whole area of the indoor environment.The image recognition approach relies on high-speed and real-time computing to establish a database of a large number of image nodes for matching.Even though the Cell-ID approach has wider signal coverage and equipment penetration, in a complex indoor environment where signal strength is not related to the inverse of the square of the distance, it has difficulty in achieving signal coverage in indoor positioning.
In consideration of acceptable accuracy and instrument penetration, WiFi has gradually becomes a major wireless technology for IPS.IPS that uses WiFi has two main advantages.First, wireless network-based hardware environments have reached a ready-to-use level of penetration, without any need for new modifications or installations.Second, mobile devices with the IEEE 802.11WiFi connectivity function, such as laptop computers, PDAs, and smart phones, have become widespread.
WiFi-based positioning methods are currently divided into three main positioning principles: proximity, trilateration, and scene analysis.Proximity positioning uses the access point (AP) of the strongest received signal strength indication (RSSI) as the location as the estimated point.Such an algorithm is relatively simple; even though it has a fast positioning speed, its accuracy is low when compared to other methods.In general, positioning error is related to the density of AP provisioning.
The scene analysis positioning is divided into two stages.Wireless signal fingerprint is first sampled when the system is offline, which is then compared with signal data received by the observation point when the system is online.The advantage of this approach is that it can reduce multi-path problems [1].The sampling intensity from this method directly affects positioning accuracy.Thus, in the system setup process, more time is required for high-density sampling in an indoor environment.Another problem in this method is it has less robustness.When one or more signal sources act abnormally, the scene analysis method is prone to deduce a large error.Periodically fingerprint resampling is needed in the method in IPS.
The trilateration positioning method uses three or more APs to calculate distance using time differences in signal receptions or signal strength, which are then used to estimate the location of the user.They often include time of arrival (TOA), time difference of arrival (TDOA), angle of arrival (AOA), and the RSSI.TOA and TDOA are methods that use transmission speed and total time or the product of time differences of waves in space to calculate the distance from the signal source to the observation point.However, the disadvantage is that all APs must be synchronized.Any error in time will cause a huge error in distance.Collisions arising from a large number of user connections will also cause time error.Thus, this method is more applicable in CDMA-based systems.AOA is the use of the received signal angle at several different antennas to measure user location with an antenna array, which is not installed in a general mobile device.
The current WiFi system can only work with the RSSI method, which uses a wireless signal transmission attenuation model to calculate the distance from the observation point to the AP.The multi-path effect generated from wireless signals in an indoor environment has made it much more difficult for the trilateration method to achieve high-accuracy positioning, which results in failure to obtain acceptable levels of accuracy and precision.
Among these three positioning methods mentioned above in IPS, trilateration outperforms than others from the point of view of a composite indicator including accuracy, complexity, robustness, scalability, and cost.This paper proposes a weighted screening method (WSM) to improve estimated errors generated from current trilateration methods relative to actual locations using WiFi-based trilateration.The current IPS is expected to offer pedestrian navigation in indoor environment, and use potable smartphone to be signal detection device, which means that there is less computation capacity for IPS.If we want obtain the positioning result quickly, the algorithm for IPS should not spend too much time.Meanwhile, most smartphone which detect and report the value of RSSI in integer value and with the step scale of one dBm.It will result in a large estimation error when calculating distance from AP to the observation point using wireless signal attenuation model.The WSM is a low complexity algorithm which can relieve the use of smartphone computational resource.WSM also suit for IPS with inaccurate RSSI estimation.The rest of this paper is as follows: Sect. 2 describes the trilateration algorithm in detail, and Sect. 3 details the WSM.The experiment results of WSM are presented in the Sect.4. Concluding remarks are made in Sect. 5.

Trilateration
Trilateration is a method of calculating the position of observation points from the distance between the known positions of three reference points and the observation point; the basic concept of which is shown in Fig. 1.Trilateration was first used in global positioning systems (GPS).The principle behind trilateration positioning is to trace out a sphere using a line, represented by the distance between the signal source and the observation point, and a center point, represented by the signal source.The surface of the sphere represents the pseudo-range of the equivalent signal strength of a certain signal source, with observation points located at any point on the surface of the sphere.
If two spheres are to intersect at more than one point in a three-dimensional space, then the resulting intersection will be a circle.A third sphere must also intersect with the circle at a minimum of two points.If necessary, a fourth sphere can be used to determine which one of the points is an observation point.An example of this approach is the application of trilateration in GPS.Similarly, a pseudo-range in a two-dimensional space is also a circle, with two circles intersecting at a minimum of two points, and a third circle is used to determine the location of the observation point.
We have been proposed a method to reduce the signal space from 3-D to 2-D for IPS [16], so that a 2-D trilateration is usable in IPS.Using the basic definition of trilateration in two-dimensional space, we can set each of the three known reference points as the center of a circle, with the coordinates (m i , n i ).The distance between the reference point and the observation point (a, b) is set to be the radius r i , where i = 1, 2, 3.The simultaneous equation is as follows: These simultaneous equations are turned into matrices, and then simplified into the form x = A −1 b using Gaussian elimination to obtain the coordinates of the observation point: In trilateration, the distance between the observation point and a reference point (i.e., the position of APs) is obtained through inversion using the signal attenuation model.The positioning error would result from numerical errors on the inverse.The positional relationship between reference points also affects the accuracy of positioning.This is illustrated in Fig. 2 and stated as follows: The dilution of precision (DOP) coefficient (also called geometric dilution of precision, GDOP, which is to state how errors in the measurement will affect the final state estimation in GPS) can be used to calculate the influence that reference point positions have on accuracy, as shown in Fig. 2. In this figure, the error range cause by inversion generates distance error are indicated by gray area for each AP.The uncertainty in the estimated position is indicated by the insertion area of two gray concentric circles, i.e., the dark-gray area.In Fig. 2a, the position uncertainty is smaller than Fig. 2b (i.e., lower DOP).That is because in Fig. 2b, two APs are closer than Fig. 2a.Although the measurement uncertainty is the same, the position uncertainty is considerably larger than that in Fig. 2a, i.e., higher where P(d) represents the signal strength at distance d from the position of the transmitter; P(d 0 ) represents the signal strength at distance d 0 from the position of the transmitter, which is the distance, called the reference distance, at which the intensity of the signal's strength can be measured and recorded in advance; n is the channel attenuation coefficient; and OAF is the obstacles attenuation factor, which contains all the influence from the multi-path effects caused by internal barriers such as walls and partitions.In this model, the method for calculating OAF becomes a vital issue.In practical applications, this method needs to measure specific OAF value in each spatial position for increasing its positioning accuracy, while showing a larger amount of variation for environmental changes with slight differences, such as the positioning around a corner.Moradi et al. [5] proposed an error correction algorithm (ECA), which uses a trilateration matrix to estimate the maximum offset error δ E .In ECA, the radius estimation error is carried into the radius variation of the three circles, with a view of getting even closer to the distance length that the observation points should be able to calculate by matrix method.As depicted in Fig. 3, the ECA algorithm divides the situation with the different circles layout into four Fig. 3 Four intersecting situations for the three circles as proposed in the ECA study types.These situations are explained as follows: (1) Three circles intersect to each other, but not at the same point; (2) one of the three circles intersects with the other two circles that are at a certain distance from each other; (3) an arbitrary state in which any two of the three circles intersect, with the third circle at a certain distance away from the first two intersecting circles because of a radius that is either too small or too large; or (4) the three circles are separated either inside or outside of each other.
In situation 1, ECA takes three closest intersection points and obtains the average of their coordinates.In situation 2, ECA takes two closest intersection points and uses the center point between them as an estimation point.In Situation 3, ECA adds δ E /2 to the radius of the third smaller circle, or subtracts δ E /2 from the radius of the third larger circle before redrawing the circle in the expectation that the redrawn circles conform to situation 1.If it cannot, then the remaining two circles will be redrawn by expanding or subtracting the radius in the opposite direction.If Situation 1 still does not appear after undergoing these procedures, then the situation is beyond the level of precision that the ECA positioning system is capable of providing.In this case, the calculated estimation point is meaningless.Situation 4 involves adding or subtracting the radius by δ E /3, then redrawing the circle to recalculate the coordinates of the intersection points before taking the average of the three selected intersection points as their coordinates.

Weighted Screening Method
A study of GPS and positioning using code division multiple access (CDMA) [7] showed the major factor influencing the distance between the observation point and signal sources was the multi-path effect during non-line-of-sight (NLOS) signal transmission, after excluding the variance of instrument accuracy.The transmission time under this effect must be longer than that of a line-of-sight (LOS) transmission.Therefore, distances calculated by multiplying transmission time with the speed of light seem to be overestimated.Meanwhile, for the WiFi-based trilateration, the signal strength is not only affected by multiple paths in the environment, but also by obstacles between AP and observation point.Due to the OAF is only an approximately compensator for wireless attenuation model, calculations that convert signal strength into distance are also not entirely realistic.Consequently, they occasionally generate overestimation or underestimation, and the incorrect estimation will affect the calculation of Eq. 2 severely.Figure 4 shows the difference and effect between these two phenomena.In such circumstances, the desired estimation points may occur inside the overlapped area of the three circles, as shown or in other intersecting areas, as in Fig. 4, where r 1 denotes the distance from observation point to the AP, ε 1 and ε 2 are the supposed overestimation errors in two individual observations.According to Eq. 2, we will obtain the estimation points e 1 and e 2 respectively.Clearly, the matrix method used in trilateration is unsuitable in IPS.
For this reason, this paper uses WSM to identify possible intersection points that are close to the target, filter out other points that are further away, average closer points to obtain the target position, and find the radius-based weighted average point in situations of disjointing circles.Additionally, with other indoor non-satellite positioning systems, targeted objects and signal sources are usually assumed to be on a plane.Therefore, a three-AP based plane positioning system is suitable for this type of system.
Let C 1 , C 2 , and C 3 represent three circles, respectively.If any two of the three circles have a non-infinite number of intersections, then the number of all intersections of the three circles is between 0 and 6.Let I A1 and I A2 (intersect points) represent two points in the intersection between circles C 1 and C 2 ; I B1 and I B2 represent two points in the intersection between In this case, the treatment in WSM is same as ECA [5].If only one intersection (tangent point) is observed, the result is retained without screening; however, if the circles are disjoined, then WSM is used.In a disjointed case, the algorithm sets a point on the closest line to the two circles as the focal point, of which the ratio of the distance from the edge of the two circles is set to the ratio of the two radii.Using Fig. 6 as an example, the two-circle situation can be divided into outside and inside separation, as shown in Fig. 6a, b, respectively.In a situation of outside-separation, as shown in Fig. 6a, if the radius of C 1 , C 2 , and C 3 are r 1 , r 2 , and r 3 , respectively, then the distance ratio from I B to the edge of C 1 and C 3 is r 1 : r 3 .Similarly, the distance ratio from I C to the edge of C 2 and C 3 is r 2 : r 3 .The same method of calculation also applies to inside-separation as shown in Fig. 6b.The idea of this approach is because the measurement is theoretically a calculation of distance; the point is in close proximity to the edge, rather than to the center of the circle.We use the four situations in Fig. 3  In such cases, the weighted screening algorithm is used to obtain I A , I B , and I C .This method is capable of obtaining a point from each of the two circles that are either intersecting fully, tangentially, or not at all.Thus, the weighted screening mehtod is absolutely capable of obtaining the positions of I A , I B , and I C , which are then averaged out to obtain the target point of trilateration.

Experimental Results and Discussion
The experimental results are divided into two parts: first, we repeated the ECA [5] algorithm experiment and used their measured numerical values to calculate and compare the performance among the matrix, ECA, and WSM.In the second part, we setup a test environment in 5th-floor of Electrical Building, CYCU then measure the AP signals from smartphone and calculate the position.

A. Part I:
This experiment obtained data from a total of seven measurement points, including information on positions and estimated distance from the APs, as listed in Table 1.The coordinates of the three APs were set to S 1 (0, 0), S 2 (10, 0), and S 3 (0, 10) in experiments 1-4; and S 1 (0, 0), S 2 (6.21, 0), and S 3 (6.21,6.21) in experiments 5-7.Table 2 shows the performance results using various methods such as EAC, Matrix, and WSN, where the column μ was calculated through the average distance error of the experiment, with column σ 2 representing the variance of the error value; 25, 50, and 75 % of the cumulative distance error are expressed in the columns 25th, 50th, and 75th, respectively.Table 3 shows the seven displacement errors calculated from the experiment, which is the result of subtracting the estimated coordinates from the coordinates of the original observation point.
The results reveal that regardless of whether calculating an average value or error variance, WSN performs better as a method than either ECA or Matrix.We plotted the results from the first, fourth, and fifth experiments in Fig. 7, which reveals that when the distribution of the coordinates of the three APs used for positioning is more uniform (when the center of the circles as endpoints are linked into a triangle, the closer the angle is to 60 • , the more uniform the AP distribution it represents; otherwise, it is less uniform) and the signal strengths are almost the same, the positioning results generated by WSN and ECA are very close.However, when the three positioning circles differ greatly in size, WSN has better precision and robustness as compared to matrix and ECA.In addition, the WSM is a lightweight position algorithm that consumes less computational resource than matrix and ECA.It also suit for the case of irregular deployed position of APs in a building and suit for the case of irregular RSSI variation.Figure 8 shows the experiment setup.There are 3 APs, 5 calibration points and one measurement point.We are intending to determine the position of the measurement point by the WiFi signals from APs and the calibrating data from the other 5 calibration points, which are collected beforehand.The AP1 and AP2 is "Dlink DIR-300 Wireless-G" wireless router, AP3 is "ASUS WL-330gE" portable wireless router.All calibration points, named c1-c5, and the measurement point, named p1, are in corridor.In Fig. 8, AP1 is in a room so that it is walled off from the measurement points.Table 4 listed the received RSSI of these points.
The device used to collection those signal is HTC one X, an android-based smartphone.
There are two interesting problems that cause error when applying RF propagation model in positioning: the first is that not all APs emit same power.Via actual measurement, we detected −32 and −36 dBm for AP1 and AP3 from 1 meter distance, respectively.The second is that not all mobile devices have same resolution in detecting radio signal.In general, general purpose smartphone and laptop report RSSI in one dBm scale and different devices report different RSSI values very frequent on the condition of same place and same time.In the proposed system, the change of P(d 0 ), n from any situation and the value of OAF in Eq. 3 are all integrated into CF (Calibration Factor).So the propagation model for in-door WiFi-based positioning system becomes In system calibration phase, it can adjust CF to enhance the accuracy.P re f is a referenced power level instead of P(d 0 ), and is assumed to be −32 dBm and n is assumed to be 2.7 in this study.
Figure 9a shows the case of CF setting to be 15 for all APs.In this case, we find the radius of the circle with the center of AP1 is properly calibrated by the CF.However; the WiFi signal from AP2 to the p1 is in the line-of-sight path, so the radius of the circle with the center of AP2 is underestimated.The WiFi signal from AP3 to the p1 is in the non-line-of-sight path.Besides, the AP3 emits lower power than AP1 and AP2.The radius of the circle with the center of AP3 is much overestimated.Due to the erring estimation for the radiuses, the WSM screens wrong intersections and then reports an estimated point with large error.
Figure 9b shows the case of CF setting to be 35 for all APs.We find that all radiuses are underestimated and the estimated point converges to a certain point for both WSM and matrix when CF approaches to a sufficient large value.Figure 9c shows the estimation error of WSM and matrix method when calculating the distances from APs to the measurement point by applying same CF to all received WiFi signals.
From the discussion above, we know that applying same CF to all received WiFi signal to estimate the user position is misfit.Therefore a calibration phase is needed before user position estimation.We propose a simple and efficient procedure to obtain the CF for each received WiFi signal.The procedure is stated as follows: I. Calibration phase: i. Choose several calibration points which position is given beforehand according the spacial characteristic of the building to collect the wireless channel characteristics.In this experiment, 5 calibration points was chosen and shown on Fig. 8. ii.Because of the position of the calibration points are given beforehand, the distance from the APs to the calibration points is also known and the CF for different APs can be calculated in this stage.The result is also tabulated on Table 4.

II. Positioning phase:
i.When a signal receiver, a smartphone in this experiment, receives WiFi signals, if the strongest RSSI is larger than −50 dBm, it means that the measurement point is very close to an AP, (less than 2 m).Therefore the proximity method can be used in this case and let the AP's position be the approximated position of the measurement.ii.According to the order of RSSI strength, find the candidates from the calibration points.In this experiment, c1 and c2 is the candidate.iii.Find the one in the candidates whose strongest RSSI is the most close to the strongest RSSI of the measurement point.In this experiment, it is c1.iv.Adopt the CF values of the calibration point to be the CF values of the measurement point and then performs the WSM to obtain the position of the user.
Assisting with the calibration points, the estimation error is down to 1.73 m.The result is shown in Fig. 10.Meanwhile, follows the same procedure and assisting with the calibration points, the matrix method still has the estimation error of 4.98 m.  proposed method with matrix and ECA.The experimental results show that the WSM delivers the best performance, with an average error and sampling point topology of the same regularity being 1.988 and 2.491 m, respectively; the error variance is further reduced by 2.067.The results show that relative to the ECA and matrix method, the WSM can reduce more errors, allowing a WiFi-based indoor positioning system to achieve even greater accuracy.

Fig. 2
Fig. 2 DOP diagram, a is better than, b with lower DOP

Fig. 4 2 Fig. 5
Fig.4 Three circles diagram shows the overlap of three circles and the selected estimation points using matrix method with distance overestimation of r 1

Fig. 6
Fig. 6 Weighted intersection screening method, a outside separation, b inside separation

Fig. 9
Fig. 9 Estimation result for treating all received WiFi signal with same channel characteristic.a small CF case, b large CF case, c estimation error for different CF

Fig. 10
Fig. 10 Estimation result for the measurement point p1 Hung-Huan Liu received the B.S., M.S., and Ph.D. degree in electronic engineering from National Taiwan University of Science and Technology (NTUST), Taipei, Taiwan in 1994, 1997, and 2003 respectively.Liu is currently an assistant professor of the Department of Electronic Engineering, Chung Yuan Christian University, Chung-Li, Taiwan, Republic of China.His research interests include the design and performance evaluation of protocols for the wireless networks and indoor navigation and positioning.He also show his interests in assistive technologies for individuals with impairments.Dr. Liu is currently a member of IEEE and ACM SIGCOMM.Wei-Hsiang Lo received the B.S. degree in electronic engineering from Chung Yuan Christian University(CYCU), Chung-Li, Taiwan, Republic of Chinain 2013.He is currently enrolled as a full time MS student.His interests include the mobile computing and mobile application via smartphone.He iscurrently planningon build a WiFi-based indoor positioning test field in CYCU.

Table 1
Estimated distance between the actual location of the observation points and aps from the seven experiments

Table 4
Received RSSIs and the calculated CFs of c1-c5 in Fig.8