digital-brain/content/zettels/analog_to_digital_converters.md

123 lines
5.7 KiB
Markdown
Raw Normal View History

2020-09-04 15:42:37 +02:00
+++
title = "Analog to Digital Converters"
2022-03-15 15:38:10 +01:00
author = ["Dehaeze Thomas"]
2021-05-02 22:18:30 +02:00
keywords = ["electronics"]
2020-09-04 15:42:37 +02:00
draft = false
category = "equipment"
2020-09-04 15:42:37 +02:00
+++
Tags
2022-03-15 15:38:10 +01:00
: [Electronics]({{< relref "electronics.md" >}})
2020-09-04 15:42:37 +02:00
2021-05-02 16:28:46 +02:00
## Types of Analog to Digital Converters {#types-of-analog-to-digital-converters}
2021-05-02 16:32:19 +02:00
<https://dewesoft.com/daq/types-of-adc-converters>
2022-03-15 16:40:48 +01:00
- Delta Sigma (<a href="#citeproc_bib_item_1">Baker 2011</a>)
2021-05-02 16:32:19 +02:00
- Successive Approximation
2021-05-02 16:28:46 +02:00
2020-09-04 15:42:37 +02:00
## Power Spectral Density of the Quantization Noise {#power-spectral-density-of-the-quantization-noise}
This analysis is taken from [here](https://www.allaboutcircuits.com/technical-articles/quantization-nois-amplitude-quantization-error-analog-to-digital-converters/).
Let's note:
2020-09-04 15:44:12 +02:00
- \\(q = \frac{\Delta V}{2^n}\\) the quantization in [V], which is the corresponding value in [V] of the least significant bit
2020-09-04 15:42:37 +02:00
- \\(\Delta V\\) is the full range of the ADC in [V]
- \\(n\\) is the number of ADC's bits
- \\(f\_s\\) is the sample frequency in [Hz]
Let's suppose that the ADC is ideal and the only noise comes from the quantization error.
Interestingly, the noise amplitude is uniformly distributed.
The quantization noise can take a value between \\(\pm q/2\\), and the probability density function is constant in this range (i.e., its a uniform distribution).
2022-03-15 15:38:10 +01:00
Since the integral of the probability density function is equal to one, its value will be \\(1/q\\) for \\(-q/2 < e < q/2\\) (Fig. [1](#figure--fig:probability-density-function-adc)).
2020-09-04 15:42:37 +02:00
2022-03-15 15:38:10 +01:00
<a id="figure--fig:probability-density-function-adc"></a>
2020-09-04 15:42:37 +02:00
2022-03-15 15:38:10 +01:00
{{< figure src="/ox-hugo/probability_density_function_adc.png" caption="<span class=\"figure-number\">Figure 1: </span>Probability density function \\(p(e)\\) of the ADC error \\(e\\)" >}}
2020-09-04 15:42:37 +02:00
Now, we can calculate the time average power of the quantization noise as
\begin{equation}
P\_q = \int\_{-q/2}^{q/2} e^2 p(e) de = \frac{q^2}{12}
\end{equation}
The other important parameter of a noise source is the power spectral density (PSD), which indicates how the noise power spreads in different frequency bands.
To find the power spectral density, we need to calculate the Fourier transform of the autocorrelation function of the noise.
Assuming that the noise samples are not correlated with one another, we can approximate the autocorrelation function with a delta function in the time domain.
Since the Fourier transform of a delta function is equal to one, the **power spectral density will be frequency independent**.
Therefore, the quantization noise is white noise with total power equal to \\(P\_q = \frac{q^2}{12}\\).
Thus, the two-sided PSD (from \\(\frac{-f\_s}{2}\\) to \\(\frac{f\_s}{2}\\)), we should divide the noise power \\(P\_q\\) by \\(f\_s\\):
\begin{equation}
\int\_{-f\_s/2}^{f\_s/2} \Gamma(f) d f = f\_s \Gamma = \frac{q^2}{12}
\end{equation}
2020-12-11 16:00:37 +01:00
<div class="important">
2020-09-04 15:42:37 +02:00
Finally, the Power Spectral Density of the quantization noise of an ADC is equal to:
\begin{equation}
\begin{aligned}
2022-03-15 15:38:10 +01:00
\Gamma &= \frac{q^2}{12 f\_s} \\\\
2020-09-04 15:42:37 +02:00
&= \frac{\left(\frac{\Delta V}{2^n}\right)^2}{12 f\_s} \text{ in } \left[ \frac{V^2}{Hz} \right]
\end{aligned}
\end{equation}
</div>
2020-12-11 16:00:37 +01:00
<div class="exampl">
2020-09-04 15:42:37 +02:00
Let's take a 18bits ADC with a range of +/-10V and a sample frequency of 10kHz.
The quantization is:
\\[ q = \frac{20}{2^{18}} = 0.000076 \ [V] = 76 \ [\mu V] \\]
\\[ \Gamma\_Q = \frac{q^2}{12 f\_N} = 4.85 \cdot 10^{-14} \quad [V^2/Hz] \\]
</div>
2021-03-14 16:00:24 +01:00
{{< youtube b9lxtOJj3yU >}}
2023-01-10 15:23:00 +01:00
Also see (<a href="#citeproc_bib_item_2">Kester 2005</a>).
## Link between required dynamic range and effective number of bits {#link-between-required-dynamic-range-and-effective-number-of-bits}
<a id="figure--fig:dynamic-range-enob"></a>
{{< figure src="/ox-hugo/dynamic_range_enob.png" caption="<span class=\"figure-number\">Figure 2: </span>Relation between Dynamic range and required number of bits (effective)" >}}
2021-05-02 16:28:46 +02:00
2022-03-15 15:38:10 +01:00
## Oversampling {#oversampling}
2022-03-15 16:40:48 +01:00
2023-10-13 11:57:17 +02:00
## Sigma Delta ADC {#sigma-delta-adc}
From (<a href="#citeproc_bib_item_3">Schmidt, Schitter, and Rankers 2020</a>):
> The low cost and excellent linearity properties of the Sigma-Delta ADC have replaced other ADC types in many measurement and registration systems, especially where storage of data is more important than real-time measurement.
> This has typically been the case in audio recording and reproduction.
> The reason why this principle is less applied with real-time measurements is the time delay between the bitstream representing the actual value and the availability of the corresponding value after the decimation filter.
> The resulting **latency** amounts with a low cost sigma-delta ADC approximately **twenty times the sampling period of the decimated digital output**.
Therefore, even though there are sigma-delta ADC with high precision and sampling rate, they add large latency (i.e. time delay) that are very problematic for feedback systems.
> The SAR-ADC (Successive approximation ADCs) is still the mostly applied type for data-acquisition and feedback systems because of its single sample latency.
<https://www.crystalinstruments.com/antialiasing-filter-and-phase-match>
2022-03-15 16:40:48 +01:00
## Bibliography {#bibliography}
<style>.csl-entry{text-indent: -1.5em; margin-left: 1.5em;}</style><div class="csl-bib-body">
<div class="csl-entry"><a id="citeproc_bib_item_1"></a>Baker, Bonnie. 2011. “How Delta-Sigma Adcs Work, Part.” <i>Analog Applications</i> 7.</div>
2023-01-10 15:23:00 +01:00
<div class="csl-entry"><a id="citeproc_bib_item_2"></a>Kester, Walt. 2005. “Taking the Mystery out of the Infamous Formula, $snr = 6.02 N + 1.76 Db$, and Why You Should Care.”</div>
2023-10-13 11:57:17 +02:00
<div class="csl-entry"><a id="citeproc_bib_item_3"></a>Schmidt, R Munnig, Georg Schitter, and Adrian Rankers. 2020. <i>The Design of High Performance Mechatronics - Third Revised Edition</i>. Ios Press.</div>
2022-03-15 16:40:48 +01:00
</div>