Electronics > Beginners
Pulse Density Modulation, how do you interpret the bitstream?
(1/1)
Mattjd:
Hi, i'm going through the projects at my Uni, each semester we must partake in one. One of the projects is creating a DAQ to read in MEMS microphone data. I'm reading up on pulse density modulation PDM, and I am confused on how to interpret the bitstream. I am reading the wiki here and under section description, the description is actually a little vague.  I understand perfectly the equation they give but the wiki goes on to say


"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 filtering the bipolar PDM bitstream."

What do you define as a run?

I'm very confused on how to decode the bitstream and obtain the amplitude of say the sine wave example they give here, a single period of a sine wave samples 100 times



which has the bitstream

0101011011110111111111111111111111011111101101101010100100100000010000000000000000000001000010010101

If i was reading this bitstream on a micro, are there so many values I am suppose wait and then that turns into my value? For example, the run would be 010101 and those 6 bits correspond to some value of the sine wave amplitude? I did a simple test in matlab, using the equation given, I set A = 5, and used the bitstream from the example. I calculated a 1 by 100 array of consisting of -5 and 5, which i dont understand how this expresses the amplitude of the sine wave.
Benta:
A relatively simple approach that can be implemented in most microcontrollers is the "moving average filter" which will give you a low pass response as needed.

Mattjd:

--- Quote from: Benta on January 20, 2019, 07:28:30 pm ---A relatively simple approach that can be implemented in most microcontrollers is the "moving average filter" which will give you a low pass response as needed.

--- End quote ---

How do you know how many points to do?

Is the example incomplete?
Benta:

--- Quote from: Mattjd on January 20, 2019, 07:37:06 pm ---
--- Quote from: Benta on January 20, 2019, 07:28:30 pm ---A relatively simple approach that can be implemented in most microcontrollers is the "moving average filter" which will give you a low pass response as needed.

--- End quote ---

How do you know how many points to do?

Is the example incomplete?

--- End quote ---

That's a question of resolution. You'll need to look at the quality of your MEMS sensor signal. Perhaps an 8-bit window is enough? Or 10 bits? Or...

Obviously processing time increases with each tap.

radioactive:
Check this document out.  It covers the details.  https://www.analog.com/media/en/technical-documentation/application-notes/ee-350rev1.pdf
Navigation
Message Index
There was an error while thanking
Thanking...

Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod