# Digital Signal Processing/Sigma-Delta modulation

A Sigma-Delta Modulator (ΣΔ modulator) allows to operate Analog to Digital Conversion (ADC) or Digital to Analog Conversion (DAC) by the means of a one-bit signal.
The usage of a single bit signal is also used by Pulse-Width Modulation (PWM), where the Signal-to-Noise Ratio (SNR) is worse but the switching slower.

## First Order Modulator
### Circuit

The first order ΣΔ modulator consists out of an accumulator and a comparator.
The output is a bit stream and the original signal can be reconstruted by the means of a lowpass filter.

### Analysis

The frequency response of the sigma-delta modulator can be analysed by replacing the comparator with the addition of an error signal.
    ${\begin{array}{ccl}z\cdot acc&=&X+acc-Y\\Y&=&acc+E\end{array}}$
From these equations, one finds the Signal Transfer Function (STF)
    ${\frac {Y(z)}{X(z)}}={\frac {1}{z}}$
and the Noise Transfer Function (NTF)
    ${\frac {Y(z)}{E(z)}}={\frac {z-1}{z}}$
The STF is a one period delay but the NTF is a first order highpass function. This indicates that the modulation noise, due to the switching, occupies higher frequencies. If the input signal is limited to low frequencies, it is possible to separate the signal from the nois using a lowpass filter. As the highpass transfer function decreases by 20 dB/decade (or 6 dB/octave) as the frequency decreases, the signal to noise ratio increases by the same rate. Integrating the noise amplitude over the signal band shows that a first order modulator gains a signal to noise ration of 1.5 bit per octave. This can be compared to PCM which shows a gain of only 1 bit per octave.
When its input is constant, a first order modulator will provide a cyclic pattern. This pattern can become quite long for specific input values, and this leads to low-frequency ringing tones in the modulated signal. As these tones go lower in frequency, they become more and more difficult to separate from the original signal. Higher order modulators show less repetitive patterns and are thus preferred to first order ones.

## Second Order Modulator
### Circuit

A second order ΣΔ modulator will require 2 accumulators. Different topologies are possible. The following circuit shows a typical second order circuit.
The 2 coefficients allow to control the digital to analog transfer function together with the corresponding noise shaping characteristic.

### Analysis

Here too, the comparator can be replaced by the insertion of an error signal:
The NTF and STF can be found from the following equations:
    ${\begin{array}{ccrcccccccccc}z\cdot {\begin{bmatrix}acc_{1}\\acc_{2}\end{bmatrix}}&=&{\begin{bmatrix}1&0\\1&1\end{bmatrix}}&\cdot &{\begin{bmatrix}acc_{1}\\acc_{2}\end{bmatrix}}&+&{\begin{bmatrix}1\\0\end{bmatrix}}&\cdot &X&+&{\begin{bmatrix}-c_{1}\\-c_{2}\end{bmatrix}}&\cdot &Y\\Y&=&{\begin{bmatrix}0&1\end{bmatrix}}&\cdot &{\begin{bmatrix}acc_{1}\\acc_{2}\end{bmatrix}}&+&{\begin{bmatrix}0\end{bmatrix}}&\cdot &X&+&{\begin{bmatrix}1\end{bmatrix}}&\cdot &E\end{array}}$
which can be rewritten as:
    ${\begin{array}{ccccccc}z\cdot {\overrightarrow {acc}}&=&\mathbf {A} \cdot {\overrightarrow {acc}}&+&\mathbf {B} \cdot X&+&\mathbf {B_{y}} \cdot y\\Y&=&\mathbf {C} \cdot {\overrightarrow {acc}}&+&\mathbf {D} \cdot X&+&\mathbf {D_{e}} \cdot E\end{array}}$

#### Signal Transfer Function

The STF is found by writing $E=0$, which gives:
    ${\begin{array}{ccccccc}z\cdot {\overrightarrow {acc}}&=&\mathbf {A} \cdot {\overrightarrow {acc}}&+&\mathbf {B} \cdot X&+&\mathbf {B_{y}} \cdot (\mathbf {C} \cdot {\overrightarrow {acc}}+\mathbf {D} \cdot X)\\Y&=&\mathbf {C} \cdot {\overrightarrow {acc}}&+&\mathbf {D} \cdot X\end{array}}$
