Data Encoding

advertisement
Network Technology
CSE3020
Week 3
Network Technology CSE3020 - 2006
1
Data Encoding
Data and Signals:
 Digital data  digital signal (Encoding/Decoding)
 Digital data  analog signal (Modulation/Demodulation)
 Analog data  analog signal (Modulation /Demodulation)
 Analog data  digital signal (Digitization/Conversion)
Network Technology CSE3020 - 2006
2
Encoding Techniques
 Digital signal
–
–
–
–
Discrete and discontinuous voltage pulses.
Each pulse is a signal element.
Binary data encoded into signal elements.
Simplest case – one-to-one correspondence between bits and signal elements
 Unipolar
- All signal elements have same sign.
 Polar - One logic state represented by positive voltage the other
by negative voltage.
 Mark and Space - Binary 1 and Binary 0 respectively
Network Technology CSE3020 - 2006
3
Signaling/Modulation Rate
 Data rate - Rate of data transmission in bits per second.
 Signaling/Modulation rate
– Rate at which the signal elements are transmitted.
– Measured in baud = signal elements per second.
– For binary (2 level) signaling, bit rate = baud rate.
 Bit rate = Baud rate  Number of bits per signal element.
Network Technology CSE3020 - 2006
4
Interpreting Signals
• Need to know:
– Timing of bits/signals - when they start and end (synchronization)
– Signal levels
• Factors affecting successful interpreting of signals:
– Signal to noise ratio
– Data rate
– Bandwidth
• An increase in data rate increases bit error rate (BER).
• An increase in SNR decreases bit error rate.
• An increase in bandwidth allows an increase in data rate.
Network Technology CSE3020 - 2006
5
Properties of Encoding Schemes
 Signal Spectrum:
– No high frequency component (less bandwidth required for
transmission)
– No dc component (ac coupling via transformer provides
isolation).
– Concentrate power in the middle of the bandwidth (results in
less distortion of received signal).
 Clocking (Synchronization):
– External clock – separate clock lead to synchronize transmitter
and receiver (expensive).
–Synchronizing mechanism based on the transmitted signal.
Network Technology CSE3020 - 2006
6
Properties of Encoding Schemes
 Error detection: Can be built in to signal encoding, but
is responsibility of Data Link layer
 Signal interference and noise immunity.
• Cost and complexity:
– Higher signal rate to achieve a given data rate the
higher the costs
Network Technology CSE3020 - 2006
7
Encoding Schemes
 Nonreturn to Zero-Level (NRZ-L)
 Nonreturn to Zero Inverted (NRZI)
 Bipolar-Alternate Mark Inversion (Bipolar-AMI)
 Pseudoternary
 Manchester
 Differential Manchester
 Bipolar with 8-zeros substitution (B8ZS)
 High-density bipolar-3 zeros (HDB3)
Network Technology CSE3020 - 2006
8
Nonreturn to Zero-Level (NRZ-L)
 Two different voltages for 0 and 1 bits.
 Voltage constant during bit interval.
- no transition. i.e., no return to zero voltage during bit interval.
- e.g., absence of voltage for zero and positive voltage for one.
- more often, negative voltage for one and positive for zero.
 Pros: Easy to engineer, Make good use of bandwidth.
 Cons: dc component, Lack of synchronization capability.
 Used for magnetic recording, not often used for signal transmission.
Network Technology CSE3020 - 2006
9
Nonreturn to Zero Inverted
 Nonreturn to zero inverted on ones.
 Data encoded as presence or absence of signal transition
at beginning of bit time.
 Transition (low to high or high to low) denotes a
binary 1 and No transition denotes binary 0.
 An example of differential encoding.
- Data represented by changes rather than levels.
- More reliable detection of transition rather than level.
- In complex transmission layouts it is easy to lose sense of polarity.
Network Technology CSE3020 - 2006
10
Multilevel Binary
 Use more than two levels: Bipolar-AMI & Pseudoternary.
 Bipolar-AMI
– zero represented by no line signal.
– one represented by positive or negative pulse. The binary 1
pulses must alternate in parity
– no loss of sync if a long string of ones (zeros still a problem).
– no net dc component.
– lower bandwidth..
Network Technology CSE3020 - 2006
11
Multilevel Binary
 Bipolar-AMI
– error detection
• the pulse alternation property provides a simple means of
error detection
• Any isolated error, whether it deletes a pulse or adds a
pulse causes a violation of this property
Network Technology CSE3020 - 2006
12
Multilevel Binary
 Pseudoternary:
- One represented by absence of line signal.
- Zero represented by alternating positive and negative.
- No advantage or disadvantage over bipolar-AMI.
Network Technology CSE3020 - 2006
13
Trade Off for Multilevel Binary
 Not as efficient as NRZ
–
–
–
–
Each signal element only represents one bit.
A 3 level system could represent log23 = 1.58 bits.
Receiver must distinguish between three levels (+A, -A, 0).
Requires approximately 3dB more signal power for same
probability of bit error, that is the BER for NRZ codes, at given
S/N is less than that for multilevel binary (refer fig 5.4 Stallings
6E)
Network Technology CSE3020 - 2006
14
Biphase
 Overcome the limitations of NRZ.
 Manchester & Differential Manchester
 Manchester
– Transition in middle of each bit period, serves as
clock.
– Transition serves as data.
• Low to high represents one.
• High to low represents zero.
– Used by IEEE 802.3.
Network Technology CSE3020 - 2006
15
Biphase
 Differential Manchester
