A Constrained Kalman Filter for Wi-Fi-Based Indoor Localization with Flexible Space Organization

This paper presents a constrained Kalman filter for Wi-Fi-based indoor localization. The contribution of this work is to introduce constraints on the object speed and to provide a numerically optimized form for fast computation. The proposed approach is suitable to flexible space organization, as in warehouses, and when objects can be spun around, for example barcode readers in a hand. We experimented with the proposed technique using a robot and three devices, on five different journeys, in a 6000 m2 warehouse equipped with six Wi-Fi access points. The results highlight that the proposed approach provides a 19% improvement in localization accuracy.


Introduction
Nowadays, a wide-scale proliferation of wireless devices can be observed. This phenomenon is due to multiple factors, such as more and more efficient, small and low energy consumption electronic components and widespread wireless communication technologies. Among the services allowed by this technological progress, LBS (Localization Based Service) is facing a continuously increasing interest, notably due to dedicated smartphone applications. According to the statistics, 80% of LBS are for indoor purposes [1], for example for guidance of persons with mobility problems, emergency evacuation or goods localization in warehouses.
In the past decade, plenty of research has been conducted about LBS [2,3], in particular using wireless techniques [4][5][6] such as ultra-wideband, Bluetooth, or Wi-Fi. Wi-Fi has the advantage to be cost-advantageous. Nowadays, it is also very widespread, which avoids the installation of new antennas or additional transponders as for RFID (Radio Frequency IDentification) for example. Position information can be obtained through the wireless signal RSSI (Received Signal Strength Indication) [7] or the waves' AoA (Angle of Arrival) [8], knowing the position of the emitters. However, such information is generally insufficient to provide accurate localization, especially using Wi-Fi. Thus, wireless localization is traditionally coupled to additional techniques such as fingerprinting [9]; the use of space grids [10,11]; or of additional sensors like smartphone ones, namely accelerometers, gyroscopes, or magnetometers [12]. This last technique is usually named inertial navigation and includes a variant called PDR (Pedestrian Dead Reckoning).
To fuse information coming from Wi-Fi and from one or several additional technique(s), Kalman filtering is the most popular approach [13]. Many improvements to the baseline Kalman Filter (KF) have been used, such as the extended (EKF) or unscented KF (UKF) to deal with the orientation nonlinearity, multi-stage, and adaptive or robust versions. In [14], landmarks were used as inputs of a limited complexity KF to improve the accuracy. In [15], two EKF were used to fuse the measurements and to update a fingerprinting database. In [16], an adaptive UKF was used to improve the PDR with a map-matching technique. In [17], particle swarm optimization was used to improve the correction step accuracy.
In [18], several movement scenarios were considered with an adaptive and robust filter. In [19], a two-stage version was introduced to improve the robustness by separately dealing with attitude determination and tracking.
Another improvement in KF is state constraints. State constraints are all additional equations that do not fit into the structure of a KF [20]. For example, when estimating a quaternion, it is known that its Euclidian norm is equal to one. Taking into account such additional knowledge in the estimation process contributes to improving the localization and tracking accuracy.

Related Work
Extensive research has been conducted to incorporate state constraint equations into the structure of a state estimator-through model reparameterization or model reduction, pseudo-observation methods, gain modification techniques, projection approaches, etc. If both the system and constraints are linear, all these approaches result in the same state estimate [21]. For LBS purposes, constraints about the heading were taken into account in [1,22], allowing for a reduction of the state space-tracking model to a four-order linear one. In [23], the heading was constrained according to the type of environment: narrow passages like corridors versus wide scenes with an azimuth wheel. In [24], position constraints were considered in an UKF when at most four anchors contributed to the localization. In [25], nonlinear inequality constraints were considered for the measurements, in particular RSSI and AoA. However, it should be noted that no work has been done to consider speed constraints in KF-based LBS.

Contribution
In this paper, the contribution is to develop a Kalman filter for Wi-Fi-based indoor LBS with constraints on the moving object speed. This contribution arises from the kind of indoor environment under consideration in this work: a warehouse with flexible topology and space organization, according to the products stored. The nature of the products can badly affect Wi-Fi coverage, impacting localization. Moreover, small IMU chips with a limited cost usually have larger drifts and errors, which do not contribute to improving the positioning. State constraints are thus considered to compensate for this accuracy decrease. The flexible topology implies that the paths can evolve with time, making position constraints unsuitable. Moreover, the objects to localize can be spun around anywhere, preventing the consideration of heading constraints. We thus introduce speed constraints according to the limited knowledge we have about the flexible organization. A corresponding Kalman LBS algorithm is developed in this paper and the constraint stage is detailed to provide fast computation with a minimal amount of scalar additions and multiplications.

Outline
This paper is organized as follows. The problem to solve is first stated in Section 2. Then, the proposed approach to deal with the problem under consideration is depicted in Section 3. The results obtained on several practical case studies in a warehouse are given in terms of plots and figures in Section 4. These results are then analyzed and discussed in Section 5. Finally, concluding remarks and the outlook of this work are given in Section 6.

Problem Statement
Let us consider a device moving into an indoor environment. The movement is supposed to be horizontal. The device is equipped with an IMU (Inertial Measurement Unit). The objective is to track the device, that is to say to estimate its position in real time. The device movement can be modeled by Equation (1).
where k ∈ N * is the discrete time; T s is the sampling time; r x,k ; r y,k and V x,k ; V y,k denote the 2D position and velocity, respectively, at time k; and where θ k is the device heading (see Figure 1). ∆V x,k , ∆V y,k , and ∆θ k are the IMU measurements, that is to say the velocity increments between discrete times k − 1 and k along the G, x m and G, y m axes and the angle increment around the G, z axis. Writing down on the first hand: and considering process noises in the second-hand, Equation (1) can be rewritten as follows: where s k is the additive noise affecting the IMU measurements and w k is introduced to take into account the model approximations (discretization, neglecting the earth rotation effect, etc.). To compensate for the mid-and long-term effects of the stochastic processes {s k } and {w k }, the device position is also measured according to Equation (4): where RSSI i is the Received Signal Strength Indication of the Wi-Fi signals exchanged with the access point i (1 ≤ i ≤ N), n is a factor depending on the environment (n = 2 for outdoor and 4 for indoor situations), d i is the distance between the device and the access point, and A i is a calibration coefficient. Introducing the following: Equation (4) can be rewritten in the following compact form: where v k is the measurement noise. The problem to solve is to estimate as accurately as possible x k for any time k using the set of measurements {y 1 , . . . , y k } and their existence {γ 1 , . . . , γ k }. Using Equations (3) and (6), the estimation can recursively be done using an EKF, because function h is easy to linearize and does not contain discontinuities. The EKF Equations (7)-(8) for the prediction step and Equations (9)-(11) for the Joseph's form correction step are given below: where I is the identity matrix of appropriate dimension; the superscript T denotes the transposition operation; and P, Q, R, Σ − k , and Σ + k are the following covariances: The filter is initialized withx 0 and Σ 0 . It should be noted that at a given time k, if no RSSI is detected, then γ k is null and sox + k =x − k and Σ + k = Σ − k . As output of the EKF, the estimated state and error covariance are as follows:x k x + k and Σ k Σ + k . The matrix H k is obtained by linearizing h, as follows: where (X bi ; Y bi ) are the coordinates of the access point i and where is the distance between the object predicted position x − k (1);x − k (2) and the access point i. Localizations using Wi-Fi RSSI, IMU, and EKF usually give pretty good results, with the accuracy depending on the number of access points. However, in warehouses, the Wi-Fi coverage is often depreciated because of metallic shelving and harsh stored products such as pallets of water bottles, conserves, or chemical products. Moreover, the topology of warehouses can frequently change because of permanently changing stocks. Thus, additional state constraints are introduced in the baseline EKF to improve the localization accuracy.

Proposed Approach
Let us consider an indoor environment such as a warehouse. It includes several rectangular storage areas containing shelves, as illustrated in Figure 2. Each storage area can have its own organization changed, i.e., the shelves' position and quantity can be modified according to the products stored. Consequently, the corridors between the shelves are not fixed. Outside the storage areas, the movements are free. For circulation convenience, all shelves are parallel to the O, → y axis. Because the shelves' localization into an area are subject to possible modifications, position constraints are not suitable. Moreover, the objects to localize can be spun around, for example a barcode reader in a hand when scanning some products put on the shelves. Thus, no additional constraint about the heading could be taken into account. However, as the displacements between the shelves are along the O, → y axis due to the area arrangement, the speed along the O, → x axis is close to zero. This constraint is taken into account according to a smooth additional measurement, as in [26]: Constraint (14) is equivalent to: V x,k = ζ k , where {ζ k } is a zero-mean white random process with a standard deviation σ. It imposes the speed along the O, → x axis to be close to zero, but not strictly, because the object can nevertheless laterally navigate between the left and right shelves. Equation (14) must be considered only if the object is inside a storage area. Writing down X min , the limits of area i (see Figure 2), and considering the uncertainty of the position estimate x + k (1);x + k (2) , the condition is as follows: where Σ + k (i, j) is the coefficient at the i th row and j th column of Σ + k . Considering the noise distribution is Gaussian, the probability of wrong detection of a storage area is less than 0.1%. When condition (15) is satisfied for one of the storage areas, taking into account constraint (14) leads to the following constraint update, similar to the correction step of Equations (9)-(11): wherex k and Σ k are the constrained estimated state and covariance, respectively. Considering that D = [0 0 1 0 0], Equation (16) becomes the following: This result allows for writing down the following: (20) Finally, the constraints in scalar form for fast computation become the following: Equations (20) and (21) can be optimally computed with 25 additions (1 for Equation (20), 4 forx k , and 4 × 5 for Σ k ) and 36 multiplications (6 for Equation (20), 5 forx k , and 4 × 5 + 5 for Σ k ).
The flowchart of the constrained LBS is summarized in Figure 3.

