AI-Based Positioning with Input Parameter Optimization in Indoor VLC Environments

Indoorlocation-based service (LBS) technology has been emerged as a major research topic in recent years. Positioning technology is essential for providing LBSs. The existing indoor positioning solutions generally use radio-frequency (RF)-based communication technologies such as Wi-Fi. However, RF-based communication technologies do not provide precise positioning owing to rapid changes in the received signal strength due to walls, obstacles, and people movement in indoor environments. Hence, this study adopts visible-light communication (VLC) for user positioning in an indoor environment. VLC is based on light-emitting diodes (LEDs) and its advantage includes high efficiency and long lifespan. In addition, this study uses a deep neural network (DNN) to improve the positioning accuracy and reduce the positioning processing time. The hyperparameters of the DNN model are optimized to improve the positioning performance. The trained DNN model is designed to yield the actual three-dimensional position of a user. The simulation results show that our optimized DNN model achieves a positioning error of 0.0898 m with a processing time of 0.5 ms, which means that the proposed method yields more precise positioning than the other methods.


Introduction
With the progress of the fourth industrial revolution, large and complex buildings are being built in downtown areas. The increasing demand for location-based services (LBS) is gradually extending from outdoors to indoors and indoor positioning systems (IPS) or indoor localization systems (ILS) are attracting scientific and enterprise interest since there is a huge market opportunity for applying indoor positioning, mapping, and navigation technologies [1]. Over the past few decades, highly reliable and accurate global positioning systems (GPS) have generally been used in positioning systems for outdoor environments [2]. However, when GPS is applied to an indoor environment, its positioning accuracy decreases significantly due to propagation loss caused by obstacles and walls [3]. Moreover, the current IPS applications still face several technical and nontechnical challenges, such as the quality of positioning services, location privacy and the availability of indoor maps [4]. To solve this problem, studies are being conducted to determine the location of indoor users more precisely [5,6].
These studies are based on wireless communication technologies and positioning algorithms developed for indoor environments. Representative mobile communication technologies used for indoor positioning include Wi-Fi [7], Bluetooth [8], and ultra-wideband (UWB) [9]. These technologies are based on radio frequency (RF), and although their positioning accuracies are somewhat limited, each of these technologies offers distinct advantages [10]. Recently, visible-light-communication (VLC)-based positioning technology has been studied as a promising method to overcome the limitation of RF-based positioning technologies. VLC technology can use light-emitting diodes (LEDs) to realize data communication and the communication and lighting functions of the LEDs can be used The key objective of this paper is the joint optimization of positioning error, which is that the processing time is evaluated and the performance is verified by applying AI technology. In particular, when AI is applied, a high-precision positioning is achieved by overcoming the limitations of existing positioning techniques.
Hence, this work studies RSS-based user positioning in indoor VLC environments. Specifically, to achieve precise positioning and reduce processing time, this work proposes a fusion of weighted k-nearest neighbor (WkNN) and deep neural network (DNN). In the existing fingerprinting technique, a large number of RPs is required to achieve high positioning accuracy. However, in real environments, it is difficult to create a large number of RPs and the processing time increases when the positioning algorithm is applied later [26]. The proposed DNN with WkNN significantly reduces the number of RPs required to construct the fingerprinting DB, reduces processing time and increases the positioning accuracy of WkNN by using the DNN model. In addition, in the indoor environment considered in this study, both the LOS and the NLOS scenarios with multipath reflection are considered. The results confirm that the proposed method achieves the highest positioning accuracy.
The main contributions of this paper are as follows: 1. This work considers the LOS and NLOS scenarios together in a VLC environment and proposes a user-positioning method for locating the user by performing AI-based RSS measurements.

2.
Under the fingerprinting technique, an AI-based solution is proposed to alleviate the problem of increase in processing time with an increase in the number of RPs. First, after measuring the RSS at the RPs for user positioning, the WkNN component is executed to approximate the user's location, then, the DNN model is trained using these approximate user location as the input data.

3.
The proposed DNN model outputs the user's final position and the simulation results obtained herein confirm that its positioning accuracy is superior to that of the existing WkNN and triangulation scheme.
The remainder of this paper is organized as follows. Section 2 describes the system model used in this study. Section 3 describes the proposed indoor positioning method. Section 4 discusses the simulation setup and the results obtained in this study. Our concluding remarks are provided in Section 5.

