# Pulse-density modulation

﻿
Pulse-density modulation

Pulse-density modulation, or PDM, is a form of modulation used to represent an analog signal in the digital domain. In a PDM signal, specific amplitude values are not encoded into pulses as they would be in PCM. Instead it is the relative density of the pulses that corresponds to the analog signal's amplitude. Pulse-width modulation (PWM) is the special case of PDM where all the pulses corresponding to one sample are contiguous in the digital signal.

Basics

In a pulse-density modulation bitstream a 1 corresponds to a pulse of positive polarity (+"A") and a 0 corresponds to a pulse of negative polarity (-"A"). Mathematically, this can be represented as:

: $x \left[n\right] = -A \left(-1\right)^\left\{a \left[n\right] \right\}$

: where "x" ["n"] is the bipolar bitstream (either -"A" or +"A") and "a" ["n"] is the corresponding binary bitstream (either 0 or 1).A run consisting of all 1s would correspond to the maximum (positive) amplitude value, all 0s would correspond to the minimum (negative) amplitude value, and alternating 1s and 0s would correspond to a zero amplitude value. The continuous amplitude waveform is recovered by low-pass filtering the bipolar PDM bitstream.

Analog-to-digital conversion

A PDM bitstream is encoded from an analog signal through the process of delta-sigma modulation. This process uses a one bit quantizer that produces either a 1 or 0 depending on the amplitude of the analog signal. A 1 or 0 corresponds to a signal that is all the way up or all the way down, respectively. Because in the real world analog signals are rarely all the way in one direction there is a quantization error, the difference between the 1 or 0 and the actual amplitude it represents. This error is fed back negatively in the ΔΣ process loop. In this way every error successively influences every other quantization measurement and its error. This has the effect of averaging out the quantization error.

Digital-to-analog conversion

The process of decoding a PDM signal into an analog one is amazingly simple. One only has to pass that signal through an analog low-pass filter. This works because the function of a low-pass filter is essentially to average the signal. The density of pulses is measured by the average amplitude of those pulses over time, thus a low pass filter is the only step required in the decoding process.

Examples

A single period of the trigonometric sine function, sampled 100 times and represented as a PDM bitstream, is:

0101011011110111111111111111111111011111101101101010100100100000010000000000000000000001000010010101

Two periods of a higher frequency sine wave would appear as:0101101111111111111101101010010000000000000100010011011101111111111111011010100100000000000000100101or

In pulse-"density" modulation, a high "density" of 1s occurs at the peaks of the sine wave, while a low "density" of 1s occurs at the troughs of the sine wave.

Algorithm

A digital model of pulse-density modulation can be obtained from a digital model of the delta-sigma modulator. Consider a signal $x \left[n\right]$ in the discrete time domain as the input to a first-order delta-sigma modulator, with $y \left[n\right]$ the output. In the discrete frequency domain, the delta-sigma modulator's operation is represented by

