知识点 - 信源编码和信道编码

来源:百度文库 编辑:神马文学网 时间:2024/04/29 16:16:12
 教学论坛
 知识点 [返回]
   信源编码和信道编码 
标记论坛所有内容为已读   
>> 知识点欢迎您的到来 << 

   ◆您是本帖第 4079 个阅读者◆         * 贴子主题: 信源编码和信道编码                   qbxiong     
 


信息:
威望: 0
来自: 保密 
总发贴数: 2236
注册日期: 2003/04/16
消息 查看 搜索 好友 邮件 复制 引用 回复 

  此主题相关图片如下:


在数据通信系统中的地位见附图。




  2004/12/30 04:13pm IP: 已设置保密  qbxiong     
 


信息:
威望: 0
来自: 保密 
总发贴数: 2236
注册日期: 2003/04/16
消息 查看 搜索 好友 邮件 复制 引用 回复 

  此主题相关图片如下:


信源编码综述如附图。




  2004/12/30 04:16pm IP: 已设置保密  qbxiong     
 


信息:
威望: 0
来自: 保密 
总发贴数: 2236
注册日期: 2003/04/16
消息 查看 搜索 好友 邮件 复制 引用 回复 

  此主题相关图片如下:


信道编码综述如附图。




  2004/12/30 04:18pm IP: 已设置保密  qbxiong     
 


信息:
威望: 0
来自: 保密 
总发贴数: 2236
注册日期: 2003/04/16
消息 查看 搜索 好友 邮件 复制 引用 回复 

  先看信源编码;课本相关段落有:

【第140页倒数第3自然段】The analog signals are digitized in the end office by a device called a codec (coder-decoder), producing a series of 8-bit numbers. The codec makes 8000 samples per second (125 µsec/sample) because the Nyquist theorem says that this is sufficient to capture all the information from the 4-kHz telephone channel bandwidth. At a lower sampling rate, information would be lost; at a higher one, no extra information would be gained. This technique is called PCM (Pulse Code Modulation). PCM forms the heart of the modern telephone system. As a consequence, virtually all time intervals within the telephone system are multiples of 125 µsec.

【第142页第2自然段至第143页第2自然段】
Once the voice signal has been digitized, it is tempting to try to use statistical techniques to reduce the number of bits needed per channel. These techniques are appropriate not only for encoding speech, but for the digitization of any analog signal. All of the compaction methods are based on the principle that the signal changes relatively slowly compared to the sampling frequency, so that much of the information in the 7- or 8-bit digital level is redundant.

One method, called differential pulse code modulation, consists of outputting not the digitized amplitude, but the difference between the current value and the previous one. Since jumps of ±16 or more on a scale of 128 are unlikely, 5 bits should suffice instead of 7. If the signal does occasionally jump wildly, the encoding logic may require several sampling periods to ''catch up.'' For speech, the error introduced can be ignored.

A variation of this compaction method requires each sampled value to differ from its predecessor by either +1 or -1. Under these conditions, a single bit can be transmitted, telling whether the new sample is above or below the previous one. This technique, called delta modulation, is illustrated in Fig. 2-34. Like all compaction techniques that assume small level changes between consecutive samples, delta encoding can get into trouble if the signal changes too fast, as shown in the figure. When this happens, information is lost.

An improvement to differential PCM is to extrapolate the previous few values to predict the next value and then to encode the difference between the actual signal and the predicted one. The transmitter and receiver must use the same prediction algorithm, of course. Such schemes are called predictive encoding. They are useful because they reduce the size of the numbers to be encoded, hence the number of bits to be sent.






  2004/12/31 10:05am IP: 已设置保密  qbxiong     
 


信息:
威望: 0
来自: 保密 
总发贴数: 2236
注册日期: 2003/04/16
消息 查看 搜索 好友 邮件 复制 引用 回复 

  [这个贴子最后由qbxiong在 2004/12/31 10:38am 第 1 次编辑]

第2章与信源编码有关的习题以及作者给出的答案如下。

第29题
Q:
Why has the PCM sampling time been set at 125 µsec?
A:
A sampling time of 125 µsec corresponds to 8000 samples per second. According to the Nyquist theorem, this is the sampling frequency needed to capture all the information in a 4 kHz channel, such as a telephone channel. (Actually the nominal bandwidth is somewhat less, but the cutoff is not sharp.)

