# 前向纠错

前向纠错（FEC）是一种编码技术，它向传输或存储的数据中添加结构化的冗余信息，使接收端无需请求重传即可检测并纠正错误。编码器用校验比特扩展消息，校验比特的值由码的规则确定；解码器利用这些规则，即使接收到的部分比特有误，也能恢复原始消息。<sup>[1](https://kaira.readthedocs.io/en/dev/auto_examples/models_fec/plot_fec_decoders_tutorial.html)</sup> FEC 支撑着从蜂窝链路到深空探测器的现代通信与存储系统。

| 关键事实 | 内容 |
|---|---|
| FEC 添加什么 | 由校验矩阵定义的冗余校验比特；解码即求解由此产生的约束<sup>[2](https://www.rfc-editor.org/rfc/rfc5170.txt)</sup> |
| 汉明码开销 | (7,4) 码：3 个校验比特保护 4 个数据比特；(15,11)：4 个校验比特保护 11 个<sup>[3](https://web.mit.edu/6.02/www/f2011/handouts/6.pdf)</sup> |
| 典型编码增益 | 卷积码（\( K = 7 \)）约 5 dB；Turbo 码 8–10 dB；LDPC 与极化码 9–11 dB<sup>[4](https://rfessentials.com/resources/rf-glossary/channel-coding/)</sup> |
| 5G NR 分配 | 上下行共享数据信道用 LDPC；控制信道用极化码<sup>[5](https://arxiv.org/html/2502.11053)</sup> |
| 错误平层 | 5G LDPC 的错误平层约在 \( 10^{-5} \) BLER 或更低；极化码无错误平层<sup>[5](https://arxiv.org/html/2502.11053)</sup><sup> • </sup><sup>[6](https://www.mdpi.com/2079-9292/10/17/2152)</sup> |
| 6G 决定 | 3GPP 于 2025 年 10 月决定 6G 继续使用 LDPC 与极化码<sup>[7](https://oa.ee.tsinghua.edu.cn/dailinglong/publications/paper/Unified_Error_Correction_Code_Transformer_with_Low_Complexity.pdf)</sup> |

## 工作原理

一种码对传输比特施加校验约束。在 LDPC 风格的表述中，校验矩阵 \( H \) 指定诸如 \( h_{i}(w) = w_{1} \oplus w_{4} \oplus w_{5} \) 的约束，合法码字使每个校验式均为零。<sup>[8](https://www.cs.cmu.edu/~aarti/Class/10704_Spring15/lecs/lec25.pdf)</sup> 当错误损坏某些符号时，校验以特定模式失败，从而指出错误所在，解码器通过求解由 \( n \) 个源符号与修复符号构成的 \( n-k \) 个线性方程组成的方程组，恢复原始的 \( k \) 个源符号。<sup>[2](https://www.rfc-editor.org/rfc/rfc5170.txt)</sup>

冗余是代价，编码增益是回报。汉明将冗余定义为所用二进制位与最少必要位之比。<sup>[9](https://doi.org/10.1002/j.1538-7305.1950.tb00463.x)</sup> 香农 1948 年的编码定理表明，存在速率任意接近信道容量、错误概率任意接近零的[分组码](https://www.edgepedia.org/zh/block-code)，<sup>[10](http://cs-www.cs.yale.edu/homes/yry/readings/wireless/wireless_readings/calderbank_ecc_tutorial.pdf)</sup> 因此工程任务是以可接受的成本逼近该极限。实用码以编码增益衡量——达到目标误码率所需的信噪比降低量：现代 LDPC 与极化码可提供约 9–11 dB，在误比特率 \( 10^{-6} \) 时距香农极限约 0.5 dB 以内。

## 如何实现

编码方式因码族而异。分组码将 \( k \) 个数据比特映射为 \( n \) 比特码字；里德–所罗门码由 \( \mathrm{GF}(2^{m}) \)（\( m \) 取 \( \{2..16\} \)）上的范德蒙生成矩阵构造，并化为系统形式。<sup>[11](https://datatracker.ietf.org/doc/rfc5510/)</sup> [卷积码](https://www.edgepedia.org/zh/convolutional-code)则用移位寄存器处理连续输入流；编码器输出可包含信息比特（系统形式）或仅含校验比特（非系统形式）。<sup>[36](https://publications.rwth-aachen.de/search?p=id%3A%22RWTH-CONV-144371%22)</sup><sup> • </sup><sup>[12](https://web.mit.edu/6.02/www/f2011/handouts/7.pdf)</sup>

解码分为硬判决与软判决两类，软判决解码通常优于硬判决。<sup>[1](https://kaira.readthedocs.io/en/dev/auto_examples/models_fec/plot_fec_decoders_tutorial.html)</sup> 主要算法有：

- **维特比解码**在卷积码的网格图上寻找最大似然路径。<sup>[12](https://web.mit.edu/6.02/www/f2011/handouts/7.pdf)</sup>
- **置信传播**在每次迭代中于变量节点与校验节点之间传递实值似然信息，其解码能力强于使用量化消息的解码器。<sup>[13](https://www.cs.cmu.edu/~venkatg/pubs/papers/ldpc.pdf)</sup>
- **BCJR（MAP）解码**是迭代 Turbo 解码的基础。<sup>[14](https://pmc.ncbi.nlm.nih.gov/articles/PMC9965925/)</sup>
- **逐次消除**逐个解码极化比特，每个比特为下一个提供信息；**列表解码**在每一步保留大小为 \( L \) 的最可能路径列表，并通过在码字中添加 CRC 从列表中选出正确候选。<sup>[15](https://www.ocf.berkeley.edu/~sasoglu/0100000041.pdf)</sup><sup> • </sup><sup>[6](https://www.mdpi.com/2079-9292/10/17/2152)</sup>

对于互联网等分组擦除信道，LDPC-Staircase 与 LDPC-Triangle 码作用于数万符号的源块，高斯消元可从较少的接收符号中恢复数据，但 CPU 开销高于简单代入。<sup>[2](https://www.rfc-editor.org/rfc/rfc5170.txt)</sup>

## 起源

R. W. 汉明 1950 年发表于《贝尔系统技术杂志》的论文以大型计算机为动机，给出了单错检测、单错纠正以及单错纠正加双错检测的显式方案。<sup>[9](https://doi.org/10.1002/j.1538-7305.1950.tb00463.x)</sup> R. C. 博斯与 D. K. 雷–乔杜里于 1960 年在《信息与控制》上发表了如今称为 BCH 码的二进制群码类。<sup>[16](https://doi.org/10.1016/s0019-9958%2860%2990287-4)</sup> R. 加拉格尔于 1962 年在《IEEE 信息论汇刊》上定义了低密度奇偶校验码，其校验矩阵每列含少量固定的 1、每行含 \( k > j \) 个 1，并给出直接基于信道后验概率运行的简单迭代解码器。<sup>[17](https://doi.org/10.1109/tit.1962.1057683)</sup> A. 维特比于 1967 年在《IEEE 信息论汇刊》上发表了卷积码解码算法，最初作为证明技巧，后来被认定为动态规划。<sup>[18](https://doi.org/10.1109/tit.1967.1054010)</sup><sup> • </sup><sup>[10](http://cs-www.cs.yale.edu/homes/yry/readings/wireless/wireless_readings/calderbank_ecc_tutorial.pdf)</sup>

克劳德·贝鲁 1993 年的 Turbo 码由两个递归系统卷积码经非均匀交织连接而成，利用外信息迭代解码，在大交织器尺寸下性能接近香农极限。<sup>[19](https://www.ee.technion.ac.il/people/sason/turbo_paper.pdf)</sup> 这一结果复兴了 LDPC 研究：D. J. C. 麦凯与 R. M. 尼尔于 1996 年在《电子学快报》上表明低密度奇偶校验码可达近香农极限性能。<sup>[20](https://doi.org/10.1049/el:19961141)</sup> 伊多·塔尔与亚历山大·瓦尔迪 2012 年发表于 arXiv 的列表解码器<sup>[21](https://doi.org/10.48550/arxiv.1206.0050)</sup>以及牛凯与陈凯 2012 年发表于《IEEE 通信快报》的 CRC 辅助解码<sup>[22](https://doi.org/10.1109/lcomm.2012.090312.121501)</sup>使极化码走向实用。

## 变体

**汉明码与 BCH 码**是代数分组码；RS 码与汉明码以较低复杂度同时纠正随机错误与突发错误。<sup>[23](https://pubs.aip.org/aip/acp/article/3232/1/020006/3316587/A-study-of-forward-error-correction-techniques-in)</sup> **里德–所罗门码**在非二进制域上是最大距离可分码：接收端可从任意恰好 \( k \) 个接收符号中恢复 \( k \) 个源符号，<sup>[11](https://datatracker.ietf.org/doc/rfc5510/)</sup> 这是给定长度与维数下可保证的最大数目。<sup>[24](https://ntrs.nasa.gov/api/citations/19900019023/downloads/19900019023.pdf)</sup> **卷积码**由[维特比算法](https://www.edgepedia.org/zh/viterbi-algorithm)解码，并作为 Turbo 码的分量码。<sup>[12](https://web.mit.edu/6.02/www/f2011/handouts/7.pdf)</sup> **Turbo 码**对两个分量解码器进行迭代。<sup>[19](https://www.ee.technion.ac.il/people/sason/turbo_paper.pdf)</sup> **LDPC 码**使用稀疏校验矩阵与置信传播。<sup>[17](https://doi.org/10.1109/tit.1962.1057683)</sup> **极化码**以 \( O(N \log N) \) 的编解码复杂度和约 \( O(2^{-\sqrt{N}}) \) 的块错误概率，达到所有二进制输入无记忆信道的对称容量。<sup>[15](https://www.ocf.berkeley.edu/~sasoglu/0100000041.pdf)</sup>

## 应用

蜂窝标准可追溯各码族的足迹：2G 用卷积码，3G 用 Turbo 码，4G 用 LDPC 与增强 Turbo 码；5G NR 控制信道用极化码，传输信道用 LDPC。<sup>[25](https://www.nature.com/articles/s41598-025-13672-2)</sup> 5G 须支持高达 20 Gbps 的数据速率，3GPP TS 38.212 中的 LDPC 基图支持增量冗余 HARQ 与速率兼容。<sup>[5](https://arxiv.org/html/2502.11053)</sup> 在广播领域，DVB 系统最初采用卷积内码与里德–所罗门外码；LDPC 与 BCH 成为 [DVB-S2](https://www.edgepedia.org/zh/dvb-s2)、DVB-T2、DVB-C2 和 DVB-S2X 的内码与外码。<sup>[6](https://www.mdpi.com/2079-9292/10/17/2152)</sup> 里德–所罗门编码自 1977 年旅行者号深空系统起便已飞上太空，<sup>[24](https://ntrs.nasa.gov/api/citations/19900019023/downloads/19900019023.pdf)</sup> CCSDS 协议建议光空间通信使用长度 2048 或更大的码。<sup>[26](https://ntrs.nasa.gov/api/citations/20190032330/downloads/20190032330.pdf)</sup> IETF RFC 5170 为分组擦除网络规定了 LDPC-Staircase 与 LDPC-Triangle 方案。<sup>[2](https://www.rfc-editor.org/rfc/rfc5170.txt)</sup>

## 局限与替代方案

ARQ 则依赖带确认的重传，出错时重传代价显著，不过在良好信道上开销很低；FEC 支付固定的冗余比特与解码能量开销，从而在仅有有限比特被损坏时使分组无错到达。<sup>[27](https://digitalcommons.unl.edu/cgi/viewcontent.cgi?article=1097&context=csearticles)</sup> 混合 ARQ 结合两者：I 型在收到 NACK 后用相同 FEC 码重发整个分组，II 型仅重发冗余比特，减少带宽占用。<sup>[27](https://digitalcommons.unl.edu/cgi/viewcontent.cgi?article=1097&context=csearticles)</sup><sup> • </sup><sup>[37](https://pmc.ncbi.nlm.nih.gov/articles/PMC3871133/)</sup> 恰当结合可克服两种基本方案的缺点。<sup>[28](https://people.computing.clemson.edu/~jmarty/papers/july2024/996-2-Automatic-repeat-request_error-control_schemes.pdf)</sup> 无线标准实践以 LDPC 码与自适应调制编码进行增量冗余 HARQ，通常选择使首次传输目标块错误率为 10% 的调制编码方案。<sup>[29](https://export.arxiv.org/pdf/2601.01645)</sup> 在 FEC 内部，长期存在的权衡是码率、纠错能力与复杂度之间的取舍，<sup>[1](https://kaira.readthedocs.io/en/dev/auto_examples/models_fec/plot_fec_decoders_tutorial.html)</sup> LDPC 的错误平层虽在极低误码率下值得关注，但可通过码构造与解码器设计降低，而极化码在短码长下受限。<sup>[23](https://pubs.aip.org/aip/acp/article/3232/1/020006/3316587/A-study-of-forward-error-correction-techniques-in)</sup><sup> • </sup><sup>[38](https://ita.ucsd.edu/workshop/08/files/paper/paper_218.pdf)</sup>

在纠错性能上，主要码族彼此接近：\( N=8192 \) 的极化码在逐次消除下，于码率 1/2、帧错误率 \( 10^{-5} \) 时相对 IEEE 802.11n LDPC 码（\( N=1944 \)）仅差 0.5 dB，<sup>[30](https://ar5iv.labs.arxiv.org/html/1702.04707)</sup> 优化后的极化码在 BER \( 10^{-7} \) 时与 DVB-S2 LDPC 相差约 0.3 dB 以内。<sup>[6](https://www.mdpi.com/2079-9292/10/17/2152)</sup> 复杂度与延迟差异更明显：极化逐次消除解码器仅需 \( \log_{2}(K/R)/R \)，对 \( K = 4096 \)、码率 1/2 约每比特 26 次运算，而同码率 LDPC 解码器约每比特 840 次，不过 \( L = 32 \) 的列表解码会将其提升至与 LDPC 相当的水平。<sup>[31](https://eprints.soton.ac.uk/399915/1/WhitePaper09Aug2016.pdf)</sup> 对 DVB 帧，优化极化解码延迟至多为 LDPC 的二十五分之一，<sup>[6](https://www.mdpi.com/2079-9292/10/17/2152)</sup> 但性能匹敌 LDPC 或 Turbo 的极化解码器通常硬件效率较低，主要源于吞吐量低而非面积；已发表的比较对这笔权衡的净结果看法不一。<sup>[30](https://ar5iv.labs.arxiv.org/html/1702.04707)</sup> 在错误平层方面，5G LDPC 码平层约在 \( 10^{-5} \) BLER 或更低，而极化码没有，若采用极化码，DVB 中将无需 BCH 外码。<sup>[5](https://arxiv.org/html/2502.11053)</sup><sup> • </sup><sup>[6](https://www.mdpi.com/2079-9292/10/17/2152)</sup> 对延迟关键的链路，窗口解码下的 SC-LDPC 码在相同结构延迟下优于普通 LDPC，而维特比解码的卷积码在极短延迟下仍最佳。<sup>[32](https://ar5iv.labs.arxiv.org/html/1504.03916)</sup>

3GPP 于 2025 年 10 月决定未来 6G 继续使用 LDPC 与极化码，<sup>[7](https://oa.ee.tsinghua.edu.cn/dailinglong/publications/paper/Unified_Error_Correction_Code_Transformer_with_Low_Complexity.pdf)</sup> 并有人提出将里德–所罗门与 5G NR 极化方案级联用于 6G 突发错误，在 AWGN 与[瑞利衰落](https://www.edgepedia.org/zh/rayleigh-fading)、信噪比约 −4 dB 以上时优于单独 NR 极化码。<sup>[25](https://www.nature.com/articles/s41598-025-13672-2)</sup> 机器学习解码器仍有争议：对 BCH (31,16) 与 BCH (63,51)，现成的有序统计解码优于 Transformer 解码器，对 BCH (127,64)，OSD 性能约好 2 dB，作者因此怀疑神经解码器在短块长和中等块长下的可行性。<sup>[33](https://arxiv.org/html/2410.15899)</sup> 在量子计算方面，安东尼奥·德马蒂·奥利乌斯及其同事于 2026 年发表于《npj 量子信息》的置信传播加有序坦纳森林（BP+OTF）算法，是电路级噪声下量子 LDPC 码的近乎线性时间解码器，对双变量自行车码与表面码的逻辑错误抑制与最先进解码器相当。<sup>[34](https://doi.org/10.1038/s41534-026-01292-1)</sup> 硬件方面，岳宇凡及其同事于 2026 年发表于《IEEE 电路与系统汇刊 I》的 QFEC 芯片，在单一设计中运行完全可配置的 9.97 Gb/s 解码器，支持 LDPC、极化、Turbo 与卷积码。<sup>[35](https://doi.org/10.1109/tcsi.2026.3669803)</sup>

## References

1. [FEC Decoders Tutorial](https://kaira.readthedocs.io/en/dev/auto_examples/models_fec/plot_fec_decoders_tutorial.html)
2. [RFC 5170: LDPC-Staircase and LDPC-Triangle Forward Error Correction Codes](https://www.rfc-editor.org/rfc/rfc5170.txt)
3. [MIT 6.02 Handout 6: Coping with Bit Errors using Error Correction Codes](https://web.mit.edu/6.02/www/f2011/handouts/6.pdf)
4. [Channel Coding | RF Essentials](https://rfessentials.com/resources/rf-glossary/channel-coding/)
5. [Demystifying 5G Polar and LDPC Codes: A Comprehensive Review and Foundations](https://arxiv.org/html/2502.11053)
6. [Optimized Polar Codes as Forward Error Correction Coding for Digital Video Broadcasting Systems](https://www.mdpi.com/2079-9292/10/17/2152)
7. [Unified Error Correction Code Transformer With Low Complexity](https://oa.ee.tsinghua.edu.cn/dailinglong/publications/paper/Unified_Error_Correction_Code_Transformer_with_Low_Complexity.pdf)
8. [Lecture 25: LDPC Codes and Belief Propagation (CMU 10-704)](https://www.cs.cmu.edu/~aarti/Class/10704_Spring15/lecs/lec25.pdf)
9. [R. W. Hamming (1950). Error Detecting and Error Correcting Codes. Bell System Technical Journal.](https://doi.org/10.1002/j.1538-7305.1950.tb00463.x)
10. [The Art of Signaling: Fifty Years of Coding Theory (Calderbank, IEEE Transactions on Information Theory, 1998)](http://cs-www.cs.yale.edu/homes/yry/readings/wireless/wireless_readings/calderbank_ecc_tutorial.pdf)
11. [RFC 5510: Reed-Solomon Forward Error Correction (FEC) Schemes](https://datatracker.ietf.org/doc/rfc5510/)
12. [MIT 6.02 Handout 7: Convolutional Codes, Construction and Encoding](https://web.mit.edu/6.02/www/f2011/handouts/7.pdf)
13. [Codes (LDPC chapter, Venkat Guruswamy, CMU)](https://www.cs.cmu.edu/~venkatg/pubs/papers/ldpc.pdf)
14. [Performance Analysis of Turbo Codes, LDPC Codes, and Polar Codes over an AWGN Channel in the Presence of Inter Symbol Interference](https://pmc.ncbi.nlm.nih.gov/articles/PMC9965925/)
15. [Polarization and Polar Codes (tutorial monograph by Eren Şaşoğlu)](https://www.ocf.berkeley.edu/~sasoglu/0100000041.pdf)
16. [On a class of error correcting binary group codes (Information and Control, 1960)](https://doi.org/10.1016/s0019-9958%2860%2990287-4)
17. [R. Gallager (1962). Low-density parity-check codes. IEEE Transactions on Information Theory.](https://doi.org/10.1109/tit.1962.1057683)
18. [A. Viterbi (1967). Error bounds for convolutional codes and an asymptotically optimum decoding algorithm. IEEE Transactions on Information Theory.](https://doi.org/10.1109/tit.1967.1054010)
19. [Near Optimum Error Correcting Coding And Decoding: Turbo-Codes (Berrou, Glavieux, Thitimajshima, IEEE Transactions on Communications, 1993)](https://www.ee.technion.ac.il/people/sason/turbo_paper.pdf)
20. [D.J.C. MacKay, R.M. Neal (1996). Near Shannon limit performance of low density paritycheck codes. Electronics Letters.](https://doi.org/10.1049/el:19961141)
21. [Tal, Ido, Vardy, Alexander (2012). List Decoding of Polar Codes. arXiv (Cornell University).](https://doi.org/10.48550/arxiv.1206.0050)
22. [Kai Niu, Kai Chen (2012). CRC-Aided Decoding of Polar Codes. IEEE Communications Letters.](https://doi.org/10.1109/lcomm.2012.090312.121501)
23. [A study of forward error-correction techniques in digital communication systems](https://pubs.aip.org/aip/acp/article/3232/1/020006/3316587/A-study-of-forward-error-correction-techniques-in)
24. [Reed-Solomon error correction coding tutorial (NASA reference publication)](https://ntrs.nasa.gov/api/citations/19900019023/downloads/19900019023.pdf)
25. [Performance analysis of concatenated Reed–Solomon and next generation polar codes for 6G communication systems](https://www.nature.com/articles/s41598-025-13672-2)
26. [Polar Coding for Forward Error Correction in Space Communications (NASA)](https://ntrs.nasa.gov/api/citations/20190032330/downloads/20190032330.pdf)
27. [Error Control in Wireless Sensor Networks: A Cross Layer Analysis](https://digitalcommons.unl.edu/cgi/viewcontent.cgi?article=1097&context=csearticles)
28. [Automatic-repeat-request error-control schemes (IEEE)](https://people.computing.clemson.edu/~jmarty/papers/july2024/996-2-Automatic-repeat-request_error-control_schemes.pdf)
29. [Revisiting the Interface between Error and Erasure Correction in Wireless Standards](https://export.arxiv.org/pdf/2601.01645)
30. [Comparison of Polar Decoders with Existing Low-Density Parity-Check and Turbo Decoders](https://ar5iv.labs.arxiv.org/html/1702.04707)
31. [The 5G Channel Code Contenders (AccelerComm white paper)](https://eprints.soton.ac.uk/399915/1/WhitePaper09Aug2016.pdf)
32. [Challenges and some new directions in channel coding](https://ar5iv.labs.arxiv.org/html/1504.03916)
33. [On the Design and Performance of Machine Learning Based Error Correcting Decoders](https://arxiv.org/html/2410.15899)
34. [Antonio deMarti iOlius and colleagues (2026). An almost-linear time decoding algorithm for quantum LDPC codes under circuit-level noise. npj Quantum Information.](https://doi.org/10.1038/s41534-026-01292-1)
35. [Yufan Yue and colleagues (2026). QFEC: A 9.97 Gb/s Fully Configurable Quad-Mode Decoder for LDPC, Polar, Turbo, and Convolutional Codes. IEEE Transactions on Circuits and Systems I Regular Papers.](https://doi.org/10.1109/tcsi.2026.3669803)
36. [Lh4mjrm0f5f (exa.ai)](https://publications.rwth-aachen.de/search?p=id%3A%22RWTH-CONV-144371%22)
37. [pmc.ncbi.nlm.nih.gov](https://pmc.ncbi.nlm.nih.gov/articles/PMC3871133/)
38. [ita.ucsd.edu](https://ita.ucsd.edu/workshop/08/files/paper/paper_218.pdf)

---
*Initially written Sep 29, 2026 · Reviewed: Sep 30, 2026 · Edited: Sep 30, 2026 · Last review: Sep 30, 2026*

Topic: 技术与人造世界 › 计算技术与数字系统 › 网络与安全 › Networking fundamentals and architecture

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/forward-error-correction

English original: https://www.edgepedia.org/forward-error-correction
