You are on page 1of 253

ECE 393

DIGITAL
COMMUNICATIONS

DIGITAL TRANSMISSION
Digital Transmission is the transmittal of
digital pulses between two points in a
communication system. The original source
information may be in digital form, or
analog signals that must be converted to
digital from prior to transmission and
converted back to analog form by means of
a DAC at the receiving end.

Simplified Digital Transmission


System

Advantages of Digital
Transmission
Noise Immunity
Digital pulses are better suited for processing and
multiplexing.
Digital pulses can easily be stored.
Transmission rate of digital system can easily be
changed to adapt to different environments and to
interface with different types of equipment.
Digital systems use signal regeneration rather than
signal amplification.
Digital signals are easier to measure and evaluate.
Digital systems are better suited to evaluate error
performance.

Disadvantages of Digital
Transmission
Transmission of digital signals requires more
bandwidth than transmitting analog signals.
Complicated equipments required.
Digital transmission requires precise time
synchronization between transmitter and
receiver clocks.
Compatibility with analog facilities.

Digital Radio
Is the transmittal of digitally modulated
analog carriers between two or more
points in a communication system. The
modulating input signal and the
demodulated output signal are digital
pulses.

Simplified Digital Radio System

Shannon Limit for Information


Capacity
Information capacity is the number of
independent symbols that can be carried
through the system in a given unit of time.
The most basic symbol is the binary digit
(bit).
Information capacity is often expressed in
terms of bits per second (bps)

Shannon Limit for Information


Capacity
IBT

S
I B log 2 1
N

where: I = information capacity (bits per second)


B = bandwidth (hertz)
T = transmission time (seconds)
S/N = signal-to-noise ratio (unitless)

Methods of converting
information into pulse form:
PWM (Pulse Width Modulation) This method is also
called the Pulse Duration Modulation. The pulse width
is proportional to the amplitude of the analog signal.
PPM (Pulse Position Modulation) The position of a
constant width pulse within a prescribed time slot is
varied according to the amplitude of the signal.
PAM (Pulse Amplitude Modulation) The amplitude of
a constant width, constant position pulse is varied
according to the amplitude of the analog signal.
PCM (Pulse Code Modulation) The analog signal is
sampled and converted to a fixed length, serial binary
number for transmission.

Analog Signal

Sample Pulses
PWM
PPM
PAM
PCM

Pulse Amplitude Modulation


A form of signal modulation where the
message information is encoded in the
amplitude of a series of signal pulses.
Generates a series of pulses based on the
results of sampling.
First step to A-D encoding

Pulse Code Modulation


The only digitally encoded pulse
modulation technique that is used in
digital systems
Pulses are fixed length, and fixed
amplitude. The pulse or lack of a pulse
represent a binary 1 or 0.

Pulse Code Modulation


Made up of four separate processes:

PAM
QUANTIZATION
BINARY ENCODING
DIGITAL TO DIGITAL ENCODING

From Analog signal to PCM


digital code

Simplified Block Diagram of a


Simplex PCM System

Sampling Rate
The minimum sampling rate of a PCM
system:

fs 2 fa
Where: fs = minimum Nyquist sampling rate (Hertz)
fa = highest frequency to be sampled (Hertz)

If fs < 2fa, distortion known as Aliasing


or foldover distortion results.

PCM Codes
The codes currently used for PCM are sign-magnitude
codes, where the most significant bit is the sign bit and
the remaining bits are used for magnitude.

Analog input signal

Sample Pulse

PAM signal

PCM Code

With the same analog signal


sampled at a faster rate:

Quantization Error (Qe)


Error resulting at the receiving end when
the magnitude of a sample was rounded
off to the nearest valid code.
Maximum Quantization Error = VLSB / 2
Where: VLSB = Voltage of the minimum step size.

Dynamic Range
Is the ratio of the largest possible magnitude
to the smallest possible magnitude that can
be decoded by the DAC.
Vmax
Vmax
DR

Vmin resolution

Vmax
DR in dB 20 log
Vmin

Dynamic Range vs. No. PCM code bits

2 1 DR
n

Where: n = number of PCM bits, excluding sign bit


DR = absolute value of Dynamic Range
For a minimum value of n:

2 1 DR
n

Dynamic Range vs. No of PCM bits.

Example
A PCM system has the following parameters: a
maximum analog input frequency of 4kHz, a
maximum decoded voltage at the receiver of
2.55V, and a minimum dynamic range of 46 dB.
Determine the following: Minimum sampling
rate, minimum number of bits used in the PCM
code, resolution, and quantization error.

Coding Efficiency
This is a numerical indication of how efficiently
a PCM code is utilized. This is the ratio of the
minimum number of bits required to achieve a
certain dynamic range to the actual number of
PCM bits used.
Coding efficiency =

Minimum number of bits


Actual number of bits
(including the sign bit)

x 100%

Linear vs. Non Linear PCM Codes


Linear Codes

The magnitude change between any two