第33题
Q:
What is the difference, if any, between the demodulator part of a modem and the coder part of a codec? (After all, both convert analog signals to digital ones.)
A:
A coder accepts an arbitrary analog signal and generates a digital signal from it. A demodulator accepts a modulated sine wave only and generates a digital signal.

第34题
Q:
A signal is transmitted digitally over a 4-kHz noiseless channel with one sample every 125 µsec. How many bits per second are actually sent for each of these encoding methods?
(a) CCITT 2.048 Mbps standard.
(b) DPCM with a 4-bit relative signal value.
(c) Delta modulation.
A:
(a) 64 kbps. (b) 32 kbps. (c) 8 kbps.

第35题
Q:
A pure sine wave of amplitude A is encoded using delta modulation, with x samples/sec. An output of +1 corresponds to a signal change of +A/8, and an output signal of -1 corresponds to a signal change of -A/8. What is the highest frequency that can be tracked without cumulative error?
A:
The signal must go from 0 to A in one quarter of a wave—that is, in a time T/4. In order to track the signal, 8 steps must fit into the quarter wave, or 32 samples per full wave. The time per sample is 1/x so the full period must be long enough to contain 32 samples—that is, T>32/x or fmax=x/32.






  2004/12/31 10:36am IP: 已设置保密  qbxiong     
 


信息:
威望: 0
来自: 保密 
总发贴数: 2236
注册日期: 2003/04/16
消息 查看 搜索 好友 邮件 复制 引用 回复 

  此主题相关图片如下:


[这个贴子最后由qbxiong在 2006/11/26 03:16pm 第 1 次编辑]

以太网的信道编码(也就是Line coding)见附图=Slides ch4-03第7页。





  2004/12/31 02:28pm IP: 已设置保密  qbxiong     
 


信息:
威望: 0
来自: 保密 
总发贴数: 2236
注册日期: 2003/04/16
消息 查看 搜索 好友 邮件 复制 引用 回复 

  此主题相关图片如下:


曼彻斯特(Manchester)和差分曼彻斯特(Differential Manchester)编码是基带传输的主要编码方式,不仅用于局域网;其编码规则见附图=Slides ch4-03第23页。

【课本第4.3.2小节(第274至275页)】None of the versions of Ethernet uses straight binary encoding with 0 volts for a 0 bit and 5 volts for a 1 bit because it leads to ambiguities. If one station sends the bit string 0001000, others might falsely interpret it as 10000000 or 01000000 because they cannot tell the difference between an idle sender (0 volts) and a 0 bit (0 volts). This problem can be solved by using +1 volts for a 1 and -1 volts for a 0, but there is still the problem of a receiver sampling the signal at a slightly different frequency than the sender used to generate it. Different clock speeds can cause the receiver and sender to get out of synchronization about where the bit boundaries are, especially after a long run of consecutive 0s or a long run of consecutive 1s.

What is needed is a way for receivers to unambiguously determine the start, end, or middle of each bit without reference to an external clock. Two such approaches are called Manchester encoding and differential Manchester encoding. With Manchester encoding, each bit period is divided into two equal intervals. A binary 1 bit is sent by having the voltage set high during the first interval and low in the second one. A binary 0 is just the reverse: first low and then high. This scheme ensures that every bit period has a transition in the middle, making it easy for the receiver to synchronize with the sender. A disadvantage of Manchester encoding is that it requires twice as much bandwidth as straight binary encoding because the pulses are half the width. For example, to send data at 10 Mbps, the signal has to change 20 million times/sec. Manchester encoding is shown in Fig. 4-16(b).

Differential Manchester encoding, shown in Fig. 4-16(c), is a variation of basic Manchester encoding. In it, a 1 bit is indicated by the absence of a transition at the start of the interval. A 0 bit is indicated by the presence of a transition at the start of the interval. In both cases, there is a transition in the middle as well. The differential scheme requires more complex equipment but offers better noise immunity. All Ethernet systems use Manchester encoding due to its simplicity. The high signal is +0.85 volts and the low signal is -0.85 volts, giving a DC value of 0 volts. Ethernet does not use differential Manchester encoding, but other LANs (e.g., the 802.5 token ring) do use it.

第4章与曼彻斯特和差分曼彻斯特编码有关的习题以及作者给出的答案如下。

