1 / 8

差错检测方法 循环冗余校验 (CRC , Cyclic Redundancy check)

差错检测方法 循环冗余校验 (CRC , Cyclic Redundancy check). 将要传送的信息分成码组 M ,然后按某一种约定的规律对每一个信息码组附加一些校验的码元 R ,形成新的码组 C ,使得 C 中的码元之间具有一定的相关性 ( 即码组中“ 1” 和“ 0” 的出现彼此相关 ) ,再传输到接收端; 接收端根据这种相关性或规律性来校验码组 C 是否正确,还可对出错码组的错定位加以相应的纠正,最后将码组 C 还原成信息码组 M 。. 循环冗余校验 (CRC , Cyclic Redundancy check). 码多项式及其算术运算.

maia-watts
Download Presentation

差错检测方法 循环冗余校验 (CRC , Cyclic Redundancy check)

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 差错检测方法循环冗余校验(CRC,Cyclic Redundancy check) 将要传送的信息分成码组M,然后按某一种约定的规律对每一个信息码组附加一些校验的码元R,形成新的码组C,使得C中的码元之间具有一定的相关性(即码组中“1”和“0”的出现彼此相关),再传输到接收端; 接收端根据这种相关性或规律性来校验码组C是否正确,还可对出错码组的错定位加以相应的纠正,最后将码组C还原成信息码组M。

  2. 循环冗余校验(CRC,Cyclic Redundancy check) • 码多项式及其算术运算 假设循环码为 C= Cn-1 Cn-2…. C2 C1 C0长度为n M的码多项式(称为n-1次多项式) C(x) = Cn-1 xn-1 + Cn-2xn-2 + …. C2 x2 +C1 x + C0 例1: C = 1100101 C(x) =1x6 + 1x5 +0x4+0x3 + 1x2 +0 x + 1 = x6 + x5 +x2 + 1 码多项式的算术运算:模2加、模2减、模2乘、模2除

  3. n位 k位 r位 k+1 k+2 n 校验码元 信息码元 1 2 k 差错检测循环冗余校验码(CRC,Cyclic Redundancy check) • 编码 对于一个码长为n,信息码元为k位的循环码(n,k),其构成形式为: • 每个码多项式的前面k项与待编码的信息多项式相同 • 后面的r=n-k项与校验码元序列对应的校验多项式相同

  4. 差错检测.循环冗余校验码(CRC,Cyclic Redundancy check) 设要编码的k位信息元为:m = (mk-1,mk-2,….m1,m0) m(x) = mk-1 xk-1+ mk-2xk-2+ …. +m1 x+m0 xn-k·m(x) = mk-1 xn-1+ mk-2xn-2+ …. +m1 xn-k+1+m0 xn-k = q(x)·g(x) + r(x) g(x)是(n-k)次多项式 q(x)是商式 r(x)是余式且次数不高于n-k-1 r(x) = rn-k-1 xn-k-1+ rn-k-2xn-k-2+ …. +r1 x+r0 xn-k·m(x) + r(x) = q(x)·g(x) mk-1xn-1+mk-2xn-2+ ...+m1xn-k+1+m0xn-k+rn-k-1xn-k-1+rn-k-2xn-k-2+... +r1 x+r0 ( mk-1, mk-2, ….m1, m0, rn-k-1, rn-k-2, …. ,r1, r0 ) (n-k)个监督位 不加改变的k个信息位

  5. 差错检测循环冗余校验码(CRC,Cyclic Redundancy check) • 例 设编码的信息码元为1101011011 m(x) = x9 + x8 + x6 + x4 + x3 + x + 1, k = 10 (1)假设 P(x) = x4 + x + 1 系数形成的位串为10011 n=4 ——>n+K =14 余数多项式 r(x)的最高幂次为 r =n-1=3 余数取4位 (2) x4·m(x) = 1101011011,0000 (3) 1101011011.0000 10011 商数:1100001010 余数:1110r(x) = x3 + x2 + x + 0 所需的循环编码C(x)为 C(x) = xn·m(x) + r(x) =1101011011,1110

  6. 商数 被除数 m(x) 除数 P(x) 余数 r(x) 差错检测循环冗余校验码(CRC,Cyclic Redundancy check) • 多项式除法 1101011011.0000 10011 1 1 0 0 0 0 1 0 1 0 1 1 0 1 0 1 1 0 1 1,0 0 0 0 1 0 0 1 1 1 0 0 1 1 1 0 0 1 1 1 0 0 1 1 1 0 1 1 0 1 0 0 1 1 模2加=模2减 模2乘 模2除=乘的可逆运算 1 0 1 0 0 1 0 0 1 1 1 1 1 0

  7. 差错检测循环冗余校验码(CRC,Cyclic Redundancy check) 在接收端本来应该收到: c(x) = xr·m(x) + r(x) = Q(x)·P(x) 用协商好的生成多项式P(x)去除c(x),从余数来判断是否出错

  8. 广泛使用的生成多项式P(x)有: CRC-12=x12+x11+x3+x2+x+1 CRC-16=x16+x15+x2+1 CRC-CCITT=x16+x12+x5+1

More Related