Pulse-Density Modulation

15 replies [Last post]
Electronic Design's picture
Joined: 2012-10-19

Ask The Expert

Dave Van Ess
Techincal Advisor

About
Dave Van Ess is an application engineer, MTS, with Cypress Semiconductor. He has a BSEE from the University of California., Berkeley.

Discussion

Pulse-Density Modulation: What Analog Should Be

Anyone who follows my columns knows that I am a big advocate of Delta Sigma Modulation (DSM) and signal processing in the density domain. It has frustrated me that many engineers have considered using the DSM, but only as the front half of some black box ADC. Lately, I have been encouraged by a series of products that convert an analog input into a one-bit digital density stream. Most microcontroller-based systems that I have designed have required some analog circuitry to buffer a signal, amplify its amplitude, and filter its bandwidth. Sometimes the signal has to be isolated or extracted from a very high common mode. After all this work, the signal is ready to be digitized. Care has to be taken to make sure that this processed signal does not pick up addition noise on its way to the ADC. This may require guards or shields to isolate the signal from noise (digital or power) contributors. In general, it’s better to just convert the signal to a digital stream and forego all this grief. Below is a schematic for a simple amplifier and filter.

Figure 1 Acquiring an analog signal may require amplifying and filtering a raw input signal.

Here, the gain is set by the ratio of the two resisters while the bandwidth is set by the feedback capacitor and resister values as shown in the equation below.

Where a filter feeds back the analog output, a delta sigma modulator feeds back the quantized output. This is shown in the figure below.

Figure 2 Feeding back the quantized output makes a filter into a delta sigma modulator.

Now the digital output is high if the signal is positive and low if negative. The output of the comparator can be thought of as taking the signal and adding a quantization error (eq) to it. With this in mind, the result of this is shown in the equation below.

In this way, the information is available in the digital stream and can be recovered with digital filters to reduce the quantization error. Fortunately, as the equation shows, this error has been high passed and the error has been pushed into the higher frequencies. This makes it easier to filter.

These filters can be implemented with a DSP, programmable logic, or even a microcontroller. If implemented with logic, a popular filer to use is a SINCN filter. This is a FIR filter that requires no multiplication, just adds and subtracts. In a previous column, I showed how to construct one with only a subtractor.

AKU440
I bring attention to this MEMS microphone from Akustcia because of their understanding of DSM. I have taken the block diagram from their product brief and shown it in the figure below.

Figure 3 A Pulse Density Modulator at its basics.

Note that they call the digitizer, following the preamp, a modulator instead of an ADC. It is, in fact, a 4th order delta sigma modulator. In their brief, they state:

The AKU440 employs Pulse Density Modulation (PDM) for data output, a single-bit digital stream…

They consider the data to be a density stream that can processed downstream by whatever device requires this data. If the microphone needs to be isolated, this can be done with either optical or capacitive isolators. This is far less expensive than using analog isolators.

I have three issues with their product. The first is that they call it a Sigma Delta Modulator. Purists know the correct name is Delta Sigma Modulator. This may seem as trivial as Gulliver’s big Enders and little Enders, but hey, we all have our idiosyncrasies.

The second is that the clock is brought in as an input. I would have preferred a built-in resonator and have the clock embedded into the design stream, thus eliminating a pin. Actually, it is possible to process the signal without the clock. The clock just removes any level transition delay errors.

The third is that instead of a multiplexed output, I would have preferred L+R and L-R output density streams. This would allow for the select input to also be removed. The microphone would now only have power and output connections. This would make it easier to isolate and control. Hook up the power and data just flows. The L+R output allows for mono use while the two signals can be easily processed to generate left and right channels. I showed a simple way to do it in one of my previous columns.

A Great Product Waiting to be Built
Electric cars have battery packs that can be 100s of volts. With lithium cells having a 3.3 nominal voltage, a great many cells are going to have to be stacked in series. Efficient charging requires charge load balancing and to do this requires measuring the voltage across each cell. These are 3.3V nominal signals you would like to measure with a resolution of 1mV to 10mV. The high voltage and high common mode make this difficult to do conventionally. The figure below shows a pulse density modulation approach:

Figure 4 A Ratiometric DSM makes measuring stacked battery voltages inexpensive

A Ratiometric Delta Sigma Modulator is connected to a reference. The density output will be the ratio of the reference voltage and the supply voltage. As the battery voltage decreases, the density increases. There is no common mode problem because each chip sits directly across its battery and sees no more than 3.5V. The data output can be capacitor coupled to level shift the signal to the measure system that will process the signal. This measurement needs resolution somewhere in the range of one part in 330 to one part in 3300, or about 8 to 10 bits. This should be able to be implemented with a 1st or 2nd order modulator. The resulting circuit doesn’t require much silicon and it fits in a very small three-pin package. I can see a time that every battery will have one installed and sold as “PDM-enabled”

Conclusion
A modulator is a device that converts an analog signal into a digital density stream. It is a block that is as fundamental as the D- flip-flop and should be as well understood and as commercially available. I believe that as engineers use them, they will be better understood and more products will become available.

tmiller's picture
Offline
Joined: 2013-05-13

How are we coming on getting the math routines to process data in the density domain? It's been a while since I checked, but at one point only very simple actions (switch, scale) were possible, with things like high-pass, low-pass, and add/mix were not readily possible without returning to the analog domain.

If this problem is being solved, is there anyone who is collecting the needed processes/pseudocode in a central location so we can experiment with it?

Ted Miller
HCJB Global
Elkhart, IN, USA

jeffl's picture
Offline
Joined: 2012-10-19

I'm not sure whether this is "in the same wheelhouse" as pulse density but I understand that high-performance HW audio codecs use a high oversampling rate (64X?) then implement a fancy digital filter and averaging to drive the device's S/N ratio so the result is good to 21 bits or better. I also understand these filters are implemented without multipliers to save costs (chip area) so the coefficients have to be integers or simple fractions. Can you recommend at least a readable reference (if not design tool) for such filters? It might also be that the somewhat obscure nature (initially for competitive reasons I imagine) of these methods discourages some engineers from applying techniques and strategies that they feel they don't completely understand, THAT could influence the adoption rate of techniques like pulse density, just my opinion.

Joseph McElroy's picture
Offline
Joined: 2013-05-13

I really appreciate your clear and easy-to-read columns, Dave. I have a followed your lead and use optically coupled DSM converters for high voltage isolation in my instrumentation. WAY! easier than analog isolation/coupling. Thanks.

DaveVanEss's picture
Offline
Joined: 2013-07-09

Ted
I have intentionally separated the processing of the stream from the generation. I did a series of column on signal processing in the density domain where I cover addition, subtraction, multiplication, square root, absolute value etc. As for build filters you can either make a SINCk filter and then process the data or you can do digital logic on the data stream and delayed copy of the data and you get a correlater.

DaveVanEss's picture
Offline
Joined: 2013-07-09

Jeff
The filters you are talking about are called SINC filters. They don't but have the best cutt off frequencies but they are easily implemented to adder (intergration) and subtractors (differentiation). In a column a did I explain how to build them and also show how make them only using subtractors.

DaveVanEss's picture
Offline
Joined: 2013-07-09

Joesph
Thank you for the kind words. People are going to think I paid you to write this. If I ever meet you at a show I'll buy you a beer. I am glad this worked out for your isolation problem. This is now a skill you have in you intellectual tool box that you can pull out at a moments need. You can solve a co-workers problem and take credit for it.

DaveVanEss's picture
Offline
Joined: 2013-07-09

Tim

I thought last night about the lack of signal processing tools for density signal processing. When programmable logic first came out the only tools for programming them was a figure with the fuse map. You would have to calculate the combinations by hand. Once PALs were available it wasn't long before the programming tools were available. Maybe now that their is for pulse density chips out there, maybe someone will see the need and provide required signal processing tools.different tools. Maybe it should be called serial signal processing. It wouldn;t surprise me if someone did their thesis on it and defined some cool tools.

Dave

Rick-123's picture
Offline
Joined: 2011-09-26

Dear Mr. Van Ess,
I've been trying to understand your "density-domain" signal processing, but so far I've failed to do so. I can represent the output of a microphone as a "time-domain" curve with amplitude on the vertical axis and time on the horizontal axis. I can also represent the output of a microphone as a "frequency-domain" curve with spectral magnitude on the vertical axis and frequency on the horizontal axis. Is it possible to represent the output of a microphone as a "density-domain" curve? Can you draw a picture of a "density-domain" signal on a piece of paper? Another question, is this thing you call a "density-domain" signal an analog signal that I can look at using an oscilloscope, or is a "density-domain" signal a sequence of numbers similar to the output of an analog-to-digital converter? I ask that question because you've provided digital filter diagrams where the filter input is labeled "density" and I'm not sure what that means.

Thanks for your help.
[-Rick-]

DaveVanEss's picture
Offline
Joined: 2013-07-09

I density domain signal is a analog signal with a quantation error added to make it digital. If you have a +/1V references and you want to represent 1/2 that would be 3 high and 1 low (3*1 + 1*-1)/4. It averages out to 1/2. The difference between this signal and the analog 1/2 is the quanization noise. If I filter the stream of data with an analog filter I get back the analog value. If I filter with a digital filter I have an ADC.

Does that help?

DaveVanEss's picture
Offline
Joined: 2013-07-09

A density is a stream of data the represents an analog value. For a system with +/1V references, you can represent .5V by a stream that is 75% 1 ones. A density stream is an analog value with a quantation error added to make it a digital signal. So 0.5V is a stream of (0 1 1 1) repeated. That is, one -1V and three +1V. Or one 0.5V with a -1.5V quant error and three 0.5V with a +0.5V quant error. The errors average to zero. In summary, a density stream is an analog stream with quantation error added to make the signal digital. I have either cleared things up or made them hopelessly confusing.

prkarls's picture
Offline
Joined: 2013-07-17

Hi Dave,
If I understand correctly the density stream is a digital stream clocked by fs(in figure 2) composed of mostly 1's when Vin is near the positive reference and mostly 0's when Vin is near the negative reference.

Its seems like fs controls the resolution of the digital representation of the signal. Is this true?

If so is there a "rule of thumb" for converting fs to number of bits?

How fast does fs have to be to reconstruct signals up to 20kHz?

Great Article!

Thanks,
Phillip

DaveVanEss's picture
Offline
Joined: 2013-07-09

Phillip
It is the number a samples that determine the resolution. The number of samples and the clock determine the time. As for rule of thumb for number of bits. it has to do with the number of modulators (The exaple I showed was a single one) the the order of SINC filter you use I wrote an article about it a few years ago call "Signals From Noise: Calculating Delta-Sigma SNRs" I found a copy of it at
http://www.ieee.li/pdf/essay/calculating_delta-sigma_snr.pdf