System Model
This section describes the system model on which the proposed scheme is based. First, we explain the configuration of the indoor VLC environment considered herein. Next, we analyze the channel characteristics of the visible light path in the indoor environment. The visible light path can be divided into a directed path and a non-directed path. Finally, the optical power distribution of the overall channel is shown.

Indoor Environment Configuration
The indoor environment used in this study is illustrated in Figure 1. The room size is assumed as 5 m × 5 m × 3 m and the room is an empty space. LED Aps are uniformly placed on the ceiling at a height of 3 m from the floor. Four LED Aps are used in this model, and each LED has a transmit optical power of 10 W and a half-power half-angle of 60 • . Moreover, assume that the receiver moves parallel to the ground at a height of 0.7 m, and the active area of the photo diode (PD) mounted on the receiver is 1 cm 2 . Other parameters of the indoor environment configuration are summarized in Section 4.

Optical Channel Analysis
The optical channel model generally consists of a directed path channel and a nondirected path channel. This model was considered to implement a realistic environment. Therefore, in this study, positioning is performed based on the total optical power received by both channels. For this purpose, the power characteristics of each optical path channel are analyzed to obtain the overall optical power received by the receiver in the indoor environment [24].

Optical Channel Analysis
The optical channel model generally consists of a directed path channel and a nondirected path channel. This model was considered to implement a realistic environment. Therefore, in this study, positioning is performed based on the total optical power received by both channels. For this purpose, the power characteristics of each optical path channel are analyzed to obtain the overall optical power received by the receiver in the indoor environment [24].
First, analyze the directed path optical channel. The directed path between the LED AP and user equipment (UE) is depicted in Figure 2. In Figure 2, the distance between the LED AP and UE is , and the received angle is . As mentioned earlier, because the UE moves parallel to the ground, the incident angle is equal to the irradiation angle of the LED AP. Therefore, the RSS along the directed path of the -th UE from the -th LED AP can be obtained using Equation (1) [24].
where is the transmission optical power of the LED AP, is the Lambertian order, is the active area of the UE, is the distance between the LED AP and UE, ( ) is First, analyze the directed path optical channel. The directed path between the LED AP and user equipment (UE) is depicted in Figure 2.