:$Y\left(z\right)=E\left(z\right) + left \left[ X\left(z\right)-Y\left(z\right)z^\left\{-1\right\} ight\right] left\left( frac\left\{1\right\}\left\{1-z^\left\{-1 ight\right).$

Rearranging terms, we obtain

:$Y\left(z\right)=X\left(z\right)+E\left(z\right)left\left(1-z^\left\{-1\right\} ight\right)$

Here, $E\left(z\right)$ is the frequency-domain quantization error of the delta-sigma modulator. The factor $1-z^\left\{-1\right\}$ represents a high-pass filter, so it is clear that $E\left(z\right)$ contributes less to the output $Y\left(z\right)$ at low frequencies, and more at high frequencies. This demonstrates the noise shaping effect of the delta-sigma modulator: the quantization noise is "pushed" out of the low frequencies up into the high-frequency range.

Using the inverse Z-transform, we may convert this into a difference equation relating the input of the delta-sigma modulator to its output in the discrete time domain,

:$y \left[n\right] = x \left[n\right] + e \left[n\right] - e \left[n-1\right]$

There are two additional constraints to consider: first, at each step the output sample $y \left[n\right]$ is chosen so as to "minimize" the "running" quantization error $e \left[n\right]$. Second, $y \left[n\right]$ is represented as a single bit, meaning it can take on only two values. We choose $y \left[n\right] =pm 1$ for convenience, allowing us to write

:

This, finally, gives a formula for the output sample $y \left[n\right]$ in terms of the input sample $x \left[n\right]$. The quantization error of each sample is fed back into the input for the following sample.

The following pseudo-code implements this algorithm to convert a pulse-code modulation signal into a PDM signal:

"// Encode samples into pulse-density modulation" "// using a first-order sigma-delta modulator" function pdm("real [0..s] " x) var "int [0..s] " y var "int [-1..s] " qe qe [-1] := 0 "// initial running error is zero" for n from 0 to s if x [n] >= qe [n-1] y [n] := 1 else y [n] := -1 qe [n] := y [n] - x [n] + qe [n-1] return y, qe "// return output and running error"

Applications

PDM is the encoding used in Sony's Super Audio CD (SACD) format, under the name Direct Stream Digital.

* [http://www.cs.tut.fi/sgn/arg/rosti/1-bit/ 1-bit A/D and D/A Converters] &mdash; Discusses delta modulation, PDM (also known as Sigma-delta modulation or SDM), and relationships to Pulse-code modulation (PCM)

ee also

* Delta modulation
* Pulse-code modulation
* Delta-sigma modulation

Wikimedia Foundation. 2010.

### Look at other dictionaries:

• Pulse-width modulation — (PWM) of a signal or power source involves the modulation of its duty cycle, to either convey information over a communications channel or control the amount of power sent to a load. PrinciplePulse width modulation uses a square wave whose pulse… …   Wikipedia

• Pulse-position modulation — is a form of signal modulation in which M message bits are encoded by transmitting asingle pulse in one of 2^M possible time shifts. This is repeated every T seconds, such thatthe transmitted bit rate is M/T bits per second. It is primarily… …   Wikipedia

• Pulse-code modulation — PCM redirects here. For other uses, see PCM (disambiguation). Pulse code modulation (PCM) is a method used to digitally represent sampled analog signals. It is the standard form for digital audio in computers and various Blu ray, Compact Disc and …   Wikipedia

• Pulse-amplitude modulation — Principle of PAM: (1) original signal, (2) PAM signal, (a) amplitude of signal, (b) time Pulse amplitude modulation, acronym PAM, is a form of signal modulation where the message information is encoded in the amplitude of a series of signal… …   Wikipedia

• Pulse Code Modulation — Modulation d impulsion codée Pour les articles homonymes, voir PCM. La modulation d impulsion codée ou MIC, (en anglais Pulse Code Modulation, généralement abrégé en PCM) est une représentation numérique non compressée d un signal analogique via… …   Wikipédia en Français

• Modulation — For musical change of key, see Modulation (music). For other uses, see Modulation (disambiguation). Passband modulation v · d · e …   Wikipedia

• Pulse forming network — A Pulse Forming Network (PFN) accumulates electrical energy over a comparatively long time, then releases the stored energy in the form of a relatively square pulse of comparatively short duration for various pulsed power applications. In… …   Wikipedia

• Modulation D'impulsion Codée — Pour les articles homonymes, voir PCM. La modulation d impulsion codée ou MIC, (en anglais Pulse Code Modulation, généralement abrégé en PCM) est une représentation numérique non compressée d un signal analogique via une technique d… …   Wikipédia en Français

• Modulation d'impulsion codee — Modulation d impulsion codée Pour les articles homonymes, voir PCM. La modulation d impulsion codée ou MIC, (en anglais Pulse Code Modulation, généralement abrégé en PCM) est une représentation numérique non compressée d un signal analogique via… …   Wikipédia en Français

• Modulation d'impulsion codée — Pour les articles homonymes, voir PCM. La modulation d impulsion codée ou MIC, (en anglais Pulse Code Modulation, généralement abrégé en PCM) est une représentation numérique non compressée d un signal analogique via une technique d… …   Wikipédia en Français