Page 205 - Asterisk™: The Future of Telephony
P. 205

In essence, what this means is that to accurately encode an analog signal you have to
               sample it twice as often as the total bandwidth you wish to reproduce. Since the tele-
               phone network will not carry frequencies below 300 Hz and above 4,000 Hz, a sampling
               frequency of 8,000 samples per second will be sufficient to reproduce any frequency
               within the bandwidth of an analog telephone. Keep that 8,000 samples per second in
               mind; we’re going to talk about it more later.


               Logarithmic companding
               So, we’ve gone over the basics of quantization, and we’ve discussed the fact that more
               quantization intervals (i.e., a higher sampling rate) give better quality but also require
               more bandwidth. Lastly, we’ve discussed the minimum sample rate needed to accu-
               rately measure the range of frequencies we wish to be able to transmit (in the case of
               the telephone, it’s 8,000 Hz). This is all starting to add up to a fair bit of data being
               sent on the wire, so we’re going to want to talk about companding.

               Companding is a method of improving the dynamic range of a sampling method without
               losing important accuracy. It works by quantizing higher amplitudes in a much coarser
               fashion than lower amplitudes. In other words, if you yell into your phone, you will
               not be sampled as cleanly as you will be when speaking normally. Yelling is also not
               good for your blood pressure, so it’s best to avoid it.
                                                                  †
               Two companding methods are commonly employed: μlaw  in North America, and
               alaw in the rest of the world. They operate on the same principles but are otherwise
               not compatible with each other.
               Companding divides the waveform into cords, each of which has several steps. Quan-
               tization involves matching the measured amplitude to an appropriate step within a
               cord. The value of the band and cord numbers (as well as the sign—positive or negative)
               becomes the signal. The following diagrams will give you a visual idea of what com-
               panding does. They are not based on any standard, but rather were made up for the
               purpose of illustration (again, in the telephone network, companding will be done at
               an eight-bit, not five-bit, resolution).
               Figure 7-11 illustrates five-bit companding. As you can see, amplitudes near the zero-
               crossing  point  will  be  sampled  far  more  accurately  than  higher  amplitudes  (either
               positive or negative). However, since the human ear, the transmitter, and the receiver
               will also tend to distort loud signals, this isn’t really a problem.



               * Nyquist published two papers, “Certain Factors Affecting Telegraph Speed” (1924) and “Certain Topics in
                 Telegraph Transmission Theory” (1928), in which he postulated what became known as Nyquist’s Theorem.
                 Proven in 1949 by Claude Shannon (“Communication in the Presence of Noise”), it is also referred to as the
                 Nyquist-Shannon sampling theorem.
               † μlaw is often referred to as “ulaw” because, let’s face it, how many of us have μ keys on our keyboards? μ is
                 in fact the Greek letter Mu; thus, you will also see μlaw written (more correctly) as “Mu-law.” When spoken,
                 it is correct to confidently say “Mew-law,” but if folks look at you strangely, and you’re feeling generous, you
                 can help them out and tell them it’s “ulaw.” Many people just don’t appreciate trivia.

                                                                        Digital Telephony | 177
   200   201   202   203   204   205   206   207   208   209   210