Analog telephony is almost dead as you may know. In the PSTN, the famous Last Mile is the final remaining piece of the telephone network still using technology pioneered well over a hundred years ago.

“The Last Mile” is a term that was originally used to describe the only portion of the PSTN that had not been converted to fiber optics: the connection between the central office and the customer. The Last Mile is more than that, however, as it also has significance as a valuable asset of the traditional phone companies; they own a connection into your home. The Last Mile is becoming more and more difficult to describe in technical terms, as there are now so many ways to connect the network to the customer. As a thing of strategic value to telecom, cable, and other utilities, its importance is obvious.

One of the primary challenges when transmitting analog signals is that all sorts of things can interfere with those signals, causing low volume, static, and all manner of other undesired effects. Instead of trying to preserve an analog waveform over distances that may span thousands of miles, why not simply measure the characteristics of the original sound and send that information to the far end? The original waveform wouldn’t get there, but all the information needed to reconstruct it would. This is the principle of all digital audio (including telephony): sample the  characteristics of the source waveform, store the measured information, and send that data to the far end. Then, at the far end, use the transmitted information to generate a completely new audio signal that has the same characteristics as the original. The reproduction is so good that the human ear can’t tell the difference. The principle advantage of digital audio is that the sampled data can be mathematically checked for errors all along the route to its destination, ensuring that a perfect duplicate of the original arrives at the far end. Distance no longer affects quality, and interference can be detected and eliminated.

Pulse-Code Modulation

There are several ways to digitally encode audio, but the most common method (and the one used  in telephony systems)  is known as Pulse-Code Modulation (PCM). To illustrate how this works, let’s go through a few examples.

Digitally encoding an analog waveform

The principle of PCM is that the amplitude (amplitude is essentially the power or strength of the signal, if you have ever held a skipping rope or garden hose and given it a whip, you have seen the resultant wave. The taller the wave, the greater the amplitude) of the analog waveform is sampled at specific intervals so that it can later be restored. The amount of detail that is captured is dependent both on the bit resolution of each sample and on how frequently the samples are taken. A higher bit resolution and a higher sampling rate will provide greater accuracy, but more bandwidth will be required to transmit this more detailed information.

To get a better idea of how PCM works let’s consider sine wave:

To digitally encode the wave, it must be sampled on a regular basis, and the amplitude of the wave at each moment  in time must be measured. The process of slicing up a waveform into moments in time and measuring the energy at each moment is called quantization, or sampling. The samples will need to be taken frequently enough and will need to capture enough information to ensure that the far end can re-create a sufficiently similar waveform. To achieve a more accurate sample, more bits will be required. To explain this concept, we will start with a very low resolution, using four bits to represent our amplitude. This will make it easier to visualize both the quantization process itself and the effect that resolution has on quality.

The following picture shows the information that will be captured when we sample our sine wave at four-bit resolution:

 

At each time interval, we measure the amplitude of the wave and record the corresponding intensity—in other words, we sample it. You will notice that the four-bit resolution limits our accuracy. The first sample has to be rounded to 0011, and the next quantization yields a sample of 0101. Then comes 0100, followed by 1001, 1011, and so forth. In total, we have 14 samples (in reality, several thousand samples must be taken per second).

If we string together all the values, we can send them to the other side as:

0011 0101 0100 1001 1011 1011 1010 0001 0101 0101 0000 1100 1100 1010

On the wire, this code might look something like this:

When the far end’s digital-to-analog (D/A) converter receives this signal, it can use the information to plot the samples, as shown here:

From this information, the waveform can be reconstructed:

As you can see if you compare initial wave with reconstructed wave, this reconstruction of the waveform is not very accurate. This was done intentionally, to demonstrate an important point: the quality of the digitally encoded  waveform is affected by the resolution and rate at which it is sampled. At too low a sampling rate, and with too low a sample resolution, the audio quality will not be acceptable.

 

One Response to Digital Telephony

  1. [...] Analog telephony is almost dead, but you should understand how it works prior you can imagine and get all the advantages on the Digital Telephony. [...]

Leave a Reply