1. Introduction
The Global Positioning System (GPS) is a widely used positioning technology [
1], but it suffers from significant attenuation in challenging environments due to various interference factors such as trees, walls, and ceilings. According to Kerem Özsoy [
2], GPS indoor localization can reach an accuracy of only approximately 7 m with the help of power amplifiers under various types of interference. This is insufficient to provide adequate services in the current complex indoor positioning scenarios. However, as urbanization progresses, complex and tall structures increasingly occupy people’s living environments, necessitating higher-precision positioning technologies when addressing the environment [
3].
Currently, the main research areas for indoor positioning technology include wireless fidelity (wi-fi) [
4], Bluetooth [
5], Zigbee [
6], radio frequency identification (RFID), infrared, ultrasonic, and visible light [
7], optical camera communication (OCC) [
8], light detection and ranging (Lidar) [
9], and ultra-wideband (UWB) [
10]. Wi-fi, Bluetooth, and Zigbee can achieve only limited positioning accuracy. While infrared, ultrasonic, and UWB can provide high-precision localization, they involve high construction costs. LED lights, as energy-efficient and environmentally friendly lighting sources, have become increasingly popular in people’s daily lives. In addition to being more accurate than traditional wireless positioning techniques, they have many advantages, such as low energy consumption, small multipath effects, environmental friendliness, harmlessness to humans, and long service life [
11]. Although the construction cost of replacing incandescent bulbs with LED lights indoors is currently high, the maintenance cost of LED lights is low, and the trend is toward more widespread use in future lighting scenarios. The signal reception devices for LED mainly include photodiodes (PDs) and cameras. Although the camera can achieve higher accuracy, it requires higher resolution and a wider field of view, and the computation is more complex. Therefore, this article focuses on simple and efficient PD-based visible light positioning. In recent years, many VLP positioning algorithms based on PD have been proposed and experimentally verified [
12], with an average positioning accuracy of centimeters.
Angle of arrival (AOA) [
13] and time difference of arrival (TDOA) [
14] localization systems exhibit good stability but are complex and tedious to implement, with strict requirements for equipment conditions. Received signal strength (RSS)-based localization has lower complexity and better feasibility with higher accuracy, despite poorer resistance to interference and instability in localization. Reliable anti-noise and anti-interference solutions would make localization systems more suitable for practical applications. Therefore, a visible light localization system based on RSS is constructed, utilizing the latest IoT development chip, ESP32, to address the issues of complexity, sidelobe effects, and frequency instability in current visible light experimental equipment, resulting in a stable, concise, small, and user-friendly experimental setup.
Moreover, the diffuse reflection of objects is unavoidable in all application environments. The complexity of wall geometry and reflection models in reality, along with the significant impact of diffuse reflection on RSS values, makes wall diffuse reflection one of the most challenging interferences to resolve. Based on our own experimental results, the localization accuracy without the wall surface diffuse reflection is 3.04 cm, while with the wall surface diffuse reflection it is 14.73 cm. The introduction of the wall surface diffuse reflection leads to an increase of approximately 3 to 4 times in the localization error.
Nazmi A. Mohammed [
15] also stated: “Diffuse reflection had a great impact on the localization error. For example, at the worst operating coordinates, the localization error was estimated to be 2 cm in the case of LOS, whereas it increased to 1.52 m in the case that included the effect of multipath propagation under the following specifications: a transmitted LED power of 1 W, 60° half-power transmitting angle, Rx with 70° FOV, 400 MHz noise BW, and walls with a reflectivity of 0.8”. Currently, there are some articles that have proposed solutions at the theoretical and methodological levels [
15,
16,
17,
18], but there are very few researchers who have addressed this problem in real-world scenarios.
To solve this problem, this paper models the impact of single-sided wall diffuse reflection on RSS values using the Lambertian model, and validates its effectiveness in actual localization. Therefore, the main contributions of this paper are summarized as follows:
Building a low-cost, stable, and strongly sidelobe-interference-resistant visible light positioning system;
Establishing a model for wall diffuse reflection and validating its effectiveness in practical VLP system.
2. Principle of the Proposed VLP System
Figure 1 illustrates the flow chart of the proposed visible light system, in which the LED at the transmitting end is modulated at different frequencies, and after spatial transmission, all LED signals are received by the PD and different LED signal strengths are identified and extracted through FFT. The signal strength is converted to the corresponding distance by the Lambertian model and the position is finally solved through the least squares method.
Indoor visible light transmission links can be distinguished in two aspects: whether the transmitter and receiver have directionality and whether there are obstacles between them. Therefore, it is divided into a line-of-sight (LOS) transmission link and non-line-of-sight (NLOS) transmission link. The LOS transmission link is preferred as the channel is not affected by the multipath.
We use RSS signal localization, which is based on the relationship between the LOS optical intensity and the position. This is an effective link in our optical localization process. Both the LED and PD channel models follow the Lambertian Emission law, which states that the radiation intensity in all directions after the surface reflection of incident light is completely diffuse is the same. The diffuse light intensity is proportional to the cosine of the incident angle and independent of the reflection direction. The received optical power by the PD is shown in Equation (1).
where
is the distance between the
LED and the receiver,
is the effective area of the PD at the receiver,
is the optical power of the
LED source,
is the angle of irradiance,
is the angle of incidence at the receiver,
is the gain of an optical filter, and
is the gain of an optical concentrator placed in front of the sensor [
19]. Generally speaking, when there is no lens or filter in front of the PD,
.
and
represent Lambertian orders of the detector and LED chip, respectively. They can be given by:
In order to analyze the relationship between the optical channel gain and the position information of the PD, we simplified the optical channel gain model. Specifically, we assumed that the LED and PD were placed horizontally; consequently, the incidence angle was equal to the radiation angle. The cosine function of the incidence angle satisfies the following equation:
represents the vertical height between the lamp and PD.
still represents the distance between the LED and the receiver. Therefore, the Lambertian formula can be simplified to:
Thus, the received signal strength (RSS) value for the line-of-sight (LOS) link is expressed as:
However, in practical situations, the impact of NLOS and environmental noise on visible light cannot be ignored. Among them, the impact of wall reflection is particularly severe.
According to the light reflection model, when the light beam emitted by the LED light source irradiates the wall, it will be scattered, resulting in diffuse reflected light. The intensity of the diffuse reflected light in different directions is proportional to the cosine of the incidence angle, and it is independent of the reflection direction. This behavior follows the Lambertian radiation law.
The process of wall diffuse reflection can be divided into two steps [
20]. First, the LED irradiates the wall, and then the wall diffuse reflection serves as a new light source. Finally, the diffuse reflected light is received by the photodetector (PD).
To calculate the overall DC gain, we need to consider the contributions from both the LED light source and the wall diffuse reflection. The intensity of the diffuse reflected light depends on the incident angle of the light beam on the wall, and is independent of the reflection direction.
Finally, the overall DC gain of diffuse reflection can be described as:
In Equation (6), as shown in
Figure 2, it can be seen that the geometry is similar to the line-of-sight (LOS) scenario, with two main differences. First, an additional term of
is introduced, which represents the infinitesimal integration area of the effective wall. Second, a term of
is included, which represents the coefficient of the wall surface diffuse reflection.
is the light source emission angle,
is the wall reception angle,
is the wall diffuse emission angle, and
is the PD reception angle. Similarly to Equation (1),
can be thought of as equal to 1.
We can consider Equation (6) in more depth.
,
, and
in the equation can be considered as constants under the condition that the LED, wall, and PD are constants.
can be calculated from
of Equation (5), which is also constant for a constant single LED. So, the constant parts will be generalized to
. However, for the four variables
,
,
,
,
, and
, we set up the red coordinate system in
Figure 2, assuming that the position of the LED is
, the current position of the microelement
of the wall is
, and the position of the PD is
. Then Equation (6) can be simplified as follows:
Of these elements, is fixed and known. As long as we specify the area range of the integration on the wall, the current position of the microelement of the wall is also known when traversing each microelement . Therefore, we want to calculate the gain from the wall reflection in this model. In fact, we need only to input the position of the PD, . Since is fixed, our input quantities are then only and of the PD.
Therefore, the final RSS value can be described as:
n denotes the other noise sources. Moreover, we mainly focus on the effect caused by the diffuse reflection of the wall; consequently, this paper temporarily ignores the impact of other noise sources [
19]. Among these, the amount of direct light obtained by our sensor is
, the amount directly related to distance is
, and the amount we need to remove is
. Thus, in the positioning stage, we suppress the interference of the wall’s reflection by
.
After obtaining the RSS value by removing the wall reflection according to Equations (5), (7), and (8), we will perform a three-sided localization based on the three modulation frequencies of the LED lights.
The transmitter LED adopts frequency division multiplexing, and the optical signal power obtained at the PD receiver is demodulated by fast Fourier transform to obtain the received RSS value of each lamp. According to Equation (5), the 3D distance between the PD and the LED light source with different emission frequencies can be calculated. According to the principle of trilateral positioning, it is necessary to know the 3D distance between at least three LEDs and the PD to solve the specific position of the PD, and these three LEDs cannot be in the same line. The principle of the RSS trilateral positioning in the 2D plane is shown in
Figure 3, where the three LED coordinates are, respectively,
, and
, and
. The coordinates of the PD at the receiver are
.
If the 3D distance between the PD and the three LEDs is calculated according to the signal attenuation law and according to the principle of trilateral positioning, Equation (9) can be given as follows:
Equation (9) is simplified and expressed as a matrix as follows:
As described in Equation (7), our diffuse model needs the PD localization to estimate the diffuse power
, but the position is unknown in the positioning process. Thus, we plan to use an iterative approach [
21] to refine the PD’s position from coarse estimation. Specifically, we first use the RSS value disturbed by the diffuse reflection to perform a coarse localization. Obviously, this position estimation is affected by diffuse reflections and is not accurate; however, it can provide us with an initial input location for the model. Then, we input the coarse localization result into the diffuse model, calculate the
, and subdivide the
from the
value, and then estimate the position using the new
RSS value. Thus, the positioning result is optimized. Then, the optimized positioning result is input into the diffuse reflection model again and optimizes the RSS value as well as the localization estimation, until the positioning results reach convergence. We set this convergence condition as the maximum difference between the two positioning results before and after it exceeds 1 cm. The overall process is shown in
Figure 4.
3. Hardware Construction
In the selection of the main control chip, careful consideration was given to the computing power requirements in the context of the Internet of Things. Therefore, the ESP32, a cost-effective powerful chip, was chosen as the main control chip (as shown in
Figure 5), The ESP32 is specifically designed for mobile devices, wearable electronics, and IoT applications, delivering industry-leading low-power performance, including fine-resolution clock gating, power-saving mode, and dynamic voltage scaling. It is equipped with a 32-bit dual-core processor operating at a CPU speed of 80 MHz, with the capability of reaching up to 240 MHz. The built-in wi-fi protocol supports multiple protocols including 802.11 b/g/n/d/e/i/k/r, enabling data transmission speeds of up to 150 Mbps [
22]. Additionally, the chip incorporates a comprehensive Bluetooth v4.2 standard, encompassing both traditional Bluetooth (BR/EDR) and Bluetooth Low Energy (BLE) [
23] functionalities.
In terms of photosensitive devices, the accurate demodulation of high frequency poses a significant challenge for this project. Therefore, a photosensitive device with a high sensitivity requirement is needed. For this purpose, the PIN-type photodiode (PD) OPT101 [
24] is selected, as illustrated in
Figure 6. The OPT101 offers a spectral range of 300 nm to 1000 nm. It exhibits wide linear output characteristics, making it highly suitable for detecting visible light emitted by LED lights. This detector module integrates a photodiode and a transconductance amplifier, providing a voltage signal as the final output. Hence, the conversion of this signal into usable data requires an analog-to-digital (AD) conversion module. The detector module demonstrates high responsivity and low dark current. By utilizing external resistors and capacitors, the responsivity and sampling bandwidth of the module can be adjusted accordingly.
The LED lamp driving modulation module is a crucial component of the transmitter module. In this paper’s experiment, PWM modulation is utilized for LED modulation. The LED driver module controls the current through the PWM wave transmitted by the ESP32, thereby adjusting the luminous frequency and power of the LED lamp. To achieve this, we employ the PT4115 as our current control chip.
The PT4115 [
25] is a continuous-mode inductive buck converter designed for the efficient driving of single or multiple series LEDs when the supply voltage exceeds the output voltage. The IC operates with an input voltage ranging from 5 V to 24 V, and the output current can be externally adjusted, with a maximum output current of 0.7 A. As depicted in
Figure 6, the PT4115 integrates power tubes and a high-end current detection circuit. The average output current can be set using an external resistor. Additionally, the output current can be reduced below the set value by applying a DC voltage or PWM signal to the DIM pin. The DIM pin supports both linear and PWM dimming. Applying a voltage of 0.2 V or less to the DIM pin turns off the output power tube, putting the IC into low-current standby mode.
The ESP32 has the capability to register devices in a cloud platform [
26], allowing for remote control and data upload as long as an internet connection is available. Cloud platforms can be categorized into three levels: infrastructure as a service (IaaS) as the underlying infrastructure, platform as a service (PaaS) in the middle layer, and software and services (SaaS) in the upper layer. The IoT cloud platform we employ is based on PaaS and follows the cloud service deployment model, typically categorized into public and non-public clouds (e.g., private cloud, hybrid cloud). Given the anticipated high number of simultaneous online users in this project, Ali Cloud is selected as our target cloud platform.
On the transmitter side, only the frequency and duty cycle of the LED need to be controlled, while the receiver may require extensive data uploading. To set up the ESP32 programming environment in the Arduino software (version 2.0.2), relevant support libraries such as Crypto, pubsubclient-2.8, and Arduino Json need to be downloaded. ESP-IDF also provides routines that allow for experimentation on both platforms.
Finally, on the transmitter side, the device is created on the Ali cloud platform, and the host computer program is written. The host computer can change the frequency and duty cycle of the relevant ESP32 to generate PWM waves by accepting input instructions. As shown in
Figure 7, a single ESP32 can drive up to 4 LEDs at different frequencies and duty cycles. The maximum number of devices that the host computer can control depends solely on the equipment limit of Ali Cloud.
At the receiving end, a host computer based on TCP is built, which can receive 12,000 values sampled by ESP32 per second and convert them into CSV files, as shown in
Figure 7.
Different components are spliced by drawing PCB using Jialichuang EDA platform. The PCB diagram and the physical diagram of the transmitter and receiver are shown in
Figure 8. Then, the LED controlled by the transmitter is placed horizontally on the bracket, and the receiver is placed on the car. At this point, the hardware construction of the experiment in this paper is completed, and the overall experimental scenario is shown in
Figure 9.
4. Diffusion Model in Real Scenes
The primary objective of this chapter is to obtain the parameters in each formula for real-world scenarios, aiming to establish the diffuse reflection model and line-of-sight (LOS) model for practical environments. In Equation (5), we need to determine two parameters, and , while in Equation (7), we need to determine two other parameters, and . Where , can be calculated from .
Therefore, our idea is to first obtain the parameters
and
through Equation (5), and then obtain the parameter
through Equations (7) and (8). The entire process is illustrated in
Figure 10 and is explained later in the paper.
First, we obtain the parameters
and
. According to Equation (5), we will fit the relationship between RSS value and distance, based on the positions of selected points and their corresponding
values, as well as the positions of the LED, in the absence of wall reflections. This process is illustrated in
Figure 10. Then, we obtain the parameters
and
for each LED. The fitting curve shown in
Figure 11 indicates a high accuracy, with fitting errors ranging from 1.92 to 4.39 cm.
Thus, we obtained three sets of relationships between
and distance, thereby obtaining the parameters shown in
Table 1.
The value provides for the computation of Equation (7).
Then we obtain the parameters . In the practical scenario, for ease of testing, we selected one line parallel to the wall and another perpendicular to the wall for testing purposes.
We can then subtract the obtained in the occluded wall case from the obtained in the exposed wall case as a real to obtain the for the real scene. By adjusting through a suitable range of values in Equation (7), when mean error between the calculated by the model and the real are least, they are matched. At this point, represents the LED’s luminous intensity and the wall’s diffuse reflection ratio, denoted as in the context of the study.
Subsequently, we can assess the correctness of the parameters by using points from another parallel line, as shown in
Figure 12. The red line is the
calculated by the model, and the blue line is the
obtained from the real scene. The average error of our model can reach 0.74% in the x-direction and 1.66% in the y-direction. We believe that such errors are sufficient to prove the correctness of our model in the presence of sampling fluctuations. The same operation will be performed on the other two LEDs. The optimal K values matched by the three LEDs are listed in
Table 1.
After determining the aforementioned parameters, we obtain the single-lamp–single-wall model, as shown in
Figure 13a. The variation along the
y-axis, i.e., the change in received light intensity as the PD moves along a line parallel to the wall surface, is shown in
Figure 13b. The variation along the
x-axis, i.e., the change in received light intensity as the PD moves along a line parallel to the wall surface, is shown in
Figure 13c.
Figure 13d shows the diffuse reflection intensity of the wall observed from a top-down perspective, and it can be seen that it is attenuated outwardly centered at a point.
After completing the above preparations, we will conduct formal experiments under the conditions of uncovering and obstructing the wall. We will collect trajectory data separately for the obstructed and exposed wall surfaces, and then use the model we established to correct the trajectory data for the exposed wall surface. We will compare the corrected trajectory data with the standard trajectory data for the three aforementioned trajectories.