# How to compute bit level soft decisions from an M-ary symbol?

When working with a decoder such as LDPC that can take in soft-decision inputs (or channel posterior probabilities as I've seen them called as well), how are these soft-decision values calculated for general M-ary modulations like M-FSK, PSK, or QAM? I have only been able to find the BPSK case so far in Todd Moon's Error Correction Coding Book. I'm assuming AWGN channels and binary FEC codewords over GF(2). Sources to information are fine too if the answers to this would be too long.

• I assume Trellis Coded Modulation may also work out for your case. I ask myself if the answer from @Qasim is correct. I need to implement a soft decoder for DVB-S2 standard, and I think TCM is not included in the standard, so his formula may solve my issue. Is there any reference to check it out? Many thanks in advance, and best regards. – ailoher Jul 12 '17 at 11:52

For example, say you transmit the bit sequence $1,1$ with codeword $1,0,1,1$. You transmit these bits using, say, QPSK symbols $0.5+0.5j,0.5-0.5j$. After matched filtering in the receiver, you will get two noisy complex numbers, for example $0.55+0.45j,1.2-0.49j$. A hard-decision decoder will turn those numbers into QPSK symbols and then bits before FEC. A soft-decision decoder will use those numbers without any further processing (except maybe some quantization).
• @majorpain1588 In QPSK, the real part of the symbol corresponds to one bit and the imaginary part to the other bit. A similar process applies to other constellations. To obtain values in the range [-1,1], you just scale and normalize. For example, in a BPSK constellation with $+1,-1$, receiving a $+10$ would map to maybe $0.99$, a $0$ would map to $0$, and so on. You just have to establish a mapping. Another example: textbook soft-decision Viterbi decoders often map the soft metric to a three-bit value, where $000$ indicates high certainty of a bit $0$ and $111$ a high certainty of a bit $1$. – MBaz Jul 14 '15 at 20:56
I state here the general case of QAM. The channel observation is $r = r_I + jr_Q$. There are 4 bits in each symbol for 16-QAM for example, let's call them $u ~\epsilon$ $\{a,b,c,d\}$. Then the LLR of each $u$ is given by
\begin{equation*} LLR(u) = \log \frac{\sum _{s_{1,u}|u=1} e^{-|r-s_{1,u}|^2}/\sigma^2}{\sum _{s_{0,u}|u=0}e^{-|r-s_{0,u}|^2}/\sigma^2} \end{equation*} where $s_{1,u} = s_{I:1,u} + j s_{Q:1,u}$ and $s_{0,u} = s_{I:0,u} + j s_{Q:0,u}$ are the sets of QAM symbols for which bit $u ~\epsilon$ $\{a,b,c,d\}$ is 1 and 0, respectively. Such a procedure generates 'soft symbols' that can be be used in the iterative loop.