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

Similar documents
Digital AudioAmplifiers: Methods for High-Fidelity Fully Digital Class D Systems

One-Bit Delta Sigma D/A Conversion Part I: Theory

CHAPTER. delta-sigma modulators 1.0

Chapter 2: Digitization of Sound

Error Diffusion and Delta-Sigma Modulation for Digital Image Halftoning

Waveform Encoding - PCM. BY: Dr.AHMED ALKHAYYAT. Chapter Two

LOW SAMPLING RATE OPERATION FOR BURR-BROWN

LIMITATIONS IN MAKING AUDIO BANDWIDTH MEASUREMENTS IN THE PRESENCE OF SIGNIFICANT OUT-OF-BAND NOISE

Choosing the Best ADC Architecture for Your Application Part 3:

FFT Analyzer. Gianfranco Miele, Ph.D

Fundamentals of Data Converters. DAVID KRESS Director of Technical Marketing

ANALOG-TO-DIGITAL CONVERTERS

EEE 309 Communication Theory

Telecommunication Electronics

USO RESTRITO. Introduction to the Six Basic Audio Measurements. About this Technote. 1: Device Under Test and Signal Path. DUTs

APPLICATION NOTE 3942 Optimize the Buffer Amplifier/ADC Connection

Analog and Telecommunication Electronics

Chapter 2 Basics of Sigma-Delta Modulation

The counterpart to a DAC is the ADC, which is generally a more complicated circuit. One of the most popular ADC circuit is the successive

EEE 309 Communication Theory

Digital Loudspeaker Arrays driven by 1-bit signals

System on a Chip. Prof. Dr. Michael Kraft

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

A Digital Signal Processor for Musicians and Audiophiles Published on Monday, 09 February :54

Oversampled ADC and PGA Combine to Provide 127-dB Dynamic Range

Presented at the 109th Convention 2000 September Los Angeles, California, USA

Presented at the 108th Convention 2000 February Paris, France

Choosing the Best ADC Architecture for Your Application Part 4:

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

Application Note #5 Direct Digital Synthesis Impact on Function Generator Design

Bel Canto Design evo Digital Power Processing Amplifier

Interpolation by a Prime Factor other than 2 in Low- Voltage Low-Power DAC

SIGMA-DELTA CONVERTER

10-pin, 24-Bit, 192 khz Stereo D/A Converter for PCM Audio. Multi-level Sigma-delta DAC. Interpolation. Filter. Multi-level Sigma-delta DAC

National Instruments Flex II ADC Technology The Flexible Resolution Technology inside the NI PXI-5922 Digitizer

Stereo Audio DIGITAL-TO-ANALOG CONVERTER 16 Bits, 96kHz Sampling

Laboratory Manual 2, MSPS. High-Level System Design

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

Third-Method Narrowband Direct Upconverter for the LF / MF Bands

Audio Testing. application note. Arrakis Systems inc.

Preview only. AES information document for digital audio - Personal computer audio quality measurements. AES-6id-2006 (r2011)

UNIT TEST I Digital Communication

Radio Receiver Architectures and Analysis

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

Tones. EECS 247 Lecture 21: Oversampled ADC Implementation 2002 B. Boser 1. 1/512 1/16-1/64 b1. 1/10 1 1/4 1/4 1/8 k1z -1 1-z -1 I1. k2z -1.

SAMPLING AND RECONSTRUCTING SIGNALS

BandPass Sigma-Delta Modulator for wideband IF signals

Design & Implementation of an Adaptive Delta Sigma Modulator

Testing DDX Digital Amplifiers

How are bits played back from an audio CD?

24 Bits, 96kHz, Sampling Stereo Audio DIGITAL-TO-ANALOG CONVERTER

Summary Last Lecture

An FPGA-based Re-configurable 24-bit 96kHz Sigma-Delta Audio DAC

Care and Feeding of the One Bit Digital to Analog Converter

A 98dB 3.3V 28mW-per-channel multibit audio DAC in a standard 0.35µm CMOS technology

CHAPTER 5. Digitized Audio Telemetry Standard. Table of Contents

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

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

Presented at the 109th Convention 2000 September Los Angeles, California, USA

24-Bit, 96kHz Sampling CMOS Delta-Sigma Stereo Audio DIGITAL-TO-ANALOG CONVERTER

