Chapter 5: Physical Layer—Signal encoding
When a signal (either analog or digital) such as a voice signal or data signal needs to be transmitted, the signal is often transformed (modified) into a form that is more suitable for the transmission medium. This process of changing the original signal into another form is called as “encoding”.
There are two kinds of source signals; analog and digital. And there are two kinds of transmission systems; one designed to carry analog signals and one designed to carry digital signals. Therefore, we have four cases when we transmit signals.

(a) A à A : An analog signal transmitted through an Analog transmission system This A à A mode is not interesting to us. Example: AM or FM broadcasting
Physical layer standards: AM or FM broadcasting standards (by FCC)
(b) A à D : An analog signal transmitted through a Digital transmission system
Example: Voice (Analog) is digitized and transmitted through Digital telephone system
Physical layer standards: T-carrier, E-carrier standards
(c) D à A : A digital signal transmitted through Analog transmission system
Example: Modem communication in which digital data is transmitted through analog telephone system
Physical layer standards: MODEM standards (e.g. V.34, V.90)
(d) D à D : A digital signal transmitted through Digital transmission system
Example: Ethernet LAN
Physical layer standards: LAN standards (e.g. IEEE 802.x)
In the following sections, we will discuss each of the above cases except the first case; an analog signal transmitted through an Analog transmission system.
5.1 A to D (Analog signals through a Digital transmission system)
A digital transmission system is designed to carry digital signals only. If we need to transmit an analog source signal such as a voice signal, we must digitize the analog signal. This A/D (Analog to Digital) conversion is called as “digitization” or “sampling”.
There are several techniques for digitization; PCM (Pulse Code Modulation), DM (Delta Modulation), DPCM (Differential Pulse Code Modulation), etc. In this book only the PCM will be discussed since it is the most widely adopted technique in digital telephone systems worldwide.
Before we look into the digitization techniques we need to address the trend toward “digital transmission system”. A case in point is the fact that most of the long distance telephone systems in the U. S. is by digital system. Here is the list of advantages of a digital system compared to an analog system.
a) Easier integration of voice, data and video—When all source signals are digitized, they can be treated equally. In other words, in a digital transmission system, there is only one kind of signal that is transmitted; bits.
b) Digital transmission systems are cheaper than analog systems—Due to the advances in digital technologies (computers, chips, VLSI, etc.), digital transmission systems are more economical.
c) Digital transmission systems achieve a higher quality transmission than analog systems mainly due to the “higher Signal to Noise ratio(S/N)”. Digital transmission systems use “repeaters (or sometimes called as regenerators)” rather than the “amplifiers” that are used in analog systems. Let’s look at the following figures for their differences.


As illustrated in the above figures, analog systems need amplifiers to boost signals every few miles. Therefore, when noise is introduced in the path of the transmission, the amplifiers can not differentiate between the source signal and the noise. So, noise is amplified along with the signal. In a long distance transmission with many amplifiers in the path, noise will accumulate along the path. The signal to noise ratio becomes smaller and smaller as the distance increases.
In a digital system, a repeater will reshape (regenerate) the distorted (by noise and by attenuation) signal. Each repeater will transmit a cleaned signal every time unless the noise is big enough to change a “0” into a “1” or vice versa. The signal to noise ratio in a digital system is much less dependent upon the distance than in an analog system. Therefore, we say that a digital system achieves a higher Signal to Noise ratio(S/N).
d) Encryption is easier—For a secure communication, encryption is a necessity in a modern network. Encryption is much easier in a digital system than in an analog system.
e) Manipulation of the signals is much easier in a digital system—Signaling (sending control information such as a dialed number in a telephone system), Switching (changing the route of information such as long distance telephone switching), and Multiplexing(combining multiple signals into one channel) are much easier.
There are only few disadvantages of a digital system. One of them is the fact that when we digitize the original signals such as voice, telemetry, video and others, they often require more channel bandwidth than the bandwidth they require prior to the digitization. Another disadvantage is that we can not accurately represent the signals. There always be something called as “quantization noise” which will be explained below. These disadvantages diminish when we employ the transmission media with high bandwidth such as fiber optic systems, higher sampling rate, and more bits for a sample.
Let’s look at an example of the case for “An analog signal transmitted through a Digital transmission system”. The foremost important example is the PCM system employed in a long distance telephone system. We will look at the system used in North America known as the T-carrier. T-carrier was developed in the early 1960s by AT & T.
T-1 carrier, as all other T-carrier systems do, uses PCM (Pulse Code Modulation) technique as the digitization method to multiplex 24 digitized voice signals into a Twisted Pair. The “T” stands for “Twisted”.

In the
above figures, a voice signal is sampled at the rate of 8000 samples/sec and
each sampled voltage is converted into 7 bits according to its height. This
process is called as “sampling” and “quantization”. The sampling rate is 8000
samples/sec and the quantization levels are 128 levels(27 levels
when 7 bit PCM is used). Some systems such as ITU-T version use 8 bits (8 bit
PCM).
The sampling rate is determined to represent the signal with reasonable accuracy. Given the bandwidth of a voice between 300Hz to 3400Hz, let’s extend the bandwidth to 4000Hz for more accuracy and to reduce interference between adjacent voice signals. Therefore, we assign 4000Hz (0Hz to 4000Hz) to a voice. Now to represent the voice digitally, we need to determine how many samples we should take per second. Borrowing from Nyquist’s sampling theorem, the minimum sampling rate should be
(2 x Highest frequency content) = 2 x 4000 = 8000 samples/sec
Nyquist’s sampling rate is illustrated by the following figures.


From http://www.geocities.com/bioelectrochemistry/nyquist.htm
Let’s calculate the data rate of T-1 carrier system:
T-1 data rate =( ( (7 bits/sample + 1 bit for signaling) x 24 channels ) + 1 bit for framing ) x 8000 samples/sec
= 1.544 Mbps
Each channel’s data rate = (7 bits/sample + 1 bit for signaling) x 8000 samples/sec = 64 Kbps
Each channel’s payload = The actual data excluding the signaling bits
= (7 bits/sample) x 8000 samples/sec = 56 Kbps
T-1 carrier’s payload = The actual data excluding the signaling bits and the framing bits = (7 bits/sample) x 24 = 1.536 Mbps


The initial T-1 carrier worked as described above but you may notice that the signaling bits are overly designed. In actual systems, the signaling bits are idling(not carrying information) most of the time. There ways to improve the efficiency with clever framing so that each channel can achieve almost 64 Kbps(called as a “clear channel”) instead of 56 Kbps. The framing methods are called; Superframe format and Extended-superframe format.
* Quantization noise
When we take a sample and quantize(change the analog voltage to bits), some inaccuracy is introduced. Look at the following figure.
Quantization noise(from http://www.atis.org/tg2k/images/quantic.gif )

-
A quantization noise is the difference between the actual signal’s voltage and the quantized voltage. If we use more bits per sample, we can reduce the quantization noise. Typically, 7 or 8 bits are used(per sample) for telephone voice systems(T-carrier systems) and 16 bits are used for music CD systems.
* T-carrier hierarchy

T-1 is a high speed digital carrier system (1.544 mbps) developed by AT&T in 1957 and implemented in the early 1960's to support long-haul voice transmission.
* Usage of T-carrier
T-carriers are used extensively on many avenues of telecommunication and networking:
· Majority of telephone networks are made with T-carriers in U.S.
· A large LAN connecting to an ISP uses T-carriers
· T-carriers are used for Internet backbone networks such as NSFNET backbone
Visit http://www.nthelp.com/maps.htm to see other maps for backbone networks.
We looked at the A à D case (Analog Signal transmitted over Digital Transmission System) and looked at T-Carrier system as an example. One might ask a question: “Why do we worry about sending analog signal? Aren’t we concerned about sending digital signals?”
The answers to the questions are:
· Many signals are analog signals naturally. Examples are voice signals, video signals, etc. They need CODEC (Code & Decoder) to covert them to digital signals and back to analog signals. Example of a CODEC is the circuit used in T-carrier system.
· Most of the long distance digital systems (such as t-carriers and SONET) are originally designed to carry voice and video signals. Now, when those signals are digitized, they can coexist with digital signals such as data signals on Internet (e-mails, web pages, ect.)
· As we know from the history of networking, NSFNET backbone was made from T-carriers.
· Modern Internet structure is made up of various digital systems and among them the T-carrier and the likes occupy a considerable part.
5.3 D to A (Digital signals through an Analog transmission system)
This is the case involving modems and telephone lines. Computers generate digital signals but the majority of telephone connections in local loop (subscriber loop—the lines going from subscribers to local switching offices) still operate in analog signals. Digital subscriber loop are gradually replacing these old analog lines. DSL (Digital Subscriber Loop) is one of the dominating technologies currently. But an ordinary telephone line is still analog unless you subscribe to a DSL carrier.
Since the analog lines can not directly carry digital signals, we need to change the digital signals into analog signals and at the receiving end, analog signals into digital signals. Modems achieve this. Modems modulate (change digital to analog) and demodulate (analog to digital).
There are several techniques that can be used for modulation and demodulation. They are ASK, FSK, PSK.


· ASK (Amplitude Shift Keying): Binary values (0 and 1) are represented by two different amplitudes of the carrier frequency. For example, binary 0 is represented by 0 volts (no signal) and binary 1 is represented by a sine wave of the carrier frequency. In other words, 0 by absence of carrier and 1 by presence of the carrier signal. This is not widely used anymore in modems.
· FSK (Frequency Shift Keying): 0 is represented by a signal of one frequency and 1 is represented by another frequency. FSK is less susceptible to error than ASK but usually FSK requires more bandwidth than ASK. This also is not used anymore in modems.
· PSK (Phase Shift Keying): This scheme uses the Phase shifts (shift from the carrier signal) to represent data. For example, 0 is represented by no shift (0 degree shift, therefore it is the same signal as the carrier) and 1 is represented by the carrier shifted 180 degrees. PSK and its variations are most widely used in modern modems.
· QAM (Quadrature Amaplitude Modulation): This is one of the most commonly used techniques in modems. It combines ASK and PSK to achieve multibit modulation in which one signal carries more than one bit.

The above figure shows a QAM which carries 3 bits per signal. For example, a signal with Amplitude of 1 and Phase shift of None carries 3 bits(000). In this case, we have 3 bits per baud. This system can be called as 3-QAM(3 bits per baud QAM). There are several QAMs that are commonly used; 4-QAM, 16-QAM, 64-QAM.

For example, V.34 modem uses 16-QAM to achieve up to 33600 bps.
Modem technology is still widely used in conventional modems(analog modems) but also popularly used in DSL modems. The difference between the two modes of using modems, analog modems and DSL modems, is mainly in the way how the modems are connected.
When using an analog modem, a PC is connected to a modem(usually into PC’s internal bus) and the modem is connected to an analog telephone line. In the case of a DSL line, a PC is connected to a network card (usually an Ethernet card) and the network card is connected to an Ethernet port on a DSL Modem, then the DSL Modem is connected to DSL telephone line.

Physical layer standards: There are many standards for D to A case. They are standards related to modem:
· The standards for the DTE (computer) to DCE (modem) interface point are RS232D, RS449, etc.
· The standards for the DCE (modem) to Telephone line interface are the V-series standards(V.34, V.90, etc.) of ITU-T.
·
The standards for DSL modems are
the G-series standards (
G.992(ADSL), G.991.2, etc.)
5.3 D to D (Digital signals through a Digital transmission system)
A fundamental question we might ask is: “We are sending digital signal through digital transmission system. Doesn’t a digital signal fly in a digital transmission system? Why do we worry about this case?”
It is true that a digital signal flows through a digital transmission system but it works only if the signal is in a proper digital form. In other words, a given digital transmission system transmits signals only in a specific form; voltages, pulse shape, and other electrical characteristics dictate this.
The bottom line is: We need to change a digital signal into the proper form for the given transmission system.
As an example, the digital signals used inside a PC are pulses of 0 volts (bit 0) and 5 volts (bit 1). They are not in a proper form for an Ethernet LAN. They need to be changed into the form acceptable for an Ethernet LAN. The changing of a digital signal into another form is called as “encoding” and it is done in network cards.
5.2.1 Digital Encoding Methods
There are several ways for encoding digital signals.

· NRZ-L (Non Return to Zero):
0 = Low voltage level
1 = High voltage level
This is code used internally in computers, often called as “binary 0” and “binary 1”.
This code creates a problem for communication since a long stream of zeros and a long stream of 1s are flat voltages and may cause a receiver to lose “synchronization (recognition of bit boundaries)”.
This code can be used in short distance (e.g. inside a computer) only. In other words, this code is not suitable for communications.
· RZ (Return to Zero):
0 = No signal
1= High voltage returns to zero (no voltage) in the middle of a bit
This code is not used in communications.
· Manchester code:
0 = Transition from high to low in the middle of a bit
1= Transition from low to high in the middle of a bit
(The second half of a bit represents the bit)
This code is used in 10 Mbps Ethernets (10Base5, 10Base2, 10BaseT)
Since both 0 and 1 have mid-bit transitions, there is less DC content. More importantly, this code is “self-clocking (or self-synchronizing)” code since a receiver can extract the clock information from the incoming codes by looking at the ever-present middle transitions. One disadvantage of this code is that it has larger bandwidth than other codes. This aspect is evidenced by the more frequent ups and downs than other codes in the figure.
· Bipolar AMI(Alternate Mark Inversion): (or simply Bipolar)
0 = No signal (0 volts)
1 = Alternate Positive (+) and Negative (-) voltages for successive 1’s
This code is used in long distance digital telephone lines (T-carriers). This code reduces the DC(Direct Current) content from the line; the 1’s will have positive voltage followed by negative voltage, in other words, the voltages go up and down. This reduced DC in a line is good since DC content tends to deteriorate equipment faster than AC content.
This code has a problem. A long stream of 0’s can cause a receiver to go out of synchronization (lose the bit boundaries) since 0’s have no voltage. The commonly used cures are B8ZS and HDB3.
§ B8ZS (Binary 8-Zero Substitution): To eliminate the synchronization problem, every stream of 8 zeros is substituted with a predefined 8 pulses which uses intentional Bipolar code violations. This code is used in T-carrier systems.
§ HDB3 (High-Density Bipolar 3-Zeros) : It is a variation of Bipolar encoding in which a string of 4 zeros is replaced by a predefined 4 pulses which uses intentional Bipolar code violations. This encoding is used in Europe and Japan.
|
Transmitted data |
HDB3 Encoded Pulses |
|
0 |
0 |
|
1 |
Alternate Mark Inversion(AMI) |
|
0000 |
000V(3 zeros and a Violation) |
|
0000 0000 |
B00V B00V(B is regular Bipolar code) |

Figure 5.6 of Stallings
· mB/nB coding: m and n are integers and the commonly used combinations are 4B/5B and 8B/10B codes.
4B/5B code is used in FDDI (Fiber Distributed Data Interface—100 Mbps fiber optic ring network) and 100 Mbps Ethernet. 8B/10B code is used for IBM’s Fiber Channel and Gigabit Ethernet. Let’s look at the 4B/5B code as an example. In 4B/5B code, each 4 Bits of data is encoded with 5 Bits of code. The 5 Bit code is carefully chosen to have enough ups and downs to aid bit synchronization and also to reduce DC contents. The 5 Bits are transmitted in NRZI (Non Return to Zero Inverted) form.
Here is the encoding table for 4B/5B code used in FDDI.

Why 4B/5B and 8B/10B codes?
These codes use channel bandwidth more efficiently than other codes such as Manchester code used in 10 Mbps Ethernets. The code efficiency of Manchester code is 50% since two signals (high to low = 0 and low to high = 1) to represent 1 bit. When the data rate is increased to 100 Mbps or to 1 gigabits/sec, the synchronization becomes less sensitive (since bits are coming in so fast) but the efficient use of bandwidth becomes more important. The efficiency of 4B/5B is 80%. 8B/10B code is more efficient. The 8B/10B code has another interesting advantage. Since it is designed to transmit the same number of ones as zeros, it maintains a DC (Direct Current) balance.
All of the mB/nB codes can easily be implemented in digital logic. Therefore, the encoding and decoding is very fast. As the speed of transmission increases, the numbers (m and n of mB/nB) will also increase.