– 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.
– This is a differential encoding scheme.
– Used by IEEE 802.5.
Network Technology CSE3020 - 2006
16
Biphase
 Advantages:
– Synchronization on mid bit transition (self clocking)
– No dc component
– Error detection - Absence of expected transition
 Disadvantages:
– At least one transition per bit time and possibly two
– Maximum modulation rate is twice NRZ.
– Requires more bandwidth.
Network Technology CSE3020 - 2006
17
Scrambling
 Use scrambling to replace sequences that would produce
constant voltage.
 Filling sequence:
– Must produce enough transitions for synchronization.
– Must be recognized by receiver and replace with original.
– Same length as original.
 Design goals:
– No dc component.
– No long sequences of zero level line signal.
– No reduction in data rate.
– Error detection capability.
Network Technology CSE3020 - 2006
18
Scrambling
• Bipolar with 8-zeros substitution (B8ZS) and
High-density bipolar-3 zeros (HDB3)
Network Technology CSE3020 - 2006
19
Digital Modulation Techniques
 Digital data  analog signal
 Public telephone system
– Voice frequency range (300Hz to 3400Hz).
– Not suitable for digital signal.
– Use modem (modulator-demodulator).
 Basic modulation techniques:
– Amplitude shift keying (ASK)
– Phase shift keying (PSK)
– Frequency shift keying (FSK)
Network Technology CSE3020 - 2006
20
Amplitude Shift Keying
 Values represented by different amplitudes of carrier.
 Usually, one amplitude is zero.
–i.e., presence and absence of carrier is used.
 Susceptible to sudden gain changes.
 Inefficient.
 Up to 1200bps on voice grade lines.
 Used over optical fiber.
Network Technology CSE3020 - 2006
21
Frequency Shift Keying
 Values represented by different frequencies (near carrier).
 Less susceptible to error than ASK.
 Up to 1200bps on voice grade lines.
 High frequency radio.
 Even higher frequency on LANs using coaxial cable.
Network Technology CSE3020 - 2006
22
Phase Shift Keying
 Phase of carrier signal is shifted to represent data.
 Differential PSK:
– Phase shifted relative to previous transmission rather
than some reference signal.
Network Technology CSE3020 - 2006
23
Quadrature PSK (QPSK)
 More efficient use by each signal element representing
more than one bit (Each element represents two bits).
 Phase shifts of /2 (90o).
00
A sin(2ft)
01
A sin(2ft + 90o)
11
A sin(2ft + 180o)
10
A sin(2ft + 270o)
Network Technology CSE3020 - 2006
24
Quadrature PSK (QPSK)
Signal Constellation:
01
11
90o
decision boundary
00
A
10
Network Technology CSE3020 - 2006
25
Quadrature Amplitude
Modulation (QAM)
constellation
• ASK + PSK constellation
Network Technology CSE3020 - 2006
26
Performance of Digital to
Analog Modulation Schemes
 Bandwidth:
– ASK and PSK bandwidth directly related to bit rate.
– FSK bandwidth related to data rate for lower frequencies.
– At high frequencies, offset of modulated frequency (from
carrier to high frequency) determines the bandwidth.
 In the presence of noise, bit error rate of PSK and
QPSK are about 3dB superior to ASK and FSK.
Network Technology CSE3020 - 2006
27
Digitization
 Conversion of analog data into digital data
 Conversion of analog data into digital data.
 Digital data can then be transmitted:
- using encoding schemes (NRZ, AMI, etc.)
- using digital modulation (ASK, PSK, FSK, etc.)
 Analog to digital conversion done using a codec.
- Pulse code modulation (PCM)
- Delta modulation (DM)
Network Technology CSE3020 - 2006
28
Pulse Code Modulation(PCM)
 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.
 Voice data limited to below 4000Hz - Require 8000 sample per
second.
 Analog samples (PAM pulses).
 Quantizing - Each sample assigned digital value (16 levels means
4 bits per pulse).
 Quantizing error
- By quantizing the PAM Pulse, the original signal is now only
approximated and cannot be recovered exactly.
Network Technology CSE3020 - 2006
29
Pulse Code Modulation(PCM)
Network Technology CSE3020 - 2006
30
Pulse Code Modulation(PCM)
 With n bits encoding, there are 2n levels.
 Signal-to-noise (SNR) for quantizing error:
SNR = 6.02n + 1.76 dB
 8 bit sample gives 256 levels - quality comparable with
analog transmission.
 8000 samples per second of 8 bits gives 64kbps
data rate.
 Equally spaced level: Uniform Quantization
- same absolute error for each sample
- low amplitude values are relatively more distorted.
Network Technology CSE3020 - 2006
31
Nonuniform Quantization





Quantization levels not evenly spaced.
Greater number of quantizing steps for low amplitude
Small number of quantizing steps for large amplitude.
Reduces overall signal distortion
Can also be done by companding (compressing-expanding)
- compress strong signal
- Expand weak signal
- 24 to 30 dB improvement for voice signal
- Companded signal is then uniformly quantized.
Network Technology CSE3020 - 2006
32
Delta Modulation
 Reduce complexity of PCM at the expense of quality.
 Analog input is approximated by a staircase function.
 Move up or down one level () at each sample interval.
 Binary behavior: Function moves up or down at each
sample interval.
 Produces a stream of binary values for each sample.
Network Technology CSE3020 - 2006
33
Delta Modulation - example
Network Technology CSE3020 - 2006
34
Required Reading
• W. Stallings, “Data and Computer Communications
(6th or 7th edition),” Prentice-Hall.
>> Chapter 5
Network Technology CSE3020 - 2006
35
Download