使用 Reed-Solomon 擦除校正进行前向纠错

发布于 2025-01-06 12:01:41 字数 1860 浏览 2 评论 0原文

我的任务是使用奇偶校验和方法和 Reed- 编码和解码一些字节的声音所罗门擦除校正。 我已经完成了第一种方法(奇偶校验和)的编码,但需要帮助完成第二种方法,即通过里德-所罗门擦除校正进行检测。

到目前为止我知道,RS代码将t符号添加到k数据符号中。因此,它能够定位并纠正最多 t/2 个符号,或者如果错误位置已知,则称为擦除。它最多可以纠正 t。对于此任务,我必须使用伽罗瓦域 GF(28) 将每个符号表示为一个字节。加法和减法运算基于异或。因此,总的来说,我必须使用能够纠正最多 t=3 擦除的 Reed-Solomon 码。现在单个里德所罗门码的计算如下,

C0 | C1 |........| Ck-1 | Ck | Ck+1 | Ck+2

因此代码字节可以被视为向量 c=[c0,c1,... ,ck+2] 单个代码 C 由 k 字节数据计算得出,如下所示 d=[d0,d1,...,dk-1],所以我的编码和解码过程需要以下 Vandermonde 矩阵 F,

1  1    12     13   ...   1k-1
1  2    22     23   ...   2k-1
             ...
1 k+2 (k+2)2 (k+2)3 ... (k+2)k-1
1 k+3 (k+3)2 (k+3)3 ... (k+3)k-1

因此使用 F & 进行简单的矩阵向量乘法D 我们得到C=FD

到目前为止,我对编码所做的工作如下:

#else

void fox_encode(Buffer* bufin, Buffer* bufout, FoxEncData* algorithm_data){

    // Your encoder for Task 2.C.3 goes in here !!!

    while (bufin->size >= 1){
        guint8 databyte = bufin->data[0];       //Pick up a byte from input buffer
        buffer_push_byte (bufout, databyte);    //Send it 3 times
        buffer_push_byte (bufout, databyte);
        buffer_push_byte (bufout, databyte);
        buffer_pop (bufin, 1);                  //Remove it from the input buffer
    }
}

#endif

我需要代码来完成此代码,以使用里德所罗门擦除校正对我的 Fox_encode 和 Fox_decode 类进行编码和解码。如有任何帮助,我们将不胜感激,以尽快完成此任务。

提前致谢

I have the task of encoding and decoding some bytes of sound using parity checksum method and Reed-Solomon Erasure Correction.
I've done my encoding for first method(parity checksum) but need help completing the second method which is detection by Reed-Solomon Erasure Correction.

So far I know that, RS code adds t symbols to k symbols of data. So it is able to locate and correct up to t/2 symbols or if the error locations are known so called erasures. It can correct up to t. For this task I have to use Galois field GF(28) to represent each symbol as a byte. Operation addition and subtraction are based on XOR. So over all I have to employ Reed-Solomon codes that are capable of correction up to t=3 erasures. The computation of a single Reed Solomon code in now as follow

C0 | C1 |........| Ck-1 | Ck | Ck+1 | Ck+2

so the code bytes can be viewed as vector c=[c0,c1,...,ck+2]
and a single code C is computed from k bytes of data as follow
d=[d0,d1,...,dk-1], so my encoding and decoding process require the following Vandermonde matrix F

1  1    12     13   ...   1k-1
1  2    22     23   ...   2k-1
             ...
1 k+2 (k+2)2 (k+2)3 ... (k+2)k-1
1 k+3 (k+3)2 (k+3)3 ... (k+3)k-1

so a simple matrix vector multiplication using F & D we get C=F.D.

so far what I did for encoding is as follow :

#else

void fox_encode(Buffer* bufin, Buffer* bufout, FoxEncData* algorithm_data){

    // Your encoder for Task 2.C.3 goes in here !!!

    while (bufin->size >= 1){
        guint8 databyte = bufin->data[0];       //Pick up a byte from input buffer
        buffer_push_byte (bufout, databyte);    //Send it 3 times
        buffer_push_byte (bufout, databyte);
        buffer_push_byte (bufout, databyte);
        buffer_pop (bufin, 1);                  //Remove it from the input buffer
    }
}

#endif

I need code to complete this code for encoding and decoding my fox_encode and fox_decode class using Reed-Solomon Erasure Correction. Any Help will be appreciated to complete this task as soon as possible.

Thanks in advance

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

灯角 2025-01-13 12:01:41

您可以查看我的 RS(255,255-k) C 实现,可从 获取我的主页

它处理错误和擦除,并纠正由以下条件限制的任何字节错误/擦除模式:

(2*errorCount +erasureCount) <= k。

You can take look at my RS(255,255-k) C-implementation which is available from my homepage.

It handles both errors and erasures and corrects any byte error/erasure patterns bounded by:

(2*errorCount + erasureCount) <= k.

故事未完 2025-01-13 12:01:41

Wikiversity 现在有一个很好的教程,详细介绍了如何处理这两个问题删除和错误。

以下是擦除解码过程中需要实现的概述:

  1. 计算综合症。然后检查是否全为0系数,该消息不需要修正,否则继续。
  2. 使用校正子和擦除位置作为输入来调用 Forney 算法,以计算擦除幅度多项式(即从消息多项式中减去以获取原始消息的值)。
  3. 减去message -erasure_magnitude_polynomial以恢复原始消息(如果在单例范围内)。

除了福尼算法可能有点复杂之外,所有其他部分都非常简单明了。事实上,最困难的部分,如 Berlekamp-Massey 算法和 Chien 搜索,仅当您想要解码错误时才需要,而 Forney 综合症计算仅当您想要纠正删除和错误(即勘误表)时才需要 - 尽管我读过一些论文,描述可以绕过福尼综合症计算,但我从未见过这样的代码。

There is now a good tutorial on Wikiversity which details how to handle both erasures and errors.

Here is an outline of what you need to implement for the erasures decoding process:

  1. Compute the syndromes. Then check if it's all 0 coefficients, the message does not need correction, else continue.
  2. Call the Forney algorithm with the syndrome and the erasures positions as input to compute the erasure magnitude polynomial (ie, the values to subtract from message polynomial to get the original message back).
  3. Subtract message - erasure_magnitude_polynomial to recover your original message (if within Singleton bound).

Apart from the Forney algorithm which can be a bit involving, all the other parts are very simple and straightforward. Indeed, the most difficult parts such as Berlekamp-Massey algorithm and Chien search are only necessary when you want to decode errors, and Forney syndromes computation is only necessary if you want to correct both erasures and errors (ie, errata) -- although I have read some paper which describe that Forney syndromes computation can be bypassed, but I never seen such a code.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文