COE 341 Data Computer Communications T 081 Dr

  • Slides: 96
Download presentation
COE 341: Data & Computer Communications (T 081) Dr. Marwan Abu-Amara Chapter 5: Data

COE 341: Data & Computer Communications (T 081) Dr. Marwan Abu-Amara Chapter 5: Data Encoding

Encoding and Modulation Techniques COE 341 – Dr. Marwan Abu-Amara 2

Encoding and Modulation Techniques COE 341 – Dr. Marwan Abu-Amara 2

Digital & Analog Signaling n Digital signaling q q q Data source g(t) encoded

Digital & Analog Signaling n Digital signaling q q q Data source g(t) encoded into digital signal x(t) g(t) may be analog (e. g. voice) or digital (e. g. file) x(t) dependent on coding technique, chosen to optimize use of transmission medium n n Conserve bandwidth or minimize errors Analog signaling q q q Based on continuous constant frequency signal, carrier signal (i. e. A cos(2 fct+ ) or A sin(2 fct+ )) Carrier signal frequency chosen to be compatible with transmission medium Data transmitted by carrier signal modulation by manipulating A, fc, and/or COE 341 – Dr. Marwan Abu-Amara 3

Analog Signaling n Modulation q q n Process of encoding source data onto a

Analog Signaling n Modulation q q n Process of encoding source data onto a carrier signal with frequency fc Operation on one or more of three fundamental frequencydomain parameters: amplitude, frequency, and phase Input signal m(t) q q Can be analog or digital Called modulating signal or baseband signal Modulated signal s(t) is result of modulating carrier signal; called bandlimited or bandpass signal Location of bandwidth on spectrum related to carrier frequency fc COE 341 – Dr. Marwan Abu-Amara 4

Baseband vs. Bandpass Signals n Baseband Signal: q q n Spectrum not centered around

Baseband vs. Bandpass Signals n Baseband Signal: q q n Spectrum not centered around non zero frequency May have a DC component Bandpass Signal: q q Does not have a DC component Finite bandwidth around or at fc COE 341 – Dr. Marwan Abu-Amara 5

Encoding and Modulation: Remarks n Encoding is simpler and less expensive than n modulation

Encoding and Modulation: Remarks n Encoding is simpler and less expensive than n modulation Encoding into digital signals allows use of modern digital transmission and switching equipment q n Modulation shifts baseband signals to a different region of the frequency spectrum q n Basis for Time Division Multiplexing (TDM) Basis for Frequency Division Multiplexing (FDM) Unguided media and optical fibers can carry only analog signals COE 341 – Dr. Marwan Abu-Amara 6

Encoding Techniques n Digital data, digital signal q n Analog data, digital signal q

Encoding Techniques n Digital data, digital signal q n Analog data, digital signal q n Data needs to be converted to digital form Digital data, analog signal q n Simple and inexpensive equipment Take advantage of existing analog transmission media Analog data, analog signal q Transmitted as baseband signal easily and cheaply COE 341 – Dr. Marwan Abu-Amara 7

Digital Data, Digital Signal n Digital signal q q q n Unipolar signal q

Digital Data, Digital Signal n Digital signal q q q n Unipolar signal q n Sequence of discrete, discontinuous voltage pulses Each pulse is a signal element Binary data encoded into signal elements All signal elements have same sign (e. g. 0: +5 V, 1: +10 V DC content) Polar signal q One logic state represented by positive voltage & the other by negative voltage (e. g. 0: +5 V, 1: -5 V ideally Zero DC content) COE 341 – Dr. Marwan Abu-Amara 8

Digital Data, Digital Signal … n Mark and Space q n Duration or length

Digital Data, Digital Signal … n Mark and Space q n Duration or length of a bit (Tb) q n Rate of data transmission in bits per second (bps) Duration of a Signal Element (Ts) q n Time taken for transmitter to emit the bit Data rate, R ( = 1/Tb) q n Binary 1 and Binary 0 respectively Minimum signal pulse duration Modulation (signaling) rate (1/Ts) q q Rate at which the signal level changes with time Measured in bauds = signal elements per second COE 341 – Dr. Marwan Abu-Amara 9

Digital Data, Digital Signal … Data rate = 1/1 ms = 1 M bps

Digital Data, Digital Signal … Data rate = 1/1 ms = 1 M bps Tb Signaling Rate for NRZI: = 1/1 ms = 1 M bauds Ts Ts Signaling Rate for Manchester: = 1/0. 5 ms = 2 M bauds COE 341 – Dr. Marwan Abu-Amara 10

Interpretation of the Received Signal COE 341 – Dr. Marwan Abu-Amara 11

Interpretation of the Received Signal COE 341 – Dr. Marwan Abu-Amara 11

Interpreting Digital Signal at Receiver needs to know q q q n Timing of

