Module 15 Comp an Ding Wit

79

Click here to load reader

Transcript of Module 15 Comp an Ding Wit

Page 1: Module 15 Comp an Ding Wit

MODULE 15

COMPANDING

Prepared by: Engr. Jo-Ann C. Viñas

Page 2: Module 15 Comp an Ding Wit

2

OBJECTIVES

1. Advantages and Disadvantages of Digital Communications

2. Review of Pulse Code Modulation (PCM)3. Introduce the concept of companding2. State the importance of companding3. Discuss the two types of companding4. Solve problems involving companding

Page 3: Module 15 Comp an Ding Wit

3

PCM APPLICATIONS

PCM is the most commonly used technique in digital communications

1. Telephone System2. Digital Audio Recording3. CD Laser disks4. Voice mail5. Digital Video

Page 4: Module 15 Comp an Ding Wit

4

ANALOG

“ANALOG means ‘similar’ or a ‘copy’.”

“An Analog audio signal is an electronic copy of an original audio signal as sound in nature, with a continually

varying signal.”

“Analog copies of any original sound suffers some degree of signal degradation, called generational loss, and signal strength lessens and noise increases for each successive

copy.”

Page 5: Module 15 Comp an Ding Wit

5

DIGITAL

“A digital recording is no more than a series of numbers, and hence can be copied through an indefinite number of

generations without degradation. This implies that the life of a digital recording can be truly indefinite, because even if the medium (CD, DAT, etc) begins to decay physically,

the sample values can be copied to a new medium with no loss of information.”

Page 6: Module 15 Comp an Ding Wit

6

The established sampling rates for digital audio are:

1. 32 kHz for broadcast digital audio2. 44.1 kHz for CDs3. 48 kHz for digital audiotape (DAT) and digital videotape

( mini-DV and DV)4. 96 kHz or 192. 4 kHz for DVD-audio and BD-ROM (Blu

ray disc) audio

5. 2.8224 MHz for SACD (Super Audio CD) & DSD (Direct Stream Digital)

NOTE:

Page 7: Module 15 Comp an Ding Wit

7

ADVANTAGES OF DIGITAL COMMUNICATIONS

1. Digital communication is more rugged than analog communication

2. The viability of regenerative repeaters3. Digital hardware implementation is flexible4. Digital signals can be coded5. It is easier and more efficient to multiplex several

digital signals

Page 8: Module 15 Comp an Ding Wit

8

REMOVAL OF NOISE AND DISTORTION FROM DIGITAL SIGNAL

Page 9: Module 15 Comp an Ding Wit

TYPICAL FOUR-LEVEL SIGNAL USING 1, 2, 3, & 4V

Page 10: Module 15 Comp an Ding Wit

BINARY SIGNAL

Page 11: Module 15 Comp an Ding Wit

REGENERATION OF DIGITAL SIGNAL OPERATING WITH 1- AND 5V LEVELS

Page 12: Module 15 Comp an Ding Wit

ANALOG SIGNAL AMPLIFIER STAGES ADD NOISE AT EACH POINT WHILE INCREASING SIGNAL AMPLITUDE, THUS REDUCING SNR

Page 13: Module 15 Comp an Ding Wit

13

HARDWARE IMPLEMENTATION IS FLEXIBLE

Page 14: Module 15 Comp an Ding Wit

0 TO +1V ANALOG SIGNAL

Page 15: Module 15 Comp an Ding Wit

2 BITS RESOLUTION

Page 16: Module 15 Comp an Ding Wit

3 BITS RESOLUTION

Page 17: Module 15 Comp an Ding Wit

17

DISADVANTAGE OF DIGITAL COMMUNICATIONS

1. Increased bandwidth of transmission

Page 18: Module 15 Comp an Ding Wit

18

ADVANTAGES OF DIGITAL COMMUNICATIONS

Audio compression is typically used for 3 reasons:

1. To reduce the file size so that more audio may be stored on a given media format (digital audio players, DVD-video disc, Minidisc. Etc)2. To reduce the file size so that files will download from a Web site faster.3. To reduce the data rate so that files will stream (broadcast) over a network such as the Internet.

Page 19: Module 15 Comp an Ding Wit

19

CRITERIA FOR SIGNAL ENCODING

What determines how successful a receiver will be in interpreting an incoming signal?

1. Signal-to-Noise Ratio2. Data Rate3. Bandwidth

An increase in data rate increases bit error rate

An increase in SNR decreases bit error rateAn increase in bandwidth allows an increase in data rate

Page 20: Module 15 Comp an Ding Wit

20

PULSE CODE MODULATION

- is a method of modulating in which a continuous analog wave is transmitted in an equivalent digital mode.

Page 21: Module 15 Comp an Ding Wit

21

NOTE:

“If a band-limited signal is sampled at regular intervals of time and a a rate equal to or higher than twice the highest significant signal frequency, then the sample contains all the information of the original signal. The original signal may then be reconstructed by use of a low-pass filter.”

Page 22: Module 15 Comp an Ding Wit

PCM TRANSMIT BLOCKS

SAMPLINGSAMPLING QUANTIZINGQUANTIZING ENCODINGENCODING

Page 23: Module 15 Comp an Ding Wit

23

QUANTIZATION

Changing from CONTINUOUS IN VALUE to DISCRETE IN VALUE.

Page 24: Module 15 Comp an Ding Wit

24

SAMPLING

Changing from CONTINUOUS IN TIME to DISCRETE IN TIME.

Page 25: Module 15 Comp an Ding Wit

25

CODING

Code value of sample into 1s and 0s.

Page 26: Module 15 Comp an Ding Wit

PCM PARAMETERS

1. Number of Levels or Codewords (M)2. Bandwidth (Data Rate) (BW)3. Dynamic Range (DR)4. Resolution (Res)5. Coding Efficiency ()6. Quantization Error (Qe)7. Signal-to-Quantization Noise Ratio (SQR)

Page 27: Module 15 Comp an Ding Wit

27

1. Number of Levels or Codewords (M)

PCM PARAMETERS

M = 2n

where:M = # of levels, symbols or codewordsn = # of PCM bits used (sign bit excluded) = # of bits per sample

Page 28: Module 15 Comp an Ding Wit

28

2. Bandwidth (Data Rate)

PCM PARAMETERS

BW = nfs = fb

where:fs = sampling rate in Hzfb = bit rate in bps

Page 29: Module 15 Comp an Ding Wit

29

3. Dynamic Range

PCM PARAMETERS

DR = 2n - 1 DR = Vmax

Vmin

where:Vmax = maximum input voltageVmin = minimum input voltage

Page 30: Module 15 Comp an Ding Wit

DYNAMIC RANGE OF ANALOG SIGNAL

Page 31: Module 15 Comp an Ding Wit

31

EXAMPLE

What is the dynamic range of an 8-bit linear sign magnitude PCM spectrum whose maximum decode voltage at the receiver is 1.27 Vp? (ECE BOARD EXAM NOV 2002)

Page 32: Module 15 Comp an Ding Wit

32

4. Resolution

PCM PARAMETERS

Resolution = VLSB

where:VLSB = voltage of the least significant bit

Page 33: Module 15 Comp an Ding Wit

33

EXAMPLE

Determine the resolution for an 8-bit linear sign-magnitude PCM for a maximum decode voltage of 2.55Vp. (ECE BOARD EXAM NOV 2002)

Page 34: Module 15 Comp an Ding Wit

34

5. Coding Efficiency ()

PCM PARAMETERS

=min

max

X 100

where:min = Min # of bits (including the sign bit)max= Actual # of bits (including the sign bit)

Page 35: Module 15 Comp an Ding Wit

35

6. Quantization Error

PCM PARAMETERS

Qe =VMIN

2 Qe =

Resolution

2

Page 36: Module 15 Comp an Ding Wit

36

7. Signal-to-Quantization Noise Ratio

PCM PARAMETERS

SQR = 10.79 dB + 20 log VS

q

Page 37: Module 15 Comp an Ding Wit

37

A. Ideal Signal-to-Quantization Noise Ratio

PCM PARAMETERS

= 3M2SN

SN

32= (22n)

a. In unitless

b. In dB

= 6.02n + 1.76SN dB

MOSTUSED...

Page 38: Module 15 Comp an Ding Wit

38

EXAMPLE

