# Dual Threshold Self-Corrected Minimum Sum Algorithm for 5G LDPC Decoders
## 3 Proposed DT-SCMS Algorithm
### Iterative Process  
The flow chart of the DT-SCMS algorithm is shown in Figure 2.  
In the check node processing (CNP), NMS is adopted to ensure the decoding performance, and \(\alpha\) is the correction factor. The iterative process of the DT-SCMS algorithm is described as follows:  
Step 1: VNP  
For each variable node \(i\) and its adjacent check nodes \(j\in C(i)\), at the \(l\)-th iteration the variable node message is calculated as:  
\[L^{(l)}\Big{(}q_{ij}\Big{)}=L^{(l-1)}(q_{i})-L^{(l-1)}\Big{(}r_{ji}\Big{)} \tag{13}\]  
\[e_{ij}^{(l)}=\left(\sim e_{ij}^{(l-1)}\right)\cdot\left(\left(s_{ij}^{(l-1)} \cdot\left(L^{(l)}\Big{(}q_{ij}\Big{)}-th1\right)>0\right)\delta\!\left(s_{ij}^ {(l-1)}\cdot\left(L^{(l)}\Big{(}q_{ij}\Big{)}-th2\right)<0\right)\right) \tag{14}\]  
\[L^{(l)}\Big{(}q_{ij}^{\text{DTSC}}\Big{)}=\Big{(}e_{ij}^{(l)}=1\Big{)}\gamma 0 :L^{(l)}\Big{(}q_{ij}\Big{)} \tag{15}\]  
Step 2: CNP  
For each variable node \(i\) and its adjacent check nodes \(j\in C(i)\), at the \(l\)-th iteration the variable node message is calculated as:  
\[L^{(l)}\Big{(}r_{ji}\Big{)}=\prod_{i^{\prime}\in\mathcal{R}(j)\backslash i}s_ {i^{\prime}j}^{(l)}\cdot\min_{i^{\prime}\in\mathcal{R}(j)\backslash i}\left( \left|L^{(l)}\Big{(}q_{i^{\prime}j}^{\text{DTSC}}\Big{)}\right|\right)\cdot \frac{1}{\alpha} \tag{16}\]  
\(e_{ij}^{(l)}\) is used to indicate the position of \(L^{(l)}\Big{(}q_{ij}\Big{)}\) that is erased in this iteration, to prevent erasing the message of the same position in two consecutive iterations, \(s_{ij}^{(l-1)}\) denotes the sign of \(L^{(l-1)}\Big{(}q_{ij}\Big{)}\) in this iteration, \(L^{(l)}\Big{(}q_{ij}^{\text{DTSC}}\Big{)}\) is the new variable node message obtained according to the erasure rule.  
Figure 2: The flow chart of the DT-SCMS algorithm.  
Step 3: Decision  
For every variable node, the decision message is calculated as:  
\[L^{(l)}(q_{i})=L(P_{i})+\sum_{j\in\mathcal{C}_{i}}L^{(l)}\big{(}r_{ji}\big{)} \tag{17}\]  
And then a hard decision is performed. If \(L^{(l)}(q_{i})>0\), then \(\hat{c}_{i}=0\), otherwise \(\hat{c}_{i}=1\).  
SCMS sets zero as a fixed threshold to judge the unreliable messages, ignoring the changes of the variable node messages. In the two adjacent iterations, the change range of the variable node message is unknown. According to the dynamic adjustment rules of the thresholds, Equation (14) gives the positions of the unreliable messages which will be erased in the iteration. Therefore, both small and large changes will be considered. If the new value (\(L^{(l)}\big{(}q_{ij}\big{)}\)) deviates too near from the last value (\(L^{(l-1)}\big{(}q_{ij}\big{)}\)), we can treat it as a reliable message (the role of \(th1\)); if \(L^{(l)}\big{(}q_{ij}\big{)}\) deviates too far from \(L^{(l-1)}\big{(}q_{ij}\big{)}\), we can also treat it as a reliable message (the role of \(th2\)); besides, if \(L^{(l)}\big{(}q_{ij}\big{)}\) falls between \(th1\) and \(th2\), it will be eased. In this way, the proposed algorithm effectively suppresses the transmission of unreliable messages, and retains reliable messages, thereby improving the reliability of decoding and accelerating the convergence speed of decoding.