数据通信与网络编码信息ppt课件.ppt

上传人:小飞机 文档编号:1350218 上传时间:2022-11-12 格式:PPT 页数:128 大小:1.39MB
返回 下载 相关 举报
数据通信与网络编码信息ppt课件.ppt_第1页
第1页 / 共128页
数据通信与网络编码信息ppt课件.ppt_第2页
第2页 / 共128页
数据通信与网络编码信息ppt课件.ppt_第3页
第3页 / 共128页
数据通信与网络编码信息ppt课件.ppt_第4页
第4页 / 共128页
数据通信与网络编码信息ppt课件.ppt_第5页
第5页 / 共128页
点击查看更多>>
资源描述

《数据通信与网络编码信息ppt课件.ppt》由会员分享,可在线阅读,更多相关《数据通信与网络编码信息ppt课件.ppt(128页珍藏版)》请在三一办公上搜索。

1、Chapter 5 ENCODING,第五章 编码,5.1 Digital-to-Digital Encoding5.2 Analog-to-Digital Encoding5.3 Digital-to-Analog Encoding5.4 Analog-to-Analog Encoding5.5 Summary,Contents,Introduction of Encoding,The information or data must be encoded into signals before it can be transported across the communication m

2、edia.The signal must be manipulated so that it contains identifiable changes that are recognizable to the sender and receiver as representing the information intended.,Different encoding schemes,Introduction of Encoding,How information is encode depends on its original format and on the format used

3、by communication hardware.,5.1 Digital-to-digital encoding,Digital-to-digital encoding is the representation of digital information by a digital signal.,Both the original data and transmitted data are digital.The binary 1s and 0s are translated into a sequence of voltage pulse that can be propagated

4、 over wire.,Types of digital-to-digital encoding,Digital/digitalencoding,Unipolar,Polar,Bipolar,5.1 Digital-to-digital encoding,单极性编码,极化编码,双极性编码,5.1.1 Unipolar(单极性编码),Digital transmission systems work by sending voltage pulses along a media link( wire or cable). In most types of encoding, one voltag

5、e level stands for binary 0 and another level stands for binary 1.The polarity of pulse (脉冲极性) refer to whether it is positive or negative.Unipolar encoding is so named because it uses only one polarity.,5.1.1 Unipolar(单极性编码),The 1s are encoded as positive value;The 0s are encoded as zero, or idle.,

6、The idea of unipolar encoding.,Advantage:Very Simple and Straightforward; inexpensive to implementDisadvantages:1、同步(synchronization) when a signal is unvarying, the receiver cannot determine the beginning and ending of each bits. Therefore, a synchronization problem in unipolar encoding can occur w

7、henever the data stream includes a long uninterrupted series of 1s or 0s.,5.1.1 Unipolar (单极性编码),synchronizationTo correctly interpret the signals received from the sender, the receivers bit intervals must correspond exactly to the senders bit intervals.If the receiver clock is faster or slower, the

8、 bit intervals are not matched and the receiver might misinterpret the signals.The solution of synchronizationparallel line carrying synchronization clock pulse.,5.1.1 Unipolar (单极性编码),Example: synchronization Given an expected bit rate of 1000bps, if the receiver detects a positive voltage lasting

9、0.005s, it reads one 1 per 0.001s, or five 1s. (Propagation delays distort it to 0.006s),5.1.1 Unipolar(单极性编码),2、DC component(直流分量、直流成分)当数字信号中的电平保持一段时间的恒定时,频谱会产生很低的频率(据傅立叶分析)。这些接近于零的频率称为DC component。直流分量会对不允许通过低频的系统或使用电子耦合的系统带来严重的影响。例如:电话线不能通过低于200Hz的频率;长距离链路一般会用多个变压器来隔离线路的不同部分。,5.1.1 Unipolar (单极性编

10、码),5.1.2 Polar (极化编码),Polar encoding uses two voltage level: one positive and one negative.Advantage:By using both levels, in most polar encoding methods the average voltage level on the line is reduced and the DC component problem of unipolar encoding is alleviated.,Types of polar encoding,polar,NR

11、Z,RZ,Biphase,NRZ-L,NRZ-I,Manchester,DifferentialManchester,5.1.2 Polar(极化编码),IN NRZ encoding, the level of the signal is always either positive or negative.If the line is idle it means no transmission is occurring at all.The two most popular methods: NRZ-L(非归零电平编码) NRZ-I(非归零反相编码)Disadvantage of NRZ

12、Both NRZ-L and NRZ-I have a DC component problem.,5.1.2.1 NRZ (Non-Return-to-Zero),Two methods of NRZ:In NRZ_L, the level of the signal depends on the type of bit it represents. 0s positive voltage 1s negative voltageIn NRZ_I the signal is inverted if a 1 is encountered. 无论当前处于什么状态(高电平或低电平),只要下一位是1,

13、则跳转到相反的状态。即电平是否反相决定了其位值。,5.1.2.1 NRZ (Non-Return-to-Zero),5.1.2.1 NRZ (Non-Return-to-Zero),跳变,由于下一比特为1,振幅,时间,时间,NRZ-L(非归零电平编码),NRZ-I(非归零反向编码),0,0,0,0,1,1,1,1,编码规则:在NRZ-L编码方式中,电平的极性具有特定的含义:正代表比特0,负代表比特1;在NRZ-I编码方式中,每段比特间隔的电平值是没有意义的,接收端是以检测每个比特开始处是否有电平的跳变来识别比特1,而在每比特开始处保持当前电平不变的则表示比特0。,5.1.2.1 NRZ (No

14、n-Return-to-Zero),NRZ-I相对NRZ-L的优点:由于每遇到比特1都发生电平跃迁,因此提供了一种同步(Synchronization)机制。一串7个比特1会导致7次电平跃迁,每次跃迁都使接收方能根据信号的实际到达来对本身时钟进行重同步调整。(据统计,连续的比特1出现的几率比连续的比特0出现的几率大,因此对比特1的连续串进行同步在保持整体消息同步上更有优势。) 一串连续的比特0仍会造成麻烦,但由于连续0串出现不频繁,对于解码来说其妨碍就小了许多。,5.1.2.1 NRZ (Non-Return-to-Zero),RZ encoding uses three values: po

15、sitive, zero, negative. 0 positive (actually, negative-to-zero) 1 negative (actually, positive-to-zero) halfway through each bit interval, the signal return to zero.In RZ, the signal changes not between bits, but during each bit(位于位间隔之间).In RZ, the signal changes during each bit be used for synchron

16、ization.,5.1.2.2 RZ (Return-to-Zero) encoding,5.1.2.2 RZ (Return-to-Zero) encoding,跳变可以用于同步,信号值,时间,0,0,0,0,1,1,1,1,正跳(从负到零电平)表示0;负跳(从正到零电平)表示1。,由于每位都在其位间隔中间位置归零,并保持半个位间隔时间,因此每位的开始都是由零开始跳变。若下一位是1(由高电平到零电平的跳变表示,负向跳变),则首先由零电平跳变到高电平,持续半个位间隔(可理解为准备阶段),然后在1/2位间隔处由高电平归零(代表1),并保持半个位间隔时间;若下一位是0(由低电平到零电平的跳变表示

17、,正向跳变),则首先由零电平跳变到低电平,持续半个位间隔(可理解为准备阶段) ,然后在1/2位间隔处由低电平归零(代表0),并保持半个位间隔时间。,5.1.2.2 RZ (Return-to-Zero) encoding,Disadvantage of RZ:requires two signal changes to encode one bit, therefore occupies more bandwidth.Use three level.Advantage:A good encoded digital signal must contain a provision for sync

18、hronization.There is a signal change for each bit, so providing synchronization.,5.1.2.2 RZ (Return-to-Zero) encoding,5.1.2.3 Biphase(双相位编码),In biphase encoding, the signal changes at middle of bit interval, but does not return to zero. Instead, it continues to the opposite pole. Two types of biphas

19、e encoding methods: Manchester; Differential Manchester.The biphase encoding is the best solution to the problem of synchronization.,In Manchester encoding, the duration of the bit is divided into two halves. The voltage remains at one level during the first half and moves to the other in the second

20、 half. The transition at the middle of the bit provides synchronization.Differential Manchester combines the ideas of RZ and NRZ-I. There is always a transition at the middle of the bit, but the bit values are determined at the beginning (point) of the bit. If the next bit is 0, there is a transitio

