<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://en.formulasearchengine.com/w/index.php?action=history&amp;feed=atom&amp;title=Wood_method</id>
	<title>Wood method - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://en.formulasearchengine.com/w/index.php?action=history&amp;feed=atom&amp;title=Wood_method"/>
	<link rel="alternate" type="text/html" href="https://en.formulasearchengine.com/w/index.php?title=Wood_method&amp;action=history"/>
	<updated>2026-07-08T23:09:32Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.47.0-wmf.7</generator>
	<entry>
		<id>https://en.formulasearchengine.com/w/index.php?title=Wood_method&amp;diff=26765&amp;oldid=prev</id>
		<title>en&gt;Michael Hardy at 22:37, 22 May 2012</title>
		<link rel="alternate" type="text/html" href="https://en.formulasearchengine.com/w/index.php?title=Wood_method&amp;diff=26765&amp;oldid=prev"/>
		<updated>2012-05-22T22:37:15Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Merge from|Pulse-frequency modulation|date=May 2011}}&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Pulse-density modulation&amp;#039;&amp;#039;&amp;#039;, or &amp;#039;&amp;#039;&amp;#039;PDM&amp;#039;&amp;#039;&amp;#039;, is a form of [[modulation]] used to represent an [[analog signal]] with [[digital data]].  In a PDM signal, specific [[amplitude]] values are not encoded into pulses of different size as they would be in [[Pulse-code modulation|PCM]].  Instead, it is the relative [[density]] of the pulses that corresponds to the analog signal&amp;#039;s amplitude. The output of a [[1-bit DAC]] is the same as the PDM encoding of the signal. [[Pulse-width modulation]] (PWM) is the special case of PDM where all the pulses corresponding to one sample are contiguous in the digital signal.&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
