0% found this document useful (0 votes)
56 views52 pages

Data Communication & Computer Networks: Week # 4

The document discusses channel capacity and digital-to-digital conversion. It defines channel capacity as the maximum rate at which data can be transmitted over a given communication path under given conditions. It describes Nyquist's theorem for calculating capacity of a noiseless channel and Shannon's channel capacity formula for a noisy channel. It then discusses various line coding schemes used for digital-to-digital conversion such as unipolar and polar encoding, and characteristics of line coding schemes like signal rate, data rate, bandwidth, baseline wandering, and self-synchronization.

Uploaded by

Shoaib Atiq
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
56 views52 pages

Data Communication & Computer Networks: Week # 4

The document discusses channel capacity and digital-to-digital conversion. It defines channel capacity as the maximum rate at which data can be transmitted over a given communication path under given conditions. It describes Nyquist's theorem for calculating capacity of a noiseless channel and Shannon's channel capacity formula for a noisy channel. It then discusses various line coding schemes used for digital-to-digital conversion such as unipolar and polar encoding, and characteristics of line coding schemes like signal rate, data rate, bandwidth, baseline wandering, and self-synchronization.

Uploaded by

Shoaib Atiq
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 52

Data Communication &

Computer Networks
Week # 4

Dr. Arshad Ali

Email: [email protected]
https://sites.google.com/a/cs.uol.edu.pk/dccn/

Powerpoint Templates
ACKNOWLEDGMENTS
These lecture slides contain material from slides prepared
by Behrouz Forouzan for his book Data Communication
and Networking (4th/ 5th edition).
Channel capacity

The maximum rate at which data can be transmitted


over a given communication path, or channel, under
given conditions

3
Channel Capacity
 Theoretical formulas to calculate the data rate
Nyquist bit rate (noiseless channel)
Shannon’s channel capacity formula (noisy channel)

Nyquist theorem:
 Given a bandwidth of B, the highest signal rate that

can be carried is 2B bps (binary signals or two


voltage levels)
 It assumes that channel is free of noise

4
Channel Capacity: Nyquist Bandwidth
Nyquist theorem:
 In the general case, in which a signal element may represent more

than one bit, we have:


maximum data rate = 2B log2 V bits/sec
where V is the number of discrete signal or voltage levels

 Increasing the levels of a signal may reduce the reliability of the


system
 No. of bits per level = log2 V

5
Channel Capacity: Nyquist Bandwidth
Examples:
Bandwidth of voice grade line: 3000 Hz
using binary encoding (each signal level represents 1 bit)
maximum data rate = 2 X B = 2 X 3000 bits/sec
= 6000 bits/sec

If we have 16 distinct signals, each representing 4 bits (using


QAM encoding)
maximum data rate = 2 X 3000 log2 16 bits/sec
= 24000 bits/sec

6
Nyquist Bandwidth: Examples

For a noiseless channel, bandwidth of 3100 Hz transmitting a signal


with two signal levels
The maximum bit rate?

BitRate = 2 X 3100 X log2 2 = 6200 bps

For the same channel transmitting a signal with four signal levels
(for each level, we send 2 bits). The maximum bit rate?

BitRate = 2 X 3100 X log2 4 = 12400 bps

7
Nyquist Bandwidth: Examples

How many signal levels to send 200 kbps over a noiseless channel
with a bandwidth of 20 kHz?

By using Nyquist formula


200000 = 2 X 20000 X log2 V
log2 V = 5
V = 25 = 32 levels

Bit rate if V = 64, 128?

How many signaling levels are required when C = 8 Mbps and


B = 1 MHz ?

8
Shannon capacity formula
 maximum data rate or capacity of a noisy channel whose bandwidth is B Hz and whose
signal-to-noise ratio is S/N, is given

C  B log 2 1  SNR 
This equation represents theoretical maximum that can be achieved
maximum data rate = B log2(1+S/N) bps

 Consider an extremely noisy channel


Where noise is so strong that the signal is faint; or
in which the value of the signal-to-noise ratio is almost zero

