• No results found

' 3.5 Data Compression

In the previous section we looked at companding, which we noticed con-sisted of compression at the transmitter and expansion at the receiver.

Essentially this is an analog technique for improving dynamic range by increasing the signal-to-noise ratio for low-level signals although, as we FIGURE 3.11 Delta modulation

saw, it can be implemented using digital signal processing. We now turn our attention to the bits that result from the analog-to-digital conver-sion just discussed and consider whether there is any way to reduce the num-ber of bits that have to be transmitted per second. This reduction is also called compression, but it is really a completely different process from the one just described. We shall call it data compression to emphasize the difference.

Generally, without data compression more bandwidth is required to transmit an analog signal in digital form. For instance, analog telephony re-quires less than 4 kHz per channel with single-sideband AM transmission.

Digital telephony conventionally operates at 64 kb/s. The exact bandwidth requirement for this depends on the modulation scheme but is likely to be much more than 4 kHz unless the channel has a very high signal-to-noise radio and an elaborate modulation scheme is used. In order to use digital FIGURE 3.12 Adaptive delta modulation

techniques in wireless communication, it is very desirable to reduce the bandwidth to no more, and preferably less, than that needed for analog transmission.

Lossy and Lossless Compression

There are two main categories of data compression. Lossless compression in-volves transmitting all of the data in the original signal but using fewer bits.

Lossy compression, on the other hand, allows for some reduction in the quality of the transmitted signal. Obviously there has to be some limit on the loss in quality, depending on the application. For instance, up until now the expecta-tion of voice quality has been less for a mobile telephone than for a wireline telephone. This expectation is now changing as wireless telephones become more common. People are no longer impressed with the fact that wireless tele-phony works at all; they want it to work as well as a fixed telephone.

Lossless compression schemes generally look for redundancies in the data. For instance, a string of zeros can be replaced with a code that tells the receiver the length of the string. This technique is called run-length encod-ing. It is very useful in some applications: facsimile (fax) transmission, for instance, where it is unnecessary to transmit as much data for white space on the paper as for the message.

In voice transmission it is possible to greatly reduce the bit rate, or even stop transmitting altogether, during time periods in which there is no speech. For example, during a typical conversation each person generally talks for less than half the time. Taking advantage of this to increase the bandwidth for transmission in real time requires there to be more than one signal multiplexed. When the technique is applied to a radio system, it also allows battery-powered transmitters to conserve power by shutting off or reducing power during pauses in speech.

Lossy compression can involve reducing the number of bits per sample or reducing the sampling rate. As we have seen, the first reduces the signal-to-noise ratio and the second limits the high-frequency response of the signal, so there are limits to both methods. Other lossy compression methods rely on knowledge of the type of signal, and often, on knowledge of human perception. This means that voice, music, and video signals would have to be treated differently. These more advanced methods often involve the need for quite extensive digital signal processing. Because of this, they have only recently become practical for real-time use with portable equip-ment. A couple of brief examples will show the sort of thing that is possible.

Vocoders A vocoder (voice coder) is an example of lossy compression applied to human speech. A typical vocoder tries to reduce the amount of data that needs to be transmitted by constructing a model for the human vocal system. Human sounds are produced by emitting air from the lungs at an adjustable rate. For

voiced sounds this air causes the vocal cords to vibrate at an adjustable fre-quency; for unvoiced sounds the air passes the vocal cords without vibrating them. In either case, the sound passes through the larynx and mouth, which act as filters, changing the frequency response of the system at frequent in-tervals. Typically there are from three to six resonant peaks in the frequency response of the vocal tract.

Vocoders can imitate the human voice with an electronic system. Mod-ern vocoders start with the vocal-tract model above. There is an excitation function, followed by a multi-pole bandpass filter. Parameters for the excita-tion and the filter response must be transmitted at intervals of about 20 ms, depending on the system. Vocoders of this type are known as linear predictive coders because of the mathematical process used to generate the filter param-eters from an analysis of the voice signal.

The first step in transmitting a signal using a vocoder is to digitize it in the usual way, using PCM, generally at 64 kb/s. Then the signal is analyzed and the necessary excitation and filter parameters extracted. Only these pa-rameters need to be sent to the receiver where the signal is reconstructed.

