line coding
Post on 01-Dec-2014
134 Views
Preview:
TRANSCRIPT
Line CodingLine Coding
Dacomun/J. CatalanDacomun/J. Catalan Line CodingLine Coding 22
What is Line Coding?What is Line Coding?
��Process of converting binary data into a digital signalProcess of converting binary data into a digital signal
��Properties of Line CodingProperties of Line Coding
�� Signal level / Data levelSignal level / Data level
�� Signal level refers to the number of possible values that a Signal level refers to the number of possible values that a signal can have signal can have
��Data level refers to the number of values used to Data level refers to the number of values used to represent data (two levels for binary)represent data (two levels for binary)
�� Pulse rate (or modulation rate)Pulse rate (or modulation rate)
�� Number of pulses per secondNumber of pulses per second
�� For a number of line coding schemes, there is a pulse per For a number of line coding schemes, there is a pulse per bit interval; for some, it is possible to have no pulse for bit interval; for some, it is possible to have no pulse for certain segments of the data streamcertain segments of the data stream
Dacomun/J. CatalanDacomun/J. Catalan Line CodingLine Coding 33
Properties of line coding (cont’d)Properties of line coding (cont’d)
�� SpectrumSpectrum
It is desirable to:It is desirable to:
�� Lack of high frequencies reduces required bandwidthLack of high frequencies reduces required bandwidth
�� Lack of dc component allows ac coupling via transformer, Lack of dc component allows ac coupling via transformer, providing isolationproviding isolation
�� Concentrate power in the middle of the bandwidthConcentrate power in the middle of the bandwidth
�� ClockingClocking
�� Synchronizing the transmitter and receiverSynchronizing the transmitter and receiver
��External clockExternal clock
��Sync mechanism based on signal (selfSync mechanism based on signal (self--clocking)clocking)
�� Error DetectionError Detection
�� Some schemes have inherent ability to detect errorsSome schemes have inherent ability to detect errors
Dacomun/J. CatalanDacomun/J. Catalan Line CodingLine Coding 44
Properties of line coding (cont’d)Properties of line coding (cont’d)
�� Noise ImmunityNoise Immunity
�� Some schemes are more immune to noise and Some schemes are more immune to noise and interference than othersinterference than others
�� Cost and ComplexityCost and Complexity
��Higher signal rate (& thus data rate) lead to higher costsHigher signal rate (& thus data rate) lead to higher costs
�� Some codes require signal rate greater than data rateSome codes require signal rate greater than data rate
�� Some codes require more complex circuitsSome codes require more complex circuits
��Need to identifyNeed to identify
�� Timing of bits Timing of bits -- when they start and endwhen they start and end
�� Signal levelsSignal levels
Dacomun/J. CatalanDacomun/J. Catalan Line CodingLine Coding 55
Line Coding SchemesLine Coding Schemes
��Unipolar, polar or bipolarUnipolar, polar or bipolar
�� Unipolar Unipolar –– zero or positive (or negative)zero or positive (or negative)
�� Polar Polar –– two polarities (one positive, one negative)two polarities (one positive, one negative)
�� Bipolar Bipolar –– two polarities and zerotwo polarities and zero
��NRZ, RZ, Phase encoded or Multilevel binaryNRZ, RZ, Phase encoded or Multilevel binary
�� NRZ NRZ –– two levelstwo levels
�� RZ RZ –– three levelsthree levels
�� PhasePhase--encoded encoded –– uses phase inversion uses phase inversion
�� Multilevel Binary Multilevel Binary --
Dacomun/J. CatalanDacomun/J. Catalan Line CodingLine Coding 66
NRZ EncodingNRZ Encoding
��NRZNRZ--LL
1 0 1 1 0 0 0 1 1 0 1
or
Dacomun/J. CatalanDacomun/J. Catalan Line CodingLine Coding 77
NRZ EncodingNRZ Encoding
��NRZNRZ--LL
�� Two different voltages for 0 and 1 bitsTwo different voltages for 0 and 1 bits
�� Voltage constant during bit intervalVoltage constant during bit interval
�� no transition I.e. no return to zero voltageno transition I.e. no return to zero voltage
�� e.g. Absence of voltage for zero, constant positive voltage e.g. Absence of voltage for zero, constant positive voltage for onefor one
�� More often, negative voltage for one value and positive More often, negative voltage for one value and positive for the otherfor the other
�� Widespread use in digital logic systemsWidespread use in digital logic systems
Dacomun/J. CatalanDacomun/J. Catalan Line CodingLine Coding 88
Differential NRZ EncodingDifferential NRZ Encoding
��NRZNRZ--M or NRZM or NRZ--II
�� One (or mark) is indicated by a change in level at the One (or mark) is indicated by a change in level at the
start of the bit intervalstart of the bit interval
�� Zero data is indicated by no signal transitionZero data is indicated by no signal transition
�� Primarily used in magnetic recordingPrimarily used in magnetic recording
1 0 1 1 0 0 0 1 1 0 1
Dacomun/J. CatalanDacomun/J. Catalan Line CodingLine Coding 99
Differential NRZ EncodingDifferential NRZ Encoding
��NRZNRZ--SS
�� Zero (or space) is indicated by a change in level at the Zero (or space) is indicated by a change in level at the
start of the bit intervalstart of the bit interval
�� One data is indicated by no signal transitionOne data is indicated by no signal transition
1 0 1 1 0 0 0 1 1 0 1
Dacomun/J. CatalanDacomun/J. Catalan Line CodingLine Coding 1010
NRZ Pros and ConsNRZ Pros and Cons
��ProsPros
�� Easy to engineerEasy to engineer
�� Make good use of bandwidthMake good use of bandwidth
��ConsCons
�� dc componentdc component
�� Lack of synchronization capabilityLack of synchronization capability
��Used for magnetic recordingUsed for magnetic recording
��Not often used for signal transmissionNot often used for signal transmission
Dacomun/J. CatalanDacomun/J. Catalan Line CodingLine Coding 1111
RZ EncodingRZ Encoding
��Unipolar RZUnipolar RZ
�� One is represented by a halfOne is represented by a half--width pulsewidth pulse
�� Zero is represented by the absence of pulseZero is represented by the absence of pulse
�� Used in baseband transmission and magnetic recordingUsed in baseband transmission and magnetic recording
1 0 1 1 0 0 0 1 1 0 1
Dacomun/J. CatalanDacomun/J. Catalan Line CodingLine Coding 1212
RZ EncodingRZ Encoding
��Bipolar RZBipolar RZ
�� Ones and Zeros are represented by halfOnes and Zeros are represented by half--bit pulses of bit pulses of
opposite polaritiesopposite polarities
�� There is a pulse for every bit sentThere is a pulse for every bit sent
�� Used in baseband transmission and magnetic recordingUsed in baseband transmission and magnetic recording
1 0 1 1 0 0 0 1 1 0 1
Dacomun/J. CatalanDacomun/J. Catalan Line CodingLine Coding 1313
Multilevel EncodingMultilevel Encoding
��Bipolar AMI (Alternate mark inversion)Bipolar AMI (Alternate mark inversion)
�� zero represented by no line signalzero represented by no line signal
�� one represented by positive or negative pulseone represented by positive or negative pulse
�� one pulses alternate in polarityone pulses alternate in polarity
1 0 1 1 0 0 0 1 1 0 1
Dacomun/J. CatalanDacomun/J. Catalan Line CodingLine Coding 1414
Multilevel EncodingMultilevel Encoding
��PseudoternaryPseudoternary
�� One represented by absence of line signalOne represented by absence of line signal
�� Zero represented by alternating positive and negativeZero represented by alternating positive and negative
1 0 1 1 0 0 0 1 1 0 1
Dacomun/J. CatalanDacomun/J. Catalan Line CodingLine Coding 1515
BB--AMI and Pseudoternary characteristicsAMI and Pseudoternary characteristics
�� Not as efficient as NRZNot as efficient as NRZ
�� Each signal element only represents one bitEach signal element only represents one bit
�� In a 3 level system could represent logIn a 3 level system could represent log223 = 1.58 bits3 = 1.58 bits
�� Receiver must distinguish between three levels Receiver must distinguish between three levels (+A, (+A, --A, 0)A, 0)
�� Requires approx. 3dB more signal power for same Requires approx. 3dB more signal power for same
probability of bit errorprobability of bit error
�� No loss of sync if a long string of ones (BNo loss of sync if a long string of ones (B--AMI) or zeros AMI) or zeros
(Pseudoternary) (Pseudoternary)
�� No net dc componentNo net dc component
�� Lower bandwidthLower bandwidth
�� Easy error detectionEasy error detection
Dacomun/J. CatalanDacomun/J. Catalan Line CodingLine Coding 1616
Scrambling techniques for BScrambling techniques for B--AMIAMI
��ScramblingScrambling
�� Use scrambling to replace sequences that would Use scrambling to replace sequences that would produce constant voltageproduce constant voltage
�� Filling sequence Filling sequence
��Must produce enough transitions to syncMust produce enough transitions to sync
��Must be recognized by receiver and replace with originalMust be recognized by receiver and replace with original
�� Same length as originalSame length as original
�� No dc componentNo dc component
�� No long sequences of zero level line signalNo long sequences of zero level line signal
�� No reduction in data rateNo reduction in data rate
�� Error detection capabilityError detection capability
Dacomun/J. CatalanDacomun/J. Catalan Line CodingLine Coding 1717
Scrambling techniques for BScrambling techniques for B--AMIAMI
��B8ZS B8ZS (Bipolar with 8 zero substitution)(Bipolar with 8 zero substitution)
�� a variant of a variant of BnZSBnZS techniquestechniques
�� Based on bipolarBased on bipolar--AMIAMI
�� If octet of all zeros and last voltage pulse preceding was If octet of all zeros and last voltage pulse preceding was
positive encode as 000+positive encode as 000+--00--++
�� If octet of all zeros and last voltage pulse preceding was If octet of all zeros and last voltage pulse preceding was
negative encode as 000negative encode as 000--+0++0+--
�� Causes two violations of AMI codeCauses two violations of AMI code
�� Unlikely to occur as a result of noise ( therefore offers a Unlikely to occur as a result of noise ( therefore offers a means for error detection )means for error detection )
�� Receiver detects and interprets as octet of all zerosReceiver detects and interprets as octet of all zeros
�� Commonly used in North AmericaCommonly used in North America
Dacomun/J. CatalanDacomun/J. Catalan Line CodingLine Coding 1818
Scrambling techniques for BScrambling techniques for B--AMIAMI
��HDB3 HDB3 (high(high--density bipolardensity bipolar--33--zeros)zeros)
�� High Density Bipolar 3 ZerosHigh Density Bipolar 3 Zeros
�� Based on bipolarBased on bipolar--AMIAMI
�� String of four zeros replaced with one or two pulsesString of four zeros replaced with one or two pulses
�� Commonly used in Europe and JapanCommonly used in Europe and Japan
Polarity of last violation
Dacomun/J. CatalanDacomun/J. Catalan Line CodingLine Coding 1919
Scrambling techniques for BScrambling techniques for B--AMIAMI
Dacomun/J. CatalanDacomun/J. Catalan Line CodingLine Coding 2020
Multilevel EncodingMultilevel Encoding
��MLTMLT--3 3 (multiline transmission three level)(multiline transmission three level)
�� One represented by a signal transition at the beginning One represented by a signal transition at the beginning
of the 1 bit from current level to the next in the of the 1 bit from current level to the next in the sequence 1sequence 1→→0 0 →→--1 1 →→0 0 →→1 1 →→--1 …1 …
�� There is no transition at the start of a zero bitThere is no transition at the start of a zero bit
1 0 1 1 0 0 0 1 1 0 1
Dacomun/J. CatalanDacomun/J. Catalan Line CodingLine Coding 2121
Multilevel EncodingMultilevel Encoding
��2B1Q 2B1Q (two binary one quarternary)(two binary one quarternary)
�� Uses four levels of signalingUses four levels of signaling
�� Each signaling level represents two bitsEach signaling level represents two bits
�� A form of pulse amplitude modulation (PAM)A form of pulse amplitude modulation (PAM)
�� Used in ISDN and some HDSL systemsUsed in ISDN and some HDSL systems
1 0 1 1 0 0 0 1 1 0
00: -3 | 01: -1 | 10: 3 | 11: 1
Dacomun/J. CatalanDacomun/J. Catalan Line CodingLine Coding 2222
Phase encodingPhase encoding
��bibi--phasephase--LL
�� A one bit is represented by a halfA one bit is represented by a half--bitbit--wide pulse wide pulse positioned at the first half of the intervalpositioned at the first half of the interval
�� A zero bit is placed at the second half of the intervalA zero bit is placed at the second half of the interval
�� A rising or falling edge is always present at midA rising or falling edge is always present at mid--bitbit
�� Manchester codingManchester coding uses reverse positions of halfuses reverse positions of half--bit bit ones with rising midones with rising mid--bit transition for a data bit of onebit transition for a data bit of one
�� Used for magnetic recording and data communicationsUsed for magnetic recording and data communications
1 0 1 1 0 0 0 1 1 0 1
Dacomun/J. CatalanDacomun/J. Catalan Line CodingLine Coding 2323
Phase encodingPhase encoding
��bibi--phasephase-- MM
�� A transition occurs at the start of the bit intervalA transition occurs at the start of the bit interval
�� A one bit is represented by a second transition half a bit A one bit is represented by a second transition half a bit
laterlater
�� A zero bit does not have a second transitionA zero bit does not have a second transition
1 0 1 1 0 0 0 1 1 0 1
Assumes prior to t=0 a high level was last asserted
Dacomun/J. CatalanDacomun/J. Catalan Line CodingLine Coding 2424
Phase encodingPhase encoding
��bibi--phasephase-- SS
�� A transition occurs at the start of the bit intervalA transition occurs at the start of the bit interval
�� A zero bit is represented by a second transition half a bit A zero bit is represented by a second transition half a bit
laterlater
�� A one bit does not have a second transitionA one bit does not have a second transition
1 0 1 1 0 0 0 1 1 0 1
Assumes prior to t=0 a high level was last asserted
Dacomun/J. CatalanDacomun/J. Catalan Line CodingLine Coding 2525
Phase encodingPhase encoding
��Delay modulation (Miller codes)Delay modulation (Miller codes)
�� A one bit is represented by a transition at halfA one bit is represented by a transition at half--bit bit positionposition
�� a zero bit does not have a transition at halfa zero bit does not have a transition at half--bitbit
�� A zero bit adjacent to a previous zero requires a A zero bit adjacent to a previous zero requires a transition at the start of the bit intervaltransition at the start of the bit interval
1 0 1 1 0 0 0 1 1 0 1
Assumes prior to t=0 a high level was last asserted
Dacomun/J. CatalanDacomun/J. Catalan Line CodingLine Coding 2626
Block codingBlock coding
�� Involves dividing the sequence of bits to be sent into Involves dividing the sequence of bits to be sent into groups of groups of mm bits and substituting bits and substituting nn--bit codes for each bit codes for each before using some line coding mechanismbefore using some line coding mechanism
��Used to improve line coding performance Used to improve line coding performance �� Provide additional transitions to ensure synchronizationProvide additional transitions to ensure synchronization
�� Provide bit patterns to eliminate or reduce the dc Provide bit patterns to eliminate or reduce the dc componentscomponents
�� Provide error detection ability (ie. Related to error Provide error detection ability (ie. Related to error control)control)
��Some common block codesSome common block codes�� 4B/5B, 8B/10B, 8B/6T, 5B/6B4B/5B, 8B/10B, 8B/6T, 5B/6B
��Other block coding terms include vector quantization, Other block coding terms include vector quantization, linear block codes, cyclic codes, BCH codeslinear block codes, cyclic codes, BCH codes
Dacomun/J. CatalanDacomun/J. Catalan Line CodingLine Coding 2727
Block codingBlock coding
��4b/5b4b/5b
Original 4-Bit Data New 5-Bit Code
0000 11110
0001 01001
0010 10100
0011 10101
0100 01010
0101 01011
0110 01110
0111 01111
1000 10010
1001 10011
1010 10110
1011 10111
1100 11010
1101 11011
1110 11100
1111 11101
Example
10110001 -> 1011101001
Dacomun/J. CatalanDacomun/J. Catalan Line CodingLine Coding 2828
Spectrum of line encoding schemesSpectrum of line encoding schemes
Dacomun/J. CatalanDacomun/J. Catalan Line CodingLine Coding 2929
BER of line encoding schemesBER of line encoding schemes
Dacomun/J. CatalanDacomun/J. Catalan Line CodingLine Coding 3030
Sample Manchester encoding circuitSample Manchester encoding circuit
Dacomun/J. CatalanDacomun/J. Catalan Line CodingLine Coding 3131
Sample Manchester encoding circuitSample Manchester encoding circuit
��Sample outputSample output
top related