Determine the signal-to-quantization noise ratio in dB, if an audio signal with a bandwidth of 3.2 kHz is converted to PCM signal by sampling at 8 kilo samples/sec and with a data rate of 64 kbps.

Page 39: Module 15 Comp an Ding Wit

39

CODING

- Practical PCM systems use 7- and 8-level binary code, or

27 = 128 quantum steps28 = 256 quantum steps

Page 40: Module 15 Comp an Ding Wit

LINEAR QUANTIZATION - SIGNAL AMPLITUDE VERSUS QUANTIZATION VALUE

Page 41: Module 15 Comp an Ding Wit

41

NOTE:

- Two methods are used to reduce the quantum steps to 128 or 256 without sacrificing fidelity.

1. Use nonuniform quantizing performed in the coding process.

2. Use companding prior to quantizing

Page 42: Module 15 Comp an Ding Wit

LINEAR VERSUS NON LINEAR PCM CODES

Page 43: Module 15 Comp an Ding Wit

NON-LINEAR STEP QUANTIZING

Page 44: Module 15 Comp an Ding Wit

44

COMPANDING

- the process of compressing and then expanding

- with companded system, the higher amplitude analog signals are compressed (amplified less than the lower- amplitude signals) prior to transmission and then expanded) amplified more than the lower amplitude signals in the receiver).

Page 45: Module 15 Comp an Ding Wit

BASIC COMPANDING PROCESS

Page 46: Module 15 Comp an Ding Wit

46

2 TYPES OF COMPANDING

1. Analog Compandinga. - Lawb. A - Law

2. Digital Companding

Page 47: Module 15 Comp an Ding Wit

PCM SYSTEM WITH ANALOG COMPANDING

Page 48: Module 15 Comp an Ding Wit

48

2 TYPES OF COMPANDING

A - Law - Law

- originally defined by the Comite European de Postes et Telecommunications (CEPT)

- defined by the T1 Standards Committee in the USA

- is probably the most wide spread internationally

- is dominant in the world’s largest system in North America

“Both are recognized by the telephony section of the International Telecommunication Union (ITU-T), the supreme international standards organization for telephony.”

- A-law produces slightly better SNR for small signals

- while the µ-law has less noise on an idle channel

“Both characteristics allow small signals to be processed as accurately as large signals, and produce much improved signal to noise ratio SNR.”

Page 49: Module 15 Comp an Ding Wit

49

µ-LAW COMPANDING

Vout = Vmax ln(1 + µ{Vin /Vmax})

ln(1 + µ)

Where: Vmax = maximum uncompressed analog input amplitude (volts)Vin = amplitude of the input signal at particular instant of time (volts)µ = parameter used to define the amount of compression(unitless)Vout = compressed output amplitude (volts)

Page 50: Module 15 Comp an Ding Wit

µ-LAW CHARACTERISTIC

Page 51: Module 15 Comp an Ding Wit

51

EXAMPLE

For a compressor with a µ = 255, determine:

a) The voltage gain for the following relative values of Vin shown in the table below:

Page 52: Module 15 Comp an Ding Wit

52

EXAMPLE

b) The compressed output voltage for a maximum input voltage of 4V.

c) Input and output dynamic ranges and compression in dB.

Page 53: Module 15 Comp an Ding Wit

53

µ-LAW CHARACTERISTIC

Where:V = Output VoltageVr = Reference Voltagec = Chord Numbers = Step Number

Page 54: Module 15 Comp an Ding Wit

54

A-LAW COMPANDING

In Europe, the ITU-T has established A-law companding to be used to approximate true logarithmic companding

Vout = AVin /Vmax

1 + lnAVmax

1 + ln(AVin /Vmax)

1 + lnAVout =

0 ≤

Vin

Vmax

Vmax

1 A

1 A

Vin

Vmax

1

Page 55: Module 15 Comp an Ding Wit

DIGITALLY COMPOUNDED PCM SYSTEM

Page 56: Module 15 Comp an Ding Wit

µ-255 COMPRESSION CHARACTERISTIC

- µ-law companding is a system that divides the analog signal range into fifteen segments each eventually encoded into eight-bit digital value.

Page 57: Module 15 Comp an Ding Wit

13 SEGMENT SCALE

Page 58: Module 15 Comp an Ding Wit

µ-255 COMPRESSION CHARACTERISTIC