CONTINUOUS TIME DIGITAL SYSTEMS WITH ASYNCHRONOUS SIGMA DELTA MODULATION

EXPERIMENTAL INVESTIGATION INTO THE OPTIMAL USE OF DITHER

Care and Feeding of the One Bit Digital to Analog Converter

2. ADC Architectures and CMOS Circuits

LMV1024/LMV1026 (Stereo) PDM Output with Pre-Amplifier for Electret Microphones

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

Dual-Channel Modulator ADM0D79*

FPGA Based Hardware Efficient Digital Decimation Filter for - ADC

Vybrid ASRC Performance

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

Design Implementation Description for the Digital Frequency Oscillator

Chapter 4 Digital Transmission 4.1

SYSTEM ONE * DSP SYSTEM ONE DUAL DOMAIN (preliminary)

Laboratory Assignment 5 Amplitude Modulation

SAMPLING THEORY. Representing continuous signals with discrete numbers

Exploring Decimation Filters

Lecture #6: Analog-to-Digital Converter

Oversampling Converters

INTRODUCTION TO DELTA-SIGMA ADCS

Multirate DSP, part 3: ADC oversampling

Contents. Introduction 1 1 Suggested Reading 2 2 Equipment and Software Tools 2 3 Experiment 2

Communications I (ELCN 306)

The Digitally Interfaced Microphone The last step to a purely audio signal transmission and processing chain.

Electronics A/D and D/A converters

Cyber-Physical Systems ADC / DAC

DSP-BASED FM STEREO GENERATOR FOR DIGITAL STUDIO -TO - TRANSMITTER LINK

Analog and Telecommunication Electronics

Sigma-Delta ADC Tutorial and Latest Development in 90 nm CMOS for SoC

Technology Super Live Audio Technology (SLA)

Direct Digital Amplification (DDX )

Chapter 3 Data and Signals 3.1

EE247 Lecture 26. EE247 Lecture 26

Time- interleaved sigma- delta modulator using output prediction scheme

BANDPASS delta sigma ( ) modulators are used to digitize

A 100-dB gain-corrected delta-sigma audio DAC with headphone driver

Since the advent of the sine wave oscillator

Oversampling Data Converters Tuesday, March 15th, 9:15 11:40

AM and FM MODULATION Lecture 5&6

The Digital Linear Amplifier

TE 302 DISCRETE SIGNALS AND SYSTEMS. Chapter 1: INTRODUCTION

Transcription:

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

Table of Contents Introduction... 3 Quick Glossary... 3 PCM... 3 Noise Shaping... 4 Oversampling... 5 PDM Microphones... 6 DACs and PCM-to-PDM converters... 6 PDM Modulators... 7 Transmitting and Handling PDM Signals... 7 Performance... 8 Conclusion... 9 Further Reading... 9 Understanding PDM Digital Audio 2

Introduction PDM stands for pulse density modulation. However, it is really better summarized as oversampled 1-bit audio, as it is nothing more than a high sampling rate, single-bit digital system. If one increased the sample rate of audio CDs by a large factor, and reduced the wordlength from 16 bits to 1 in a reasonable way, that would serve as the basis of a PDM system. Most current digital audio systems use multi-bit PCM (pulse code modulation) to represent the signal. PCM has the advantage of being easy to manipulate. This allows signal processing operations to be performed on the audio stream, such as mixing, filtering, and equalization. PDM, which uses only one bit to convey audio, is simpler in concept and execution than PCM. It has become popular as a way to deliver audio from microphones to the signal processor in mobile telephones. PDM is ideally suited for this task because it brings the benefits of digital, such as low noise and freedom from interfering signals, at low cost. This document will cover the basics of PDM: how it is generated, transmitted, and manipulated. Quick Glossary DAC (Digital-to-Analog Converter): a device that converts a digitally represented signal to analog. LSB (Least Significant Bit): the smallest change that can be made in a digital word. A bit is a binary digit. MSB (Most Significant Bit): the highest value bit in a digital word; effectively it is the sign bit in a fixedpoint signed numerical representation. PCM (Pulse Code Modulation): a system for representing a sampled signal as a series of multi-bit words. This is the technology used in audio CDs. PDM (Pulse Density Modulation): a system for representing a sampled signal as a stream of single bits. Sampling rate is the rate at which a signal is sampled to produce a discrete-time representation. Wordlength is the number of bits used to represent a sample. Quantization is a procedure for representing an arbitrary data sample using a given wordlength. Dither is a noise-like signal added before quantization to improve performance. Linearization is the process of mitigating the deleterious effects of data quantization, usually by adding dither. Noise modulation is the undesirable variation of the noise floor in a system due to the signal content. PCM Before we tackle PDM, let s first review PCM, that is, conventional multi-bit digital audio. In PCM, the audio signal is represented as a series of samples, each a fixed number of bits long. Two factors determine the performance of the system: Sampling rate. This determines the bandwidth of the system. Understanding PDM Digital Audio 3

