## 5 Implementation of the Receiver  
The iterative receiver consists of two algorithms to detect _PE_s and _AE_s. This is followed by hard decisions on variable nodes. The detection is performed bit by bit. This detection process iterates, and after several iterations, LDPC decoding is executed. The entire process is reiterated a few times, followed by error rate computations at the receiver. During forward recursion, backward messages are not available. To compute the forward message at time epoch \(k\), we assume that the decoder and detector have made their decisions on \(c_{k-1}\), \(PE^{k-1}\), and \(AE^{k-1}\) at time \(k-1\), thus, they are known. Now, we compute the messages \(p^{k}_{u_{k}}(c_{k})\) and \(p^{k+1}_{u_{k}}(\mathbf{PE^{k}})\mathbf{p^{k+1}_{u_{k}}}(\mathbf{AE^{k}})\). To achieve this, we calculate the following messages by applying the SPA on the corresponding factor graph. \[p^{k}_{u_{k}}(c_{k})=\prod_{n=0}^{N-1}\left(\sum_{PE^{k}_{n}}P(PE^{k}_{n}) \left(\sum_{AE^{k}_{1}}P(AE^{n}_{1})...\sum_{AE^{n^{\prime}}_{N^{\prime\prime} }}P(AE^{n}_{N^{\prime\prime}})\right)\right)p\Big{(}r_{k}|c_{k},\mathbf{PE^{k} },\mathbf{AE^{k}}\Big{)} \tag{10}\]  
\[p^{k+1}_{u_{k}}(PE^{k}_{i})= \sum_{c_{k}}P^{k}_{d_{k}}(c_{k})\prod_{ \begin{subarray}{c}n=0\\ n\
eq i\end{subarray} }^{N-1}\left(\sum_{PE^{k}_{n}}P(PE^{k}_{n})\left(\sum_{ AE^{k}_{1}}P(AE^{n}_{1})...\sum_{AE^{n^{\prime}}_{N^{\prime\prime}}}P(AE^{n}_{N^{ \prime\prime}})\right)\right)\times \tag{11}\] \[\left(\sum_{AE^{i}_{1}}P(AE^{i}_{1})...\sum_{AE^{i}_{N^{\prime \prime}}}P(AE^{i}_{N^{\prime\prime}})\right)P(PE^{k}_{n})p\Big{(}r_{k}|c_{k}, \mathbf{PE^{k}},\mathbf{AE^{k}}\Big{)}\]  
Figure 1: Factor graph representation of Equation (8). The receiver contains two detection algorithms, each corresponding to a specific unknown channel parameter. The variable node \(PE^{k}_{i}\) represents the \(i\)-th path existence at time \(k\), while \(AE^{k}_{i}\) represents the \(i\)-th attenuation existence at the same time. \[ \begin{split} p_{u_{k}}^{k+1}(AE_{i}^{j})=&\sum_{c_{k}}p_{ d_{k}}^{k}(c_{k})\prod_{\begin{subarray}{c}n=1\\ n\
eq i\end{subarray}}^{N^{\prime}}\left(\sum_{AE_{n}^{j}}P(AE_{n}^{j}) \right)\left(\sum_{PE_{0}^{k}}P(PE_{0}^{k})...\sum_{PE_{N-1}^{k}}P(PE_{N-1}^{k })\right)\times\\ &\prod_{\begin{subarray}{c}m=1\\ m\
eq j\end{subarray}}^{N^{\prime}}\left(\sum_{AE_{0}^{m}}P(AE_{0}^{m})...\sum_ {AE_{N^{\prime}}^{m}}P(AE_{N^{\prime}}^{m})\right)P(AE_{n}^{j})p\left(r_{k}|c_ {k},\mathbf{PE}^{k},\mathbf{AE}^{k}\right)\end{split}  \tag{12}\]  
Provided the fact that \(PE\) and \(AE\) are Bernoulli random variables and only one (\(PE\), \(AE\)) pair occurs at every time epoch, the above equations form a Bahl-Cocke-Jelinek-Raviv (BCJR) algorithm. In this case, \(p_{u_{k}}^{k+1}(PE_{i}^{k})\) and \(p_{u_{k}+1}^{k+1}(AE_{i}^{j})\) are equal. This is followed by hard decisions to find the indices of (\(PE\), \(AE\)) pair. A similar algorithm is employed to compute the backward messages. It should be noted that at every time epoch, we make hard decisions on \(P_{d_{k-1}}\) and \(P_{d_{k+1}}\) to determine the symbols \(c_{k-1}\) and \(c_{k+1}\), respectively. Finally, the bit log-likelihood ratios (bitLLRs) are computed by  
\[p_{u_{k}}(c_{k})=p_{u_{k}}^{k+1}(c_{k})p_{u_{k}}^{k}(c_{k}) \tag{13}\]  
As implementing the SPA directly on such a factor graph is intricate, we propose a simplified implementation strategy to streamline the process and mitigate complexity issues. To realize Equations (10)-(12), we introduce four LOTs, each corresponding one-to-one with possible combinations of \(c_{k-1}c_{k}\), as per Equations (4) to (7). These LOTs have dimensions \(N\times N^{\prime}\). Consequently, potential Gaussian observation means are computed prior to the receiver computations. Thus, the algorithm simplifies to:  
* At every time epoch, the receiver performs matrix subtractions, \(r_{k}\) minus LOTs. * Receiver finds the indices of the minimum matrices members of the detector's upward messages.