successive steps is uniform.
The accuracy (resolution) for the higher
amplitude signals is the same as for the lower
amplitude signals. Hence, the quantization
error is the same for all amplitude.

Linear vs. Non Linear PCM Codes


Non Linear Codes

The step size increases with the amplitude of


the input signal.
There are more codes available for lower
amplitude signals and fewer codes available
for higher amplitude signals which would
increase the quantization error for largeramplitude signals.

Linear Encoding

Non Linear Encoding

Companding
Is the process of compressing, then
expanding.
Higher-amplitude analog signals are
compressed prior to transmission, then
expanded at the receiver.

+30 dB

50 dB Dynamic range

+20 dB

+10 dB

25 dB compressed
dynamic range
+15 dB
+10 dB

+20 dB

+10 dB

0 dB

+5 dB
0 dB

0 dB

10 dB

5 dB
10 dB

10 dB

15 dB
20 dB

20 dB

30 dB

30 dB

50 dB Dynamic range

+30 dB

Analog Companding

- law Companding
Compression characteristic for -law:
Vout

Vin

Vmax ln 1

V
max

ln 1

Where: Vmax = maximum uncompressed analog input amplitude (volts)


Vin = amplitude of the input signal at a particular instant of
time (volts)
= parameter used to define the amount of compression (unitless)
Vout = compressed output amplitude (volts)

-law compression characteristics

Example
For a compressor with a = 255,
determine:
(a) The voltage gain for the following
relative values of Vin , Vmax , 0.75Vmax ,
0.5Vmax , and 0.25Vmax .
(b) The compressed output voltage for a
maximum input voltage of 4V.
(c) Input and output dynamic ranges and
compression.

Digital Companding
Involves compression at the transmit end after
the input sample has been converted to a linear
PCM code and expansion at the receive end
prior to PCM system.
The analog signal is first sampled and converted
to a linear code, then the linear code is digitally
compressed. At the receive end, the compressed
PCM code is received, expanded, then decoded.

-255 compression characteristics


(positive values only)

12-bit to 8-bit digital companding


8-bit 255 compressed code format

255 Encoding table

255 Decoding table

Example
Determine the 12-bit linear code, the 8-bit
compressed code, and the recovered 12-bit
code for a resolution of 0.01V and analog
sample voltages of:
(a) 0.05V
(b) 0.32V
(c) 10.23V

Delta Modulation PCM


Uses a single-bit PCM code to achieve
digital transmission of analog signals.
Only a single bit is transmitted which
indicates whether that sample is larger or
smaller than the previous sample. If the
current sample is smaller than the
previous sample, a logic 0 is transmitted.
Otherwise, a logic 1 is transmitted.

Delta Modulation Transmitter

Ideal Operation of a Delta


Modulation Encoder

Delta Modulation Receiver

Slope overload
This happens when the slope of the analog
signal is greater than the delta modulator
can maintain.
Remedies:

Increasing the clock frequency


Increase the magnitude of the minimum step
size.

Slope overload Distortion

Granular Noise
Analogous to quantization noise in PCM.
Results when the original analog input
signal has a relatively constant amplitude
and the reconstructed signal has variations
that were not present in the original signal.
Remedy:

Decrease the step size.

Granular Noise

Adaptive Delta Modulation


A type of delta modulation system where the step
size of the DAC is automatically varied depending
on the amplitude characteristics of the analog input
signal.
When a long string of 1s or 0s occur, the slope of
the DAC output is less that the slope of the analog
signal in either positive or negative direction and the
DAC has lost track of the input. With Adaptive
Delta Modulator, after a predetermined number of
1s or 0s, the step size is automatically adjusted.

Adaptive Delta Modulation

Differential PCM
Is designed specifically to take advantage
of the sample-to-sample redundancies in
typical speech waveforms.
In DPCM, the difference in the amplitude
of two successive samples is transmitted
rather than the actual sample.

DPCM Transmitter

DPCM Receiver

Signal Power in Binary Digital


Signals

/ T < 0.5

V
t

T = 2

/ T = 0.5

Signal Power in Binary Digital


Signals
T /2

1
2

P lim
f (t ) dt

T x T
T / 2

(normalized)

where T is the period of integration. If f(t) is a periodic


signal with period TO, then:

1
P
TO

TO / 2

v(t )

TO / 2

dt

Signal Power in Binary Digital


Signals
If rectangular pulses of amplitude V with a /T
ratio of 0.5 begin at t = 0, then
V
v(t )
0

Thus,

1
P
TO

0 t
t T

1 2 T 2
0 V dt 2TO V t 0 TO V

V

P
T R

Signal Power in Binary Digital


Signals
P

VRMS
R

VRMS

V
T

with / T = 0.5, therefore:

V2
P
2R

VRMS

Encoding
Transformation of Information into signals
*** We must encode data into signals to send
them from one place to another.
*** How information is encoded depends on
its original format.
*** The signal must further be manipulated so
that it contains identifiable changes that are
recognizable to the sender and receiver as
representing the information needed/

