Upload
linda-sims
View
224
Download
0
Tags:
Embed Size (px)
Citation preview
Digital TransmissionDigital Transmission
01204325: Data 01204325: Data Communication and Communication and Computer NetworksComputer Networks
Asst. Prof. Chaiporn Jaikaeo, Ph.D.Asst. Prof. Chaiporn Jaikaeo, [email protected]@ku.ac.th
http://www.cpe.ku.ac.th/~cpjhttp://www.cpe.ku.ac.th/~cpjComputer Engineering DepartmentComputer Engineering Department
Kasetsart University, Bangkok, ThailandKasetsart University, Bangkok, ThailandAdapted from lecture slides by Behrouz A. Forouzan© The McGraw-Hill Companies, Inc. All rights reserved
22
OutlineOutline Line codingLine coding Encoding considerationsEncoding considerations DC components in signalsDC components in signals SynchronizationSynchronization Various line coding methodsVarious line coding methods
33
Line CodingLine Coding Process of converting binary data to Process of converting binary data to
digital signaldigital signal
44
Signal Levels vs. Data Signal Levels vs. Data LevelsLevels
Number of signal levelsNumber of signal levels Number of different voltage levels Number of different voltage levels
allowed in a signalallowed in a signal Number of data levelsNumber of data levels
Number of voltage levels that actually Number of voltage levels that actually represent data valuesrepresent data values
55
Signal vs. Data ElementsSignal vs. Data Elements
66
Pulse Rate vs. Bit RatePulse Rate vs. Bit Rate
bb – number of bits per pulse – number of bits per pulse
LL – number of different signal elements – number of different signal elements
BitRate = PulseRate × b = PulseRate × log2LBitRate = PulseRate × b = PulseRate × log2L
t
00 11 01 10 01 10 11 00
-3
-1
+1
+3
One pulse(one signal element)
Bit rate Bits per secondPulse rate Baud (pulses or signals per second)
Bit rate Bits per secondPulse rate Baud (pulses or signals per second)
77
Pulse Rate vs. Bit RatePulse Rate vs. Bit Rate Example: Example: In Manchester Encoding, if the bit rate In Manchester Encoding, if the bit rate
is is 10 Mbps, what is the pulse rate?10 Mbps, what is the pulse rate?
t
0 1 0 0 1 1 0 1
One bit One pulse(one signal element)
88
Encoding ConsiderationsEncoding Considerations Signal spectrumSignal spectrum
Lack of DC componentsLack of DC components Lack of high frequency componentsLack of high frequency components
Clocking/synchronizationClocking/synchronization Error detectionError detection Noise immunityNoise immunity Cost and complexityCost and complexity
99
DC ComponentsDC Components DC components in signals are not DC components in signals are not
desirabledesirable Cannot pass thru certain devicesCannot pass thru certain devices Leave extra (useless) energy on the lineLeave extra (useless) energy on the line
t
0 1 0 0 1 1 0 1
t
0 1 0 0 1 1 0 1
Signal with DC component
Signal without DC component
1010
t
0 1 0 0 0 1 1 0 1 1
SynchronizationSynchronization To correctly decode a signal, receiver To correctly decode a signal, receiver
and sender must agree on bit and sender must agree on bit intervalinterval
t
0 1 0 0 1 1 0 1 Sender sends:01001101
Receiver sees:0100011011
1111
Providing SynchronizationProviding Synchronization Separate clock wireSeparate clock wire
Self-synchronizationSelf-synchronization
Sender Receiverdata
clock
t
0 1 0 0 1 1 0 1
1212
Line Coding MethodsLine Coding Methods UnipolarUnipolar
Uses only one voltage level (one side of time Uses only one voltage level (one side of time axis)axis)
PolarPolar Uses two voltage levels (negative and positive)Uses two voltage levels (negative and positive) E.g., NRZ, RZ, Manchester, Differential E.g., NRZ, RZ, Manchester, Differential
ManchesterManchester BipolarBipolar
Uses three voltage levels (+, 0, and –) for data Uses three voltage levels (+, 0, and –) for data bitsbits
MultilevelMultilevel
1313
UnipolarUnipolar Simplest form of digital encodingSimplest form of digital encoding
Rarely usedRarely used Only one polarity of voltage is usedOnly one polarity of voltage is used E.g., polarity assigned to 1E.g., polarity assigned to 1
t
0 1 0 0 1 1 0 0
1414
Polar EncodingPolar Encoding Two voltage levels (+,-) represent data Two voltage levels (+,-) represent data
bitsbits Most popular fourMost popular four
Nonreturn-to-Zero (NRZ)Nonreturn-to-Zero (NRZ) Return-to-Zero (RZ)Return-to-Zero (RZ) ManchesterManchester Differential ManchesterDifferential Manchester
1515
NRZ EncodingNRZ Encoding NNononrreturn to eturn to ZZeroero
NRZ-L (NRZ-Level):NRZ-L (NRZ-Level): Signal level depends on bit valueSignal level depends on bit value
NRZ-I (NRZ-Invert):NRZ-I (NRZ-Invert): Signal is inverted if 1 is Signal is inverted if 1 is encounteredencountered
t
0 1 0 0 1 1 1 0
t
0 1 0 0 1 1 1 0 N = Bit rateSave = Average signal rate
1616
RZ EncodingRZ Encoding RReturn to eturn to ZZeroero
Uses three voltage levels: +, - and 0, Uses three voltage levels: +, - and 0, but only + and - represent data bitsbut only + and - represent data bits
Half way thru each bit, signal returns to Half way thru each bit, signal returns to zerozero
t
0 1 0 0 1 1 0 0
?
1717
Manchester EncodingManchester Encoding Uses an inversion at the middle of Uses an inversion at the middle of
each biteach bit For bit representationFor bit representation For synchronizationFor synchronization
t
0 1 0 0 1 1 0 1 = 0
= 1
1818
Differential Manchester Differential Manchester EncodingEncoding
The inversion on the middle of each The inversion on the middle of each bit is only for synchronizationbit is only for synchronization
Transition at the beginning of each Transition at the beginning of each bit tells the valuebit tells the value
t
0 1 0 0 1 1 0 1
1919
Bipolar EncodingBipolar Encoding Bipolar encoding uses three voltage levels: Bipolar encoding uses three voltage levels:
+, - and 0+, - and 0 Each of all three levels represents a bitEach of all three levels represents a bit E.g., E.g., Bipolar AMIBipolar AMI ( (AAlternate lternate MMark ark IInversion)nversion)
0V always represents binary 00V always represents binary 0 Binary 1s are represented by alternating + and Binary 1s are represented by alternating + and
--
t
0 1 0 0 1 1 0 1
2020
t
1 1 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 1 0
Bipolar AMI
B8ZS
BBnnZS SchemesZS Schemes BBnnZS – Bipolar ZS – Bipolar nn-zero substitution-zero substitution
Based on Bipolar AMIBased on Bipolar AMI nn consecutive zeros are substituted with some +/- levels consecutive zeros are substituted with some +/- levels
provides synchronization during long sequence of 0sprovides synchronization during long sequence of 0s E.g., B8ZSE.g., B8ZS
V B 0 V000 B
V – Bipolar violationB – Valid bipolar signal
2121
Other SchemesOther Schemes mmBBnLnL
mm data elements are substituted with data elements are substituted with nn signal elementssignal elements
E.g., 2B1Q (two binary, 1 quaternary)E.g., 2B1Q (two binary, 1 quaternary)
t
00 11 01 10 01 10 11 00
-3
-1
+1
+3
Bit sequence Voltage level
00 -301 -110 +311 +1
2222
Block CodingBlock Coding Improves the performance of line Improves the performance of line
codingcoding ProvidesProvides
SynchronizationSynchronization Error detectionError detection
Division SubstitutionLine
Coding :001011010001 :
…01011010001… :101100101101010 :
t
2323
DataData CodeCode DataData CodeCode
00000000 1111011110 1000 1000 1001010010
00010001 0100101001 10011001 1001110011
00100010 1010010100 10101010 1011010110
00110011 1010110101 10111011 1011110111
01000100 0101001010 11001100 1101011010
01010101 0101101011 11011101 1101111011
01100110 0111001110 11101110 1110011100
01110111 0111101111 11111111 1110111101
DataData CodeCodeQ (Quiet)Q (Quiet) 0000000000
I (Idle) I (Idle) 1111111111
H (Halt) H (Halt) 0010000100
J (start delimiter)J (start delimiter) 1100011000
K (start K (start delimiter)delimiter) 1000110001
T (end delimiter)T (end delimiter) 0110101101
S (Set)S (Set) 1100111001
R (Reset)R (Reset) 0011100111
4B/5B Encoding Table4B/5B Encoding Table
2424
Analog to Digital ConversionAnalog to Digital Conversion Pulse Amplitude Modulation (PAM)Pulse Amplitude Modulation (PAM)
Converts an analog signal into a series Converts an analog signal into a series of pulses by samplingof pulses by sampling
PAM
Analog signal PAM signal(Sampled analog data)
2525
Pulse Code Modulation Pulse Code Modulation (PCM)(PCM)
Converts an analog signal into a Converts an analog signal into a digital signaldigital signal PAMPAM QuantizationQuantization Binary encodingBinary encoding Line codingLine coding
2626
PCM: QuantizationPCM: Quantization
1 2 3 4 5 6 70Input
2
4
6
Output
Converts continuous values of data to a Converts continuous values of data to a finite number of discrete valuesfinite number of discrete values
2727
PCM: QuantizationPCM: Quantization
Quantization
2828
Quantization ErrorQuantization Error Assume sine-wave input and uniform Assume sine-wave input and uniform
quantizationquantization
Known as the 6 dB/bit approximationKnown as the 6 dB/bit approximation
See also: http://en.wikipedia.org/wiki/Quantization_error#Quantization_noise_model
2929
SolutionWe can calculate the number of bits as
Telephone companies usually assign 7 or 8 bits per sample.
Example: Quantization ErrorExample: Quantization Error A telephone subscriber line must A telephone subscriber line must
have an SNRdB above 40. What is have an SNRdB above 40. What is the minimum number of bits per the minimum number of bits per sample?sample?
3030
PCM: Binary EncodingPCM: Binary Encoding Maps discrete values to binary digitsMaps discrete values to binary digits
3131
PCM: The Whole ProcessPCM: The Whole Process
3232
Minimum Sampling RateMinimum Sampling Rate
Sampling rate must be greater thanSampling rate must be greater than twice the twice the highest frequencyhighest frequency
Sampling rate must be greater thanSampling rate must be greater than twice the twice the highest frequencyhighest frequency
Nyquist Theorem:Nyquist Theorem:
t
sampling interval
Ex. Find the maximum samplinginterval for recording human voice(freq. range 300Hz – 3000Hz)
3333
Nyquist’s Sampling Nyquist’s Sampling TheoremTheorem
See also: Wagon-wheel effect Demo: sampling.py
3434
Sampling and Bit RateSampling and Bit Rate Ex.Ex. Calculate the minimum bit rate for Calculate the minimum bit rate for
recoding human voice, if each sample recoding human voice, if each sample requires 60 levels of precisionrequires 60 levels of precision