Optical Channel Analysis
The optical channel model generally consists of a directed path channel and a nondirected path channel. This model was considered to implement a realistic environment. Therefore, in this study, positioning is performed based on the total optical power received by both channels. For this purpose, the power characteristics of each optical path channel are analyzed to obtain the overall optical power received by the receiver in the indoor environment [24].
First, analyze the directed path optical channel. The directed path between the LED AP and user equipment (UE) is depicted in Figure 2. In Figure 2, the distance between the LED AP and UE is , and the received angle is . As mentioned earlier, because the UE moves parallel to the ground, the incident angle is equal to the irradiation angle of the LED AP. Therefore, the RSS along the directed path of the -th UE from the -th LED AP can be obtained using Equation (1) [24].
where is the transmission optical power of the LED AP, is the Lambertian order, is the active area of the UE, is the distance between the LED AP and UE, ( ) is In Figure 2, the distance between the LED AP and UE is d, and the received angle is θ. As mentioned earlier, because the UE moves parallel to the ground, the incident angle θ is equal to the irradiation angle of the LED AP. Therefore, the RSS along the directed path of the u-th UE from the i-th LED AP can be obtained using Equation (1) [24].
where P t is the transmission optical power of the LED AP, m is the Lambertian order, A is the active area of the UE, d is the distance between the LED AP and UE, T s (ψ) is the optical filter gain, and C(ψ) is the optical concentration gain. In addition, ψ c denotes the FOV of the UE. Next, we analyze the non-directed path optical channel. The non-directed path between the LED AP and UE is depicted in Figure 3. the optical filter gain, and ( ) is the optical concentration gain. In addition, denotes the FOV of the UE.
Next, we analyze the non-directed path optical channel. The non-directed path between the LED AP and UE is depicted in Figure 3. As can be seen in Figure 3, the non-directed path considers the first reflected wave. In this case, the distance from the LED AP to the reflection point of wall is 1 , incident angle is , distance from the reflection point to the UE is 2 , and reflection angle is . In addition, is the irradiation angle between the LED AP and the wall, and is the angle at which the UE receives optical power from the wall. Accordingly, the RSS from the -th LED AP through the non-directed path of the -th UE can be obtained using Equation (2) [24].
where is the surface element of the wall, and is the reflection coefficient of the wall. Furthermore, the range of is 0 ≤ ≤ . Then, according to (1) and (2), the overall RSS of the UE can be expressed using Equation (3) [24], and the corresponding RSS distribution is depicted in Figure 4.  As can be seen in Figure 3, the non-directed path considers the first reflected wave. In this case, the distance from the LED AP to the reflection point of wall is d 1 , incident angle is α, distance from the reflection point to the UE is d 2 , and reflection angle is β. In addition, θ r is the irradiation angle between the LED AP and the wall, and ψ r is the angle at which the UE receives optical power from the wall. Accordingly, the RSS from the i-th LED AP through the non-directed path of the u-th UE can be obtained using Equation (2) [24].
where dA wall is the surface element of the wall, and ρ is the reflection coefficient of the wall. Furthermore, the range of ψ r is 0 ≤ ψ r ≤ ψ c . Then, according to (1) and (2), the overall RSS of the UE can be expressed using Equation (3) [24], and the corresponding RSS distribution is depicted in Figure 4.
Sensors 2022, 22, 8125 5 of 13 the optical filter gain, and ( ) is the optical concentration gain. In addition, denotes the FOV of the UE.
Next, we analyze the non-directed path optical channel. The non-directed path between the LED AP and UE is depicted in Figure 3. As can be seen in Figure 3, the non-directed path considers the first reflected wave. In this case, the distance from the LED AP to the reflection point of wall is 1 , incident angle is , distance from the reflection point to the UE is 2 , and reflection angle is . In addition, is the irradiation angle between the LED AP and the wall, and is the angle at which the UE receives optical power from the wall. Accordingly, the RSS from the -th LED AP through the non-directed path of the -th UE can be obtained using Equation (2) [24].
where is the surface element of the wall, and is the reflection coefficient of the wall. Furthermore, the range of is 0 ≤ ≤ . Then, according to (1) and (2), the overall RSS of the UE can be expressed using Equation (3) [24], and the corresponding RSS distribution is depicted in Figure 4.

Proposed Positioning Scheme
In this section, the proposed positioning technique is explained. This technique uses fingerprinting, WkNN, and DNN. As mentioned in the Section 1, the fingerprinting technique and WkNN are used in the existing indoor positioning scheme. In the existing method, a large number of RPs are required to achieve high positioning accuracy. However, the positioning processing time of WkNN increases as the number of RPs increases. In addition, there are maintenance-related difficulties with changes in the actual indoor environment.
Therefore, this study aims to develop a positioning system that is characterized by fast processing time and precise positioning by reducing the number of RPs. To this end, we apply DNN, an AI technology. The core of the proposed method is using the approximate coordinates of the UE obtained through fingerprinting and WkNN as the inputs to the DNN model. The system flow is shown in Figure 5. The sequence of parameter determination is described in the subsections of this section.

Proposed Positioning Scheme
In this section, the proposed positioning technique is explained. This tech fingerprinting, WkNN, and DNN. As mentioned in the Section 1, the fingerpr nique and WkNN are used in the existing indoor positioning scheme. In t method, a large number of RPs are required to achieve high positioning accu ever, the positioning processing time of WkNN increases as the number of RP In addition, there are maintenance-related difficulties with changes in the ac environment.
Therefore, this study aims to develop a positioning system that is chara fast processing time and precise positioning by reducing the number of RPs. T we apply DNN, an AI technology. The core of the proposed method is using imate coordinates of the UE obtained through fingerprinting and WkNN as th the DNN model. The system flow is shown in Figure 5. The sequence of param mination is described in the subsections of this section.

