Companding Lecture Notes PDF
Document Details
Uploaded by BrightestNavy
Tags
Related
- TCM Synchronous Learning - Lecture 2 PDF
- Media And Information Literacy PDF
- Lecture 01 CE797 F24 - Raster Data Model PDF
- UTS Midterm Report: The Digital Self (Group VI) PDF
- IS4302 Blockchain and Distributed Ledger Technologies Week 7: Cryptocurrencies and NFTs Fall 2024 PDF
- Digital Publishing Midterm PDF
Summary
These lecture notes provide an introduction to companding, a technique used to compress and expand analog signals in communication systems. The notes cover both analog and digital companding, discussing different characteristics and applications. Includes formulas and figures showcasing examples of companding processes.
Full Transcript
Digital Transmission Companding Companding is the process of compressing and then expanding. With companded systems, the higher-amplitude analog signals are compressed in the transmitter prior to transmission and then expanded in the receiver. Compressed means they are amplified less than...
Digital Transmission Companding Companding is the process of compressing and then expanding. With companded systems, the higher-amplitude analog signals are compressed in the transmitter prior to transmission and then expanded in the receiver. Compressed means they are amplified less than the lower- amplitude signals and expanded means they are amplified more than the lower-amplitude signals. Companding is a means of improving the dynamic range of a communications system. Figure 1 illustrates the process of companding. An analog input signal with a dynamic range of 50 dB is compressed to 25 dB prior to transmission and then, expanded back to its original dynamic range of 50 dB in the receiver. Early PCM systems used analog companding techniques, whereas more modern systems use digital companding. Companding Figure 1. Basic Companding Process Companding Analog Companding Historically, analog compression was implemented using specially designed diodes inserted in the analog signal path in a PCM transmitter prior to the sample-and-hold circuit. Analog expansion was also implemented with diodes that were placed just after the lowpass filter in the PCM receiver. The basic process of analog companding is shown in Figure 2. In the transmitter, the dynamic range of the analog signal is compressed, sampled, and then converted to a linear PCM code. In the receiver, the PCM code is converted to a PAM signal, filtered, and then expanded back to its original dynamic range. Companding Figure 2. PCM System with Analog Companding Companding Analog Companding Different signal distributions require different companding characteristics. For instance, voice quality telephone signals require a relatively constant SQR performance over a wide dynamic range, which means that the distortion must be proportional to signal amplitude for all input signal levels. This requires a logarithmic compression ratio, which requires an infinite dynamic range and an infinite number of PCM codes. Of course, this is impossible to achieve. However, there are two methods of analog companding currently being used that closely approximate a logarithmic function and are often called log-PCM codes. The two methods are μ-law and the A-law companding Companding Analog Companding: µ - Law companding In the United States and Japan, μ-law companding is used. The compression characteristics for μ-law is Figure 3 shows the compression curves for several values of μ. Note that the higher the μ, the more compression. Also note that for μ = 0, the curve is linear (no compression). Companding Analog Companding: µ - Law companding Figure 3. μ-law compression characteristics Companding Analog Companding: µ - Law companding The parameter μ determines the range of signal power in which the SQR is relatively constant. Voice transmission requires a minimum dynamic range of 40 dB and a seven-bit PCM code. For a relatively constant SQR and a 40-dB dynamic range, a μ≥100 is required. The early Bell System PCM systems used a seven-bit code with a μ= 100. However, the most recent PCM systems use an eight-bit code and a μ= 255. Companding Analog Companding: µ - Law companding Example 1. For a compressor with a μ 255, determine a) The voltage gain for the following relative values of Vin: Vmax, 0.75 Vmax, 0.5 Vmax, and 0.25 Vmax. b) The compressed output voltage for a maximum input voltage of 4 V. c) Input and output dynamic ranges and compression. Companding Analog Companding: µ - Law companding Solution. a) Substituting into Equation 1, the following voltage gains are achieved for the given input magnitudes: Companding Analog Companding: µ - Law companding Solution. b) Using the compressed voltage gains determined in step (a), the output voltage is simply the input voltage times the compression gain: Companding Analog Companding: µ - Law companding Solution. c) Dynamic range is calculated by Companding Analog Companding: µ - Law companding To restore the signals to their original proportions in the receiver, the compressed voltages are expanded by passing them through an amplifier with gain characteristics that are the complement of those in the compressor. For the values given in Example 1, the voltage gains in the receiver are as follows: Companding Analog Companding: µ - Law companding The overall circuit gain is simply the product of the compression and expansion factors, which equals one for all input voltage levels. For the values given in Example 1, Companding Analog Companding: A – Law companding In Europe, the ITU-T has established A-law companding to be used to approximate true logarithmic companding. For an intended dynamic range, A-law companding has a slightly flatter SQR than μ-law. A-law companding, however, is inferior to μ-law in terms of small-signal quality (idle channel noise). The compression characteristic for A-law companding is Companding Digital Companding Digital companding involves compression in the transmitter after the input sample has been converted to a linear PCM code and then expansion in the receiver prior to PCM decoding. Figure 4 shows the block diagram for a digitally companded PCM system. Companding Digital Companding Figure 4. Digitally companded PCM system Companding Digital Companding In the transmitter, the sampled analog signal is converted to a linear PCM code and then the linear code is digitally compressed. In the receiver, the compressed PCM code is expanded and then decoded (i.e., converted back to analog). The most recent digitally compressed PCM systems use a 12-bit linear PCM code and an eight-bit compressed PCM code. The compression and expansion curves closely resemble the analog μ-law curves with a μ= 255 by approximating the curve with a set of eight straight-line segments (segments 0 through 7).The slope of each successive segment is exactly one-half that of the previous segment. Companding Digital Companding Figure 5. µ255 compression characteristics (positive values only) Companding Digital Companding The 12-bit-to-8-bit digital compression curve is shown in Figure 5 for positive values only. The curve for negative values is identical except the inverse. Although there are 16 segments (eight positive and eight negative), this scheme is often called 13-segment compression because the curve for segments +0, +1, -0, and -1 is considered as one segment represented by a straight line with a constant slope. In the digital companding algorithm for a 12-bit linear-to-8-bit compressed code, the eight-bit compressed code consists of a sign bit, a 3-bit segment identifier, and a 4-bit magnitude code that specifies the quantization interval within the specified segment (see Figure 6a). Companding Digital Companding Figure 6. 12-bit-to-8-bit digital companding: (a) 8-bit μ255 compressed code format; (b) μ255 encoding table; (c) μ255 decoding table Companding Digital Companding In the μ255-encoding table shown in Figure 6b, the bit positions designated with an X are truncated during compression and subsequently lost. Bits designated A, B, C, and D, including the sign bit are transmitted as is. Note that for segments 0 and 1, the encoded 12-bit PCM code is duplicated exactly at the output of the decoder (compare Figures 6b and c), whereas for segment 7, only the most significant six bits are duplicated. Companding Digital Companding The 11 magnitude bits makes 2048 possible codes, but they are not equally distributed among the eight segments. There are 16 codes in segment 0 and 16 codes in segment 1. In each subsequent segment, the number of codes doubles (i.e., segment 2 has 32 codes; segment 3 has 64 codes, and so on). 32 codes in segment 2 means 24 𝑥 21(24 possibilities for ABCD and 21 possibilities for one truncated bit X), 64 codes in segment 3 means 24 𝑥 22(22 because segment 3 has two truncated bits XX), and so on. Companding Digital Companding However, as seen in Figure 6c, in each of the eight segments, only 16 12-bit codes can be produced. Consequently, in segments 0 and 1, there is no compression (of the 16 possible codes, all 16 can be decoded without error). In segment 2, there is a compression ratio of 2:1 (of the 32 possible codes, only 16 can be decoded). In segment 3, there is a 4:1 compression ratio (64 codes to 16 codes). The compression ratio doubles with each successive segment. The compression ratio in segment 7 is 1024/16, or 64:1. Companding Digital Companding The compression process is as follows. The analog signal is sampled and converted to a linear 12-bit sign- magnitude code. The sign bit is transferred directly to an eight-bit compressed code. The segment number in the eight-bit code is determined by counting the number of leading 0s in the 11-bit magnitude portion of the linear code beginning with the most significant bit. Subtract the number of leading 0s (not to exceed 7) from 7. The result is the segment number, which is converted to a three-bit binary number and inserted into the eight-bit compressed code as the segment identifier. The four magnitude bits (A, B, C, and D) represent the quantization interval (i.e., subsegments) and are substituted into the least significant four bits of the 8-bit compressed code. Companding Digital Companding Essentially, segments 2 through 7 are subdivided into smaller subsegments. Each segment consists of 16 subsegments (24), which correspond to the 16 conditions possible for bits A, B, C, and D (0000 to 1111). In segment 2, there are two codes per subsegment. In segment 3, there are four. The number of codes per subsegment doubles with each subsequent segment. Consequently, in segment 7, each subsegment has 64 codes. Companding Digital Companding Figure 7 shows the breakdown of segments versus subsegments for segments 5 and 7. Note that in each subsegment, all 12-bit codes, once compressed and expanded, yield a single 12-bit code. In the decoder, the most significant of the truncated bits is reinserted as a logic 1. The remaining truncated bits are reinserted as 0s. This ensures that the maximum magnitude of error introduced by the compression and expansion process is minimized. Companding Figure 7. 12-bit segments divided into subsegments: (a) segment 7; (segment 5) Companding Digital Companding Essentially, the decoder guesses what the truncated bits were prior to encoding. The most logical guess is halfway between the minimum- and maximum-magnitude codes. For example, in segment 6, the five least significant bits are truncated during compression; therefore, in the receiver, the decoder must try to determine what those bits were. The possibilities include any code between 00000 and 11111. The logical guess is 10000, approximately half the maximum magnitude. Consequently, the maximum compression error is slightly more than one-half the maximum magnitude for that segment. Companding Digital Companding Example 2: 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, and (c) +10.234 V. Companding Digital Companding Solution: a) To determine the 12-bit linear code, simply divide the sample voltage by the resolution, round off the quotient, and then convert the result to a 12-bit sign-magnitude code: Companding Digital Companding Solution: a). Companding Digital Companding Solution: a) The recovered 12-bit code (+5) is exactly the same as the original 12-bit linear code (+5). Therefore, the decoded voltage (+0.05 V) is the same as the original encoded voltage (+0.5). This is true for all codes in segments 0 and 1. Thus, there is no compression error in segments 0 and 1, and the only error produced is from the quantizing process (for this example, the quantization error Qe = 0.003 V). Companding Digital Companding Solution: b). Companding Digital Companding Solution: b) For this example, there are two errors: the quantization error and the compression error. The quantization error is due to rounding off the sample voltage in the encoder to the closest PCM code, and the compression error is caused by forcing the truncated bit to be a 1 in the receiver. Keep in mind that the two errors are not always additive, as they could cause errors in the opposite direction and actually cancel each other. The worst- case scenario would be when the two errors were in the same direction and at their maximum values. Companding Digital Companding Solution: b) For this example, the combined error was 0.33 V - 0.318 V= 0.012 V (0.002 V quantization error and 0.01V compression error). They add up because these two errors were in the same direction (i.e. the magnitude 0.318V of the sample was increased to 0.32V during quantization, and the magnitude of the encoded voltage was again increased from 0.32V to 0.33V during compression disregarding the sign). The worst possible error in segments 0 and 1 is the maximum quantization error, or half the magnitude of the resolution. In segments 2 through 7, the worst possible error is the sum of the maximum quantization error plus the magnitude of the most significant of the truncated bits. Companding Digital Companding Solution: c). Companding Digital Companding Solution: c). Companding Digital Companding Digital Compression Error As seen in Example 2, the magnitude of the compression error is not the same for all samples. However, the maximum percentage error is the same in each segment (other than segments 0 and 1, where there is no compression error). For comparison purposes, the following formula is used for computing the percentage error introduced by digital compression: 𝟏𝟐 𝒃𝒊𝒕 𝒆𝒏𝒄𝒐𝒅𝒆𝒅 𝒗𝒐𝒍𝒕𝒂𝒈𝒆 − 𝟏𝟐 𝒃𝒊𝒕 𝒅𝒆𝒄𝒐𝒅𝒆𝒅 𝒗𝒐𝒍𝒕𝒂𝒈𝒆 %𝒆𝒓𝒓𝒐𝒓 = 𝒙𝟏𝟎𝟎 (𝟑) 𝟏𝟐 𝒃𝒊𝒕 𝒅𝒆𝒄𝒐𝒅𝒆𝒅 𝒗𝒐𝒍𝒕𝒂𝒈𝒆 Companding Digital Companding Digital Compression Error The maximum percentage error will occur for the smallest number in the lowest subsegment within any given segment. The smallest number corresponds to AAAA=0000, and the lowest subsegment means all truncated bits (X) are 0. This applies to segments 2 to 7 since there is no compression error in segments 0 and 1. Companding Digital Companding Digital Compression Error Companding Digital Companding Digital Compression Error Companding Digital Companding Digital Compression Error The maximum percentage error is the same for segments 2 through 7. Consequently, the maximum SQR degradation is the same for each segment.