# A Universal Low-Complexity Demapping Algorithm for Non-Uniform Constellations
## 3 Soft Demapping Algorithm  
The BICM system model is shown in Figure 2. A cascaded FEC encoder, bit interleaver, and constellation mapper are included in the transmitter. And in the receiver, the received symbols are first equalized, and then fed to the constellation demapper. After the demapping, values which correspond to the bit interleaved codewords in the transmitter are fed to the bit deinterleaver, and then to the FEC decoder. Assuming that the transmitted symbol is \(t\), the received symbol \(r\) can be represented by  
\[r=ht+n \tag{1}\]  
where \(h\) is the channel fading coefficient, \(n\) is additive white Gaussian noise (AWGN). For optimal performance in decoding, a soft demapping algorithm is usually used to calculate the LLRs of the received symbol. Using the Log-MAP algorithm, the LLR of the \(i\)-th bit can be calculated by  
\[\text{LLR}(b_{i})=\log\frac{\Pr(b_{i}=0|r)}{\Pr(b_{i}=1|r)}=\log\frac{\sum \limits_{x\in\chi_{i}^{0}}\exp(-\frac{|r-hx|^{2}}{N_{0}})}{\sum\limits_{x\in \chi_{i}^{1}}\exp(-\frac{|r-hx|^{2}}{N_{0}})} \tag{2}\]  
where \(x\) is the possible transmitted symbol, \(N_{0}\) is the noise variance, \(\chi_{i}^{0}\) and \(\chi_{i}^{1}\) denote the sets of constellation points for which \(b_{i}=0\) and \(b_{i}=1\) respectively, and log represents the natural logarithm. Using the Max-Log approximation, the Log-MAP algorithm can be simplified to the Max-Log-MAP algorithm. Then, the approximate LLR can be obtained as  
\[\text{LLR}(b_{i})=\frac{1}{N_{0}}(\underset{x\in\chi_{i}^{1}}{\min}|r-hx|^{2}- \underset{x\in\chi_{i}^{0}}{\min}|r-hx|^{2}) \tag{3}\]  
Since demapping is performed after equalization, with ideal channel estimation and zero forcing equalization, the received symbol \(y\) after equalization can be expressed as  
\[y=\frac{r}{h}=t+\frac{n}{h} \tag{4}\]  
Substitute Equation (4) into Equation (3), we can obtain  
\[\text{LLR}(b_{i})=\frac{|h|^{2}}{N_{0}}(\underset{x\in\chi_{i}^{1}}{\min}|y-x |^{2}-\underset{x\in\chi_{i}^{0}}{\min}|y-x|^{2}) \tag{5}\]  
It can be seen from Equation (5) that when using the Max-Log-MAP algorithm to calculate LLRs, it is necessary to calculate the EDs between the received symbol and all constellation points, and then find the minimum ED in \(\chi_{i}^{0}\) and \(\chi_{i}^{1}\) respectively. The I and Q components of 1D-NUC are independent,  
Figure 2: BICM system block diagram. so 1D-NUC can be decomposed into two independent NU-APSKs, only one-dimensional EDs need to be considered when calculating LLRs  
\[\text{LLR}(b_{p})=\frac{|h|^{2}}{N_{0}}\Bigg{[}\min_{x\in\chi_{p}^{1}}\lvert y_{ I}-x_{I}\rvert^{2}-\min_{x\in\chi_{p}^{0}}\lvert y_{I}-x_{I}\rvert^{2}\Bigg{]} \tag{6}\]  
\[\text{LLR}(b_{q})=\frac{|h|^{2}}{N_{0}}\Bigg{[}\min_{x\in\chi_{q}^{1}}\lvert y _{Q}-x_{Q}\rvert^{2}-\min_{x\in\chi_{q}^{0}}\lvert y_{Q}-x_{Q}\rvert^{2}\Bigg{]} \tag{7}\]  
where index \(p\) refers to the bits demapped from the I components and index \(q\) from the Q components. The I and Q components of 2D-NUC are dependent, so two-dimensional EDs need to be considered when calculating LLRs  
\[\text{LLR}(b_{i})=\frac{|h|^{2}}{N_{0}}\Bigg{[}\min_{x\in\chi_{i}^{1}}\Bigl{(} \lvert y_{I}-x_{I}\rvert^{2}+\lvert y_{Q}-x_{Q}\rvert^{2}\Bigr{)}-\min_{x\in \chi_{i}^{0}}\Bigl{(}\lvert y_{I}-x_{I}\rvert^{2}+\lvert y_{Q}-x_{Q}\rvert^{ 2}\Bigr{)}\Bigg{]} \tag{8}\]  
The complexity of the Max-Log-MAP algorithm is related to two factors, i.e., the number of EDs that need to be calculated and compared to demapping each received symbol. Since multiplication operations are inevitable in ED calculation, the complexity of ED calculation is much greater than ED comparison. In the demapping process, ED between the received symbol and each constellation point only needs to be calculated once, and only ED comparison is required when calculating LLR(\(b_{i}\)).