This can be rewritten in the state space representation as:
    ${\begin{array}{ccccc}z\cdot {\overrightarrow {acc}}&=&(\mathbf {A} +\mathbf {B_{y}} \cdot \mathbf {C} )\cdot {\overrightarrow {acc}}&+&(\mathbf {B} +\mathbf {B_{y}} \cdot \mathbf {D_{e}} )\cdot X\\Y&=&\mathbf {C} \cdot {\overrightarrow {acc}}&+&\mathbf {D} \cdot X\end{array}}$
The state-space matrices are built from the modulator matrices $\mathbf {A} ,\mathbf {B} ,\mathbf {B_{y}} ,\mathbf {C} ,\mathbf {D} ,\mathbf {D_{e}}$ as:
    ${\begin{array}{l}A_{x}=(\mathbf {A} +\mathbf {B_{y}} \cdot \mathbf {C} )\\B_{x}=(\mathbf {B} +\mathbf {B_{y}} \cdot \mathbf {D} )\\C_{x}=\mathbf {C} \\D_{x}=\mathbf {D} \end{array}}$
Solving the system for the second order modulator gives:
    ${\frac {Y}{X}}={\frac {1}{z^{2}-(2-c_{2})z+(1+c_{1}-c_{2})}}$

#### Noise Transfer Function

The NTF is found by writing $X=0$, which gives:
    ${\begin{array}{ccccc}z\cdot {\overrightarrow {acc}}&=&\mathbf {A} \cdot {\overrightarrow {acc}}&+&\mathbf {B_{y}} \cdot (\mathbf {C} \cdot {\overrightarrow {acc}}+\mathbf {D_{e}} \cdot E)\\Y&=&\mathbf {C} \cdot {\overrightarrow {acc}}&+&\mathbf {D_{e}} \cdot E\end{array}}$
This can be rewritten in the state space representation as:
    ${\begin{array}{ccccc}z\cdot {\overrightarrow {acc}}&=&(\mathbf {A} +\mathbf {B_{y}} \cdot \mathbf {C} )\cdot {\overrightarrow {acc}}&+&\mathbf {B_{y}} \cdot \mathbf {D_{e}} \cdot E\\Y&=&\mathbf {C} \cdot {\overrightarrow {acc}}&+&\mathbf {D_{e}} \cdot E\end{array}}$
The state-space matrices are built from the modulator matrices $\mathbf {A} ,\mathbf {B} ,\mathbf {B_{y}} ,\mathbf {C} ,\mathbf {D} ,\mathbf {D_{e}}$ as:
    ${\begin{array}{l}A_{e}=(\mathbf {A} +\mathbf {B_{y}} \cdot \mathbf {C} )\\B_{e}=\mathbf {B_{y}} \cdot \mathbf {D_{e}} \\C_{e}=\mathbf {C} \\D_{e}=\mathbf {D_{e}} \end{array}}$
Solving the system for the second order modulator gives:
    ${\frac {Y}{X}}={\frac {(z-1)^{2}}{z^{2}-(2-c_{2})z+(1+c_{1}-c_{2})}}$

#### Comments

The matrices $\mathbf {A} ,\mathbf {B} ,\mathbf {B_{y}} ,\mathbf {C} ,\mathbf {D} ,\mathbf {D_{e}}$ contain all the information to both simulate and analyse the behaviour of any sigma-delta modulator. The derivation of the state-space description of the NTF and the STF from these matrices is generally applicable to any sigma-delta modulator.
The matrices $\mathbf {A_{x}}$ and $\mathbf {A_{e}}$ are identical, which means that the STF and the NTF share the same poles. The STF has only poles and this results in a lowpass function. The NTF has 2 poles at $Z=1$, which gives a high pass response. This ensures that the signal and the noise are well separable.
The STF has a DC gain of:
    ${\frac {Y}{X}}(Z=1)={\frac {1}{c_{1}}}$
