Quantisation

Figure 3: $\Delta $ is the quantisation step.
\includegraphics[width=0.75\textwidth]{quant_overv}
A/D converters have a certain resolution. For example, the MAX1271 has a resolution of 12 bits which means that it divides the input range into 4096 equal steps (see Fig 3).
  $\displaystyle \Delta = \mbox{quantisation step} =
\frac{x_{\mbox{max}} - x_{\mbox{min}}}{L - 1}
$ (17)
where $x_{\mbox{max}} - x_{\mbox{min}}$ is the dynamic range in volt (for example $4.096V$) and $L$ is the number of quantisation steps (for example, 4096). $\Delta $ is the quantisation step which defines minimal voltage change which is needed to see a change in the output of the quantiser. The operation of the quantiser can be written down as:
  $\displaystyle x_{q}(n) = Q[x(n)]
$ (18)

Figure 4: Illustration of the quantisation error. It is zero at $t=0$ and increases to the edges of the sampling interval. Illustrated is the worst case scenario. This repeats in the next sampling interval and so forth.
\includegraphics[width=0.75\textwidth]{quant_err}

Fig. 4 shows error produced by the quantiser in the worst case scenario. From that it can be seen that the maximum quantisation error is half the quantisation step:

  $\displaystyle - \frac{\Delta}{2} \le e(n) \le \frac{\Delta}{2}
$ (19)
The smaller the quantisation step $\Delta $ the lower the error!

What is the mean square error $P_{q}$?

  $\displaystyle P_{q} = \frac {1}{\tau} \int_{0}^{\tau} e_{q}^{2}(t) dt
$ (20)


$\displaystyle P_{q}$ $\textstyle =$ $\displaystyle \frac{1}{\tau} \int_0^\tau \left(\frac{\Delta}{2\tau}\right)^2 t^2 dt$ (21)
  $\textstyle =$ $\displaystyle \frac{\Delta^2}{4 \tau^3} \int_0^\tau t^2 dt$ (22)


$\displaystyle P_{q} = \frac{\Delta^2}{12\tau^3} \tau^3 =\frac{\Delta^2}{12}$     (23)

this then results in the almost trival result that the size of the quantisation step $\Delta $ scales linarly with the average error $\sqrt{P_{q}}$. So if we have two times more quantisation steps then the error will half!

What is the relative error to a sine wave?

  $\displaystyle P_x = \frac{1}{T_p} \int_{0}^{T_p}(A \cos \Omega t)^2 dt = \frac{A^2}{2}
$ (24)

Ratio to signal power to noise:


$\displaystyle \mbox {SQNR}$ $\textstyle =$ $\displaystyle \frac {P_x}{P_q} = \frac{A^2}{2} . \frac{12}{\Delta^2}$ (25)
  $\textstyle =$ $\displaystyle \frac{6A^2}{\Delta^2}$ (26)

This equation needs to be interpreted with care because increasing the amplitude of the input signal might lead to saturation if the input range of the A/D converter is exceeded.

github / contact

Creative Commons License