Chapter 2: Digitization of Sound

Similar documents
Advanced Digital Signal Processing Part 2: Digital Processing of Continuous-Time Signals

ECE 556 BASICS OF DIGITAL SPEECH PROCESSING. Assıst.Prof.Dr. Selma ÖZAYDIN Spring Term-2017 Lecture 2

! Multi-Rate Filter Banks (con t) ! Data Converters. " Anti-aliasing " ADC. " Practical DAC. ! Noise Shaping

Digital Audio. Lecture-6

ANALOG-TO-DIGITAL CONVERTERS

CHAPTER. delta-sigma modulators 1.0

ESE 531: Digital Signal Processing

Choosing the Best ADC Architecture for Your Application Part 3:

Music 270a: Fundamentals of Digital Audio and Discrete-Time Signals

Continuous vs. Discrete signals. Sampling. Analog to Digital Conversion. CMPT 368: Lecture 4 Fundamentals of Digital Audio, Discrete-Time Signals

Voice Transmission --Basic Concepts--

Lecture #6: Analog-to-Digital Converter

ESE 531: Digital Signal Processing

CMPT 318: Lecture 4 Fundamentals of Digital Audio, Discrete-Time Signals

Lecture Outline. ESE 531: Digital Signal Processing. Anti-Aliasing Filter with ADC ADC. Oversampled ADC. Oversampled ADC

Pulse Code Modulation

EXPERIMENTAL INVESTIGATION INTO THE OPTIMAL USE OF DITHER

Lecture Schedule: Week Date Lecture Title

Downloaded from 1

Lecture 10, ANIK. Data converters 2

EE 230 Lecture 39. Data Converters. Time and Amplitude Quantization

The Case for Oversampling

SIGMA-DELTA CONVERTER

Signals and Systems. Lecture 13 Wednesday 6 th December 2017 DR TANIA STATHAKI

Lab.3. Tutorial : (draft) Introduction to CODECs

Telecommunication Electronics

10 Speech and Audio Signals

Multirate DSP, part 1: Upsampling and downsampling

Digital Processing of Continuous-Time Signals

Data Conversion Techniques (DAT115)

SAMPLING AND RECONSTRUCTING SIGNALS

Digital Processing of

!"!#"#$% Lecture 2: Media Creation. Some materials taken from Prof. Yao Wang s slides RECAP

LOW SAMPLING RATE OPERATION FOR BURR-BROWN

System on a Chip. Prof. Dr. Michael Kraft

Analog and Telecommunication Electronics

INF4420. ΔΣ data converters. Jørgen Andreas Michaelsen Spring 2012

EE123 Digital Signal Processing. Lecture 10 Practical ADC/DAC

Module 3 : Sampling and Reconstruction Problem Set 3

CHAPTER 4. PULSE MODULATION Part 2

EEE 309 Communication Theory

EEE 309 Communication Theory

Summary Last Lecture

Multirate DSP, part 3: ADC oversampling

Media Devices: Audio. CTEC1465/2018S Computer System Support

10 bit Delta Sigma D/A Converter with Increased S/N ratio Using Compact Adder Circuits


Choosing the Best ADC Architecture for Your Application Part 4:

Digital Communication (650533) CH 3 Pulse Modulation

Laboratory Manual 2, MSPS. High-Level System Design

Time division multiplexing The block diagram for TDM is illustrated as shown in the figure

Analog to digital and digital to analog converters

SAMPLING THEORY. Representing continuous signals with discrete numbers

Sampling and Reconstruction of Analog Signals

Electronics A/D and D/A converters

The Sampling Theorem:

Pulse Code Modulation

Design Of Multirate Linear Phase Decimation Filters For Oversampling Adcs

EE247 Lecture 26. EE247 Lecture 26

New Features of IEEE Std Digitizing Waveform Recorders

Laboratory Assignment 5 Amplitude Modulation

Appendix B. Design Implementation Description For The Digital Frequency Demodulator

DIGITAL FILTERING OF MULTIPLE ANALOG CHANNELS

