## 3 Design of Source Codes
### Design of Rate-Compatible Source Codes for JSCCM systems  
The base matrix of the source protograph LDPC code can be defined as \(\mathbf{B}_{s}=(\mathcal{B}_{i,j})\), where all \(\mathcal{B}_{i,j}\) variables represent edges connecting \(c_{i}\) and \(v_{j}\). A good source protograph LDPC code for the JSCCM system should have two properties:  
(1) Asmentioned in [18], the source decoding threshold indicates the performance of the error-floor level, which is the lowest BER when \(E_{s}/N_{0}\) approaches infinity. The protograph LDPC codes with low source decoding thresholds \(p^{th}\) for \(p>0.5\) are preferred for source coding. In [19], it is shown that some degree-2 VNs in protograph LDPC codes can improve the source decoding threshold and thus lower the error floor. Additionally, it is worth noting that the degree-2 nodes cannot form a cycle among themselves. (2) According to the analysis (see Section 3.1), the source code with an appropriate row weight distribution can help to close the shaping gap to the Shannon limit. Thus, the row weight distribution candidates identified by Algorithm 1 are utilized as constraints in the design of source codes to ensure the PAS performance. With all of that in mind, consider the following example for the design of a rate-3/4 base matrix, which has 4 VNs and 3 CNs, i.e., size \(3\times 4\). Firstly, we institute one degree-2 variable node (column of weight 2) for a good source decoding threshold. Therefore, the base matrix is:  
\[\textbf{B}_{s}=\left[ \begin{array}{ccc}\mathcal{B}_{1,1}&\mathcal{B}_{1,2}& \mathcal{B}_{1,3}&0\\ \mathcal{B}_{2,1}&\mathcal{B}_{2,2}&\mathcal{B}_{2,3}&1\\ \mathcal{B}_{3,1}&\mathcal{B}_{3,2}&\mathcal{B}_{3,3}&1\end{array} \right], \tag{14}\]  
The variables \(\mathcal{B}_{i,j}\) designate the remainder of the protograph to be designed. Then, candidates for the row weight distribution \(W\) are sought via Algorithm 1. The imposed constraints on the elements are  
\[\left\{ \begin{array}{l}\mathcal{B}_{1,1}+\mathcal{B}_{1,2}+\mathcal{B}_{1,3} =w_{1}\\ \mathcal{B}_{2,1}+\mathcal{B}_{2,2}+\mathcal{B}_{2,3}=w_{2}-1\\ \mathcal{B}_{3,1}+\mathcal{B}_{3,2}+\mathcal{B}_{3,3}=w_{3}-1\\ \left[\mathcal{B}_{1,j},\mathcal{B}_{2,j},\mathcal{B}_{3,j}\right]\
eq\left[0, 1,1\right]\qquad\text{for }j\in\{1,2,3\}\end{array} \right. \tag{15}\]  
where \(W=[w_{1},w_{2},w_{3}]\) is one of the candidates for the row weight distribution. For \(R_{s}=3/4\), \(m=4\), \(\Delta=0.5\) dB, and \(\delta=0.02\), the optimized row weight distribution is \((3,3,3)\). According to the constraints in (15), we search for the source code with the lowest \(p^{th}\) by using the PEXIT analysis in Section 3.2, and we find:  
\[\textbf{B}^{\prime}_{s}=\left[ \begin{array}{cccc}1&1&1&0\\ 1&0&1&1\\ 1&1&0&1\end{array} \right]. \tag{16}\]  
This code has a source decoding threshold of \(p^{th}=0.829\), and thus, \(H^{th}=0.66\) with a gap of \(R_{s}-H^{th}=0.09\) to the source coding rate. It is instructive to note that if we increase the value of \(\Delta\), such as \(\Delta=0.6\) dB, the number of the row weight distribution candidates increases, and we have \((3,3,3)\), \((3,3,5)\), \((3,5,3)\), and \((5,3,3)\). Then, we can find the base matrix with a better source decoding threshold (\(p^{th}=0.812\), \(H^{th}=0.697\)) as  
\[\textbf{B}_{s}^{3/4}=\left[ \begin{array}{cccc}2&0&1&0\\ 0&2&0&1\\ 0&3&1&1\end{array} \right]. \tag{17}\]  
In Figure 3, the BER performance of JSCCM systems with those two source codes is provided. Even though the source code \(\textbf{B}_{s}^{3/4}\) yields a slight loss in the shaping gain, it achieves a competitive advantage over \(\textbf{B}^{\prime}_{s}\) in the high-SNR region when the value of \(p\) decreases. For instance, the code \(\textbf{B}^{\prime}_{s}\) suffers from an error floor close to a BER of \(4\times 10^{-3}\) for \(p=0.84\), while \(\textbf{B}_{s}^{3/4}\) does not show any error floors down to a BER of \(10^{-5}\). Thus, \(\textbf{B}_{s}^{3/4}\) is more attractive for dynamically changing \(p\).