错误检测与纠正
错误检测与纠正,又称错误控制,分为错误检测与错误纠正两部分。
错误类型
reference: burst error
错误检测
错误检测是为了验证数据在信道传输过程中是否出现错误,常用的算法有:
- 横向冗余校验(based on parity)
- 纵向冗余校验(based on parity)
- 纵横冗余校验(based on parity)
- 校验和
- 循环冗余校验
横向冗余校验
纵向冗余校验(Xor8/16/32)
纵横冗余校验
横向冗余校验能够检出错误发生在哪一个字节,但无法确定发生在哪一位;而纵向冗余校验则能够检出错误发生在哪一列,但无法确定发生在哪一个字节。因此,当同时使用横向冗余校验和纵向冗余校验时,在部分情况下是能够定位错误并予以纠正的。
校验和
整数加法校验和
整数加法校验和(with ones’ complement)
弗莱彻-校验和(Fletcher’s checksum)
略.
阿德勒-校验和(Adler-32)
略.
Luhn algorithm
略.
Damm algorithm
略.
Verhoeff algorithm
略.
循环冗余校验(CRC)
略.
错误纠正
错误纠正是为了在检测到错误后能够自动纠正,常见的纠错类型有:
- 前向纠错
- 后向纠错
- 混合方案
前向纠错(纠错码)
略.
后向纠错(重发机制)
略.
混合方案
略.
参考链接:
https://users.ece.cmu.edu/~koopman/pubs/KoopmanCRCWebinar9May2012.pdf
https://www.csus.edu/indiv/p/pangj/166/f/d8/5_Modulo%202%20Arithmetic.pdf
https://crccalc.com/
https://reveng.sourceforge.io/crc-catalogue/16.htm#crc.cat-bits.16
https://srecord.sourceforge.net/crc16-ccitt.html
www.sunshine2k.de/articles/coding/crc/understanding_crc.html
http://www.ross.net/crc/download/crc_v3.txt
https://segmentfault.com/a/1190000018094567
https://www.jianshu.com/p/654891ade9d5
https://gitee.com/anyangchina/crc_all/blob/master/C%23/crc/Program.cs
https://gitee.com/anyangchina/crc_all/blob/master/C%23/crc_table/Program.cs