Rozmiar: 8938 bajtów


Dpbsmith/foo



Pulse-density modulation, or PDM, is a form of modulation used to represent an analog signal in the digital domain. In a PDM signal, individual pulses do not stand for specific amplitude values as they would in PCM or PWM. Instead it is the relative density of the pulses that corresponds to the analog signals amplitude. ===Basics=== In a pulse-density modulation bitstream a 1 corrosponds to a pulse and a 0 corrosponds to the absense of a pulse. A run consisting of all 1's would correspond to a positive amplitude value, all 0's would correspond to a negative amplitude value, and alternating 1's and 0's would correspond to a zero amplitude value. This has the remarkable effect of the PDM bitstream actually looking like the wave it represents. ===Analog to Digital Conversion=== A PDM bitstream is encoded from an analog signal through the process of Sigma-delta modulation. This process uses a one bit Quantization (signal processing) that produces either a 1 or 0 depending on the amplitude of the analog signal. A 1 or 0 corrosponds 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 diffrence between the 1 or 0 and the actual amplitude it represents. This error is fed back negatively in the sigma-delta process loop. In this way every error successively influences every other quantization measurement and it's error. This has the effect of average 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/Code=== A single periodic function of the trigonometric function, Sample (signal) 100 times and represented as a PDM bitstream, is: 0101011011110111111111111111111111011111101101101010100100100000010000000000000000000001000010010101 Two periods of the sine wave would appear as: 0101101111111111111101101010010000000000000100010011011101111111111111011010100100000000000000100101 As you can see in Pulse-density modulation a high ''density'' of 1's occurs at the peaks of the sine wave, while a low ''density'' of 1's occurs at the troughs of the sine wave. These examples were created using the following algorithm, written in Perl: #Sample sine wave $pi = atan2(1,1) * 4; $samples--; $arg = $periods * $pi * 2 / $samples; $pcm[$_] = sin($arg * $_) foreach (0..$samples); #Encode into pulse-density modulation $r = 1; foreach (@pcm) { $r = $_ - $r; if ($r > 0) { push @pdm, 1; $r = 1 - $r; } else { push @pdm, 0; $r = -1 - $r; } } Where $samples equals the number of samples to be taken of sine, $periods equals the number of periods of sine to be sampled, and @pdm is the resultant pule-density modulation data.


See other meanings of words starting from letter:

D

DA | DB | DC | DE | DF | DG | DH | DI | DJ | DK | DL | DM | DN | DO | DP | DR | DS | DT | DU | DW | DX | DY | DZ |

Words begining with Dpbsmith/foo:

Dpbsmith/foo


These materials are based on Wikipedia and licensed under the GNU FDL



YouTube.com videos better site than Turbo Tax 2007
encyklopedia online