Interpreting Digital Signal at Receiver needs to know q q q n Timing of bits - when they start and end Signal level Sampling & comparison with a threshold value Factors affecting successful interpretation of signals: signal to noise ratio, data rate, bandwidth q q q Increase in data rate increases bit-error-rate (BER) Increase in SNR decreases BER Increase in bandwidth allows for increase in data rate COE 341 – Dr. Marwan Abu-Amara 12

Comparison of Encoding Schemes n Encoding scheme q n Signal Spectrum q q q

Comparison of Encoding Schemes n Encoding scheme q n Signal Spectrum q q q n Mapping from data bits to signal elements Lack of high frequencies reduces required bandwidth Lack of dc component allows ac coupling via transformer providing isolation & reducing interference Transfer function of a channel is worse near the band edges Concentrate power in the middle of the bandwidth Clocking q q Synchronizing transmitter and receiver Sync mechanism based on signal n can be built into signal encoding COE 341 – Dr. Marwan Abu-Amara 13

Comparison of Encoding Schemes n Error detection q n Signal interference and noise immunity

Comparison of Encoding Schemes n Error detection q n Signal interference and noise immunity q n Can be built into signal encoding Some codes are better than others Cost and complexity q q Higher signal rate (& thus data rate) lead to higher costs Some codes require signal rate greater than data rate COE 341 – Dr. Marwan Abu-Amara 14

Encoding Schemes n n n Nonreturn to Zero-Level (NRZ-L) Nonreturn to Zero Inverted (NRZI)

Encoding Schemes n n n Nonreturn to Zero-Level (NRZ-L) Nonreturn to Zero Inverted (NRZI) Bipolar –AMI (alternate mark inversion) Pseudoternary Manchester Differential Manchester COE 341 – Dr. Marwan Abu-Amara 15

Nonreturn to Zero-Level (NRZ-L) n n Two different voltages for 0 and 1 bits

Nonreturn to Zero-Level (NRZ-L) n n Two different voltages for 0 and 1 bits Voltage constant during bit interval q n n no transition, no return to zero voltage e. g. Absence of voltage for zero, constant positive voltage for one More often, negative voltage for one value (1) and positive for the other (0) Used to generate or interpret digital data by terminals An example of absolute encoding q Encoding data as a signal level COE 341 – Dr. Marwan Abu-Amara 16

Nonreturn to Zero Inverted (NRZI) n n n Nonreturn to zero inverted on ones

Nonreturn to Zero Inverted (NRZI) n n n Nonreturn to zero inverted on ones Constant voltage pulse for duration of bit Data encoded as presence or absence of signal transition at beginning of bit time q q n Transition (low to high or high to low) denotes a binary 1 No transition denotes binary 0 An example of differential encoding q Info to be transmitted represented as changes between successive signal elements COE 341 – Dr. Marwan Abu-Amara 17

NRZ (+)ve (–)ve Transition Denotes one COE 341 – Dr. Marwan Abu-Amara 18

NRZ (+)ve (–)ve Transition Denotes one COE 341 – Dr. Marwan Abu-Amara 18

NRZ pros and cons n Pros q q n Easy to engineer Make good

NRZ pros and cons n Pros q q n Easy to engineer Make good use of bandwidth Cons q q Large dc component Lack of synchronization capability n n n No signal transitions for long strings of 0’s or 1’s Used for magnetic recording Not often used for signal transmission COE 341 – Dr. Marwan Abu-Amara 19

Differential Encoding n n Data represented by signal transitions rather than signal levels Advantages;

Differential Encoding n n Data represented by signal transitions rather than signal levels Advantages; q q With noise, signal transitions are detected more easily than signal levels In complex transmission layouts, it is easy to accidentally lose sense of polarity Effect of swapping terminals on: - NRZ-L - NRZI COE 341 – Dr. Marwan Abu-Amara + _ RX 20

NRZ pros and cons COE 341 – Dr. Marwan Abu-Amara 21

NRZ pros and cons COE 341 – Dr. Marwan Abu-Amara 21

Multilevel Binary n n Use more than two signaling levels Bipolar-AMI (Alternate Mark Inversion)

Multilevel Binary n n Use more than two signaling levels Bipolar-AMI (Alternate Mark Inversion) q q q q 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) No net dc component Lower bandwidth Easy error detection COE 341 – Dr. Marwan Abu-Amara 22

Pseudoternary n n n One represented by absence of line signal Zero represented by

Pseudoternary n n n One represented by absence of line signal Zero represented by alternating positive and negative No advantage or disadvantage over bipolar. AMI COE 341 – Dr. Marwan Abu-Amara 23

Bipolar-AMI and Pseudoternary Double Pulse Error. Undetected All Single Pulse Errors. Detected Adding Canceling

Bipolar-AMI and Pseudoternary Double Pulse Error. Undetected All Single Pulse Errors. Detected Adding Canceling Double Pulse Error. Detected COE 341 – Dr. Marwan Abu-Amara 24

Trade Off for Multilevel Binary n Not as efficient as NRZ q Each signal

