## 4 Simulation and Analysis  
The performance of the proposed localization system is evaluated using Monte-Carlo simulations. The results of positioning for both type of alignments, _i.e._, a rectangular grid and a hexagonal lattice, are compared. All the parameters are given in Table 1. The LED reader or the receiver is assumed to be at a fixed height of 1.20 m, _i.e._, 1.80 m below the ceiling for the entire simulations. The optimum indexed codebooks are configured by using the given beamforming vectors. The bit error rate BER performances, shown in Figure 5, are calculated by using Monte-Carlo simulation with the assumption of perfect feedback, _i.e._, error-free feedback. As it can be observed, the transmit beamforming technique significantly enhances the performance compared to the one without beamforming. The number of LEDs in each LEA proportionally As expressed in Equation (3), under a dimming control scheme the adaptive data rate is inversely-proportional to the duty cycle of the PWM signal in order to make the number of transmitted bits constant. Figure 6 then shows that the data rate \(R_{\mathrm{d}}\) becomes higher than the original data rate \(R_{\mathrm{o}}\) as the duty cycle becomes smaller. For the positioning calculations, the angle \(\phi\) is set to 10 degrees. One hundred thousand positions of the LED reader are generated starting from the position at (0.0158, 0.0158, 1.2) and increasing 0.0158 m in each step in both, \(x\) and \(y\), axes covering the whole room. To investigate the accuracy of the position estimation, the array radiation pattern or the power spectrum \(PS\) is calculated as:  
\[PS=AF\left(\theta,\varphi_{\mathrm{m}}\right)R\left(\theta,\varphi_{\mathrm{m}}\right) \tag{12}\]  
where \(R\left(\theta,\phi_{\mathrm{m}}\right)\) is the radiation pattern of each antenna. The power spectrum _versus_ the zenith angle for the number of LEDs in each LEA, \(M=2\) bulbs is plotted in Figure 7. The number of LEDs in each \begin{table}
\begin{tabular}{c c} \hline
**Parameters** & **Value** \\ \hline Each LED half power angle (\(\phi_{\mathrm{{}_{1/2}}}\)) & 70 degree \\ Lambertian radiant intensity of each LED (\(R_{\mathrm{o}}(\theta_{\mathrm{{}_{1}}})\)) & 80 lm \\ FOV of the LED reader (\(\varphi_{\mathrm{{}_{c}}}\)) & 180 degree \\ Transmitted power per LED (\(P_{\mathrm{{}_{T}}}\)) & 200 mW \\ LED reader’s detector area (\(A\)) & 0.0001  m\({}^{2}\) \\ Number of LEDs in each LEA (\(M\)) & 2, 4, 6, 8 bulbs \\ Codebook length (\(N\)) & 4 \\ Number of simulation & 10\({}^{6}\) bits \\ Photodetector Responsivity (\(F\)) & 1 A/W \\ \hline \end{tabular}
\end{table} 
Table 1: Simulation parameters. Figure 5: Bit error rate (BER) performance _versus_ SNR for MISO transmit beamforming. LEA varies as 4, 6, and 8. As it can be seen in Figures 8-11, the larger the number of LEDs used, the clearer the main lobe of the angular spectrum becomes. This result can also be express in that the number of LEDs in each LEA proportionally increases the BER performance as shown in Figure 5. Therefore, the position estimation performance increases as the number of LEDs increases according to the relationships given in Equations (8-11). However, a practical number and sufficiently good performance is desirable, e.g., eight bulbs. The reader, which is assumed to have a received signal strength indicator (RSSI) coupled directly into the microcontroller where the decision is made over which input has the strongest signal, can indicate which LEA gives the strongest signal for each position of the reader [24]. In addition, the position estimation performances of both types of alignments are compared using both the absolute mean error (average of the absolute error) and the root mean square error, RMSE (square root of the mean squared error). The results in Table 2 show that with the same number of LEDs (e.g., eight bulbs) a hexagonal lattice alignment provides a more uniform illumination rendering than the one with a square or a triangular grid.