NRZ Coding RZ Coding
Total Page:16
File Type:pdf, Size:1020Kb
Analog and Digital Transmission • Data transmission through a LAN can be either Chapter 3 digital or analog. • Digital transmission includes the processes of line coding (converting binary data to digital Data signals) and sampling (converting analog data to digital signals). Transmission • AlAnalog transmiiission ildincludes modldulat ion of digital and analog signals. 1 2 Digital Signals Digital Signals • A digital signal can only have a limited number • The bit interval is the time required to send of values; it is discrete. The transition from one single bit. one value to another is instantaneous. • The bit rate is the number of bits sent in one second, usually expressed in bps. Figure 3.1 A Digital Signal • They are reciliprocal of each other BitRate = 1 / (BitInterval) BitInterval = 1 / (BitRate) 3 4 Figure 3-2 Bit Rate and Bit Interval Analog Signals • An analog signal can have an infinite number of values; it is continuous. The transition from one value to another is smooth. Figure 3 .3 An Analog Signal 5 6 Analog Signals Analog Signals • A periodic signal has a repeated pattern. • Sine waves can be described by 3 parameters: – e.g. the sine wave – Amplitude: vertical distance between a point on • An aperiodic signal has no repeating pattern. the wave and the horizontal axis – Period or frequency: time needed to complete a Figure 3 .4 A Sine Wave cycle or the number of periods in one second; they are inverse of each other – Phase: the position of the waveform relative to the time zero 7 8 Figure 3-5 Figure 3-6 Amplitude Period and Frequency 9 10 Figure 3-7 Relationship between Different Phases Time and Frequency Domains • In real applications, the signals are usually composite signals made of many sine waves with different ampp,litudes, freqq,uencies, and phases. • The time‐domain plot shows changes in signal amplitude with respect to time. • The frequency‐domain plot shows the relationship between amplitude and frequency. It is specially used to show the components of a composite signal. 11 12 Figure 3-8 Figure 3-9 A Signal with a DC Component Time and Frequency Domains 13 14 Figure 3-10 Frequency Spectrum and Bandwidth Bandwidth • The frequency spectrum of a signal is a collection of all the component frequencies it contains and is shown using frequency‐ domain graph. • The bandwidth of the signal is the width of the frequency spectrum, calculated by subtracting the lowest frequency from the highest frequency of the range. 15 16 Digital Transmission Line Coding • Digital transmission is sometimes called • Line coding is a process of converting a sequence of baseband transmission because it uses the bits into a digital signal –used for data coming from whole capacity of the transmission media. a device and passing through a digital communication system. • Binary bits are encoded into a digital signal • Signal levels –# of levels allowed in a signal using certain line coding scheme. • Data levels –# of levels used to represent the data • Analog signals are first sampled into a • Bit rate –# of bits transferred per second sequence of bits and then encoddded into a • Pulse rate –# of pulses per second digital signal using line coding. BitRate = PulseRate × log2L (L: # of data levels) 17 18 Figure 3-11 Figure 3-12 Line Coding Signal Levels versus Data Levels 19 20 Figure 3-13 DC Components and DC Components Self‐synchronization • Some systems do not allow passage of the DC component, in that case the average voltage of the signal should be reduced to zero. • A self‐synchronizing digital signal includes tim ing ifinforma tion in the dtdata tittdtransmitted, usually achieved with signal level transitions, to altlert the receiver to the biibeginning, middle, or end of the bit interval. 21 22 Figure 3-14 Lack of Synchronization Lack of Synchronization • Question: In a digital transmission, if the receiver’s clock is 01%0.1% faster than the sender’s clock, how many extra bits does the receiver receive each second if the data rate is 10Mbps ? • Answer: 10Mbps × 0.1% = 10,000 extra bits / sec. Long streams of 0s or 1s may cause loss of synchronization. 23 24 Figure 3-15 Three Broad Categories of Unipolar Line Coding Schemes • The 1s are encoded as positive voltage and 0s are encoded as the zero voltage. • It lacks the characteristics of a good coding scheme. – It has a DC component – No means of self‐synchronization 25 26 Figure 3-16 Unipolar Encoding Polar • It uses two nonzero signal levels: one positive and one negative. • DC component problem of unipolar encoding is alleviated. • Some polar coding schemes are self‐ synchronized. • Three types of polar encoding: nonreturn to zero (NRZ), return to zero (RZ), and biphase. 27 28 Figure 3-17 Nonreturn to Zero (NRZ) Types of Polar Encoding Return to Zero (RZ) • NRZ: signal level is either positive or negative. • NRZ‐L: 1 (negative); 0 (positive); not self‐synchronized • NRZ‐I: 1 (inversion of level); 0 (no change); some self‐ synchronization (signal of 1s contain transitions) • RZ: 1 (positive to zero); 0 ((gnegative to zero); perfect self‐synchronization; slower (too many transitions) 29 30 Figure 3-18 Figure 3-19 NRZ Coding RZ Coding 31 32 Figure 3-20 Manchester and Diff. Manchester Encoding Biphase • Best existing solution to the synchronization problem (less transitions than RZ) • The signal changes at the middle of the bit interval and, instead of returning to zero, it continues to the opposite pole. – Manchester: 1 (negative‐to‐positive) 0 (positive‐to‐negg)ative) – Differential Manchester: the inversion at the middle is used for synchronization; 1 (no transition in the beginning); 0 (transition in the beginning) 33 34 Bipolar An example of Bipolar encoding • Uses three signal levels: positive, negative and zero – 0s (zero level) – 1s (alternating positive and negative levels) • Advan tage: – No DC component buildup – Sequence of 1s provide self‐synchronization • Not used in LANs –no further discussion 35 36 Figure 3-21 Block Coding Block Coding • Redundant bits are added to ensure synchronization and error detection. • Steps in Block Coding: – The sequence of bits are divided into m‐bit blocks. – Each m‐bit block is substituted by an n‐bit block where n is greater that m. – Each n‐bit block is line coded without worryyging about synchronization. • Block coding is sometimes called mBnB encoding, e.g. 4B5B encoding. 37 38 Figure 3-22 4B5B Encoding Substitution in Block Coding Hex 4B 5B • There are 16 different 4‐bit blocks. There are 32 0 0000 11110 1 0001 01001 different 5‐bit blocks. 2 0010 10100 • After mapping all 4‐bit blocks to 5‐bit blocks, some 5‐ 3 0011 10101 4 0100 01010 bit blocks are still not used. 5 0101 01011 • We only choose those 5‐bit blocks that help us in 6 0110 01110 7 0111 01111 achiev ing synchiihronization and error didetection. 8 1000 10010 • Synchronization – choose only those 5‐bit blocks that 9 1001 10011 A 1010 10110 do no use more than three consecutive 0s (use NRZI). B 1011 10111 • Error Detection –if one or more bits are changed in C 1100 11010 D 1101 11011 such a way that one of the unused blocks is received, E 1110 11100 the receiver can easily detect the error. F 1111 11101 39 40 Figure 3-23 Sampling Sampling and Quantization: PCM • Pulse code modulation (PCM) method can be use to send analog data digitally. • Steps in a PCM process: 1) Sampling –measure the value of continuous data at equal intervals 2) Quantization –each resulting pulse is assigned a value 3) Assigning Binary Values –each value is then transformed to a signed binary number 41 42 Figure 3-24 Figure 3-25 Quantizing Converting to Binary Numbers 43 44 Figure 3-26 Nyquist Theorem Sampling Rate • Nyquist Theorem – to ensure the accurate reproduction of the original analog data, the sampling rate must be at least twice the highest frequency component in the signal. – EgE.g. to sample telephone voice with a maximum frequency of 4000Hz, a sampling rate of 8000 samples / sec. is needed. 45 46 How Many Bits Per Second Analog Transmission • The number of bits are chosen such that the • In analog transmission, a digital or an analog signal modulates a high‐frequency analog signal, called the original signal can be reproduced with the carrier. desired precision. • Modulation of the carrier by a digital signal is the – E.g. to represent the values ‐127 to +127, 8 bits process of changing one or more characteristics are required (see Figs. 3‐24 & 3‐25) (amplitude, frequency or phase) of the carrier. • Bit Rate • The baud rate defines the number of signal elements Bit rate = Sampling rate × # of bits per sample per second. BitRate = BaudRate × # of bits defined by each baud = BaudRate × log2N (N: # of different signal element patterns) 47 48 Figure 3-27 Four Common Digital Modulation Categgyggories of Modulation by a Digital Signal Schemes • Amplitude Shift Keying (ASK) – the amplitude of the carrier is varied to represent 1 or 0 (Fig. 3‐28); highly susceptible to noise (e.g. voltage spikes) interference • Frequency Shift Keying (FSK) –the frequency of the carrier is varied to represent 1 or 0 (Fig. 3‐29); avoids most of the noise problems of ASK • Phase Shift Keying (PSK) –the phase of the carrier is varied (Fig. 3‐30); it is common to use more than two phase changes to send more than one bit in each baud; the bit rate is usually greater than the baud rate 49 50 Figure 3-28 Figure 3-29 ASK FSK 51 52 Figure 3-30 PSK Four Common Modulation Schemes • Quadrature Amplitude Modulation (QAM) – a combination of ASK and PSK; combines both amplitude and phase changes to represent bit patterns (Fig.