Download Presentation
## Signal Encoding

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -

**Signal Encoding**Lesson 05 NETS2150/2850 http://www.ug.cs.usyd.edu.au/~nets2150/ School of IT, The University of Sydney**Lecture Outline**• Encoding schemes for digital data to transmit in digital transmission systems • NRZ schemes • Manchester schemes in LANs • AMI schemes • With scrambling for WANs use • Encoding schemes for digital data to transmit in analog transmission systems • ASK Scheme • FSK Scheme • PSK Scheme**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**Digital Data, Digital Signal(Digital to Digital)**• Digital signal • Discrete, discontinuous voltage pulses • Each pulse is a signal element • Binary data encoded into signal elements**Interpreting Signals**• Need to know • Timing of bits - when they start and end • Signal levels • Factors affecting interpretation of signals • SNR • Data rate • Bandwidth**Comparison of Encoding Schemes**• Error detection • Can be built into signal encoding • Cost and complexity • Higher signal rate (& thus data rate) lead to higher costs • Clocking • Synchronizing transmitter and receiver • Signal spectrum • Bandwidth requirement • Presence of dc component**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**Nonreturn to Zero-Level (NRZ-L)**• Polar Encoding • Two different voltages for 0 and 1 bits • Voltage constant during bit interval • no transition i.e. no return to zero voltage • Negative voltage for one value and positive for the other**Nonreturn to Zero Inverted (NRZI)**• Polar • Transition (low to high or high to low) denotes a binary 1 • No transition denotes binary 0 • This is an example of differential encoding**Differential Encoding**• Polar • Better encoding technique • Data represented by changes rather than levels • More reliable detection of bit in noisy channels rather than level**NRZ pros and cons**• Pros • Easy to engineer • Make good use of bandwidth • Cons • Lack of synchronisation capability • Presence of a dc component • Used for digital magnetic recording • Not often used for signal transmission**Biphase Schemes**• Polar- signal elements have opposite voltage level (-ve and +ve) • Overcomes the limitations on NRZ codes • Two biphase techniques are commonly used: • Manchester • Differential Manchester • Heavily used in LAN applications**Biphase Scheme1: Manchester**• Transition in middle of each bit interval • Low to high represents one • High to low represents zero • Used by IEEE 802.3 (Ethernet LAN)**Biphase Scheme 2: Differential Manchester**• Midbit transition is clocking only • Transition at start of a bit interval represents zero • No transition at start of a bit interval represents one • Note: this is a differential encoding scheme • Used by IEEE 802.5 (Token Ring LAN)**Biphase Pros and Cons**• Cons • At least one transition per bit time and possibly two • Maximum baud rate is twice NRZ • Requires more bandwidth • Pros • Synchronization on mid bit transition (self clocking) • Error detection • Absence of expected transition • No dc component**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**Trade Off for Multilevel Binary**• Not as efficient as NRZ • Receiver must distinguish between three levels (+A, -A, 0)**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 • HDB3 – similar but based on 4 zeros**HDB3**• High Density Bipolar 3 Zeros • Based on bipolar-AMI • String of four zeros replaced with one or two pulses**B8ZS and HDB3**Change of polarity**Digital Data, Analog Signal**• Some transmission media only transmit analog signals. • Public telephone system • 300Hz to 3400Hz (voice frequency range) • Use modem (modulator-demodulator)**Digital to Analog modulation techniques:**Modulation involves operation on signal characteristics: frequency, phase, amplitude. • Amplitude shift keying (ASK) • Frequency shift keying (FSK) • Phase shift keying (PSK)**Amplitude Shift Keying**• Values represented by different amplitudes of carrier • Usually, one amplitude is zero • i.e. presence and absence of carrier is used • Susceptible to sudden gain changes • Inefficient • Up to 1200bps on voice grade lines • Used over optical fiber**Example 1**Find the minimum bandwidth for an ASK signal transmitting at 2000 bps. The transmission mode is half-duplex. In ASK, baud rate and bit rate are the same. The baud rate is therefore 2000. An ASK signal requires a minimum bandwidth equal to its baud rate. Therefore, the minimum bandwidth is 2000 Hz. Solution**Example 2**Given a bandwidth of 5000 Hz for an ASK signal, what are the baud rate and bit rate? Solution In ASK the baud rate is the same as the bandwidth, which means the baud rate is 5000. But because the baud rate and the bit rate are also the same for ASK, the bit rate is 5000 bps.**Example 3**Given a bandwidth of 10,000 Hz (1000 to 11,000 Hz), draw the full-duplex ASK diagram of the system. Find the carriers and the bandwidths in each direction. Assume there is no gap between the bands in the two directions. Solution For full-duplex ASK, the bandwidth for each direction is BW = 10000 / 2 = 5000 Hz The carrier frequencies can be chosen at the middle of each band (see Fig. 5.5). fc (forward) = 1000 + 5000/2 = 3500 Hz fc (backward) = 11000 – 5000/2 = 8500 Hz**Binary Frequency Shift Keying**• Most common form is binary FSK (BFSK) • Two binary values represented by two different frequencies (near carrier) • Less susceptible to error than ASK • Up to 1200bps on voice grade lines • High frequency radio • Even higher frequency on LANs using co-ax**Multiple FSK**• More than two frequencies used • More bandwidth efficient • More prone to error • Each signalling element represents more than one bit**Phase Shift Keying**• Phase of carrier signal is shifted to represent data • Binary PSK • Two phases represent two binary digits • Differential PSK • Phase shifted relative to previous transmission rather than some reference signal**Performance of Digital to Analog Modulation Schemes**• Bandwidth • ASK and PSK bandwidth directly related to bit rate • FSK bandwidth related to data rate for lower frequencies, but to offset of modulated frequency from carrier at high frequencies • (See Stallings for math) • In the presence of noise, bit error rate of PSK and QPSK are about 3dB superior to ASK and FSK**Summary**• Various encoding schemes • Some used in LANs • Others more suitable in WAN with scrambling • Read Stallings Section 5.1 • Next: Data link layer functions.