Chapter 4. Pulse Code Modulation

Chapter 4. Pulse Code Modulation Chapter 4. Pulse Code Modulation Table of Contents 4.1 INTRODUCTION TO SPEECH CODERS.................................
Author: Abner Young
2 downloads 0 Views 977KB Size
Chapter 4. Pulse Code Modulation

Chapter 4. Pulse Code Modulation

Table of Contents

4.1 INTRODUCTION TO SPEECH CODERS........................................................................ 3 4.1.1 TYPES OF SPEECH CODERS ........................................................................................ 3 4.2 INTRODUCTION TO PCM .............................................................................................. 5 4.3 GENERATION OF PCM SIGNAL .................................................................................... 7 4.4 ENCODING ..................................................................................................................... 9 4.5 LINE CODES .................................................................................................................10 4.5.1 PROPERTIES OF A LINE CODE .....................................................................................13 4.5.2 POWER SPECTRAL DENSITIES OF PCM WAVEFORMS ...................................................14 4.6 PCM BANDWIDTH ........................................................................................................17 4.7 OUTPUT SIGNAL-TO-NOISE RATIO ............................................................................19 4.7.1 OUTPUT S/N RATIO VERSUS PE FOR PCM SYSTEMS ....................................................20 4.8 ADAPTIVE DIFFERENTIAL PULSE CODE MODULATION ..........................................22 4.9 DELTA MODULATION ...................................................................................................24 4.9.1 SLOPE OVERLOAD .....................................................................................................25 4.9.2 GRANULE NOISE ........................................................................................................26 4.10 VOCODERS .................................................................................................................27 4.10.1 CELP .....................................................................................................................27

Digital Communications NUML, Islamabad

4-1

Chapter 4. Pulse Code Modulation

Digitized voice for 128 levels (28)

Digital Communications NUML, Islamabad

4-2

Chapter 4. Pulse Code Modulation

4.1 Introduction to Speech Coders Role of Speech Coders: Speech coders determine the quality of recovered speech and the capacity of the system. What is Precious Commodity? In wireless communication systems, bandwidth is a precious commodity. The lower the bit rate at which the coder can deliver toll-quality speech, the more speech channels can be compressed within a given band. Algorithm Issues: In general, there is a positive correlation between coder bit-rate efficiency and the algorithmic complexity required to achieve it. The more complex the algorithm is, the more is its processing delay and cost of implementation.

4.1.1 Types of Speech Coders Channel coding can be partitioned into two areas: 1) Waveform Coding: Deals with transforming waveforms into better waveforms to make the detection process less subject to errors. 2) Structured Sequences: Deals with transforming data sequences into better sequences having structured redundancy (redundant bits), that can be used for error detection and correction. The hierarchy of speech coders is shown in Figure 4.1.1-1.

Figure 4.1.1-1 Hierarchy of speech coders

Digital Communications NUML, Islamabad

4-3

Chapter 4. Pulse Code Modulation

This chapter will discuss - Waveform Coders, and - Vocoders ◉ Waveform Coders: Sample-by-Sample Coder: Waveform coders reproduce the time waveform of the speech signal as closely as possible. They are, in principle, source independent and can hence code equally well a variety of signals. Examples of waveform coders discussed here include: -

Pulse code modulation (PCM) Adaptive differential pulse code modulation (ADPCM) Delta modulation (DM)

Vocoder: A vocoder, a combination of the words voice and encoder, is an analysis/synthesis system, mostly used for speech.

Digital Communications NUML, Islamabad

4-4

Chapter 4. Pulse Code Modulation

4.2 Introduction to PCM Analog-to-Digital Conversion: Pulse code modulation (PCM), a source coding technique, is essentially analog-to-digital conversion of a special type where the information contained in the instantaneous samples of an analog signal is represented by digital words in a serial bit stream.

 PCM System Figure 4.2-1 shows basic elements of a PCM system.

Continuous-time message signal

Input

Figure 4.2-1 Basic elements of a PCM system (a) transmitter; (b) transmission path; (c) receiver

 Advantages of PCM -

Inexpensive: Relative inexpensive digital circuitry may be used extensively in the system.

-

TDM (time division multiplexing): PCM signals derived from all types of analog sources (audio, video etc.) may be merged with data signals (e.g., from digital computers) and transmitted over a common high-speed digital communication system.

-

Clean PCM Waveform: In long-distance digital telephone systems requiring repeaters, a clean PCM waveform can be regenerated at the output of each repeater, where the input consists of a noisy PCM waveform.