Data
Is a representation of facts,
concepts, or instructions in a
formalized manner suitable for
communication.
*** Data do not necessarily
represent something physical in
terms of the measurable word
but it must be used for
producing information.

Information
The meaning that is
currently assigned to data
by means of conventions
applied to those data.
*** It is produced when
data is interpreted.

Information
2 types of INFORMATION:

Digital Information
Analog Information

2 types of SIGNALS:

Digital Signals
Analog Signals

4 Possible type of ENCODING


Digital Information to Digital Signal
Analog Information to Digital Signal
Digital Information to Analog Signal
Analog Information to Analog Signal

Digital to Analog Encoding


(DIGITAL MODULATION)
Representation of digital information by
an analog signal.

Digital Amplitude Modulation


or On-off keying (OOK)
The simplest digital modulation technique.
Mathematically:

v am t 1 v m t cos c t
2

where: vam(t) = digital amplitude-modulated wave.


A/2 = unmodulated carrier amplitude (volts)
vm(t) = modulating binary signal (volts)
c = carrier radian frequency (rad/sec)

Digital Amplitude Modulation


or On-off keying (OOK)
Input

For logic 1, vm(t) = +1V


A

vam t 1 1 cos c t
2

vam t A cos c t

OOK output

For logic 0, vm(t) = 1V


A

vam t 1 1 cos c t
2

vam t 0

Digital Amplitude Modulation


or On-off keying (OOK)
Advantage : Low-cost type of digital radio is
used.
Disadvantage: Low-quality and is seldom
used in high-capacity,
high-performance
communication systems.

Amplitude Shift Keying (ASK)


The strength of signal is varied to
represent binary 1 or 0.

Bit Rate vs. Baud Rate


Bit Rate (fb) rate of change at the input
to the modulator.
Baud Rate rate of change at the output
of the modulator named after J.M.E.
Baudot.
Modulator

Bandwidth Requirements for


ASK
BW = (1 + d) NBAUD
Where: d a constant associated with the type of
encoding. For ASK, d = 0.
BW Bandwidth (hertz)
NBAUD Baud rate (bauds/sec.)
For ASK, the Bit Rate is equal to the Baud Rate

Relationship between Baud rate


and Bandwidth in ASK

Example
Given a bandwidth of 10kHz. (1kHz. to 11kHz.),
draw the full duplex ASK diagram of the system.
Find the carriers and the bandwidths in each
direction. Assume there is no gap between the
bands in two direction.
For Full Duplex transmission ASK, the bandwidth
for each direction is:
BW = 10kHz. / 2 = 5 kHz.

The carrier frequencies can be chosen at the middle


of each band:

fc(backward) = 1kHz. + 5kHz./2 = 3.5kHz.


fc(forward) = 11kHz. 5kHz./2 = 8.5kHz.

Frequency Shift Keying


(FSK)
Is a form of constant-amplitude angle
modulation with a binary modulating
signal that varies between two discrete
voltage levels.
Frequency is varied to represent binary 1
or 0.

Frequency Shift Keying


(FSK)

Frequency Shift Keying


(FSK)
v fsk t Vc cos 2 f c vm t f t
where: vfsk(t) = binary FSK waveform
Vc = peak carrier amplitude (volts)
fc = carrier frequency (hertz)
f = peak frequency deviation
vm(t) = binary input modulating signal ( 1)
For Logic 1 input:
For Logic 0 input:

v fsk t Vc cos 2 f c f t
v fsk t Vc cos 2 f c f t

Frequency Shift Keying


(FSK)

fm = mark frequency = (fc + f)


fs = space frequency = (fc f)

Bandwidth Requirements for


FSK
f

fm fs
2

BW 2 f f b

where: f = peak frequency deviation (hertz)


fm = mark frequency
fs = space frequency
fb = bit rate (bps)
BW = Bandwidth (hertz)
For FSK, the Bit Rate is equal to the Baud Rate

Examples
Find the bandwidth for an FSK signal transmitting at
2kbps. Transmission is in half-duplex mode and the
carriers must be separated by 3 kHz.
Find the maximum bit rate for an FSK signal if the
bandwidth of the medium is 12 kHz. and the distance
between the two carriers must be at least 2 kHz.
Transmission is in half duplex mode.
Determine (a) the peak frequency deviation, (b) the
minimum bandwidth, and (c) baud rate for an FSK signal
with a mark frequency of of 49 kHz., and a space
frequency of 51 kHz, and an input bit rate of 2kbps.

FSK Receiver
Non Coherent demodulator

Coherent FSK demodulator

Continuous-Phase Frequency
Shift Keying (CP-FSK)
The mark and space frequencies are
selected such that they are separated from
the center frequency by an exact odd
multiple of one-half the bit rate.

fm

fb
and f s n

where: n = any odd integer

Noncontinuous FSK vs.


Continuous FSK waveform
Noncontinuous FSK waveform

Continuous FSK waveform

Phase Shift Keying (PSK)


Is another form of angle-modulated, constant
amplitude signal modulation.
The phase is varied to represent a bit or group of
bits.