In a pulse-density modulation [[bitstream]] a &amp;#039;&amp;#039;&amp;#039;1&amp;#039;&amp;#039;&amp;#039; corresponds to a pulse of positive polarity (+&amp;#039;&amp;#039;A&amp;#039;&amp;#039;) and a &amp;#039;&amp;#039;&amp;#039;0&amp;#039;&amp;#039;&amp;#039; corresponds to a pulse of negative polarity (-&amp;#039;&amp;#039;A&amp;#039;&amp;#039;).  Mathematically, this can be represented as:&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt; x[n] = -A (-1)^{a[n]} \ &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: where &amp;#039;&amp;#039;x&amp;#039;&amp;#039;[&amp;#039;&amp;#039;n&amp;#039;&amp;#039;] is the bipolar bitstream (either -&amp;#039;&amp;#039;A&amp;#039;&amp;#039; or +&amp;#039;&amp;#039;A&amp;#039;&amp;#039;) and &amp;#039;&amp;#039;a&amp;#039;&amp;#039;[&amp;#039;&amp;#039;n&amp;#039;&amp;#039;] is the corresponding binary bitstream (either 0 or 1).&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
A single [[periodic function|period]] of the [[trigonometric function|trigonometric sine function]], [[sample (signal)|sampled]] 100 times and represented as a PDM bitstream, is:&lt;br /&gt;
&lt;br /&gt;
0101011011110111111111111111111111011111101101101010100100100000010000000000000000000001000010010101&lt;br /&gt;
[[Image:Pulse-density modulation 1 period.gif|thumb|none|499px|An example of PDM of 100 samples of one period of a sine wave. 1s represented by blue, 0s represented by white, overlaid with the sine wave.]]&lt;br /&gt;
&lt;br /&gt;
Two periods of a higher frequency sine wave would appear as:&lt;br /&gt;
&lt;br /&gt;
0101101111111111111101101010010000000000000100010011011101111111111111011010100100000000000000100101&lt;br /&gt;
[[Image:Pulse-density modulation 2 periods.gif|thumb|none|499px|A second example of PDM of 100 samples of two periods of a sine wave of twice the frequency]]&lt;br /&gt;
&lt;br /&gt;
In pulse-&amp;#039;&amp;#039;density&amp;#039;&amp;#039; modulation, a high &amp;#039;&amp;#039;density&amp;#039;&amp;#039; of 1s occurs at the peaks of the sine wave, while a low &amp;#039;&amp;#039;density&amp;#039;&amp;#039; of 1s occurs at the troughs of the sine wave.&lt;br /&gt;
&lt;br /&gt;
==Analog-to-digital conversion==&lt;br /&gt;
&lt;br /&gt;
A PDM bitstream is [[Code|encode]]d from an analog signal through the process of [[delta-sigma modulation]]. This process uses a one bit [[Quantization (signal processing)|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 [[average|averaging]] out the quantization error.&lt;br /&gt;
&lt;br /&gt;
==Digital-to-analog conversion==&lt;br /&gt;
&lt;br /&gt;
The process of [[Digital-to-analog converter|decoding]] a PDM signal into an analog one is simple: one only has to pass the PDM signal through a [[low-pass filter]].  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.&lt;br /&gt;
&lt;br /&gt;
==Relationship to biology==&lt;br /&gt;
&lt;br /&gt;
Notably, one of the ways animal nervous systems represent sensory and other information is through [[rate coding]] whereby the magnitude of the signal is related to the rate of firing of the sensory neuron. In direct analogy, each neural event&amp;amp;nbsp;– called an action potential&amp;amp;nbsp;– represents one bit (pulse), with the rate of firing of the neuron representing the pulse density.&lt;br /&gt;
&lt;br /&gt;
==Algorithm==&lt;br /&gt;
&lt;br /&gt;
[[Image:Pulse density modulation.svg|right|thumb|300px|Pulse-density modulation of a [[sine wave]] using this algorithm.]]&lt;br /&gt;
A digital model of pulse-density modulation can be obtained from a digital model of the [[delta-sigma modulator]].  Consider a signal &amp;lt;math&amp;gt;x[n]&amp;lt;/math&amp;gt; in the [[discrete time]] domain as the input to a first-order delta-sigma modulator, with &amp;lt;math&amp;gt;y[n]&amp;lt;/math&amp;gt; the output.  In the [[discrete frequency]] domain, the delta-sigma modulator&amp;#039;s operation is represented by&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Y(z)=X(z)+E(z)\left(1-z^{-1}\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Rearranging terms, we obtain&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;Y(z)=E(z) + \left[ X(z)-Y(z)z^{-1} \right] \left( \frac{1}{1-z^{-1}} \right). &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here, &amp;lt;math&amp;gt;E(z)&amp;lt;/math&amp;gt; is the frequency-domain [[quantization error]] of the delta-sigma modulator.  The factor &amp;lt;math&amp;gt;1-z^{-1}&amp;lt;/math&amp;gt; represents a [[high-pass filter]], so it is clear that &amp;lt;math&amp;gt;E(z)&amp;lt;/math&amp;gt; contributes less to the output &amp;lt;math&amp;gt;Y(z)&amp;lt;/math&amp;gt; at low frequencies, and more at high frequencies.  This demonstrates the [[noise shaping]] effect of the delta-sigma modulator: the quantization noise is &amp;quot;pushed&amp;quot; out of the low frequencies up into the high-frequency range.&lt;br /&gt;
&lt;br /&gt;
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,&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;y[n] = x[n] + e[n] - e[n-1]&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There are two additional constraints to consider: first, at each step the output sample &amp;lt;math&amp;gt;y[n]&amp;lt;/math&amp;gt; is chosen so as to &amp;#039;&amp;#039;minimize&amp;#039;&amp;#039; the &amp;quot;running&amp;quot; quantization error &amp;lt;math&amp;gt;e[n]&amp;lt;/math&amp;gt;.  Second, &amp;lt;math&amp;gt;y[n]&amp;lt;/math&amp;gt; is represented as a single bit, meaning it can take on only two values.  We choose &amp;lt;math&amp;gt;y[n]=\pm 1&amp;lt;/math&amp;gt; for convenience, allowing us to write&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;y[n] = \begin{cases} +1 &amp;amp; x[n]\geq e[n-1] \\ -1 &amp;amp; x[n]&amp;lt;e[n-1]\end{cases}&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;e[n] = y[n] - x[n] + e[n-1]&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This, finally, gives a formula for the output sample &amp;lt;math&amp;gt;y[n]&amp;lt;/math&amp;gt; in terms of the input sample &amp;lt;math&amp;gt;x[n]&amp;lt;/math&amp;gt;.  The quantization error of each  sample is [[negative feedback|fed back]] into the input for the following sample.&lt;br /&gt;
&lt;br /&gt;
The following pseudo-code implements this algorithm to convert a [[pulse-code modulation]] signal into a PDM signal:&lt;br /&gt;
&lt;br /&gt;
 &amp;#039;&amp;#039;// Encode samples into pulse-density modulation&amp;#039;&amp;#039;&lt;br /&gt;
 &amp;#039;&amp;#039;// using a first-order sigma-delta modulator&amp;#039;&amp;#039;&lt;br /&gt;
 &lt;br /&gt;
 &amp;#039;&amp;#039;&amp;#039;function&amp;#039;&amp;#039;&amp;#039; pdm(&amp;#039;&amp;#039;real[0..s]&amp;#039;&amp;#039; x)&lt;br /&gt;
   &amp;#039;&amp;#039;&amp;#039;var&amp;#039;&amp;#039;&amp;#039; &amp;#039;&amp;#039;int[0..s]&amp;#039;&amp;#039; y&lt;br /&gt;
   &amp;#039;&amp;#039;&amp;#039;var&amp;#039;&amp;#039;&amp;#039; &amp;#039;&amp;#039;real[-1..s]&amp;#039;&amp;#039; qe&lt;br /&gt;
   &lt;br /&gt;
   qe[-1] := 0                  &amp;#039;&amp;#039;// initial running error is zero&amp;#039;&amp;#039;&lt;br /&gt;
   &lt;br /&gt;
   &amp;#039;&amp;#039;&amp;#039;for&amp;#039;&amp;#039;&amp;#039; n &amp;#039;&amp;#039;&amp;#039;from&amp;#039;&amp;#039;&amp;#039; 0 &amp;#039;&amp;#039;&amp;#039;to&amp;#039;&amp;#039;&amp;#039; s&lt;br /&gt;
       &amp;#039;&amp;#039;&amp;#039;if&amp;#039;&amp;#039;&amp;#039; x[n] &amp;gt;= qe[n-1]&lt;br /&gt;
           y[n] := 1&lt;br /&gt;
       &amp;#039;&amp;#039;&amp;#039;else&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
           y[n] := -1&lt;br /&gt;
       qe[n] := y[n] - x[n] + qe[n-1]&lt;br /&gt;
   &lt;br /&gt;
   &amp;#039;&amp;#039;&amp;#039;return&amp;#039;&amp;#039;&amp;#039; y, qe                 &amp;#039;&amp;#039;// return output and running error&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
==Applications==&lt;br /&gt;
PDM is the encoding used in Sony&amp;#039;s [[Super Audio CD]] (SACD) format, under the name [[Direct Stream Digital]].&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
* [[Delta modulation]]&lt;br /&gt;
* [[Pulse-code modulation]]&lt;br /&gt;
* [[Delta-sigma modulation]]&lt;br /&gt;
==External links==&lt;br /&gt;
* [http://www.cs.tut.fi/sgn/arg/rosti/1-bit/ 1-bit A/D and D/A Converters]&amp;amp;nbsp;– Discusses [[delta modulation]], PDM (also known as Sigma-delta modulation or SDM), and relationships to [[Pulse-code modulation]] (PCM)&lt;br /&gt;
&lt;br /&gt;
[[Category:Signal processing]]&lt;br /&gt;
&lt;br /&gt;
[[de:Pulsdichtemodulation]]&lt;/div&gt;</summary>
		<author><name>en&gt;Michael Hardy</name></author>
	</entry>
</feed>