Fingerprinting Method
Fingerprinting is a common method for indoor positioning and it can be u junction with RSS to achieve a higher positioning accuracy than that of the co techniques. The fingerprinting technique requires a DB that stores the RSS info the entire map on which positioning is to be performed. Therefore, the fingerpr nique consists of two steps. First, the offline stage involves collecting RSS da an RP. The RP is represented by specific coordinates in the entire map, and measured for each AP. The greater the number of RPs, the higher is the positi racy. However, when the number of RPs increases in an actual indoor enviro time required for DB construction and maintenance increase. In addition, the time for indoor positioning increases. Therefore, when initially determining t of RPs, two aspects should be considered, namely positioning accuracy and cessing time. Figure 6 shows the concept of measuring the RSS at RPs to construct a fin DB. In this study, the number of RPs is set to 16. The rationale for this choice later in the Simulation section. The RSS measured at each RP is stored in the fin

Fingerprinting Method
Fingerprinting is a common method for indoor positioning and it can be used in conjunction with RSS to achieve a higher positioning accuracy than that of the conventional techniques. The fingerprinting technique requires a DB that stores the RSS information of the entire map on which positioning is to be performed. Therefore, the fingerprinting technique consists of two steps. First, the offline stage involves collecting RSS data based on an RP. The RP is represented by specific coordinates in the entire map, and the RSS is measured for each AP. The greater the number of RPs, the higher is the positioning accuracy. However, when the number of RPs increases in an actual indoor environment, the time required for DB construction and maintenance increase. In addition, the processing time for indoor positioning increases. Therefore, when initially determining the number of RPs, two aspects should be considered, namely positioning accuracy and total processing time. Figure 6 shows the concept of measuring the RSS at RPs to construct a fingerprinting DB. In this study, the number of RPs is set to 16. The rationale for this choice is detailed later in the Section 4. The RSS measured at each RP is stored in the fingerprinting DB, which can be expressed as follows.
where h i r denotes the RSS between the i-th AP and the r-th RP. The constructed fingerprinting DB is later used to determine the approximate user position by means of WkNN.
where ℎ denotes the RSS between the -th AP and the -th RP. The cons printing DB is later used to determine the approximate user position by me

Weighted k-Nearest Neighbor (WkNN)
kNN is a machine learning method used to determine proximity throug comparison of each object. The WkNN method assigns higher weight to high proximity based on the proximity derived through kNN. To apply t indoor positioning, proximity is estimated using the available RSS informat the proximity between the RSS of each RP and the RSS of the actual UE is the DB constructed using the fingerprinting method. In kNN, proximity ca using two methods, namely the Euclidean distance method and the Manh method. Herein, we employ the Euclidean distance method, which is gene positioning. WKNN is performed as follows [20]. First, the RSS of the UE i follows.

Weighted k-Nearest Neighbor (WkNN)
kNN is a machine learning method used to determine proximity through feature data comparison of each object. The WkNN method assigns higher weight to the data with high proximity based on the proximity derived through kNN. To apply this method to indoor positioning, proximity is estimated using the available RSS information. Therefore, the proximity between the RSS of each RP and the RSS of the actual UE is obtained from the DB constructed using the fingerprinting method. In kNN, proximity can be obtained using two methods, namely the Euclidean distance method and the Manhattan distance method. Herein, we employ the Euclidean distance method, which is generally used for positioning. WKNN is performed as follows [20]. First, the RSS of the UE is expressed as follows.
where h i u represents the RSS value between i-th AP and the u-th UE. The Euclidean distance d u, r can then be computed as follows (Equation (6)) [20].
Then, the WkNN weight can be determined from the computed Euclidean distance. The smaller the computed Euclidean distance, the higher is the weight, and vice versa. The weight can be obtained using Equation (7) [20]. After obtaining the weights using Equation (7), the approximate UE location can be determined. The three-dimensional coordinates of the UE may be obtained using Equation (8) [20]. Figure 7 illustrates the processing step of WkNN. When the approximate coordinate of the UE are estimated following the aforementioned process, the execution of WkNN is completed and an input datum for training the DNN model is obtained.

