IMPROVED RSSI-BASED EUCLIDEAN DISTANCE POSITIONING ALGORITHM FOR LARGE AND DYNAMIC WLAN ENVIRONMENTS

: This paper presents an algorithm for RSSI fingerprint positioning based on Euclidean distance for the use in a priori existing larger and dynamically changing WLAN infrastructure environments. Symptomatical for such environments are changing sets of base stations for different calibration points and for calibration phase and positioning phase. The presented algorithm has an accuracy of 2.06m median location estimation error. The algorithm uses four threshold parameters to adapt the calculation to the specific measuring environment Furthermore the reduction of calibration effort is investigated. It is shown that an enlargement of the calibration grid size from 1m to 6m increases the median location estimation error from 2.06m to 3.5m. Regular calibration measurements include measurements in four rectangular bearings. Reducing the number of calibration bearings results in less calibration effort, but worsens estimation quality.


INTRODUCTION
For location based services (LBS) positioning techniques are of essential value. In outdoor environments satellite positioning systems like Global Positioning System (GPS) can be used easily. In indoor environments GPS is not available. For indoor applications, e.g. autonomous robots or mobile museum guides, which have to determine their current position independently, different technologies are used [1] [2] [6]. In this context Wireless Local Area Networks (WLAN) may be used. One advantage is the possibility of using existing WLAN environments. Measurements of the Received Signal Strength Index (RSSI) of several base stations offer the opportunity to determine the current position using fingerprinting and Euclidean distance algorithm (EDA). In large areas of measurement or in dynamically changing environments the basic static EDA using always the same set of base stations (BS) has to be adapted. The set of received BS may change between calibration points (CP) or the sets of a specific CP may change from calibration phase to positioning phase. This paper addresses the following questions on the use of EDA in large and dynamically changing WLAN environments: • How to handle different sets of base stations measured at one calibration point during calibration phase and positioning phase? • How to handle varying sets of base stations between calibration points measured in calibration phase? • How to handle 'unreliable' RSSI-values? • How to detect and handle outliers in position estimation? • What is the accuracy of the positioning algorithm under these circumstances? • How can calibration effort be reduced?
An adapted and improved version of the basic EDA is presented to handle the first four questions mentioned above. Moreover, the problem of reducing calibration effort is investigated.
The research is based on data gathered during a systematic field trial at a building of University of Applied Sciences and Arts in Dortmund, Germany. Ladd  Retscher et al. [4] developed the IPOS system using RSSI-fingerprints as well. Their test bed was an office building and a tablet-pc was moved from each position to the next either in stop-and-go or kinematical mode. They focused on determining whether a user is located inside a room or not and whether one or two calibration points within one room are sufficient.

RELATED WORK
Teuber et al. [7] again used fingerprinting and the method of minimal Euclidian distance together with fuzzy logic post processing. Their test bed was an empty airport hangar. Accuracy of two-dimensional positioning was 4.47 m using Euclidian distance alone. With Fuzzy logic post processing the accuracy improved to 3 m.
A positioning system for industrial automation with automatic calibration was developed by Ivanov [2]. This system is able to perform automatic measurement and model calibration so that no manual measurements are necessary. The algorithm has a mean accuracy of 3.7 m with standard deviation of 3.4 m using automatic calibration. If manual calibration was used the mean accuracy would be 3.1m with a standard deviation of 2.6m.
The Ekahau Positioning Engine (EPE) is a commercially available software using RSSI based WLAN indoor positioning. According to the manufacturer's instructions [1] the engine combines RSSI pattern recognition together with an attempt to include the user's history (boundary conditions like allowed paths and speed). Determination of the current two-dimensional position is possible with an accuracy of 1-5 m depending on the environment. The system is able to determine the discrete third dimension (floor level) as well.
Another approach for getting reasonable accuracy in positioning as well as accurate continuous information about the current position on the z-axis is shown in Woodman and Harle [8]. They use a foot-mounted inertial sensor combined with WLAN based RSSI algorithms.

BASIC EUCLIDEAN DISTANCE ALGORITHM
The Euclidean distance algorithm is a fingerprinting algorithm often used for WLAN localization [5]. The algorithm needs a set of RSSItuples of several base stations measured at calibration points with known positions stored in a data base. During the positioning phase a RSSI-tuple of several base stations is measured at a point whose position has to be determined. A similarity measure (Euclidean distance) between the current positioning tuple and a calibration tuple is calculated using Equation (1). A small d indicates a high similarity. Within permanent environments where all base stations can be received at all calibration points the number of received base stations n is constant. The basic EDA can be used with good results. However, in dynamically changing environments this basic algorithm has to be adapted. Dynamically changing means either varying sets of base stations in calibration phase and positioning phase for a specific calibration point or changing sets of received base stations from one to the next calibration point, i.e. n is not constant anymore. The Euclidean distance d calculated according to Equation (1) may not indicate a similarity measure between tuples from calibration and positioning phase any more.