Phase Shift Keying (PSK)


Binary Phase Shift Keying
(BPSK or 2-PSK)
Quaternary Phase Shift Keying
(QPSK or 4-PSK)
Eight-Phase PSK (8-PSK)
Sixteen-Phase PSK (16-PSK)

Binary Phase Shift Keying


(BPSK)
Two output phases are possible for a single
carrier frequency. One output phase
represents a logic 1, and the other a logic
0.
The phase of the output carrier shifts
between two angles that are 180O out of
phase.
Also called Phase Reversal Keying.

BPSK Transmitter

Truth Table, Phasor Diagram, and


Constellation Diagram for BPSK

Output Phase-versus-time
relationship for BPSK

Quaternary Phase Shift Keying


(QPSK)
Four output phases are possible for a single
carrier frequency.
With QPSK, binary input data are combined
into groups of two called the dibit.
Each dibit code generates one of the four
possible output phases, therefore, for each twodibit clocked into modulator, a single output
change occurs. Therefore, the rate of change at
the output (baud rate) is one-half the bitrate.

QPSK Transmitter

Truth Table, Phasor Diagram, and


Constellation Diagram for QPSK

Output Phase-versus-time
relationship for QPSK

Eight-Phase PSK
There are eight possible output phases.
The incoming bits are considered in
groups of three bits called tribits.

8-PSK Transmitter

Truth Table and Constellation


Diagram for 8-PSK

Phasor Diagram for 8-PSK

Output phase-versus-time
relationship for 8-PSK

Quadrature Amplitude
Modulation (QAM)
Is a form of digital modulation where the
digital information is contained in both
amplitude and phase of the transmitted
carrier.
Types:
(a) 8-QAM
(b) 16-QAM
(c) 32-QAM
(d) 64-QAM

8-QAM Transmitter

Truth table and Phasor Diagram


for 8-QAM

Constellation Diagram for


8-QAM

Output phase and amplitude-versustime relationship for 8-QAM

16-QAM Transmitter

Truth table and Phasor Diagram


for 16-QAM

Constellation Diagram for


16-QAM

Digital Modulation Summary

Bandwidth Efficiency
transmission rate (bps)
Bandwidth Efficiency =
minimum bandwidth (Hz.)
For a transmission rate of 10 Mbps:

10 Mbps 1bps 1bit

10 MHz
Hz
cycle
10 Mbps 2bps 2bits
QPSK: Bandwidth Efficiency =

5MHz
Hz
cycle
BPSK: Bandwidth Efficiency =

10Mbps 3bps 3bits

3.33MHz
Hz
cycle
10 Mbps 4bps 4bits

16-QAM: Bandwidth Efficiency =


2.5MHz
Hz
cycle
8-PSK: Bandwidth Efficiency =

Probability of Error P(e) and


Bit Error Rate (BER)
P(e) is a theoretical (mathematical)
expectation of the bit error rate of a
system.
BER is an empirical (historical) record of
a systems actual bit error performance.
A bit error rate is measured and
compared with the expected probability of
error to evaluate a systems performance

Digital to Digital Encoding


(Line Coding)
Representation of digital information
by a digital signal.
The binary 1s and 0s generated by a
computer are translated into a
sequence of voltage pulses that can be
propagated through a wire.

Line Coding Schemes


01011101

Digital/Digital
Encoding

UNIPOLAR ENCODING
One of the two binary states is represented
by a voltage level (usually 1) and the other
is represented by a zero voltage or an idle
line (usually 0)
Amplitude

0
Time

UNIPOLAR ENCODING
Advantage of UNIPOLAR Encoding:
Simplicity
Disadvantages of UNIPOLAR Encoding:
It cannot travel through media that cannot
handle DC components such as microwaves and
transformers (Average amplitude is not zero).
Synchronization problem whenever the data
stream includes a long uninterrupted series of 1s
and 0s (Depends on timers).

Synchronization Problem
For a rate of 1kbps, the receiver reads one
bit per 0.001 s.
Propagation delays distort the timing of
the signal such that five 1s can be
stretched to 0.006 seconds causing an
extra bit to be read by the receiver. That
extra bit causes everything after that bit to
be read erroneously

Synchronization Problem
0 1 1 1 1 1 0 1 0 1 0 0 0 1 0

0.006 s
0.001 s

Original Data : 01111101010001


Erroneous Data : 011111101010001

POLAR ENCODING
Uses two voltage levels (+, )
Average DC Component is zero.

Non Return to Zero (NRZ)


Signal is always either positive or negative
Idle line means no transmission

NRZ-L Non return to Zero Level


Level of the signal represents the bit
NRZ-I Non Return to Zero Invert
An inversion of the voltage level represents a 1. It is
the transition that represent a bit, voltage level per
se are meaningless.

Return to Zero (RZ)


Uses three values (+, , and 0 voltage levels)
The signal changes not between bits but during
each bit.

1 represented by positive to zero level


0 represented by negative to zero level.

