计算机网络和数据通信10检错与纠错

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
第十章 检错与纠错
• 差错控制-检错和纠错是指对传输的数据信号 进行错误检测和错误纠正,以及发现错误而不 能及时纠正错误,但能加以适当处置的某些方 法。 • 检测和纠正差错的三种基本方法:①时间冗余 法;②设备冗余法;③数据冗余法。 • 差错控制的基本思想:通过对信号码元序列作 某种变换,使得原来彼此独立、无相关性的信 号码元之间产生某种规律性或相关性,从而在 接收端可根据这种规律性来检测甚至纠正传输 序列中可能出现的错误。
10.12
Example 10.2
Let us assume that k = 2 and n = 3. Table 10.1 shows the list of datawords and codewords. Later, we will see how to derive a codeword from a dataword.
10.26
Table 10.3 Simple parity-check code C(5, 4)
A simple parity-check code can detect an odd number of errors.
Figure 10.10 Encoder and decoder for simple parity-check code
10.23
奇偶校验码
a n −1 a n − 2 ⋅ ⋅ ⋅ ⋅ ⋅ ⋅a1 1442443
a0
监督码
信息码
• 编码规则:将所要传送的数据信息分组,再在一 组内诸信息码元后面附加一个校验码元,使得该 组码元中“1”的个数成为奇数或偶数。按照此 规则编成的校验码分别称为奇校验码或偶校验码。

