EE 3760 chapter 7 - Seattle Pacific University

Download Report

Transcript EE 3760 chapter 7 - Seattle Pacific University

Line Coding
Sending Digital Data with Digital Signals
Based on Chapter 5 of William Stallings, Data and
Computer Communication
Kevin Bolding
Electrical Engineering
Seattle Pacific University
Seattle Pacific University
Digital Data Encoding
No. 1
Pulse Trains
Ideal
pulses
• Discrete - Takes on one of a finite number of voltages
levels
• Pulses - Ideally, square pulses with zero rise/fall time
• Limited by finite bandwidth of medium
• Approximated by a number of superimposed sine
waves
Each pulse takes the entire
Actual
Source: Stallings, Fig. 3.7
• Pulse Trains are sequences of discrete voltage
Seattle Pacific University
available bandwidth of
the transmission medium
Pulse Trains cannot (normally) be
combined in the same medium
Digital Data Encoding
No. 2
Line Coding – Sending Data using Pulse Trains
• Goals:
• Efficient
• bps maximized for given
SNR and bandwidth
• No DC component
• Signal never stuck at a
constant voltage
• Reality:
• Tradeoff efficiency for other
goals
• Requires either:
• Extra signal events
• Extra levels in signal
• Self-clocking
• Requires regular transitions
• Can recover clocking
information from the
data stream
• Error detection/recovery
• Correct data in the
presence of errors
in signal
• Similar to No DC
Component
• Requires extra data
• Subject of another
discussion
Seattle Pacific University
Digital Data Encoding
No. 3
Non Return to Zero (NRZ)
• NRZ
• Low or Neg Voltage --> binary ‘1’
• High or Pos Voltage --> binary ‘0’
• Multiple 0’s or 1’s in a row result
in DC voltage
• NRZI (invert ones)
• Transition (HL or LH)
means ‘1’
• Differential coding
• Easier to detect transitions
than levels
• Multiple 0’s in a row still result
in DC voltage
Seattle Pacific University
0 1 0 1 1 1 0 1 0 0 0 1 0 1
NRZ is sometimes used with
low to mean ‘0’ and high for ‘1’
0 1 0 1 1 1 0 1 0 0 0 1 0 1
NRZ:
Efficient
DC component
Hard to recover clock
Digital Data Encoding
No. 4
Multilevel Codes
0 1 0 1 1 1 0 1 0 0 0 1 0 1
• Bipolar AMI (Alternate Mark
Inversion)
• Three levels (-,0,+)
• Zero Voltage --> binary ‘0’
• +/- Voltage --> binary ‘1’
• 1’s must alternate polarity
• Takes three levels, but only one
bit per signal event
• Not as efficient as NRZ (needs
3-4dB higher SNR)
• Errors produce code violations
(consecutive 1’s of same
polarity)
• Pseudoternary
• Same thing, just switch 1’s
and 0’s
Seattle Pacific University
1’s alternate, but 0’s still can be flatlined
Bit Flip (1-> 0)
0 1 0 1 1 1 0 1 0 0 0 1 0 1
Code violation
0 1 0 1 1 1 0 1 0 0 0 1 0 1
Multilevel codes:
Needs 3-4dB higher SNR
Errors produce code violations
Only DC component is at zero
Digital Data Encoding
No. 5
Modified Multilevel Codes
• Bipolar AMI still has DC for
multiple zeros
• B-AMI has excess capacity (code
violations)
• Substitute a special code when
too many zeros in a row
0 1 0 1 0 0 0 0 0 0 0 0 0 0 1 0
Multiple zeroes - Flatline
• B8ZS
• If eight zeros in a row occur:
0 1 0 1 0 0 0 0 0 0 0 0 0 0 1 0
• If last ‘1’ was +, then
• 000+-0-+
Substituted block
• If last ‘1’ was -, then
• 000-+0+• Forces two code violations, so we
know it’s not 00011011
• One code violation might be a
regular error, but two is unlikely
Seattle Pacific University
Eight Zeros
Code violations
B8ZS:
Error detection
No sustained DC
Decent clock recovery
Needs 3dB higher SNR
Digital Data Encoding
No. 6
Manchester Codes
• Manchester – Works on Transitions
• Low-to-high --> ‘1’
• High-to-low --> ‘0’
• Consecutive 1’s or 0’s require a
0 1 0 1 1 1 0 1 0 0 0 1
Up to two transitions per bit
transition between bits
• Can be tricky to identify which
are the meaningful transitions
• Doubles the bandwidth
Manchester codes:
requirement
No DC component
Easy clock recovery
Error detection
Twice the bandwidth needed
Seattle Pacific University
Digital Data Encoding
No. 7
Line Coding Summary
Efficiency No DC
Self-clocking
Error detect
NRZ Maximum
Major DC
No
Needs extra
bits
NRZI Maximum
(differential)
Major DC
No
Needs extra
bits
Not for strings
of zeros
Bit-flip
invalid code
Yes, but not
trivial
Bit-flip
invalid code
Yes. >=1 edge
per bit
Bit-flip
miss transition
Bipolar Needs 3-4dB DC only at 0V
AMI extra SNR
B8ZS Needs 3-4dB No sustained
extra SNR
DC
Manch. Needs 2x
bandwidth
No DC
Seattle Pacific University
Digital Data Encoding
No. 8