Improved indoor visible light positioning system using machine learning

In this study, we present a novel Visible Light Positioning (VLP) method to reduce the localization error in an indoor environment. Machine Learning (ML) methods including Decision Tree (DT), Support Vector Machine (SVM), and Neural Networks (NNs) are used in combination with the LED Received Signal Strength (RSS) and the angle of a steerable laser. Zemax optics studio simulator is used to build a real indoor scene. Orange data mining software is utilized to apply ML techniques. Our numerical findings show that the suggested system outperforms the other RSS Visible Light Communication (VLC)-based models by reducing the localization error by more than 90% in some areas.


Introduction
The need for wireless communications has significantly increased in recent years. The rapid evolution of localization-based applications for wireless systems has received a lot of attention (Mohsan et al. 2022). Location estimates can be utilized in disaster monitoring, environmental control, smart buildings (Tran and Nguyen 2006), agriculture (Liu et al. 2009), health, and transportation. Global Positioning System (GPS) is currently the most widely used location technique. GPS and RF-based technologies have mainly been used in outdoor locations since they are unable to provide adequate indoor positioning services inside buildings (Lam and Little 2018).
As a result, various indoor localization methods based on VLC have been adopted to ensure indoor localization efficiency (Lymberopoulos and Liu 2017). VLC is a type of optical wireless communication that focuses on visible light (Eldeeb et al 2021). VLC was first developed to mitigate and solve the growing bandwidth crowding in Radio Frequency (RF) networks (Eldeeb et al. 2022;Yosif 2020a: Elsayed andYousif 2020b). It is one of the main technologies that can be utilized to establish optical networks for indoor applications. Indoor localization, also known as VLP, is one such application. VLC has lately gained popularity for VLP systems due to its significant reduction in localization errors.
To ensure the effectiveness of indoor localization, numerous indoor localization techniques have been tested. Angle Of Arrival (AOA) (Wen and Liang 2015), Time Of Arrival (TOA) (Loyez et al. 2015), Received Signal Strength Indicator (RSSI) (Ahmadi and Bouallegue 2017; Barsocchi et al. 2011) and Time Difference Of Arrival (TDOA) (Do and Yoo 2016) are included.
The RSSI is the easiest one and costs less than the other methods, but, it performs worse than TDOA and TOA in terms of noise and accuracy (Xu et al. 2016). The received optical power is used to estimate the transmission distance in RSSI. A large number of VLP solutions use trilateration or triangulation algorithms as a backbone.
However, the limitations of the Field of View (FOV) have an impact on Line of Sight (LOS) access to luminaires, which is problematic where several luminaires are required for positioning (Kalikulov et al, 2017). One of the most challenging problems in localization is to generate a reliable dataset that is based on practical scenarios. Despite the fact that (Shawky et al. 2019) showed a reduction in localization error, the effectiveness of the VLC positioning system was not examined in a real indoor setting. The room lacked certain configurations, such as sufficient rays, blocking furniture, enough reflections, and receiver tilt, which has a significant impact on the localization accuracy. In addition, in ML, the majority of the research uses only Received Signal Strength (RSS) as input feature (Ghonim et al. 2021) resulting in great positioning errors for points having the same received power. Researchers are supplementing lighting with other peripherals, such as extra photodiodes (PD)s, a directional laser, and even a revolving receiver, to minimize the requirement for multiple luminaires. The addition of these extra peripherals greatly increases the accuracy of localization.
The main contribution of our paper is reducing the localization error using RSSI, angles from a steerable laser and a variety of ML techniques. We indicate that using RSS only does not guarantee the best localization performance. Accordingly, we add the angle of arrival as an extra feature for the machine learning model. The positioning error has been significantly reduced using the suggested approach. Additionally, we create a practical dataset in which we add furniture that increases the number of reflections in the space. Despite the receiver being carried at a 45° angle, so that the NLOS beam enters the receiver, we are still able to achieve a great localization accuracy.
We first obtain the received power using Zemax Optics Studio simulator, which is used to create a real-world indoor scenario (Khallaf et al. 2021: El-Fikky 2019. Through the realistic indoor setup provided by Zemax Optics Studio, we are able to precisely describe non-sequential ray tracing (Mahmoud et al. 2021;El-Fikky et al. 2020). The angles from the laser, in addition to the received signals from the LED, are used as the input data set to orange data mining software, which provides several ML algorithms.
The rest of this paper is organized as follows: Section 2 presents the importance of ML in our model, whereas in Sect. 3 the system model is explained. Section 4 describes the utilization of RSSI, a steerable laser with orange data mining tool. Section 5 displays and discusses the results of the proposed model. The conclusion is given in Sect. 6.

Machine learning
Recently, research in Artificial Intelligence (AI) and ML has increased dramatically. It uses tools and statistics to teach the system how to learn rules and models from data. ML techniques have been effectively employed in a variety of fields, including pattern identification, finance, entertainment, computational biology, and biomedical applications. Through repetition (i.e., experience), these algorithms automatically change their architecture to get better and better at completing the target goal. The process of adaptation is known as training and involves providing samples of input data along with desired outputs The algorithm then optimizes its configuration to apply to new, previously unknown data and provides the desired results (Ghonim et al. 2021).

Advantages of using ML in localization
Using ML techniques for localization is attractive for a variety of reasons. In fact, when the ML approach is employed, the algorithm implementation is easier and the positioning results are more accurate. The key benefit is that learning algorithms may produce precise and reliable results with only a few anchor points (Ahmadi and Bouallegue 2017). Furthermore, some estimations, such as distances, may not require range measurement devices. Because of ML, localization algorithms are more accurate, which is their main goal, with fewer requirements and easier implementation, and they cost less and consume less energy.

ML localization process
The training phase and the localization phase (test phase) are the two key phases of MLbased localization techniques. The RSS, angles, and related position are obtained during the training phase using predetermined reference points. During the localization phase, the location is estimated using the built prediction model and the chosen learning method.

Related work
Some ML approaches have been mentioned in the literature, including SVMs, NNs, K-Nearest Neighbors (KNN), DT, and fuzzy logic (FL) (Ahmadi and Bouallegue 2017). Our ML approach is used in the context of RSSI localization and the angles of a steerable laser between the reference point and the receiver. Then, the complicated relation between RSSI parameters and position estimate is handled to improve the localization accuracy.
209 Page 4 of 15 SVM, NNs, and DT algorithms are utilized since they outperform KNN (Ahmadi and Bouallegue 2017) We will go over the algorithms that are used in the upcoming section.

Reference room model
To make a fair comparison, we utilize the same conditions as in (Kalikulov et al. 2017), except for a few parameters acquired from (Miramirkhani and Uysal 2015), such as, number of LEDs, number of chips per LED, power of each chip. Kalikulov et al. in (Kalikulov et al. 2017) and F. Miramirkhani et al. in (Miramirkhani and Uysal 2015) used 9 LEDs and 4 LEDs, respectively, in their implementations of the system. But, we only use one in order to cut down on both costs and energy consumption. In the proposed model, we use a combined effect of the received power which varies depending in the location of the receiver in the room and angle of arrival via steerable laser as two input features to the ML algorithms. So, even in the points where the receiver could not receive LOS beam and only the NLOS beam arrives at the receiver, we can achieve a high localization accuracy. Comparing our model to the model in (Kalikulov et al. 2017) is insensitive to the parameters obtained from (Miramirkhani and Uysal 2015).
In Fig. 1, we consider a room with dimensions of 5 m × 5 m × 3 m. To position a receiver, we propose using a single laser source in conjunction with a diffusive Lambertian lighting source. The narrow-beam laser source can be guided and aligned to a receiver to provide correct angular information. The Lambertian lighting source has a wide dispersion and offers information on the receiver's distance using RSS. As a result, one can find the location using RSS and the angle by utilizing several ML algorithms. Here, 500 training points are taken at 50 mm from each other in each dimension.
A nearly-ideal Lambertian pattern is used. In our case, we use a realistic Cree Xlamp® MC-E White LED based on the Emission pattern in Fig. 2. In Zemax optics studio, we add the radiation pattern used in (Miramirkhani and Uysal 2015).We use a white LED source, which is naturally wideband (380-780 nm). In the IR band, it is expected that most materials' reflectance will remain constant for the bulk of practical applications. However, for the visible light band, the wavelength dependence must be taken into account. The White LED coordinates and the other system parameters are given in Table 1. It is centered on the room ceiling and consists of 100 LED chips and each one radiates 0.45 W with a view angle of 120° based on (Miramirkhani and Uysal 2015).
The reflection coefficients are chosen based on the material. There is a desk, a couch, and a coffee table with assumed coating materials that are, respectively, pinewood, black gloss paint, and pinewood (Miramirkhani and Uysal 2015). With Zemax "Detector Rectangle" function, we use a rectangular surface with predetermined dimensions as a receiving element in our simulations. The height of the receiver is taken as 1.2 m. The FOV and area  of the detector are 60° and 1 cm 2 , respectively. To obtain the angles between the laser and the receiver θ laser , a laser source is placed in one of the room corners.
The key steps in the simulation are summarized in Fig. 3. The first stage is to establish a 3D simulation environment in which the indoor environment design is specified. The objects placed within it, as well as the characteristics of the light sources and detectors, are all described. The detected power and route lengths from source to detector for each ray are calculated in the second phase using Zemax non-sequential ray tracing feature. The orange data set input is made up of Zemax output data. Then, ML techniques are applied to the imported data in the third step.

Decision tree (DT)
Regression and classification ML approaches for creating prediction models from data are known as trees. The models are created by splitting the data space in a recursive manner and adapting a simple prediction model to each partition. Because of its simplicity and speed of training and prediction, DT is a well-known ML method. The condition criteria followed in the tree from the root node to the leaf node are used to determine solutions in a DT, see Fig. 4.

Support vector machine (SVM)
In the area of supervised learning, SVM is a common choice for both classification and regression tasks. However, its most common application is in ML for the purpose of classification. The SVM algorithm objective is to find the best line or decision boundary that divides n-dimensional space into classes, making it simple to assign the new data point to the right category in the future. A hyperplane describes this optimal decision boundary (Kim et al. 2013).
The hyperplane is constructed with the help of SVM, which selects the most extreme points and vectors. Thus, the name "Support Vector Machine" refers to the algorithm use of "support vectors," which are the most extreme situations. Figure 5 uses a decision boundary (or hyperplane) to classify items into two groups.
The SVM provides a variety of advantages over the traditional methods, including stability, geometric interpretation simplicity, and the use of kernels for nonlinear judgments, according to (Xu et al. 2016). Its goal is to establish a decision boundary between two classes that allows for label prediction using one or more feature vectors. The hyperplane, or decision boundary, is oriented so that it is as far away from the nearest data points from each of the classes as possible, see Fig. 5.

Neural networks (NNs)
Several ML approaches have recently been developed that differ in accuracy and computing needs. The NNs have become one of the most efficient and reliable approaches for tackling classification issues, as well as a preferred pattern-recognition method over many others (Ahmadi and Bouallegue 2017). The NNs is one of the most efficient and reliable methods for solving classification and pattern recognition challenges. After being trained with input data samples, a NN predicts an output pattern. The NN is made up of multiple layers of nodes. An input layer (with n nodes), K hidden layers (with K ≥ 1), and an output layer; these are the layers involved. It is worth noting that one hidden layer's outputs become the inputs for the following hidden layer. An example of one hidden layer (K = 1) and one output is shown in Fig. 6.
Identity, Logistic, tanh, and ReLU are some examples of activation functions that are used in NNs. There are different training algorithms that can be used in NNs; e.g., Stochastic Gradient Descent (SGD) (Ghonim et al. 2021), Adaptive moment estimation (Adam)  (Ghonim et al. 2021). The L-BFGS-B algorithm is a modification of the restricted memory method (L-BFGS). It is used to solve complex nonlinear problems and can even deal with changeable boundaries. Our model performs best when we combine the L-BFGS-B solver with the ReLU activation function.

Orange data mining
Due to its benefits and vast applications in business, economics, health, science, and engineering, data mining is becoming a strategic instrument in ML. In this paper, we use Orange data mining, which is a ML open-source data-mining tool (Ghonim et al. 2021). With numerous toolboxes, it is used for data analysis and data visualization. orange also has a variety of add-ons to enhance functionality (Ghonim et al. 2021).
The steps of our proposed approach in the stage of employing the Orange toolbox are demonstrated in Fig. 7. The output data of Zemax is used as the Orange data set input in the first stage. After importing Zemax data set, a normalization approach is applied to the RSS data as a preprocessing step to center it on a mean μ in order to improve it and eliminate redundancy. A new feature (X1) is created using the feature constructor widget (Ghonim et al. 2021) according to. As a result, the training data is converted from multi-target to single-target variable. Because Orange data mining does not support multi-target variable yet. Then, the square root is added to the equation in the feature constructor widget. So, the location is found directly without any further processing to X1.
where X1 is the predicted target. It is used to change the training data from x-z plane points to a line. and the angle feature is added to improve the localization accuracy and make sure that X1 is unique. We tried different number of training points to check how increasing the amount of training points affects the results. The number of training points is changed from 50 to 500 training points to achieve the best results. Finally, the data is trained using machine learning widgets using a variety of training algorithms. The location is acquired from the prediction widget. The test and score widget is also used to determine MSE, Root Mean Square Error (RMSE), training time, test time and localization error to validate the reliability of our localization approach.

Results and discussion
IN this section, several trials, including varying training algorithms and training points, are conducted in this section to acquire the excellent robustness of our suggested technique, and the results are reported. These types of measures, including training time, test time, localization error, and percentage of corrected error, are used to assess the reliability of our approach. To compare with (Kalikulov et al. 2017), we assumed that the maximum error is 5 m away from the receiver. This was the worst error because the receiver could not receive LOS beam from some transmitters and only the NLOS beam arrives at the receiver when a person starts to move from point 1 to point 5 (Kalikulov et al. 2017).
The localization error is based on RMSE for a loss metric.
where N is the number of data points, y(i) is the i-th measurement, and ŷ(i) is its corresponding prediction.

Algorithm comparison
Here, we analyze the performance of DT, SVM and NNs with varying numbers of 1 to 10 neurons that are in the hidden layer. 50, 100, 200, 300, 400, and 500 training points are used to compare the localization error, error correction, Fig. 8, and training and test times, Fig. 9. First, Table 2 shows that DT gives the best localization accuracy at 500 training points. But, the training time increases with the increment of the training points achieving 99.20% error correction. (1) The SVM results are shown in Table 3. At 50 training points, the SVM could not recognize the position of the receiver. From 100 to 500 training points, the localization error is higher than in DT and the training time is lower than in DT.
An NN with 1 neuron (see Table 4) corrects the error by 28% at 50 training points but could not give any more error correction than 52% with a low training time.
On the other hand, Table 5 shows that NN with 10 neurons gives a less localization error than NN with 1 neuron, but with a higher training time.
Increasing the number of neurons in the neural network from 1 to 5 achieves high improvement in the error correction (Table 6).
When the number of neurons increases by more than 5 in the NN, it does not show any remarkable improvement in localization error, Fig. 10.

Effect of adding AOA to RSS method.
Here, we compare our approach with the RSS approach, where we add an AOA as an extra feature. We evaluate the two methods at 500 training points since this provides the best localization precision. The positioning error is significantly reduced using the suggested approach, as seen in Fig. 11. We compare the positioning error among DT, SVM, and NNs with 10 neurons since they showed the best performance. Table 7 shows a considerable increase in localization accuracy when using our suggested method.

Localization error comparison
Now, we compare the obtained results of the proposed model in (Kalikulov et al. 2017) with our results. In (Kalikulov et al. 2017), the positioning error was highest in the corner points of the room as the receiver could not receive any LOS path from the transmitters. So, the first 5 points gave a 5 m positioning error on average. On the other hand, our model achieved an average positioning error of 0.038 m, 0.125 m, 2.3, and 0.164 while using DT, SVM, NNs (1 layer) and NNs (10 layers), respectively, for the 5 points that are in the corner of the room. So, the localization error is improved by 99.2%, 97.5%, 52.66%, and 96.7% using DT, SVM, NNs (1 neuron) and NNs (10 neurons), respectively, at 500 training points.

Conclusion
This study proposes a technique for indoor localization that makes use of DT, SVM, and NNs ML algorithms, RSS data from LED lights, and the angles measured by a movable laser. Zemax optics studio simulator and Orange data mining software are used to test the proposed technique. Trials are run with NNs that have, anywhere, from 1 to 10 neurons in the hidden layer and a total of 50 to 500 training points. At 500 training points, with a longer training time of 0.412 s for DT than for SVM of 0.04 s, the DT method shows better localization by 1.74% greater than SVM and 2.38% greater than NNs (10 neurons). Furthermore, the SVM achieves a better localization error than the NNs (1 neuron) by 46% and (10 neurons) by 0.65%. It turns out that the proposed ML positioning system achieves better features, including high precision, cheap cost, and low computational complexity. Therefore, it is appropriate to be integrated into mobile devices and can be applied in real life problems.