PROBLEM SET 6. Note: This version is preliminary in that it does not yet have instructions for uploading the MATLAB problems.

FYS3240 PC-based instrumentation and microcontrollers. Signal sampling. Spring 2017 Lecture #5

Digital Communication Prof. Bikash Kumar Dey Department of Electrical Engineering Indian Institute of Technology, Bombay

Laboratory Assignment 2 Signal Sampling, Manipulation, and Playback

EXPERIMENT WISE VIVA QUESTIONS

EEE482F: Problem Set 1

Chapter 3 Pulse Modulation

8-channel Cirrus Logic CS4382 digital-to-analog converter as used in a sound card.

Islamic University of Gaza. Faculty of Engineering Electrical Engineering Department Spring-2011

FYS3240 PC-based instrumentation and microcontrollers. Signal sampling. Spring 2015 Lecture #5

Lecture 9, ANIK. Data converters 1

Sampling and Signal Processing

EE 421L Digital Electronics Laboratory. Laboratory Exercise #9 ADC and DAC

Communications I (ELCN 306)

CODING TECHNIQUES FOR ANALOG SOURCES

Problem Sheet 1 Probability, random processes, and noise

ECE 5650/4650 Exam II November 20, 2018 Name:

Enhancing Analog Signal Generation by Digital Channel Using Pulse-Width Modulation

Understanding PDM Digital Audio. Thomas Kite, Ph.D. VP Engineering Audio Precision, Inc.

-/$5,!4%$./)3% 2%&%2%.#% 5.)4 -.25

Introduction of Audio and Music

Digital Signal Processing (Subject Code: 7EC2)

AUDL Final exam page 1/7 Please answer all of the following questions.

Terminology (1) Chapter 3. Terminology (3) Terminology (2) Transmitter Receiver Medium. Data Transmission. Simplex. Direct link.

TE 302 DISCRETE SIGNALS AND SYSTEMS. Chapter 1: INTRODUCTION

Hideo Okawara s Mixed Signal Lecture Series. DSP-Based Testing Fundamentals 6 Spectrum Analysis -- FFT

ECE438 - Laboratory 7a: Digital Filter Design (Week 1) By Prof. Charles Bouman and Prof. Mireille Boutin Fall 2015

EE390 Final Exam Fall Term 2002 Friday, December 13, 2002

Brief Introduction to Signals & Systems. Phani Chavali

The need for Data Converters

AN2668 Application note

Data Communication. Chapter 3 Data Transmission

Advanced AD/DA converters. ΔΣ DACs. Overview. Motivations. System overview. Why ΔΣ DACs

The Fundamentals of Mixed Signal Testing

ECE 627 Project: Design of a High-Speed Delta-Sigma A/D Converter

Filter Banks I. Prof. Dr. Gerald Schuller. Fraunhofer IDMT & Ilmenau University of Technology Ilmenau, Germany. Fraunhofer IDMT

This tutorial describes the principles of 24-bit recording systems and clarifies some common mis-conceptions regarding these systems.

Transcription:

Chapter 2: Digitization of Sound Acoustics pressure waves are converted to electrical signals by use of a microphone. The output signal from the microphone is an analog signal, i.e., a continuous-valued voltage waveform with horizontal axis representing time and vertical axis representing signal strength in volt In order for the computer to process the sound signal and/or store it on memory, we must digitize it (convert it into a stream of numbers) 1

Two stages in the digitization process: Digitization of Sound Sampling - take samples of signal at regular locations along the time dimension (the horizontal axis). Uniform sampling is ubiquitous. Questions: Can we recover the original signal from the sampled signal? How often do you need to sample the signal? (Sampling frequency) Quantization - divide the signal strength (the vertical axis) into discrete levels. Quantization is a process that selects the closet level to present a signal sample. Each level can be represented by a fixed-bit number, i.e. a lossy process. For examples, 8 bit quantization divides the vertical axis into 256 levels, and 16 bit gives you 65536 levels. Questions: How good is the signal after the conversion? (Number of bits in the quantization) How is audio data formatted? (The coding of sampled signal) 2

