## 3 Theoretical Analysis
### Polar Codes for VLC Channels
#### 3.1.2 Decoding  
The decoding approach for a VLC channel operates as described. Consider the input to the polarized sub-channel as \(u_{i}\) and the output comprising the received sequence \(\big{(}y_{1}^{N}\big{)}\) along with the preceding \(i-1\) bits denoted as \(u_{1}^{i-1}\). To initiate, the LLR for a VLC channel employing OOK modulation is determined as follows. In the case where \(N=1\), the LLR, designated as \(L_{1}^{(1)}(y_{i})\), for the symbol \(y_{i}\) outputted by the \(i\)-th sub-channel is calculated.  
\[\begin{split} L_{1}^{(1)}(y_{i})&=\ln\frac{W(y_{i} \mid 0)}{W(y_{i}\mid 1)}\\ &=\ln\frac{\frac{1}{\sqrt{2\pi\sigma^{2}}}\exp\left(-\frac{y_{i}^ {2}}{2\sigma^{2}}\right)}{\frac{1}{\sqrt{2\pi\sigma^{2}}}\exp\left(-\frac{(y_{ i}-h)^{2}}{2\sigma^{2}}\right)}\\ &=\frac{h^{2}-2 hy_{i}}{2\sigma^{2}},\end{split} \tag{13}\]  
where \(W(y_{i}\mid x_{i}=0)\) and \(W(y_{i}\mid x_{i}=1)\) denote the subchannel transition probabilities. For the bit \(u_{i}\) of the information sequence, where \(i\) belongs to the set \(A\), the LLR is determined using the received sequence \(y_{1}^{N}\) along with the bits \(\hat{u}_{1}^{i-1}\) that have been previously estimated.  
\[L_{N}^{(i)}\Big{(}y_{1}^{N},\hat{u}_{1}^{i-1}\Big{)}=\ln\frac{W_{N}^{(i)} \Big{(}y_{1}^{N},\hat{u}_{1}^{i-1}\mid 0\Big{)}}{W_{N}^{(i)}\Big{(}y_{1}^{N},\hat{u}_{1 }^{i-1}\mid 1\Big{)}}, \tag{14}\]  
\[\begin{split} L_{N}^{(2i-1)}\Big{(}y_{1}^{N},\hat{u}_{1}^{2i-2} \Big{)}=& L_{N/2}^{(i)/2}\Big{(}y_{1}^{N/2},\hat{u}_{1,\rho}^{2i- 2}\oplus\hat{u}_{1,\rho}^{2i-2}\Big{)}\\ &\odot L_{N/2}^{(i)}\Big{(}y_{N/2+1}^{N},\hat{u}_{1,\rho}^{2i-2 }\Big{)},\end{split} \tag{15}\]  
\[\begin{split} L_{N}^{(2i)}\Big{(}y_{1}^{N},\hat{u}_{1}^{2i-1} \Big{)}=&(1-2\hat{u}_{2i-1})L_{N/2}^{(i)}\Big{(}y_{1}^{N/2},\hat{ u}_{1,\rho}^{2i-2}\oplus\hat{u}_{1,\rho}^{2i-2}\Big{)}\\ &+L_{N/2}^{(i)}\Big{(}y_{N/2+1}^{N},\hat{u}_{1,\rho}^{2i-2}\Big{)},\end{split} \tag{16}\]  
where the elements of \(\hat{u}_{1}^{2i-2}\) are categorized into odd-indexed and even-indexed groups, represented by \(\hat{u}_{1,\rho}^{2i-2}\) and \(\hat{u}_{1,\rho}^{2i-2}\) respectively. The operation \(\oplus\) is the modulo-2 addition operation, also referred to as binary addition. It is performed on binary numbers (i.e., numbers consisting of only 0s and 1s) and follows the rules of arithmetic in modulo 2. The operation \(\odot\)[6] is denoted as  
\[a\odot b=\log\left(\frac{1+e^{a+b}}{e^{a}+e^{b}}\right). \tag{17}\]  
Using Equations (15) and (16), the computation of the LLR for a received sequence of length \(N\) can be reduced to \(N/2\), with the recursive process terminating when \(N\) reaches 1. Subsequently, the decoded output sequence is generated by applying the following formula to the received sequence:  
\[\hat{u}_{i}=\left\{\begin{array}{ll}1,&L_{N}^{(i)}\Big{(}y_{1}^{N},\hat{u}_ {1}^{i-1}\Big{)}<0\\ 0,&L_{N}^{(i)}\Big{(}y_{1}^{N},\hat{u}_{1}^{i-1}\Big{)}\geq 0.\end{array}\right. \tag{18}\]  
The proposed polar code scheme serves to correct errors and bolster the anti-interference capabilities of VLC signals. Subsequent research will concentrate on integrating the prior findings with network coding technology, aiming to elevate the information transmission rate of the VLC system and further enhance its overall performance.