n −1 i =1
ຫໍສະໝຸດ Baidu
Assume the sender encodes the dataword 01 as 011 and sends it to the receiver. Consider the following cases: 1. The receiver receives 011. It is a valid codeword. The receiver extracts the dataword 01 from it.
练习题:编码方案汉明距离dmin = 6. 问检错和纠错能力 是什么?(参照 P181例10.9) 答:最多可以检出5个差错, 可以纠正2个差错。
10.22
10-3 线性块编码(线性码) 10-
由k个信息码元和r个校验码元构成的码组,其中每 一个校验码元是该码组中某些信息码元的模2和,具 有这种结构格式的码组称为线性码。 线性码具有封闭性,意即线性码的任何两个码组对 应位按模2相加所得到的新码组仍然是该线性码的 一个码组。
ki + kn =
1 (奇校验) (mod 2) 0 (偶校验)
上述两式在发送端生成所需要的奇偶校验码,同 时在接收端又重新生成新的奇偶校验码,并与之 相比较,以确定传输中是否存在差错。 24
Example 10.10
Let us see if the two codes we defined in Table 10.1 and Table 10.2 belong to the class of linear block codes. 1. The scheme in Table 10.1 is a linear block code because the result of XORing any codeword with any other codeword is a valid codeword. For example, the XORing of the second and third codewords creates the fourth one. 2. The scheme in Table 10.2 is also a linear block code. We can create all four codewords by XORing two other codewords.
10.17
Example 10.6
Find the minimum Hamming distance of the coding scheme in Table 10.2. Solution We first find all the Hamming distances.
The dmin in this case is 3.
10.14
汉明距离
• 汉明距离(Hamming Distance) (码距)是两 个字符串对应位置的不同字符(二进制码元) 的个数。 • 而在一种编码中,任意两个许用码组间距离 的最小值,即码组集合中任意两元素间的最 小距离,称为这一编码的最小汉明(Hamming) 距离,以 d min 表示。
Example 10.4
10.25
Example 10.11
In our first code (Table 10.1), the numbers of 1s in the nonzero codewords are 2, 2, and 2. So the minimum Hamming distance is dmin = 2. In our second code (Table 10.2), the numbers of 1s in the nonzero codewords are 3, 3, and 4. So in this code we have dmin = 3.
10.13
Example 10.2 (continued)
2. The codeword is corrupted during transmission, and 111 is received. This is not a valid codeword and is discarded. 3. The codeword is corrupted during transmission, and 000 is received. This is a valid codeword. The receiver incorrectly extracts the dataword 00. Two corrupted bits have made the error undetectable.
差错控制方式(续1) 2.前向纠错 表示前向纠错(简称FEC)方式。前向纠错系统中,发送端的信道编码器将 输入数据序列变换成能够纠正错误的码,接收端的译码器根据编码规律 检验出错误的位置并自动纠正。 3.混合纠错,检错 混合纠错检错方式是前向纠错方式和检错重发方式的结合。 4.信息反馈 信息反馈方式(简称IRQ)又称回程校验。 接收端收到数据信息后,同时 将该组数据信息经反馈信道送回发送端。发送端将送回来的数据信息与 原发数据信息进行对照比较,如果完全一样,则认为传输接收无差错, 可继续发送新的数据;如果两者不一致,则判断为传输接收有差错,发 送端应控制重发。回程校验具有设备简单、实现容易的优点,但信道利 用率下降50%。
10.18
Table 10.2 A code for error correction (Example 10.3)
10.19
Figure 10.8 Geometric concept for finding dmin in error detection
Figure 10.9 Geometric concept for finding dmin in error correction
回程校验示意图
6
• 数据信号序列错误可归纳为两种类型:①随机性错误, 主要由起伏噪声所引起,其特点是数据信号序列中前后 出错位分布较分散且彼此没有一定的关系;②突发性错 误,主要由脉冲声所引起,其特点是出错位分布较集中, 且前后出错位之间具有某种相关性。
Single-bit error
10-2 块编码 10Figure 10.3 The structure of encoder and decoder
2.1
10-1 引言 10• 检错和纠错的原理 • 纠错编码之所以具有检错和纠错能力,是因为 在信息码之外附加了监督码。监督码不荷载信 息,它的作用是用来监督信息码在传输中有无 差错,对用户来说是多余的,最终也不传送给用 户,但它提高了传输的可靠性。但是,监督码的 引入,降低了信道的传输效率。一般来说,引入 监督码元越多,码的检错、纠错能力越强,但信 道的传输效率下降也越多。
Figure 10.6 Process of error detection in block coding
Figure 10.4 XORing of two single bits or two words
仅用与非门实现的异或门
仅用或非门实现的异或门
10.11
Table 10.1 A code for error detection (Example 10.2)
Let us find the Hamming distance between two pairs of words. 1. The Hamming distance d(000, 011) is 2 because
2. The Hamming distance d(10101, 11110) is 3 because
10.16
Example 10.5
Find the minimum Hamming distance of the coding scheme in Table 10.1. Solution We first find all Hamming distances.
The dmin in this case is 2.
Figure 10.5 Datawords and codewords in block coding
In block coding, we divide our message into blocks, each of k bits, called datawords. datawords. We add r redundant bits to each block to make the length n = k + r. The resulting n-bit blocks are called codewords. codewords.
差错控制方式
ARQ (Automatic repeat request)
FEC (Forward Error Correction)
HEC (Hybrid Error Correction)
IRQ (Information Repeat request)
差错控制方式(续1)
1.检错重发 检错重发简称ARQ。这种差错控制方式在发送端对数据序列进行分组编码, 加入一定多余码元使之具有一定的检错能力,成为能劬够发现错误的码 组。接收端收到码组后按一定的规则进行有无差错的判决并把判决结果 通过反向信道送回发送端,如有差错,发送端把前面发出的信息重新传 送一次,直到接收端认为正确接收到信息为止。 在具体实现检错重发系统时,通常有3种形式,即停发等候重发、返回重发 和选择重发。 (1)停发等候重发 (2)返回重发 (3)选择重发
10.28
Example 10.12
Let us look at some transmission scenarios. Assume the sender sends the dataword 1011. The codeword created from this dataword is 10111, which is sent to the receiver. We examine five cases: 1. No error occurs; the received codeword is 10111. The syndrome is 0. The dataword 1011 is created. 2. One single-bit error changes a1 . The received codeword is 10011. The syndrome is 1. No dataword is created. 3. One single-bit error changes r0 . The received codeword is 10110. The syndrome is 1. No dataword is created.
相关文档
最新文档