ADAPTED EUCLIDEAN DISTANCE ALGORITHM
In large and dynamically changing WLAN environments RSSI-tuples of calibration and positioning phase may comprehend different subsets of received base stations.
Calculating the Euclidean distance d for a calibration point the adapted EDA takes into account only those BS which have RSSI-values in both calibration and positioning RSSI-tuples. This number m of matching BS may vary between calibration points. If for a measuring point a BS is not received in either calibration or positioning phase this BS is not considered for calculating d.
Thus, the calculation of d is adapted to a varying number of BS considered (Equation (2)), i.e. d has to be normalized according to the number of matching BS m: There are two reasons which may lead to the occurrence of Case 1. Either the BS was operating during calibration phase and not operating during positioning phase or the measurement of calibration phase happened within the transmission range of the BS and the measurement of positioning phase occurred outside the transmission range of the BS. If this case occurs the BS under consideration is not included in calculating d according to equation (2).
Case 2 may occur only if the measurement at the calibration point under consideration was accomplished beyond the transmission range of the BS. If this case occurs the algorithm distinguishes two sub cases. If the RSSI of the BS is located above a threshold value (SW3), it is assumed that the calibration measurement was accomplished beyond the BS transmission range. Thus, the spatial distance between measuring point and calibration point is larger than the radius of the BS transmission range. Consequently, the calibration point is excluded as a position candidate. Including such a CP may result in large outliers, i.e. measuring point and most 'similar' calibration point have a large spatial distance despite a minimal d.

'UNRELIABLE' RSSI VALUES
There are some other settings, which may produce large outliers. Cases 3 and 4 describe these phenomena.
Case 3: The number of matching BS is too low. Position estimation needs sufficient information in terms of matching BS. The adapted EDA searches for calibration and positioning tuple combinations where the number of matching BS equals the number of measured BS in the positioning tuple. If no calibration tuple meets this condition, the necessary number of matching BS is reduced by one and the check is performed again for all calibration points. This procedure is repeated until the condition is met or until the searched number of matching BS is reduced to 0. Within the latter case, no Euclidean distance can be calculated, i.e. the measurement of positioning phase cannot be accomplished within the calibration area.
Measurements of the later presented field trial show that a defined minimum number of matching BS is necessary for excluding large outliers. The parameter NBSmin is introduced describing the minimum number of matching BS needed for calculation of the Euclidean distance d. If the number of matching BS is smaller than the parameter NBSmin the calibration point is not taken into account for positioning. A value of 4 for NBSmin seems to be reasonable (see Results).
Case 4: RSSI-values of positioning and calibration tuples are too low.
Due to signal attenuation, the signal strength of a transmitted signal distance to the sender. For low RSSI-values the function has a small angle of slope, i.e. the function is insensitive against variations of distance. Consequently, RSSI-tuples consisting of low RSSI-values are less reliable than tuples with higher RSSI-values, i.e. position estimations based on low RSSI-values may result in higher location estimation errors. Taking this into account the adapted EDA works with a filtering system based on two threshold values SW1 and SW2 with SW1 < SW2. First, corresponding calibration and positioning tuple are checked for RSSI-values lower than threshold SW1. The corresponding BS is excluded from the set of matching BS and is not taken into account for calculation of d according to equation (2). Second, those BS where both calibration and positioning tuples have RSSI-values lower than threshold SW2 are excluded from calculation of d according to equation (2). The filter leads to a lower number of matching BS used for position estimation. However, due to the filtering of 'unreliable' values causing outliers the quality of location estimation measured by median location estimation error and maximum location estimation error increases.
The pseudo code of the adapted EDA is shown in Fig. 1

TESTBED
For evaluation a series of measurements in a building at University of Applied Sciences and Arts is carried out. The building is equipped with a WLAN infrastructure for data communication. In order to evaluate the algorithm under non-laboratory conditions this infrastructure is used and no additional BS are installed. In total 24 different BS were received during calibration and used for positioning.
The measurements are taken on 3 floors (first floor, second floor and third floor) each consisting of a corridor area and a foyer area. A map of the first floor with the basic calibration grid is shown in Fig.  2. All three floors have an identical layout. The corridor areas are approx. 2m in width and 36m in length, the foyer area is approx. 21m in width and 12m in length.
For calibration a basic rectangular 1m x 1m grid is used. Every node presents a calibration point.
During calibration phase at a calibration point RSSI-values from received BS are simultaneously recorded. For each calibration point 15 successive measurements are accomplished. At every calibration point measurements in four bearings (0°, 90°, 180°, 270°) are carried out to allow for the influence of the human body. The map is oriented with 0° on the upper edge and 90° on the right edge of the map. After each measurement the median of the recorded RSSI-values for each BS is calculated. The tuple is stored in a database together with the corresponding timestamp and bearing.
During positioning phase 20 successive measurements of RSSI-tuples are carried out in one direction at 78 randomly chosen points within the calibration area. The adapted EDA iss applied using 'single RSSI-values'. Figure 2 shows the 1m x 1m grid of calibration points. This basic grid is used for investigating the question for the accuracy of the adapted EDA.
For analyzing how calibration effort can be reduced different calibration grids are simulated using subsets of the basic grid. Within the foyer these subsets are quadratic, within the corridors the subsets consist of a straight line of calibration points having a distance of 2m, 3m, … , 6m. For each of these calibration grids the adapted EDA is applied using 'single RSSI-values' and four bearings.
Furthermore, the influence of the number of bearings used for calibration on the location estimation quality is investigated. This is achieved using the basic calibration grid with 1m x 1m grid size. The evaluation is performed for all combinations of 1, 2, 3 and 4 calibration bearings. All