Deep Neural Network (DNN)
DNN is an AI method that can be applied in various fields to a given input/output dataset. First, to train the DNN model, a dataset is constructed with the correct answers. In this study, the data for training the DNN model are constructed to perform indoor positioning. Hence, the trained DNN model outputs the three-dimensional coordinates of the UE. In the constructed training dataset, the input and output are expressed using Equations (8) and (9), respectively. = (ℎ , , , ) ( ℎ , = 1,2, … . ) where denotes the number of the APs transmitting the signal. As the input data for the DNN model, we employ the approximate positioning results between the AP and the UE, as obtained using RSS and WkNN. The output data of the DNN model are the final estimated coordinates of the UE.

Deep Neural Network (DNN)
DNN is an AI method that can be applied in various fields to a given input/output dataset. First, to train the DNN model, a dataset is constructed with the correct answers. In this study, the data for training the DNN model are constructed to perform indoor positioning. Hence, the trained DNN model outputs the three-dimensional coordinates of the UE. In the constructed training dataset, the input and output are expressed using Equations (8) and (9), respectively.
where i denotes the number of the APs transmitting the signal. As the input data for the DNN model, we employ the approximate positioning results between the AP and the UE, as obtained using RSS and WkNN. The output data of the DNN model are the final estimated coordinates of the UE. Table 1 presents the structure of the DNN model used in this study. As can be inferred from Table 1, the dropout technique was used in consideration of the generalization performance of the DNN model. The designed DNN model uses the Adam optimizer. The proposed DNN model is optimized in terms of two parameters, namely the number of layers and the learning rate. The performance of the optimized DNN model is as follows: training accuracy of the model = 95.57%, training loss = 0.0021, test accuracy = 99.37%, and testing loss = 0.00024. The training and test results indicate that the training and generalization performance of the proposed DNN model are reliable.

Parameter Determination
This subsection describes how to determine the number of RPs for indoor positioning, in addition to the parameters related to the design of the DNN model. First, the number of RPs was set through comparison with the triangulation method. The WkNN and kNN methods are dependent on the number of RPs. Therefore, as the number of RPs increases, the positioning accuracy increases. In Table 2, the positioning processing time and error are compared as the number of RPs is increased from 4 to 9 and 16. The comparison showed that WkNN offered advantages over the triangulation method in terms of processing time and positioning error when the number of RPs was 16. Therefore, the number of RPs was set to 16 in the proposed scheme. After determining the number of RPs, we optimized the hyperparameters of the DNN model. Among the hyperparameters, we optimized the number of layers and the learning rate. In Table 3, the performance of the DNN model for various numbers of layers is summarized. Here, the number of layers refers to the total number of layers, including inputs and outputs. According to Table 3, the four-layer structure achieved the best performance with an accuracy of 99.37% and a loss of 0.00024. In this case, the numbers of nodes in 1-4 layers of the four-layer structure were 7, 210, 50 and 3, respectively. The learning rate was fixed to 0.005. Next, the performance of the DNN model was tested in various learning rates and the results are summarized in Table 4. The learning rates were varied from 0.01 to 0.005 and 0.001. In this case, the DNN model of the four-layer structure was used based on the results summarized in Table 3. As presented in Table 4, when the learning rate was set to 0.005, the best test accuracy and positioning error were achieved. Hence, in this study, we set the number of RPs to 16 based on the aforementioned results and optimized the DNN model in terms of the number of layers and learning rate. The other simulation parameters are described in the following sections.

Simulation and Evaluations
In this section, the simulation parameter and results are presented and discussed. In Section 4.2, the performance of the proposed scheme is compared with that of the existing scheme.

Simulation Parameters
This section describes the parameters used in the simulation. The parameters themselves are listed in Table 5. The indoor environment was assumed as an empty space measuring 5 m × 5 m × 3 m. In total, four APs were used in the indoor environment and a total of 16 RPs were used, as summarized in Table 2. A total of 80,000 training datasets and 20,000 test datasets were used to train and test the DNN model, respectively. The simulation was repeated for 10,000 iterations, it was coded using MATLAB 2017b and Python 3.7.