Mathematic Formulation of Sampling Consider uniform impulse train where T is the sampling period Digitization of Sound note: multiplication in time domain equivalent to convolution in frequency domain Where, is the sampling frequency where Thus 3

Mathematic Formulation of Sampling The bandwidth of the spectrum must satisfy, thus no overlap of the repeated replicas occurs in. If bandwidth of does not satisfy the inequality and, irreversible overlap of spectrum replicas is produced. This effect is known as aliasing. 4

Sampling Theorem states that the sampling frequency must exceed twice the signal bandwidth in order for the original signal to be recoverable from the sampled signal. is the Nyquist frequency. In order to prevent aliasing, we must remove any frequencies above half the sampling rate from the signal. This is done by lowpass filtering the signal. Problem with Nyquist-Rate A/D Converter needs a sharp cutoff (brick-wall) analog lowpass filter -> high order analog filter and is difficult to build -> lots of RC components 5

Quantization use a finite number of bits to represent a sampled signal, i.e., precision quantization process will introduce quantization error (noise) and is a non-recoverable process quantization noise affects the quality of the sampled signal, higher precision (more bits for quantization) will get less noise because of finer distance between two quantization levels Linear and Non-linear Quantization If the quantization levels are uniformly spaced over the entire signal strength, the resulting quantization is called uniform (or linear) quantization. If the levels can be spaced according to a non-linear function, it is called nonuniform (or non-linear) quantization. 6

Quantization The choice of linear or non-linear quantization is very much dependent on the probability distribution of the signal. If the signal has a uniform probability density, it is better to use linear quantizer. Examples of signals that have this property are video, music signals. On the other hand, speech signal has a probability distribution that resembles a Gamma function. It is better to use non-linear quantization with the quantization levels placed according to a logarithmic scale, e.g., A-law (used in Europe) and µ-law (used in US) quantization for telephone speech. The dynamic range of digital telephone signals (A-law or µ-law) is effectively 13 bits rather than 8 bits. 7

Definition of Signal to Noise Ratio (SNR) In any analog system, some of the voltage is what you want to measure (signal), and some of it is random fluctuations (noise) also exist. The ratio of the power of the two (signal and noise) is called the signal to noise ratio (SNR). SNR is a measure of the quality of the signal. A signal with higher SNR means it is less noisy and, in general, is better quality. SNR is usually measured in decibels (db). where is the signal voltage and is noise voltage 8

Signal to Quantization Noise Ratio (SQNR) Quantization process introduces error (noise). The quantization error (or quantization noise) is the difference between the actual value of the analog signal at the sampling time and the nearest quantization interval value. The largest (worst) quantization error is half of the interval. The precision of the digital audio sample is determined by the number of bits per sample, typically 8 or 16 bits. The quality of the quantization can be measured by the Signal to Quantization Noise Ratio (SQNR) 9

Signal to Quantization Noise Ratio (SQNR) Assuming linear quantization and given N to be the number of bits per sample, with sufficiently large N, the quantization error for ideal linear quantizer can be considered as random noise with uniform distribution Signal rms power (sinewave), where N is the number of bit per sample. Quantization noise variance Noise power Signal-to-quantization noise ratio Digitization of Sound In terms of db, In other words, each bit adds about 6 db of resolution, so 16 bits quantization enables a maximum SQNR of 96 db. Converters capable of sampling to 24-bit resolution at 96 khz and even 192 khz sample rates are now becoming standard 10

Oversampling A/D Conversion A brick-wall filter may produce unwanted acoustic effects for Nyquest-rate A/D conversion. It suffers from limitation such as noise, distortion, group delay, and passband ripple, and it is difficult for A/D converters to achieve resolution beyond 18 bits Oversampling is a technique aimed at improving the results of the digitization process. In oversampling A/D conversion, the input signal is first passed through a mild low-pass filter (analog), which provides sufficient attenuation at high frequencies. To extend the Nyquist frequency, the signal is then sampled at a high frequency and quantized. Afterwards, a digital low-pass filter is used to reduce the sampling frequency and prevent aliasing when the output of the digital filter (e.g. an interpolating, linear phase FIR filters) is downsampled to achieve the desired output sampling frequency 11

