我正在尝试实现 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 个最小多项式得到。