Simulation Results and Discussion
In this section, the simulation results are presented and discussed. The simulation results are presented in terms of positioning accuracy and processing time. First, the positioning accuracy is computed using the DNN, which is depicted in Figure 8. Figure 8 shows the results obtained only for the directed path channel and those obtained for the overall channel. For the directed path channels, the triangulation technique yielded the lowest positioning error. Thus, the triangulation method can perform more accurate positioning than the WkNN and kNN in the directed path channel. In the overall channel, the positioning errors of the three techniques increased. In this case, the positioning errors of the WkNN and kNN algorithms, which perform fingerprinting-based positioning, were smaller than those of the triangulation method. According to these results, the positioning results obtained using these methods were more stable than those obtained using the triangulation method because these methods performed positioning using the fingerprinting method. Among these methods, the WkNN method yielded the lower positioning error of 0.0898 m. Hence, the approximate positioning results, which represent the input to the DNN model, influence the final positioning results of the DNN model.
were smaller than those of the triangulation method. According to these results, the positioning results obtained using these methods were more stable than those obtained using the triangulation method because these methods performed positioning using the fingerprinting method. Among these methods, the WkNN method yielded the lower positioning error of 0.0898 m. Hence, the approximate positioning results, which represent the input to the DNN model, influence the final positioning results of the DNN model. Next, the processing time is analyzed for the positioning. Herein, we proposed a method to train the DNN model by using the approximate positioning results obtained using WkNN. The processing time required to achieve the positioning error of 0.0898 m can be determined as follows. First, as summarized in Table 2, the execution time of the WkNN algorithm in an environment with 16 RPs is 0.00048 s. Then, when the approximate positioning results obtained using WkNN are input into the trained DNN model, the model requires 1-2 μs to generate an output. Hence, since the processing time of the DNN model is extremely short, the overall processing time is not affected significantly. Meanwhile, the DNN model improves the positioning accuracy and facilitates more precise positioning.

Conclusions
This paper presents a system that applies DNN based AI technology for accurate positioning in an indoor VLC environment. In particular, this work aims to improve the indoor positioning accuracy by optimizing the input data of the DNN model. First, it calculates the RSS between the AP and UE by analyzing the VLC environment. The obtained RSS is used as input data of the DNN model. Then, it obtains the training data of DNNs by using the fingerprinting techniques and WkNN methods, which are generally used for indoor positioning. Hence, the various data can be included for training the DNN model. The more the data, the better is the training and testing performance of the DNN model. The DNN model can be further improved through the optimization of hyperparameters. The proposed DNN model optimized the number of layers and learning rates. Hence, the proposed scheme attained an average positioning error of 0.0898 m with a processing time of 0.5 ms. The simulation results show that the positioning error was reduced and a lower processing time achieved in an indoor environment. Further work can include building a testbed in order to verify the performance of the proposed method in a real environment. Next, the processing time is analyzed for the positioning. Herein, we proposed a method to train the DNN model by using the approximate positioning results obtained using WkNN. The processing time required to achieve the positioning error of 0.0898 m can be determined as follows. First, as summarized in Table 2, the execution time of the WkNN algorithm in an environment with 16 RPs is 0.00048 s. Then, when the approximate positioning results obtained using WkNN are input into the trained DNN model, the model requires 1-2 µs to generate an output. Hence, since the processing time of the DNN model is extremely short, the overall processing time is not affected significantly. Meanwhile, the DNN model improves the positioning accuracy and facilitates more precise positioning.

Conclusions
This paper presents a system that applies DNN based AI technology for accurate positioning in an indoor VLC environment. In particular, this work aims to improve the indoor positioning accuracy by optimizing the input data of the DNN model. First, it calculates the RSS between the AP and UE by analyzing the VLC environment. The obtained RSS is used as input data of the DNN model. Then, it obtains the training data of DNNs by using the fingerprinting techniques and WkNN methods, which are generally used for indoor positioning. Hence, the various data can be included for training the DNN model. The more the data, the better is the training and testing performance of the DNN model. The DNN model can be further improved through the optimization of hyperparameters. The proposed DNN model optimized the number of layers and learning rates. Hence, the proposed scheme attained an average positioning error of 0.0898 m with a processing time of 0.5 ms. The simulation results show that the positioning error was reduced and a lower processing time achieved in an indoor environment. Further work can include building a testbed in order to verify the performance of the proposed method in a real environment.