PracticeVideosBlogFlashcards

4.2 Data Sampling, Accuracy/Precision, and A/D Conversion

Key Takeaways

  • The Nyquist-Shannon sampling theorem mandates that the sampling frequency f_s must be at least twice the highest frequency component of the analog signal (f_s >= 2 f_max) to prevent aliasing.

  • Signal components above the Nyquist frequency (f_s / 2) fold back into the baseband spectrum as false low-frequency aliases given by f_alias = |f_in - k f_s|, requiring analog anti-aliasing low-pass filters prior to digitization.

  • An n-bit Analog-to-Digital Converter (ADC) divides the full-scale voltage range (V_FSR) into 2^n quantization levels, yielding a minimum resolution step size of LSB = V_FSR / 2^n and a maximum ideal quantization error of ± LSB / 2.

  • Theoretical Signal-to-Quantization-Noise Ratio (SQNR) increases by approximately 6.02 dB per bit of ADC resolution (SQNR = 6.02 n + 1.76 dB).

  • Experimental measurement uncertainty combines systematic bias (reproducible calibration offsets) and random noise (statistical standard deviation of the mean) using Root-Sum-Square (RSS) error propagation.

Last updated: August 2026

4.2 Data Sampling, Accuracy/Precision, and A/D Conversion

Core Concept: Data acquisition (DAQ) bridges the physical analog domain and the digital processing domain. To capture dynamic physical signals without distortion, engineers must master the Nyquist-Shannon sampling theorem, anti-aliasing filtering, analog-to-digital converter (ADC) quantization limits, and statistical uncertainty analysis.

Nyquist-Shannon Sampling Theorem & Aliasing

When a continuous analog signal x(t)x(t) is sampled at discrete time intervals Ts=1/fsT_s = 1/f_s, the continuous frequency spectrum is periodicized at intervals of fsf_s.

The Nyquist Criterion

To ensure complete, unambiguous reconstruction of a continuous signal from its discrete samples, the sampling frequency fsf_s must be at least twice the maximum frequency component (fmaxf_{max}) present in the signal:

fs≥2fmaxf_s \ge 2 f_{max}
  • Nyquist Frequency (fNf_N): The upper frequency boundary of the un-aliased baseband, defined as half the sampling rate: fN=fs2f_N = \frac{f_s}{2}
Continuous Analog Spectrum                  Sampled Spectrum at f_s
     |                      |                     |                   |  
  ---|----------------------|---               ---|-------------------|---
    -f_max                  +f_max               -f_s/2     0      +f_s/2 (Nyquist limit)

Aliasing Mathematics

If the analog signal contains high-frequency components exceeding the Nyquist limit (fin>fs/2f_{in} > f_s / 2), those components fold back into the baseband spectrum [0,fs/2][0, f_s/2] and appear artificially as low-frequency signals known as aliases.

The apparent frequency (faliasf_{alias}) of an aliased component is calculated by:

falias=∣fin−kfs∣f_{alias} = |f_{in} - k f_s|

where kk is an integer chosen such that 0≤falias≤fs20 \le f_{alias} \le \frac{f_s}{2}.

Anti-Aliasing Low-Pass Filters

Because real-world sensor signals contain high-frequency noise and harmonics, an analog anti-aliasing low-pass filter must be placed before the sample-and-hold circuit and ADC. The filter corner frequency fcf_c is selected near fmaxf_{max}, sharply attenuating all spectral components above fs/2f_s/2.

Analog-to-Digital Converter (ADC) Performance Metrics

An Analog-to-Digital Converter (ADC) converts a continuous voltage VinV_{in} within a Full-Scale Voltage Range (VFSR=Vmax−VminV_{FSR} = V_{max} - V_{min}) into an nn-bit digital code.

