- Pulse-density modulation
Pulse-density modulation, or PDM, is a form of
modulation used to represent ananalog signal in the digital domain. In a PDM signal, specificamplitude values are not encoded into pulses as they would be in PCM. Instead it is the relativedensity 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::
: 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 ing the bipolar PDM bitstream.Analog-to-digital conversion
A PDM bitstream is
encode d from an analog signal through the process ofdelta-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 analoglow-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 in thediscrete time domain as the input to a first-order delta-sigma modulator, with the output. In thediscrete frequency domain, the delta-sigma modulator's operation is represented by:
Rearranging terms, we obtain
:
Here, is the frequency-domain
quantization error of the delta-sigma modulator. The factor represents ahigh-pass filter , so it is clear that contributes less to the output at low frequencies, and more at high frequencies. This demonstrates thenoise 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 adifference equation relating the input of the delta-sigma modulator to its output in thediscrete time domain,:
There are two additional constraints to consider: first, at each step the output sample is chosen so as to "minimize" the "running" quantization error . Second, is represented as a single bit, meaning it can take on only two values. We choose for convenience, allowing us to write
:
Wikimedia Foundation. 2010.