A STF DC gain of 1 is achieved by multiplying the input by $c_{1}$.

### Design

The poles of the STF are given by
    $p_{12}=(1-{\frac {c_{2}}{2}})\pm j{\sqrt {c_{1}-{\frac {c_{2}^{2}}{4}}}}$
This equation allows to arbitrarily place the poles of the STF. For a pair of poles at:
    $p_{12}=a\pm jb$
the modulator coefficients are:
    ${\begin{cases}{\begin{array}{ll}c_{1}&=(1-a)^{2}+b^{2}\\c_{2}&=2(1-a)\end{array}}\end{cases}}$
As an example, an all-pole Butterworth STF with cutoff frequency at 1/4 the sampling frequency give poles:
    $p_{12}=0.375\pm j0.320$
and coefficients:
    ${\begin{cases}{\begin{array}{ll}c_{1}&=0.493\\c_{2}&=1.250\end{array}}\end{cases}}$
An all-pole close to Bessel STF with cutoff frequency around 1/4 the sampling frequency give coefficients:
    ${\begin{cases}{\begin{array}{ll}c_{1}&=26/32\\c_{2}&=56/32\end{array}}\end{cases}}$
Note that the usual habits of using coefficients $c_{1}=c_{2}=1$ or $c_{1}=c_{2}=1/2$ both result in having poles exactly on the unit circle, which is not recommended in terms of stability.

## Higher order topologies

For higher order modulators, different topologies exist.

#### Simplified Chain of Integrators with FeedBack (SCIFB)

The following picture shows a Simplified Chain of Integrators with FeedBack (SCIFB) modulator:
With coefficient $g_{1}$ different from zero, this is a structure with a local resonator.
For this structure, the system equations are:
    ${\begin{array}{ccrcccccccccc}z\cdot {\begin{bmatrix}acc_{1}\\acc_{2}\\acc_{3}\end{bmatrix}}&=&{\begin{bmatrix}1&0&0\\c_{2}&1&-g_{1}\\0&c_{3}&1\end{bmatrix}}&\cdot &{\begin{bmatrix}acc_{1}\\acc_{2}\\acc_{3}\end{bmatrix}}&+&{\begin{bmatrix}c_{1}\\0\\0\end{bmatrix}}&\cdot &X&+&{\begin{bmatrix}-a_{1}\\-a_{2}\\-a_{3}\end{bmatrix}}&\cdot &Y\\Y&=&{\begin{bmatrix}0&0&1\end{bmatrix}}&\cdot &{\begin{bmatrix}acc_{1}\\acc_{2}\\acc_{3}\end{bmatrix}}&+&{\begin{bmatrix}0\end{bmatrix}}&\cdot &X&+&{\begin{bmatrix}1\end{bmatrix}}&\cdot &E\end{array}}$
and the matrices are:
    ${\begin{array}{ccc}A&=&{\begin{bmatrix}1&0&0\\c_{2}&1&-g_{1}\\0&c_{3}&1\end{bmatrix}}\end{array}}$
    ${\begin{array}{ccc}B&=&{\begin{bmatrix}c_{1}\\0\\0\end{bmatrix}}\end{array}}$
    ${\begin{array}{ccc}B_{y}&=&{\begin{bmatrix}-a_{1}\\-a_{2}\\-a_{3}\end{bmatrix}}\end{array}}$
    ${\begin{array}{ccc}C&=&{\begin{bmatrix}0&0&1\end{bmatrix}}\end{array}}$
    ${\begin{array}{ccc}D&=&{\begin{bmatrix}0\end{bmatrix}}\end{array}}$
    ${\begin{array}{ccc}D_{e}&=&{\begin{bmatrix}1\end{bmatrix}}\end{array}}$

## References

* ↑ Norsworthy, Steven R.; Schreier, Richard; Temes, Gabor C. (1997). Delta-Sigma Data Converters. IEEE Press. ISBN 0-7803-1045-4.
* ↑ Liu, Mingliang (2003), The Design of Delta-Sigma Modulators for Multi-Standard RF Receivers