0

我对 Reed-Solomon 检测功能的分析感兴趣(仅检测,当无法校正时),特别是对于 RS(10,8),符号 8 位,码字中总共 10 个符号,其中8个用于数据,2个用于ECC。在这种情况下,Reed-Solomon 码应该能够纠正 1 个具有多个错误的符号,但是在文献中我没有找到关于错误检测能力(没有纠正)的太多信息,例如 2 个不同符号中的 2 个错误RS应该能够检测到但不正确。

我想在 Python 中做一些 Montecarlo 分析,我为 Reed-Solomon 找到了这个包: https ://pypi.org/project/unireedsolomon/

python 包允许我创建 RS 代码,注入错误并进行更正解码,但它似乎不提供检测功能,我尝试在两个不同的符号中注入 2 个错误,我得到一个错误更正,我相信在在这种情况下,Reed-Solomon 应该能够报告无法纠正的错误。unireedsolomon 包好像没有实现这样的检测能力,或者我错了。你知道unireedsolomon包中是否存在这种能力吗?

或者您对我如何使用不同的 python 包运行这种仅检测分析有什么建议?或者任何关于 Reed-Solomon 代码中检测的评论也会很有用。谢谢

4

2 回答 2

0

Reed-Solomon 码RS(10,8)具有d_min = n-k+1 = 3最小距离。具有最小距离的代码d_min可以纠正 t = floor((d_min-1) / 2)符号错误或检测 d_min-1符号错误。因此,您描述的代码可以检测到 2 个符号错误。

代码的代数结构确保所有具有d_min-1或更少错误的有效码字将导致不等于零的校正子(这是存在错误的指示符)。

我创建了一个 Python 包galois,它在 Galois 字段上扩展了 NumPy 数组。由于代数 FEC 代码密切相关,因此我也将它们包括在内。实现了Reed-Solomon 代码以及detect()方法。

下面是一个RS(10,8)使用galois. 在我的库中,RS(n-s,k-s)通过首先创建完整代码RS(n,k)然后将k-s消息符号传递到encode()orn-s符号到decode()or来使用缩短的代码detect()

In [1]: import galois                                                                                   

# Create the full code over GF(2^8) with d_min=3
In [2]: rs = galois.ReedSolomon(255, 253); rs                                                           
Out[2]: <Reed-Solomon Code: [255, 253, 3] over GF(2^8)>

# The Galois field the symbols are in
In [3]: GF = rs.field                                                                                   

In [4]: print(GF.properties)                                                                            
GF(2^8):
  characteristic: 2
  degree: 8
  order: 256
  irreducible_poly: x^8 + x^4 + x^3 + x^2 + 1
  is_primitive_poly: True
  primitive_element: x

# Create a shortened message with 8 symbols
In [6]: message = GF.Zeros(8); message                                                                  
Out[6]: GF([0, 0, 0, 0, 0, 0, 0, 0], order=2^8)

# Encode the message into a codeword with 10 symbols
In [7]: codeword = rs.encode(message); codeword                                                         
Out[7]: GF([0, 0, 0, 0, 0, 0, 0, 0, 0, 0], order=2^8)

# Corrupt the first 2 symbols
In [8]: codeword[0:2] = [123, 234]; codeword                                                            
Out[8]: GF([123, 234,   0,   0,   0,   0,   0,   0,   0,   0], order=2^8)

# Decode the corrupted codeword, the corrected errors are -1 (meaning could not correctly decode)
In [9]: rs.decode(codeword, errors=True)                                                                
Out[9]: (GF([123, 234,   0,   0,   0,   0,   0,   0], order=2^8), -1)

# However, the RS code can correctly detect there are <= 2 errors
In [10]: rs.detect(codeword)                                                                            
Out[10]: True
于 2021-08-13T21:08:08.613 回答
0

RS(10,8) 保证检测任何 2 个错误或纠正任何一个错误,但不能同时检测两者。有 2 个错误且码字中只有 10 个符号,大多数时候它应该检测到 2 个错误的情况是不可纠正的,但是根据 2 个错误值和位置,它看起来好像只有一个在第三个位置出错,并且纠正过程将错误纠正,产生一个有效的代码字(两个校正子 == 0),但在 3 个位置与原始代码字不同。10 个符号中有 2 个错误导致这种类型的误纠的概率很低,大约为 0.00001538。

如果 unireedsolomon 包具有更高的错误纠正率,我怀疑它没有消除 10 符号代码字的 0 到 9 个有效位置范围之外的位置,并且由于错误纠正错误而产生无效代码字。

于 2021-06-03T01:18:35.860 回答