Trade Off for Multilevel Binary n Not as efficient as NRZ q Each signal element only represents one bit n q q q Date Rate=R=1/TB In a 3 level system could represent log 23 = 1. 58 bits Receiver must distinguish between three levels (+A, -A, 0) Requires approximately 3 d. B more signal power for same probability of bit error COE 341 – Dr. Marwan Abu-Amara 25

Theoretical Bit Error Rate for Various Encoding Schemes COE 341 – Dr. Marwan Abu-Amara

Theoretical Bit Error Rate for Various Encoding Schemes COE 341 – Dr. Marwan Abu-Amara 26

Biphase n Manchester q q q n Transition in middle of each bit period

Biphase n Manchester q q q n Transition in middle of each bit period Transition serves as clock and data High to low represents zero Low to high represents one Used by IEEE 802. 3 (Standard for baseband coaxial cable & twisted pair CSMA/CD bus LANs) Differential Manchester q q q Mid bit 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 (Token ring LAN) COE 341 – Dr. Marwan Abu-Amara 27

Manchester Encoding COE 341 – Dr. Marwan Abu-Amara 28

Manchester Encoding COE 341 – Dr. Marwan Abu-Amara 28

Differential Manchester Encoding COE 341 – Dr. Marwan Abu-Amara 29

Differential Manchester Encoding COE 341 – Dr. Marwan Abu-Amara 29

COE 341 – Dr. Marwan Abu-Amara 30

COE 341 – Dr. Marwan Abu-Amara 30

Biphase Pros and Cons n Pros q q q Synchronization on mid bit transition

Biphase Pros and Cons n Pros q q q Synchronization on mid bit transition (self clocking) No dc component Error detection n n Absence of expected transition Con q At least one transition per bit time and possibly two n n Maximum modulation rate is twice NRZ Requires more bandwidth COE 341 – Dr. Marwan Abu-Amara 31

Modulation (Signaling) Rate n Data rate (R) q q n Bits per second, or

Modulation (Signaling) Rate n Data rate (R) q q n Bits per second, or bit rate 1/Tb, where Tb is bit duration Modulation rate (D) q q q Rate at which signal elements generated Measured in Baud Modulation Rate D = R × k n n n q R = data rate in bps M = signaling levels used L = bits/signal element = log 2 M k = signal elements per bit = signal trans. /bit trans. = 1/L In General, Modulation Rate D = R × k = R/log 2 M COE 341 – Dr. Marwan Abu-Amara 32

Modulation (Signaling) Rate … Tb k=1 Ts Ts k=2 So, for Manchester D= k

Modulation (Signaling) Rate … Tb k=1 Ts Ts k=2 So, for Manchester D= k R = 2/Tb COE 341 – Dr. Marwan Abu-Amara 33

Scrambling n n Use scrambling to replace sequences that would produce constant voltage Filling

Scrambling n n Use scrambling to replace sequences that would produce constant voltage Filling sequence q q n n Must produce enough transitions to sync Must be recognized by receiver and replace with original Same length as original Not be likely to be generated by noise No dc component No long sequences of zero level line signal No reduction in data rate Error detection capability COE 341 – Dr. Marwan Abu-Amara 34

B 8 ZS n n n n Bipolar With 8 Zeros Substitution Based on

B 8 ZS n n n n Bipolar With 8 Zeros Substitution 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 detects and interprets as octet of all zeros COE 341 – Dr. Marwan Abu-Amara 35

HDB 3 n n n High Density Bipolar 3 Zeros Based on bipolar-AMI String

HDB 3 n n n High Density Bipolar 3 Zeros Based on bipolar-AMI String of four zeros replaced with one or two pulses COE 341 – Dr. Marwan Abu-Amara 36

B 8 ZS and HDB 3 1 s COE 341 – Dr. Marwan Abu-Amara

B 8 ZS and HDB 3 1 s COE 341 – Dr. Marwan Abu-Amara 37

Digital Data, Analog Signal n n Transmission of digital data through public telephone network

Digital Data, Analog Signal n n Transmission of digital data through public telephone network Public telephone system q q n Encoding techniques modify one of three characteristics of carrier signal q q q n 300 Hz to 3400 Hz Use modem (modulator-demodulator) Amplitude => Amplitude shift keying (ASK) Frequency => Frequency shift keying (FSK) Phase => Phase shift keying (PSK) Resulting signal has a bandwidth centered on carrier frequency COE 341 – Dr. Marwan Abu-Amara 38

Digital Data, Analog Signal COE 341 – Dr. Marwan Abu-Amara 39

Digital Data, Analog Signal COE 341 – Dr. Marwan Abu-Amara 39

Amplitude Shift Keying (ASK) n n Binary values represented by different amplitudes of carrier

Amplitude Shift Keying (ASK) n n Binary values represented by different amplitudes of carrier Usually, one amplitude is zero q n i. e. presence and absence of carrier is used For a carrier signal is COE 341 – Dr. Marwan Abu-Amara resulting 40

