Author Topic: Pulse Density Modulation, how do you interpret the bitstream?  (Read 1382 times)

0 Members and 1 Guest are viewing this topic.

Offline MattjdTopic starter

  • Regular Contributor
  • *
  • Posts: 230
  • Country: us
Pulse Density Modulation, how do you interpret the bitstream?
« on: January 20, 2019, 06:15:43 pm »
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.
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 5869
  • Country: de
Re: Pulse Density Modulation, how do you interpret the bitstream?
« Reply #1 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.

 

Offline MattjdTopic starter

  • Regular Contributor
  • *
  • Posts: 230
  • Country: us
Re: Pulse Density Modulation, how do you interpret the bitstream?
« Reply #2 on: January 20, 2019, 07:37:06 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.

How do you know how many points to do?

Is the example incomplete?
« Last Edit: January 20, 2019, 07:39:56 pm by Mattjd »
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 5869
  • Country: de
Re: Pulse Density Modulation, how do you interpret the bitstream?
« Reply #3 on: January 20, 2019, 08:06:53 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.

How do you know how many points to do?

Is the example incomplete?

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.

 

Offline radioactive

  • Regular Contributor
  • *
  • Posts: 173
  • Country: us
Re: Pulse Density Modulation, how do you interpret the bitstream?
« Reply #4 on: January 20, 2019, 09:16:06 pm »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf