| Passbandmodulation |
|---|
| Analog modulation |
| Digital modulation |
| Hierarchical modulation |
| Spread spectrum |
| See also |
Pulse-density modulation (PDM) is a form ofmodulation used to represent ananalog signal with abinary signal. In a PDM signal, specificamplitude values are not encoded into codewords of pulses of different weight as they would be inpulse-code modulation (PCM); rather, the relativedensity of the pulses corresponds to the analog signal's amplitude. The output of a1-bit DAC is the same as the PDM encoding of the signal.
In a pulse-density modulationbitstream, a corresponds to a pulse of positive polarity (), and a corresponds to a pulse of negative polarity (). Mathematically, this can be represented as
where is the bipolar bitstream (either or), and is the corresponding binary bitstream (either or).
A run consisting of alls would correspond to the maximum (positive) amplitude value, alls would correspond to the minimum (negative) amplitude value, and alternatings ands would correspond to a zero amplitude value. The continuous amplitude waveform is recovered bylow-pass filtering the bipolar PDM bitstream.
A singleperiod of thetrigonometric sine function,sampled 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 highdensity of 1s occurs at the peaks of the sine wave, while a lowdensity of 1s occurs at the troughs of the sine wave.
A PDM bitstream isencoded from an analog signal through the process of a 1-bitdelta-sigma modulation. This process uses a one-bitquantizer 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 ofaveraging out the quantization error, whilenoise shaping it topush most of the quantization error into higher frequencies, which for audio signals would beultrasonic.
Decimation is needed to convert a PDM signal from its very high sampling rate (e.g. some PDM mics may sample between 1 MHz to 3.25 MHz) to the much lower PCM sampling rate (which for audio may range between 16 kHz to 48 kHz).[1]
The frequency components of interest, for example the audio frequency range, are much lower than the PDM's very high sampling rate. So, the process ofconverting a PDM signal into an analog one is simple: one only has to pass the PDM signal through alow-pass filter.[2] Because the delta-sigma modulator hadpushed most quantization noise into higher frequencies, low-pass filtering removes the high-frequency quantization noise while keeping the lower-frequency signal of interest.
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. The method for demodulation to an analogue signal remains the same, but the representation of a 50% signal 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 obtained by a low-pass filter is 50% of the maximum signal level for both waveforms, but the PDM signal switches more often. For 100% or 0% level, they are the same, with the signal permanently on or off respectively.
Notably, one of the ways animal nervous systems represent sensory and other information is throughrate coding whereby the magnitude of the signal is related to the rate of firing of the sensory neuron.[citation needed] 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.

The following digital model of pulse-density modulation can be obtained from a digital model of a 1st-order 1-bitdelta-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, where theZ-transform has been applied to the amplitude time-series to yield, the output of the delta-sigma modulator's operation is represented by
where is the frequency-domainquantization error of the delta-sigma modulator. Rearranging terms, we obtain
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 inverseZ-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 tominimize 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
Rearranging to solve for yields:
This, finally, gives a formula for the output sample in terms of the input sample. The quantization error of each sample isfed back into the input for the following sample.
The following pseudo-code implements this algorithm to convert apulse-code modulation signal into a PDM signal:
// Encode samples into pulse-density modulation// using a first-order sigma-delta modulatorfunction pdm(real[0..s] x,real qe = 0)// initial running error is zerovarint[0..s] yfor nfrom 0to sdo qe := qe + x[n]if qe > 0then y[n] := 1else y[n] := −1 qe := qe - y[n]return y, qe// return output and running error
PDM is the encoding used in Sony'sSuper Audio CD (SACD) format, under the nameDirect Stream Digital.
PDM is also the output of someMEMSmicrophones.[3]
Some systems transmit PDMstereo 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.[4][5][6]