Disadvantage is that it requires two signal


changes to encode 1 bit therefore requiring more
bandwidth.

BIPHASE ENCODING
The signal changes at the middle of the bit
interval but do not return to zero, it
continues to the opposite pole instead.
Two Types:

Manchester
Differential Manchester

BIPHASE ENCODING
MANCHESTER inversion at the middle of each bit
interval is used for both synchronization and bit
representation. 1 represented by a to + transition
and vice versa to represent a 0.
DIFFERENTIAL MANCHESTER inversion at the
middle if the bit interval is used for synchronization
but the presence or absence of transition at the
beginning of the interval is used to identify a bit. 0 is
represented by a presence of transition at the
beginning of the bit and 1 if otherwise.

Manchester Encoding

Differential Manchester
Encoding

BIPOLAR ENCODING
Uses three voltage levels (+, , and 0)
0 is represented by a zero level
1 is represented by + and alternately.
Three Types:

Bipolar Alternate Mark Inversion (AMI)


Bipolar 8 Zero Substitution (B8ZS)
High Density Bipolar 3 (HDB3)

Bipolar AMI
Mark mean 1 and Space mean 0.

+
0

0 1 0 0 1 1 1 0

Bipolar 8-Zero Substitution


(B8ZS)
Adopted in North America to provide
synchronization of long string of 0s.
*** Whenever 8 or more consecutive zeros are encountered
in data stream, synchronization is lost.
Remedy: Force artificial changes called violations within
the string of 0s. Anytime 8 zeros occur in succession,
B8ZS introduces changes in the pattern based on the
polarity of the previous 1.

Violations in B8ZS
If the 1 before the long string of 0s is +
+ 0 0 0 0 0 0 0 0

+ 0 0 0 +

Violations in B8ZS
If the 1 before the long string of 0s is

0 0 0 0 0 0 0 0

0 0 0

+ 0 +

B8ZS Encoding

High Density Bipolar 3


(HDB3)
Adopted in Europe and Japan
Looks at the number of 1s that have
occurred in the bit stream since the
last substitution

Violations in HDB3
When the number of 1s since last
substitution is odd:
+ 0 0 0 0

0 0 0 0

+ 0 0 0 +

0 0 0

Violations in HDB3
When the number of 1s since last
substitution is even:
+ 0 0 0 0

0 0

0 0 0 0

+ 0 0 +

HDB3 Encoding

Other Line Coding Schemes


2B1Q (Two Binary, One Quaternary). Uses
four voltage levels, each pulse can represent 2
bits, making each pulse more efficient.
MLT-3 (Multiline transmission, three level).
Is very similar to NRZ-I but uses three levels
of signals (+1, 0, and 1). The signal
transitions from one level to the next at the
beginning of a 1 bit and no transition at the
beginning of a 0 bit.

2B1Q

MLT-3

Block Coding
Block Coding was introduced to improve
the performance of line coding.
Block Coding also addresses the problem
of synchronization and error detection.

Steps in Transforming Block


Codes
STEP 1: Division the sequence of bits is
divided into groups of m bits.
STEP 2: Substitution m-bit code is
substituted for an n-bit group.
STEP 3: Line Coding

Substitution in Block Coding

Some Common Block Codes


4B/5B
4 bits of data is encoded into a 5-bit code
in such a way that each code contains no
more than one leading 0 and no more than
two trailing 0s. Therefore, when these 5bit codes are sent in sequence, no more
than three consecutive 0s are encountered.

4B/5B Encoding

4B/5B NRZ-I

4B/5B MLT-3

Some Common Block Codes


8B/10B
Similar to 4B/5B except that a group of 8
bits of data is substituted by a 10-bit code.
This provides more error detection
capability than 4B/5B.
28 = 256 possible combination (data)
210 = 1024 available codes

Some Common Block Codes


8B/6T
4B/5B and 8B/10B provides good
synchronization and error detection but
the required bandwidth is increased since
extra bits are transmitted.
8B/6T (8 binary/6 ternary) encoding is
designed to substitute 8 bits with a 6
symbol code

Some Common Block Codes


8B/6T

8B/6T Encoding Table (portion)

8B/6T
1

From Table

+1

+1

Data Communications
Network of computers and computer
peripherals used to transmit or receive
information between two or more locations.
Data Communications Code
Are used to represent characters and symbols
such as letters, digits, punctuation marks, etc.

Data Communications Code


Baudot Code
5- bit character code used by teletype
machines or teletype printers
developed by Thomas Murray and named
after Emile Baudot
also called International Alphabet No.2

ASCII Code
American Standard Code for Information
Interchange
7-bit binary code used for encoding characters
and symbols and is the most common data
communications code
Also called International Alphabet number 5

Error Detection and Correction


Error detection is the ability to detect the
presence of errors caused by noise or other
impairments during transmission from the
transmitter to the receiver.
Error correction is the additional ability to
reconstruct the original, error-free data.
This is implemented either at the Data Link
Layer or the Transport Layer of the OSI Data
Communications model.