-

Superior Noise Performance: The noise performance of a digital system can be superior to that of an analog system. In analog systems, some degradation will occur along every link and through every repeater. Since the process is cumulative, any such system will have to start with a much higher S/N ratio and also use more low-noise equipment en route than would have been needed by PCM.

Digital Communications NUML, Islamabad

4-5

Chapter 4. Pulse Code Modulation ● Low BER: The probability of error for the system output can be reduced even further by the use of appropriate coding techniques. The pulse-code modulation can be relayed without degradation when a signal-to-noise ratio exceeds about 21 dB. ● Disadvantage – Wider Bandwidth: These advantages usually outweigh the main disadvantage of PCM: a much wider bandwidth than that of the corresponding analog signal.

Digital Communications NUML, Islamabad

4-6

Chapter 4. Pulse Code Modulation

4.3 Generation of PCM Signal The conversion of an analog signal to a digital signal primarily involves three steps: 1) Filtering of the voice input signal 2) Pulse amplitude modulation (PAM) 3) PCM encoding (A-law or -law)

● PCM Practical Example Figure 4.3-1 illustrates the process of conversion of an analog signal to 64-kbps PCM signal used in digital communication for a 30-channel PCM equipment. Here, the sampling frequency, fs, is 8 kHz i.e., 125s. The conversion primarily involves three steps: Data Rate: Since the sampling frequency is 8 kHz and one sample is represented by 8 binary digits, one voice channel can be represented by 8 bits/sample x 8000 samples/second = 64 kbps Analogue signal Sampling frequency 8 kHz Ch 30

125sec

125se c

Ch 1 Expanded time axis

Ch 30 30

30

1

Ch 2

PAM

PCM encoding (A-law)

8 binary digits per sample

Figure 4.3-1 Conversion of an analog signal to 64 kbps PCM encoded signal

Digital Communications NUML, Islamabad

4-7

Chapter 4. Pulse Code Modulation

A simplified diagram of the processing involved to derive a multiplexed PAM wave is shown in Figure 4.3-2.

Figure 4.3-2 A simplified analogy of formation of PCM wave

● PCM TYPES 1) Linear PCM 2) Non-linear, or Logarithmic PCM: Rather than representing sample amplitudes on a linear scale as linear PCM coding does, logarithmic PCM coding plots the amplitudes on a logarithmic scale. Application: Log PCM is more often used in telephony and communications applications than in entertainment multimedia applications. Variants: There are two major variants of log PCM: mu-law (u-law) and A-law. 3) Differential PCM: Values are encoded as differences between the current and the previous value. 4) Adaptive DPCM (ADPCM): The size of the quantization step is varied to allow further reduction of the required bandwidth for a given signal-to-noise ratio.

Digital Communications NUML, Islamabad

4-8

Chapter 4. Pulse Code Modulation

4.4 Encoding  ITU-T Companding Characteristics for A-Law 30-Channel PCM System: Figure 4.4-1 shows the companding characteristic for positive signal amplitude adopted by the ITU-T for 30-channel PCM systems. -

Segment: The compression curve has a set of eight straight line segments (segments 0 through 7). The slope of each segment is exactly one-half that of the previous segment. As the negative part is identical, it follows that the complete characteristic consists of 8 positive and 8 negative segments.

13-Segment Compression: Although there are 16 segments (eight positive and eight negative), this scheme is often called 13-segment compression. This is because the curve for segments +0, +1, -0, and –1 is a straight line with a constant slope and is often considered as one segment. -

Quantizing Steps: Each segment consists of 16 equal quantizing steps giving a total of 256 steps (0 to +127 and 0 to –127), Segment Slope: As the slope of adjacent segments (except 0 and 1) changes in the ratio 2:1, the steps of segment 7, for instance, cover twice the range of signal amplitude as those in segment 6.

8-Bit Code: The specific technique for sending a sample value is to send eight bits coded as follows: 1 bit is used to give the polarity of the sample: 1 for positive, 0 for negative. 3 bits are used to identify which piecewise segment the sample lies in. 4 bits are used to identify the quantization level within each sample region

Segment +7 64:1 compression ratio Segment +6 32:1 compression ratio

Segment +5 16:1 compression ratio

Segment +4 8:1 compression ratio

Segment +3 4:1 compression ratio Segment +2 2:1 compression ratio

Segment +1 1:1 no compression Segment +0 1:1 no compression

