Sigma-Delta Modulation Primer Part I

Also known as Delta-Sigma modulation. Ever wonder how most sound cards and DACs and even many ADC’s work? The higher quality ones use Sigma Delta Modulation. The theory behind this algorithm is that you can approximate an analog waveform using just a one bit output, and an integrator (Low Pass Filter). This is similar to the way PWM works, but is actually capable of much better resolution for a given set of hardware constraints. Higher order SDM’s require multiplication and addition, which makes the hardware more expensive than a simple PWM. See Figure1 for a low order SDM:

A 1st order noise shaper

This is a first order DSM. It uses an integrator to do noise-shaping and feedback to approximate the input. Basically it tries to match the output y[n] with the input x[n] by oversampling. The higher the oversampling rate, the higher the Signal to Noise ratio (SNR). A typical 4th order DSM can achieve nearly 90-100dB SNR if the oversampling rate (OSR) is around 45. So for 44100 kHz audio we would oversample at 1984500 Hz to achieve this SNR. Keep in mind the y[n] must be fed into a low pass filter.

The SDM has two interesting characteristics that make it useful for audio:

1. It has a dynamic range that is basically only limited by OSR.

2. It works on Digital PCM (sampled) streams or analog data.

Think of it as a guesser that can either output y[n] as a +1 or -1. The +1 or -1 is fed into an integrator many times faster than samples are arriving depending on the OSR. The integrator can be thought of as a summing device, in reality it is a low pass filter. Say your input sample is a 2 and the OSR is 5.

(Previous Value)+1+1-1+1-1+1=2

The next sample is a 1 so:

(PV = 2)-1+1-1+1-1=1

I also used used a friends account at a university to model a 4th order SDM with an OSR of 45. Octave does not yet model SDM’s, but it obviously simulates them if you write the code. Modeling Sigma-Delta Modulators is difficult and involves some control system theory. Basically higher order SDM’s run into stability issues. Again, modeling is more complicated than simulation and implementation, which is what these articles focus on

I have some matlab/octave code that does a 1st order SDM on a wav file. I will post some of my code later in another post. I will post the block diagram for this soon on a follow up. The 4th order model and code/coefficients will also be included.


Advertisements

6 Responses to “Sigma-Delta Modulation Primer Part I”

  1. Brian's Wife Says:

    Test 1,2 sibalance sibalance……how now brown cow, how now brown cow.

  2. electronjunkie Says:

    Thank you for my first blog comment dear. So what do you think of my explanation? Can’t wait to see my simuation code? Just kidding. Thats like you asking me to comment on how well those fabric patterns go with that furniture.

  3. venkat Says:

    hi,
    This wave file is not available .can u post it again.

  4. electronjunkie Says:

    I do not have a wave file posted here, but on the next post:
    https://electronjunkie.wordpress.com/2007/06/30/sigma-delta-modulation-primer-part-ii/

    again it is not the actual wave file but a link to a page with the file on dailywav.com. They do not allow hotlinking so I can’t link the actual file. You have to go there and right-click the spaceghost link it to download it.

  5. yoav freund Says:

    I am looking for matlab code to perform delta-sigma decoding, i.e. going from a bit stream to the analog. Specifically, I would like code to do 4th order delta-sigma de-modulation.

    Any suggestions?

    Yoav

    • electronjunkie Says:

      You need special coefficients to make a 4th order SDM stable. I have both C code (compiles under linux/cygwin/mingw) and some Matlab/octave code.

      I’ll give you my coeffs and diagram, but you need the Matlab SDM toolbox to genereate your own coeffs.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: