Next Article in Journal
Atmospheric Turbulence Effects on the Performance of Orbital Angular Momentum Multiplexed Free-Space Optical Links Using Coherent Beam Combining
Next Article in Special Issue
A Review of Advanced Transceiver Technologies in Visible Light Communications
Previous Article in Journal
The Analysis and Experiment of Pixel-Matching Method for Space-Dimensional Dual-Coded Spectropolarimeter
Previous Article in Special Issue
A Review on Image Sensor Communication and Its Applications to Vehicles
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Indoor Visible-Light 3D Positioning System Based on GRU Neural Network

College of Information Engineering, Inner Mongolia University of Science and Technology, Baotou 014010, China
*
Author to whom correspondence should be addressed.
Photonics 2023, 10(6), 633; https://doi.org/10.3390/photonics10060633
Submission received: 17 April 2023 / Revised: 26 May 2023 / Accepted: 28 May 2023 / Published: 31 May 2023
(This article belongs to the Special Issue Advances in Visible Light Communication)

Abstract

:
With the continuous development of artificial intelligence technology, visible-light positioning (VLP) based on machine learning and deep learning algorithms has become a research hotspot for indoor positioning technology. To improve the accuracy of robot positioning, we established a three-dimensional (3D) positioning system of visible-light consisting of two LED lights and three photodetectors. In this system, three photodetectors are located on the robot’s head. We considered the impact of line-of-sight (LOS) and non-line-of-sight (NLOS) links on the received signals and used gated recurrent unit (GRU) neural networks to deal with nonlinearity in the system. To address the problem of poor stability during GRU network training, we used a learning rate attenuation strategy to improve the performance of the GRU network. The simulation results showed that the average positioning error of the system was 2.69 cm in a space of 4 m × 4 m × 3 m when only LOS links were considered and 2.66 cm when both LOS and NLOS links were considered with 95% of the positioning errors within 7.88 cm. For two-dimensional (2D) positioning with a fixed positioning height, 80% of the positioning error was within 9.87 cm. This showed that the system had a high anti-interference ability, could achieve centimeter-level positioning accuracy, and met the requirements of robot indoor positioning.

1. Introduction

With the progress of human beings and the development of technology, the application scenarios of robots have become more complex and diversified, and robots need to complete more difficult and intelligent work. In order to improve the efficiency and performance of robots, the positioning and navigation of autonomous robots are essential. At present, wireless positioning technologies such as wireless local area networks (WLANs), Bluetooth, radio frequency identification (RFID), ZigBee, and ultra-wideband (UWB) are commonly used for indoor positioning [1,2,3,4,5], but these wireless technologies generally have disadvantages such as high electromagnetic radiation, high deployment costs, and low positioning accuracy [6]. Compared with these wireless technologies, visible-light has the advantages of abundant bandwidth resources, no electromagnetic pollution, and low equipment costs, and it can achieve lighting and positioning at the same time. As a new type of wireless positioning technology, visible-light positioning based on LED has become a research hotspot in the field of wireless positioning [7].
In recent years, with the development of artificial intelligence, machine learning and deep learning algorithms, with their strong self-learning and generalization abilities, have become able to provide accurate positioning results in the context of VLP, and increasing numbers of people have applied them to indoor visible-light positioning. Abu Bakar et al. [8] use a weighted k-nearest neighbor (WKNN) algorithm for localization in a fingerprint recognition technique based on received signal strength (RSS). The results show that the positioning accuracy of the WKNN algorithm is better than that of the multi-layer perceptron (MLP)-based regressor. In addition to using a single ML algorithm, multiple ML algorithms can also be used for fusion localization. Huy Q. Tran et al. [9] use a dual-functional ML algorithm leveraging machine learning classification (MLC) and machine learning regression (MLR) functions to improve localization accuracy under the negative effects of multipath reflection. They use ML classification functions to divide the floor of a room into two separate zones. Then, the regression function of the ML algorithm is used to predict the position of the optical receiver. ML algorithms can also analyze and optimize other parameters. Sheng Zhang et al. [10] use neural networks to reduce position offset errors caused by uneven initial delay patterns of off-the-shelf LEDs. However, applying ML algorithms in VLP also has limitations, as they often require propagation of near-ideal behavior of the model and its parameters to perform well, and ML algorithms are too data-dependent and require a lot of time to be measured offline. We can obtain the data set by linear fitting, which can effectively reduce the offline measurement time. In addition, the parameter settings in the ML algorithm have a great influence on the positioning results, and the best model is not obtained frequently. Therefore, we need to call parameters or process them using optimization algorithms.
At present, most work on indoor visible-light localization has focused on two-dimensional positioning, assuming a fixed receiver height and ignoring positional errors due to height variation [11,12,13]. In the future, robots will need to complete a variety of difficult actions, so their positioning height cannot be limited, and they will require accurate and reliable three-dimensional positioning covering indoor areas. However, some 3D visible-light positioning systems use hybrid algorithms [14,15,16], which greatly increase the complexity of the system. In order to improve the accuracy of robot positioning and reduce system complexity, we proposed a three-dimensional indoor visible-light localization system based on a GRU neural network. We use three PDs as receivers and two LED light sources as transmitters, each LED sends signals of different frequencies. The signals collected by PD are filtered to obtain two signals of different frequencies. When data is processed, it is usually processed sequentially, so the collected data can be considered a kind of sequential data. Recurrent neural networks are very efficient for data with sequential properties, and can mine time series information from the data. The GRU network is a variant of the recurrent network, which can automatically extract effective features from experimental data, so as to obtain high positioning performance, and the localization model structure is simple and converges easily. In this study, considering the influence of LOS and NLOS links on the received signal strength, the GRU algorithm was applied to a three-dimensional indoor visible-light positioning system; a fingerprint database was established using the optical power value and position data received by the PD and then substituted into the GRU neural network to train the model; and, finally, the position information was predicted by the trained model, and the feasibility of the proposed algorithm was proved by simulations. As far as we know, the traditional 3D VLP positioning method requires the use of three or more LEDs to accurately position and does not consider wall reflections [17,18]. In addition, they usually use multiple localization algorithms in the selection of positioning algorithms, which makes the VLP system model complex. Compared to these articles, our proposed VLP system uses only two LEDs and a new receiver model, which is lower cost and easier to implement. We only use one positioning algorithm to achieve accurate three-dimensional positioning, and the system complexity is low. We analyze the influence of positioning height on the VLP system.
The rest of this paper is organized as follows: Section 2 describes the composition of the visible-light localization system model. Section 3 describes the principles of the GRU neural network. Then, in Section 4, the application of the GRU neural network for visible-light localization is described. Finally, the positioning results are discussed in Section 5, and the performance of the visible-light positioning system is analyzed.

2. Visible-Light Positioning Model

2.1. System Model

The indoor visible-light localization model designed in this study is shown in Figure 1. The room size was set to 4 m × 4 m × 3 m, and the corner of the room was used as the origin to establish the Cartesian coordinate system of the space. We used two LEDs as transmitters, placed on the ceiling, and each LED sent signals of different frequencies.
To fully receive the signal sent by the transmitter, we used three PDs as receivers, which were located in front of the robot’s head, on the left at the rear, and on the right at the rear. The model structure of the robot head receiver is shown in Figure 2, which represents the robot head as a hemispherical model, and the three PDs on the head and the top center point are equidistant. In this robot head receiver model, the top center point O was used as the test point; r is the radius of the hemisphere; l is the length of the arc between point O and PDi; α i i = 1 , 2 , 3 is the azimuth angle of PDi; θ is the central angle of the arc between point O and PDi; and β 0 < β < 90 ° is the elevation angle of PDi, which can be expressed as the following.
β = θ = l / r
Therefore, the relationship between the position x i , y i , z i of PDi and the position x 0 , y 0 , z 0 of the top center point O is
x i = x 0 + L cos α i y i = y 0 + L sin α i z i = z 0 H ,
where L is the horizontal distance between point O and PDi, and H is the vertical distance between point O and PDi. L and H can be expressed as the following.
L = r sin β ,
H = r 1 cos β .

2.2. Channel Model

The indoor visible-light channel model is shown in Figure 3 for the direct link model and the reflected link model, respectively. For an LOS link model, the indoor optical signal transmission link is short, so the attenuation of the optical signal caused by absorption and scattering is small. However, for an NLOS link model, because the indoor walls, floors, and other objects with reflection characteristics cause the diffuse reflection of the optical signal, the optical signal transmission link becomes longer, increasing the attenuation of the optical signal. Therefore, we considered the transmission of optical signals through LOS and NLOS links. This not only conformed to the real-world environment but also allowed further study of the adverse effects of reflection on system performance, making the positioning system more reliable and practical.
In the LOS link model, the relationship between the received power P L O S of the PD and the LED transmitted power P t can be expressed as [19].
P L O S = P t H L O S 0 ,
where H L O S 0 is the DC gain of the LOS link. Assuming that the LEDs obey the Lambert radiation model, H L O S 0 can be expressed as [20]
H L O S 0 = m + 1 A P D 2 π d 2 cos m ϕ T s ψ g ψ cos ψ , 0 ψ ψ F O V 0 , ψ > ψ F O V ,
where A P D is the effective receiving area of the PD; d is the distance from the PD to the LED; m is the Lambertian emission order; ϕ is the emission angle of the LED; T s ψ is the optical filter gain; g ψ is the gain of the optical concentrator; and ψ and ψ F O V are the incidence and field-of-view (FOV) angles of the PD, respectively. m and g ψ can be expressed as [21]
m = ln 2 ln cos ϕ 1 / 2 ,
g ψ = n 2 sin 2 ψ F O V , 0 ψ ψ F O V 0 , ψ > ψ F O V ,
where ϕ 1 / 2 is the semi-angle at half-power of the LED emitters, and n is the internal refractive index of the optical concentrator. In this paper, two LEDs placed on the ceiling were used as light sources, and three PDs placed on the hemispherical surface were used as receivers. Each PD had a certain inclination angle, and the radiating angle cosine of the LED and the incidence angle cosine of the inclined PD could be expressed as [22]
cos ϕ = h d ,
cos ψ = v P D _ L E D n P D v P D _ L E D n P D ,
where h is the vertical height of the LED in relation to the PD; v P D _ L E D is the direction vector from the PD to the LED; and n P D is the normal vector of the PD receiving surface, which can be expressed as
n P D = cos α r sin β r , sin α r sin β r , cos β r ,
where α r and β r are the azimuth and tilt angles of the PD, respectively. If the LED position coordinates were x t , y t , z t , and the PD position coordinates were x r , y r , z r , then from Equations (10) and (11) we could obtain the incidence angle cosine of the inclined PD to receive LED light as follows:
cos ψ = x t x r cos α r sin β r + y t y r sin α r sin β r + z t z r cos β r x t x r 2 + y t y r 2 + z t z r 2 .
In a primary reflective NLOS link, the relationship between the received power P N L O S of the PD and the LED transmitted power P t can be expressed as
P N L O S = P t H N L O S 0 ,
where H N L O S 0 is the DC gain of the primary reflected NLOS link, which can be expressed as [23]
H NLOS 0 = j N A PD m + 1 ρ Δ A 2 π 2 d 1 j 2 d 2 j 2 cos m ϕ 1 j cos ψ 1 j cos ϕ 2 j cos ψ 2 j T s ψ 2 j g ψ 2 j , 0 ψ 2 j ψ F O V 0 , ψ 2 j > ψ F O V ,
where N indicates the number of all reflective walls divided by Δ A as the area element; ρ is the reflectivity of the wall; d 1 j is the distance between the LED and the wall reflective element; d 2 j is the distance between the wall reflective element and the PD; ϕ 1 j is the LED emission angle; ψ 1 j and ϕ 2 j are the incidence and emission angles of the wall reflective element, respectively; and ψ 2 j is the incidence angle of the PD. If the normal vector n w , j of the wall reflecting element is
n w , j = cos α w , j sin β w , j , sin α w , j sin β w , j , cos β w , j ,
where α w , j and β w , j are the azimuth and tilt angles of the wall reflector element, respectively, then the cosine corresponding to ϕ 1 j , ψ 1 j , ϕ 2 j , and ψ 2 j can be expressed as
cos ϕ 1 j = h 1 j d 1 j ,
cos ψ 1 j = x t x w , j cos α w , j sin β w , j + y t y w , j sin α w , j sin β w , j + z t z w , j cos β w , j d 1 j ,
cos ϕ 2 j = x r x w , j cos α w , j sin β w , j + y r y w , j sin α w , j sin β w , j + z r z w , j cos β w , j d 2 j ,
cos ψ 2 j = x w , j x r cos α r sin β r + y w , j y r sin α r sin β r + z w , j z r cos β r d 2 j ,
where h 1 j is the vertical height of the LED in relation to the wall reflector element, and x w , j , y w , j , z w , j are the position coordinates of the wall reflector element.
In the VLP system, each LED is installed in a vertical ceiling downward fashion, with its half-power half-angle set to 30°, which means the amount of light that the ceiling receives directly from the LED bulb is limited. We design the robot’s shell with a low-reflectivity material, so we do not take into account the reflection of the robot itself. The receiver is mounted on the robot’s head, and the reflection from the floor is blocked by the robot. In addition, because the optical power reflected more than twice will be less than the noise power, it can be ignored [24]. In this study, only the primary reflection of the four walls of the room was considered, which can reduce the complexity of the light propagation path. This is simpler for VLP system design and implementation. Compared with multiple reflections, the transmission path stability of NLOS transmission is higher, and the signal quality and stability are relatively better. The received power P r of the PD during the transmission of the indoor LED light signal in the LOS link and NLOS link model could be expressed as [25] the following:
P r = P L O S + P N L O S .

3. GRU Neural Network Model

As general recursion neural networks (RNNs) present the problems of long-term dependence and gradient explosion [26], Hochreiter and Schmidhuber proposed the long short-term memory (LSTM) neural network in 1997. This network contains input, forget, and output gates that control input, memory, and output values, respectively [27]. Therefore, the LSTM network can effectively solve the problem of gradient vanishing and gradient explosion and is highly effective for large-scale problem processing; thus, it is widely used. The GRU network was proposed by Kyunghyun Cho et al. in 2014. This is a highly effective variant of the LSTM network [28], and the basic GRU unit structure is shown in Figure 4.
In a classical GRU network, the forward propagation equation at moment t is as follows:
r t = σ x t W r x + h t 1 W r h + b r ,
z t = σ x t W z x + h t 1 W z h + b z ,
h t ˜ = tanh x t W h x + r t h t 1 W h h + b h ,
h t = 1 z t h t 1 + z t h t ˜ ,
y t = σ W o h t + b o ,
where and denote matrix multiplication and matrix dot product, respectively; W r x , W r h , W z x , W z h , W h x , W h h , and W o are the hidden layer weights; b r , b z , b h , and b o are the hidden layer biases; x t is the input at moment t ; h t 1 is the hidden layer output state at moment t 1 ; r t and z t are the reset gate and update gate, respectively; h t ˜ is the candidate set state at moment t ; h t is the hidden layer output state at moment t ; y t is the output at moment t ; and σ and tanh are activation functions. In general, σ is a sigmoid function, which can be expressed as
σ x = 1 1 + e x ,
and tanh is a tangent function, which can be expressed as
tanh x = e x e x e x + e x .
As with LSTM networks, GRU networks can also overcome the long-term dependency problem of traditional RNNs; however, the GRU network integrates the input and forget gates of the LSTM network into a single update gate, so the only two gates in the GRU network are the reset and update gates. In Equation (21), the reset gate r t controls the extent to which the hidden layer output state h t 1 at moment t 1 is passed to the candidate set h t ˜ at moment t . In Equation (22), the update gate z t determines the extent to which the output state h t 1 at moment t 1 is carried to moment t . In Equation (23), the candidate set state h t ˜ uses the reset gate r t to store past information. This is because the output of the reset gate will proceed through the sigmoid function, and each element in its output matrix is between 0 and 1, so the reset gate will control the size of the gate opening; a value closer to 1 indicates that more information is memorized. In Equation (24), the update gate z t determines how much of the candidate set state information h t ˜ at moment t and h t 1 at moment t 1 will be retained, and the retained information is used as the output state information h t of the hidden layer at moment t . For Equation (25), using the hidden layer output state h t at moment t as the output y t at moment t is generally straightforward, i.e.,
y t = h t .
The output at time t is passed to time t + 1 to continue forward propagation as the input at time t + 1 .
We compared the commonly used recurrent neural networks, employing identical parameter settings. As shown in Table 1, ensuring prediction accuracy, the model complexity of the GRU network is lower than that of the LSTM model, which not only reduces the training parameters, but also accelerates the network training time.

4. Positing Process

4.1. Construction of Fingerprint Database

The robot moves in an indoor space area, and the maximum height during its activities is uncertain. In this study, we took the average height of a person, 1.7 m, as the maximum height during robot activity. Therefore, a volume of 4 m × 4 m × 1.7 m in the room was used as the positioning space, divided into sections of 0.18 m × 0.18 m × 0.18 m. The four vertices of each small square area after division were used as reference points, the robot head receiver model was placed at each reference point, and the top center point coincided with the reference point. We used three PDs to acquire optical signals and then filtered them. Thus, we obtained two signals of different frequencies and calculated their optical power values. Finally, we recorded the optical power value and position coordinates obtained at the reference point in the fingerprint database. The fingerprint data at the k -th reference point can be expressed as:
F k = P k 11 P k 12 P k 21 P k 22 P k 31 P k 32 x k y k z k ,
where P k i j i = 1 , 2 , 3 ; j = 1 , 2 is the optical power value of the j -th LED light source received by the i -th PD at the k -th reference point, and x k , y k , z k are the position coordinates at the k -th reference point. Therefore, the VLP fingerprint database F d b could be constructed as
F d b = F 1 F 2 F N T ,
where N is the number of reference points.
After dividing the positioning space into 0.18 m × 0.18 m × 0.18 m sections, the data obtained at the reference point were used as the training set. In addition, the positioning space was divided into 0.24 m × 0.24 m × 0.24 m sections, and the data obtained at this reference point were used as the test set. The training set was used to train the network model and provide it with a predictive ability, and the test set was used to evaluate the performance of the trained network model.

4.2. Data Preprocessing

GRU neural networks are very sensitive to input data, so we needed to normalize the input data. This process involved mapping the input data onto the same dimension, so that data of different dimensions had equal importance in the network. This not only improved the speed of network convergence, but also eliminated the influence of dimensions on the final result. We normalized the input data using
x n o r m = x x min x max x min ,
where x is the input data for the training set, x min is the minimum value of all input data in the training set, x max is the maximum value of all input data in the training set, and x n o r m is the normalized input data.
In addition, the GRU network required three-dimensional tensor inputs, so the input data needed to be converted into three-dimensional tensors before they were fed into the network. The input of the network was the optical power data, so the power data needed to be converted into three-dimensional tensors. The converted k -th power data could be represented as
I k = P k 11 P k 12 P k 21 P k 22 P k 31 P k 32 .
Then, the input data could be expressed as
I = I 1 I 2 I n T ,
where n is the number of input data, and the shape of input data is n , 3 , 2 .

4.3. Selection of Performance Indicators

We used the mean squared error (MSE) and root mean squared error (RMSE) to evaluate the performance of the GRU network and VLP models.
The loss and evaluation functions of the GRU network model used MSE, which could effectively represent the error between the predicted and actual output of the network. In the process of neural network training, the gradient obtained by the loss function was input into the optimizer for gradient descent, and then the network weight was updated by backpropagation. We repeatedly trained the network to continuously improve its predictive capabilities. Finally, the test set was substituted into the trained network model for evaluation, and the network performance was evaluated by MSE. The MSE was calculated as follows:
e M S E = 1 N i = 1 N x ^ i x i 2 + y ^ i y i 2 + z ^ i z i 2 ,
where N is the number of sample sets, x i , y i , z i are the true values of the i -th sample point of the sample set, and x ^ i , y ^ i , z ^ i are the predicted values of the i -th sample point of the sample set.
In the positioning process, the RMSE could better reflect the relationship between the predicted and true positions, so the RMSE was used to calculate the VLP error. The RMSE between the true and predicted coordinates of the k -th reference point could be expressed as
e k = x ^ k x k 2 + y ^ k y k 2 + z ^ k z k 2 ,
where x k , y k , z k are the true coordinates of the k -th reference point in the test set, and x ^ k , y ^ k , z ^ k are the predicted coordinates of the k -th reference point in the test set. Therefore, the average positioning error was
e ¯ = 1 N k = 1 N e k .

4.4. Building the GRU Network Model

