1

我正在尝试实现 DVBS2 (48408, 48600) BCH 解码器,但在查找定位器多项式的根时遇到了麻烦。对于此处的 Chien 搜索,作者初始化寄存器时考虑到它是从 (2^16 - 1) 中减去 48600 后缩短的。为什么这样?这是我到目前为止的代码:

function [error_locations, errors] = compute_chien_search(n, locator_polynomial, field, alpha_powers, n_max)
       
    t = length(locator_polynomial);
    error_locations = zeros(t, 1);
    errors = 0;
    % Init the registers with the locator polynomial coefficients.
    coefficient_buffer = locator_polynomial;
    alpha_degrees = uint32(1:t)';
    alpha_polynoms = field(alpha_degrees);
    alpha_polynoms = [1; alpha_polynoms];
    for i = 1:n % 
        for j = 2:t
            coefficient_buffer(j) = gf_mul_elements(coefficient_buffer(j), ...
                                                    alpha_polynoms(j), ...
                                                    field, alpha_powers, n_max);
        end
        % Compute locator polynomial at position i
        tmp = 0;
        for j = 2:t
            tmp = bitxor(tmp, coefficient_buffer(j));
        end
        % Signal the error
        if tmp == 1       
            errors = errors + 1;
            error_locations(errors) = n_max - i + 1;
        end
    end
end

除了一些错误位置外,它几乎给了我正确的结果。例如:对于位置上的错误

   418       14150       24575       25775       37403

上面的代码给了我

  48183      47718       34451       24026       22826

从 48600 中减去后得到:

  417        882         14149       24574       25774

这是位置负 1,除了 37403,它没有找到。我错过了什么?

编辑:

有问题的代码是 DVBS2 12 纠错 48408、48600 BCH 代码。生成多项式的次数为 192,通过乘以标准文档中给出的 12 个最小多项式得到。

4

1 回答 1

0

更新 - 我使用 Windows 创建了一个示例 C 程序 | BCH (48600,48408) 的 Visual Studio。在我的桌面(Intel 3770K 3.5 ghz,Win 7,VS 2015)上,编码大约需要 30 us,12 位纠错大约需要 4.5 ms。在我的笔记本电脑上(Intel Core i7-10510U 最高 4.9 ghz,Win 10,VS 2019),12 位纠错大约需要 3.0 毫秒。我使用了无进位乘法来简化生成 192 位多项式的过程,但这是一次性生成的常数。编码使用 [256][3] 64 位无符号整数多项式(192 位)表,解码使用 [256][12] 16 位无符号整数校正子表,一次处理一个字节。

该代码包括我从现有的 RS 代码中复制的 Berlekamp Massey 和 Sugiyama 扩展的 Euclid 解码器。对于 BCH(不是 RS)代码,Berlekamp Massey 差异在奇数步上为零,因此对于奇数步,不计算差异(自上次更新以来的迭代计数增加,与计算差异为零时相同)。我没有看到运行时间有显着变化,但我把检查留在了那里。

BM 或 Euclid 的运行时间大致相同。

https://github.com/jeffareid/misc/blob/master/bch48600.c


我怀疑在位错误索引 37403 发生故障的情况下存在溢出问题,因为它是唯一的位索引 > 2^15-1 (32767)。该网站上有这样的评论:

This code is great. However, it does not work for the large block sizes in the DVB-S2 
specification. For example, it doesn't work with:

n = 16200;
n_max = 65535;
k_max = 65343;
t = 12;
prim_poly = 65581;

The good news is that the problem is easy to fix. Replace all the uint16() functions 
in the code with uint32(). You will also have to run the following Matlab function 
once. It took several hours for gftable() to complete on my computer.

gftable(16, 65581);  (hex 1002D => x^16 + x^5 + x^3 + x^2 + 1)

Chien 搜索应该寻找值 (1/(2^(0))) 到 (1/(2^(48599))),然后是零 - 这些值的对数以获得相对于最右边位的偏移量消息和 48599-offset 以获取相对于消息最左边的位的索引。

如果错误定位多项式的系数颠倒,则 Chien 搜索将寻找 2^(0) 到 2^(48599) 的值。

https://en.wikipedia.org/wiki/Reciprocal_polynomial

于 2020-12-16T11:36:05.510 回答