Pulse-density modulation
   HOME

TheInfoList



OR:

Pulse-density modulation, or PDM, is a form of modulation used to represent an analog signal with a binary signal. In a PDM signal, specific
amplitude The amplitude of a periodic variable is a measure of its change in a single period (such as time or spatial period). The amplitude of a non-periodic signal is its magnitude compared with a reference value. There are various definitions of am ...
values are not encoded into codewords of pulses of different weight as they would be in
pulse-code modulation Pulse-code modulation (PCM) is a method used to digitally represent sampled analog signals. It is the standard form of digital audio in computers, compact discs, digital telephony and other digital audio applications. In a PCM Stream (comp ...
(PCM); rather, the relative
density Density (volumetric mass density or specific mass) is the substance's mass per unit of volume. The symbol most often used for density is ''ρ'' (the lower case Greek letter rho), although the Latin letter ''D'' can also be used. Mathematical ...
of the pulses corresponds to the analog signal's amplitude. The output of a
1-bit DAC A Bitstream or 1-bit DAC is a consumer electronics marketing term describing an oversampling digital-to-analog converter (DAC) with an ''actual'' 1-bit DAC (that is, a simple "on/off" switch) in a delta-sigma loop operating at multiples of the samp ...
is the same as the PDM encoding of the signal. Pulse-width modulation (PWM) is a special case of PDM where the switching frequency is fixed and all the pulses corresponding to one sample are contiguous in the digital signal. For a 50% voltage with a resolution of 8-bits, a PWM waveform will turn on for 128 clock cycles and then off for the remaining 128 cycles. With PDM and the same clock rate the signal would alternate between on and off every other cycle. The average is 50% for both waveforms, but the PDM signal switches more often. For 100% or 0% level, they are the same.


Description

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 = -A (-1)^, 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 filter A low-pass filter is a filter that passes signals with a frequency lower than a selected cutoff frequency and attenuates signals with frequencies higher than the cutoff frequency. The exact frequency response of the filter depends on the filt ...
ing the bipolar PDM bitstream.


Examples

A single
period Period may refer to: Common uses * Era, a length or span of time * Full stop (or period), a punctuation mark Arts, entertainment, and media * Period (music), a concept in musical composition * Periodic sentence (or rhetorical period), a concept ...
of the trigonometric sine function,
sampled Sample or samples may refer to: Base meaning * Sample (statistics), a subset of a population – complete data set * Sample (signal), a digital discrete sample of a continuous analog signal * Sample (material), a specimen or small quantity of so ...
100 times and represented as a PDM bitstream, is: 0101011011110111111111111111111111011111101101101010100100100000010000000000000000000001000010010101 Two periods of a higher frequency sine wave would appear as: 0101101111111111111101101010010000000000000100010011011101111111111111011010100100000000000000100101 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.


Analog-to-digital conversion

A PDM bitstream is
encode The Encyclopedia of DNA Elements (ENCODE) is a public research project which aims to identify functional elements in the human genome. ENCODE also supports further biomedical research by "generating community resources of genomics data, software ...
d from an analog signal through the process of
delta-sigma modulation Delta-sigma (ΔΣ; or sigma-delta, ΣΔ) modulation is a method for encoding analog signals into digital signals as found in an analog-to-digital converter (ADC). It is also used to convert high bit-count, low-frequency digital signals into ...
. 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 In ordinary language, an average is a single number taken as representative of a list of numbers, usually the sum of the numbers divided by how many numbers are in the list (the arithmetic mean). For example, the average of the numbers 2, 3, 4, 7, ...
out the quantization error.


Digital-to-analog conversion

The process of decoding a PDM signal into an analog one is simple: one only has to pass the PDM signal through a
low-pass filter A low-pass filter is a filter that passes signals with a frequency lower than a selected cutoff frequency and attenuates signals with frequencies higher than the cutoff frequency. The exact frequency response of the filter depends on the filt ...
. This works because the function of a low-pass filter is essentially to average the signal. The average amplitude of pulses is measured by the density of those pulses over time, thus a low-pass filter is the only step required in the decoding process.


Relationship to biology

Notably, one of the ways animal nervous systems represent sensory and other information is through
rate coding Neural coding (or Neural representation) is a neuroscience field concerned with characterising the hypothetical relationship between the stimulus and the individual or ensemble neuronal responses and the relationship among the electrical activity ...
whereby the magnitude of the signal is related to the rate of firing of the sensory neuron. In direct analogy, each neural event – called an action potential – represents one bit (pulse), with the rate of firing of the neuron representing the pulse density.


Algorithm

A digital model of pulse-density modulation can be obtained from a digital model of the delta-sigma modulator. Consider a signal x /math> in the discrete time domain as the input to a first-order delta-sigma modulator, with y /math> the output. In the discrete frequency domain, where the
Z-transform In mathematics and signal processing, the Z-transform converts a discrete-time signal, which is a sequence of real or complex numbers, into a complex frequency-domain (z-domain or z-plane) representation. It can be considered as a discrete-tim ...
has been applied to the amplitude time-series x /math> to yield X(z), the output Y(z) of the delta-sigma modulator's operation is represented by : Y(z) = X(z) + E(z) \left(1 - z^\right), where E(z) is the frequency-domain quantization error of the delta-sigma modulator. Rearranging terms, we obtain : Y(z) = E(z) + \left (z) - Y(z) z^\right\left(\frac\right). The factor 1 - z^ represents a
high-pass filter A high-pass filter (HPF) is an electronic filter that passes signals with a frequency higher than a certain cutoff frequency and attenuates signals with frequencies lower than the cutoff frequency. The amount of attenuation for each frequency ...
, so it is clear that E(z) contributes less to the output Y(z) at low frequencies and more at high frequencies. This demonstrates the
noise shaping Noise shaping is a technique typically used in digital audio, image, and video processing, usually in combination with dithering, as part of the process of quantization or bit-depth reduction of a digital signal. Its purpose is to increase the ap ...
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 In mathematics and signal processing, the Z-transform converts a discrete-time signal, which is a sequence of real or complex numbers, into a complex frequency-domain (z-domain or z-plane) representation. It can be considered as a discrete-tim ...
, 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 = x + e - e -1 There are two additional constraints to consider: first, at each step the output sample y /math> is chosen so as to ''minimize'' the "running" quantization error e /math>. Second, y /math> is represented as a single bit, meaning it can take on only two values. We choose y = \pm 1 for convenience, allowing us to write : \begin y &= \sgn\big(x - e -1big) \\ &= \begin +1 & x > e -1\\ -1 & x < e -1\end \\ &= (x - e -1 + e \\ \end : e \leftarrow y - \big(x - e -1big) = \sgn\big(x - e -1big) - \big(x - e -1big). This, finally, gives a formula for the output sample y /math> in terms of the input sample x /math>. 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 Pulse-code modulation (PCM) is a method used to digitally represent sampled analog signals. It is the standard form of digital audio in computers, compact discs, digital telephony and other digital audio applications. In a PCM Stream (comp ...
signal into a PDM signal: ''// Encode samples into pulse-density modulation'' ''// using a first-order sigma-delta modulator'' function pdm(''real ..s' x, ''real'' qe = 0) ''// initial running error is zero'' var ''int ..s' y for n from 0 to s do qe := qe + x if qe > 0 then y := 1 else y := −1 qe := qe - y return y, qe ''// return output and running error''


Applications

PDM is the encoding used in Sony's
Super Audio CD Super Audio CD (SACD) is an optical disc format for audio storage introduced in 1999. It was developed jointly by Sony and Philips Electronics and intended to be the successor to the Compact Disc (CD) format. The SACD format allows multiple a ...
(SACD) format, under the name
Direct Stream Digital Direct Stream Digital (DSD) is a trademark used by Sony and Philips for their system for digitally encoding audio signals for the Super Audio CD (SACD). DSD uses pulse-density modulation encoding - a technology to store audio signals on digital ...
. Some systems transmit PDM stereo audio over a single data wire. The rising edge of the master clock indicates a bit from the left channel, while the falling edge of the master clock indicates a bit from the right channel.Knowles
"SPK0641 Digital, CMOS MEMS Microphone" (PDF)


See also

*
Delta modulation A delta modulation (DM or Δ-modulation) is an analog-to-digital and digital-to-analog signal conversion technique used for transmission of voice information where quality is not of primary importance. DM is the simplest form of differential puls ...
*
Pulse-code modulation Pulse-code modulation (PCM) is a method used to digitally represent sampled analog signals. It is the standard form of digital audio in computers, compact discs, digital telephony and other digital audio applications. In a PCM Stream (comp ...
*
Delta-sigma modulation Delta-sigma (ΔΣ; or sigma-delta, ΣΔ) modulation is a method for encoding analog signals into digital signals as found in an analog-to-digital converter (ADC). It is also used to convert high bit-count, low-frequency digital signals into ...


References


Further reading


1-bit A/D and D/A Converters
nbsp;– Discusses
delta modulation A delta modulation (DM or Δ-modulation) is an analog-to-digital and digital-to-analog signal conversion technique used for transmission of voice information where quality is not of primary importance. DM is the simplest form of differential puls ...
, PDM (also known as Sigma-delta modulation or SDM), and relationships to
Pulse-code modulation Pulse-code modulation (PCM) is a method used to digitally represent sampled analog signals. It is the standard form of digital audio in computers, compact discs, digital telephony and other digital audio applications. In a PCM Stream (comp ...
(PCM) * {{cite web, last1=Kite, first1=Thomas, title=Understanding PDM Digital Audio, url=http://users.ece.utexas.edu/~bevans/courses/realtime/lectures/10_Data_Conversion/AP_Understanding_PDM_Digital_Audio.pdf, publisher=Audio Precision, access-date=19 January 2017, date=2012, format=PDF Signal processing de:Pulsdichtemodulation