## 4 Hybrid Check Matrix Construction (HC) Algorithm
### A Check Matrix Construction Algorithm for Non-Binary LDPC-CPM System in WSNs  
Firstly, the proposed two check matrix construction algorithms are simulated to find a check matrix construction algorithm suitable for WSNs. The simulation parameters of the irPEG algorithm are set as follows: The degree distribution is subject to the non-binary LDPC code of Equation (4) and the matrix is generated by the PEG algorithm and the irPEG algorithm, respectively. The simulation is carried out at hexadecimal 1/2 code rate (Code1) and hexadecimal 3/4 code rate (Code2) and the fixed information bit length. In Code1, the information bit length is 512 bits, that is, the symbol length is 128; In Code2, the information bit length is 176 bits, that is, the symbol length is 44. Figures 5 and 6 show the error correction performance of the irPEG and PEG algorithms at different code rates for Code1 and Code2, respectively. Compared with the non-binary LDPC code constructed by the irPEG and PEG algorithms, the error correction performance was not much different. The non-binary LDPC code with lower triangle structure constructed by the irPEG algorithm has a stronger error correction ability while considerably reducing hardware implementation complexity. Figure 5: The error correction performance of improved progressive edge growth (irPEG) algorithm in Code1. Figure 6: The error correction performance of irPEG algorithm in Code2. When the \(E_{b}/N_{0}\) is 3 dB, the time required for decoding was calculated under the conditions of the code rate 1/2 Code1 and the code rate 3/4 Code2 respectively and the consistency of the simulation environment was maintained, which meant excluding the influence of unrelated factors during the simulation. The obtained data are shown in Tables 1 and 2. From Table 1, under the same simulation environment, the time required by the irPEG algorithm was obviously less than the time required by the PEG algorithm. When the number of erroneous bits was small, the time saving was less than 50% but as the number of erroneous bits increased, the time saving was stable at 50%. Therefore, from the simulation results of Code1, the time spent by the irPEG algorithm was only 50% for the PEG algorithm. The simulation test result of Code2 when \(E_{b}/N_{0}\) is 3 dB is shown in Table 2. The test results also showed that the time required for decoding was reduced by half. The simulation parameters of the HC algorithm were set as follows. Using code rates 1/2, 2/3, 3/4, 4/5 and 6/7, the degree distribution was subject to the non-binary LDPC code of Equation (4) and the matrices are generated by PEG algorithm and HC algorithm. Simulation in hexadecimal (Code3) with fixed information bit length was also performed. In Code3, the base matrix under 1/2 code rate was 16 columns, the target matrix \(\mathbf{P}\) was an unit array of 24 \(\times\) 24, the base matrix under 2/3 code rate was 18 columns, the target matrix \(\mathbf{P}\) was an unit array of 16 \(\times\) 16, the base matrix under 3/4 code rate was 16 columns, the target matrix \(\mathbf{P}\) was an unit array of 16 \(\times\) 16, the base matrix under 4/5 code rate was 20 columns, the target matrix \(\mathbf{P}\) was an unit array of 12 \(\times\) 12, the base matrix under 6/7 code rate was 14 columns, the target matrix \(\mathbf{P}\) was an unit array of 16 \(\times\) 16 and fixed information bit length was 768 bits, which means the symbol length was 192. Figures 7-9 show the Bit Error Rate (BER), Symbol Error Rate (SER) and Frame Error Rate (FER) performance of the PEG algorithm and HC algorithm under different code rates in the case of Code3, respectively. \begin{table}
\begin{tabular}{c c c} \hline \hline \multirow{2}{*}{**Number of Erroneous Bits**} & \multicolumn{2}{c}{**Decoding Time (s)**} \\ \cline{2-3}  & **PEG Algorithm** & **IrPEG Algorithm** \\ \hline
10 & 1396 & 953 \\
100 & 12,402 & 7153 \\
1000 & 156,900 & 127,056 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Comparison of the decoding time of the \(E_{b}/N_{0}\) of Code1 at 3 dB.