You are on page 1of 33

Lecture

Data Communication & Networks 06


Data Encoding Techniques

Muhammad Yousaf
Some Useful Terms:
Signal element:
Individual bits converted into signal (voltage pulse)
Unipolar signal:
All signal elements having same polarity
All positives or all negatives
Polar signal:
Some elements having +ve polarity & some having -ve
Data rate:
Bits per second
Modulation rate (Baud rate):
Signal elements per second
Differential Encoding:
Rather than sending actual data values, sending the changes in
consecutive data values
myousaf@ymail.com 2
Encoding Techniques:

Analog Data Analog Transmission

Digital Data Digital Transmission

myousaf@ymail.com 3
Digital-to-Digital Encoding:
Mapping of data bits onto the voltage levels
Many schemes for encoding digital data into digital
signal:
NRZ-L
NRZ-I
Bipolar-AMI
Pseudoternary
Manchester
Differential Manchester

myousaf@ymail.com 4
NRZ-L:
Nonreturn to zero-level
Most common and simplest scheme
Two different voltage levels for two states of a bit
Binary 0 = +ve voltage level (high)
Binary 1 = -ve voltage level (low)
Voltage remains constant for the duration of bit
length

myousaf@ymail.com 5
NRZ-I:
Nonreturn to zero-invert on one
Data is represented as transition on start of bit
Binary 0 = no transition
Binary 1 = transition (low to high / high to low)
Voltage remains constant for the duration of bit
length
It is an example of differential encoding schemes

myousaf@ymail.com 6
NRZ:

myousaf@ymail.com 7
Bipolar-AMI & Pseudoternary:
Bipolar-Alternate Mark Inversion:
Use more than two levels (+A, -A, 0)
Binary 0 = zero voltage level
Binary 1 = alternatively +A & -A
Pseudoternary:
Just opposite to Bipolar-AMI
Binary 0 = alternatively +A & -A
Binary 1 = zero voltage level

myousaf@ymail.com 8
Bipolar-AMI & Pseudoternary:

myousaf@ymail.com 9
Manchester & Differential Manchester:
Widely used in LANs
One bit is represented with two signal elements
Voltage doesn’t remain constant for the duration of bit length
Transition is must in the middle-of-bit
Manchester:
Binary 0 = transition from high to low level
Binary 1 = transition from low to high level
Used by IEEE 802.3 (Ethernet)
Differential Manchester:
Binary 0 = transition at start-of-bit
Binary 1 = no transition at start-of-bit
Used by IEEE 802.5 (Token ring)

myousaf@ymail.com 10
Manchester & Differential Manchester:

myousaf@ymail.com 11
Modulation Rate:
Number of signal elements per unit time

NRZ, NRZ-I:
1 Signal Elements per bit
Modulation Rate = Bit Rate

Manchester, Differential Manchester:


2 Signal Elements per bit
Modulation Rate = 2 x Bit Rate

myousaf@ymail.com 12
Digital-to-Analog:
Modem is used for this conversion
Modulation/Demodulation
Have a re-look at the simple sinusoid:
S(t) = A Cos(2 π f t + φ)
t is independent variable
A, f, φ can be varied
Amplitude shift keying (ASK)
Frequency shift keying (FSK)
Phase shift keying (PSK)
Quadrature PSK (QPSK)
myousaf@ymail.com 13
ASK, FSK, PSK:

myousaf@ymail.com 14
Amplitude Shift Keying:
Information is mapped into the signal with changes
in the amplitude levels
Two binary values are represented by two different
amplitude levels e.g. (A1, A2)
Binary 0 = A1 Cos(2 π f t + φ)
Binary 1 = A2 Cos(2 π f t + φ)
If one of the amplitudes is zero:
Binary 0 = Amplitude 0-volts
Binary 1 = Amplitude 10-volts
This is also called On-Off Keying

myousaf@ymail.com 15
Frequency Shift Keying:
Information is mapped into the signal with changes
in the frequency
Two binary values are represented by two different
frequencies e.g. (f1 =10KHz, f2=12KHz)
Binary 0 = A Cos(2 π f1 t + φ)
Binary 1 = A Cos(2 π f2 t + φ)