We used the Python 3.9 compiler for the experiments and Tensorflow 2.6 and the Keras 2.6 deep learning framework to build the GRU network models. When building a network model, its initial weights are random, and so the predictions of the trained model differ each time. Therefore, in order to achieve reproducible experimental results, we had to fix the random seed before building the network model. In addition, in the process of network model construction, one must manually configure the number of GRU network layers and the number of neurons in the network layer. Furthermore, before training the network, one must also set the hyperparameters, such as the learning rate, number of iterations, and batch size. These parameters affect the complexity and performance of a model, so they need to be set appropriately. Below, we present the comparison and analysis of different hyperparameter values.
To explore the influence of the number of neurons on the accuracy of the model, we compared the values at intervals of eight.
As shown in Figure 5, the average positioning error was lower when the number of neurons in the GRU network layer was 24. However, the complexity of the model also increased when the number of neurons exceeded 24, and the average positioning error did not change significantly with an increase in the number of neurons. Therefore, the number of neurons in the GRU layer of the network model was set to 24.
After settling on 24 network neurons, we analyzed the influence of the number of GRU network layers on the model performance.
From Table 2, one can see that the mean squared error and average localization error of the GRU network were smaller when the number of layers was two, and the model performance was improved. Furthermore, as the number of network layers increased, the error increased. When the number of layers is greater than two, increasing the number of layers of the network requires assigning more weights and training time to the network, which will lead to increased complexity of the network model and overfitting of the model, reducing the accuracy of the model. Therefore, we set the number of layers in the GRU network to two.
The batch size is the number of samples selected for training at one time, and backpropagation is performed by calculating the gradient of these samples, so it affects the degree of optimization and speed of a model.
In this study, the compared batch sizes were 16, 32, 64, 128, and 256. From Table 3, one can see that when the batch size was too small, the gradient of calculation was unstable due to the paucity of samples, and the network did not easily converge, causing the model accuracy to decrease. However, the network generalization ability was reduced when the batch size was too large, though the network model error did not change significantly. Table 3 also shows that the training time decreased as the batch size increased. According to our comparative analysis, the model was more effective when the batch size was set to 128.
Table 4 shows the effect of the learning rate on the model performance. The model performance was more favorable when the learning rate was set to 0.01, and the decreasing curve of the network loss function is shown in Figure 6.
Figure 6 shows that when the number of iterations was around 950, the downward curve of the loss function was relatively flat, and there was no downward trend in subsequent iterations. To prevent overfitting and reduce training time, the maximum number of iterations of the network set to 950.
During network training, the gradient descent was slow when the learning rate was too small; thus, the training time needed to be increased to bring the model closer to the local optimum. However, the gradient decreased quickly when the learning rate was too large. Oscillation is easy in the later stage of training, but stabilization to local optimality is not straightforward, and gradient explosion may occur. In order to ensure that the network converged quickly at the beginning of training and more effectively at the end of training, we proposed a strategy to adjust the learning rate dynamically. Thus, the learning rate decay curve could be expressed as:
l r e p o c h = a 1 + exp c ( e p o c h b ) ,
where e p o c h is the iteration number of network training, and a , b , and c are set values, satisfying a > 0, b > 0, and c > 0. Here, a is the upper convergence boundary of the learning rate decay curve, and the value of l r 0 is a / 1 + exp b c when e p o c h = 0. If exp b c << 1, l r 0 is closer to a . Therefore, a can be regarded as the initial learning rate. In this study, a = 0.01 was adopted. The value denoted as b is the inflection point of the curve; l r is larger in the interval of e p o c h 0 , b , so the gradient descent is faster and the network converges rapidly. Additionally, l r decreases continuously after e p o c h = b , so the gradient descent slows down, which effectively suppresses the gradient oscillation it the late training period, and the network is more easily stabilized to the local optimum. The component c is related to the decrease in the curve at the inflection point; the higher the value of c , the faster the curve falls at the inflection point. Based on continuous testing, the average positioning error was small when a = 0.01, b = 700, and c = 0.02, and the corresponding learning rate decay curve is shown in Figure 7.
As shown in Table 5, the learning rate decay strategy proposed in this paper corresponded to a higher VLP system accuracy, indicating that the method was effective.
Therefore, the GRU network model was constructed according to the parameters established above, and its structure is shown in Figure 8.
The model contained an input layer and three output layers, that is, the power data were input into the network, and the output comprised three coordinates. The hidden layer used three identical network structures, each containing two GRU network layers. In order to transform the data format of the GRU layer output into the final output data format, a dense layer was added before the output layer, and the network model parameters are shown in Table 6.

5. Simulation Results and Analysis

To verify the localization performance of the proposed algorithm, a simulation environment was built according to the indoor visible-light localization model in Figure 1. We placed the hemispherical surface receiver model at each reference point in the positioning space and used three PDs on the hemispherical surface to acquire the signals sent by the two LEDs. The simulation parameters are shown in Table 7.
In the simulation, the LED emitted a cosine AC signal, and to ensure that the LED communicated while achieving normal lighting, we added a DC bias to the LED signal. At the receiving end, the phase of the AC signal received by the PD was related to the transmission path of the signal, and the phase of the received signal differed each iteration. To be realistic, a phase shift of k T was implemented for the LED emission signal in the simulation, where k 0 , 1 is a randomly generated value and T is the LED emission signal period.
We obtained the simulated fingerprint data from the VLP model, and the sizes of the training and testing sets were 5290 and 2312, respectively. The training set was substituted into the GRU neural network to train the model, and after the training was completed, the testing set was substituted into the trained model to predict the position. The three-dimensional positioning predicted using the GRU network model for the LOS link and LOS + NLOS link scenarios is shown in Figure 9.
Figure 9a,b show that as the positioning height increases, the deviation of the predicted location point from the actual location point increases. The positioning results in the corners are relatively poor. In addition, by comparing the positioning results in the z-axis direction of the LOS link and the LOS + NLOS link at a positioning height of 1.68 m, we find that the positioning results in the LOS + NLOS link are better.
Table 8 shows that the average localization error of the VLP model was 2.69 cm when only the LOS link case was considered, while the average localization error was 2.66 cm when both the LOS and NLOS link cases were considered. Figure 10 indicates that 95% of the positioning error was within 7.88 cm, showing that the model achieved centimeter-level positioning accuracy and met the needs of indoor positioning for robots.
In the study, we used the same GRU network structure to make separate predictions for x, y, and z coordinates. To study the GRU network’s prediction of x, y, and z coordinates, we analyze each coordinate error distribution separately. As can be seen from Figure 11, 90% of the errors in LOS + NLOS links are within 0.0265 m. Among them, the error in predicting the x-coordinate is the largest. As can be seen from Figure 1, the arrangement of LEDs in the x-axis direction has a greater influence on the optical signal received by the receiver.
To analyze the influence of the height on the accuracy of the model, we compared the two-dimensional positioning errors of the planes corresponding to different positioning heights. Table 9 shows the average and maximum positioning errors corresponding to the two-dimensional planes with the receiver placed at different heights under the LOS and LOS + NLOS link scenarios. When the positioning height was 0.24 m, the average positioning error of the model was the smallest for both LOS and LOS + NLOS links: the minimum values were 1.32 cm and 1.34 cm, respectively, and the maximum errors were 8.72 cm and 6.9 cm, respectively. However, when the positioning height was 1.68 m, the average positioning error of the model was the highest for both LOS and LOS + NLOS links, with maximum values of 7.75 cm and 7.84 cm, respectively, and maximum errors of 101.65 cm and 75.6 cm, respectively.
Figure 12 shows that 80% of the positioning errors were within 9.87 cm for different positioning heights under the LOS link and LOS + NLOS link scenarios, and 80% of the positioning errors were within 3.44 cm for positioning heights below 1.44 m. Moreover, the CDF curve of the positioning error produced by the proposed algorithm for the LOS and LOS + NLOS link scenarios was small, which indicated that the algorithm had a good generalization ability and robustness for locating different links. Therefore, we will only discuss the positioning results for LOS + NLOS links.
Figure 13 shows that when the positioning height was low, the errors were basically the same. When the positioning plane increased to a certain height, the positioning error also increased, and when the positioning height increased from 1.44 m to 1.68 m, this trend was more obvious. An analysis of Equations (15) and (27) reveals that the positioning error was mainly due to measurement errors related to the dc gain H L O S 0 and H N L O S 0 of the channel. When the positioning height increased, the emission angle of the LED light source also increased, and, according to Equations (4) and (12), this led to the higher attenuation of the optical signal, thereby increasing the error of the optical signal received by the PD and reducing the positioning accuracy.

