William Stallings Data and Computer Communications Chapter 5 Data Encoding
Encoding Techniques zDigital data, digital signal zAnalog data, digital signal zDigital data, analog signal zAnalog data, analog signal
Digital Data, Digital Signal zDigital signal yDiscrete, discontinuous voltage pulses yEach pulse is a signal element yBinary data encoded into signal elements
Terms (1) zUnipolar yAll signal elements have same sign zPolar yOne logic state represented by positive voltage the other by negative voltage zData rate yRate of data transmission in bits per second zDuration or length of a bit yTime taken for transmitter to emit the bit
Terms (2) zModulation rate yRate at which the signal level changes yMeasured in baud = signal elements per second zMark and Space yBinary 1 and Binary 0 respectively
Interpreting Signals zNeed to know yTiming of bits - when they start and end ySignal levels zFactors affecting successful interpreting of signals ySignal to noise ratio yData rate yBandwidth
Comparison of Encoding Schemes (1) zSignal Spectrum yLack of high frequencies reduces required bandwidth yLack of dc component allows ac coupling via transformer, providing isolation yConcentrate power in the middle of the bandwidth zClocking ySynchronizing transmitter and receiver yExternal clock ySync mechanism based on signal
Comparison of Encoding Schemes (2) zError detection yCan be built in to signal encoding zSignal interference and noise immunity ySome codes are better than others zCost and complexity yHigher signal rate (& thus data rate) lead to higher costs ySome codes require signal rate greater than data rate
Encoding Schemes zNonreturn to Zero-Level (NRZ-L) zNonreturn to Zero Inverted (NRZI) zBipolar -AMI zPseudoternary zManchester zDifferential Manchester zB8ZS zHDB3
Nonreturn to Zero-Level (NRZ-L) zTwo different voltages for 0 and 1 bits zVoltage constant during bit interval yno transition I.e. no return to zero voltage ze.g. Absence of voltage for zero, constant positive voltage for one zMore often, negative voltage for one value and positive for the other zThis is NRZ-L
Nonreturn to Zero Inverted zNonreturn to zero inverted on ones zConstant voltage pulse for duration of bit zData encoded as presence or absence of signal transition at beginning of bit time zTransition (low to high or high to low) denotes a binary 1 zNo transition denotes binary 0 zAn example of differential encoding
NRZ
Differential Encoding zData represented by changes rather than levels zMore reliable detection of transition rather than level zIn complex transmission layouts it is easy to lose sense of polarity
NRZ pros and cons zPros yEasy to engineer yMake good use of bandwidth zCons ydc component yLack of synchronization capability zUsed for magnetic recording zNot often used for signal transmission
Multilevel Binary zUse more than two levels zBipolar-AMI yzero represented by no line signal yone represented by positive or negative pulse yone pulses alternate in polarity yNo loss of sync if a long string of ones (zeros still a problem) yNo net dc component yLower bandwidth yEasy error detection
Pseudoternary zOne represented by absence of line signal zZero represented by alternating positive and negative zNo advantage or disadvantage over bipolar-AMI
Bipolar-AMI and Pseudoternary
Trade Off for Multilevel Binary zNot as efficient as NRZ yEach signal element only represents one bit yIn a 3 level system could represent log 2 3 = 1.58 bits yReceiver must distinguish between three levels (+A, -A, 0) yRequires approx. 3dB more signal power for same probability of bit error
Biphase zManchester yTransition in middle of each bit period yTransition serves as clock and data yLow to high represents one yHigh to low represents zero yUsed by IEEE zDifferential Manchester yMidbit transition is clocking only yTransition at start of a bit period represents zero yNo transition at start of a bit period represents one yNote: this is a differential encoding scheme yUsed by IEEE 802.5
Biphase Pros and Cons zCon yAt least one transition per bit time and possibly two yMaximum modulation rate is twice NRZ yRequires more bandwidth zPros ySynchronization on mid bit transition (self clocking) yNo dc component yError detection xAbsence of expected transition
Modulation Rate
Scrambling zUse scrambling to replace sequences that would produce constant voltage zFilling sequence yMust produce enough transitions to sync yMust be recognized by receiver and replace with original ySame length as original zNo dc component zNo long sequences of zero level line signal zNo reduction in data rate zError detection capability
B8ZS zBipolar With 8 Zeros Substitution zBased on bipolar-AMI zIf octet of all zeros and last voltage pulse preceding was positive encode as zIf octet of all zeros and last voltage pulse preceding was negative encode as zCauses two violations of AMI code zUnlikely to occur as a result of noise zReceiver detects and interprets as octet of all zeros
HDB3 zHigh Density Bipolar 3 Zeros zBased on bipolar-AMI zString of four zeros replaced with one or two pulses
B8ZS and HDB3
Digital Data, Analog Signal zPublic telephone system y300Hz to 3400Hz yUse modem (modulator-demodulator) zAmplitude shift keying (ASK) zFrequency shift keying (FSK) zPhase shift keying (PK)
Modulation Techniques
Amplitude Shift Keying zValues represented by different amplitudes of carrier zUsually, one amplitude is zero yi.e. presence and absence of carrier is used zSusceptible to sudden gain changes zInefficient zUp to 1200bps on voice grade lines zUsed over optical fiber
Frequency Shift Keying zValues represented by different frequencies (near carrier) zLess susceptible to error than ASK zUp to 1200bps on voice grade lines zHigh frequency radio zEven higher frequency on LANs using co-ax
FSK on Voice Grade Line
Phase Shift Keying zPhase of carrier signal is shifted to represent data zDifferential PSK yPhase shifted relative to previous transmission rather than some reference signal
Quadrature PSK zMore efficient use by each signal element representing more than one bit ye.g. shifts of /2 (90 o ) yEach element represents two bits yCan use 8 phase angles and have more than one amplitude y9600bps modem use 12 angles, four of which have two amplitudes
Performance of Digital to Analog Modulation Schemes zBandwidth yASK and PSK bandwidth directly related to bit rate yFSK bandwidth related to data rate for lower frequencies, but to offset of modulated frequency from carrier at high frequencies y(See Stallings for math) zIn the presence of noise, bit error rate of PSK and QPSK are about 3dB superior to ASK and FSK
Analog Data, Digital Signal zDigitization yConversion of analog data into digital data yDigital data can then be transmitted using NRZ-L yDigital data can then be transmitted using code other than NRZ-L yDigital data can then be converted to analog signal yAnalog to digital conversion done using a codec yPulse code modulation yDelta modulation
Pulse Code Modulation(PCM) (1) zIf 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 y(Proof - Stallings appendix 4A) zVoice data limited to below 4000Hz zRequire 8000 sample per second zAnalog samples (Pulse Amplitude Modulation, PAM) zEach sample assigned digital value
Pulse Code Modulation(PCM) (2) z4 bit system gives 16 levels zQuantized yQuantizing error or noise yApproximations mean it is impossible to recover original exactly z8 bit sample gives 256 levels zQuality comparable with analog transmission z8000 samples per second of 8 bits each gives 64kbps
Nonlinear Encoding zQuantization levels not evenly spaced zReduces overall signal distortion zCan also be done by companding
Delta Modulation zAnalog input is approximated by a staircase function zMove up or down one level ( ) at each sample interval zBinary behavior yFunction moves up or down at each sample interval
Delta Modulation - example
Delta Modulation - Operation
Delta Modulation - Performance zGood voice reproduction yPCM levels (7 bit) yVoice bandwidth 4khz yShould be 8000 x 7 = 56kbps for PCM zData compression can improve on this ye.g. Interframe coding techniques for video
Analog Data, Analog Signals zWhy modulate analog signals? yHigher frequency can give more efficient transmission yPermits frequency division multiplexing (chapter 8) zTypes of modulation yAmplitude yFrequency yPhase
Analog Modulation
Spread Spectrum zAnalog or digital data zAnalog signal zSpread data over wide bandwidth zMakes jamming and interception harder zFrequency hoping ySignal broadcast over seemingly random series of frequencies zDirect Sequence yEach bit is represented by multiple bits in transmitted signal yChipping code
Required Reading zStallings chapter 5