## 4 Simulation, Results, and Discussion
### Comparative Analysis of Localization Accuracy  
Observing the results in Figure 4, it is evident that the use of the PSO method yields improvements compared to the other algorithms. Although the worst average error obtained by this algorithm is 3.96 cm at 2.5 m, the conventional method of solving the equation presented in Equation (17) results in an average error of 13 cm at the same height. Similarly, the method without the PSO algorithm yields an average error of 11.48 cm. On the other hand, the best average value for the PSO algorithm occurs at 0 m with a mean error of 0.59 cm, which is approximately half the best average achieved by the equation-solving method. \begin{table}
\begin{tabular}{l l} \hline \hline
**VLP System Features** & **Values** \\ \hline \hline
**VLC Simulation Parameters** & \\ \hline Dimensions of the room (\(w\times l\times h\)) (m) & \((5\times 5\times 3)\) \\ Coordinates of the \(LEDs\) (\(x_{i},y_{i},z_{i}\)) (m) & \(LED_{1}=(1,2,3)\) m, \(LED_{2}=(1,4,3)\) m, \\ Power of each \(LED_{i}\) (W) & 8 \\ Gain of each optical filter, \(g_{i}(\psi_{i})\) & Unity Gain \\ Effective area of each \(PD_{i}\), \(A_{ri}\) (m\({}^{2}\)) & \(10^{-4}\) \\ Gain of each optical concentrator, \(g_{i}\) & Unity Gain \\ Photoelectric conversion efficiency (\(\frac{\Delta}{\psi}\)) & 0.54 \\ FoV of each \(PD_{i}\), \(\Psi_{i}\) (\({}^{\circ}\)) & 90\({}^{\circ}\) \\ Lambertian order, \(m_{i}\) & 1 \\ Equivalent noise bandwidth (MHz) & 100 \\ \hline
**PSO Parameters** & \\ \hline Initial particle velocity, \(v_{t}\) & \(\mathcal{U}\)[0,1] \\ Cognitive factor, \(c_{1}\) & 1 \\ Social factor, \(c_{2}\) & 2 \\ Cognitive random parameter, \(r_{1}\) & \(\mathcal{U}\)[0,1] \\ Social random parameter, \(r_{2}\) & \(\mathcal{U}\)[0,1] \\ Iterations & 500 \\ Particles & 100 (space division of \(10\times 10\)) \\ Inertia weight, \(w\) & 0.8 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Positioning system parameters. Figure 3: Localization error [cm] vs. the height of the receiver [m] for various numbers of particles. An additional observation deduced from Figure 4 is that with increasing height, there is a corresponding increase in the average error. This can be attributed to the vertical orientation of the receiver's PDs toward the ceiling, whereas the LEDs are directed toward the floor of the room. Consequently, according to Equation (11), when only the height of a point increases, the value of \(\cos\left(\phi_{i}\right)\) decreases due to the decreasing discrepancy in \(z_{i}-z_{t}\). As a result, the received power from the LOS channel decreases, leading to a reduction in the Signal-to-Noise Ratio (SNR). Moreover, for comparative and evaluative purposes, Figure 4 also represents the curve obtained by evaluating the proposed scenario of the localization method discussed in [49]. The system employs a novel algorithm that uses the difference in received voltage levels with multilevel modulation to minimize the noise impact. This approach is combined with the minimum mean squares error algorithm and an extended Kalman filter. Consequently, according to the results, the PSO algorithm exhibits greater precision in receiver positioning. The accuracy of the localization system employing multilevel modulation is comparable to the conventional method for heights under 1.5 m. However, the technique presented in [49] demonstrates a lower susceptibility to error caused by height. In other words, it is less affected by receiving less power, or the LOS channel, or, equivalently, it is less sensitive to the SNR. Another method added to the comparative analysis is detailed in [50], which involves the use of the Improved Whale Optimization Algorithm (IWOA) to improve the accuracy of the indoor localization system based on VLC [50]. The IWOA incorporates elite opposition-based learning and Levy flights, innovative strategies designed to mitigate the influence of PD rotation, a factor that can induce substantial positioning errors.