## 3 Simulation Implementation
### The Impact of Decision Thresholds on BER at Different Rates  
The curves of BER against the variation of decision thresholds were plotted for ideal communication rates of 300 kbps and 150 kbps. The BER formula, derived from the Poisson formula in Section 2, was utilized to determine that for a communication distance of 500 m, the \(\lambda_{s}\) and \(\lambda_{b}\) values corresponding to the communication rate of 300 kbps are 33 and 2, and for 150 kbps, they are 64 and 2, respectively. Changes in BER were observed corresponding to the selection of different decision thresholds, as shown in following Figure 8.  
It can be observed that at 300 kbps, when the decision threshold is 12, the corresponding BER is 3.85 \(\times\)\(10^{-6}\), and at 150 kbps, when the decision threshold is 19, the corresponding BER is \(4.64\times 10^{-12}\). This indicates that as the communication rate changes, the optimal BER and corresponding decision thresholds also change. Lower communication rates result in higher average photon counts, leading to larger corresponding decision  
Figure 7: Path loss from approximated models.  
thresholds and lower BERs. Consequently, the impact of LED tailing on communication quality diminishes.  
The Relationship between BER and Distance under Different Rates for Both Ideal and Tailing Scenarios  
Simulations were conducted to observe the performance of the BER under different communication rates in both ideal and tailing emission scenarios. The simulation conditions included communication rates of 150 kbps, 200 kbps, and 300 kbps, with the transmitter and receiver elevations set at 10\({}^{\circ}\). The distance varied from 300 m to 900 m to assess the communication quality of the system.  
In Figure 9, it can be observed that as the distance increases, the BER gradually rises. Higher communication rates correspond to higher BER, and under the same distance conditions, the BER in the tailing scenario is higher than that in the ideal scenario. It is evident that the impact of LED tailing on communication quality becomes more pronounced with higher communication rates. This phenomenon can be attributed to the following key factors: First, in a UV communication system with constant emission intensity, a higher communication rate under OOK modulation results in a shorter transmission time per bit and, therefore, a decrease in the number of photons emitted per bit. This results in a decrease in the photon decision threshold determined by the maximum likelihood estimation algorithm in UV correlation detection, as shown in Figure 8. When the decision threshold of the maximum likelihood estimation algorithm is low, the impact of the tailing effect on communication quality is more significant. In addition, during the startup and shutdown phases of the LED, a small number of photons will be incorrectly classified as symbol 0 during the reception and decoding process. For a specific LED model and matching circuit, the RC charge and discharge time is fixed, so these misidentified photons will continue to have a fixed impact on the decoding process, as shown in Figure 4, which describes the change in current during the LED emission tailing. At higher communication rates, fewer photons are detected per bit, which will amplify the impact of the LED tailing effect on the system, resulting in an increased impact of erroneous photons on system performance.  
In light of these results, we propose an optimization scheme for communication BER based on altering the transmission signal duty cycle.  
Figure 8: (**a**) The threshold of 300 K communication rate and the change in BER. (**b**) The threshold of 150 K communication rate and the change in BER.