6. Conclusions

We proposed an indoor visible-light three-dimensional positioning system based on a GRU neural network that solved the problem of the low positioning accuracy of existing robots. After the GRU network model was established, a learning rate attenuation strategy was proposed to improve the performance of the GRU network. A receiver placed on the robot’s head was used to collect optical power data and then predict position coordinates from the trained GRU neural network. The experimental results showed that the average 3D positioning error was 2.69 cm when considering only LOS links, while the average error was 2.66 cm when considering LOS and NLOS links at the same time, and 95% of the positioning error was within 7.88 cm. For two-dimensional positioning with a fixed positioning height, 80% of the positioning error was within 9.87 cm. When the positioning height was 0.24 m, the average positioning error of the model under LOS and LOS + NLOS link scenarios was 1.32 cm and 1.34 cm, respectively. Therefore, the proposed method could achieve centimeter-level positioning accuracy to meet the needs of indoor robot positioning.

Author Contributions

L.Q.: conceptualization, investigation, supervision, resources, and writing (review). W.Y.: conceptualization, methodology, investigation, data curation, formal analysis, software, writing (original draft and editing), and validation. X.H. and D.Z.: resources and visualization. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by the National Natural Science Fund Projects of China (62161041) and the Applied Technology Research and Development Fund Project of Inner Mongolia Autonomous Region (2021GG0104).

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