Figure 4.4-1 ITU-T A-Law encoding characteristic – Positive values

Digital Communications NUML, Islamabad

4-9

Chapter 4. Pulse Code Modulation

4.5 Line Codes Baseband Transmission: For baseband transmission, the PCM waveforms, or line codes in telephony applications, fall into the following two major categories: 1) return-to-zero (RZ) and 2) nonreturn-to-zero (NRZ). Unipolar Unipolar transmission of binary data involves the transmission of only a single nonzero voltage level (e.g., +V for logic 1 and 0V for logic 0). Non-return-to-zero (NRZ) In the NRZ type of transmission, the binary pulse is maintained for the entire bit time of 100% duty cycle. Return-to-zero (RZ) code A code form having two information states identified as zero and ones, and having a third state to which each signal returns during each period. In the return-to-zero code, the active time of the binary pulse is less than 100% of the bit time in terms of the duty cycle.

Figure 4.5-1 Various line codes (a) Uni-polar Non-return-to-zero (UPNRZ); (b) Bi-polar Non-return-to-zero (BPNRZ); (c) Uni-polar return-to-zero (UPRZ); (d) Bi-polar Return-to-zero (BPRZ); (e) Bi-polar Return-to-zero Alternate mark inversion (BPRZ-AMI)

Digital Communications NUML, Islamabad

4-10

Chapter 4. Pulse Code Modulation

Manchester - Two Complementary Halves: A digital encoding technique in which each bit period is divided into two complementary halves. - Symbol 1 is represented by transmitting a positive pulse for one-half of the symbol, followed by a negative pulse for the remaining half of the symbol. - For symbol 0, these two pulses are transmitted in reverse order. That is, a negative pulse is transmitted for one-half of the symbol, followed by a positive pulse for the remaining half of the symbol. This encoding scheme is self-clocking (the receiving device can recover transmitted clock from the data stream). Advantage: The Manchester code has the advantage of always having a 0-dc value regardless of the data sequence, but it has twice the bandwidth of the unipolar NRZ or polar NRZ code because the pulses are half the width. 1

1

0

1

0

0

1

+V 0V

+V 0V -V

Figure 4.5-2 Manchester NRZ

HDB3 HDB3 (high density bipolar 3) is one of the PCM line codes. HDB3 is a bipolar coding method that does not allow more than 3 consecutive zeros. This line code is a bipolar code designed to ensure a large number of transitions by limiting the maximum number of consecutive zeros to three. Bipolar Violation: After three consecutive binary zeros, fourth zero is substituted by a mark of the same polarity as previous mark, giving a bipolar violation. HDB3 Rules Rule-1: Rule-2: Rule-3: Rule-4:

If more than 3 consecutive zeros occur, the fourth zero is changed to a ―1‖, known as a ―V‖ pulse. Successive ―V‖ pulses must be of alternate polarity. Every ―V‖ pulse must be of the same polarity as the last transmitted pulse. If rules 2 and 3 cannot be satisfied, the first of four consecutive zeros is changed to a ―1‖, which must be of opposite polarity to the last transmitted pulse. This pulse is called a ―B‖, or balancing pulse, because without it the code would become unbalanced (i.e., more positives than negatives.)

Digital Communications NUML, Islamabad

4-11

Chapter 4. Pulse Code Modulation

The first example in Figure 4.5-3a shows alternate pulses occurring naturally, consequently rules 1, 2 and 3 can be applied without difficulty. The second example, in Figure 4.5-3b, just as likely in actual traffic, shows the case where rule 2 cannot be applied directly, so rule 4 has to be applied.

1

Line coder input



AMI

0

0

0

0

0

1

0

0

0

0

0

0

1

0

1

0

0

1

0

0

0

0

0

0

0

1

0

0

0

0

0

1

0

HDB3

1

0

0

1

0

0

1

0

V

1

0

0

0

0

0

0

0

0

1

0

0

1

0

0

0

V

0

1

1

Example (a): Rules 1, 2 and 3 applied without difficulty

Consider line coder input signal

0

1

0

0

0

0

0

0

0

1

0

0

1

0

0

1

0

V

1

0

0

1

0

0

0

0

1

0

0

1

1

0

0

0

0

0

0

1

0 V

This breaks Rule-2, so, apply Rule—4 to introduce ―B‖ pulse.

Correct HDB3 output 0

0

0

0

1

0 V

1

0

0

0

1

0

1

0

B

0

0

V 0

1

Example (b): Rule-4 applied. Figure 4.5-3 HDB3 coded signal examples

Digital Communications NUML, Islamabad

4-12

Chapter 4. Pulse Code Modulation

4.5.1 Properties of a Line Code Desirable properties of a line code: -

Self-synchronizarion: There is enough timing information into the code so that bit synchronizers can be designed to extract the timing or clock signal.

-

Low probability of bit error: Receivers can be designed that will recover the binary data with a low probability of bit error when the input data signal is corrupted by noise.

-

Transmission bandwidth: This should be as small as possible.

-

Error detection capability: It should be possible to implement this feature easily by the addition of channel encoders and decoders, or the feature should be incorporated into the line code.

-

Transparency: The data protocol and line code are designed so that every possible sequence of data is faithfully and transparently received.

 Bandwidth Efficiency: Illustrations of sinusoids at the fundamental frequency for alternating levels in a PCM bit stream are shown in Figure 4.5.1-1. In these diagrams, Tb represents the bit interval. Note that -

NRZ codes transmit one bit per level change (Figure 4.5.1-2a), while RZ codes transmit one bit pair of level changes (Figure 4.5.1-2b).

It follows that the NRZ codes can transmit 2 bits per Hz (bps/Hz). In contrast, the limit for RZ code is one bps/Hz. We call the ―number of bits per second per Hz the bandwidth efficiency‖.

Tb

Tb (a)

(b)

Figure 4.5.1-1 Maximum PCM bit rates of (a) NRZ and (b) RZ

Bandwidth Efficient Waveform: Any waveform type that requires less than 1.0 Hz for sending one symbol/s is relatively bandwidth efficient. Example: delay modulation and duobinary. Bandwidth Inefficient Waveform: Any waveform type that requires more than 1.0 Hz for sending one symbol/s is relatively bandwidth inefficient. Example: bi-phase (Manchester) signaling. Table 4.5.1-1 summarizes 1) minimum bandwidth, 2) average dc voltage, 3) clock recovery, and 4) error detection capabilities of the line-encoding formats.

Digital Communications NUML, Islamabad

4-13

Chapter 4. Pulse Code Modulation

It can be seen that BPRZ-AMI encoding has the best overall characteristics and is therefore the most common method used.

Encoding format UPNRZ BPNRZ UPRZ BPRZ AMI

Table 4.5.2.1-1 Line-encoding summary Minimum Average DC Clock recovery bandwidth Fb/2 +V/2 Poor Fb/2 0V Poor Fb +V/2 Good Fb 0V Best Fb/2 0V Good

Error detection No No No No Yes

4.5.2 Power Spectral Densities of PCM Waveforms Figure 4.5.2-1 shows PSD densities, or spectrum, of various waveforms. Power spectral density Sx(f) is normalized with respect to a2Tb, and frequency f is normalized with respect to bit rate 1/Tb, where Tb is bit.

Figure 4.5.2-1 Power spectra of various binary data formats

Digital Communications NUML, Islamabad

4-14

Chapter 4. Pulse Code Modulation

Analysis of PSD Waveforms: (a) NRZ Unipolar Format: Large spectral components lie between dc and bit rate of input data. Usually, the dc component does not carry any useful information, so the power in it gets wasted. If this line code is used, then the channel should be able to pass dc, which requires dc coupled circuits. Advantage: Simple: Unipolar NRZ is very simple to generate. One Power Supply: Requires only one power supply. Standard TTL and CMOS circuits can be used to implement unipolar NRZ line code circuitry. (b) NRZ Polar Format: Most of the power of NRZ polar format lies inside the main lobe of the sinc-shaped curve, which extends up to the bit rate 1/Tb. Drawback: Requires two distinct power supplies. (c) NRZ Bipolar Format: Most of the power lies inside a bandwidth equal to the bit rate 1/T b, the spectral content of the NRZ bipolar format is relatively small around zero frequency. (d) Manchester Format: Most of the power in Manchester format lies inside a bandwidth equal to 2/Tb (i.e., twice that of unipolar, polar and bipolar formats of NRZ). - PSD of Manchester NRZ code is null at dc. - Due to alternating A’s, single error can be easily detected. - The code is transparent i.e., string of zeroes will not cause loss of clock. - Null bandwidth is twice that in bipolar case. ● Error Performance Figure 4.5.2-2 shows the error performance of various line codes.

Figure 4.5.2-2 Error probability versus received power of different line codesP.159

Digital Communications NUML, Islamabad

4-15

Chapter 4. Pulse Code Modulation

Example 4-1: In a binary communications system, assume that the noise-power spectral density N0 is equal to 10-12 Watt/Hz. Use the values of the received signal voltage and time shown in Figure 4.5.2-3 to compute the bit error probability Eb. Solution 4-1: Received energy per bit Eb can be determined from the plot by integrating to find the energy (area under the voltage-squared pulse) in piecewise fashion. 3

Eb =

 v tdt 2

0

= (10-3V)2x(10-6s) + (2x10-3V)2x(10-6s) + (10-3V)2x(10-6s) = 6x10-12 Joule Pb = Q (

= Q

2 Eb ) N0 12 x1012  Q( 12) = Q(3.46) 1012

Where, Q(x) : complementary error function and is given by Q(x) =

1 x2 exp( ) 2 x 2

From the table of complementary error function Q(x), not shown, Q(x) = 0.0003 for x = 3.46 Therefore,

Pb = 3 x 10-4

Figure 4.5.2-3 Baseband antipodal waveforms

Digital Communications NUML, Islamabad

4-16

Chapter 4. Pulse Code Modulation

4.6 PCM Bandwidth The bandwidth of (serial) binary PCM waveform depends on 1) bit rate and 2) waveform pulse shape used to represent the data. The bit rate, R, is given by

R = nfs where

(4-1)

fs  2B B: bandwidth of the corresponding analog signal n: number of bits in the PCM word (M = 2n); and fs: sampling rate

For rectangular pulses such as unipolar NRZ, polar NRZ, or a bipolar RZ, which are typical waveforms generated by popular integrated circuits, the PCM bandwidth is given by

BPCM = R = nfs

(4-2a)

Table 4.6-1 presents a tabulation of this result for the case of minimum sampling rate f s = 2B. The bandwidth of a PCM signal has a lower bound given by

BPCM  nB

(4-2b)

Conclusion: For reasonable values of n, the bandwidth of the serial PCM signal will be significantly larger than the bandwidth of the corresponding analog signal that it represents. Table 4.6-1 PCM Bandwidth with uniform quantizing Number of quantizer levels used, M (= 2n) 2 4 8 16 32 64 128 256 512 1,024 2,048 4,096 8,192 16,384 32,768 65,536

Length of PCM word n (bits)

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16

Bandwidth of PCM (R = nfs = 2nB)

2B* 4B 6B 8B 10B 12B 14B 16B 18B 20B 22B 24B 26B 28B 30B 32B

*B: Absolute bandwidth of the input analog signal

Digital Communications NUML, Islamabad

4-17

Chapter 4. Pulse Code Modulation

Example 4-2: Design of a PCM Signal for Telephone Systems Assume that an analog audio voice-frequency (VF) telephone signal occupies a band from 300 to 3,400 Hz. The signal is to be converted to a PCM signal for transmission over a digital telephone system. The minimum sampling frequency is 2 x 3.4 = 6.8 ksample/sec. In order to allow the use of a low-cost low-pass antialiasing filter with a reasonable transisition band, the VF signal is oversampled with a sampling frequency of 8 ksample/sec. Assume that each sample is represented by 8 bits. Solution 4-2: Bit rate of binary PCM signal is R = (fs samples/s)( n bits/sample) = ( 8k samples/s)( 8 bits/sample) = 64 kbits/s PCM bandwidth is

BPCM = R = 64 kHz

Example 4-2: Find the minimum PCM bandwidth for a system with an analog signal maximum frequency of 10 kHz and using an 8 bit PCM word. Solution 4-2: PCM BW  n*2*BWI = (8)(2)(10kHz) = 160 kHz.

Digital Communications NUML, Islamabad

4-18

Chapter 4. Pulse Code Modulation

4.7 Output Signal-to-Noise Ratio The output SNR of a PCM system is given by

(S/N)dB = 6.02n + 

(4-3)

Where term  depends on signal probability density function, and is given by  = 4.77 – 20log(V/xrms)   4.77 – 20log[ln(1 + )]   4.77 – 20log[1 + ln A]

(Uniform quantizing) (-law companding) (A-law companding)

n: number of bits used in the PCM word V: peak design level of the quantizer xrms: rms value of the input analog signal V/xrms: loading factor Conclusion: 6-dB increase in signal-to-quantizing noise ratio for each bit added to PCM word. Dynamic Range: Swing of input signal for which output SNR is maintained above a certain minimum SNR level, which is 30 dB for acceptable voice recognition, is called dynamic range of PCM system, 48 dB in the figure for a non-companded system. It is achieved at the expense of reduction in SNR. Figure 4.7-1 shows the dynamic range of a companded PCM signal. Human Voice Dynamic Range: 50 dB. 60 50 40

