## 2 Theoretical Formula Derivation
### Derivation of BER Considering Tailing Effects  
LED point-to-point when there is a tailing effect (also known as trailing effect) is a phenomenon in LED display technology. The emission tailing noise is caused by the charging and discharging of the LED capacitor. For a typical RC circuit, the charging current function is calculated as follows:  
\[I_{on}(t)=\frac{V\cdot(1-\exp(-t/RC))}{R}, \tag{13}\]  
In this context, \(R\) represents the resistance value in the circuit, and \(C\) represents the capacitance value. The discharge current function is as follows:  
\[I_{off}(t)=\frac{V\cdot\exp(-t/RC)}{R}, \tag{14}\]  
In conventional OOK modulation systems, symbols 0 and 1 each occupy 50% of the duty cycle. Because there is a gradual brightening phenomenon when the LED is turned on and a trailing phenomenon when it is turned off, the duration required for the LED to reach 50% brightness upon startup and to diminish to 50% brightness upon shutdown satisfies the following formula:  
\[I_{on}(t_{0})=I_{off}(t_{0}), \tag{15}\]  
During the startup and shutdown of the LED, a small amount of emitted light may be erroneously counted as symbol 0, as shown in Figure 3. Such misidentification can have a detrimental impact on the BER of the entire communication system.  
In Figure 4, it can be observed that due to the presence of LED trailing effects, there is a partial rightward offset in the maximum likelihood position in ultraviolet correlation detection. At this point, the current expression transitions from the ideal state to the charging and discharging state of the RC circuit. The formula expression for LED emission energy can be obtained by calculating the energy of signal light and noise light as follows:  
Figure 3: The current variation curve during LED charging and discharging.  
\[IL_{one}\cdot T=(\eta V/R)\cdot T-\eta(\int\limits_{t=0}^{t=t_{0}}I_{ on}(t)Vdt)+\eta(\int\limits_{t=t_{0}+T}^{t=2T}I_{off}(t)Vdt), \tag{16}\] \[IL_{zero}\cdot T=\eta(\int\limits_{t=0}^{t=t_{0}}I_{on}(t)Vdt)+ \eta(\int\limits_{t=t_{0}+T}^{t=2T}I_{off}(t)Vdt), \tag{17}\]  
The ratio \(\sigma\) of this noise intensity to the signal light intensity is calculated as follows:  
\[\sigma=\frac{IL_{zero}\cdot T}{IL_{one}\cdot T}=\frac{\eta(\int\limits_{t=0}^{ t=t_{0}}I_{on}(t)Vdt)+\eta(\int\limits_{t=t_{0}+T}^{t=2T}I_{off}(t)Vdt)}{( \eta V/R)\cdot T-\eta(\int\limits_{t=0}^{t=t_{0}}I_{on}(t)Vdt)+\eta(\int \limits_{t=t_{0}+T}^{t=2T}I_{off}(t)Vdt)}\approx\frac{\eta(\int\limits_{t=t_{ 0}+T}^{t=0}I_{on}(t)Vdt)+\eta(\int\limits_{t=t_{0}+T}^{t=2T}I_{off}(t)Vdt)}{( \eta V/R)\cdot T}, \tag{18}\]  
By substituting the expressions from Formulas (16) and (17) into Formulas (10) and (11), we determine the values of the Poisson distribution constants \(\lambda_{s}\) and \(\lambda_{b}\) considering the influence of tail effects. Introducing \(\sigma\) facilitates the simplification of Formula (11), where Formula (11) can be replaced by the conjunction of Formula (16) and \(\sigma\). Subsequently, \(\lambda_{s}\) and \(\lambda_{b}\) are incorporated into Poisson distribution Formulas (5) and (6) to derive the Poisson distribution probability density expressions. This process culminates in deriving the \(BER\) expression as a function of the decision threshold \(x_{0}\) variation:  
\[BER(x_{0})=\frac{1}{2}(\sum\limits_{n=x_{0}+1}^{\infty}P_{zero}(n))+\frac{1}{ 2}(1-\sum\limits_{n=x_{0}+1}^{\infty}P_{one}(n)), \tag{19}\]  
The BER variation of the UV communication system considering the influence of LED trailing effects can be calculated using Formula (19).