Capacity of this channel is

C = B log2 (1 + SNR) = B 10g2 (1 + 0) =B log2 1 = B x 0 = 0

9
Channel Capacity: Shannon’s Theorem

Shannon’s Theorem
Example: channel of 3000 Hz and SNR of 30 dB
C= B log2(1+SNR) bps
 First, obtain SNR (ratio) from SNRdB
SNRdB  10 log10 S / R  10 log10 SNR

Here, SNR = S/N = 1000, and 1+S/N is ≈ 210

maximum data rate (C) = 3000 log2(1+S/N) bps


≈ 3000 X 10 bps = 30000 bps

10
Shannon Formula: Example
 Spectrum of a channel between 3 MHz and 4 MHz ;
SNRdB = 24 dB
B  4 MHz  3 MHz  1 MHz
SNR dB  24 dB  10 log10  SNR 
SNR  251
Using Shannon’s formula
C  10  log 2 1  251  10  8  8Mbps
6 6

11
Shannon Formula: Example
Assume that SNRdB = 36 and the channel bandwidth is 2 MHz
The theoretical channel capacity?

12
Analog/Digital Conversions
Digital-To-Digital Conversion
 Representation of digital data by using digital
signals
 Techniques for digital-to-digital conversion

Line coding
Block coding
Scrambling
Digital-To-Digital Conversion
Line Coding: the process of converting digital data to
digital signals
 Assumption: Data is stored in computer memory as

sequence of bits
 Line coding converts sequence of bits to digital signals

 For example when we transmit data from computer to the


printer, both original and transmitted data have to be
digital
 Encoding a digital signal is where 1’s and 0’s generated by

the computer are translated into voltage pulses that can be


propagated over the wire
Digital-To-Digital Conversion
Line Coding
 At sender: encoding of digital data into digital signal

 At receiver: recreation of digital data by decoding the

digital signal
Digital-To-Digital Conversion
Characteristics of Line Coding Schemes
 Signal element versus data element

 A data element is the smallest entity (bit) that can represent a

piece of information
In data communications, our goal is to send data elements
which are what we need to send
Data elements are being carried
 A signal element is the shortest unit (time wise) of a digital signal

In digital data communications, a signal element carries data


elements (carriers)
So signals elements are what we can send
Ratio of data elements to signals elements
Digital-To-Digital Conversion
Characteristics of Line Coding Schemes
 Signal element versus data element

 In the simplest case, there is a one-to-one correspondence

between bits and signal elements


Digital-To-Digital Conversion
Characteristics of Line Coding Schemes
 Data rate versus signal rate

 The data rate (bit rate) is the number of data elements (bits) sent

in I second
The unit is bits per second (bps)
 The signal rate (baud rate, modulation rate or pulse rate) is the

number of signal elements sent in I second.


The unit is the baud
 Data communications goal: increase the data rate (increasing

speed of transmission) and decrease the signal rate (decreasing


bandwidth requirement)
Digital-To-Digital Conversion
Characteristics of Line Coding Schemes
Bandwidth
 Although the actual bandwidth of a digital signal is infinite, the

effective bandwidth is finite

 the baud rate, not the bit rate, determines the required bandwidth
for a digital signal
Digital-To-Digital Conversion
Characteristics of Line Coding Schemes
Baseline wandering
 In decoding a digital signal

the receiver calculates a running average of the received signal


power. This average is called the baseline.
 To determine the value of the data element

The incoming signal power is evaluated against this baseline


 A long string of Os or 1s can cause a drift in the baseline

(baseline wandering) and make it difficult for the receiver to


decode correctly
 A good line coding scheme needs to prevent baseline wandering
Digital-To-Digital Conversion
Characteristics of Line Coding Schemes
DC component
 When the voltage level in a digital signal is constant for a while,

the spectrum creates very low frequencies (results of Fourier


analysis)
 These frequencies around zero, called DC (direct-current)

components, present problems


for a system that cannot pass low frequencies.
For example, a telephone line cannot pass frequencies below 200 Hz
 So DC component means 0/1 parity that can cause baseline