Page 59: Module 15 Comp an Ding Wit

PCM QUANTIZATION LEVELS - CHORDS & STEPS

Page 60: Module 15 Comp an Ding Wit

QUANTIZATION ERROR - RECOVERED STEP LEVELS DO NOT MATCH PAM LEVELS

Page 61: Module 15 Comp an Ding Wit

LINEAR QUANTIZATION - ANOTHER VIEW

Page 62: Module 15 Comp an Ding Wit

LOGARITHMIC QUANTIZATION - ANOTHER VIEW

Page 63: Module 15 Comp an Ding Wit

63

8-BIT COMPRESSED CODE FORMAT

Page 64: Module 15 Comp an Ding Wit

64

µ-255 ENCODING TABLE

Page 65: Module 15 Comp an Ding Wit

65

µ-255 DECODING TABLE

Page 66: Module 15 Comp an Ding Wit

66

Page 67: Module 15 Comp an Ding Wit

67

PROCESS OF DIGITAL COMPRESSION

Digitally, the 12-bit values are encoded into 8-bit compressed code as follows:

1. Retain the sign bit as the first bit of the 8-bit code.

2. Count the number of zeros until the occurrence of the first 1 bit. Subtract the zero count from 7. This is the segment number.

3. The first occurrence of 1 is assumed during the expanding process, so it is set aside during compression.4. Copy the next four bits (ABCD) into the 8-bit compressed code.

Page 68: Module 15 Comp an Ding Wit

68

EXAMPLE

Code the 12-bit code 100001011010 into an 8-bit compressed µ-law code.

Page 69: Module 15 Comp an Ding Wit

69

EXAMPLE

Determine the 12-bit linear code, the eight-bit compressed code, the decoded 12-bit code, the quantization error, and the compression error for a resolution of 0.01 V and analog sample voltages of

(a) + 0.053 V(b) -0.318 V (c) +10.234 V

Page 70: Module 15 Comp an Ding Wit

70

PROCESS OF DIGITAL EXPANSION

Expanding back digitally, reverses the process:

1. Retain the sign bit.2. Take the segment number, subtract from 7 and add

that many 0s.3. Make the next bit a 1.4. The next bits are ABCD values.5. Add a 1 and sufficient 0s to complete the 12-bit value.

Page 71: Module 15 Comp an Ding Wit

71

QUANTIZATION ERROR

- error is error due to rounding off the sample voltage in the encoder to the closest PCM.

Page 72: Module 15 Comp an Ding Wit

72

COMPRESSION ERROR

- error caused by forcing the truncated bit to a 1 in the receiver.

Page 73: Module 15 Comp an Ding Wit

73

DIGITAL COMPRESSION ERROR

The magnitude of the compression error is not the same for all samples. However, the maximum percentage is the same in each segment (other than segments 0 and 1, where there is no compression error)

% error =12-bit encoded voltage - 12-bit decoded voltage

12-bit decoded voltage X 100

Page 74: Module 15 Comp an Ding Wit

74

CODEC

A single integrated chip that performs the encoding and decoding process of PCM.

Page 75: Module 15 Comp an Ding Wit

75

EXAMPLE

Expand the compressed code of the above example.

Page 76: Module 15 Comp an Ding Wit

76

SEATWORK

For the following values of μ, Vmax, and Vin, determine the compressor gain:

Page 77: Module 15 Comp an Ding Wit

77

SEATWORK

For the following 12-bit linear PCM codes, determine the eight-bit compressed code to which they would be converted:

a. 100011110010b. 000001000000c. 000111111000d. 111111110010e. 000000100000

Page 78: Module 15 Comp an Ding Wit

78

SEATWORK

For the following 8-bit compressed codes,determine the expanded 12-bit code.

a. 11001010b. 00010010c. 10101010d. 01010101e. 11110000f. 11011011

Page 79: Module 15 Comp an Ding Wit

79

SEATWORK

A 12-bit linear sign-magnitude PCM code is digitally compressed into 8 bits. For a resolution of 0.016 V, determine the following quantities for the indicated input voltages: a. 12-bit linear PCM code

b. eight-bit compressed code c. decoded 12-bit code

d. decoded voltage

For Vin = -6.592 V, +12.992 V, -3.36 V