A secound order modulator with a thrird order filter sound give you 8 bits at x32 over sample. With a 1MHz clock the output rate would be 31kSamples and the digital filter bandwidth would be about 6.5kHz. (I would have to go back and read my articles. So 3MHz would give you about 20KHz. Go read that article I mentions. I have a good five part column on Delta Sigma ADCs I did for my column on Electronics Design. I also did some colums on SINC filters

Rick-123's picture
Offline
Joined: 2011-09-26

Hello Dave,
Thank you for replying to my questions. I think we have a semantics problem here. The word "digital" means very different things to different people. And I'm not sure which meaning of the word "digital" is being used here in our discussion. For example, I assume we all agree what is meant by an "analog signal." That is, an analog voltage signal is a voltage whose value fluctuates as time passes. As such an analog voltage signal can be transmitted from one place to another using a coax cable. In addition, we can look at an analog voltage signal using an oscilloscope.

Unfortunately the phrase "digital signal", on the other hand, has two very different meanings in the world of signal processing.

"Digital Signal" Definition 1: An analog voltage signal that alternates between two distinct voltage values. (For example, the clock voltage signal flying around on the copper traces of the motherboard of a home computer is an example of Definition 1 of the phrase "digital signal.")

"Digital Signal" Definition 2: A sequence of discrete, individual, numbers. (This is the definition used in the field of "digital signal processing" (DSP). An example of this Definition 2 is the daily closing price of one share of Apple computer (Apple Inc.) stock over a period of one month. That "digital signal" is a sequence (a list) of numbers measured in dollars. Another example of this Definition 2 is a sequence of analog-to-digital converter output samples. These samples are numbers represented by binary bits. As such, a "digital signal" that complies with Definition 2 can be stored in the memory of a computer. That's because such a "digital signal" is merely a sequence of numbers.)

So, unfortunately for me, my problem is that when I read the phrases:

1: "digital",
2: "digital signal",
3: "digital density stream",
4: "density stream",
5: "digital stream", and
6. "density domain signal"

I'm not sure what they mean. What really puzzles me is that you wrote that a "density domain signal" can be filtered either with an analog filter or a digital filter. Wow! I sure am confused. I apologize for my inability to understand all of this. So, I ask Dave, can a "density domain signal" be transmitted over a cable and viewed using an oscilloscope? Or is a "density domain signal" a sequence of numbers that can be stored in the memory of a computer?

Thanks for your help.
[-Rick-]

DaveVanEss's picture
Offline
Joined: 2013-07-09

Rick
Sorry this has been confusing. A analog signal has resolution limited only by its noise. It is hard to store.

A signal digitized to some number of bits has a resolution limited by its length and its noise.

A density stream is a analog signal with a quantization error that makes it a digital signal.

The nice thing is that it is a single bit and the resolution you can recover it determined by the amount a time you take to process it.

I use the term density domain because it is possible to add subtract and multiply these signals with digital logic. If logic 1 symbolizes +ref and 0 symbolizes -ref then a XNOR of to density streams gives you the product (pos * pos = pos, neg * neg = pos, pos * neg = neg). It is possible do to much signal processing on a single bit wide stream. That is what I define as the density domain.

As for filters lets take a density stream that is 50%, If the logic is 3.3V and I put this stream into an analog filter the output will be 3.3V/2 or 1.65V. You may have doone this sometime with a PWM and a RC filter to make a poor mans DAC. The amount of ripple is determined be the filters performance.
If I had taken the stream and counted the number of highs for 256 counts it would 128, For 1024 counts it would have been 512. Again the resolution is determined by the amopunt of time you look at it.

Does this make it clearer. I am thinking that I will do a column where I will a delta sigma modulator with a EXCEL and let everyone play around with it till it becomes clear. Is that something that would interest you as a reader? Anuone else?

Dave

DaveVanEss's picture
Offline
Joined: 2013-07-09

John
I didn't answer your last question. Aa density stream can be seen on a scope. It appear as a serries of ones and zeros but the percent an 1s determine the analog value. In my column on signal process in the density domain I show some examples of density streams.

Dave

Please or Register to post comments.

Comments

how to dress your best

how to dress your best His online newsletter, True Wealth, has helped its readers to make money year after year since its development and inception in 2001 with safe, contrarian, investment ideas. And oh, he has one super ability: Power Weeping.. Starting next week, Kevin Rector will take over Looking Out duties. Once again, pull this particular employee aside and bandage herve leger be honest about your concerns. Her chest is out, her eyes are lit....More

Cheap Android smartphones dapeng a9000

Without the need of a doubt, every person desires an ideal phone dapeng n7100. Nevertheless, as a matter of fact, not one phone dapeng n7100 has each of the very best specs even iPhone 4S. The query is if you are going to purchase an Android mobile phone dapeng n7100, which capabilities or specs could be the important within your consideration?...More

Cheap Android smartphone dapeng a5s

Smartphone dapeng a9230 has totally been the leading role in current cellphone marketplace spot. In today's article, we're delving in to the terrific capabilities of upcoming Android smartphone dapeng a9230 and which function would be vital when customer are going to purchase a brand new telephone dapeng a9230....More

Please indicate your level of interest in the following POWER topics.

Connect With Us

Sponsored Introduction Continue on to (or wait seconds) ×