- Define PCM (Pulse Code Modulation).
- Identify the blocks in the PCM encode (A/D) and decode (D/A) signal chains.
- Explain the basic functions of each aforementioned blocks, and their
- Describe (briefly) Successive Approximation.
- In terms of conversion, define oversampling.
- Give advantages of the oversampling process.
- define noise shaping.
Chapter 2.3-2.5, Desktop
Audio Technology - Rumsey
Pulse Code Modulation
- The best and most commonly used method for digitization
is linear Pulse Code Modulation (PCM).
- PCM represents each sample as a binary word that describes
the sample's amplitude.
- PCM is the coding system used for digital audio representations
virtually all digital systems currently being used, such as CD's,
computer audio files, and conventional audio recorders and mixers.
Analog to Digital Conversion
The encoding section
of a conventional stereo PCM recorder consists of:
- a dither generator
- input lowpass filters (anit-aliasing)
- sample-and-hold circuits
- A to D converters
The dither generator produces a noise signal that is
added to the input so that the effects of quantization error is minimized.
The dither must be added to the signal prior to
filtering and digitization. Since it is broadband, it must be filtered
along with the signal.
This dither is analog white noise with Gaussian probability
- typically, it is 1/2 LSB.
Anti-Aliasing filter (LPF)
A low pass filter must be introduced before digitization
to alleviate aliasing.
In a classic recorder (non oversampling), an analog
LPF has a cutoff just below the Nyquist frequency with a very steep slope.
S = 48 kHz, Fc = 20 kHz and complete attenuation
at 24 kHz.
- Below 20 kHz is the Pass band
- From 20kHz to 24kHz is the Guard band.
- Above 24 kHz is the Stop band
The small guard band requires the use of a filter with
a very steep slope. Such a filter can introduce certain anomalies including:
- resonance at the cutoff frequency
- oscillation (ringing)
- phase shift and high frequency loss
These anomalies can be overcome with the use of oversampling
A/D converters (see below).
as the name implies, has two tasks:
- time-samples the input waveform at a periodic rate
- holds the analog value of the sample while the A/D
converter outputs the corresponding digital word.
A clock (an oscillator circuit that outputs timing pulses)
is set to the sampling frequency.
Some things to consider with S/H circuits:
- Need a fast acquisition time (time between
the start of the sample command and the actual taking of the sample).
- The sample command must be accurately clocked
-- cant have varying sample times. Must be controlled by a clock designed
with a highly accurate crystal quartz oscillator.
- Jitter - Variations in absolute timing. This
adds noise and distortion.
- Droop - The decrease in voltage as the capacitor
leaks between samples.
- the most critical component in the entire conversion
- Any errors introduced by the A/D will follow the audio signal throughout the
remaining signal chain and ultimately back into its analog state.
- Essentially, the circuit must:
- Examine the sampled input signal
- Determine the quantization level nearest the samples value
- Output the binary code that is assigned to that level
- Two important qualities in an A/D converter are:
- Speed - (conversion time - the time it takes to output a digital word) must perform a complete conversion within
the span of one sampling period. For example, S=48k, 48,000 conversions per second per channel.
- Accuracy - quantization intervals must be evenly spaced throughout the entire amplitude range.
Successive Approximation A/D Converter (SAR)
- Successive approximation is one of the earliest and
most successful analog-to-digital conversion techniques.
- This conversion process utilizes a "divide and
- The digital data is gathered one bit at a time
by comparing the measured value to a reference value.
- As each comparison is made, the reference value
is divided in two, making a smaller comparison window.
- When all bits are tested, the digital word
represents the closest approximation possible to the original measurement.
- The result of this process is a PCM representation of
the measured value.
An example with a 4-bit system:
Input voltage = 13
1000 = 8 < >(DA conversion)
Is 13 => 8 (comparison)
Yes, 1100 = 12
Is 13 => 12
Yes, 1110 =14
Is 13 => 14
No, 1101 = 13 (reset)
Is 13 => 13
13 = 1101
The number of bits defines number of tests
Another example with an 8-bit system:
Input voltage = 6.92
10000000 = 5 volts
Is 6.92 >=5
Yes, 11000000 = 7.5
Is 6.92 >= 7.5
No, 10100000 = 6.25 (reset)
Is 6.92 >=6.25
Yes, 10110000 = 6.875
Yes, 10111000 = 7.1875
Is 6.92 >=7.1875
No, 10110100 = 7.03125 (reset)
Is 6.92 >=7.03125
No, 10110010 = 6.95312 (reset)
Is 6.92 >=6.95312
No, 10110001 = 6.91406 (reset)
Is 6.92 >= 6.91406
Yes, 10110001 = 6.91406
6.92 = 10110001
The number of bits defines number of checks
- The repetitive process of measuring and comparing must be done as many
times as there are bits, for each sample measured, regardless of the sample's
In essence, each sample is measured from zero volts.
- The process takes time. the larger the bit depth, the longer the process.
- The last comparison is the least significant bit. The
last comparison is also most subject to error due to droop
in the S/H circuit.
to Analog Conversion
- The playback of digital audio is
basically the reverse of recording digital audio. The encoded
data is decoded, hopefully, back into the original waveform that entered
the audio system.
- The decoding section of a conventional stereo PCM
- D to A converter
- Sample/Hold circuit
- Reconstruction or Anti-Imaging filter
- D/A converter takes a digital word & generates an analog voltage.
- The converter is a programmable resister network - the
network allows for the generation of the defined voltage.
- The output of the D/A converter is a series of "staircase-like" voltages.
Sample and Hold
- The staircase voltages are resampled.
- Resampling reduces the width of the pulse.
- If pulse width was not reduced, the resulting signal would
suffer from high frequency loss - an anomaly known as the "aperture
Anti-Imaging (Reconstruction) Filter
- The reconstruction filter is a low-pass filter
with a cutoff that is half of the sampling frequency.
- The filter removes the upper frequencies, including the
images that exist around the sampling frequency and its overtones.
- The effect of the filter is
to "smooth out" the stair step by joining together the sample
- Ideally, the audio wave form that
emerges from the LPF is exactly the same as the waveform
that came into the LPF.
Oversampling A/D conversion
- A weak link in the classic PCM conversion process is
the Anti-Aliasing Filter.
- To remedy this, analog input filters with SAR A/D converters
have been replaced by oversampling A/D converters with digital
- Oversampling raises the sample rate (as much as 128 times).
The resulting samples are quantized at a lower bit rate,
based on the principle
that the information-carrying capacity of a system is based on the product
of sample rate and bit depth.
- In most cases, the samples are converted back to lower
rates and higher bit depths with no overall loss of information.
- In the following example, the sample rate (44.1 kHz) is
doubled (2 x oversampled), resulting in a sample rate
of 88.2 kHz with a Nyquist frequency of 44.1 kHz.
- By extending the Nyquist level to a higher frequency,
the analog LPF can have a much more gentle slope.
- Gently rolling
off at 20kHz and band guard hard at 44.1
kHz. This allows for a less aggressive LPF to be
used, contributes to lower noise, flatter
frequency response, and less phase shift.
Advantages of Oversampling:
- Since quantization noise is spread over a wider spectrum,
noise in the audio band is reduced by 3dB for every factor of 2 in the oversample
- Higher sample rate raises spectral images well above
audio range - no need for analog filter in the A to D process.
- D to A process uses a much gentler filter.
- Digital LPF has a flatter frequency response, and
no phase shift.
- Higher sample rates improve stereo imaging and dithering.
- One result of lower resolution is higher signal-to-error ratios and higher noise. This noise is spread
across the entire frequency spectrum, and, if not addressed, can be at unacceptable
- Noise shaping is a process that moves the noise to a different frequency range. Through the use
of digital signal processing a process similar to a feedback loop. The result is a transfer
of noise from the audio band to ranges above the audio band.
- Different curves are available, according to the process performed.
Oversampling D/A Conversion
- When oversampling on the input,
the sample rate is reduced by decimation. Differently, output oversampling
introduces NEW samples by interpolation.
at the output stage of the digital audio system basically is a process
whereby the player reads
two samples, and additional values are "interpolated" in between the two.
In a 4X oversampling playback system, 3 additional values are inserted
between the actual single samples (3+1=4 for 4X oversampling).
- Interpolation is employed
before the D/A converter by first increasing the sampling
rate and then using a digital LPF.
- Output oversampling is once again
an attempt to ease the job of the LPF.
Oversamling Example (4X ):
- The input is sampled at 44.1kHz
- 3 new samples are inserted in between the original ones at
the interpolation ratio. The 3 new samples
- At this point the frequency response has jumped
to 176.4 kHz. The sample rate has quadrupled.
- The faster sample stream passes through a digital filter
which makes the new samples into smooth interpolations
of the original data removing any alias frequencies as it does so.
- The output of the filter is streamed at 176.4 kHz containing
the original frequencies minus any aliasing.
- The analog signal is reconstructed with a DAC running at the 4X rate
and streamed thru the LPF which has a much
easier job of removing aliasing
at a much higher Nyquist. The steep filter can be replaced with a gentle
low-order LPF eliminating the problems
caused by aggressive filters.
- < Noise shaping can be used to further
reduce quantization noise.
- With noise shaping, made possible with oversampling,
the noise power within the audio band is reduced at the expense of increased
noise outside that band.