21、n; If the next bit is 1, there is none.,5.1.2.3 Biphase(双相位编码),在曼彻斯特编码中,由位间隔处的电平变化方向来表示数据,正电平到负电平的跳变为0 ,负电平到正电平的跳变为1 。在差分曼彻斯特编码中,由每位开始时是否发生跳变来确定比特值,如果发生(反向)跳变则为0,如果保持当前电平则为1。(注意在每位中间,无论0或1,都需要反向跳变。) 对于位间隔点(起始点),1是通过,0是跳变。,5.1.2.3 Biphase(双相位编码),5.1.2.3 Biphase(双相位编码),同步机制 在曼彻斯特编码与差分曼彻斯特编码中,每个1/2位间隔处

22、都有反向跳变,提供了同步机制。数据表示 曼彻斯特编码利用电平值跳变方向表示数据; 差分曼彻斯特编码利用每位开始时是否发生跳变来确定比特值。,5.1.2.3 Biphase(双相位编码),5.1.3 Bipolar(双极性编码),In bipolar encoding (sometimes called multilevel binary), there are three voltage levels: positive, negative, and zero. The voltage level for one data element is at zero, while the volta

23、ge level for the other element alternates between positive and negative. 00电平; 1高低电平交替。(双极性)传号交替反转(AMI)双极性8连0替换(B8ZS)3阶高密度双极性(HDB3),Types of Bipolar Encoding,Bipolar,AMI,B8ZS,HDB3,5.1.3 Bipolar(双极性编码),双极性传号反转,双极性8连0替换,3阶高密度双极性,5.1.3.1 Bipolar Alternate Mark Inversion (AMI),双极性传号交替反转码(AMI)A common bi

24、polar encoding scheme is called bipolar alternate mark inversion (AMI). In the term alternate mark inversion (AMI), the word mark (传号) comes from telegraphy and means 1. So AMI means alternate 1 inversion.A neutral zero voltage represents binary 0; Binary 1s are represented by alternating positive a

25、nd negative voltages.,振幅,时间,0,0,0,0,1,1,1,1,正负电平交替变换代表比特1,5.1.3.1 Bipolar Alternate Mark Inversion (AMI),Advantage of AMI:1、No DC componentTo a long sequence of 1s, the voltage level alternates between positive and negative, it is not constant. Therefore, there is no DC component. For a long sequenc

26、e of 0s, the voltage remains constant, but its amplitude is zero, which is the same as having no DC component. In other words, a sequence that creates a constant zero voltage does not have a DC component.2、1s can be used to synchronization.(0 can not.),5.1.3.1 Bipolar Alternate Mark Inversion (AMI),

27、5.1.3.2 Bipolar 8-Zero Substitution(B8ZS),双极性8连0替换B8ZS is the convention adopted in North America to provide synchronization of long strings of 0s.In most situations, B8ZS functions identically to bipolar AMI. The difference occurs whenever eight or more consecutive 0s are encountered in the data st

28、ream.The solution is to force artificial signal changes, called violations, within the 0 string.,Anytime eight 0s occur in succession, B8ZS introduces change in the pattern based on the polarity of the previous 1.,5.1.3.2 Bipolar 8-Zero Substitution(B8ZS),+,0,0,0,0,0,0,0,0,+,0,0,0,-,+,0,+,-,-,0,0,0,

29、0,0,0,0,0,-,0,0,+,-,0,-,+,previous 1 is positive.,previous 1 is negative.,0,D8ZS将8个连续的零置换为000VB0VB。 V(违反)表示与前一个非零脉冲极性相同的极性; B(双极)表示与前一个非零脉冲极性相反的极性。,5.1.3.2 Bipolar 8-Zero Substitution(B8ZS),+,0,0,0,0,0,0,0,0,+,0,0,0,-,+,0,+,-,-,0,0,0,0,0,0,0,0,-,0,0,0,+,-,0,-,+,0 0 0 V B 0 V B,0 0 0 V B 0 V B,非零脉冲,非

30、零脉冲,D8ZS将8个连续的零置换为000VB0VB。 V(违反)表示与前一个非零脉冲极性相同的极性; 即该位违反了AMI编码规则。 B(双极)表示与前一个非零脉冲极性相反的极性。 即该位与AMI编码规则保持一致。,5.1.3.2 Bipolar 8-Zero Substitution(B8ZS),5.1.3.3 High-Density Bipolar 3 (HDB3),3阶高密度双极性编码HDB3 is commonly used outside of North America. In this technique, which is more conservative than B8Z

31、S, four consecutive zero-level voltages are replaced with a sequence of 000V or B00V. The reason for two different substitutions is to maintain the even number of nonzero pulses after each substitution.,5.1.3.3 High-Density Bipolar 3 (HDB3),Two rules can be stated as follows:1. If the number of nonz

32、ero pulses after the last substitution is odd, the substitution pattern will be 000V, which makes the total number of nonzero pulses even.2. If the number of nonzero pulses after the last substitution is even, the substitution pattern will be B00V, which makes the total number of nonzero pulses even

33、.,5.1.3.3 High-Density Bipolar 3 (HDB3),3阶高密度双极性编码HDB3编码中,如果遇到连续4个0比特,根据前导1的极性和自上一次替换后传输的1的比特数的奇偶性,以4种方式改变对应的比特模式。,+,0,0,0,0,-,0,0,0,0,+,0,0,0,+,-,0,0,0,-,最近一次替换后比特流中的1数目为奇,5.1.3.3 High-Density Bipolar 3 (HDB3),0 0 0 V,0 0 0 V,+,0,0,0,0,-,0,0,0,0,+,-,0,0,-,-,+,0,0,+,最近一次替换后比特流中的1数目为偶,5.1.3.3 High-De

34、nsity Bipolar 3 (HDB3),B 0 0 V,B 0 0 V,5.1.3.3 High-Density Bipolar 3 (HDB3),记忆方式:总体原则:变换后比特1的总数为偶数,即当前比特1的个数为奇数,则替换1位(奇替换);若当前比特1的个数为偶数,则需要替换两位(偶替换) 。奇替换中,利用0000的最后一个0与前导比特1形成违例,即相同极性,违背了AMI的原则;偶替换中,利用0000的第1和第4位形成一个违例,即保持同极性,来违背AMI原则。(注意:第一位与前导比特1不能违例)。,+,0,0,0,0,-,0,0,0,0,+,0,0,0,+,-,0,0,0,-,奇替换,

35、替换最后一位,并且替换位与前导的比特1极性相同,产生一个违例。,5.1.3.3 High-Density Bipolar 3 (HDB3),+,0,0,0,0,-,0,0,0,0,+,-,0,0,-,-,+,0,0,+,偶替换,替换0000中的第一和第四位,并且两个替换位产生一个违例(同极性)。注意:第一位与前导位不违例。,5.1.3.3 High-Density Bipolar 3 (HDB3),5.1.4 Example,振幅,时间,Example 1:采用B8ZS,对比特流1000 0000 0001 00进行编码(假设第一个1的极性为正)。,1 0 0 0 0 0 0 0 0 0 0

36、1 0 0,5.1.4 Example,Solution:,0 0 0 V B 0 V B,变换规则:000VB0VB;红牌为违例位,重新开始计位,1 0 0 0 0 0 0 0 0 0 0 0 1 0 0,振幅,时间,5.1.4 Example,Example 2:采用HDB3,对比特流1000 0000 0001 00进行编码。(假设第一个1的极性为正且到目前1比特的个数为奇数)。,振幅,时间,5.1.4 Example,Solution:,奇违例:变一位(最后一位),且该位变换后与前导位产生一个违例。,偶违例(经过前次变换后,1的个数已经为偶数):变两位(1,4位),且这两位变换后产生一

37、个违例。(第一位与前导位不违例),注意:第二组0000的前导位是第一组0000变换后的最后一位。,1 0 0 0 0 0 0 0 0 0 0 1 0 0,违例,违例,5.1.5 Digital-to-Digital Encoding Conclusion,5.1.6 Exercises,Draw the wave form for 1100 0101 in RZ、NRZ-L、NRZ-I、Manchester、Differential Manchester.What is the voltage pattern if the following bits are encoded using B8

38、ZS and HD3B。(Assume that the number of 1s so far is odd and the first 1 is positive.) 1000 0000 0000 1000 0110,5.2 Analog-to-digital encoding,Analog/digitalencoding,Analog-to-digital encoding is the representation of analog information by a digital signal.In analog-to-digital encoding, we are repres

39、enting the information contained in a continuous wave from as series of digital pulses.,5.2 Analog-to-digital encoding,The most important problem is how to translate information from an infinite number of values to discrete number of value without sacrificing sense or quality.,5.2.1 Pulse Amplitude

40、Modulation (PAM),PAM(脉冲振幅调制)PAM takes analog information, samples it, and generates a series of pluses based on the results of the sampling.Sampling means measuring the amplitude of the signal at equal intervals.PAM is the foundation of pulse code modulation (PCM,脉码调制).,脉冲振幅调制(PAM),5.2.1 Pulse Ampli

41、tude Modulation,The limitation of PAM:Although PAM translates the original wave form to a series of pulse, these pulses are still of any amplitude (still analog signal).Note: PAM has some applications, but it is notused by itself in data communication.However, it is the first step in PCM.,5.2.1 Puls

42、e Amplitude Modulation,5.2.2 Pulse Code Modulation (PCM, 脉码调制),The most common technique to change an analog signal to digital data (digitization) is called pulse code modulation (PCM).PCM modifies the pulses created by PAM to create a completely digital signal.PCM is made up of four separate proces

43、ses: PAM; quantization; binary encoding; digital-to-digital encoding.,振幅,振幅,时间,5.2.2.1 Step1: Pulse Amplitude Modulation,5.2.2.2 Step2: Quantized PAM signal,Quantization is a method of assigning integral values in a specific range to sampled instances.,5.2.2.3 Step3: Binary encoding,After each sampl

44、e is quantized and the number of bits per sample is decided, each sample can be changed to an nb-bit code word.,5.2.2.3 Step3: Binary encoding,Note that the number of bits for each sample is determined from the number of quantization levels (量化等级). If the number of quantization levels is L, the numb

45、er of bits is: nb =log2LBit Rate: Bit rate = sampling rate x number of bits per sample,5.2.2.4 Step4: digital-to-digital encoding,在第三步中我们已经得到了数字数据(digital data), 因此可以利用本章第一节所介绍的digital-to-digital技术将其转换为数字信号(digital signals).,Process of from analog signal to PCM digital code,5.2.2.5 The entire proces

46、s of PCM,5.2.3 Sampling Rate(采样速率),As you can see, the accuracy of any digital reproduction of an analog signal depends on the number of samples taken.The most important is How many samples are sufficient?According to the Nyquist theorem(奈奎斯特定理), to ensure the accurate reproduction of an original an

47、alog signal using PAM, the sampling rate must be at least twice the highest frequency of the original signal.,5.2.3 Sampling Rate,According to the Nyquist theorem, a sampling rate of twice a frequency of xHZ means that the signal must be sampled every 1/2x seconds.,5.2.4 More about Nyquist theorem,F

48、irst, we can sample a signal only if the signal is band-limited. In other words, a signal with an infinite bandwidth cannot be sampled. Second, the sampling rate must be at least 2 times the highest frequency, not the bandwidth.,If the analog signal is low-pass, the bandwidth and the highest frequen

49、cy are the same value. If the analog signal is band-pass, the bandwidth value is lower than the value of the maximum frequency.,5.2.4 More about Nyquist theorem,the value of the sampling rate for two types of signals.,5.2.5 每个样本多少位,规定了采样频率后,另一个重要的问题是确定每一样本要发送的比特数。这取决于所要求的精度,即选择的比特数要使重新复制的原始信号能在振幅上满足

50、预期的精度。,5.2.6 比特率,根据采样频率和样本位数可以得到比特率:比特率=采样频率每个样本的位数,5.3 Digital-to-Analog Encoding,Digital-to-analog conversion is the process of changing one of the characteristics of an analog signal based on the information in digital data.,理论基础一个简单模拟信号(正弦波)可以通过三个特征来表述:振幅、频率、相位。当改变其中任意一个或几个时,就产生了波的另外一种形式。因此,通过改变

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 生活休闲 > 在线阅读


备案号:宁ICP备20000045号-2

经营许可证:宁B2-20210002

宁公网安备 64010402000987号