-law companding  = 255

 (dB) (S/N)out

30 20 10

Uniform quantization (no companding)

0

Figure 4.7-1 Output SNR of 8-bit PCM systems with and without companding

-50

-40

-30 -20 Relative input level 20log(xrms/V)

-10

-4.77

 dB

Example 4-3: Find the maximum theoretical signal-to-noise ratio for a system with an analog signal maximum frequency of 10 kHz and using an 8 bit PCM word. Solution 4-3: The signal-to-noise ratio is given by the number of bits in the PCM code word: S/Nmax = nx6dB = (8)(6dB) = 48dB.

Digital Communications NUML, Islamabad

4-19

Chapter 4. Pulse Code Modulation

4.7.1 Output S/N Ratio Versus Pe for PCM Systems The performance of a PCM system is influenced by 1) Channel Noise: Which may be introduced anywhere along the transmission path. 2) Quantizing Noise: Which is introduced in the transmitter and is carried along to receiver output. The probability of error, Pe, for various digital systems depends on -

energy per bit, Eb, of signal at receiver input, described as signal power S times the bit time Tb, and level of input noise spectrum N0/2, described as noise power N divided by bandwidth W.

If there are M steps in the uniform quantizer, the peak signal-to-average noise ratio (S/N)out for the analog output is given by (S/N) peak out = 3M2/[1 + 4(M2 – 1)Pe]

(4-4)

For a PCM system with M quantizing steps, (S/N)out is given as a function of BER of the digital receiver. . For Pe < 1/(4M2), the output is corrupted primarily by quantizing noise. . For Pe > 1/(4M2), the output is corrupted primarily by channel noise. Example

For

M = 256 (=2n = 28)

Pe = 1/(4M2) = 1(4 X 2562) = 3.8 X 10-6 Table 4.7.1-1 shows error rate of a binary transmission system versus S/N. In a purely binary system, if a 20 dB signal-to-noise ration is maintained, the system operates nearly error free. Table 4.7.1-1 Error rate of a binary transmission system versus signal: rms noise ratio Error rate 10-2 10-3 10-4 10-5 10-6

(S/N) dB 13.5 16.0 17.5 18.7 19.6

Error rate 10-7 10-8 10-9 10-10 10-11

S/N (dB) 20.3 21.0 21.6 22.0 22.2

Example 4-4: A signal voltage that is band-limited to 3 kHz and amplitude-limited to 4 Vpp, is converted to a binary PCM code using 128 equally spaced levels. Calculate a) Minimum bandwidth required. b) Peak signal-to-quantization noise (power) ratio. c) Mean-square signal-to-quantization noise (power) ratio. Note: If the input signal is quantized into n levels, each spaced by an amplitude increment, a. Then - mean-square signal after quantization is S = [(n2 – 1)/12]a2, - mean-square quantization noise is a2/12, - and peak signal excursion (range) is na/2.

Digital Communications NUML, Islamabad

4-20

Chapter 4. Pulse Code Modulation

Solution 4-4: a) log2128 = log22m gives m = 7 Signal bandwidth = 3 KHz ; minimum sampling rate ≥ 6 KHz Minimum bandwdith : BW ≥ (7 x 6)/2 kHz = 21 kHz

b) (S/N)peak qnt = [(na/2)2]/(a2/12) =3n2 [(S/N)peak qnt]dB = 4.8 + 20log10n = 4.8 + 20log102m = 4.8 + 6m = 4.8 + 42 = 46.8 dB c) (S/N)qnt = [(n2 – 1)/12]a2/(a2/12) = n2 -1 = 1282 – 1 = 16383 [(S/N)qnt ]dB = 10log1016383 = 42.14 dB

Digital Communications NUML, Islamabad

4-21

Chapter 4. Pulse Code Modulation

4.8 Adaptive Differential Pulse Code Modulation Prediction: In differential PCM (DPCM), in analog messages, a prediction of the next value sample is formed from last values. In other words, the sample values are not independent, and generally there is a great deal of redundancy. Proper exploitation of this redundancy leads to encoding a signal with less number of bits. Consider a simple scheme where instead of transmitting the sample values, we transmit the difference between the successive sample values. At the receiver, knowing the difference value and the previous sample value, we can reconstruct the original signal. 64 kbps -> 32 kbps Conversion: The adaptive differential pulse code modulation (ADPCM) converts a 64 kbit/s A-law (or -law) PCM channel to and from a 32 kbit/s channel (see Figure 4.8-1). Human Speech: ADPCM for speech compression capitalizes on the basic characteristic of human speech – the regularity of its patternPredictable: Many portions of a speech waveform are redundant and, therefore, predictable. As a result, the actual information rate of speech is much lower than the standard Pulse Code Modulation (PCM). Intelsat has standardized on a type of LRE (low rate encoder), known as adaptive pulse code modulation (ADPCM), which condenses the standard PCM encoded 8-bit word into a 4-bit word.

Figure 4.8-1 Principle of ADPCM Example : See Figure 4.8-2. Let the actual incoming traffic sample to have ADPCM applied is: Traffic input (8-bit word)

10110101 10101110

Comparator

Resulting digital output 00000111

Estimate (8-bit word) Figure 4.8-2 Theory of ADPCM

Digital Communications NUML, Islamabad

4-22

Chapter 4. Pulse Code Modulation

10110101 (quantizing level +53) And the estimate of that word might be 10101110 (=quantizing level +46) The resulting difference between these two words will be: 10110101 = quantizing level +53 -10101110 = quantizing level +46 00000111 = 7 4-Bit Transmission: Because the estimate was quite close, the difference between the two 8-bit words is so small that the leading four zeros can be dropped, and the 4-bit word 0111 transmitted in place of the original 8-bit word. Estimator: The performance of this system relies on the accuracy of the estimate, because if it is not close to the actual signal, the circuit will be degraded. The estimate comes from a circuit mode known as an estimator, which examines the result of the previous 8-bit comparison, and is then able to make a judgment of what the next 8-bit word is likely to be. Algorithm: The circuit uses a series of complicated rules (known as an algorithm) to help make this judgment. The rules have been standardized by the ITU-R to enable different manufacturers to make compatible equipment.

Digital Communications NUML, Islamabad

4-23

Chapter 4. Pulse Code Modulation

4.9 Delta Modulation Single-Bit (2-level) PCM Code: Delta modulation (DM) is an alternative method for source encoding an analogue signal into a single digital bit stream.

Operation: -

the analog signal is approximated with a series of segments each segment of the approximated signal is compared to the original analog wave to determine the increase or decrease in relative amplitude the decision process for establishing the state of successive bits is determined by this comparison only the change of information is sent, that is, only an increase or decrease of the signal amplitude from the previous sample is sent whereas a no-change condition causes the modulated signal to remain at the same 0 or 1 state of the previous sample.

Oversampling: To achieve high signal-to-noise ratio, delta modulation must use oversampling techniques, that is, the analog signal is sampled at a rate several times higher than the Nyquist rate (typically 4 times the Nyquist rate) the baseband signal. Correlation Increase: This increases the correlation between adjacent samples, which results in a small prediction error that can be encoded using only one bit. One-of-Two Values: At the transmitter, the sampled value is compared with a predicted value and the difference is quantized into one of the two values which simply indicates whether that sample is larger or smaller than the previous sample. The output of the quantizer is encoded using one binary digit per sample and sent to the receiver. Simple Algorithm: The algorithm for delta modulation is very simple. Since there is one bit of quantization, the differences are coded into only of the two levels.  If the current sample is smaller than the previous sample, a logic 0 is transmitted.  If the current sample is larger than the previous sample, a logic 1 is transmitted. Parameters: The key to effective use of delta modulation is the intelligent choice of the two parameters: 1) Step size 2) Sampling rate Wider Bandwidth/Larger Quantization Error: Increasing the sampling frequency results in delta-modulated waveform requiring a larger bandwidth (i.e., more bits per second must be transmitted). Increasing step size makes quantization error larger. Staircase Approximation: The receiver reconstructs the staircase approximation directly from the received binary information. - If a one is detected, the receiver increments with a positive step. - If a zero is detected, a negative step occurs. Decision Making: Figure 4.9-1 shows an analog waveform and its quantized version. All steps in this staircase are of the same size. In fitting the staircase to the function, we need only make a simple decision at each sample point: 4-24 Digital Communications

NUML, Islamabad

Chapter 4. Pulse Code Modulation