wandering
 we need a scheme with no DC component for such a system
Digital-To-Digital Conversion
Characteristics of Line Coding Schemes
Self synchronization
 To correctly interpret the signals received from the sender,

the receiver's bit intervals must correspond exactly to the


sender's bit intervals.
 If the receiver clock is faster or slower
 the bit intervals are not matched and the receiver might misinterpret
the signals
 Consider a situation where the receiver has a shorter bit duration
Let the sender sends 10110001, while the receiver receives
110111000011
Digital-To-Digital Conversion
Characteristics of Line Coding Schemes
Self synchronization
 A self-synchronizing digital signal includes timing information in

the data being transmitted


The same can be achieved by adding transitions in the signal
that alert the receiver to the start, middle or end of the pulse.
These points can reset the clock in case the receiver’s clock is
out of synchronization
Effect of lack of synchronization
Consider a situation where the receiver has a shorter bit duration
Let the sender sends 10110001, while the receiver receives 110111000011
Example
In a digital transmission, the receiver clock is 0.1 percent faster
than the sender clock. How many extra bits per second does the
receiver receive if the data rate is 1 kbps?
How many if the data rate is 1 Mbps?
Solution
At 1 kbps, the receiver receives 1001 bps instead of 1000 bps.

At 1 Mbps, the receiver receives 1,001,000 bps instead of


1,000,000 bps.
Digital-To-Digital Conversion

Line Coding Schemes (types of encoding)


Line Coding Schemes: Unipolar
Unipolar: non-return-to-zero (NRZ) [no return in middle]
 Encoding is simple , with only one technique in use
 all the signal levels are on one side of the time axis, either
above or below
 It is called Unipolar because it uses only one polarity
 positive voltage defines bit I and the zero voltage defines bit 0
Line Coding Schemes: Polar
Polar
 Polar encoding uses two voltage levels, positive and negative
(on both sides of time axis)
 The voltage level for 0 bit can be positive (+ve) and the voltage level for 1
can be negative
 3 subcategories: NRZ, RZ, Biphase
Line Coding Schemes: Polar
Polar: NRZ
Non-return-to-zero-level (NRZ-L)
 A +ve voltage means the bit is a 0 and a –ve voltage means the
bit is a 1 (vice versa may also be true)
Line Coding Schemes: Polar
Polar: NRZ : Non-return-to-zero-Invert (NRZ-I)
 the change or lack of change in the level of the voltage determines

the value of the bit


If there is no change, the bit is 0;
if there is a change, the bit is 1
 A transition (low-to-high or high-to-low) at the beginning of a bit
time denotes a binary 1 for that bit time; no transition indicates a
binary 0
NRZ-L and NRZ-I both have a DC
component problem and baseline
wandering, it is worse for NRZ-L. Both
have no self synchronization &no error
detection. Both are relatively simple to
implement.
Line Coding Schemes: Polar
Polar: Return-to-zero (RZ)
 Any time, data contains long strings of 1’s or 0’s, receiver can
loose its timing (synchronization problem of NRZ)
 One solution is RZ encoding which uses 3 values; Positive,
Negative and Zero
 Signal changes not between bits but during each bit
Line Coding Schemes
 Here, +ve voltage means 1 and a –ve voltage
means 0,
 but unlike NRZ-L, half way through each bit
interval, the signal returns to zero
 A 1 bit is represented by positive to zero and a 0
is represented by negative to zero transition
Line Coding Schemes

Problem with RZ

 Main problem with RZ encoding is that it


requires two signal changes to encode one bit
 therefore occupies more bandwidth
 But it is most effective solution so that
receiver cannot lose timing (no DC
component problem)
 Complexity: uses three levels of voltage
Line Coding Schemes: Polar

Biphase
 Best existing solution to the problem of
synchronization
 Signal changes at the middle of bit interval
but does not stop at zero
 Instead it continues to the opposite pole

There are two types of biphase encoding

1. Manchester