Two basic ways to design the channel code


and protocol for an error correcting
system:

Automatic Repeat Request (ARQ)


Forward Error Correction (FEC)

Automatic Request (ARQ)


The transmitter sends the data and also an error
detection code, which the receiver uses to check
for errors, and request retransmission of
erroneous data. In many cases, the request is
implicit; the receiver sends an acknowledgement
(ACK) of correctly received data, and the
transmitter re-sends anything not acknowledged
within a reasonable period of time.

Forward Error Correction


(FEC)
The transmitter encodes the data with an errorcorrecting code and sends the coded message.
The receiver never sends any messages back to
the transmitter. The receiver decodes what it
receives into the "most likely" data. The codes
are designed so that it would take an
"unreasonable" amount of noise to trick the
receiver into misinterpreting the data.

OSI (Open Systems


Interconnection) Network Model

Functions of the Data Link


Layer

Single Bit Error


Note:
In a single-bit error, only one bit in the
data unit has changed.

Burst Error

Note:
A burst error means that 2 or more bits
in the data unit have changed.

Burst Error

Redundancy
Note:
Error detection uses the concept of
redundancy, which means adding
extra bits for detecting errors at the
destination.

Redundancy

Methods of Error Detection

Parity Check
Note:
In parity check, a parity bit is added to
every data unit so that the total
number of 1s is even
(or odd for odd-parity).

Even Parity Concept

Parity Check
Note:
Simple parity check can detect all
single-bit errors. It can detect burst
errors only if the total number of
errors in each data unit is odd.

Example
Supposethesenderwantstosendthewordworld.In
ASCIIthefivecharactersarecodedas
1110111 1101111 1110010 1101100 1100100
Thefollowingshowstheactualbitssent
1110111011011110111001001101100011001001

Example
NowsupposethewordworldinExample1isreceivedby
thereceiverwithoutbeingcorruptedintransmission.
11101110110111101110010011011000
11001001
Thereceivercountsthe1sineachcharacterandcomesup
withevennumbers(6,6,4,4,4).Thedataareaccepted.

Example
NowsupposethewordworldinExample1iscorrupted
duringtransmission.
11111110110111101110110011011000
11001001
Thereceivercountsthe1sineachcharacterandcomesup
withevenandoddnumbers(7,6,5,4,4).Thereceiver
knowsthatthedataarecorrupted,discardsthem,andasks
forretransmission.

Two-dimensional Parity Check


Note:
In two-dimensional parity check, a
block of bits is divided into rows and a
redundant row of bits is added to the
whole block.

Two-dimensional Parity Check

Example
Supposethefollowingblockissent:
1010100100111001110111011110011110101010

However,itishitbyaburstnoiseoflength8,andsomebits
arecorrupted.
1010001110001001110111011110011110101010

Whenthereceivercheckstheparitybits,someofthebitsdo
notfollowtheevenparityruleandthewholeblockis

Cyclic Redundancy Check


(CRC)
Most powerful method of error detection.
Uses Modulo-2 Arithmetic (Binary
Division)
Is where group of bits, called the CRC, are
added to your data prior to transmission
for the purpose of detecting errors.

Polynomials
The CRC process can now be described as:
G ( x)
R( x)
Q( x)
P( x)
P( x)

Tx G ( x) R ( x)
***An error E(x) will only be undetectable if
it is divisible by P(x)

CRC Standard Polynomials


CRC 8 : x8 + x2 + x + 1
CRC 10 : x10 + x9 + x5 + x4 + x 2 + 1
ITU 16 : x16 + x12 + x5 + 1
ITU 32 : x32 + x26 + x23 + x22 + x16 + x12 +

x11 + x10 + x8 + x7 + x5 + x4 + x2 +

x+1

CRC Generator and Checker

Steps in Deriving the CRC


1) Append n# of zeros to your data
The number of zeros to be appended is
equal to the highest exponent of the CRC
polynomial, P(x).
2) Divide the newly appended data to the CRC
polynomial.
The remainder is the CRC

Error Detection in CRC


1) At the receiver, the received data is divided by the
same CRC polynomial, P(x)
If the remainder is equal to zero, the receiver
concludes that the received data is free of errors
If the remainder is non-zero, the receiver
concludes that the received data have errors
CRC can detect that error have occurred but can
not detect or identify which bit is in error.

Binary Division in CRC


Generator

Binary Division in CRC Checker

CRC as a Dividing Circuit


Shift Registers- one bit storage device
XOR logic gates
555 timer- for synchronization
Power supply
LED
switch

Polynomials
All 1s in the frame will be represented as
the sum of xb 1 (b is the bit position of
the 1).

The CRC 12
x12+x11+x3+x+1
whichhasadegreeof12,willdetectall
bursterrorsaffectinganoddnumberof
bits,willdetectallbursterrorswitha
lengthlessthanorequalto12,andwill
detect,99.97percentofthetime,burst
errorswithalengthof12ormore.

Checksum

Checksum