Wordlength. This determines the signal-to-noise ratio (SNR) of the system. In particular, the bandwidth is f s /2, where f s is the sampling rate, and the SNR is given by (6.02N + 1.76) db, where N is the wordlength in bits. A raw 16-bit system has a theoretical SNR of around 98 db. In practice, dither is used to linearize the system and eliminate noise modulation; this reduces the SNR by about 4 db. Using the above formula, an undithered 1-bit system has an SNR of about 8 db, which is of course unacceptable for any real audio work. Furthermore, optimal dither needs 2 LSBs to work; since a 1-bit system only has 1 LSB total, and that s used for the audio, hence there is no room for dither. Since the system cannot be properly dithered, a 1-bit representation would at first blush appear to be a non-starter. The solution lies in an understanding of noise shaping and oversampling. Noise Shaping Consider a typical PCM signal such as a 24-bit representation of a sine wave. How might this be represented in a system whose wordlength is only one bit, when such systems appear to have severe noise and distortion problems? One might start by simply throwing away all the bits except the MSB, effectively thresholding the signal around the zero point. This will turn the sine wave into a square wave that switches at the zero crossings. This introduces a tremendous amount of distortion; over 40%, in fact. The distortion arises because the system is undithered. Quantization always introduces error, but in a dithered system, the error comes in the form of a white noise floor uncorrelated with the signal. In an undithered or underdithered system, some of the error is in the form of distortion. Reducing to 1-bit by retaining the MSB is therefore not the answer. However, we are all familiar with an example of wordlength reduction to one bit that works very well. It s called halftoning, and has been the basis for reproducing images in print media since the invention of the newspaper. In halftoning, a continuous-tone image (such as a grayscale photograph) is converted to a series of black dots and white spaces. In other words, the wordlength is reduced to one bit, where the state of the bit corresponds to a black dot or a white space. This is done not by simple thresholding, but rather by distributing the error caused by thresholding among neighboring pixels that have yet to be thresholded. This process is known as error diffusion. (There are many other ways to create halftones, but we won t consider them here.) The effect on image quality of diffusing the error is dramatic, as shown below. Understanding PDM Digital Audio 4

Original image Thresholded image Error diffused image Why does diffusing the error incurred by thresholding result in a huge increase in the visual quality of the image? The answer is that error diffusion performs two functions. First, it transforms the distortion caused by simple thresholding into something more like a noise floor; and second, it shapes that noise floor so that the noise at low spatial frequencies is reduced, at the expense of noise at high frequencies. This matters in images because most of the image content is at low frequencies. Furthermore, high image frequencies are filtered by the fundamental resolution of the eye, so as long as the dots are small enough (or the image is sufficiently far away), a lot of the high frequency noise simply isn t visible. The result is that what would have been gross distortion from thresholding becomes a fairly benign, high-pass noise floor. By fairly benign, we mean that its appearance is acceptable, although it is not a true noise floor, because the system is undithered. The noise is still correlated with the signal, and exhibits tonal behavior and other artifacts. Still, the visual results are good. Halftoning is an example of a noise-shaping system. The noise incurred by reducing the wordlength is shaped so that it is not flat, but high-pass. In general, noise-shaping systems can have any output wordlength, and there is no requirement that their noise transfer function be high-pass. However, the vast majority of such systems, including PDM systems, have a 1-bit output and a high-pass noise transfer function. Oversampling The noise incurred by reducing the wordlength is substantial. (The noise in a 1-bit system is about 90 db higher than the noise in a 16-bit system, for example.) Noise shaping distributes that noise in a high-pass fashion, but it does not reduce the total noise level. In an imaging application, where most of the image content is at low frequency, pushing the noise to high frequencies (where it might obscure some of the signal) is not much of an issue. In audio, however, mid- and high-frequencies are very important, and very audible. It is simply not possible to achieve acceptable results if the wordlength is reduced to one bit, even with noise shaping. The resulting high-pass noise is clearly audible. The answer is to use a higher sampling rate. This increases the bandwidth of the system, creating new spectrum above the audible range. Noise shaping can then be used to push noise into that spectrum. In Understanding PDM Digital Audio 5

