Polar decoder 100% BLER for shortening-polar-encoded DCI
Issue
Branch develop-nr a54362ddefb6b9a713bbbe52478af3b77bf50c58
100% BLER with DCI encoded by shortened polar code, i.e. with Aggregation Level 1. The issue can be reproduced with
./polartest -m 1 -i 10000 -k 41 -L 1 -s 3 -d 0.5 -f 6 -l 8
Note that the decoder_int16 works
./polartest -m 1 -i 10000 -k 41 -L 1 -s 3 -d 0.5 -f 6 -q
In nr_polar_rate_matching(), the shortened positions are set to INFINITY to reflect a huge LLR value. This big values make calculated LLR overflow.
void computeLLR(double ***llr,
uint16_t row,
uint16_t col,
uint8_t i,
uint16_t offset)
{
double a = llr[row][col + 1][i];
double b = llr[row + offset][col + 1][i];
llr[row][col][i] = log((exp(a + b) + 1) / (exp(a) + exp(b))); //eq. (8a)
}
Min-sum solution The issue can be avoided by using min-sum approximation
#define SIGNOF(x) ((x > 0) ? 1 : (x < 0) ? -1 : 0)
void computeLLR(double ***llr,
uint16_t row,
uint16_t col,
uint8_t i,
uint16_t offset)
{
double a = llr[row][col + 1][i];
double b = llr[row + offset][col + 1][i];
if (fabs(a) < 50 && fabs(b) < 50)
llr[row][col][i] = log((exp(a + b) + 1) / (exp(a) + exp(b))); //eq. (8a)
else
llr[row][col][i] = SIGNOF(a)*SIGNOF(b)*fmin(fabs(a),fabs(b));
}
New issue
But this results in 0.5dB loss compared with decoder_int16 (listSize=1)!!! This is unexpected for a float decoder.
The loss is confirmed with listSize=8 by comparing to the performance provided by MATLAB 5GToolbox functions.
Any idea?