Compact Disc - The Inside Story

Part 8 - Over-sampling and Filtering

[Contents] [Previous Part] [Next Part]

1 KHz Sine Wave, -60db, 16 bit, 44,100 samples/sec
Figure 1: 1 KHz Sine Wave, -60db, 16 bit, 44,100 samples/sec

The output of the DAC (Digital to Analog Converter) in a CD player is not a continuous waveform. It has distinct steps which occur at the conversion frequency. A 1 Khz sine wave reproduced at a level of about -60 db uses 6 bits, and appears at the output of a DAC without over-sampling as shown in figure 1. Incidentally, the same wave at the same level coming off a Vinyl LP would be almost totally masked by surface noise. The Fourier analysis of figure 1 reveals a large number of extraneous high frequency components, which are sum and difference products of harmonics of the 1 Khz sine wave and a square wave at the sampling frequency.

DAC Output Spectrum, No Over-sampling
Figure 2: DAC Output Spectrum, No Over-sampling

A signal with components covering the entire audio range (music) produces the DAC output spectrum in figure 2. It is fairly obvious that we only wish to pass frequency components out of the CD player which were originally encoded on the CD. Also, if any of the high frequency garbage gets into later audio stages, lots of problems will occur, such as instability, intermodulation distortion, overheating and damage to wide-band power amplifiers and tweeters. The solution is to use a low pass filter to eliminate all the out-of-band components, leaving the audio signal perfectly intact. Designing a filter to do this is practically impossible, so there have been various ways developed to closely approach the ideal, each with its own pros and cons.

7th Order Analog Filter Spectrum, No Over-sampling
Figure 3: 7th Order Analog Filter Spectrum, No Over-sampling

The simplest filter to construct is an active analog filter after the DAC; which have been used since the first generation of players. As you can see in figure 3, a lot of the "junk" has been removed, but there is still some there, and the upper audio frequencies have undergone a lot of audible phase shift. Players with no over-sampling would generally use higher order filters, up to 11 in some cases, which reduces the junk to acceptable levels, but the phase shift gets worse and noticable "ripples" appear in the upper audio response.

5th Order Analog, 2x Over-sampling
Figure 4: 5th Order Analog, 2x Over-sampling

Another technique is to double or quadruple the rate at which the DAC converts values, called over-sampling. The one or three intermediate values are calculated by digital interpolation before the DAC. Figure 4 shows a lower order filter response, but the junk is spread across a larger bandwidth due to the higher DAC conversion rate.

4th Order Digital, 4x Over-sampling
Figure 5: 4th Order Digital, 4x Over-sampling

To eliminate the remaining junk to well below -100 db, over- sampling must be used and additional mathematical low-pass filtering done on the digital signal before the DAC. Higher filter responses can be achieved like figure 5. Warning: the following explanation is not for jelly brains walking in off the street.

Impulse Response of Perfect Low-pass Filter
Figure 6: Impulse Response of Perfect Low-pass Filter

The output of the DAC can be treated as an infinite square pulse train at the conversion frequency with amplitude modulation provided by the audio base-band signal. A single pulse passing through a perfect low-pass filter will produce a delayed impulse with a (sine x) / x shape, with zeroes occuring at a period of twice the filter turn-over frequency, as shown in figure 6.

Sum of All Impulse Responses
Figure 7: Sum of All Impulse Responses

The sum of these waves for the DAC output passing through this filter is the sum of the impulse responses for each converted pulse; refer to figure 7.

This sum can be calculated mathematically on the digital samples before the DAC, to produce intermediate values for over-sampled conversion by the DAC. The original samples actually retain their values after filtering, so there is no modification of source information. The digital filter can simulate a perfect high-order low-pass filter at 22.1 Khz, leaving only the ultra high frequency DAC conversion artifacts, which can be removed by a phase-friendly 3rd order active Bessel filter.

Transversal Filter
Figure 8: Transversal Filter

The calculating process involves taking many previous and subsequent sample values, multiplying them by fixed coefficients and summing the results. Typically, 24 samples will be used to calculate each of the three intermediate values in a four times over-sampling system. Electronically, the samples are held in a shift register, which cycles them all through each of the coefficient multipliers, as shown in figure 8, leading to the name "transversal filter".

Time  Input sample   Output sample
(us)  value          value
 0        A          A
 5.7                 * (need earlier input sample values)
11.3                 *
17.0                 *
22.7      B          B
28.3                 -0.18 A + 0.90 B + 0.30 C - 0.12 D
34.0                  0.21 A + 0.64 B + 0.64 C - 0.21 D
39.7                  0.12 A + 0.30 B + 0.90 C - 0.18 D
45.4      C          C
51.0                 * (need later input sample values)
56.7                 *
62.4                 *
68.0      D          D

Table 1: Simple 4x over-sampling digital filter

Table 1 demonstrates a four times over-sampling digital filter using only 4 samples for calculating intermediate values for conversion. As can be seen, multiplying each sample by fractional coefficients and summing many results produces output values containing more than 16 bits of precision. The values can be simply truncated to 16 bits to drive the DAC, but this increases the level of quantization distortion.

A special round-off algorithm spreads the distortion over the entire DAC output spectrum, minimising distortion in the audio base-band. CD DACs with more than 16 bit resolution are now appearing on the market, along with increased over-sampling rates. More of the least significant bits from the digital filter can now be converted by the DAC, and the sparser DAC output artifact spectrum results in a more ideal low-pass filter being realised. Greater resolution also implies lower noise floors are being achieved.

By now, some people will feel like they have a jelly brain, so just read through the above paragraphs a few dozen more times. I could have gone into far more detail. A future article will describe the subjective deficiencies in the audio sections of some CD players, and how they can be upgraded.

At present, a minimum criteria for purchasing a CD player is dual 16 bit four times oversampling converters, high quality components including gold plated output sockets, and separate internal power supplies for each section of the circuit. I see no justification in having a separate box for the DACs; the DACs in the player and the audio design should have been good enough in the first place, to suit the quality of the digital circuits and mechanism. It is a good marketing exercise, however. I feel that having DACs in the pre-amp is a good idea for elimating an audio interconnect.


Figures 1 to 5 - Hand drawn by Glenn Baddeley, 1990

Figures 6 to 8 - J.R. Watkinson, Compact Disc Players - 2, Electronics & Wireless World magazine, November 1985, p31 & 32

Table 1 - Constructed by Glenn Baddeley from figure 6 in J.R. Watkinson, Digital Audio Editing, Electronics & Wireless World magazine, March 1986, p31

[Contents] [Previous Part] [Next Part]

Originally published in MAC Audio News No. 180, February 1990, pp 12-18.

Copyright © 1990 Glenn Baddeley. cd8.html was last updated 2 December 1996.