\documentstyle[11pt,psfig]{article}
\setlength{\oddsidemargin}{0in}
\setlength{\evensidemargin}{0in}
\setlength{\topmargin}{0.0in}
\setlength{\headheight}{0in}
\setlength{\headsep}{0in}
\setlength{\textwidth}{6.5in}
\setlength{\textheight}{9.4in}
\setlength{\parindent}{0in}
\setlength{\parskip}{0.1in}
\begin{document}
\title{Computer Networks: the Physical Layer}
\author{Norman Matloff \\
Dept. of Computer Science \\
University of California at Davis}
\date{April 15, 1996}
\maketitle
\section{Media}
Network signals might be propagated through {\it guided} media
such as metal wires (twisted pairs, coaxial cable, etc.) or optical
fibers (flashing light, off for 0, on for 1), or in free space, such
as with radio waves or microwaves.
\section{Signal Types}
A signal may be in {\it digital} form, i.e 0-1 bits with a low
voltage meaning 0 and a high voltage meaning 1. The graph of
a digital signal over time has a ``square wave'' shape.
On the other hand, {\it analog} forms look ``wavy.'' A modem,
for instance, sending a low-pitched sound for a 0 and a high pitch
for a 1; the sounds themselves look like sine waves when graphed
against time.
\section{Data Types}
Just as the signals of interest can be either digital or analog,
the data encoded by those signals could be either digital, such
as numbers or characters, or analog, such as voices.
Either type of data can be encoded within either type of signal.
We noted above, for instance, that a modem encodes digital data
onto analog signals. Voice data, on the other hand, though inherently
analog, can be {\it digitized}: A person's voice graphed against
time is a continuous curve, but we can sample it at regular intervals,
typically 8,000 times per second. At each sample point, we record
the numerical height of the curve (i.e. the numerical value of the
loudness). This gives us numbers, which comprise digital data.
\section{Spectral Analysis}
Recall from calculus that we can write a function x(t) as a
Taylor series, which is an ``infinite polynomial'':
$$
x(t) = \sum_{n=0}^{\infty} c_n t^n
$$
Recall also that we say a function x(t) (where t is time) is
{\it periodic} with period T if if x(u+T) = x(u) for all u.
The {\it fundamental frequency} of x is then
$$
f_0 = {1 \over T }
$$
Suppose x(t) is a digital or analog periodic signal transmitted in
some transmission medium. We can write x as an ``infinite
trig polynomial,'' i.e. a {\it Fourier series}:
$$
x(t) = {\sum_{n=0}^{\infty } {a_n} \cos ( 2 \pi n f_0 t)} +
{\sum_{n=1}^{\infty} {b_n} \sin ( 2 \pi n f_0 t)}
$$
Here, instead of having a series of terms
$$
1 ,\ t ,\ t^2 ,\ t^3 ,\ ...
$$
as in a Taylor series, we have a series of terms
$$
1 ,\ \cos (2 \pi f_0 t) ,\ \cos (4 \pi f_0 t) ,\ \cos (6 \pi f_0
t),\ ...
$$
and similar sine terms. Note that these are cosines and sines
of frequences which are integer multiples of the fundamental frequency
of x.
The set of coefficients \{${a_n}$\}, \{$ {b_n}$\} is called the
{\it frequency spectrum} of x.\footnote{We can also write x as an
\underline{integral} of trig functions, rather than a sum of such
functions. Then the spectrum is a continuous range of numbers,
rather than the discrete points $a_n$ and $b_n$. We will not
pursue this point here.} The coefficients are calculated as
follows:
$$
a_0 = \frac{1}{T} \int_0^T x(t) dt
$$
$$
a_n = \frac{2}{T} \int_0^T x(t) cos(2 \pi n f_0 t) dt
$$
$$
b_n = \frac{2}{T} \int_0^T x(t) sin(2 \pi n f_0 t) dt
$$
Strictly speaking, the signals we send are not periodic. Consider,
for example, a text file transfer, transmitted as a digital signal.
The characters in the file do not follow a periodic pattern, and
thus the bits we send do not follow a periodic pattern, and thus the
graph of the signal against time will not be periodic. However, for
the purpose of analyzing the speed capacity of a given physical
medium to transmit the data, we can imagine the signal to be periodic.
If for instance the text file includes the sentence ``The quick brown
fox jumped,'' we can ask how fast the medium could transmit the
corresponding signals if the sentence were to be transmitted again
and again (resulting in periodic signals). And for voice data
transmitted in analog form, for instance, the signals are periodic
during short time intervals.
\section{Bandwidth}
Any transmission medium has a natural range [$f_{min}$,$ f_{max}$]
of frequencies that it can handle well. For example, an ordinary
voice-grade telephone line can do a good job of transmitting signals
of frequencies in the range 300 Hz to 3400 Hz, where ``Hz'' means
cycles per second. Signals of frequencies outside this range suffer
fade in strength, i.e are {\it attenuated}, as they pass through the
phone line.
Thus, although your voice is a mixture of many different frequencies,
represented in the Fourier series for your voice's waveform, the
really low and really high frequency components (below 300 Hz and
above 3400 Hz) tend not to reach the listener at the other end. This
causes some distortion, which explains why your voice sounds a little
different on the phone than in person. However, the difference is
slight, because the 300-3400 Hz range includes most of the strong
components in the human voice, where a component is ``strong'' if its
coefficient $a_n$ or $b_n$ is large.
We then refer to this [300,3400] interval as the {\it effective
bandwidth} (or just {\it bandwidth}) of your voice waveform. The
word ``effective'' here refers to the fact that this range covers
``most'' of your voice, so that the listener hears only a slightly
distorted version of your voice. Similarly, [300,3400] is the
bandwidth of the phone line. Since it matches that of your voice,
voice transmission through phone lines is of good quality.
For reasons which will become clear later, we often use the term
``bandwidth'' to literally refer to width, i.e. the width
of the interval [$f_{min}$,$ f_{max}$], $f_{max} - f_{min}$.
However, for now, the term will refer to the interval itself.
There is huge variation in bandwidth among transmission media.
As we have seen, phone lines have bandwidth intervals covering
values from around $10^2$ to $10^3$. For optical fibers, these
numbers are more on the order of $10^{15}$.
Suppose that for a given medium $f_{min} = f_0$ and
$f_{max}$ = N $f_0$. Then the signal
$$
x(t) = {\sum_{n=0}^{ \infty } {a_n} \cos ( 2 \pi n f_0 t)} +
{\sum_{n=1}^{ \infty } {b_n} \sin ( 2 \pi n f_0 t)}
$$
is truncated by the transmission medium to
$$
x_N(t) = {\sum_{n=0}^{ N } {a_n} \cos ( 2 \pi n f_0 t)} +
{\sum_{n=1}^{ N } {b_n} \sin ( 2 \pi n f_0 t)}
$$
i.e. an error is made and x(t) is distorted. The larger N is, the
less distortion. For any given signal, the higher $f_{max}$ of the
transmission medium, the less distortion.\footnote{Or, if we fix a
given level of quality for the received signal, the large N is, the
more signals we can {\it multiplex} onto the given medium. This will
be explored later.}
Now from calculus, for any given signal x(t),
$$
{a_n},{b_n} \to 0 \ \ as\ n \to \infty
$$
Thus, the $a_n$ and $b_n$ get small after a while, say, after $a_M$ and $b_M$.
So,
$$
x_M(t) = {\sum_{n=0}^{ N } {a_n} \cos ( 2 \pi n f_0 t)} +
{\sum_{n=1}^{ N } {b_n} \sin ( 2 \pi n f_0 t)} \approx x(t)
$$
As long as we send x(t) along a transmission medium for which
$M \leq N$, x(t) will be received with reasonable fidelity.
\section{Signal Modulation}
If we send data in their original form, this is called {\it baseband}
transmission. A much more flexible alternative is {\it broadband}
transmission, in which we {\it modulate}, i.e. transform the data.
We have already mentioned {\it frequency shift keying} (FSK), in
the case of sending digital data with a modem. A specific high
frequency is used to represent a 1, and a somewhat lower frequency
is used for a 0. The waveforms would now be sine waves, rather
than the square wave pattern one has with digital signals.
The ``AM'' in ``AM radio'' stands for {\it amplitude modulation}.
Here analog data, say voice, is still sent in an analog signal, but
in the form of a product of the orginal data and a sine wave (or a
cosine wave, which is after all just a sine wave which has been
``moved over''). Say x(t) is the voice waveform, and consider a
radio station at a {\it carrier frequency} $g_c$ (this is the
frequency at which you tune your radio in order to receive that
station's broadcast). Then the radio station will transmit the
product
$$
p(t) = x(t) cos(2 \pi g_c t)
$$
What is the effect of this? Well, x(t) has a Fourier series, as
we have seen above. Consider one cosine term in that series,
$$
{a_n} \cos ( 2 \pi n f_0 t)
$$
What will happen when this term gets multiplied by $cos(2 \pi g_c t)$?
Using high-school trig identities, we can show that
$$
cos(a) cos(b) = \frac{1}{2} [cos(a+b) + cos(a-b)]
$$
so
$$
{a_n} \cos ( 2 \pi n f_0 t) \cdot cos(2 \pi g_c t) =
\frac{a_n}{2} [cos(2 \pi [g_c+n f_0]t) + cos(2 \pi [g_c-n f_0]t)]
$$
In other words, the component which was of frequency $n f_0$ in the
original voice waveform x(t) has now been transformed into two
frequencies centered around the radio station's carrier frequency
$g_c$: $g_c+n f_0$ and $g_c-n f_0$.
Now the Federal Communications Commission, which regulates radio
stations, will make sure that the $g_c$ values for various radio
stations are spaced well apart. So the bandwidth interval for a
given station will be a {\it channel}
$$
[g_c - d, g_c + d]
$$
for some value of d. You can see that since the bandwidth
interval for human voice is about [300,3400], setting
$$
d \geq 3400
$$
will ensure that radio stations at a given geographical location
and having adjacent carrier frequencies will not interfere with
each other. Actually, we can do better than this, with cleverer
modulation techniques (actually cutting d in half), but all we are
trying to do here is illustrate the principle.
\section{Effect of Bandwidth on Transmission Rates}
Suppose we are sending the bit pattern 101010101010..., and that
in our transmission medium a level (say volts, or maybe tenths of
volts), a 1 represent a 1 bit and a -1 represents a 0. Suppose
we are sending at the rate of $2 \times 10^6$ bits per second,
i.e. 2 MHz.
Then the waveform would have the value 1 between (say) -0,25T and
0.25T, -1 between 0.25T and 0.75T, 1 between 0.75T and 1.25T, and
so on, where T is the period of the function, $10^{-6}$
seconds.\footnote{We have started at -0.25T so as to make the
graph symmetric around 0, thus resulting in no sine terms in
the Fourier series. Clearly, it does not matter where we start
the definition of time.} The frequency $f_0$ would be equal to $10^6$.
Let us see how well the first five terms of this waveform's Fourier
series would approximate the waveform. Using the formulas above,
we would obtain
$$
\frac{4}{\pi}
[cos(2 \pi \cdot f_0 t) -
\frac{1}{3} cos(2 \pi \cdot 3 f_0 t) +
\frac{1}{5} cos(2 \pi \cdot 5 f_0 t)]
$$
Using microseconds for our horizontal axis, a plot of this series
would look like this:
\vspace{0.2in}
\par
\psfig{file=Sine5.PS}
\par
Not a bad approximation to the original waveform! We could design
circuitry that would be able to distinguish well between a 1 bit and
a 0 bit in this case.\footnote{Of course, this is not accounting
for other factors, such as further distortion of the waveform, such
as by line noise.}
So, to be able to transmit 101010... at 2 MHz, without modulating
the signal, we would need to have a transmission medium with
effective bandwidth interval having $f_{min} \leq 10^6$ and
$f_{max} \geq 5 \times 10^6$.
{\it The point of all this is that the bandwidth of the transmission
medium determines the maximum bit rate at which one can send.}
What if the bit sequence we wish to transmit in the above example
had been 110011001100...? You can just imagine the waveform
``stretching'' by a factor of 2, so that $f_0$ would be cut in
half, as would the bandwidth of the signal. Thus we could get
by with a transmission medium with half the effective bandwidth.
For digital data, though, we typically will expect all possible
bit patterns, and thus must deal with the case for which $f_0$
is largest, i.e. 101010...
Now, if we modulate the signal, say by shifting as in the AM radio
example above, what really counts is the {\it difference} between
the highest and lowest frequency, in this case $4 \times 10^6$.
Consider for example microwave transmission, which has a bandwidth
interval spanning numbers on the order of $10^9$ to $10^{11}$. We
could partition that huge interval into many subintervals (again,
channels, as with AM radio stations), each of width $4 \times 10^6$,
and thus send many digital data streams simultaneously.
Again, there are many refinements to this which are used in actual
practice, but the basic principles are clear: If we use broadband
trasmission (on any medium, not just radio or microwave), we can
send many signals at different frequencies, with the spacings
between adjacent frequencies being determined by the difference
between the highest and lowest frequencies in the original signal,
such as $4 \times 10^6$ in the example here. This is called
{\it frequency division multiplexing}.
\end{document}