Amplitude Shift Keying (ASK) n n Inefficient: up to 1200 bps on voice grade

Amplitude Shift Keying (ASK) n n Inefficient: up to 1200 bps on voice grade lines Used to transmit digital data over optical fiber COE 341 – Dr. Marwan Abu-Amara 41

Frequency Shift Keying (FSK) n n Binary values represented by two different frequencies near

Frequency Shift Keying (FSK) n n Binary values represented by two different frequencies near carrier frequency Resulting signal is Dfc f 1 q fc f 2 f 1 and f 2 are offset from carrier frequency fc by equal but opposite amounts COE 341 – Dr. Marwan Abu-Amara 42

Frequency Shift Keying (FSK) n n Less susceptible to error than ASK Up to

Frequency Shift Keying (FSK) n n Less susceptible to error than ASK Up to 1200 bps on voice grade lines Used for high frequency (3 to 30 MHz) radio transmission Even higher frequencies on LANs using coaxial cables COE 341 – Dr. Marwan Abu-Amara 43

FSK Data sign al vd(t) Carrier 1 v 1(t), f 1 v 2(t), f

FSK Data sign al vd(t) Carrier 1 v 1(t), f 1 v 2(t), f 2 Carrier 2 v. FSK( t) Signal power frequency spectrum f 1 f Frequency fc f f 2 COE 341 – Dr. Marwan Abu-Amara 44

Frequency Shift Keying (FSK) n Full-duplex transmission over voice grade line q q In

Frequency Shift Keying (FSK) n Full-duplex transmission over voice grade line q q In one direction fc is 1170 Hz with f 1 and f 2 given by 1170+100=1270 Hz and 1170– 100=1070 Hz In other direction fc is 2125 Hz with f 1 and f 2 given by 2125+100=2225 Hz and 2125– 100=2025 Hz COE 341 – Dr. Marwan Abu-Amara 45

Phase Shift Keying (PSK) n Binary PSK: Phase of carrier signal is shifted to

Phase Shift Keying (PSK) n Binary PSK: Phase of carrier signal is shifted to represent different values q n Phase shift of 180 o Differential PSK: Two-phase system with differential PSK q q q Phase shift relative to previous bit transmitted rather than some constant reference signal Binary 0 represented by sending a signal burst of same phase as previous signal burst Binary 1 represented by sending a signal burst of opposite phase as previous signal burst COE 341 – Dr. Marwan Abu-Amara 46

BPSK COE 341 – Dr. Marwan Abu-Amara 47

BPSK COE 341 – Dr. Marwan Abu-Amara 47

Differential PSK (DPSK) Phase shifted relative to previous signal element rather than some reference

Differential PSK (DPSK) Phase shifted relative to previous signal element rather than some reference signal: q q 1: Reverse phase 0: Do not reverse phase (A form of differential encoding) Advantage: - No need for a reference oscillator at RX to determine absolute phase COE 341 – Dr. Marwan Abu-Amara 48

Quadrature PSK (QPSK) n More efficient Bandwidth use by each signal element representing more

Quadrature PSK (QPSK) n More efficient Bandwidth use by each signal element representing more than one bit q Shifts of /2 (90 o) Resulting signal is q Each signal element represents two bits q COE 341 – Dr. Marwan Abu-Amara 49

Quadrature PSK (QPSK) COE 341 – Dr. Marwan Abu-Amara 50

Quadrature PSK (QPSK) COE 341 – Dr. Marwan Abu-Amara 50

Quadrature Amplitude Modulation (QAM) n n n n An extension of the QPSK just

Quadrature Amplitude Modulation (QAM) n n n n An extension of the QPSK just described Combines both ASK and PSK For example, ASK with 2 levels and PSK with 4 levels give 4 x 2 i. e. 8 -QAM Up to M=256 is possible Large bandwidth savings But some susceptibility to noise QAM used on asymmetric digital subscriber line (ADSL) and some wireless systems COE 341 – Dr. Marwan Abu-Amara Constellation M=8, L = 3 51

QAM … n n One stream is ASK modulated on a carrier of frequency

QAM … n n One stream is ASK modulated on a carrier of frequency fc Other stream is ASK modulated on a carrier of frequency fc shifted by 90 o The two modulated signals are combined together and transmitted Transmitted signal can be expressed as COE 341 – Dr. Marwan Abu-Amara 52

Multilevel PSK (MPSK) q q q Can use more phase angles and even have

Multilevel PSK (MPSK) q q q Can use more phase angles and even have more than one amplitude! For example, 9600 bps modems use 12 phase angles, four of which have 2 amplitudes Gives 16 different signal elements M = 16 and L = log 2 (16) = 4 bits Every signal element carries 4 bits (Data sent 4 bits at a time) Baud rate is only 9600/4 = 2400 bauds (OK for a voice grade line) Complex signal encoding allows high data rates to be sent on voice grade lines having a limited bandwidth COE 341 – Dr. Marwan Abu-Amara 53

Data Rate & Modulation Rate n In general q q n D: modulation rate

Data Rate & Modulation Rate n In general q q n D: modulation rate (signals per second or bauds) R: data rate (bits per second) M: number of different signal elements L: number of bits per signal element With line signaling speed (i. e. D) of 2400 baud q q q For NRZ-L, data rate is D = 1/Tb For PSK, using L=16 different combinations of amplitude and phase, data rate is 9600 bps, R = 4 D For bi-phase, data rate is ½ D COE 341 – Dr. Marwan Abu-Amara 54

Performance of D/A Modulation Schemes n Performance of digital-to-analog techniques depends on the definition

Performance of D/A Modulation Schemes n Performance of digital-to-analog techniques depends on the definition of the bandwidth of the modulated signal Bandwidth of modulated signal depends on factors such as Filtering technique used to create the band-pass signal ASK and PSK bandwidth directly related to bit rate Transmission bandwidth BT for ASK and PSK is n R is data rate q r is related to filtering technique; 0< r <1 Transmission bandwidth BT for FSK is n n n q q where the delta for offset from the carrier frequency: COE 341 – Dr. Marwan Abu-Amara 55

Performance of D/A Modulation Schemes n With multilevel signaling, bandwidth can improve significantly n

Performance of D/A Modulation Schemes n With multilevel signaling, bandwidth can improve significantly n In the presence of noise, bit error rate of PSK and QPSK are about 3 d. B superior to ASK and FSK (as shown in Figure 5. 4) COE 341 – Dr. Marwan Abu-Amara 56

Bandwidth Efficiency n Bandwidth efficiency is the ratio of data rate to transmission bandwidth,

Bandwidth Efficiency n Bandwidth efficiency is the ratio of data rate to transmission bandwidth, R/BT ASK FSK (wideband F >> R) FSK (narrowband F fc) PSK MPSK: M=4, L=2 MPSK: M=8, L=3 MPSK: M=16, L=4 MPSK: M=32, L=5 r=0 1. 0 2. 0 3. 0 4. 0 5. 0 COE 341 – Dr. Marwan Abu-Amara r = 0. 5 0. 67 1. 33 2. 00 2. 67 3. 33 r=1 0. 5 1. 0 1. 5 2. 0 2. 5 57

Bandwidth Efficiency & Bit Error Rate n n The bit error rate (BER) can

Bandwidth Efficiency & Bit Error Rate n n The bit error rate (BER) can be reduced by increasing Eb/N 0 Bit error rate can be reduced by decreasing bandwidth efficiency q q q Increasing bandwidth Decreasing data rate N 0 is the noise power density in watts/hertz. Hence, the noise in a signal with bandwidth BT, , N=N 0 BT COE 341 – Dr. Marwan Abu-Amara 58

Bandwidth Efficiency & Bit Error Rate n For multi-level signaling, replace R with D

Bandwidth Efficiency & Bit Error Rate n For multi-level signaling, replace R with D COE 341 – Dr. Marwan Abu-Amara 59

Example n n What is the bandwidth efficiency for FSK, ASK, PSK, and QPSK

Example n n What is the bandwidth efficiency for FSK, ASK, PSK, and QPSK for a bit error rate of 10 -7 on a channel with an SNR of 12 d. B ? Recall that Bandwidth efficiency is the ratio of R/BT COE 341 – Dr. Marwan Abu-Amara 60

Example … n n n For FSK & ASK, Eb/N 0 = 14. 2

Example … n n n For FSK & ASK, Eb/N 0 = 14. 2 d. B (R/BT)d. B = – 2. 2 d. B, R/BT = 0. 6 For PSK, Eb/N 0 = 11. 2 d. B (R/BT)d. B = 0. 8 d. B, R/BT = 1. 2 For QPSK, D=R/2 (biphase) R/BT = 2. 4 COE 341 – Dr. Marwan Abu-Amara 61

Analog vs. Digital Signaling Bandwidth Req. n For digital signaling, bandwidth requirement is approximated

Analog vs. Digital Signaling Bandwidth Req. n For digital signaling, bandwidth requirement is approximated to be n For NRZ, D = R COE 341 – Dr. Marwan Abu-Amara 62

Analog Data, Digital Signal n Digitization q q n Conversion of analog data into

Analog Data, Digital Signal n Digitization q q n Conversion of analog data into digital data Digital data can be transmitted using NRZ-L Digital data can be transmitted using code other than NRZ-L Digital data can then be converted to analog signal Analog to digital conversion done using a codec n n Pulse code modulation Delta modulation COE 341 – Dr. Marwan Abu-Amara 63

Pulse Code Modulation (PCM) n n n Sampling Theorem: If a signal is sampled

Pulse Code Modulation (PCM) n n n 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 Signal maybe constructed from samples using a lowpass filter Voice data limited to below 4000 Hz Require 8000 sample per second Analog samples (Pulse Amplitude Modulation, PAM) Each sample assigned digital value COE 341 – Dr. Marwan Abu-Amara 64

