## 3 Experiment and Analysis  
We conducted experiments to verify the effectiveness of the proposed double-light positioning algorithm. As shown in Figure 7, there are five LEDs mounted on top of the frame. Since the proposed algorithm requires two LEDs, two of the LEDs are illuminated. Each LED luminaire is embedded  
Figure 6: Different situations of the rotation angle \(\theta\): (**a**) the light and smartphone image sensor axes are the same; (**b**) the camera is rotated clockwise by \(\theta\); (**c**) the camera is rotated counterclockwise by \(180^{\circ}+\theta\); (**d**) the camera is rotated clockwise by \(180^{\circ}+\theta\); (**e**) the camera is rotated counterclockwise by \(\theta\). with an 8-bit microcontroller unit (MCU) that encodes the unique identifier (UID) as a codeword that is not only suitable for optical transmission but also for flicker mitigation and dimming support. Using on-off keying intensity modulation (OOK IM), the LED driver can convert the codeword into modulated digital signals to drive the LED luminaire to emit the optical signals. We use the machine learning to detect and recognize LED-ID. Different from the traditional LED-ID encoding and decoding methods, we treat the LED-ID detection and recognition problem as a classification problem in machine learning filed. Once the LED image is captured by a CMOS image sensor, an image processing method is used to extract the features of LED-ID. To use the extracted features to identify the LED-ID, a Fisher classifier and a linear support vector machine are used. By off-line training for the classifiers and online recognition of LED-ID, the scheme proposed could improve the speed of LED-ID identification and improve the robustness of the system [22]. The drive circuit board is shown in Figure 8. Furthermore, we measured the time efficiency of our algorithm with the CMOS industrial camera (as the positioning terminal) and the computer Acer Aspire VN7-593G, Intel (R) Core (TM) i7-7700 HQ CPU@ 2.8 GHz, Ubuntu 16.04 LTS (as the software platform). Table 1 shows all important system parameters. Figure 8: The circuit board of transmitting terminal. Figure 7: The experimental platform of VLP system based on double-light positioning algorithm. As shown in Figure 7, the performance of double-light algorithm was tested by an experiment, in which the coordinates (in cm) of the LEDs were \((-33,\,-33,\,200)\), \((33,\,33,\,220)\). There were 16 evenly distributed test points at the height of 0 m, 0.1 m, 0.2 m and 0.3 m, respectively. Each position was tested six times, and the experiment tested a total of 384 positions. The positioning results are shown in Figure 9a-d, and Figure 9e-h shows the horizontal view of them. \begin{table}
\begin{tabular}{c c} \hline
**Parameter** & **Value** \\ \hline Indoor space unit size (L \(\times\) W \(\times\) H)/m\({}^{3}\) & 0.8 \(\times\) 0.8 \(\times\) 2 \\ The focal length/mm & 3 \\ Height of the camera/m & 0 to 0.3 (resolution: 0.1) \\ Plan range of the camera/m & 1.1 to 0.7 (resolution: 0.2) \\ Voltage of each LED/V & 28.43 \\ Current of each LED/A & 0.1 \\ Camera resolution & 2048 \(\times\) 1536 \\ Camera exposure time/ms & 0.05 \\ Computer parameter & Acer Aspire VN7-593G, Intel (R) Core (TM) \\  & i7-7700 HQ CPU@ 2.8 GHz, Ubuntu 16.04 LTS \\ \hline \end{tabular}
\end{table} 
Table 1: Parameter of the camera in this paper. Figure 9: _Cont._  
As shown in Figure 9, the estimated positions matched well with the real positions, which proved that the proposed double-light positioning algorithm could achieve high positioning accuracy. The spots in Figure 10 prove that, with different height of the camera, the positioning mean error barely changed. To better analyze the performance, Figure 11 gives the cumulative distribution function (CDF) of positioning error. CDF is defined as the probability that a random positioning error is less than or equal to the positioning accuracy. As observed in Figure 11, the CDF of over 90% of the positioning error was within 3 cm.