myousaf@ymail.com 16
Phase Shift Keying:
Information is mapped into the signal with changes
in the Phase
Two binary values are represented by two different
phases e.g. (φ1=0, φ2=π)
Binary 0 = A Cos(2 π f t + φ1)
Binary 1 = A Cos(2 π f t + φ2)

myousaf@ymail.com 17
Quadrature PSK:
More efficient form of PSK
One signal element can represent information of more than
one bits
e.g. using four phase values can represent 2-bits
(φ1=0o, φ2=90o, φ3=180o, φ4=270o)
Binary 11 = A Cos(2 π f t + φ1)
Binary 10 = A Cos(2 π f t + φ2)
Binary 00 = A Cos(2 π f t + φ3)
Binary 01 = A Cos(2 π f t + φ4)
Some implementations use 8 phase angles and also two
amplitude levels
So each signal element can represent information of four bits

myousaf@ymail.com 18
Analog-to-Analog:
Why modulate analog signals?
For transmission shift towards the higher frequencies
Higher bandwidth is available
Antenna size is inversely proportional to the frequency
Transmission in higher frequency requires smaller
antenna
Provides basis for Frequency Division Multiplexing

myousaf@ymail.com 19
Modulation:

•X(t) •m(t)=X(t)*A cos(2 π fc t)


•User information signal •Transmitted signal
•Analog / Digital signal •Analog signal
•Low frequency signal •Higher frequency signal
•Baseband signal •Passband signal
•Modulating signal •Modulated signal
•F(t) = A cos(2 π fc t)
•Carrier signal
•Analog signal
•Higher frequency signal

myousaf@ymail.com 20
Types of modulation:
m(t)=X(t)*A cos(2 π fc t + φ)

Amplitude modulation (AM)


Angle modulation
Frequency modulation (FM)
Phase modulation (PM)

myousaf@ymail.com 21
Amplitude Modulation:

myousaf@ymail.com 22
Frequency Modulation:

myousaf@ymail.com 23
Phase Modulation:

myousaf@ymail.com 24
Analog-to-Digital:
Digitization
Convert analog data into digital data
Then use digital encoding to form digital signal
Pulse code modulation (PCM)
Delta modulation (DM)

myousaf@ymail.com 25
Pulse Code Modulation:
Consists of two steps:
Sampling
Discretize along horizontal axis
Sampling Theorem:
Number of samples per second should be greater than or equal to twice
the highest frequency component of the analog signal
fs >= 2 * fmax

Quantization
Discretize along vertical axis

myousaf@ymail.com 26
Sampling:

1/8000 second

Time (sec)

fmax = 4000 Hz
Sampling rate (fs) = 8000 samples/sec
Sampling period (Ts) = 1/8000 sec

myousaf@ymail.com 27
Quantization: 1bit/sample

+2.5 v = 1

-2.5 v = 0

Mapping to bits: 1 1 1 1 1 1 0 0 0 0 1 1 1

myousaf@ymail.com 28
Quantization: 2bits/sample

+3.75 v = 11

+1.25 v = 10

-1.25 v = 01

-3.75 v = 00

Mapping to bits: 11 11 10 11 11 11 01 01 01 01 10 10 11

myousaf@ymail.com 29
PCM: cont…
Greater the number of samples, better will be the
quality
Telephony quality = 8000 samples/sec
CD quality = 44100 samples/sec
Greater the number of quantization levels, better
will be the quality
128 quantization levels = 7-bits/sample = 56Kbps
256 quantization levels = 8-bits/sample = 64Kbps
Better quality demands more storage, processing
power, data rate, bandwidth

myousaf@ymail.com 30
Delta 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
Requires 1-bit/sample
Data rate for DM = 8Kbps
Data rate for 128-PCM = 56Kbps

myousaf@ymail.com 31
Delta Modulation: cont…

myousaf@ymail.com 32
Questions ???

myousaf@ymail.com 33

You might also like