Quantization Levels are numbered 0 to 15 n = 4 bits 24 = 16

Quantization Levels are numbered 0 to 15 n = 4 bits 24 = 16 Quantization levels PAM Sample Quantization Error Analog signal is band-limited with bandwidth B Transmitted Serial Code representing the PAM Samples: Sampling rate: 2 B Each PAM sample is assigned the number of the nearest quantization level and its digital code is transmitted COE 341 – Dr. Marwan Abu-Amara 65 Must finish sending the n bits of the code before the next sample is due!

Pulse Code Modulation (PCM) n n 4 bit system gives 16 levels Quantized q

Pulse Code Modulation (PCM) n n 4 bit system gives 16 levels Quantized q q n n n Quantizing error or noise Approximations mean it is impossible to recover original exactly SNR for quantizing error is For each additional bit used for quantizing, SNR increases by about 6 d. B or a factor of 4 8 bit sample gives 256 levels Quality comparable with analog transmission 8000 samples per second of 8 bits each gives (8000 8) = 64 kbps COE 341 – Dr. Marwan Abu-Amara 66

PCM Example n n Suppose that we want to code an analog signal that

PCM Example n n Suppose that we want to code an analog signal that has voltage levels 0 -5 v using 2 -bit PCM Then, we divide the voltage level in four intervals such that the size of each interval is 5/4=1. 25 q n 0 -1. 25, 1. 25 -2. 5, 2. 5 -3. 75, 3. 75 -5 We choose the values to be in the middle of each interval q q q Selected values are: 0. 625, 1. 875, 3. 125, 4. 375 This guarantees that the maximum quantization error is ½*5/4=0. 625 and quantization SNR = 6 x 2 + 1. 76 = 13. 76 d. B COE 341 – Dr. Marwan Abu-Amara 67

Nonlinear Encoding n Absolute error for each sample is the same regardless of signal

Nonlinear Encoding n Absolute error for each sample is the same regardless of signal level q n n n Lower amplitude values are relatively more distorted Solution is to make quantization levels not evenly spaced Greater number of quantization steps for lower amplitudes and smaller number of steps for higher amplitudes Reduces overall signal distortion COE 341 – Dr. Marwan Abu-Amara 68

Effect of Nonlinear Coding COE 341 – Dr. Marwan Abu-Amara 69

Effect of Nonlinear Coding COE 341 – Dr. Marwan Abu-Amara 69

Companding n Effect of nonlinear coding can also be reduced by companding q q

Companding n Effect of nonlinear coding can also be reduced by companding q q q Compressing-expanding More gain to weak signals than to strong signals on input Reverse operation at output COE 341 – Dr. Marwan Abu-Amara 70

Example (Problem 5 -20) n Consider an audio signal with spectral components in the

Example (Problem 5 -20) n Consider an audio signal with spectral components in the range of 300 to 3000 Hz. Assuming a sampling rate of 7000 samples per second will be used to generate the PCM signal. q For SNR = 30 d. B, what is the number of uniform quantization levels needed? n q (SNR)d. B = 6. 02 n + 1. 76 = 30 d. B n = (30 – 1. 76)/6. 02 = 4. 69 Rounded off, n = 5 bits 25 = 32 quantization levels What data rate is required? n R = 7000 samples/sec 5 bits/sample = 35 Kbps COE 341 – Dr. Marwan Abu-Amara 71

Delta Modulation n Analog input is approximated by a staircase function Move up or

Delta Modulation n Analog input is approximated by a staircase function Move up or down one level ( ) at each sample interval Binary behavior q n Function moves up or down at each sample interval A bit stream produced approximates derivative of analog signal rather than its amplitude q q Produce a 1 if stair function is to go up Produce a 0 if stair function is to go down COE 341 – Dr. Marwan Abu-Amara 72

Delta Modulation - example COE 341 – Dr. Marwan Abu-Amara 73

Delta Modulation - example COE 341 – Dr. Marwan Abu-Amara 73

Delta Modulation - Operation n Analog input compared to most recent value of approximating

Delta Modulation - Operation n Analog input compared to most recent value of approximating staircase function q q n If value exceeds staircase function, generate a 1 Otherwise generate a 0 Output of DM process is a binary sequence to be used for reconstructing staircase function q Reconstructed stair function is smoothed by a low pass filter to reconstruct approximated analog signal COE 341 – Dr. Marwan Abu-Amara 74

Delta Modulation - Operation COE 341 – Dr. Marwan Abu-Amara 75

Delta Modulation - Operation COE 341 – Dr. Marwan Abu-Amara 75

Delta Modulation n Two important parameters in DM scheme q Size of step assigned

Delta Modulation n Two important parameters in DM scheme q Size of step assigned to each binary digit d n Must be chosen to produce a balance between two types of errors or noise q q q Increasing sampling rate n n If waveform changes slowly, quantizing noise increases with increase in If waveform changes rapidly, slope overload noise increases with decrease in improves the accuracy of the scheme Increases data rate Principal advantage of DM is implementation simplicity PCM has better SNR at same data rate COE 341 – Dr. Marwan Abu-Amara 76

CODEC - Performance n Good voice reproduction q q q n PCM - 128

CODEC - Performance n Good voice reproduction q q q n PCM - 128 levels (7 bit) Voice bandwidth 4 KHZ Data rate should be 8000 x 7 = 56 kbps for PCM Bandwidth requirement q q Digital transmission requires 56 kbps for 4 KHz analog signal Using Nyquist theorem, this signal requires in the order of 28 KHz of Bandwidth, (C/2=56/2) COE 341 – Dr. Marwan Abu-Amara 77

CODEC - Performance n A common PCM scheme for color TV uses 10 bit

CODEC - Performance n A common PCM scheme for color TV uses 10 bit codes q n Digital techniques continue to grow in popularity q q q n For bandwidth=4. 6 MHz 92 Mbps (i. e. 2*4. 6*10) Repeaters used with no additive noise Time-division multiplexing (TDM) is used for digital signals with no intermodulation noise Use more efficient digital switching techniques More efficient codes are used to reduce required bit rate COE 341 – Dr. Marwan Abu-Amara 78

Analog Data, Analog Signals n Modulation q n Combining an input signal m(t) and

Analog Data, Analog Signals n Modulation q n Combining an input signal m(t) and a carrier at frequency fc to produce signal s(t) with bandwidth centered on fc Why modulate analog signals? q Higher frequency may be needed for effective transmission n q n For unguided transmission, impossible to send baseband signals as required antennas would be kilometers in diameter Permits frequency division multiplexing Types of modulation q q q Amplitude Frequency Phase COE 341 – Dr. Marwan Abu-Amara 79

Analog Modulation Amplitude Modulation (AM) Angle Modulation: (Phase, PM) Angle Modulation: (Frequency, FM) COE

Analog Modulation Amplitude Modulation (AM) Angle Modulation: (Phase, PM) Angle Modulation: (Frequency, FM) COE 341 – Dr. Marwan Abu-Amara 80

Amplitude Modulation n n Simplest form of modulation Accos 2 pfct is the carrier,

Amplitude Modulation n n Simplest form of modulation Accos 2 pfct is the carrier, and x(t)= Amcos 2 pfmt is the input modulating signal Modulated signal expressed as: q q q na is the modulation index ( 1): Amplitude of modulated wave Portion of the modulating signal Added ‘ 1’ is a DC component to prevent loss of information – there will always be a carrier Scheme is known as double sideband transmitted carrier (DSBTC) COE 341 – Dr. Marwan Abu-Amara 81

Amplitude Modulation - Example n Given the amplitude-modulating signal x(t)=Amcos 2 pfmt , find

Amplitude Modulation - Example n Given the amplitude-modulating signal x(t)=Amcos 2 pfmt , find s(t): q Resulting signal has three components: n n q At the original carrier frequency fc A pair of additional components each spaced fm Hz from the carrier Envelope of resulting signal is [1+na x(t)] n n Ac Am/2 fm fc fm With na <1, envelope is exact reproduction of the modulating signal, So it can be recovered at receiver With na >1, envelope crosses the time axis and information is lost COE 341 – Dr. Marwan Abu-Amara 82

Amplitude Modulation - Examples Mat. Lab Simulations Modulating Signal Carrier Envelope Modulated Signal na

Amplitude Modulation - Examples Mat. Lab Simulations Modulating Signal Carrier Envelope Modulated Signal na = 0. 5/1 = 0. 5 COE 341 – Dr. Marwan Abu-Amara =(1+0. 5 cos 2*pi*t) =(1+nacos 2*pi*t) 83

Amplitude Modulation - Example na = 1/1 =1 COE 341 – Dr. Marwan Abu-Amara

Amplitude Modulation - Example na = 1/1 =1 COE 341 – Dr. Marwan Abu-Amara 84

Amplitude Modulation - Example na = 2/1 =2 (>1) COE 341 – Dr. Marwan

Amplitude Modulation - Example na = 2/1 =2 (>1) COE 341 – Dr. Marwan Abu-Amara 85

Spectrum of an AM signal: Modulating Signal having a single Frequency, fm Ac Am/2

Spectrum of an AM signal: Modulating Signal having a single Frequency, fm Ac Am/2 fm fc fm COE 341 – Dr. Marwan Abu-Amara 86

Spectrum of an AM signal n n n Spectrum of AM signal is original

Spectrum of an AM signal n n n Spectrum of AM signal is original carrier plus spectrum of original signal translated on both sides of fc Portion of spectrum f > fc is upper sideband Portion of spectrum f < fc is lower sideband Example: voice signal 300 -3000 Hz With fc 60 KHz q Upper sideband is 60. 3 -63 KHz q Lower sideband is 57 -59. 7 KHz Bandwidth Requirement: 2 B COE 341 – Dr. Marwan Abu-Amara Modulating Signal having a finite Bandwidth, B 87

Amplitude Modulation n Total transmitted power Pt in modulated s(t) is given by Ac

Amplitude Modulation n Total transmitted power Pt in modulated s(t) is given by Ac Am/2 q q n n n Am/2 fm fc fm Pc is transmitted power in carrier na should be maximized (but <1) to allow most of signal power to carry information Modulated signal contains redundant information q Only one of the sidebands is enough to restore modulating signal Possible ways to economize on transmitted power: q SSB: single sideband, eliminates one sideband carrier, saves on BW (= B) q DSBSC: double sideband suppressed carrier, carrier is not transmitted, no saving on BW (= 2 B) Suppressing the carrier may not be OK in some applications, e. g. ASK, where the carrier can provide TX-RX synchronization. COE 341 – Dr. Marwan Abu-Amara 88

DSBSC: Double Sideband Suppressed Carrier Example n Signal is expressed as Suppressed Carrier COE

DSBSC: Double Sideband Suppressed Carrier Example n Signal is expressed as Suppressed Carrier COE 341 – Dr. Marwan Abu-Amara 89

Angle Modulation n Includes: q q Frequency modulation (FM) and Phase modulation (PM) as

Angle Modulation n Includes: q q Frequency modulation (FM) and Phase modulation (PM) as special cases n Modulated signal is given by n Phase modulation (PM) q q n Total Angle Instantaneous Phase is proportional to modulating signal: np is phase modulation index Frequency modulation (FM) q q q Instantaneous frequency deviation is proportional to modulating signal: i. e. Derivative of f is proportional to modulating signal nf is frequency modulation index COE 341 – Dr. Marwan Abu-Amara 90

Angle Modulation n The total phase angle of s(t) at any instant is [2

Angle Modulation n The total phase angle of s(t) at any instant is [2 fct+f(t)] Instantaneous phase deviation from carrier is f(t) Instantaneous angular frequency, , can be defined as the rate of change of total phase So, for the modulated signal, s(t) n Phase Modulation (PM): n n n q n f(t) = npx(t), instantaneous phase deviation from carrier is directly proportional to x(t) Frequency Modulation (FM): q f’(t) is proportional to x(t). So, instantaneous frequency deviation from carrier frequency is proportional to x(t). COE 341 – Dr. Marwan Abu-Amara 91

Phase Modulation (PM)- Example n Derive an expression for a phase-modulated signal s(t) with

Phase Modulation (PM)- Example n Derive an expression for a phase-modulated signal s(t) with Ac= 5 V, given the modulating signal x(t) = 3 sin 2 fmt We know that s(t): n For PM, f (t) is given by: n Then s(t) is: n Instantaneous frequency of s(t) is: n – Dr. Marwan Abu-Amara Note: Frequency variations. COE in 341 s(t) lead x(t) amplitude variations by 90 92

Frequency Modulation: FM n Peak frequency deviation DF is given by: q n n

Frequency Modulation: FM n Peak frequency deviation DF is given by: q n n n Where Am is the peak value of the modulating signal x(t) An increase in the amplitude Am of x(t) increases DF, which increases the bandwidth requirement BT But average power level of the FM modulated signal is fixed at AC 2/2, (does not increase with Am) In Amplitude Modulation, Am affects the power in the AM signal, but does not affect the bandwidth COE 341 – Dr. Marwan Abu-Amara 93

Frequency Modulation - Example n Derive an expression for a frequency-modulated signal s(t) with

Frequency Modulation - Example n Derive an expression for a frequency-modulated signal s(t) with Ac= 5 V, given the modulating signal x(t) = 3 sin 2 fmt We know that s(t): For FM, f’(t) is given by: n Then s(t) is: n n But frequency varies as f’, i. e. as sin not as – cos !! n We have: n Substituting for DF we get: COE 341 – Dr. Marwan Abu-Amara 94

Bandwidth Requirement n n n All AM, FM, and PM result in a modulated

Bandwidth Requirement n n n All AM, FM, and PM result in a modulated signal whose bandwidth is centered at fc Let B be the bandwidth of the modulating signal For AM, BT = 2 B Angle modulation includes a term of the form cos(…+cos()) which is a nonlinear term producing a wide range of frequencies fc+fm, fc+2 fm, … (the Bessel function) i. e. Theoretically, an infinite bandwidth is required to transmit an FM or PM signal COE 341 – Dr. Marwan Abu-Amara 95

Practical Bandwidth Requirement for Angle Modulation n Carson’s Rule of thumb n For FM,

Practical Bandwidth Requirement for Angle Modulation n Carson’s Rule of thumb n For FM, BT= 2 DF + 2 B Both FM and PM require greater bandwidth than AM n COE 341 – Dr. Marwan Abu-Amara 96