第17题
Q:
Sketch the Manchester encoding for the bit stream: 0001110101.
A:
The signal is a square wave with two values, high (H) and low (L). The pattern is LHLHLHHLHLHLLHHLLHHL.

第18题
Q:
Sketch the differential Manchester encoding for the bit stream of the previous problem. Assume the line is initially in the low state.
A:
The pattern this time is HLHLHLLHHLLHLHHLHLLH.






  2004/12/31 09:53pm IP: 已设置保密  qbxiong     
 


信息:
威望: 0
来自: 保密 
总发贴数: 2236
注册日期: 2003/04/16
消息 查看 搜索 好友 邮件 复制 引用 回复 

  课本与千兆以太网信道编码相关的段落有:

【第289页第2至3自然段】Gigabit Ethernet uses new encoding rules on the fibers. Manchester encoding at 1 Gbps would require a 2 Gbaud signal, which was considered too difficult and also too wasteful of bandwidth. Instead a new scheme, called 8B/10B, was chosen, based on fibre channel. Each 8-bit byte is encoded on the fiber as 10 bits, hence the name 8B/10B. Since there are 1024 possible output codewords for each input byte, some leeway was available in choosing which codewords to allow. The following two rules were used in making the choices:
1. No codeword may have more than four identical bits in a row.
2. No codeword may have more than six 0s or six 1s.
These choices were made to keep enough transitions in the stream to make sure the receiver stays in sync with the sender and also to keep the number of 0s and 1s on the fiber as close to equal as possible. In addition, many input bytes have two possible codewords assigned to them. When the encoder has a choice of codewords, it always chooses the codeword that moves in the direction of equalizing the number of 0s and 1s transmitted so far. This emphasis of balancing 0s and 1s is needed to keep the DC component of the signal as low as possible to allow it to pass through transformers unmodified. While computer scientists are not fond of having the properties of transformers dictate their coding schemes, life is like that sometimes.

Gigabit Ethernets using 1000Base-T use a different encoding scheme since clocking data onto copper wire in 1 nsec is too difficult. This solution uses four category 5 twisted pairs to allow four symbols to be transmitted in parallel. Each symbol is encoded using one of five voltage levels. This scheme allows a single symbol to encode 00, 01, 10, 11, or a special value for control purposes. Thus, there are 2 data bits per twisted pair or 8 data bits per clock cycle. The clock runs at 125 MHz, allowing 1-Gbps operation. The reason for allowing five voltage levels instead of four is to have combinations left over for framing and control purposes.


第4章与8B/10B编码有关的习题以及作者给出的答案如下。

第25题
Q:
The 1000Base-SX specification states that the clock shall run at 1250 MHz, even though gigabit Ethernet is only supposed to deliver 1 Gbps. Is this higher speed to provide for an extra margin of safety? If not, what is going on here?
A:
The encoding is only 80% efficient. It takes 10 bits of transmitted data to represent 8 bits of actual data. In one second, 1250 megabits are transmitted, which means 125 million codewords. Each codeword represents 8 data bits, so the true data rate is indeed 1000 megabits/sec.






  2005/01/02 09:04am IP: 已设置保密  qbxiong     
 


信息:
威望: 0
来自: 保密 
总发贴数: 2236
注册日期: 2003/04/16
消息 查看 搜索 好友 邮件 复制 引用 回复 

 
下面引用由qbxiong2004/12/31 09:53pm 发表的内容:
第4章与8B/10B编码有关的习题以及作者给出的答案如下。

第25题
Q:
...
A:
The encoding is only 80% efficient. ...


这80%就是所谓的“编码效率”,它等于每个码字中含有的信息量除以码字的长度。(作者在正文中没有专门给出“编码效率”这一术语的定义)

又如100Base-TX用的4B5B码:每5个时钟周期为一码字,发送4个信息比特(见课本第285页第3自然段);故编码效率为:4/5,也是80%。

在信道带宽一定的情况下,编码效率越低,实际有用的比特率也就越低。提高可靠性是以降低实际有用的比特率(即浪费带宽)为代价的。

曼彻斯特编码的效率是50%,所以课本第289页第2自然段说:Manchester encoding at 1 Gbps would require a 2 Gbaud signal, which was considered too difficult and also too wasteful of bandwidth。