# The BER Performance of the LDPC-Coded MPPM over Turbulence UWOC Channels
## 3 LLR Calculation  
The min-sum algorithm is adopted for iterative decoding due to a lower-complexity approximation to the sum-product algorithm (SPA) [40]. Prior to decoding, the initial LLR of every bit is obtained from soft de-mapping. Let \(\mathbf{S}=\left[\mathbf{S}_{1},\mathbf{S}_{2},\cdots\mathbf{S}_{q}\right]\) be the set of all possible \((M,\,w)\) MPPM, where \(q=\left( \begin{array}{c}M\\ w\end{array} \right)\), \(\mathbf{S}_{i}=\left[s_{1},s_{2},\cdots s_{M}\right]\) is a vector denoting a slot-symbol for the \((M,\,w)\) MPPM format with \(w\) pulses and \(M\) slots. \(\mathbf{C}=\left\{\mathbf{C}_{1},\mathbf{C}_{2},\cdots\mathbf{C}_{2^{L}}\right\}\in\mathbf{S}\) is the set of effective symbols. Assuming the bit-symbol \(\mathbf{A}_{i}=\left[a_{1},a_{2},\cdots a_{L}\right]\) is mapped into the slot-symbol \(\mathbf{C}_{i}=\left[c_{1},c_{2},\cdots c_{M}\right]\), its corresponding received slot-symbol is expressed as \(\mathbf{Y}_{i}=\left[y_{1},y_{2},\cdots y_{M}\right]\). Let \(\mathbf{H}_{i}\) denote the set of indices for which \(\mathbf{C}_{i}\) has a signal time slot. Let \(P_{s}(y)\) and \(P_{n}(y)\) be the conditional probability density functions of a received slot with a value of \(y\) on signal and non-signal time slots. The likelihood ratio of a slot of \(y\) is given by \(lr(y)=P_{s}(y)/P_{n}(y)\)[41]. Based on the previous assumption, we derive the bit LLR as follows. The probability of the \(l\)-th bit in one symbol conditioned on \(\mathbf{Y}\) is given by:  
\[P(a_{l}=b|\mathbf{Y})=\sum_{ \begin{array}{c}\mathbf{C}_{i}\in\mathbf{C}\\ a_{l}=b\end{array} }P(\mathbf{C}_{i}|\mathbf{Y}),\;i\in\left\{1,2,\cdots 2^{L}\right\},b \in\{0,1\}. \tag{6}\]  
Using Bayes theorem, we have:  
\[P(\mathbf{C}_{i}|\mathbf{Y})=\frac{P(\mathbf{Y}|\mathbf{C}_{i})\,P(\mathbf{C}_{i})}{P(\mathbf{Y}_{i})} =\frac{P(\mathbf{Y}|\mathbf{C}_{i})\,P(\mathbf{C}_{i})}{\sum_{j=1}^{2^{L}}P\big{(}\mathbf{Y}| \mathbf{C}_{j}\big{)}\,P\big{(}\mathbf{C}_{j}\big{)}}. \tag{7}\]  
It is assumed that the transmitted symbols \(\mathbf{C}_{i}\) are equiprobable, i.e., the priori \(P(\mathbf{C}_{i})\) remains the same, resulting in [42]:  
\[P(\mathbf{C}_{i}|\mathbf{Y})=\frac{P(\mathbf{Y}|\mathbf{C}_{i})}{\sum_{j=1}^{2^{L}}P\big{(}\bm {Y}|\mathbf{C}_{j}\big{)}}; \tag{8}\]  
where:  
\[P(\mathbf{Y}|\mathbf{C}_{i})=\prod_{c\in\mathbf{H}_{i}}P_{s}(y_{e})\prod_{z\in\mathbf{H}_{i}} P_{n}(y_{z})=\prod_{c\in\mathbf{H}_{i}}\frac{P_{s}(y_{e})}{P_{n}(y_{e})}\prod_{z=1}^{M }P_{n}(y_{z})=\prod_{c\in\mathbf{H}_{i}}lr_{e}\prod_{z=1}^{M}P_{n}(y_{z}). \tag{9}\]  
Substituting (9) into (8), we obtain:  
\[P(\mathbf{C}_{i}|\mathbf{Y})=\frac{\prod_{c\in\mathbf{H}_{i}}lr_{e}\prod_{z=1}^{M}P_{n}( y_{z})}{\sum_{j=1}^{2^{L}}\left[\prod_{c\in\mathbf{H}_{j}}lr_{e}\prod_{z=1}^{M}P_{n}( y_{z})\right]}=\frac{\prod_{c\in\mathbf{H}_{i}}lr_{e}}{\sum_{j=1}^{2^{L}}\prod_{c \in\mathbf{H}_{j}}lr_{e}}. \tag{10}\]  
Using (10) and (6), we have:  
\[P(a_{l}=b|\mathbf{Y})=\frac{\sum_{\mathbf{C}_{i}\in\mathbf{C}}\;\;\prod_{c\in\mathbf{H}_{i}}lr _{e}}{\sum_{j=1}^{2^{L}}\prod_{c\in\mathbf{H}_{j}}lr_{e}}. \tag{11}\]So, the LLR of \(a_{l}\) is expressed as:  
\[L(a_{l})=\ln\left[\frac{P(a_{l}=0|\mathbf{Y})}{P(a_{l}=1|\mathbf{Y})}\right]=\ln\left( \sum_{ \begin{subarray}{c}\mathbf{C}_{i}\in\mathbf{C}\\ a_{l}=0\end{subarray} }\prod_{e\in\mathbf{H}_{i}}lr_{e}\right)-\ln\left(\sum_{ \begin{subarray}{c}\mathbf{C}_{i}\in\mathbf{C}\\ a_{l}=1\end{subarray} }\prod_{e\in\mathbf{H}_{i}}lr_{e}\right); \tag{12}\]  
\(L(a_{l})\) is the initial LLR for further iterative decoding of LDPC. When the MPPM system is without LDPC, the bit \(a_{l}\) can be directly decoded based on the following decision:  
\[a_{l}=\left\{ \begin{array}{ll}1,&L(a_{l})<0\\ 0,&L(a_{l})>0\end{array} \right. \tag{13}\]  
According to (1), \(P_{s}(y)\) should be the convolution of PDFs of channel gain and AWGN. However, to simplify the calculation, herein we approximate \(P_{s}(y)\) with Gaussian distribution due to slow fading.