2. Differential Manchester
Line Coding Schemes: Polar
Biphase: Manchester
Transition in middle of each bit period
Transition serves as clock and data
Used by IEEE 802.3 (10Mbps Ethernet)
 Negative-to-Positive Transition (low to high) = 1
 Positive-to-Negative Transition (high to low) = 0
Line Coding Schemes: Polar
Bi-phase: Differential Manchester
 Mid-bit transition is clocking only (for synchronization)
• Transition at 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 (Token ring)
Line Coding Schemes: Polar
Line Coding Schemes: Bipolar
Bipolar encoding
 There are three voltage levels; +ve, -ve, zero to represent the
symbols (note not transitions to zero as in RZ)
 Voltage level for one symbol is at “0” and the other alternates
between +ve & -ve.
 Bipolar Alternate Mark Inversion (AMI): the “0” symbol
is represented by zero voltage and the “1” symbol alternates
between +V and -V.
 Pseudoternary is the reverse of AMI: the “1” symbol is
represented by zero voltage and the “0” symbol alternates
between +V and -V
Line Coding Schemes: Bipolar
Bipolar encoding
Bipolar Alternate Mark Inversion (AMI) and Pseudoternary
Alternate Mark Inversion(AMI)
 Pros and Cons:

 There will be no loss of synchronization if a


long string of 1s occurs
 Each 1 introduces a transition, and the receiver
can resynchronize on that transition
 A long string of 0s would still be a problem
 No error detection
Digital-To-Digital Conversion
 Representation of digital data by using digital
signals
 Techniques for digital-to-digital conversion

Line coding
Block coding
Scrambling
Block Coding

 For a code to be capable of error detection, we need to add


redundancy, i.e., extra bits to the data bits.
 Block coding is normally referred to as mB/nB coding; it

replaces each m-bit group with an n-bit group, where n is


larger than m
 Block coding is done in three steps: division, substitution
and combination.
 The resulting bit stream prevents certain bit combinations
that when used with line encoding would result in DC
components or poor sync. quality.
Block Coding Concept

Three steps of block coding


 In the division step, a sequence of bits is divided into groups

of m bits
For example, in 4B/5B encoding, the original bit sequence
is divided into 4-bit groups
 In the substitution step, we substitute an m-bit group for an n-bit
group
For example, in 4B/5B encoding we substitute a 4-bit code
for a 5-bit group
 Finally in combination step, the n-bit groups are combined

together to form a stream


 The new stream has more bits than the original bits
Block coding concept
Using block coding 4B/5B with NRZ-I line coding scheme

4B/5B coding scheme was designed to be used in combination with


NRZ-I
NRZ-I has a good signal rate, but it has a synchronization problem
A long sequence of 0s can make receiver clock lose synchronization

One solution to synchronization issue: prior to encoding with NRZ-


I, change the bit stream to avoid having a long stream of 0s
The 4B/5B scheme is the answer to achieve this goal
Block-coded stream does not have more than three consecutive 0s
At the receiver
the NRZ-I encoded digital signal is first decoded into a stream of
bits and
then decoded to remove the redundancy
Using block coding 4B/5B with NRZ-I line coding scheme
4B/5B: Redundancy

 A 4 bit data word can have 24 combinations

 A 5 bit code word can have 25=32 combinations

 We therefore have 32 - 16 = 16 unused groups for 4B/5B

 Some of the extra/unused groups are used for


control/signaling purposes.
4B/5B Mapping codes
 The 5-bit codes are selected in such a way that there are no
more than one leading 0 (left bit) and no more than two trailing
0s (right bits)
Thus, when sent back-to-back, no pair of 5-bit codes results in
more than three consecutive 0s being transmitted
 Thus, when different groups are combined to make a new

sequence, there are never more than three consecutive 0s being


transmitted
 If a 5-bit group arrives that belongs to the unused portion of the

table
◦ the receiver knows that there is an error in the transmission
The 5 bit words are pre-determined in a dictionary and are
chosen in such a way so that there will be at least two
transitions per block of bits
4B/5B mapping codes
Substitution in 4B/5B block coding

You might also like