Key Quantization Equations

  1. Number of Discrete Levels (NN):

    N=2nN = 2^n
  2. Quantization Step Size / Least Significant Bit (LSB / ΔV\Delta V):

    ΔV=Q=VFSR2n=Vmax−Vmin2n\Delta V = Q = \frac{V_{FSR}}{2^n} = \frac{V_{max} - V_{min}}{2^n}
  3. Maximum Ideal Quantization Error (eqe_q):

    eq=±ΔV2=±VFSR2n+1e_q = \pm \frac{\Delta V}{2} = \pm \frac{V_{FSR}}{2^{n+1}}
  4. Signal-to-Quantization-Noise Ratio (SQNR): Assuming a full-scale sinusoidal input, theoretical SQNR in decibels is:

    SQNR (dB)=6.02n+1.76,dB\text{SQNR (dB)} = 6.02 n + 1.76\\,\text{dB}

    Key Takeaway: Each additional bit of ADC resolution improves the signal-to-noise ratio by approximately 6.02,dB6.02\\,\text{dB} (a factor of 22 in voltage resolution).

  5. Digital Output Code Computation (DD): For a unipolar ADC (00 to VFSRV_{FSR}):

    D=floor(Vin−VminΔV)=floor(Vin−VminVFSR⋅2n)D = \text{floor}\left( \frac{V_{in} - V_{min}}{\Delta V} \right) = \text{floor}\left( \frac{V_{in} - V_{min}}{V_{FSR}} \cdot 2^n \right)

Common ADC Architecture Types

ADC TypeConversion SpeedResolution (nn)Dominant Characteristics & Use Case
Flash (Parallel)Ultra-Fast (>1,GSPS> 1\\,\text{GSPS})Low (6–86\text{--}8 bits)Uses 2n−12^n - 1 parallel comparators. High power and cost. Oscilloscopes, radar.
Successive Approximation (SAR)Fast (100,kSPS to 10,MSPS100\\,\text{kSPS} \text{ to } 10\\,\text{MSPS})Medium (10–1810\text{--}18 bits)Binary search algorithm using DAC and comparator. Standard choice for microcontroller DAQ systems.
Sigma-Delta (ΣΔ\Sigma\Delta)Slow to Moderate (<1,MSPS< 1\\,\text{MSPS})High (16–24+16\text{--}24+ bits)Over-sampling, noise shaping, digital filtering. Precision weigh scales, audio, RTD instrumentation.
Dual-Slope (Integrating)Slow (10–100,Hz10\text{--}100\\,\text{Hz})Very High (16–2016\text{--}20 bits)Integrates input voltage against reference. High noise rejection (50/60 Hz line rejection). Digital multimeters.

Accuracy, Precision, and Statistical Error Propagation

Accuracy vs. Precision

  • Accuracy: The degree of closeness between a measured value and the true, accepted reference value. Inaccuracy is caused by systematic errors (bias) such as calibration shifts, zero offsets, or uncompensated thermal drift.
  • Precision: The repeatability or mutual agreement among independent measurements taken under identical conditions. Imprecision is driven by random errors (noise) such as thermal Johnson noise or electromagnetic interference.
   High Accuracy, High Precision           Low Accuracy, High Precision (Bias)
           +-----------+                          +-----------+  
           |   ( (O) ) |                          | (O)       |  
           |    (OO)   |                          | (OO)      |  
           +-----------+                          +-----------+  

Statistical Measures of Random Errors

For NN repeated measurements of a variable xx:

  1. Sample Mean (xˉ\bar{x}):

    xˉ=1N∑i=1Nxi\bar{x} = \frac{1}{N} \sum_{i=1}^N x_i
  2. Sample Standard Deviation (ss):

    s=1N−1∑i=1N(xi−xˉ)2s = \sqrt{\frac{1}{N - 1} \sum_{i=1}^N (x_i - \bar{x})^2}
  3. Standard Uncertainty of the Mean (uxˉu_{\bar{x}}):

    uxˉ=sNu_{\bar{x}} = \frac{s}{\sqrt{N}}

Error Propagation (Root-Sum-Square Law)