Results
Now, let us apply the proposed approach to a 6000 m 2 warehouse. This warehouse contains m = 2 storage areas and is equipped with N = 6 Wi-Fi access points (reference: Cambium CnPilot E510 with firmware 3.11.4.1-r3). A 425 m journey is done with a robot (see Figure 4), according to the route drawn in Figure 5. The robot is a WiFibot Lab V4 equipped with an Intel Celeron quad core SBC running Linux Ubuntu 18.04 LTS. It embeds for the wireless communication an Atheros AR9280 wireless-N dual band half mini-card. The robot is also equipped with a YEI 3-space IMU, whose noise characteristics are 99 µg/ √ Hz for the accelerometers and 9 mdeg/ √ s for the gyroscopes, leading to the following P with sample time T s = 0.1 s:   To set the parameters A i , n and the variance R, the robot was placed at different known fixed positions all over the warehouse. About 2000 RSSI values coming from the six access points were acquired. Remarking that Equation (4) is linear in parameters A i and n, the least squares method can be applied to compute their value. The variances of the computed A i that can further be obtained are by definition equal to R. The results are n = 3.6885, R = 1 dB 2 , and: Acc. pt i 1 2 3 4 5 6 A i (dB) −11.66 −14.04 −17.16 −14.52 −12.53 −16.43 (23) Finally, the additional process noise and velocity constraint covariances were set to: and the EKF was initialized with Equation (25).
The localization results are given in Figure 6 for the position with respect to the time and in Figure 7 for the 2D trajectory.  The same journey was also done five times at different speeds, with three different devices: two barcode readers and one tablet. During these experiments, the RSSI and IMU measurements were sent to a log server through a 4G connection and a 4G Teltonika RUT950 router, to create a database. The constrained and unconstrained LBS algorithms were then applied using this database. The results in terms of RMS (root mean square) are summarized in Table 1. The length of each journey and the total number of RSSI detected during the route are also given for information. Table 1. RMS localization errors (in m) with and without constraint applications.

Device 1 Device 2 Device 3
In Figure 6, the impact of the constraint can be seen in the confidence interval ±3 × STD. An increase of this interval stands for a localization uncertainty increase, due to the low rate of RSSI detected. It is equivalent to an observability deterioration. Such a phenomenon is from far less important in the constrained case (Figure 6b), more especially along the X axis. It highlights the positive effect of the constraint.
Looking to the figures in Table 1, the first thing to point out is that the worst results were obtained in the shortest journey (the second) and the best ones were in the longest (fourth and fifth). This makes sense because for a given distance, the slower the journey, the longer it is, which involves more RSSI detections. The second thing to notice is that the global RMS over the five journeys and three devices are 1.48 m versus 1.20 m without/with the constraint. The improvement is thus 19%. The best obtained result (device 2, journey 5) is a mean error smaller than 70 cm, which is pretty good considering the warehouse harshness.
To have a point of comparison, our approach was also experimented with the dataset [27] presented in [28]. This dataset included several journeys done by an object (a Nexus 4 running Android 4.4). The data included the real position and the RSSI of the different access points. The route is drawn in Figure 8, extracted from [28].  [27]. The six access points were located at the AP circles.
Unlike in [28], we considered only one MAC address for each access point, i.e., that six RSSI were available at each scan. We also did not consider markers. According to our approach, four areas can be considered, as detailed in Table 2. Table 2. Constraint areas in Figure 8.
The results in Table 3 highlight that even if our approach is slightly less efficient than the Soft Range Limited K-Nearest Neighbors (SRL-KNN) algorithm introduced in [27], it has smaller average errors than all of the other methods. The estimated 2D trajectory is plot and compared with the real one in Figure 9.

Conclusions
In this paper, a constrained Kalman filter for Wi-Fi-based indoor localization was developed. This approach is suitable when the space organization is flexible, as in warehouses. The constraint is about the object speed and only applies in some areas of the warehouse. The object to track can be spun around, for example a barcode reader in a hand. The proposed approach was experimented with a robot and three devices on five different journeys. The results highlight that the proposed approach improves the localization accuracy by 19%. As an outlook of this work, the proposed approach can be extended to the 3D case. The use of an estimator such as the UKF and nonlinear smoothing will also be considered. Finally, the regional classifications analysis is another prospect of this work.   [27], which can be found at: https://ieee-dataport.org/open-access/wifi-rssi-indoor-localization (accessed on 21 November 2021).