Checksum
Note:
The sender follows these steps:
The unit is divided into k sections, each of n bits.
All sections are added using ones complement to get
the sum.
The sum is complemented and becomes the checksum.
The checksum is sent with the data.

Checksum
Note:
The receiver follows these steps:
The unit is divided into k sections, each of n bits.
All sections are added using ones complement to get
the sum.
The sum is complemented.
If the result is zero, the data are accepted: otherwise,

Example
Supposethefollowingblockof16bitsistobesentusinga
checksumof8bits.
1010100100111001
Thenumbersareaddedusingonescomplement
10101001
00111001

Sum 11100010
Checksum00011101
Thepatternsentis101010010011100100011101

Example
NowsupposethereceiverreceivesthepatternsentinExample
7andthereisnoerror.
101010010011100100011101
Whenthereceiveraddsthethreesections,itwillgetall1s,
which,aftercomplementing,isall0sandshowsthatthereisno
error.
10101001
00111001
00011101
Sum

11111111

Complement

00000000meansthatthepatternisOK.

Example
Nowsupposethereisabursterroroflength5thataffects4
bits.
101011111111100100011101
Whenthereceiveraddsthethreesections,itgets
10101111
11111001
00011101
PartialSum111000101
Carry
Sum

1
11000110

Complement00111001thepatterniscorrupted.

Error Correction
Done by adding redundancy bits to the
data unit.
Relationship between Number of data bits
and number of redundancy bits:

2 m r 1
r

where: m number of data bits


r number of redundancy bits
2r number of different states

Relationship between Data and


Redundancy bits

Hamming Code
Solution for error correction
Positions of redundancy bits in Hamming
Code:

Hamming Code
(XXX1)

(XX1X)

(X1XX)

(1XXX)

Example

Error Detection using Hamming Code

Example of Burst Error Correction

MULTIPLEXING
is a term used to refer to a process where
multiple analog message signals or digital
data streams are combined into one signal.
The aim is to share an expensive resource.
is the set of techniques that allows the
simultaneous transmission of multiple
signals across a single data link. As data
and telecommunications use increases, so
does traffic.

Bandwidth Utilization
Note

Bandwidth utilization is the wise use of


available bandwidth to achieve
specific goals.
Efficiency can be achieved by
multiplexing; privacy and anti-jamming
can be achieved by spreading.

Dividing a link into channels

Categories of Multiplexing

Frequency Division Multiplexing


(FDM)
is an analog multiplexing technique that
combines analog signals.

FDM Process

FDM Demultiplexing Process

Example 1
Assume that a voice channel occupies
a bandwidth of 4 kHz. We need to
combine three voice channels into a
link with a bandwidth of 12 kHz, from
20 to 32 kHz. Show the configuration,
using the frequency domain. Assume
there are no guard bands.

Example 2
Five channels, each with a 100-kHz bandwidth, are
to be multiplexed together. What is the minimum
bandwidth of the link if there is a need for a guard
band of 10 kHz between the channels to prevent
interference?
Solution
For five channels, we need at least four guard
bands.Thismeansthattherequiredbandwidthis
atleast
5100+410=540kHz

Example 3
Four data channels (digital), each transmitting
at 1 Mbps, use a satellite channel of 1 MHz.
Design an appropriate configuration, using
FDM.
Solution
The satellite channel is analog. We divide it into
four channels, each channel having a 250-kHz
bandwidth. Each digital channel of 1 Mbps is
modulated such that each 4 bits is modulated to 1
Hz. One solution is 16-QAM modulation.

16-QAM Implementation

FDM Hierarchy

Wavelength Division
Multiplexing (WDM)
is an analog multiplexing technique to combine
optical signals.
Couples light at two or more discrete
wavelengths into and out of an optical fiber.
Different wavelengths in a light pulse travel
through an optical fiber at different speeds (e.g.
blue light propagates slower than red)

WDM

Time Division Multiplexing


(TDM)
is a digital process that can be applied
when the data rate capacity of the
transmission medium is greater than the
data rate required by the sending and
receiving devices.
is a digital multiplexing technique for
combining several low-rate
channels into one high-rate one.

TDM
In TDM, the channel is divided into
timeslots.

Synchronous TDM
In synchronous TDM, the multiplexer allocates exactly
the same timeslot to each device at all times, whether or
not a device has anything to transmit.

Example 4
In the previous slide, the data rate for each input
connection is 3 kbps. If 1 bit at a time is multiplexed (a
unit is 1 bit), what is the duration of (a) each input
slot, (b) each output slot, and (c) each frame?
Solution
Wecananswerthequestionsasfollows:
a.Thedatarateofeachinputconnectionis1kbps.
Thismeansthatthebitdurationis1/1000sor1ms.
Thedurationoftheinputtimeslotis1ms(sameas
bitduration).

Example 4

b.Thedurationofeachoutputtimeslotisonethird
oftheinputtimeslot.Thismeansthatthe
durationoftheoutputtimeslotis1/3ms.
c.Eachframecarriesthreeoutputtimeslots.Sothe
durationofaframeis31/3ms,or1ms.The
durationofaframeisthesameasthedurationof
aninputunit.

