I wrote a script in MATLAB to simulate an LDPC created using an algorithm of a colleague of mine. The parity check-matrix is regular and has dimensions $1012 \times 1518$ and the code rate is $R=1/3$.
The channel I'm using is a BPSK one with added Gaussian white noise. The mapping of the bits I used were the values $-1$ and $1$. The decoding method is sum-product (or belief propagation).
To perform the simulation, I used as a guide the Example 2.6 in the 36th page of this paper. I'm getting this curve:
This is really different from what I would have expected. The fact that the function is no monotonically decreasing was very shocking. Also, the fact that there is a BER of approximately $1$ for a positive SNR doesn't make any sense to me.
I'm thinking that, maybe, what is wrong is how I defined the a priori LLRs or the SNR. Given that I used $E_b = 1$ to map the bits, then I used some formulas from the section 3.2 of this paper:
$$R\cdot E_b = E_s$$ $$N_0 = 2\sigma^2$$
So, using the formula mentioned in the Example 2.6 of the first paper, we get that
$$r_i = 4y_iR\frac{E_b}{N_0}$$
I believe that this weird behaviour is coming from that formula, maybe a difference of definitions between the two papers that I didn't take into account. I don't really know, what do you think is the reason of the function having that shape?
Extra info:
- The SNR axis in the plot corresponds to $R\frac{E_b}{N_0}.$
- I've read here a question that could solve my problem, but I'm not sure if it applies directly. Here, I don't have any information about the data bit rate that is mentioned in that question. I don't really know what that quantity they call $R_b$ stands for, either.