Physical Layer
Physical Layer
Chapter 2
Data and Signals
• To be transmitted, data must be transformed to electromagnetic
signals.
• Both data and the signals that represent them can be either
analog or digital in form.
• Analog data refers to information that is continuous.
• Digital data refers to information that has discrete state.
• An analog clock that has hour, minute, and second hands gives
information in a continuous form.
• A digital clock that reports the hours and the minutes will
change suddenly from 8:05 to 8:06.
• The simplest way to show signals is by plotting them on a pair
of perpendicular axes.
• The vertical axis represents the value or strength of a signal.
The horizontal axis represents time.
Data and signals
Data and signals
• A periodic signal completes a pattern within a measurable time
frame, called a period, and repeats that pattern over subsequent
identical periods.
• The completion of one full pattern is called a cycle.
• A nonperiodic signal changes without exhibiting a pattern
or cycle that repeats over time.
• In data communications, we commonly use periodic
analog signals and non periodic digital signals.
• The sine wave is the most fundamental form of a periodic analog
signal.
• A sine wave can be represented by three parameters: the peak
amplitude, the frequency, and the phase.
• Peak amplitude is normally measured in volts.Frequency refers to
the number of periods in I s.
• The term phase describes the position of the waveform relative to
time O.
Data and Signals
• Wavelength:The wavelength is the distance a simple signal can
travel in one period.
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Fourier Analysis
• The French mathematician Jean-Baptiste Fourier
proved that any reasonably behaved periodic function,
g(t) with period T, can be constructed as the sum of a
(possibly infinite) number of sines and cosines:
• Fourier series is used
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Bandwidth-Limited Signals (1)
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Bandwidth-Limited Signals (3)
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Bandwidth-Limited Signals (4)
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Bandwidth-Limited Signals (5)
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Bandwidth-Limited Signals (6)
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Bandwidth-Limited Signals
• Example: Assume you want to send 8 bits at 9600 bps
over an ordinary phone line
• The time to send 8 bits is 8/9600 = 0.83 msec.
• The frequency of the first harmonic is 9600/8 = 1200 Hz
(periods per second)
• Ordinary phone lines have an artificial cut-off bandwidth
of 3000Hz. Thus the highest harmonic passed through is
3000/ 1200 = 2.5 => highest harmonic is 2!
• The signal received would be tricky to reconstruct =>
limiting the bandwidth limits the data rate
The Maximum Data Rate of a Channel
• If the signal consists of V discrete levels, Nyquist’s
theorem states:
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Guided Transmission Media
• The purpose of the physical layer is to transport bits from one
machine to another.
• Various physical media can be used for the actual transmission.
Each one has its own niche in terms of bandwidth, delay, cost,
and ease of installation and maintenance.
• Guided Media
• Magnetic media
• Twisted pairs
• Coaxial cable
• Power lines
• Fiber optics
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Magnetic Media
• Write data onto magnetic tape or removable media
(e.g., recordable DVDs), physically transport the
tape or disks to the destination machine, and read
them back in again.
• Data transmission speed
• Ex:A box containing 1000 tapes each having
capacity of 800 gigabytes and it requires 24
hours to move from one place to other then the
bandwidth is 70 Gbps.
• Never underestimate the bandwidth of a station
wagon full of tapes hurtling down the highway.
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Twisted Pairs
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Twisted Pairs
• The delay characteristics are poor in magnetic media.
• For many applications an online connection is needed.
• One of the oldest transmission media is twisted pair.
• A twisted pair consists of two insulated copper wires, typically
about 1 mm thick
• When the wires are twisted, the waves from different twists cancel
out, so the wire radiates less effectively.
• A signal is usually carried as the difference in voltage between the
two wires in the pair.
• This provides better immunity to external noise
• Ex:Telephone system.
• Twisted pairs can run several kilometers without amplification, but
for longer distances the signal becomes too attenuated and
repeaters are needed.
Twisted Pairs
• Twisted pairs can be used for transmitting either analog or digital
information.
• The bandwidth depends on the thickness of the wire and the distance
traveled, but several megabits/sec can be achieved for a few
kilometers in many cases.
• Types:
– Category 5 :Four such pairs are typically grouped in a
plastic sheath to protect the wires and keep them
together.
– Example
– LAN 100Mbps-uses two (out of the four) pairs, one pair for
each direction.
– 1-Gbps Ethernet uses all four pairs in both directions
simultaneously.
Twisted Pairs
• Links that can be used in both directions at the same time, like a two-
lane road, are called full-duplex links.
• Links that can be used in either direction, but only one way at a time,
like a single-track railroad line. are called half-duplex links.
• A third category consists of links that allow traffic in only one
direction, like a one-way street. They are called simplex links.
• Category 3-Uses the same connector, but has more twists per meter.
• More twists result in less crosstalk and a better-quality signal over
longer distances
• Category 6 and above are rated for signals of 500 MHz and can
support the 10-Gbps links that will soon be deployed.
• These wiring types are referred to as UTP (Unshielded Twisted Pair) as
they consist simply of wires and insulators.
• Category 7 cables have shielding on the individual twisted pairs, as
well as around the entire cable (but inside the plastic protective sheath).
Shielding reduces the
• Susceptibility to external interference and crosstalk with other cables.
Coaxial Cable
A coaxial cable
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Coaxial Cable
• It has better shielding and greater bandwidth than unshielded twisted
pairs, so it can span longer distances at higher speeds.
• One kind, 50-ohm cable, is commonly used when it is intended for
digital transmission.
• . The other kind, 75-ohm cable, is commonly used for analog
transmission and cable television.
• A coaxial cable consists of a stiff copper wire as the core, surrounded
by an insulating material.
• The insulator is encased by a cylindrical conductor, often as a
closely woven braided mesh.
• The outer conductor is covered in a protective plastic sheath.
• The bandwidth possible depends on the cable quality and length.
• Modern cables have a bandwidth of up to a few GHz.
• Coaxial cables used to be widely used within the telephone system
for long-distance line,cable television and metropolitan area
• networks
Power Lines
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Power Lines
• Power lines have been used by electricity companies for low-rate
communication such as remote metering for many years, as well in the
home to control devices.
• Example:Using electrical wires inside the home.
• Plug a TV and a receiver into the wall, which you must do anyway
because they need power, and they can send and receive movies over
the electrical wiring.
• Disadvantages
• The electrical properties of the wiring vary from one house to the next
and change as appliances are turned on and off, which causes data
signals to bounce around the wiring.
• Transient currents when appliances switch on and off create electrical
noise over a wide range of frequencies.
• To meet regulatory requirements, the data signal must exclude licensed
frequencies.
It is practical to send at least 100 Mbps over typical household
electrical wiring by using communication schemes
Fiber Optics (1)
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Fiber Optics (1)
• Here we see a light ray incident on the boundary at an angle α1
emerging at an angle β1.
• The amount of refraction depends on the properties of the two
media (in particular, their indices of refraction).
• For angles of incidence above a certain critical value, the light is
refracted back into the silica; none of it escapes into the air.
• Thus, a light ray incident at or above the critical angle is trapped
inside the fiber, as shown in Figure and can propagate for many
kilometers with virtually no loss.
• If the fiber’s diameter is reduced to a few wavelengths of light
the fiber acts like a wave guide and the light can propagate only
in a straight line, without bouncing, yielding a single-mode fiber
• Currently available single-mode fibers can transmit data at 100
Gbps for 100 km without amplification.
Fiber Optics (1)
• Fiber optics are used for long-haul transmission in network
backbones, highspeed LANs and high-speed Internet access
such as FttH (Fiber to the Home).
• An optical transmission system has three key components: the
light source, the transmission medium, and the detector.
• Conventionally, a pulse of light indicates a 1 bit and the absence
of light indicates a 0 bit.
• The transmission medium is an ultra-thin fiber of glass.
• The detector generates an electrical pulse when light falls on it.
• By attaching a light source to one end of an optical fiber and a
detector to the other, we have a unidirectional data transmission
system that accepts an electrical signal, converts and transmits it
by light pulses, and then reconverts the output to an electrical
signal at the receiving end.
Fiber Optics (2)
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Transmission of Light Through Fiber
• Three wavelength bands are most commonly used at present
for optical communication.
• They are centered at 0.85, 1.30, and 1.55 microns, respectively.
• All three bands are 25,000 to 30,000 GHz wide. The 0.85-
micron band was used first.
• It has higher attenuation and so is used for shorter distances,
but at that wavelength the lasers and electronics could be made
from the same material (gallium arsenide).
• The last two bands have good attenuation properties (less than
5% lossper kilometer).
• The 1.55-micron band is now widely used with erbium-doped
amplifiers that work directly in the optical domain.
Transmission of Light Through Fiber
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Fiber Cables (1)
• At the center is the glass core through which the light
propagates.
• In multimode fibers, the core is typically 50 microns in
diameter and in single-mode fibers, the core is 8 to 10 microns.
• The core is surrounded by a glass cladding with a lower index
of refraction than the core, to keep all the light in the core.
• Next comes a thin plastic jacket to protect the cladding.
• Fibers are typically grouped in bundles, protected by an
outer sheath.
• Fibers can be connected in three different ways.
– They can terminate in connectors and be plugged into fiber
sockets.
– They can be spliced mechanically.
– Two pieces of fiber can be fused (melted) to form a solid
connection.
Fiber Cables (1)
• The light sources are LEDs (Light Emitting Diodes) and
semiconductor lasers.
• They can be tuned in wavelength by inserting Fabry-Perot or
Mach-Zehnder interferometers between the source and the fiber.
• Fabry-Perot interferometers are simple resonant cavities
consisting of two parallel mirrors.
• The light is incident perpendicular to the mirrors.
• The length of the cavity selects out those wavelengths that fit
inside an integral number of times.
• Mach-Zehnder interferometers separate the light into two beams.
• The two beams travel slightly different distances.
• They are recombined at the end and are in phase for only certain
wavelengths.
Fiber Cables (2)
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Switching
• Two different switching techniques are used by the network
nowadays: circuit switching and packet switching.
• The traditional telephone system is based on circuit
• switching, but packet switching is beginning to make inroads
with the rise of voice over IP technology.
• Circuit switching
• It seeks out a physical path between sender and receiver.
• Example:
• When a call passes through a switching office, a physical
connection is (conceptually) established between
the line on which the call came in and one of the output lines,
as shown by the dotted lines.
• Once a call has been set up, a dedicated path between both
ends exists and will continue to exist until the call is finished
Circuit Switching/Packet Switching (1)
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Digital Modulation and Multiplexing
• The process of converting between bits and signals that
represent them is called digital modulation.
• Baseband Transmission:In which the signal
occupies frequencies from zero up to a maximum that
depends on the signaling rate.
• Passband Transmission: Schemes that regulate the
amplitude, phase, or frequency of a carrier signal to
convey bits.
• Multiplexing : It is convenient that a single wire to carry
several signals than to install a wire for every signal.
This kind of sharing is called multiplexing.
Baseband Transmission
• Use a positive voltage to represent a 1 and a negative
voltage to represent a 0.
• Ex: Presence of light might represent a 1 and
the absence of light might represent a 0.
• This scheme is called NRZ (Non-Return-to-Zero).
• The receiver converts it into bits by sampling the signal at
regular intervals of time.
• Disadvantage:
1. Bandwidth Efficiency: We need a bandwidth of at least B/2
Hz when the bit rate is B bits/sec. We cannot run NRZ
faster without using more bandwidth.
Baseband Transmission
• By using four voltages, for instance, we can send 2 bits at
once as a single symbol.
• The rate at which the signal changes is then half the bit rate,
so the needed bandwidth has been reduced.
• Clock recovery: The receiver must know when one symbol
ends and the next symbol begins to correctly decode the bits.
With NRZ, in which the symbols are simply voltage levels, a
long run of 0s or 1s leaves the signal unchanged.
• A clever trick here is to mix the clock signal with the data
signal by XORing them together so that no extra line is
needed.
• This scheme is called Manchester encoding and was used for
classic Ethernet.
Baseband Transmission
• The downside of Manchester encoding is that it requires
twice as much bandwidth as NRZ because of the clock.
• We can simplify the situation by coding a 1 as a transition
and a 0 as no transition, or vice versa. This coding is called
NRZI (Non-Return-to-Zero Inverted), a twist on NRZ.
• Example: USB .
• Example coding:4B/5B.
– This scheme adds 25% overhead, which is better than the
100% overhead of Manchester encoding.
– There are still some codes left and can be used as control
signals.
Clock Recovery
4B/5B mapping.
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Baseband Transmission
• Scrambling: A scrambler works by XORing the data with
a pseudorandom sequence before it is transmitted.
• The receiver then XORs the incoming bits with the same
pseudorandom sequence to recover the real data.
• Balanced Signals:Signals that have as much positive
voltage as negative voltage even over short periods of time
are called balanced signals.
• Balancing helps to provide transitions for clock recovery
since there is a mix of positive and negative voltages.
• It also provides a simple way to calibrate receivers
because the average of the signal can be measured and
used as a decision threshold to decode symbols.
Baseband Transmission
• A straightforward way to construct a balanced code is to
use two voltage levels to represent a logical 1, (say +1 V
or −1 V) with 0 V representing a logical zero.
• This scheme is called bipolar encoding. In telephone
networks it is called AMI (Alternate Mark Inversion).
• Bipolar encoding adds a voltage level to achieve balance.
Alternatively we can use a mapping like 4B/5B to achieve
balance.
• Example of this kind of balanced code is the 8B/10B line
code. It maps 8 bits of input to 10 bits of output, so it is
80% efficient, just like the 4B/5B line code.
Baseband Transmission
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Frequency Division Multiplexing (1)
Gray-coded QAM-16.
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Frequency Division Multiplexing
• FDM (Frequency Division Multiplexing) takes advantage
of passband transmission to share a channel.
• It divides the spectrum into frequency bands, with each user
having exclusive possession of some band in which to send
their signal.
• AM radio broadcasting illustrates FDM. The allocated
spectrum is about 1 MHz, roughly 500 to 1500 kHz.
• Different frequencies are allocated to different logical
channels (stations), each operating in a portion of the
spectrum, with the inter channel separation great enough to
prevent interference.
FDM
• We show three voice-grade telephone channels multiplexed
using FDM.
• Filters limit the usable bandwidth to about 3100 Hz per voice-
grade channel.
• When many channels are multiplexed together 4000 Hz is
allocated per channel.
• The excess is called a guard band. It keeps the channels well
separated.
• First the voice channels are raised in frequency, each by a
different amount.
• Then they can be combined because no two channels now
occupy the same portion of the spectrum.
OFDM
• The channel bandwidth is divided into many subcarriers that
independently send data
• signals from each subcarrier extend into adjacent ones.
• The subcarriers can therefore be sampled at their center
frequencies without interference from their neighbors.
• To make this work, a guard time is needed to repeat a portion of
the symbol signals in time so that they have the desired
frequency response.
• OFDM is used in 802.11, cable networks and power line
networking, and is planned for fourth-generation cellular
systems.
• Usually, one high-rate stream of digital information
• is split into many low-rate streams that are transmitted on the
subcarriers in parallel.
Frequency Division Multiplexing (2)
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
TDM
• the users take turns (in a round-robin fashion), each one
periodically getting the entire bandwidth for a little
burst of time.
• An example of three streams being multiplexed
• with TDM is shown in Figure.
• Bits from each input stream are taken in a fixed time
slot and output to the aggregate stream.
• This stream runs at the sum rate of the individual
streams.
• For this to work, the streams must be synchronized
in time.
TDM
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
CDMA
• CDMA allows each station to transmit over the entire
frequency spectrum all the time.
• Multiple simultaneous transmissions are separated using
coding theory.
• TDM is comparable to pairs of people in the room taking turns
speaking.
• FDM is comparable to the pairs of people speaking at different
pitches,
• CDMA is comparable to each pair of people talking at once,
but in a different language.
CDMA
• each bit time is subdivided into m short intervals called chips.
• Typically, there are 64 or 128 chips per bit, but in the example
given here we will use 8 chips/bit for simplicity.
• Each station is assigned a unique m-bit code called a chip
sequence.
• EXAMPLE:for m = 8, if station A is assigned the chip sequence
(−1 −1 −1 +1 +1 −1 +1 +1), it can send a 1 bit by transmiting
the chip sequence and a 0 by transmitting (+1 +1 +1 −1 −1 +1
−1 −1).
• The bandwidth needed for CDMA is greater by a factor of m
than the bandwidth needed for a station not using CDMA
CDMA
• Let us use the symbol S to indicate the m-chip vector
for station S, and S for its negation.
• All chip sequences are pairwise orthogonal, by which
we mean that the normalized inner product of any two
distinct chip sequences, S and T (written as S T), is 0.
• The normalized inner product of any chip sequence with
itself is 1:
• When two or more stations transmit simultaneously,
their bipolar sequences add linearly.
Code Division Multiplexing (1)
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Code Division Multiplexing (2)
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011