Example 5
The figure shows synchronous TDM with a data
stream for each input and one data stream for the
output. The unit of data is 1 bit. Find (a) the input bit
duration, (b) the output bit duration, (c) the output
bit rate, and (d) the output frame rate.

Example 5
Four 1-kbps connections are multiplexed together. A
unit is 1 bit. Find (a) the duration of 1 bit before
multiplexing, (b) the transmission rate of the link, (c)
the duration of a time slot, and (d) the duration of a
frame.
Solution
Wecananswerthequestionsasfollows:
a. Thedurationof1bitbeforemultiplexingis
1/1kbps,or0.001s(1ms).
b. The rate of the link is 4 times the rate of a
connection,or4kbps.

Example 5
c. The duration of each time slot is onefourth of the
durationofeachbitbeforemultiplexing,or1/4ms
or250s.Notethatwecanalsocalculatethisfrom
thedatarateofthelink,4kbps.Thebitdurationis
theinverseofthedatarate,or1/4kbpsor250s.
d.Thedurationofaframeisalwaysthesameasthe
durationofaunitbeforemultiplexing,or1ms.We
canalsocalculatethisinanotherway.Eachframe
inthiscasehasfourtimeslots.Sothedurationofa
frameis4times250s,or1ms.

Interleaving

Example 6
Four channels are multiplexed using TDM. If each
channel sends 100 bytes /s and we multiplex 1 byte
per channel, show the frame traveling on the link, the
size of the frame, the duration of a frame, the frame
rate, and the bit rate for the link.

Example 6
Solution
The multiplexer is shown in the figure. Each
frame carries 1 byte from each channel; the size
of each frame, therefore, is 4 bytes, or 32 bits.
Becauseeachchannelissending100bytes/sanda
framecarries1bytefromeachchannel,theframe
ratemustbe100framespersecond.Thebitrate
is10032,or3200bps.

Example 7
A multiplexer combines four 100-kbps channels using
a time slot of 2 bits. Show the output with four
arbitrary inputs. What is the frame rate? What is the
frame duration? What is the bit rate? What is the bit
duration?

Example 7
Solution
The figure shows the output for four arbitrary
inputs. The link carries 50,000 frames per second.
Theframedurationistherefore1/50,000sor20s.
The frame rate is 50,000 frames per second, and
eachframecarries8bits;thebitrateis50,0008=
400,000 bits or 400 kbps. The bit duration is
1/400,000s,or2.5s.

Empty Slots

Multilevel Multiplexing

Multiple-slot Multiplexing

Pulse Stuffing

Framing Bits

Example 8
We have four sources, each creating 250 characters per
second. If the interleaved unit is a character and 1
synchronizing bit is added to each frame, find (a) the
data rate of each source, (b) the duration of each
character in each source, (c) the frame rate, (d) the
duration of each frame, (e) the number of bits in each
frame, and (f) the data rate of the link.
Solution
Wecananswerthequestionsasfollows:
a.Thedatarateofeachsourceis2508=2000bps
=2kbps.

Example 8
b.Eachsourcesends250characterspersecond;
therefore,thedurationofacharacteris1/250s,or
4ms.
c.Eachframehasonecharacterfromeachsource,
whichmeansthelinkneedstosend250framesper
secondtokeepthetransmissionrateofeachsource.
d.Thedurationofeachframeis1/250s,or4ms.Note
thatthedurationofeachframeisthesameasthe
durationofeachcharactercomingfromeachsource.
e.Eachframecarries4charactersand1extra
synchronizingbit.Thismeansthateachframeis
48+1=33bits.

Example 9
Two channels, one with a bit rate of 100 kbps and
another with a bit rate of 200 kbps, are to be
multiplexed. How this can be achieved? What is the
frame rate? What is the frame duration? What is the bit
rate of the link?
Solution
We can allocate one slot to the first channel and two
slotstothesecondchannel.Eachframecarries3bits.
Theframerateis100,000framespersecondbecauseit
carries 1 bit from the first channel. The bit rate is
100,000frames/s3bitsperframe,or300kbps.

Digital Hierarchy

Digital Signal (DS) Service


DS-0 service single digital channel of 64 kbps.
DS-1 service 1.544 Mbps service
= (24 x 64 kbps + 8 kbps overhead)
DS-2 service 6.312 Mbps service
= (96 x 64 kbps + 168 kbps overhead)
DS-3 service 44.376 Mbps service
= (672 x 64 kbps + 1.368 Mbps overhead)
DS-4 service 274.176 Mbps service
= (4032 x 64 kbps + 16.128 Mbps overhead)

T-Line vs. E-Line Rates

T-1 Line for multiplexing


Telephone Lines

T-1 Frame Structure

Statistical TDM
The number of time slots is based on a
statistical analysis of the number of input
lines that are likely to be transmitting at
any given time.

TDM Slot Comparison

You might also like