effect, more space has been created in which to dump noise. And since that spectrum is above the audible range, the noise cannot be heard. A higher sampling rate can be realized in two ways: By using a higher sampling rate in the first place. This is the method used in PDM microphones, where the typical sampling rate is 3 MHz. By interpolating an existing signal that has been sampled at a low rate. This is the method used in many DACs, where a typical incoming sample rate is 48 khz. It is also used in systems which represent audio internally as PCM, but transmit audio to external devices in PDM form. We ll now look at both of these approaches in more detail. PDM Microphones A PDM microphone, also called a digital microphone, consists of the following parts: A microphone element. Typically this is an electret capsule. An analog preamplifier. A PDM modulator. Interface logic. The analog signal from the microphone element is first amplified, and then sampled at a high rate and quantized in the PDM modulator. The modulator combines the operations of quantization and noise shaping; the output is a single bit at the high sampling rate. The noise shaping ensures that the noise in the audio band is relatively low, while the noise above the audio band is relatively high. The interface logic is responsible for accepting a master clock and transmitting the sampled bitstream. The device to which the microphone connects provides the master clock to the PDM microphone. The clock rate defines the sampling rate of the system, as well as the rate at which bits are transmitted on the data line. Although there is no defined standard, typically the oversampling ratio is 64. So to achieve a bandwidth of 24 khz (comparable to a PCM system sampled at 48 khz), a master clock frequency of 3.072 MHz is needed. The one-bit data is asserted on the data line on either the rising or falling edge of the master clock. Most PDM microphones support stereo operation, in which one microphone asserts the data line on the rising edge of the master clock, while a second microphone asserts on the falling edge. On the non-asserted edge, the data output has a high impedance. The data lines from the two microphones can then simply be connected together. The PDM receiver is responsible for separating the two bitstreams. DACs and PCM-to-PDM converters In some commercial DACs, and in systems which convert PCM to PDM, the procedure is slightly different from PDM microphones. The signal has already been sampled at a low rate, and is in PCM form. To achieve the high sampling rate needed for noise shaping to be effective, the signal must first be interpolated. Its wordlength is then reduced to one bit in a noise shaper. Understanding PDM Digital Audio 6

Interpolation is a digital filtering operation in which extra samples are generated in between the existing samples to increase the effective sampling rate. For PDM applications, the oversampling ratio is typically 64; that is, 63 new samples are generated for each input sample. PDM Modulators The PDM modulator (in PDM microphones) or the noise shaper (in PCM-to-PDM converters) is responsible for producing a one-bit signal which has very low noise in the passband. The complexity of the modulator is expressed by its order. The order of a modulator is equal to the number of integrators (accumulating nodes) it contains; in general, the higher the order, the more aggressively the noise is shaped from the passband to the stopband, and the better the noise performance. However, higher order modulators are more complex to design and manufacture; they are more likely to become unstable under certain operating conditions; and their maximum input level before overload is lower. While there is no industry standard, typical modulators in PDM microphones are fourth order. This offers a good compromise between noise performance and complexity. Below are time domain and frequency domain views of the output of a PDM modulator when fed with a sine wave input signal. The time domain output switches at a high rate between two levels. In the frequency domain, the passband extends from 0 to 0.5 f s on the x-axis. Above that is spectral space created by oversampling. The sharp rise of noise above the passband is clearly visible. Also visible is a small amount of third harmonic distortion (the peak at approximately 0.06 f s ). 1 0.8 Input signal PDM output 0-20 0.6-40 Sample value 0.4 0.2 0-0.2-0.4 Level (db) -60-80 -100-0.6-120 -0.8-1 -140 0 20 40 60 80 100 120 Sample number -160 0.01 0.02 0.05 0.1 0.2 0.5 1 2 5 10 20 Frequency (*f s ) PDM signal, time domain PDM signal, frequency domain Transmitting and Handling PDM Signals A PDM bitstream is a logic-level signal typically switching at around 3 MHz, with fast edges. It therefore needs to be treated with the same care as any other fast signal (such as SPDIF, or analog video). It s important to use good quality coax cable and to terminate the signal correctly. Ultimately a signal needs to be converted to an analog form if it is to be heard. If it is to be processed, or analyzed by test equipment, it needs to be converted to PCM. It is possible to do both of these with a PDM signal. Understanding PDM Digital Audio 7