Not applicable.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Liu, H.; Darabi, H.; Banerjee, P.; Liu, J. Survey of wireless indoor positioning techniques and systems. IEEE Trans. Syst. Man Cybern. Part C (Appl. Rev.) 2007, 37, 1067–1080. [Google Scholar] [CrossRef]
  2. Zhuang, Y.; Yang, J.; Li, Y.; Qi, L.; El-Sheimy, N. Smartphone-based indoor localization with bluetooth low energy beacons. Sensors 2016, 16, 596. [Google Scholar] [CrossRef] [PubMed]
  3. Ruiz, A.R.; Granja, F.S.; Honorato, J.C.; Rosas, J.I. Accurate pedestrian indoor navigation by tightly coupling foot-mounted IMU and RFID measurements. IEEE Trans. Instrum. Meas. 2011, 61, 178–189. [Google Scholar] [CrossRef]
  4. Yan, D.; Kang, B.; Zhong, H.; Wang, R. Research on positioning system based on Zigbee communication. In Proceedings of the 2018 IEEE 3rd Advanced Information Technology, Electronic and Automation Control Conference (IAEAC), Chongqing, China, 12–14 October 2018; pp. 1027–1030. [Google Scholar]
  5. Monica, S.; Ferrari, G. UWB-based localization in large indoor scenarios: Optimized placement of anchor nodes. IEEE Trans. Aerosp. Electron. Syst. 2015, 51, 987–999. [Google Scholar] [CrossRef]
  6. Lin, P.; Hu, X.; Ruan, Y.; Li, H.; Fang, J.; Zhong, Y.; Zheng, H.; Fang, J.; Jiang, Z.L.; Chen, Z. Real-time visible light positioning supporting fast moving speed. Opt. Express 2020, 28, 14503–14510. [Google Scholar] [CrossRef] [PubMed]
  7. Chizari, A.; Jamali, M.V.; Abdollahramezani, S.; Salehi, J.A.; Dargahi, A. Visible light for communication, indoor positioning, and dimmable illumination: A system design based on overlapping pulse position modulation. Optik 2017, 151, 110–122. [Google Scholar] [CrossRef]
  8. Bakar, A.H.; Glass, T.; Tee, H.Y.; Alam, F.; Legg, M. Accurate visible light positioning using multiple-photodiode receiver and machine learning. IEEE Trans. Instrum. Meas. 2020, 70, 7500812. [Google Scholar] [CrossRef]
  9. Tran, H.Q.; Ha, C. Improved visible light-based indoor positioning system using machine learning classification and regression. Appl. Sci. 2019, 9, 1048. [Google Scholar] [CrossRef]
  10. Zhang, S.; Zhong, W.D.; Du, P.; Chen, C. Experimental demonstration of indoor sub-decimeter accuracy VLP system using differential PDOA. IEEE Photonics Technol. Lett. 2018, 30, 1703–1706. [Google Scholar] [CrossRef]
  11. Liu, R.; Liang, Z.; Yang, K.; Li, W. Machine learning based visible light indoor positioning with single-LED and single rotatable photo detector. IEEE Photonics J. 2022, 14, 7322511. [Google Scholar] [CrossRef]
  12. Hao, X.; Sun, W.; Chen, J.; Yu, C. Vertical measurable displacement approach for altitude accuracy improvement in 3D visible light positioning. Opt. Commun. 2021, 490, 126914. [Google Scholar]
  13. Alonso-González, I.; Sánchez-Rodríguez, D.; Ley-Bosch, C.; Quintana-Suárez, M.A. Discrete indoor three-dimensional localization system based on neural networks using visible light communication. Sensors 2018, 18, 1040. [Google Scholar] [PubMed]
  14. Jia, C.; Yang, T.; Wang, C.; Sun, M. High-Accuracy 3D Indoor Visible Light Positioning Method Based on the Improved Adaptive Cuckoo Search Algorithm. Arab. J. Sci. Eng. 2022, 47, 2479–2498. [Google Scholar]
  15. Hsu, L.S.; Chow, C.W.; Liu, Y.; Yeh, C.H. 3D Visible Light-Based Indoor Positioning System Using Two-Stage Neural Network (TSNN) and Received Intensity Selective Enhancement (RISE) to Alleviate Light Non-Overlap Zones. Sensors 2022, 22, 8817. [Google Scholar] [CrossRef]
  16. Zhang, Z.; Chen, H.; Zeng, W.; Cao, X.; Hong, X.; Chen, J. Demonstration of Three-Dimensional Indoor Visible Light Positioning with Multiple Photodiodes and Reinforcement Learning. Sensors 2020, 20, 6470. [Google Scholar] [CrossRef] [PubMed]
  17. Zhao, H.-X.; Wang, J.-T. A novel three-dimensional algorithm based on practical indoor visible light positioning. IEEE Photonics J. 2019, 11, 6101308. [Google Scholar] [CrossRef]
  18. Chen, Y.; Guan, W.; Li, J.; Song, H. Indoor real-time 3-D visible light positioning system using fingerprinting and extreme learning machine. IEEE Access 2019, 8, 13875–13886. [Google Scholar] [CrossRef]
  19. Nguyen, N.T.; Suebsomran, A.; Sripimanwat, K.; Nguyen, N.H. Design and simulation of a novel indoor mobile robot localization method using a light-emitting diode positioning system. Trans. Inst. Meas. Control 2016, 38, 305–314. [Google Scholar] [CrossRef]
  20. Wang, Z.; Liang, Z.; Li, X.; Li, H. Indoor Visible Light Positioning Based on Improved Particle Swarm Optimization Method with Min-Max Algorithm. IEEE Access. 2022, 10, 130068–130077. [Google Scholar] [CrossRef]
  21. Li, H.; Wang, J.; Zhang, X.; Wu, R. Indoor visible light positioning combined with ellipse-based ACO-OFDM. IET Commun. 2018, 12, 2181–2187. [Google Scholar] [CrossRef]
  22. Seguel, F.; Krommenacker, N.; Charpentier, P.; Soto, I. A novel range free visible light positioning algorithm for imaging receivers. Optik 2019, 195, 163028. [Google Scholar]
  23. Ghassemlooy, Z.; Popoola, W.; Rajbhandari, S. Optical Wireless Communications: System and Channel Modelling with Matlab®; CRC Press: Boca Raton, FL, USA, 2019. [Google Scholar]
  24. Fan, K.; Komine, T.; Tanaka, Y.; Nakagawa, M. The effect of reflection on indoor visible-light communication system utilizing white LEDs. In Proceedings of the 5th International Symposium on Wireless Personal Multimedia Communications, Honolulu, HI, USA, 27–30 October 2002; Volume 2, pp. 611–615. [Google Scholar]
  25. Tran, H.Q.; Ha, C. Fingerprint-based indoor positioning system using visible light communication—A novel method for multipath reflections. Electronics 2019, 8, 63. [Google Scholar] [CrossRef]
  26. Bengio, Y.; Simard, P.; Frasconi, P. Learning long-term dependencies with gradient descent is difficult. IEEE Trans. Neural Netw. 1994, 5, 157–166. [Google Scholar] [PubMed]
  27. Hochreiter, S.; Schmidhuber, J. Long short-term memory. Neural Comput. 1997, 9, 1735–1780. [Google Scholar] [CrossRef]
  28. Cho, K.; Van Merriënboer, B.; Gulcehre, C.; Bahdanau, D.; Bougares, F.; Schwenk, H.; Bengio, Y. Learning phrase representations using RNN encoder-decoder for statistical machine translation. arXiv 2014, arXiv:1406.1078. [Google Scholar]
