# LDPC Decoder Design Using Compensation Scheme of Group Comparison for 5G Communication Systems
## 4 Proposed Compensation Scheme for NPMSA
### INPMSA with Compensation Scheme  
To reduce the hardware area cost and the complexity of routing, the proposed method adopts a grouping search in check node updating. Additionally, we focus on the gap between the first minimum and the probabilistic second minimum to recover the decoding capability. Because the grouping search can still find the accurate first minimum in check node updating, we used the first minimum as the basis for adjusting the value of the probabilistic second minimum. An increase was noted in the reliability of the check nodes as the number of iterations increased. To deal with the change in reliability, INPMSA adopts proportional adjustment to improve the probabilistic second minimum. Additionally, the first minimum and the improved probabilistic second minimum need to be multiplied by the scaling factor to reduce the difference from the NMSA. We took \(\alpha\) and \(\beta\) to represent the proportions of the first minimum and the probabilistic second minimum, respectively. The new second minimum is expressed as:  
\[new\ min^{2 nd}\ =\ \alpha\gamma min^{1 st}+\beta\gamma min^{2 nd}. \tag{12}\]  
The decoder loses error correction capability when the new second minimum is less than the first minimum, or greater than the probabilistic second minimum. We call this the reversal problem, which results in overcorrection or correction failure. To avoid these problems, we define the upper and lower bounds as the probabilistic second minimum and first minimum, respectively. Initially, we set the scaling factor \(\gamma=1\) for Equations (3), (5) and (12) to simplify the following deduction. We then derive the range of \(\alpha\) and \(\beta\) using the upper (Case 1) and lower (Case 2) bounds, which are shown below:  
Case 1--The new second minimum must be less than or equal to the probabilistic second minimum, as shown below:  
\[new\ min^{2 nd}\leq min^{2 nd}. \tag{13}\]  
\[\alpha min^{1 st}+\beta min^{2 nd}\leq min^{2 nd}. \tag{14}\]  
\[\beta\leq 1-\alpha\cdot\frac{min^{1 st}}{min^{2 nd}}. \tag{15}\]  
Case 2--The new second minimum must be greater than or equal to the first minimum, as shown below:  
\[new\ min^{2 nd}\geq min^{1 st}. \tag{16}\]  
\[\alpha min^{1 st}+\beta min^{2 nd}\geq min^{1 st}. \tag{17}\]  
\[\beta\geq(1-\alpha)\cdot\frac{min^{1 st}}{min^{2 nd}}. \tag{18}\]  
Combining the two cases above, we observed that the relationship between \(\alpha\) and \(\beta\) is related to the ratio of the first minimum and the probabilistic second minima. Then we can have:  
\[(1-\alpha)\cdot\frac{min^{1 st}}{min^{2 nd}}\leq\beta\leq 1-\alpha\cdot\frac{min ^{1 st}}{min^{2 nd}}. \tag{19}\]  
Because the probabilistic second minimum must be greater than the first minimum, the ratio of the first minimum and the probabilistic second minima must be less than 1. Then we can have:  
\[\frac{min^{1 st}}{min^{2 nd}}\leq 1. \tag{20}\]  
By combining Equations (19) and (20), we can conclude that this case is only valid when the first minimum is equal to the probabilistic second minimum. Subsequently, we can achieve:  
\[\alpha+\beta\ =\ 1, \tag{21}\]  
where \(\alpha\) and \(\beta\) must be greater than or equal to 0 to avoid changing the original gap between the first minimum and the probabilistic second minimum. The number of groups directly affects the error probability of the probabilistic second minimum and the values of \(\alpha\) and \(\beta\). The relationship between the error probability of the probabilistic second minimum and the number of groups is calculated as:  
\[new\ min^{2 nd}\leq min^{2 nd}. \tag{13}\]0  
where \(Q\) denotes the total number of \(Q_{i,j}^{k}\) in a layer (i.e., the number of row weights in a layer), and \(G\) represents the number of groups. Table 2 lists the calculated error probabilities of the probabilistic second minimum for different groups and inputs. We can observe that the higher the number of groups, the lower the error probability of the probabilistic second minimum.