When a derived engineering parameter RR is calculated from independent measured variables x1,x2,…,xkx_1, x_2, \dots, x_k according to a functional relationship R=f(x1,x2,…,xk)R = f(x_1, x_2, \dots, x_k), the combined standard uncertainty uRu_R is evaluated using partial derivative sensitivity coefficients:

νR=∑i=1k(∂f∂xiuxi)2=(∂f∂x1ux1)2+(∂f∂x2ux2)2+⋯+(∂f∂xkuxk)2\nu_R = \sqrt{\sum_{i=1}^k \left( \frac{\partial f}{\partial x_i} u_{x_i} \right)^2} = \sqrt{ \left(\frac{\partial f}{\partial x_1} u_{x_1}\right)^2 + \left(\frac{\partial f}{\partial x_2} u_{x_2}\right)^2 + \dots + \left(\frac{\partial f}{\partial x_k} u_{x_k}\right)^2 }

Digital-to-Analog Converters (DAC) & Signal Reconstruction

DAC Functionality & Architectures

A Digital-to-Analog Converter (DAC) performs the inverse operation of an ADC, mapping an nn-bit digital binary word into a proportional continuous analog output voltage:

Vout=Vmin+D⋅(VFSR2n)V_{out} = V_{min} + D \cdot \left( \frac{V_{FSR}}{2^n} \right)
  • Binary Weighted Resistor DAC: Uses parallel resistors scaled as R,2R,4R,8R,…,2n−1RR, 2R, 4R, 8R, \dots, 2^{n-1}R connected to an inverting summing amplifier. Simple concept, but requires impractically wide resistor precision ratios for high resolution.
  • R-2R Ladder Network DAC: Uses only two resistor values (RR and 2R2R) arranged in a repeating ladder topology. Easily fabricated in integrated circuits and widely used in precision motion control and audio playback.

Signal Reconstruction & Zero-Order Hold (ZOH)

The raw output of a DAC forms a discrete staircase waveform (Zero-Order Hold). An analog smoothing low-pass reconstruction filter is applied at the DAC output to eliminate high-frequency staircase steps and restore a smooth continuous waveform.

Worked Engineering Examples: Sampling & ADC Analysis

Problem 1: ADC Resolution, Quantization Error, and Code Calculation

Scenario: A 12-bit data acquisition system operates over a full-scale voltage range of 0.00,V0.00\\,\text{V} to 10.00,V10.00\\,\text{V} (VFSR=10.00,VV_{FSR} = 10.00\\,\text{V}).

  1. Calculate the LSB voltage step size (ΔV\Delta V) and the maximum ideal quantization error eqe_q.
  2. Calculate the theoretical Signal-to-Quantization-Noise Ratio (SQNR) in decibels.
  3. Determine the output digital decimal code DD and quantized voltage for an analog input of Vin=6.345,VV_{in} = 6.345\\,\text{V}.

Solution:

  1. Calculate LSB Step Size and Quantization Error:
ΔV=VFSR2n=10.00,V212=10.004096≈2.4414×10−3,V=2.4414,mV\Delta V = \frac{V_{FSR}}{2^n} = \frac{10.00\\,\text{V}}{2^{12}} = \frac{10.00}{4096} \approx 2.4414 \times 10^{-3}\\,\text{V} = 2.4414\\,\text{mV} ≠q=±ΔV2=±2.4414,mV2=±1.2207,mV\ne_q = \pm \frac{\Delta V}{2} = \pm \frac{2.4414\\,\text{mV}}{2} = \pm 1.2207\\,\text{mV}
  1. Calculate SQNR:
SQNR=6.02n+1.76=6.02(12)+1.76=72.24+1.76=74.00,dB\text{SQNR} = 6.02 n + 1.76 = 6.02(12) + 1.76 = 72.24 + 1.76 = 74.00\\,\text{dB}
  1. Determine Digital Code and Quantized Voltage:
D=floor(VinΔV)=floor(6.345,V0.0024414,V)=floor(2598.88)=2598D = \text{floor}\left( \frac{V_{in}}{\Delta V} \right) = \text{floor}\left( \frac{6.345\\,\text{V}}{0.0024414\\,\text{V}} \right) = \text{floor}(2598.88) = 2598 Vquantized=D⋅ΔV=2598×2.44141,mV=6.3428,VV_{quantized} = D \cdot \Delta V = 2598 \times 2.44141\\,\text{mV} = 6.3428\\,\text{V}

Problem 2: Nyquist Frequency and Aliasing Calculation

Scenario: An industrial machine vibration sensor produces a complex signal with frequency components at f1=80,Hzf_1 = 80\\,\text{Hz}, f2=180,Hzf_2 = 180\\,\text{Hz}, and f3=380,Hzf_3 = 380\\,\text{Hz}. The signal is sampled at fs=500,Hzf_s = 500\\,\text{Hz} without an anti-aliasing filter.

  1. Calculate the Nyquist frequency fNf_N.
  2. Identify which frequency components alias.
  3. Determine the apparent alias frequency recorded in the digital dataset for any aliased component.

Solution:

  1. Calculate Nyquist Limit:
fN=fs2=500,Hz2=250,Hzf_N = \frac{f_s}{2} = \frac{500\\,\text{Hz}}{2} = 250\\,\text{Hz}
  1. Evaluate Components for Aliasing:
  • f1=80,Hz≤250,Hz  ⟹  Sampled accurately without aliasing.f_1 = 80\\,\text{Hz} \le 250\\,\text{Hz} \implies \text{Sampled accurately without aliasing.}
  • f2=180,Hz≤250,Hz  ⟹  Sampled accurately without aliasing.f_2 = 180\\,\text{Hz} \le 250\\,\text{Hz} \implies \text{Sampled accurately without aliasing.}
  • f3=380,Hz>250,Hz  ⟹  Willalias!f_3 = 380\\,\text{Hz} > 250\\,\text{Hz} \implies \mathbf{Will\\ alias!}
  1. Calculate Apparent Alias Frequency:
falias=∣f3−kfs∣=∣380,Hz−1(500,Hz)∣=∣−120,Hz∣=120,Hzf_{alias} = |f_3 - k f_s| = |380\\,\text{Hz} - 1(500\\,\text{Hz})| = |-120\\,\text{Hz}| = 120\\,\text{Hz}

Engineering Insight: The 380,Hz380\\,\text{Hz} vibration harmonic folds back into the spectrum and appears erroneously as a 120,Hz120\\,\text{Hz} signal, potentially leading to false diagnostic conclusions unless an anti-aliasing filter cutting off near 200–250,Hz200\text{--}250\\,\text{Hz} is installed.

Test Your Knowledge

A 10-bit Analog-to-Digital Converter (ADC) operates over a full-scale input range of 0.0 V to 5.0 V. What is the voltage step size (Least Significant Bit resolution) of this converter?

A

9.77 mV

B

4.88 mV

C

2.44 mV

D

1.22 mV

Test Your Knowledge

An acoustic transducer records sound wave frequencies up to a maximum component of 18.5 kHz. According to the Nyquist-Shannon sampling theorem, what is the absolute minimum sampling frequency required to sample the signal without aliasing?

A

18.5 kHz

B

24.0 kHz

C

37.0 kHz

D

44.1 kHz

Test Your Knowledge

A sinusoidal pressure signal at a frequency of 750 Hz is sampled by a data acquisition board at a sampling rate of 1000 Hz without an anti-aliasing filter. What is the apparent frequency of the aliased signal recorded in the data file?

A

750 Hz

B

500 Hz

C

375 Hz

D

250 Hz

Test Your Knowledge

What is the theoretical Signal-to-Quantization-Noise Ratio (SQNR) of an ideal 14-bit Analog-to-Digital Converter?

A

86.04 dB

B

74.00 dB

C

98.08 dB

D

62.00 dB

Sections you finish are checked off in the contents.