RESULTS
The algorithm presented above was used for answering the following questions: • How can incorrect location estimations be detected and excluded (outliers)? • How does NBSmin, the minimal number of BS used for calculating the Euclidean distance at one calibration point, influence the accuracy of position estimations? • What is the accuracy of positioning using the adapted EDA? • How can the calibration effort be reduced?

OUTLIERS
As pointed out while presenting the adapted algorithm outliers, i.e. large deviations of measuring position during positioning phase and estimated corresponding calibration point, occur under several circumstances: a) The number of BS used for positioning (NBSmin) was too low. b) RSSI-tuples used for positioning consist of very low RSSI-values (RSSIpos j < SW1 OR RSSIcal j < SW1). c) RSSI-tuples used for positioning both from calibration and positioning phase include low RSSIvalues (RSSIpos j < SW2 AND RSSIcal j < SW2) d) RSSI-tuple of positioning phase includes RSSI-value (> SW3) of BS not included in RSSItuple of calibration phase. Drill down of data and thorough examination of outliers and their underlying measurements show that these four constellations may be the reasons for large outliers. Table 1 shows a selection of parameters leading to a drastic reduction in outliers. For 10 out of 1100 calculations the location estimation error was larger than 15m. Fig. 3 shows the dependency of median location estimation error on the minimal number of BS used for positioning (NBSmin). It is shown that the median location estimation error decreases from 2.5m to 1.8m if the minimal number of BS used is increased from 1 to 7.

Fig. 3 -Median location estimation error vs. minimal number of BS used (NBSmin)
However, if the minimal number of BS necessary for positioning is increased the number of calibration points excluded from positioning increases as well. Fig. 4 shows that with NBSmin = 4 only 2%, but with NBSmin = 7 83% of calibration points.

ACCURACY OF POSITIONING USING ADAPTED EDA WITH RSSI SINGLE VALUES
The cumulative distribution of location estimation errors of position estimation with adapted EDA using the 1m x 1m basic calibration grid, four calibration bearings and single values is presented in Fig. 5 . Fig. 5 shows that 50% of location estimation errors lie below 2.12m (median), 90% of values lie below 7m and 95% below 9.25m. Still there is a small number of heavily incorrect location estimations (10 out of 1100). The maximum location estimation error is 45.04m. For these evaluations the floor level (zcoordinate) was estimated correctly in 97.45% of cases.   Table 2 shows that the median location estimation errors in both cases are nearly identical (2.12 and 2.06m). The 90% value of LEE however decreases from 7.00m to 5.25m, the 95% location estimation error decreases from 9.25m to 7.00m.
The maximum location estimation error shows the most dramatic changes. It decreases from 45.04m to 10.51m.  Fig. 7 presents the median location estimation error drawn over the edge length of the calibration grid. It is shown that the median location estimation error increases with increasing calibration grid size.

Fig. 7 -Median location estimation error vs. edge length of calibration grid
Using the basic 1m x 1m grid the median location estimation error is 2.12m. The error increases to 2.69m when the edge length is increased to 2m. The amount of calibration points is decreased approx. by a factor of 4. The error increases to 3.64m when the edge length is increased to 6m. The number of calibration points decrease approx. by a factor 36. Furthermore the influence of the number of calibration bearings on the location estimation error was investigated. Table 3 shows the median location estimation errors depending on different combinations of bearings used for calibration.
It can be seen in Table 3 that with all four directions the median location estimation error is 2.12 m while it increases to a maximum of 2.9m when using only one direction. It can also be seen that the best result can was reached with the calibration directions of 0°, 180° and 270°. 2.7m to 2.12m when using four bearings instead of 1 bearing. Figure 8 shows a trend that the median location estimation error decreases when the number of calibration bearings included is increased. There is no obvious optimal bearing or combination of bearings less than 4. For the given testbed it is not recommended to use less than four bearings.

CONCLUSIONS
This paper presents an adapted version of the algorithm using the smallest Euclidean distance for fingerprinting within environments where existing WLAN infrastructure is used for positioning. The basic Euclidean distance algorithm is adapted to an environment with changing sets of base stations used for calibration and positioning. Moreover, the handling of outliers in positioning is included. The algorithm works with reasonable accuracy under such conditions. However, under specific circumstances still individual heavily incorrect location estimations occur. Such outliers may be filtered using a moving median filter over the estimated position coordinates.
The calibration effort which accounts for the major part of installation time can be reduced significantly when a small increase of location estimation error is accepted by decreasing the number of calibration points, resp. by increasing the grid size. It is furthermore expedient to use four calibration bearings because this results in a higher certainty for receiving good estimation results.
For future work an easy to use method to find optimal threshold parameter settings for adjusting the algorithm to a specific spatial setting must be developed. Thus, the system can be used by non professional operators.