DATA COMMUNICATION (ELA…) 1 SIGNAL ENCODING TECHNIQUES ENCODING TECHNIQUES Digital data Analog data • Digital Signal • Analog Signal • Digital Signal • Analog Signal 2 ENCODING ONTO A DIGITAL SIGNAL 3 MODULATION ONTO AN ANALOG SIGNAL 4 DATA ENCODING CRITERIA An increase in DR increases BER An increase in SNR decreases BER An increase in BW allows an increase in DR 5 DATA ENCODING CRITERIA (CONT.) The other factor that improves performance is the encoding scheme The encoding scheme is simply the mapping from data bits to signal elements 6 DIGITAL DATA DIGITAL SIGNAL DIGITAL DATA DIGITAL SIGNAL Receiver needs to know Timing of bits Signal levels Factors affecting successful interpretation of signals 8 ENCODING SCHEMES Non-return to Zero-Level (NRZ-L) Non-return to Zero Inverted (NRZI) Bipolar-Alternate Mark Inversion (AMI) Pseudoternary Manchester Differential Manchester Bipolar with 8-Zeros Substitution (B8ZS) High-Density Bipolar 3-zeros (HDB3) 9 COMPARING ENCODING SCHEMES Signal spectrum With lack of high-frequency components, less bandwidth required With no DC component, AC coupling via transformer possible Concentrate power in the middle of the bandwidth Clocking Ease of determining beginning and end of each bit position 10 COMPARING ENCODING SCHEMES Error detection Can be built into signal encoding Signal interference and noise immunity Performance in the presence of noise Cost and complexity The higher the signal rate to achieve a given data rate, the greater the cost Some codes require signal rate greater than data rate 11 NRZ-L Two different voltages for 0 and 1 bits Voltage constant during bit interval No transition (i.e., no return to zero voltage) Options: Absence of voltage for zero, constant positive voltage for one More often, negative voltage for one value and positive for the other 12 NRZI Inverted on ones Constant voltage pulse for duration of bit Data encoded as presence or absence of signal transition at beginning of bit time Transition (low-to-high or high-to-low) denotes a binary 1 No transition denotes binary 0 An example of differential encoding 13 DIFFERENTIAL ENCODING In complex transmission layouts, it is easy to lose sense of polarity Therefore Data represented by changes (i.e., transitions) rather than levels More reliable detection of transition rather than level 14 NONRETURN TO ZERO (NRZ) 0 1 0 0 1 1 0 0 0 1 1 NRZ-L NRZI 15 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 16 BIPOLAR-AMI Uses more than two levels “0” represented by no line signal “1” represented by positive or negative pulse, pulses alternate in polarity No loss of sync if a long string of 1s (0s still a problem) No net DC component Because the “1” signals alternate in voltage from + to Lower bandwidth Easy error detection 17 Because pulses alternate in polarity PSEUDOTERNARY Uses more than two levels “1” represented by absence of line signal “0” represented by alternating positive and negative levels No advantage or disadvantage over bipolar-AMI 18 TRADE OFF FOR MULTILEVEL BINARY Not Technically, a 3 signal level system as efficient as NRZ Log2 3 = 1.58 bits However, each signal element only represents one bit Receiver must distinguish between three levels (+A, -A, 0) Requires ≈ 3dB more signal power for same probability of bit error 19 BIPOLAR-AMI & PSEUDOTERNARY 0 1 0 0 1 1 0 0 0 1 1 B-AMI PT 20 MANCHESTER Transition in middle of each bit period Transition serves as clock AND data Low-to-high represents “1” High-to-low represents “0” Used in IEEE 802.3 (Ethernet LAN) 21 DIFFERENTIAL MANCHESTER Mid-bit transition is clocking only Transition at start of a bit period represents “0” No transition at start of a bit period represents “1” This is a differential encoding scheme Used in IEEE 802.5 (Token Ring LAN) 22 BIPHASE (MANCHESTER AND DMANCHESTER) 0 1 0 0 1 1 0 0 0 1 1 Man D-Man 23 BIPHASE – PROS AND CONS Pros Synchronization on mid bit transition (self clocking) No DC component Error detection Absence of expected transition Cons At least one transition per bit time and possibly two Maximum modulation rate is twice NRZ 24 Requires more bandwidth TRANSMISSION RATES 25 TRANSMISSION RATES 26 MODULATION RATE Tb 1 sec R 1 1 Mbps Tb Tb 1 sec R 1 1 Mbps Tb 27 SCRAMBLING Use scrambling to replace sequences that would produce constant voltage Filling sequence Must produce enough transitions to sync Must be recognized by receiver and replaced with original Same length as original Design Goals No DC component No long sequences of zero level line signal No reduction in data rate Error detection capability 28 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 Unlikely to occur as a result of noise Receiver all zeros detects and interprets as octet of 29 HIGH DENSITY BIPOLAR 3 ZEROS (HDB3) Based on bipolar-AMI String of four zeros replaced with one or two pulses 30 B8ZS AND HDB3 31 DIGITAL DATA ANALOG SIGNAL DIGITAL DATA ANALOG SIGNAL Public 300Hz to 3400Hz Use modem (modulator-demodulator) Basic Amplitude difference of carrier frequency Frequency-shift keying (FSK) Encoding Techniques Amplitude-shift keying (ASK) telephone system Frequency difference near carrier frequency Phase-shift keying (PSK) Phase of carrier signal shifted 33 AMPLITUDE-SHIFT KEYING (ASK) One binary digit represented by presence of carrier, at constant amplitude Other binary digit represented by absence of carrier A cos2f ct s t 0 binary 1 binary 0 where the carrier signal is A cos(2πfct) 34 ASK CHARACTERISTICS Susceptible to sudden gain changes Inefficient modulation technique On voice-grade lines, used up to 1200 bps Used to transmit digital data over optical fiber 35 ASK – PRINCIPLE OF OPERATION 36 ASK – PRINCIPLE OF OPERATION 37 ASK BANDWIDTH REQUIREMENTS 38 ASK – EXAMPLE Assuming ASK modulation is to be used, estimate the BW required of a channel to transmit at the following bit rates: 300bps, 1200bps and 4800bps, assuming a) the fo of the sequence 101010… is to be received b) the fo and 3fo are to the received Comment on your results in relation to the PSTN 39 Source: Halsall, F., Data Communications, Computer Networks and Open Systems, (USA: Addison-Wiley, 1996), pg. 61 BINARY FREQUENCY-SHIFT KEYING (BFSK) Two binary digits represented by two different frequencies near the carrier frequency A cos2f1t s t A cos2f 2t binary 1 binary 0 where f1 and f2 are offset from carrier frequency fc by equal but opposite amounts 40 BFSK CHARACTERISTICS Less susceptible to error than ASK On voice-grade lines, used up to 1200bps Used for high-frequency (3 to 30 MHz) radio transmission Can be used at higher frequencies on LANs that use coaxial cable 41 BFSK – PRINCIPLE OF OPERATION 42 BFSK – PRINCIPLE OF OPERATION 43 BFSK BANDWIDTH REQUIREMENTS 44 BFSK – EXAMPLE 45 PHASE-SHIFT KEYING (PSK) Two-level PSK (BPSK) Uses two phases to represent binary digits A cos2f ct binary 1 A cos2f ct s t A cos2f ct A cos2f ct binary 0 Differential PSK 46 QUADRATURE PSK More efficient use by each signal element representing more than one bit Uses shifts separated by multiples of /2 (90o) Each element represents two bits Can use 8 phase angles and have more than one amplitude 9600bps modems use 12 angles , four of which have two amplitudes 47 QUADRATURE PSK Quadrature PSK (QPSK) Each element represents more than one bit A cos 2 f ct 4 3 A cos 2 f ct 4 3 A cos 2 f c t 4 A cos 2 f ct 4 st 11 01 00 10 48 PHASE-SHIFT KEYING (PSK) Multilevel PSK Using multiple phase angles with each angle having more than one amplitude, multiple signals elements can be achieved R R D L log 2 M D = modulation rate, baud R = data rate, bps M = number of different signal elements = 2L L = number of bits per signal element 49 PSK BANDWIDTH REQUIREMENTS 50 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, the bit error rates of PSK and QPSK are about 3dB superior to ASK and FSK 51 ANALOG DATA DIGITAL SIGNAL ANALOG DATA DIGITAL SIGNAL Conversion of analog data into digital data Digitization Analog to digital conversion done using a CODEC Basic encoding techniques Pulse code modulation (PCM) Delta modulation (DM) 53 ANALOG DATA DIGITAL SIGNAL Once analog data have been converted to digital data, the digital data: can be transmitted using NRZ-L can be encoded as a digital signal using a code other than NRZ-L can be converted to an analog signal, using previously discussed techniques 54 PULSE CODE MODULATION Based on the sampling theorem If a signal is sampled at regular intervals at a rate higher than twice the highest signal frequency, the samples contain all the information of the original signal Each analog sample is assigned a binary code Analog samples are referred to as pulse amplitude modulation (PAM) samples The digital signal consists of blocks of n bits, where each n-bit number is the amplitude of a PCM pulse Voice data limited to below 4000Hz Requires 8000 samples per second 55 PULSE CODE MODULATION 4 bit system gives 16 levels Quantized Quantizing error or noise Approximations mean it is impossible to recover original signal exactly 8 bit sample gives 256 levels Quality comparable with analog transmission 8000 samples per second of 8 bits each gives 64kbps 56 VOICE DIGITIZATION PROCESS Sampling Clock Analog Voice Signal Sampling Circuit PAM Signal PCM Signal Quantizer and Compander PAM Pulse Analog Modulation PCM Pulse Code Modulation Digital Voice Signal 57 PULSE CODE MODULATION 58 EXAMPLES OF DIGITIZED SIGNALS Digital PCM 128 to 256 quantization levels (64 kbps) Adaptive Differential PCM (ADPCM) 32 kbps Digital TV (5.5 MHz signal) 11 x 106 samples/sec 256 to 1024 quantization levels Data rates ≈ 100 Mbps HDTV Voice (35 MHz signal) 70 x 106 samples/sec Data rates of up to hundreds of Mbps 59 BASIC ENCODING TECHNIQUES Analog data to analog signal Amplitude modulation (AM) Angle modulation Frequency modulation (FM) Phase modulation (PM) Spread Spectrum Frequency Hopping Direct Sequence 60