1) If the approximation falls below the signal at any sampling time, it is increased by +δ. 2) On the other hand, if the approximation lies above the signal, it is dcreased by -δ. Condition: provided the signal does not change too rapidly from sample to sample, the staircase approximation remains within +/-δ of the input signal. Example: The transmitted bit train for the example shown in Figure 4.9-1 is 00101111101000000. The receiver reconstructs the staircase approximation directly from the received binary information: - If a one is detected, the receiver increments with a positive step. - If a zero is detected, a negative step occurs Application of Delta Modulation: Delta modulation is used in some rural telephone networks and in digital recording of analogue signals. Distortion: Delta modulation systems are subject to two types of quantization error. 1) Slope-overload distortion 2) Granular noise

Figure 4.9-1 Delta modulation waveforms 204

4.9.1 Slope Overload Fast Input Signal Change: Figure 4.9.2-1 shows what happens when the analog input signal changes at a faster rate than the digital-to-analog converter in a delta modulator transmitter can keep up, or follow. The slope of analog signal is greater than the delta modulator can maintain. That is, slope overload distortion occurs when the transition from one step to the next fails to cross the input waveform. This is called slope overload. This type of overload is not determined by the amplitude of the message signal but rather by its slope. DM Performance Limiting Factor: Slope overload noise is one of basic limiting factor in performance of delta modulation. Countermeasures: 1) Increasing the clock frequency reduces the probability of slope overload occurring. Increasing the sampling rate will lead to larger bandwidth requirements. 2) Increase magnitude of minimum step size. Increasing step size will result in poor resolution. 4-25 Digital Communications

NUML, Islamabad

Chapter 4. Pulse Code Modulation

Adaptive Delta Modulation A better way to avoid slope overload is to detect the overload condition and make the step size larger when overloading is detected. Systems using this signal-dependent step sizes are called adaptive delta modulation (ADM) systems. Advantage of DM Simple Circuitry: Delta modulation systems have an advantage in that the electronic circuitry required at the transmitter and demodulation at the receiver is substantially simpler than that required for other PCM systems.

4.9.2 Granule Noise Analogous to Quantization Noise: Figure 4.9.2-1 contrasts the original and reconstructed signals associated with a delta modulation system. It can be seen that when the original analog input signal has a relatively constant amplitude, the reconstructed delta-modulated signal has variations that were not originally present in the original signal. This is called granular noise or idling noise. The idling noise is a square wave at one-half the clock rate. Granular noise in delta modulation is analogous to quantization noise in conventional PCM.

Original signal

Figure 4.9.2-1 Quantization error (slope overload, and granular or idling, noise)

Countermeasures: 1) Decrease Step-Size: Granular noise can be reduced by decreasing the step size. Therefore, to reduce the granular noise, a small resolution is needed, and to reduce the possibility of slope overloading occurring, a large resolution is required. Obviously, a compromise is necessary. (Resolution: The magnitude of the minimum step size is called quantization, which is equal in magnitude to the voltage of the least significant bit). If the clock rate is much greater than twice the highest frequency in the input signal, most of the idling noise can be filtered out at the receiver. Prevalent Signals: Granular noise is more prevalent in analog signals that have gradual slopes and whose amplitudes vary only a small amount. Slope overload is more prevalent in analog signals that have steep slopes or whose amplitude varies rapidly.

Digital Communications NUML, Islamabad

4-26

Chapter 4. Pulse Code Modulation

4.10 Vocoders Vocoders (voice coders) consist of -

speech analyzer and speech synthesizer.

Vocoders use speech analyzer that converts analog waveforms into narrowband digital signals. The synthesizer converts the digital signals into artificial sounds. Usually, the vocoder output waveform does not approximate the input waveform and may have an artificial, unnatural sound. Although the words of the speaker may be clearly understandable, the speaker may not be identifiable.

4.10.1 CELP Blocks of Samples: In CELP Code-Excited Linear-Prediction), whole blocks of sample are encoded at a time, instead of encoding on a sample-by-sample basis. Examples are the vector-sum excited linear prediction (VCELP) used in digital cellular telephones. The encoder operates on speech frames of 10 ms corresponding to 80 samples at a sampling rate of 8000 samples per second. For every 10 ms frame, the speech signal is analyzed to extract the parameters of the CELP model (linear-prediction filter coefficients, adaptive and fixed code-book indices and gains) to find a synthesized waveform that gives the best match to a speech segment. The encoder parameters that specify this best match are then transmitted to the receiver via digital data. The received data establish the parameters for the receiver synthesizer so that voice signal is reproduced for the listener.

Digital Communications NUML, Islamabad

4-27