Figure 1. Indoor visible-light positioning model.
Figure 1. Indoor visible-light positioning model.
Photonics 10 00633 g001
Figure 2. Robot head receiver model structure.
Figure 2. Robot head receiver model structure.
Photonics 10 00633 g002
Figure 3. Indoor visible-light channel model.
Figure 3. Indoor visible-light channel model.
Photonics 10 00633 g003
Figure 4. The basic unit structure of the GRU.
Figure 4. The basic unit structure of the GRU.
Photonics 10 00633 g004
Figure 5. Average localization error for different numbers of neurons.
Figure 5. Average localization error for different numbers of neurons.
Photonics 10 00633 g005
Figure 6. Loss function decline curve.
Figure 6. Loss function decline curve.
Photonics 10 00633 g006
Figure 7. Learning rate decay curve.
Figure 7. Learning rate decay curve.
Photonics 10 00633 g007
Figure 8. Structure of the GRU network model.
Figure 8. Structure of the GRU network model.
Photonics 10 00633 g008
Figure 9. Three-dimensional positioning predicted by GRU model.
Figure 9. Three-dimensional positioning predicted by GRU model.
Photonics 10 00633 g009
Figure 10. Cumulative distribution of positioning errors for LOS and LOS + NLOS links in 3D visible-light positioning system.
Figure 10. Cumulative distribution of positioning errors for LOS and LOS + NLOS links in 3D visible-light positioning system.
Photonics 10 00633 g010
Figure 11. Cumulative distribution of errors for predicting three coordinates in a LOS + NLOS link.
Figure 11. Cumulative distribution of errors for predicting three coordinates in a LOS + NLOS link.
Photonics 10 00633 g011
Figure 12. Cumulative distribution of two-dimensional positioning errors at different heights.
Figure 12. Cumulative distribution of two-dimensional positioning errors at different heights.
Photonics 10 00633 g012
Figure 13. Comparison chart of 2D positioning results on different positioning heights under LOS + NLOS link.
Figure 13. Comparison chart of 2D positioning results on different positioning heights under LOS + NLOS link.
Photonics 10 00633 g013aPhotonics 10 00633 g013b
Table 1. Comparison of positioning algorithms.
Table 1. Comparison of positioning algorithms.
Positioning AlgorithmMean Squared ErrorAverage Error (m)Maximum Error (m)Training ParametersTraining Time (s)
SimpleRNN0.088911.021821.999235475147.86
GRU0.000380.026660.7559616,923172.91
LSTM0.000450.035540.4677621,675234.57
Table 2. The influence of the number of GRU network layers on the accuracy of the model.
Table 2. The influence of the number of GRU network layers on the accuracy of the model.
Number of Network LayersMean Squared ErrorAverage Error (m)
10.004830.11334
20.000820.04432
30.002030.08636
40.002310.07098
50.004670.14691
Table 3. The influence of batch size on the accuracy of the model.
Table 3. The influence of batch size on the accuracy of the model.
Batch SizeMean Squared ErrorAverage Error (m)Training Time (s)
160.007140.157952015.49
320.001430.085391036.73
640.001760.07599617.59
1280.000820.04432388.47
2560.001060.06665247.98
Table 4. The influence of the learning rate on the accuracy of the model.
Table 4. The influence of the learning rate on the accuracy of the model.
Learning RateMean Squared ErrorAverage Error (m)
0.0050.000910.04544
0.0100.000820.04432
0.0150.001510.07569
0.0200.001930.08529
0.0250.007240.18912
Table 5. The effect of the proposed learning rate decay strategy and the learning rate setting of 0.1 on the accuracy of the model.
Table 5. The effect of the proposed learning rate decay strategy and the learning rate setting of 0.1 on the accuracy of the model.
Learning RateMean Squared ErrorAverage Error (m)Training Time (s)
0.010.000750.04131169.09
l r 0.000380.02660172.91
Table 6. GRU network model parameters.
Table 6. GRU network model parameters.
ParameterValue
Number of neurons in the GRU layer24
Number of neurons in the dense layer1
Batch size128
Number of iterations950
Learning rateEquation (37)
OptimizerAdam
Table 7. Main parameters of simulation experiment.
Table 7. Main parameters of simulation experiment.
ParameterValue
Room size (length × width × height)4 m × 4 m × 3 m
Height of positioning space0–1.7 m
(Training, testing) partition(0.18, 0.24) m
LED position (x, y, z)(1, 2, 3); (3, 2, 3)
LED   semi - angle   at   half - power   ( ϕ 1 / 2 )30°
Amplitude of LED signal10 V
Frequency of LED signal4 KHz and 5 KHz
Effective   area   of   PD   ( A P D )10−4 m2
Azimuth   angle   of   PDs   ( α 1 , α 2 , α 3 )0°, 135°, 225°
Radius of the robot receiver model ( r )0.15 m
Arc length from PD to the top center point ( l )0.05 m
Gain   of   optical   filter   T s ( ψ )1
Refractive index of optical concentrator ( n )1.5
FOV   of   PD   ( ψ F O V )90°
Refractive index ( ρ )0.8
Reflection   surface   element   area   ( Δ A )0.0225 m2
Filter sampling frequency15 KHz
Type of filterButterworth bandpass filter
Table 8. Performance comparison of 3D indoor visible-light localization models under different links.
Table 8. Performance comparison of 3D indoor visible-light localization models under different links.
LinkMean Squared ErrorAverage Error (m)
LOS0.000450.02687
LOS + NLOS0.000380.02660
Table 9. Comparison of 2D positioning errors at different positioning heights for LOS and LOS + NLOS links.
Table 9. Comparison of 2D positioning errors at different positioning heights for LOS and LOS + NLOS links.
Height (m)LOSLOS + NLOS
Average Error (m)Maximum Error (m)Average Error (m)Maximum Error (m)
00.016720.080930.017710.08095
0.240.013240.087190.013470.06899
0.480.014200.088670.013840.09652
0.720.017520.136330.016140.14298
0.960.019760.231780.019460.22707
1.200.024360.225310.023080.24067
1.440.031690.181350.030710.18333
1.680.077471.016540.078390.75597
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Yang, W.; Qin, L.; Hu, X.; Zhao, D. Indoor Visible-Light 3D Positioning System Based on GRU Neural Network. Photonics 2023, 10, 633. https://doi.org/10.3390/photonics10060633

AMA Style

Yang W, Qin L, Hu X, Zhao D. Indoor Visible-Light 3D Positioning System Based on GRU Neural Network. Photonics. 2023; 10(6):633. https://doi.org/10.3390/photonics10060633

Chicago/Turabian Style

Yang, Wuju, Ling Qin, Xiaoli Hu, and Desheng Zhao. 2023. "Indoor Visible-Light 3D Positioning System Based on GRU Neural Network" Photonics 10, no. 6: 633. https://doi.org/10.3390/photonics10060633

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop