The physical layer deals with transporting bits between two machines.
How do we communicate 0's and 1's across a medium?
By varying some sort of physical property such as voltage or
current.
Moreover, by representing the property as a function of time, we can
analyze it mathematically. Our goal is to understand what
happens to a signal as it travels across some physical media. That
is, will the receiver see the exact same signal generated by the
sender? Why or why not?
Fourier showed that a periodic function g(t) can be represented
mathematically as an infinite series of sines and cosines:
- f is the function's fundamental frequency
- is the function's period
- and are the amplitudes of the nth harmonics
The series representation of g(t) is called its Fourier
series expansion.
In communications, we can always represent a data signal using a
Fourier series by imagining that the signal repeats the same pattern
forever.
Moreover, we can compute the coefficients and :
For instance, suppose we use voltages (on/off) to represent ``1''s and
``0''s, and we transmit the bit string ``011000010'. The signal would
look as follows:
Recall (from calculus):
- the derivative of sin(x) = cos(x)dx
- the derivative of cos(x) = -sin(x)dx
Similarly,
And
- The more terms in the expansion, the more exact our
representation becomes.
- The expression represents the
amplitude or energy of the signal (e.g., the harmonics
contribution to the wave).
In our example, the amplitude consists of and continually gets
smaller.
(The term is always zero.) Here, as in most cases, the first
harmonics are the most important ones.
So what does this have to do with data communication? The
following facts are important:
- Signals attenuate (strength of signal falls off with distance)
during transmission. How
much attenuation occurs?
The exact amount is dependent on physical properties of the
medium.
- Distortion results because attenuation is non-uniform
across the frequency spectrum; some
frequencies distort more than others.
That is, the signal doesn't distort uniformly. If every component
decreased by the same amount, the signal would be weaker, but not
distorted, and amplifying the signal would restore it. Because the
received signal is distorted, however, amplification simply magnifies
the distortion and probably won't help.
- A transmission medium carries signals lying within in a
spectrum or range of frequencies; the absolute width of the
spectrum is called the bandwidth of the channel.
In other words, most channels completely attenuate (e.g. chop off)
frequencies beyond some threshold value.
What does this mean in terms of Fourier harmonics? In terms of
fundamental frequencies of a Fourier representation, higher harmonics
get completely chopped off during transmission and are not received at
the receiving end!
Conclusion: it's essentially impossible to receive the
exact signal that was sent. The key is to receive enough of the
signal so that the receiver can figure out what the original
signal was.
Note: ``bandwidth'' is an overloaded term. Engineers tend to
use bandwidth to refer to the spectrum of signals a channel carries.
In contrast, the term ``bandwidth'' is often also used to refer to the
data rate of the channel, in bps.
- The baud rate (also known as the
modulation rate) refers to the maximum rate at which the
signal changes value (e.g., switches voltages). For example, if
``0''s and ``1''s were represented as +5V, -5V, respectively, the baud
rate would refer to the number of times per second the signal switchs
as its transmitting a string of alternating 0's and 1's. Note that we
can potentially achieve a higher data rate by switching the voltage
faster.
- The encoding method determines the amount of information
carried in one baud.
In our example we encoded only one bit of information (0 or 1).
How can we encode 2 bits worth of information in one baud? Use
4 different voltage levels. For example, 0, 1, 2, 3 could be
represented as -10, -5, +5 and +10 volts respectively.
Note: baud rate is not the same thing as the data rate. For a
given baud rate, we can increase the data rate by changing the
encoding method (subject to Nyquist and Shannon limits, of course.)
What kind of data rate can we achieve using voice-grade phone lines?
The phone system is designed to carry human voices (not data!), and
its bandwidth line is limited to about 3 kHz.
Suppose that we have a baud rate of b bits/sec (assume only encode one
bit of data).
- For 8 bits of data, the fundamental frequency F would be b/8 Hz.
- Because the phone line attenuates frequencies above 3 kHz, the
number of the highest harmonic passed through is 3000/F = 3000/(b/8)
= 24000/b.
- At 1200 baud, the fundamental frequency is 1200/8 = 150Hz, and
the highest numbered harmonic passed is 24000/1200 = 20.
That is, only the first 20 terms of the Fourier series are
relevant; the phone line will chop off all higher numbered terms.
The following table gives more values (Figure 2-2)
Will we be able to send data at 38,400 baud?
No! It should be clear that sending data at 38400 baud over
a voice grade line simply won't work. Even at 9600 baud only the
first and second harmonic are transmitted, and the signal will be
severely distorted. It is unlikely that the receiver will be able to
recognize the signal as intended.
Must use better encoding schemes for higher data rates.
Nyquist (1924) studied the problem of data transmission for a fine
bandwidth noiseless channel.
Nyquist states:
- If a signal has been run through a low-pass filter of bandwidth
H, the filtered sample can be completely reconstructed by making
2H samples.
The important corollary to Nyquist's rule is that sampling more often
is pointless because the higher frequencies have been filtered
out.
- If the encoding signal method consists of V states:
maximum data rate = bps
What's the maximum data rate over phone lines?
Going back to our telephone example, Nyquist's theorem tells us
that a one-bit signal encoding can produce no better than:
bps.
But there is a catch. In practice, we don't come close to
approaching this limit, because Nyquist's rule applies only to
noiseless channels.
In practice, every channel has background noise. Specifically:
- Thermal noise results from thermal agitation of electrons in a
conductor. It cannot be eliminated, and depends on the temperature,
bandwidth, and Boltzman's constant K. Is uniformly distributed across
the frequency spectrum and thus called white noise.
- Intermodulation noise results when different frequencies share
the same transmission medium; unwanted signals often appear at
frequencies that are the sum or differences of the two frequencies.
- Crosstalk noise results from unwanted coupling between
signal paths. Hearing another conversation (faintly) on a
telephone connection is an example of crosstalk.
- Impulse noise consists of sharp, shortlived disturbances, from
such sources such as lightning. Stallings Fig 2.15.
How do we measure (or quantify the amount of) background noise?
The signal-to-noise ratio is a measure of the unwanted noise
present on a line. It is expressed in decibels (db) and given by:
Shannon's theorem gives the maximum data rate for channels
having noise (e.g., all real channels). Shannon's theorem
states that the maximum data rate of a noisy channel of
bandwidth H, signal-to-noise ratio of S/N is given by:
max data rate =
Note: the signal to noise ratio S/N used in Shannon's theorem
refers to the ratio of signal power to noise power, not the ratio
expressed in dbs (decibels). Unlike Nyquist's limit, Shannon's limit
is valid regardless of the encoding method.
Let's consider a phone line again. A typical value for the S/N
ratio for phone lines is 30db.
.
Thus, the maximum data rate bps.
But wait -- don't modems deliver data at 38.4 and 56 kbps?
Many modem companies advertise that their modem
deliver higher data rates, are they lying? Not necessarily.
Read the fine print. Most likely, the modem uses data compression,
and the high data rate is achieved only with text data.
Let's summarize what Nyquist and Shannon say:
- Nyquist: sampling a received signal more frequently than
2H (where H is the bandwidth of the channel) is pointless.
- Nyquist: maximum data rate bps, where H is
the bandwidth of the channel, and V is the number of distinct
encodings for each baud. This result is a theoretical upper bound on
the data rate in the absence of
noise.
- Shannon: maximum data rate , where S/N is
the ratio of signal power to noise power. Note that Shannon's
result is independent of the number of distinct signal encodings.
Nyquist's theorem implies that we can alway increase the data rate by
increasing the number of distinct encodings; Shannon's limit says that
is not so for a channel with noise.
Guided (a physical path) vs. unguided media (waves propagated, but not in a
directed manner).
Summarized in Fig 2-11 (Tanenbaum) and Table 3.1 (Stallings).
What's the most cost effective way to transmit large quantities of
data? Federal Express!
One of the most common ways of transporting information is via
magnetic tapes. For instance, 8mm cassette tapes hold over 1GB of
data. These tapes are the same ones used in camcorders and are
cheap (;SPMlt; $20). Indeed, newer generation machines cram 5GB of data
onto a single tape. When sending large quantities of data, sending
tapes is still the most cost effective way to go.
Today, DAT digital audio tape storage devices are also common.
The tape itself is smaller than an audio cassette, costs a few
dollars. DAT tape drive units cost about $1200 now and may someday
cost less than VCRs. (Note: here is another example where
standardization promotes economy of scale -- the same DAT technology
works for both audio and data storage.)
Main drawback? High delay in accessing data. It takes minutes
to hours to days to physically transport the cassette from one
location to another.
In twisted pair technology, two copper wires are strung between sites:
- The two wires are typically ``twisted'' together in a helix
to reduce interference between the two conductors.
- Can carry analog or digital signals. Actually, they carry
only analog signals. However, the ``analog'' signals can very closely
correspond to the square waves representing bits, so we often think of
them as carrying digital data.
- Data rates of several Mbps common.
- Spans distances of several kilometers.
- Data rate determined by wire thickness and length. In
addition, shielding to eliminate interference from other wires impacts
S/N, and ultimately, the data rate.
- Good, low-cost communication. Indeed, many sites already
have twisted pair installed in offices -- existing phone lines!
With ``coax'', the medium consists of a copper core surrounded
by insulating material and a braided outer conductor.
The term baseband indicates digital transmission (as opposed to
broadband analog).
Physical connection consists of metal pin touching the copper core.
There are two common ways to connect to a coaxial cable:
- With vampire taps, a metal pin is inserted into the
copper core. A special tool drills a hole into the cable,
removing a small section of the insulation, and a special connector is
screwed into the hole. The tap makes contact with the copper core.
- With a T junction, the cable is cut in half, and
both halves connect to the T junction. A T-connector is
analogous to the signal splitters used to hook up multiple TVs to the
same cable wire.
Data rate depends on physical properties of cable, but 10 Mbps is
typical.
The term broadband refers to analog transmission over
coax. (Note, however, that the telephone folks use broadband to refer
to any channel wider than 4 kHz). The technology:
- Typically bandwidth of 300 MHz, total data rate of about
150 Mbps.
- Operates at distances up to 100 km (metropolitan area!).
- Uses analog signaling.
- Technology used in cable television. Thus,
it is already available at sites such as universities that may have TV
classes.
- Total available spectrum typically divided into smaller channels
of 6 MHz each.
That is, to get more than 6MHz of bandwidth, you have to use two
smaller channels and somehow combine the signals.
- Requires amplifiers to boost signal strength; because amplifiers are
one way, data flows in only one direction.
Two types of systems have emerged:
- Dual cable systems use two cables, one for
transmission in each direction:
- One cable is used for receiving data.
- Second cable used to communicate with headend.
When a node wishes to transmit data, it sends the data
to a special node called the headend. The headend then resends
the data on the first cable. Thus, the headend acts as a root of the
tree, and all data must be sent to the root for redistribution to the
other nodes.
- Midsplit systems divide the raw channel into two smaller
channels, with each subchannel having the same purpose as above.
Which is better, broadband or baseband? There is rarely a simple
answer to such questions.
Baseband is simple to install, interfaces are inexpensive, but
doesn't have the same range. Broadband is more complicated, more
expensive, and requires regular adjustment by a trained technician,
but offers more services (e.g., it carries audio and video too).
In fiber optic technology, the medium consists of a hair-width
strand of silicon or glass, and the signal consists of pulses
of light.
For instance, a pulse of light means ``1'', lack of pulse means
``0''.
Three components are required:
- Fiber medium: Current technology carries light pulses for
tremendous distances (e.g., 100s of kilometers) with virtually no
signal loss.
- Light source: typically a Light Emitting Diode (LED) or
laser diode. Running current through the material generates a pulse of
light.
- A photo diode light detector, which converts light pulses into
electrical signals.
Advantages:
- Tremendously high data rate, low error rate. 1000 Mbps (1 Gbps)
over distances of kilometers common. Error rates are so low they are
almost negligible.
- Difficult to tap, which makes it hard for unauthorized taps as
well.
How difficult is it to prevent coax taps? Very difficult indeed,
unless one can keep the entire cable in a locked room!
- Much thinner (per logical phone line) than existing
copper circuits.Because of its thinness, phone companies
can replace thick copper wiring with fibers having much more capacity
for same volume. This is important because it means that aggregate
phone capacity can be upgraded without the need for finding more
physical space to hire the new cables.
- Not susceptible to electrical interference (lightning) or
corrosion (rust).
- Greater repeater distance than coax.
Disadvantages:
- Difficult to tap. It really is point-to-point technology.
In contrast, tapping into coax is trivial. No special training or
expensive tools or parts are required.
- One way channel. Two fibers needed to get full duplex
(both ways) communication.
- long-haul trunks--increasingly common in telephone network (Sprint ads)
- metropolitan trunks--without repeaters (ave 8 miles in length)
- rural exchange trunks--link towns and villages
- local loops--direct from central exchange to a subscriber (business
or home)
- local area networks--100Mbps ring networks.
Direction of the future.
Line-of-sight technology is used when running a physical cable
(either fiber or copper) between two end points is not
possible.
For example, running wires between buildings is probably not legal
if the buildings are separated by a public street.
Infrared signals typically used for short distances (across the
street or within same room),
Microwave signals commonly used for longer distances (10's of km).
Sender and receiver use some sort of dish antenna.
Difficulties:
- Weather interferes with signals. For instance, clouds,
rain, lightning, etc. may adversely affect communication.
- Radio transmissions easy to tap. A big concern for
companies worried about competitors stealing plans.
- Signals bouncing off of structures may lead to out-of-phase
signals that the receiver must filter out.
Satellite communication is based on ideas similar to those used
for line-of-sight. Characteristics:
- Satellite typically placed in geosynchronous
orbit 36,000 km above earth; satellite never ``moves''
relative to ground stations. This is important because if the
satellite moves, the ground antenna must follow its movements.
- Satellite typically acts as a repeater,
receiving signals from earth on one channel and rebroadcasting them on
another. Satellite may rebroadcast data over an area covering
large fraction of the earth's surface.
- Number of geosynchronous satellites limited (about 90 total, to
minimize interference).
- International agreements regulate how satellites are used, and
how frequencies are allocated.
- Weather effects certain frequencies.
- Satellite transmission differs from terrestrial communication in
another important way: One-way propagation delay is
roughly 270 ms. In interactive terms, propagation delay alone inserts
a 1 second delay between typing a character and receiving its echo.
Comparison/contrast with other technologies:
- Propagation delay very high. On LANs, for example,
propagation time is in nanoseconds -- essentially negligible.
- One of few alternatives to phone companies for long distances.
- Uses broadcast technology over a wide area -- everyone on earth
could receive a message at the same time!
- Easy to place unauthorized taps into signal.
Satellites have recently fallen out of favor relative to fiber.
However, fiber has one big disadvantage: no one has it coming into
their house or building, whereas anyone can place an antenna on a roof
and lease a satellite channel.