The transmitted data rate is typically in the range of about 2.4 to 9.6 kb/s, allowing a much smaller transmission bandwidth than would be required for the original 64 kb/s rate.

There are two main ways of generating the excitation signal in a linear predictive vocoder. In pulse excited linear predictive (PELP or sometimes RPELP, for regular pulse excited linear predictive) vocoders, a white noise gener-ator is used for unvoiced sounds, and a variable-frequency pulse genergener-ator produces the voiced sounds. The pulse generator creates a tone rich in har-monics, as is the sound produced by human vocal cords. Both sources have variable amplitudes. Figure 3.13 illustrates the process at the receiver.

Residual excited linear predictive (RELP) vocoders, on the other hand, apply the inverse of the filter that will be used at the receiver to the voice signal. The output of this filter is a signal that, when applied to the receiver filter, will reproduce the original signal exactly. Figure 3.14 shows how this

FIGURE 3.13 PELP vocoder

process works at the transmitter. The residual signal is too complex to trans-mit exactly with the available bit rate, so it must be represented in a more economical way. One method is to compare it with values in a table, called a codebook, and transmit the number of the closest codebook entry. The re-ceiver looks up the codebook entry, generates the corresponding signal, and uses it instead of the pulse and noise generators shown in Figure 3.13. Many other vocoder variations are possible as well.

Reasonable quality can be achieved with vocoders using data rates much lower than those required for PCM. So far, the quality is not quite as good as for straightforward PCM, however.

It should be obvious that vocoders are intended for use with voice only;

whereas, the PCM system described above can be used to send any 64 kb/s data stream, including music, fax, or computer files. None of these will work properly with a vocoder. Vocoders even tend to give a somewhat unnatural quality to human speech. Still, the gain in bit rate and hence bandwidth, compared to PCM, is so great that vocoders are very common in digital wire-less voice communication.

Summary

'

The main points to remember from this chapter are:

( Modern communication systems are often a mixture of analog and digital sources and transmission techniques. The trend is toward digital systems.

( Modern digital systems have better performance and use less bandwidth than equivalent analog systems.

( An analog signal that is to be transmitted digitally must be sampled at least twice per cycle of its highest-frequency component. Failure to do so creates undesirable aliasing.

( PCM requires that the amplitude of each sample of a signal be converted to a binary number. The more bits used for the number, the greater the ac-curacy, but the greater the bit rate required.

( Delta modulation transmits only one bit per sample, indicating whether the signal level is increasing or decreasing, but it needs a higher sampling rate than PCM for equivalent results.

FIGURE 3.14 Generation of excitation signal using codebook

( The signal-to-noise ratio for either PCM or delta modulation signals can often be improved by using companding.

( Lossless compression eliminates redundant data bits, thereby reducing the bit rate with no effect on signal quality.

( Lossy compression compromises signal quality in order to reduce the bit rate. For voice transmissions, vocoders are often used to achieve great re-ductions in bit rate.

aliasing distortion created by using too low a sampling rate when coding an analog signal for digital transmission

codec device that converts sampled analog signal to and from its PCM or delta modulation equivalent

coding conversion of a sampled analog signal into a PCM or delta modulation bitstream

companding combination of compression at the transmitter and expansion at the receiver of a communication system

decoding conversion of a PCM or delta modulation bitstream to analog samples

delta modulation a coding scheme that records the change in signal level since the previous sample

digital signal processing (DSP) filtering of signals by converting them to digital form, performing arithmetic operations on the data bits, then converting back to analog form

flat-topped sampling sampling of an analog signal using a sample-and-hold circuit, such that the sample has the same amplitude for its whole duration

foldover distortion see aliasing

framing bits bits added to a digital signal to help the receiver to detect the beginning and end of data frames

natural sampling sampling of an analog signal so that the sample amplitude follows that of the original signal for the duration of the sample

pulse-amplitude modulation (PAM) a series of pulses in which the amplitude of each pulse represents the amplitude of the information signal at a given time

pulse-code modulation (PCM) a series of pulses in which the amplitude of the information signal at a given time is coded as a binary

number

pulse-duration modulation (PDM) a series of pulses in which the duration of each pulse represents the amplitude of the information signal at a given time

pulse-position modulation (PPM) a series of pulses in which the timing of each pulse represents the amplitude of the information signal at a given time

pulse-width modulation (PWM) see pulse-duration modulation (PDM) quantizing representation of a continuously varying quantity as one of a

number of discrete values

quantizing errors inaccuracies caused by the representation of a continuously varying quantity as one of a number of discrete values quantizing noise see quantizing errors

run-length encoding method of data compression by encoding the length of a string of ones or zeros instead of transmitting all the one or zero bits individually

slope overload in delta modulation, an error condition that occurs when the analog signal to be digitized varies too quickly for the system to follow

vocoder circuit for digitizing voice at a low data rate by using knowledge of the way in which voice sounds are produced

( Questions

1. Give four advantages and one disadvantage of using digital (rather than analog) techniques for the transmission of voice signals.

2. Explain the necessity for sampling an analog signal before transmitting it digitally.

3. What is the Nyquist rate? What happens when a signal is sampled at less than the Nyquist rate?

4. Explain the difference between natural and flat-topped sampling.

5. (a) List three types of analog pulse modulation.

(b) Which pulse modulation scheme is used as an intermediate step in the creation of PCM?

(c) Which pulse modulation scheme also finds use in audio amplifiers and motor speed-control systems?

6. What is meant by the term quantizingnoise?

7. For a PCM signal, describe the effects of:

(a) increasing the sampling rate

(b) increasing the number of bits per sample 8. (a) Briefly explain what is meant by companding.

(b) What advantage does companded PCM have over linear PCM for voice communication?

9. How does differential PCM differ from standard PCM?

10. Explain why the sampling rate must be greater for delta modulation than for PCM.

11. What is meant by slope overload in a delta modulation system? How can this problem be reduced?

12. What are the two functions of a codec? Where in a telephone system is it usually located?

13. Explain briefly howµ-law compression is implemented in a typical codec.

14. Explain the difference between lossless and lossy data compression.

Give an example of each.

15. How do vocoders model the human vocal cords? How do they model the mouth and larynx?

16. What gives vocoders their somewhat artificial voice quality?

17. Does digital audio always have higher quality than analog audio?

Explain.

( Problems

1. It is necessary to transmit the human voice using a frequency range from 300 Hz to 3.5 kHz using a digital system.

(a) What is the minimum required sampling rate, according to theory?

(b) Why would a practical system need a higher rate than the one you calculated in part (a)?

2. The human voice actually has a spectrum that extends to much higher frequencies than are necessary for communication. Suppose a fre-quency of 5 kHz was present in a sampler that sampled at 8 kHz.

(a) What would happen?

(b) How can the problem described in part (a) be prevented?

3. A 1-kHz sine wave with a peak value of 1 volt and no dc offset is sampled every 250 microseconds. Assume the first sample is taken as the voltage crosses zero in the upward direction. Sketch the results over 1 ms using:

(a) PAM with all pulses in the positive direction (b) PDM

(c) PPM

4. The compact disc system of digital audio uses two channels with TDM.

Each channel is sampled at 44.1 kHz and coded using linear PCM with sixteen bits per sample. Find:

(a) the maximum audio frequency that can be recorded (assuming ideal filters)

(b) the maximum dynamic range in decibels

(c) the bit rate, ignoring error correction and framing bits (d) the number of quantizing levels

5. Suppose an input signal to aµ-law compressor has a positive voltage and an amplitude 25% of the maximum possible. Calculate the output voltage as a percentage of the maximum output.

6. Suppose a composite video signal with a baseband frequency range from dc to 4 MHz is transmitted by linear PCM, using eight bits per sam-ple and a sampling rate of 10 MHz.

(a) How many quantization levels are there?

(b) Calculate the bit rate, ignoring overhead.

(c) What would be the maximum signal-to-noise ratio, in decibels?

(d) What type of noise determines the answer to part (c)?

7. How would a signal with 50% of the maximum input voltage be coded in 8-bit PCM, using digital compression?

8. Convert a sample coded (using mu-law compression) as 11001100 to a voltage with the maximum sample voltage normalized as 1 V.

9. Convert the 12-bit PCM sample 110011001100 to an 8-bit compressed sample.

10. A typical PCS system using a vocoder operates at 9600 b/s. By what fac-tor has the amount of data required been reduced, compared with stan-dard digital telephony?

4