Title: Chapter 5 Data Encoding
1Chapter 5Data Encoding
2Review
- Information Numeric Data, characters, voice,
pictures, codes or any massage that can be read
by and has meaning to human and machine.
3Review
- For transmission
- Information must be converted into binary first.
- ASCII table
- Unicode
- Information must be encoded into electromagnetic
signals. (Analog or digital)
4Review
- Digital Signal
- A digital signal is a sequence of discrete
discontinuous voltage pulses. - Each pulse is a signal element
- In its simplest form each signal element
represents a binary 0 or 1.
5Data Encoding
- Both analog and digital information can be
encoded as either analog or digital. (Function of
media and communication ) - Digital data, digital signal
- Digital data, analog signal
- Analog data, digital signal
- Analog data, analog signal
6Terminology (digital signal)
- Unipolar encoding If the signal elements all
have the same algebraic signs, all positive or
all negative, the signal is called unipolar. - Polar encoding One logical state is represented
by positive voltage and the other by the negative
voltage level.
7Terminology (digital signal)
- Data rate The rate in bits per second that the
data is transmitted. (R) - Bit duration The amount of time for one bit
transmission (1/R) - Modulation rate The rate at which the signal
level is changed. (baud rate, signal levels per
second)
8Terminology
- Encoding scheme The mapping from data bits to
signal elements - Spectrum The spectrum of a signal is the range
of frequencies that it contains. - Absolute bandwidth The width of the spectrum
- Effective bandwidth The are of the bandwidth
where most of the energy of the signal is
concentrated.
9Terminology
- DC (direct current)component A component of a
signal with the frequency of zero. - Example
- S(t)1(4/?)sin(2 ? ft) .
10Evaluation of Various Encoding Techniques
(affecting factors)
- Signal spectrum
- Lack of high frequency components means less
bandwidth required for transmission - DC component It is desirable to have no DC
component. (easier implementation) - Clocking The beginning and end of each bit
position must be determined. - Providing separate clocking information.
- Implementation of some other ways of
synchronization
11Evaluation of Various Encoding Techniques
(affecting factors)
- Error detection
- To detect errors more quickly, some error
detection techniques must be built into signaling
encoding methods. - Signal interference and noise immunity
- Some signal encoding techniques provide better
error rate (BER) than others - Cost and complexity
12Data Encoding
- Digital data, analog signal
- A modem converts digital data to analog data
- Amplitude shift keying (ASK)
- Frequency shift keying (FSK)
- Phase shift keying (PSK)
13Data Encoding
- Analog data, Digital signals
- Pulse code modulation (PCM)
- Samples analog data periodically
- Quantizing (limiting the possible values to
discrete set of values) the samples
14Data Encoding
- Digital data, digital signal
- Simplest form of digital encoding
- Two voltage level required
- It can be enhanced to improve performance.
15Digitalto-Digital Encoding Schemes
- Unipolar
- Uses only one level of voltage (almost obsolete)
- Polar
- Uses two level of voltage
- Bipolar
- Uses theree level of voltage
16Unipolar Encoding
- Presence and absence of a voltage level is used
for two binary digits. - The absence of voltage could represent zero.
- A constant positive voltage could represent 1.
17Unipolar
0
1
0
0
0
Time
18Unipolar Encoding Issues
- Synchronization A major issue
- Example For a bit rate of 1000 bps, the
receiving device must measure each bit for 0.005
s. - DC Component
- The average amplitude of a unipolar encoded
signal is not zero. - This creates a DC component ( a component with
zero frequency). - DC component can not travel through some media
that can not handle DC component
19Polar Encoding
- Polar encoding uses tow voltage levels (positive
and negative)
20Polar
NRZ
RZ
Biphase
Differential Manchester
NRZ-L
NRZ-I
Manchester
21Variation of Nonreturn to Zero (NRZ)
- NRZ-L, Nonreturn to Zero-level (polar)
- The level of the signal depends on the type of
the bit it represents (a positive voltage usually
represents bit 0 and negative voltage represents
the bit 1 (or vice versa) - The problem exist when receiver needs to
interpret long streams of 1 or zero. - Or NRZ-I (Nonreturn to Zero Invert on ones)
22Nonreturn to Zero-Level
Amplitude
1
1
1
0
1
0
0
0
Time
23Variation of Nonreturn to Zero (NRZ)
- NRZ-I (Nonreturn to Zero Invert on ones)
- An inversion of voltage level represents a 1 bit.
- The transition between a positive and negative
voltage represents a 1 not the voltage level
itself. - A 0 is represented by no change
- Still a string of zeros is a problem.
24Nonreturn to Zero, invert on ones
Amplitude
1
1
0
1
0
1
0
0
0
Time
25Nonreturn to Zero-Level Nonreturn to Zero, invert
on ones
Amplitude
0
1
0
0
1
1
1
0
Time
0
1
0
0
0
1
1
1
0
26Return to Zero
- One solution to synchronization issue of NRZ-L
and NRZ-I is using RZ (Return to Zero) encoding
schemes. - It uses three values positive, negative and
zero. - In RZ, the signal changes during each bit.
- A 1 bit is represented by positive-to zero and a
0 bit by negative-to-zero.
27Return to Zero
It requires two signal changes to encode one
bit. (uses more bandwidth)
0
1
0
0
1
1
1
Time
These transitions can be used for synchronization
28NRZ pros and cons
- 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
29Polar
NRZ
RZ
Biphase
Differential Manchester
NRZ-L
NRZ-I
Manchester
30Biphase Encoding
- The most popular encoding to deal with the
synchronization problem. - The signal changes at the middle of the bit
interval and continues to the opposite pole (dose
not return to zero). - Types of biphase encoding
- Manchester
- Differential Manchester
31Biphase Encoding
- Manchester Encoding
- The inversion at the middle of each bit is used
for both synchronization and bit representation - i.e. Transition serves as clock and data
- Low to high represents one
- High to low represents zero
- Used by IEEE 802.3
32Manchester Encoding
33Differential 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
34Biphase Encoding
- Differential Manchester
- Transition at the middle of bit interval is used
for clocking only. - Transition at the start of a bit period
represents zero. - No transition at start of a bit period represents
one. - Note this is a differential encoding scheme
- Used by IEEE 802.5.
35Differential Manchester Encoding
Presence of transition at the beginning of the
bit interval represents zero. Absence of
transition at the beginning of the bit interval
represents one.
36Biphase Pros and Cons
- Con
- At least one transition per bit time and possibly
two - Maximum modulation rate is twice NRZ
- Requires more bandwidth
- Pros
- Synchronization on mid bit transition (self
clocking) - No dc component
- Error detection
- Absence of expected transition
37Multilevel Binary
- Use more than two levels
- Bipolar-AMI (Alternate mark inversion)
- Pseudoternary (variation of Bipolar-AMI)
38Bipolar Encoding
- Uses there voltage levels
- Positive, negative, and zero
- Zero level represents binary 0
- Ones are represented by alternating positive and
negative voltages
39Types of Bipolar Encoding
- Bipolar Alternate Mark Inversion (AMI)
- Bipolar 8-zero substitution (B8ZS)
- High density bipolar 3 (HDB3)
40Types of Bipolar Encoding
41Bipolar Alternate Mark Inversion (AMI)
- Mark comes from telegraphy (meaning 1)
- Zero voltage represents zero
- Binary 1s are represented by alternating
positive and negative voltages
42Bipolar Alternate mark inversion (AMI)
43Bipolar-AMI and Pseudoternary
44Types of Bipolar Encoding
- Pros
- DC component is zero
- A long sequence of 1s is always synchronized.
- Lower bandwidth
- Easy error detection
- Cons
- No mechanism for synchronization of long string
of zeros
45Variation of AMI
- Bipolar 8-zero substitution (B8ZS)
- (implemented in US)
- High Density bipolar 3 (HDB3)
- (implemented in Europe)
- In both methods the original pattern is modified
in the case of multiple consecutive zeros.
46Bipolar 8-zero substitution (B8ZS)
- It works similar to BMI
- Whenever 8 or more consecutive zeros occurs,
signal level is forced to change.
47Pseudoternary
- One represented by absence of line signal
- Zero represented by alternating positive and
negative - No advantage or disadvantage over bipolar-AMI
48Trade Off for Multilevel Binary
- Not as efficient as NRZ
- Each signal element only represents one bit
- In a 3 level system could represent log23 1.58
bits - Receiver must distinguish between three levels
(A, -A, 0) - Requires approx. 3dB more signal power for same
probability of bit error
49Scrambling
- Use scrambling to replace sequences that would
produce constant voltage - Filling sequence
- Must produce enough transitions to sync
- Must be recognized by receiver and replace with
original - Same length as original
- No dc component
- No long sequences of zero level line signal
- No reduction in data rate
- Error detection capability
50B8ZS
- Bipolar With 8 Zeros Substitution
- Based on bipolar-AMI
- If octet of all zeros and last voltage pulse
preceding was positive encode as 000-0- - If octet of all zeros and last voltage pulse
preceding was negative encode as 000-0- - Causes two violations of AMI code
- Unlikely to occur as a result of noise
- Receiver detects and interprets as octet of all
zeros
51HDB3
- High Density Bipolar 3 Zeros
- Based on bipolar-AMI
- String of four zeros replaced with one or two
pulses
52B8ZS and HDB3
53Digital Data, Analog Signal
- Public telephone system
- 300Hz to 3400Hz
- Use modem (modulator-demodulator)
- Amplitude shift keying (ASK)
- Frequency shift keying (FSK)
- Phase shift keying (PK)
54Digital to Analog Encoding
55 56Amplitude 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
57Modulation Techniques (ASK)
Binary 1
Binary 0
58ASK
59Modulation Techniques(ASK)
60Frequency 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 co-ax
61Modulation Techniques (ASK)
Binary 1
Binary 0
f1 and f2 are offset from fc by equal but
opposite amount
62FSK on Voice Grade Line
63FSK
64Modulation Techniques(FSK)
65Phase Shift Keying
- Phase of carrier signal is shifted to represent
data - Differential PSK
- Phase shifted relative to previous transmission
rather than some reference signal
66Modulation Techniques (PSK)(Differential PSK)
Binary 1
Binary 0
The phase shift is is in reference to previous
bit transmitted Rather than to some constant
reference signal.
67PSK
68PSK Constellation
69Quadrature PSK
- More efficient use by each signal element
representing more than one bit - e.g. shifts of ?/2 (90o)
- Each element represents two bits
- Can use 8 phase angles and have more than one
amplitude - 9600bps modem use 12 angles , four of which have
two amplitudes
70Modulation Techniques (PSK)(Differential QPSK)
Binary 11
Binary 10
Binary 00
Binary 01
714-PSK
724-PSK Constellation
738-QAM Signal
748-PSK Constellation
75Have a great day . See you on Friday.
76PSK Bandwidth
774-QAM and 8-QAM Constellation
78Bandwidth for ASK
79Bandwidth for FSK
8016-QAM Constellation
81Bit Rate and Baud Rate
82Bit Rate and Baud Rate
83Modulation Techniques(FSK)
84Performance 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, but to offset of modulated frequency
from carrier at high frequencies - (See Stallings for math)
- In the presence of noise, bit error rate of PSK
and QPSK are about 3dB superior to ASK and FSK
85Analog Data, Digital Signal
- Digitization
- Conversion of analog data into digital data
- Digital data can then be transmitted using NRZ-L
- Digital data can then be transmitted using code
other than NRZ-L - Digital data can then be converted to analog
signal - Analog to digital conversion done using a codec
- Pulse code modulation
- Delta modulation
86Pulse Code Modulation(PCM) (1)
- 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 - (Proof - Stallings appendix 4A)
- Voice data limited to below 4000Hz
- Require 8000 sample per second
- Analog samples (Pulse Amplitude Modulation, PAM)
- Each sample assigned digital value
87Pulse Code Modulation(PCM) (2)
- 4 bit system gives 16 levels
- Quantized
- Quantizing error or noise
- Approximations mean it is impossible to recover
original exactly - 8 bit sample gives 256 levels
- Quality comparable with analog transmission
- 8000 samples per second of 8 bits each gives
64kbps
88Nonlinear Encoding
- Quantization levels not evenly spaced
- Reduces overall signal distortion
- Can also be done by companding
89Delta Modulation
- 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
90Delta Modulation - example
91Delta Modulation - Operation
92Delta Modulation - Performance
- Good voice reproduction
- PCM - 128 levels (7 bit)
- Voice bandwidth 4khz
- Should be 8000 x 7 56kbps for PCM
- Data compression can improve on this
- e.g. Interframe coding techniques for video
93Analog Data, Analog Signals
- Why modulate analog signals?
- Higher frequency can give more efficient
transmission - Permits frequency division multiplexing (chapter
8) - Types of modulation
- Amplitude
- Frequency
- Phase
94Analog Modulation
95Spread Spectrum
- Analog or digital data
- Analog signal
- Spread data over wide bandwidth
- Makes jamming and interception harder
- Frequency hoping
- Signal broadcast over seemingly random series of
frequencies - Direct Sequence
- Each bit is represented by multiple bits in
transmitted signal - Chipping code
96Required Reading
97Review
98Atmospheric and Extraterrestrial Noise
- Lightning It is a major source of noise, caused
by the static discharge of thunderclouds. - Several million volts
- Currents exceeding 20,000 amps.
- Solar Noise Ionized gases of the sun produces a
wide range of frequencies that penetrate the
Earths atmosphere. - Cosmic Noise Radiation of noise by distant stars
penetrating the Earths atmosphere.Long haul
telecommunications service (1500 km support
20,000 to 60,000 voice channels) - An alternative to fiber optic and coaxial cable
- Short point-to-point links between buildings
(closed-circuit TV or data link)