Converting PDM to analog is in principle very simple. The one-bit signal already contains the audio in the low part of the spectrum. All that is required to recover it is a low-pass filter. In practice, the fast switching edges in the signal require careful design of the analog filtering stages, but it is certainly possible to recover a very high quality analog signal this way. Converting PDM to PCM is more involved. The sample rate needs to be reduced by the oversampling factor. This is accomplished in a digital filtering operation called decimation. Decimation is the counterpart to interpolation: samples are removed from the signal to reduce the sampling rate. It is important that the noise above the audio band in the 1-bit representation not be allowed to alias into the audio band. The decimation filters are designed to filter out this noise, leaving the baseband audio signal intact. The output of the decimator is a PCM audio stream at the baseband (non-oversampled) rate. Typically the wordlength increases from 1 bit to around 20 effective bits during the filtering. Performance The one-bit field is very mature. Although a 1-bit system has inherent problems, in particular the inability to add enough dither to fully linearize the system and eliminate noise modulation, it is nevertheless possible to design a system with excellent audio performance. Output of actual MEMS (micro electromechanical system) PDM microphone captured by an AP audio analyzer, showing a 1 khz test tone and the effects of noise shaping above the passband. Understanding PDM Digital Audio 8

PDM modulators are usually proprietary; the performance therefore varies depending on the design. The modulator implemented in Audio Precision s APx PDM Interface option uses a fourth-order modulator coupled with a six-stage interpolation/decimation filter with over 120 db of image/alias rejection. The resulting system spec is as follows: Maximum input level before overload: -6 dbfs SNR @ 1 khz, -6 dbfs, 20 Hz 20 khz, unweighted: 109 db THD+N @ 1 khz, -6 dbfs, 20 Hz 20 khz, unweighted: -107 db Third harmonic distortion @ 1 khz, -6 dbfs: -116 db Flatness, 20 Hz 20 khz: better than ±0.001 db All high-order PDM modulators have a maximum input level that is somewhat below full scale. Exceeding this level will cause modulator overload, resulting in poor noise performance. The APx user interface indicates when the modulator is in overload. The THD+N performance of the system is dominated by the noise floor of the modulator. There is a small amount of third harmonic distortion present. This arises because the system is undithered. Conclusion PDM is a cost-effective way of conveying audio digitally, in mono or stereo, over a clock/data pair. Despite the inherent limitations of a one-bit representation, it is possible to achieve extremely high audio performance with careful design. The APx PDM Interface option generates and analyzes PDM signals natively, greatly simplifying the design and troubleshooting of all aspects of the PDM signal chain. Further Reading The following references offer more information. A Brief Introduction to Sigma Delta Conversion, Intersil Application Note AN9504, May 1995. Retrieved from http://www.intersil.com/data/an/an9504.pdf. Principles of Sigma-Delta Modulation for Analog-to-Digital Converters, Motorola Application Note APR8/D Rev. 1, 1990. Retrieved from http://www.numerix-dsp.com/appsnotes/apr8-sigma-delta.pdf. Delta-Sigma Data Converters: Theory, Design, and Simulation, by Steven Norsworthy, Richard Schreier, and Gabor Temes, Wiley-IEEE Press, 1996. Understanding Delta-Sigma Data Converters, by Richard Schreier and Gabor Temes, Wiley-IEEE Press, 2004. 5750 SW Arctic Drive Beaverton, Oregon 97005 800-231-7350 Copyright 2012 Audio Precision ap.com XII0118133800 Understanding PDM Digital Audio 9