Oversampling A/D Conversion In addition to eliminating unwanted effects of a brick-wall analog filter, oversampling helps achieve increased resolution by extending the spectrum of the quantization error far beyond the audio base-band. The out of band quantization noise can then be filtered by a digital lowpass filter, rendering the in-band noise relatively insignificant, and thus increase the equivalent SQNR. The decimator (downsapler) converts the oversampled signal back to the Nyquest rate and generates the correct output word length of say, 16-, 20-, or 24-bits. Each doubling of the sampling frequency decreases the in-band noise by 3 db, increasing the resolution by half a bit. (Remember this formula ) An added advantage of oversampling is it relaxes the requirement of a sharp 12 analog anti-aliasing filter

Delta-Sigma A/D Converter Essentially a delta-sigma converter digitizes the audio signal with a very low resolution (1-bit) A/D converter at a very high sampling rate. It is the oversampling rate and subsequent digital processing that separates this from plain delta modulation. A delta-sigma modulator consists of three parts: an analog modulator (1-bit converter), a digital lowpass filter and a decimation circuit (downsampler). The simplicity of 1-bit circuitry makes the conversion process very fast and less distortion High-speed "mixed-signal" IC processing allows the total integration of analog and digital circuitry 13

Delta-Sigma A/D Converter Principles of Σ- A/D Converter Slope overload problem -> the analog signal must not change too Rapidly Higher sampling frequency -> smaller noise Still, for 1-bit converter, 64 times oversampling gives only about 4 bit precision -> insufficient for audio applications 14

Delta-Sigma A/D Converter Adding Noise Shaping If the quantization noise is shaped and pushed largely out of band during the quantization process in the oversampling A/D converter, the noise remains in-band will be reduced, then after digital lowpass filtering, further improvement in SQNR can be achieved. 15

Delta-Sigma A/D Converter Adding Noise Shaping Filter in Σ- A/D Converter An integrator is a first-order lowpass filter In-band quantization noise where K is the oversampling ratio (OSR) i.e., doubling OSR (K) increases SQNR by 9 db 16

Delta-Sigma A/D Converter Higher Order Noise Shaping Filter In-band quantization noise where K is the oversampling ratio (OSR) i.e., doubling OSR (K) increases SQNR by 15 db Generalization to L th order: doubling OSR (K) increases SQNR by (6L+3) db 17

Delta-Sigma A/D Converter Multi-bit Σ- A/D Converter uses an n-bit flash ADC and an n-bit DAC gives a higher dynamic range for a given oversampling ratio and order of loop filter stabilization is easier, since second-order loops can generally be used 18

Delta-Sigma A/D Converter Adding Dither Noise With large amplitude complex signals, there is little correlation between the signal and the quantization error; thus the error is random and perceptually similar to white noise. With low-level signals, the character of the error changes as it becomes correlated to the signal, and potentially audible distortion results Dither is a small amount of noise added to the audio signal before conversion. The mixed noise causes the small signal to jump around, which causes the converter to switch rapidly between levels rather than being forced to choose between two fixed values Quantization error is thus decorelated from the signal and is perceived as wideband noise rather than audible distortion 19

Typical Audio Formats Signal samples can be represented as Pulse Code Modulation (PCM) format. If a sample can have a positive or negative value, then it can be stored in the computer as an N-bit number with 1 bit representing the sign and N-1 bits representing the magnitude, i.e. a signed-integer. In most cases, they are just stored as fixed-point 2 complement numbers. Popular file formats include for audio are:.au (Unix workstations),.wav (PC). There are popular formats which require compression of audio signal, for examples,.mp3 for MPEG Layer 3 audio codec,.ra for Real player audio codec. Data Rates of Common Digital Audio Signals 20