Solution (source code)

= Solution

Digital acquisition converts a continuous <voltage> signal into timed numerical samples. A practical chain is a suitably buffered and amplified sensor signal, an analogue <anti-aliasing filter>, a sampling or sample-and-hold stage, an <analog-to-digital converter>, and a clocked data-storage system. Choose the gain so that the interesting variation uses the available input range without clipping. Finite <input impedance> can load a sensor, so an appropriate buffer or <operational amplifier> may be needed.

Sampling makes time discrete. If the conditioned signal is confined below <frequency> $f_{\max}$, choose a <sampling rate> $f_s>2f_{\max}$, allowing a transition band for the physical filter. The <Nyquist–Shannon sampling theorem> permits ideal reconstruction of a suitably <bandlimited function> from exact samples. Without filtering, components separated by integer multiples of $f_s$ have identical samples; in particular real sinusoids at $f$ and $f_s-f$ can be indistinguishable. This <aliasing> cannot generally be undone by later digital filtering. Oversampling can ease filter design, but does not replace the requirement to suppress unwanted high-frequency content before sampling.

<Amplitude> <quantization (signal processing)> is separate from sampling. A uniform $b$-<bit> converter covering <voltage> span $V_{\mathrm{span}}$ has step $q\simeq V_{\mathrm{span}}/2^b$. Rounding an in-range input gives the <uniform-quantization error bound> $|\epsilon|\leq q/2$. If the rounding errors can additionally be modeled as uniform and uncorrelated, their <standard deviation> is $q/\sqrt{12}$. This statistical estimate is not a guarantee for a constant input or a coherent periodic signal. More bits increase resolution, but accuracy also depends on voltage-reference calibration, offset, gain error, nonlinearity and electronic <noise>. Out-of-range signals clip and invalidate the rounding bound.

Clock quality matters too. Timing jitter $\delta t$ gives a <voltage> error approximately $(dV/dt)\delta t$; for a sinusoid its scale grows with $2\pi fV_p\sigma_t$. A clock calibration error biases measured frequencies and time intervals. Simultaneous multichannel signals need known relative timing, and the sampling and analogue settling times must be appropriate to the signal <bandwidth>.

For $n_c$ channels the raw recording rate is approximately $n_cf_sb$ bits per second, before overhead, so storage and sustained transfer speed must prevent missing data. Store units, channel identities, timestamps, <sampling rate>, input ranges and calibration information along with the readings. Preserve the original samples when applying digital filters or other processing. Averaging can improve precision for independent fluctuating errors, but cannot restore aliased frequencies, clipped peaks or a fixed rounding bias. Digital recording makes reproducible analysis and transmission possible when its sampling, <amplitude> and timing limitations are all controlled.