Upload
ralf-parker
View
215
Download
2
Embed Size (px)
Citation preview
Fall 2004 EE 3563 Digital Systems Design
Audio Basics
Analog to Digital Conversion Sampling Rate Quantization Aliasing Digital to Analog Conversion
Fall 2004 EE 3563 Digital Systems Design
Audio Basics - Analog to Digital Conversion
Process of digitizing a signal (such as music)
Human hearing range is roughly 20 Hz to 20 KHz CD’s are sampled at 44,100 Hz – that’s no coincidence Nyquist Theorem – Must sample at a minimum of twice the
highest frequency– If not, undesirable aliasing will occur
Music ADC QuantizerLPF
Clock – Sampling Rate
Samples
Fall 2004 EE 3563 Digital Systems Design
Audio Basics - Analog to Digital Conversion
LPF – Low Pass Filter – used to remove frequencies higher than the Nyquist rate– It’s like turning down the treble on your stereo
Clock is the sampling rate If clock is 44.1 KHz, then the LPF should remove all frequencies above
22.05 KHz– In practice, you need a little extra removed, so 20 KHz is the cutoff
Sampling rate determines the frequency response– Too low and it will sound like an AM radio– Tradeoff is in data storage space
Music ADC QuantizerLPF
Clock – Sampling Rate
Samples
Fall 2004 EE 3563 Digital Systems Design
Audio Basics - Analog to Digital Conversion
The Analog to Digital Converter gets a sample every time the clock ticks
The sample is passed on to a quantizer The quantizer outputs a number corresponding to the
amplitude of the music at that point The range of values depends upon how many bits per sample For CD quality, 16 bits are used (-32768 to +32767) For voice quality, 8 bits are used (-128 to +127)
Music ADC QuantizerLPF
Clock – Sampling Rate
Samples
Fall 2004 EE 3563 Digital Systems Design
Audio Basics - Analog to Digital Conversion
The fewer the bits, the larger the quantization error, resulting in lower quality
Suppose you gave the teller $93 and asked for change– Suppose she only had twenties (5 steps) – the “quantization” error would be
$13– Suppose she had tens (10 steps) – the error would be $3
The tradeoff is in the amount of data to store CD Quality: 2 channels * 16 bits/sample * 44100 samples/sec
– = 176400 bytes/sec Voice Quality: 1 channel * 8 bits/sample * 8000 samples/sec
– = 8000 bytes/sec
Music ADC QuantizerLPF
Clock – Sampling Rate
Samples
Fall 2004 EE 3563 Digital Systems Design
Audio Basics - Analog to Digital Conversion
The sampling rate and the number of bits/sample together determine the overall fidelity
Music ADC QuantizerLPF
Clock – Sampling Rate
Samples
Fall 2004 EE 3563 Digital Systems Design
Audio Basics - Aliasing
Aliasing occurs when the sampling frequency is below the Nyquist rate
It manifests itself as low frequency noise Sampling at Nyquist frequency Sampling below Nyquist frequency
Fall 2004 EE 3563 Digital Systems Design
Audio Basics – Example Waveform
Fall 2004 EE 3563 Digital Systems Design
Audio Basics – Example Waveform
Fall 2004 EE 3563 Digital Systems Design
Audio Basics – Example Waveform
1/5000th second
Note the “squareness”
Fall 2004 EE 3563 Digital Systems Design
Audio Basics – Analog to Digital Converter
• A basic Analog to Digital Converter(ADC) is shown• Note that these comparators are ANALOG comparators• The voltage at each point along theladder drops• The comparator output is high whenanalog input voltage exceeds the reference voltage• There is an 8-bit priority encoder internally to produce the digital output
Fall 2004 EE 3563 Digital Systems Design
Audio Basics - Digital to Analog Conversion
For converting back to music, the process is reversed The LPF is required on the output because it has a staircase
shape– In reality, a staircase shape is composed of an infinite number of sine
waves of increasing frequency
– These frequencies must be removed or the output will be noisy
MusicDAC LPF
Clock – Sampling Rate
Samples
Fall 2004 EE 3563 Digital Systems Design
Digital to Analog Converter
There is a resistive ladder that
must be very precise Each of the switches is essentially
a mux that switches between the
reference voltage and ground The final output is called a
summing amplifier
– it is simply an analog adder