1.06k likes | 1.49k Views
Data communication . Signal Encoding Techniques By: Hossein Pour Taheri. Topics. How we represent signals (analog/digital) Encoding methods (there are many) Modem encoding Encoding by modulation. Various Encoding Techniques.
E N D
Data communication Signal Encoding Techniques By: Hossein Pour Taheri
Topics • How we represent signals (analog/digital) • Encoding methods (there are many) • Modem encoding • Encoding by modulation
Various Encoding Techniques • Encoding is the conversion of streams of bits into a signal (digital or analog). • Categories of Encoding techniques: • Digital data, digital signal • Analogue data, digital signal • Digital data, analog signal • Analogue data, analog signal Digital transmission Analog transmission
Encoding and Transmission Choices Analog data, Digital signal Analog data, Analog signal digital analog analog voice CODEC Telephone Digital data, Digital signal Digital data, Analog signal analog digital digital digital Digital transmitter Modem Data source can be analog or digital Transmission can be analog or digital
Encoding How do we encode the data for transmission so that it can be recognized by the receiver? Data: 1 0 0 0 0 0 0 0 0 0 1 0 1 0 Sender: Transmission media Receiver: 1 where’s the clock? 0 0 1 0 1 0 how many 0 bits here?
Reception Problems • Receiver must determine the start of each bit period (clock synchronization). • Receiver must detect where each frame starts and ends. • Signal contains noise • thermal noise, impulse noise, delay distortion, ... • in general, higher transmission rate means more noise
Desirable Features of Encoding • Efficient use of bandwidth • Clock recovery (synchronization) • sender can recover timing of original signal • Error detection • some codes enable decoder to detect bit errors (higher layers contain additional error detection) • Error recovery • after an error, can receiver find the start of next frame?
Encoding Techniques • Digital data, digital signal (computer, Ethernet) • Analog data, digital signal (music, CD-ROM) • Digital data, analog signal (computer, modem) • Analog data, analog signal (voice, telephone)
Advantages of Digital Transmission • The signal is exact • Signals can be checked for errors • Noise/interference are easily filtered out • A variety of services can be offered over one line • Higher bandwidth is possible with data compression
Advantages of Analog Transmission • Most mediums support analog transmission - used for wireless communication • The telephone infrastructure provides a relatively cheap “individual point-to-point” transmission
Digital Data, Digital Signal • Digital signal • Discrete, discontinuous voltage pulses • Each pulse is a signal element • Binary data encoded into signal elements 1001101 =
Terms (1) • Unipolar (0, +) • All signal elements have same sign • Polar (-, +) • One logic state represented by positive voltage the other by negative voltage • Data rate • Rate of data transmission in bits per second • Duration or length of a bit • Time taken for transmitter to emit the bit
Terms (2) • Modulation rate • Rate at which the signal level changes • Measured in baud = signal elements per second • Mark and Space (old telephone term) • Binary 1 and Binary 0 respectively
Interpreting Signals • What we need to know (be able to detect) • Timing of bits - when they start and end • Signal levels • Factors affecting successful interpreting of signals • Signal to noise ratio • Data rate • Bandwidth
Comparison of Encoding Schemes (1) • Clocking • Independently synchronize transmitter and receiver • Sent External clock with the data (takes bandwidth) • Synchronizing signal extracted from the data stream
Comparison of Encoding Schemes (2) • Error detection • Can be built in to signal encoding • Signal interference and noise immunity • Some codes are better than others • Cost and complexity • Higher signal rate (& thus data rate) lead to higher costs • Some codes require signal rate greater than data rate
Digital-to-Digital Encoding Schemes • 3 Broad Categories: Unipolar, Polar, and Bipolar -Nonreturn to Zero-Level (NRZ-L) -Nonreturn to Zero Inverted (NRZI) -Manchester -Differential Manchester -Bipolar -AMI -B8ZS -HDB3 Magnetic Recording LAN WAN
Digital Encoding Formats 0 1 0 0 1 1 0 0 0 1 1 NRZ NRZI Bipolar -AMI Pseudoternary Manchester Differential Manchester
Unipolar Encoding • Unipolar encoding uses only one voltage level.
Unipolar Encoding • Problems • DC components(When the voltage level in a digital signal is constant for a while, the spectrum creates very low frequencies, called DC components, that present problems for a system that cannot pass low frequencies) - Cannot pass through some media (is not supported by some transmission media) • Synchronization problems can occur when the data contains long string of 1’s or 0’s - Beginning/ending problem (1111111111) - Distortion (four 1111 " five 11111) - Solved by separate line
0 1 0 0 1 1 0 0 0 1 1 Nonreturn to Zero(NRZ) 1 = power on (signal)0 = power off (no signal) • used on low speed links, e.g. serial ports • Problems: • lack of clock recovery during long string of 0 or 1 bits • has d.c. component • “baseline wander” during long string of 0 or 1 bits
0 1 0 0 1 1 0 0 0 1 1 Nonreturn to Zero Inverted (NRZI) 1 = change of signal level (on-off or off-on)0 = no change of signal level • NRZI is an example of differential encoding • used with with 4B/5B on fast ethernet • fixes clocking problem for long string of 1 bits • Problems: • lack of clock recovery during long string of 0 bits • has d.c. component
NRZ Measure at these points
NRZ pros and cons • Pros • Easy to engineer • Make good use of bandwidth • Cons • dc component • Lack of synchronization capability • Used for magnetic recording • Not often used for signal transmission
Problems With NRZ • Difficult to determine where one bit ends and the next begins • In NRZ-L, long strings of ones and zeroes would appear as constant voltage pulses • Timing is critical, because any drift results in lack of synchronization and incorrect bit values being transmitted
Polar Encoding • RZ (Return to Zero) - Three levels (+ - 0) - 2 signal changes per bit " more BW + Synchronization
Differential Encoding • Polar • Better encoding technique • Data represented by changes rather than levels • More reliable detection of bit in noisy channels rather than level
Biphase Encoding • Manchester • Transition in middle of each bit period • Transition serves as clock and data • Low to high represents one • High to low represents zero • Used by IEEE 802.3 (Ethernet Bus) • Differential Manchester • Midbit transition is clocking only • Transition at start of a bit period represents zero • No transition at start of a bit period represents one • Note: this is a differential encoding scheme • Used by IEEE 802.5 (Ethernet Token Ring)
Manchester Encoding Self-clocking – transition every interval = clock Low-to-Hi = 1 Hi-to-Low = 0
Differential Manchester Encoding Self-clocking – at least one transition every interval But may be 2 every interval – clock = 2x data rate No transition at start of interval = 1 Transition at start of an interval = 0
Polar Encoding - Biphase • Transition → bit represent and synchronization
Biphase Pros and Cons • Con • At least one transition per bit time and possibly two • Maximum modulation rate is twice NRZ • Requires more bandwidth • Pros • Synchronization on mid bit transition (self clocking) • No dc component • Error detection • Absence of expected transition
Modulation Rate Chapter 5: Signal Encoding
Multilevel Binary (Bipolar) • Use more than two voltage levels • Bipolar-AMI (Alternate Mark Inversion) • zero represented by no line signal • one represented by positive or negative pulse • ‘one’ pulses alternate in polarity • No loss of sync if a long string of ones (zeros still a problem) • Lower bandwidth • Easy error detection
0 1 0 0 1 1 0 0 0 1 1 Bipolar -AMI Pseudoternary Pseudoternary Same as Bipolar-AMI except reverses signaling: 1 = no signal (0 voltage)0 = alternating +V and -V
Scrambling Technique • Used to replace sequences that would produce constant voltage • Produce “filling” sequence that: • Must produce enough transitions to sync • Must be recognized by receiver and replace with original • Same length as original • Avoid long sequences of zero level line signal • No reduction in data rate • Error detection capability • Two commonly used techniques are: B8ZS, and HDB3 • Used for long distance transmission (WAN)
Bipolar With 8 Zeros Substitution (B8ZS) • Based on bipolar-AMI • If octet of all zeros and last voltage pulse preceding was positive, encode as 000+-0-+ • If octet of all zeros and last voltage pulse preceding was negative, encode as 000-+0+- • Causes two violations of AMI code - intentional • Unlikely to occur as a result of noise • Receiver detects and interprets as octet of all zeros • most of the transmitted energy is in middle of the spectrum; no d.c. component • B8ZS is used with pulse code modulation (PCM) on T1 lines (1.544 Mbps); B3ZS and PCM are used on T3 lines.
HDB3 • High Density Bipolar 3 Zeros • Based on bipolar-AMI • String of four zeros replaced with one or two pulses • good clock recovery; most of energy is in middle of the spectrum; no d.c. component; not as robust as B8ZS • HDB3 is used on E-series public carrier lines (E1 is 2.048Mbps).
Bipolar • (solved long stream of “0” → using violation)
B8ZS and HDB3 Change of polarity
4B/5B Use 5 bit signals for each 4 data bits. The 5 bit sequences are chosen so that there are never more than 3 consecutive zeros in the output stream. When used with NRZI, will have at least 2 signal transitions in every 5 bits. Input Output Input Output Other Output 0000 11110 1000 10010 Line idle 11111 0001 01001 1001 10011 STX 11000 10001 0010 10100 1010 10110 ETX 01101 00111 0011 10101 1011 10111 0100 01010 1100 11010 0101 01011 1101 11011 0110 01110 1110 11100 0111 01111 1111 11101
binary 4B/5B (ushort) 260 0000 0001 0000 0100 11110 01001 11110 01010 NRZI 4B/5B with NRZI 4B/5B with NRZI is used for • fast ethernet over fiber (100baseFX) • FDDI • 100Mbps Token Ring over fiber • bandwidth is 125MHz for 100Mbps data rate • not used with twisted pair due to high radiated EMF
MLT-3 MLT-3 uses 4B/5B followed by a 3 level signaling:0 = no change in output level1 = transition from 0 to -V; next “1” returns to 0; next “1” transition to +V; next “1” return to 0 • used for 100baseTX, CDDI (100Mbps FDDI over copper), and 100Mbps Token Ring on twisted pair • most of the transmitted signal energy is below 30MHz • no dc component; can detect some bit errors
8B/10B Encodes 8 data bits using 10 signal bits, similar to 4B/5B, but with these advantages: • minimum deviation in number of transmitted 1 and 0 bits in any data sequence, using disperity control • better error detection capability than 4B/5B • used for Gigabit ethernet on fiber optic cable and Fibre Channel • balance of transmitted 1 and 0 bits is important to avoid data dependent heating of the laser, which would increase the error rate
Bandwidth Comparison To send data at a rate D (bps) how much bandwidth do the encoding methods use? Encoding Used for Bandwidth Manchester 10Mbps Ethernet, Token Ring 2D B8ZS, HDB3 T1, E1 lines D log23 = 1.58D 4B/5B+NRZI Fast Ethernet over fiber, FDDI 1.25D