From fc7c9d37cc3e05233aa25fa6c9f4486d0bbafa9e Mon Sep 17 00:00:00 2001 From: Denis Chevalier Date: Sun, 9 Aug 2026 00:02:46 +0200 Subject: start error budgeting section and use widely uVrms --- module-design.typ | 307 +++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 290 insertions(+), 17 deletions(-) (limited to 'module-design.typ') diff --git a/module-design.typ b/module-design.typ index cc4ae9d..3e389d3 100644 --- a/module-design.typ +++ b/module-design.typ @@ -1,4 +1,4 @@ -#import "@preview/unify:0.8.1": numrange, qty, qtyrange, unit +#import "@preview/unify:0.8.1": num, numrange, qty, qtyrange, unit #import "@preview/diverential:0.3.0": * = Module design @@ -12,7 +12,7 @@ The challenge is substantial. The Metrologic tier demands $qty(10, "ppm")$ precision, $qty(90, "dB")$ signal-to-noise ratio, and $qty(0.014, "ppm per hour")$ drift over a DC to $qty(20, "kHz")$ bandwidth. These specifications, taken together, require that a $qty(20, "V")$ signal range -be resolved to $qty(200, "uV")$, that noise remain below $qty(632, "uV") upright("RMS")$, +be resolved to $qty(200, "uV")$, that noise remain below $qty(632.455, "uVrms")$, and that accumulated drift not exceed $qty(10, "ppm")$ over thirty days of continuous operation. Achieving this with commodity through-hole components — resistors, capacitors, and op-amps available from any electronics distributor — @@ -127,8 +127,8 @@ operators. [$upright(C)$], [Capacitance], [$unit(F)$], [$upright(L)$], [Inductance], [$unit(H)$], [$upright(P)$], [Power], [$unit(W)$], - [$upright(f)$], [Frequency], [$unit("Hz")$], - [$omega$], [Angular frequency ($omega = 2 pi upright(f)$)], [$unit("radian per second")$], + [$f$], [Frequency], [$unit("Hz")$], + [$omega$], [Angular frequency ($omega = 2 pi f$)], [$unit("radian per second")$], [$tau$], [Time constant ($tau = upright("RC") "or" upright("L/R")$)], [$unit(s)$], @@ -205,7 +205,7 @@ operators. [$epsilon_"total"$], [Total combined error], [$unit("ppm")$ or $unit("uV")$], [$epsilon_"systematic"$], [Systematic error component], [$unit("ppm")$], - [$epsilon_"random"$], [Random error component], [$unit("uV") upright("RMS")$], + [$epsilon_"random"$], [Random error component], [$unit("uVrms")$], [$epsilon_"offset"$], [Offset error], [$unit("uV")$], [$epsilon_"gain"$], [Gain error], [$unit("ppm")$], @@ -235,11 +235,9 @@ operators. [$upright(e)_(n,"white")$], [White noise component], [$unit("nV")/sqrt(unit("Hz"))$], - [$upright(e)_(n,1/upright(f))$], - [$1/upright(f)$ noise component], - [$unit("nV")/sqrt(unit("Hz"))$ at $qty(1, "Hz")$], + [$upright(e)_(n,1/f)$], [$1/f$ noise component], [$unit("nV")/sqrt(unit("Hz"))$ at $qty(1, "Hz")$], - [$upright(f)_c$], [Noise corner frequency ($1/upright(f)$ to white)], [$unit("Hz")$], + [$f_c$], [Noise corner frequency ($1/f$ to white)], [$unit("Hz")$], [$upright(V)_n$], [Total noise voltage], [$unit("V") upright("RMS")$], [$upright("CNI")$], [Current noise index (potentiometers)], [$unit("dB")$], @@ -255,8 +253,8 @@ operators. columns: 3, table.header([Symbol], [Definition], [Typical unit]), [$upright(D)$], [Duty cycle], [$unit("percent")$ or dimensionless], - [$upright(f)_"carrier"$], [Carrier frequency], [$unit("Hz")$], - [$upright(f)_0$], [Resonant or center frequency], [$unit("Hz")$], + [$f_"carrier"$], [Carrier frequency], [$unit("Hz")$], + [$f_0$], [Resonant or center frequency], [$unit("Hz")$], [$phi$], [Phase], [$unit("radian")$ or $unit("degree")$], [$Delta phi$], [Phase error or shift], [$unit("radian")$ or $unit("degree")$], @@ -329,7 +327,7 @@ Standard SI prefixes are used throughout: [micro], [$upright(mu)$], [$10^(-6)$], [nano], [$upright(n)$], [$10^(-9)$], [pico], [$upright(p)$], [$10^(-12)$], - [femto], [$upright(f)$], [$10^(-15)$], + [femto], [$f$], [$10^(-15)$], ), caption: [Unit prefixes], ) @@ -398,7 +396,7 @@ Standard SI prefixes are used throughout: / Signal-to-Noise Ratio ($upright("SNR")$): The ratio of signal power to noise power, typically expressed in decibels. The SAME Metrologic tier specifies $qty(90, "dB") upright("SNR")$, corresponding to approximately - $qty(632, "uV") upright("RMS")$ noise referred to the $qty(20, "Vpp")$ signal + $qty(632.455, "uVrms")$ noise referred to the $qty(20, "Vpp")$ signal range. / Referred-to-Input ($upright("RTI")$): An error specification expressed as an equivalent error at the circuit input. $upright("RTI")$ allows comparison of @@ -408,9 +406,9 @@ Standard SI prefixes are used throughout: must be met at the output. / Noise Gain: The gain seen by error sources at the amplifier input, which differs from signal gain in inverting configurations. For an inverting - amplifier with feedback resistor $upright(R)_upright(f)$ and input resistor + amplifier with feedback resistor $upright(R)_f$ and input resistor $upright(R)_"in"$, noise gain equals - $1 + upright(R)_upright(f)/upright(R)_"in"$. + $1 + upright(R)_f/upright(R)_"in"$. / Error Budget: A systematic accounting of all error sources and their contributions to total system error. Errors are typically combined by root-sum-square ($upright("RSS")$) for independent sources or algebraic sum @@ -593,7 +591,7 @@ Standard SI prefixes are used throughout: / Thermal Noise (Johnson-Nyquist Noise): Voltage fluctuations arising from the thermal agitation of charge carriers in any resistive element. Thermal noise power is proportional to temperature, resistance, and bandwidth. -/ Flicker Noise ($1/upright(f)$ Noise): Noise whose power spectral density is +/ Flicker Noise ($1/f$ Noise): Noise whose power spectral density is inversely proportional to frequency. Flicker noise dominates at low frequencies and is particularly significant in DC-coupled precision circuits. / Shot Noise: Noise arising from the discrete nature of electric charge, @@ -723,7 +721,7 @@ When digital logic is present, it must be completely isolated from the analog signal path. The module must ensure: + No measurable ripple from digital switching reaches the analog outputs. Digital supply noise must be attenuated to below the system noise floor -($qty(632, "uV") upright("RMS")$ for $qty(90, "dB") upright("SNR")$). +($qty(632.455, "uVrms")$ for $qty(90, "dB") upright("SNR")$). + No RF emissions escape the cassette. The module must meet the EMI shielding requirements specified in @cassette-grounding-requirements, with particular attention to the higher-frequency harmonics generated by digital @@ -963,6 +961,281 @@ content. == Error budgeting and system-level compensation +=== Introduction + +The goal of this section is to demonstrate, with mathematical rigor, that the +SAME Metrologic tier specifications are achievable: + +#figure( + table( + columns: 2, + table.header([Parameter], [Requirement]), + [Precision], [$qty(10, "ppm")$ ($qty(0.001, "percent")$)], + [Signal-to-noise ratio], [$qty(90, "dB")$], + [Drift rate], [$lt.eq qty(0.014, "ppm per hour")$], + [Bandwidth], [DC to $qty(20, "kHz")$], + [Drift-free operation], [$qty(30, "day")$], + ), + caption: [Summary of metrologic precision tier requirements], +) + +We will proceed as follows: ++ Establish the relationship between these specifications, ++ Enumerate all error sources in a precision analog signal path, ++ Quantify each error source for commodity components, ++ Show that the naive error budget exceeds our specifications, ++ Introduce compensation topologies that reduce specific error terms, ++ Construct the compensated error budget, ++ Demonstrate that the compensated budget meets specifications. + +This section provides the theoretical framework. @error-compensation-strategies, +@advanced-compensation-topologies and @implicit-computation provide detailed +analysis and proof for each compensation topology. @reference-implementation +provides concrete implementations. + +=== Fundamental relationships + +Before enumerating errors, we must establish how our specifications relate to +each other. + +==== Precision and signal range + + +The SAME signal range is $plus.minus qty(10, "V")$, a span of $qty(20, "V")$. +Precision of $qty(10, "ppm")$ means the maximum acceptable error is: + +$ epsilon_"max" = qty(20, "V") times (10 times 10^(-6)) = qty(200, "uV") $ + +This is our total error budget. Every error source - noise, drift, offset, +nonlinearity - must sum to less than $qty(200, "uV")$ referred to output +($upright("RTO")$), or equivalently, $qty(10, "ppm")$ referred to full scale +($upright("FS")$) + + +==== $upright("SNR")$ and noise floor + +A $qty(90, "dB") upright("SNR")$ with a $qty(20, "Vpp")$ signal range implies an +$upright("RMS")$ noise floor of: + +$ + upright(V)_("noise","rms") = qty(20, "V")/10^(90/20) = qty(20, "V")/31623 approx qty(632.455, "uVrms") +$ + +For Gaussian noise, the peak-to-peak value is approximately $6 times$ the +$upright("RMS")$ value ($2 Phi (3) - 1 approx qty(99.7, "percent")$ containment): + +$ + upright(V)_("noise","pp") approx 6 times qty(632.455, "uV") = qty(3.79473, "mVpp") +$ + +This appears to conflict with our $qty(200, "uV")$ precision requirement. The +resolution is that _precision_ and _noise_ are different specifications: +/ Precision: Applies to the _mean_ of the signal - systematic errors, offset, + gain error, linearity. +/ Noise: Applies to the _variance_ - random fluctuations around the mean. + +A measurement averaged over sufficient time can achieve precision better than +the instantaneous noise floor. However, for real-time computation (DC to +$qty(20, "kHz")$ bandwidth), we cannot average indefinitely. + +The relationship between noise and achievable precision depends on the +observation time $tau$: + +$ + epsilon_"noise" = upright(V)_("noise","rms") / sqrt(2 times upright("BW") times tau) +$ + +For a single-sample measurement at $qty(20, "kHz")$ bandwidth, +$tau = qty(25, "us")$: it represents one Nyquist interval +($f_"sample" = 2 upright("BW") = qty(40, "kHz")$, giving +$T_"sample" = qty(25, "us")$). + +$ + epsilon_"noise" = qty(632.455, "uV") / sqrt(2 times 20000 times (25 times 10^(-6))) = qty(632.455, "uV") / 1 = qty(632.455, "uV") +$ + +This means noise alone consumes more than our entire precision budget for +simgle-sample measurements. + +===== Resolution + +The $qty(10, "ppm")$ precision specification applies to _systematic_ errors +only. The $qty(90, "dB") upright("SNR")$ specification applies to _random_ +errors. Both must be met, but they are separate budgets: + +#figure( + table( + columns: 3, + table.header([Budget], [Allocation], [Expressed as]), + [Systematic error budget], [$qty(200, "uV")$ ($qty(10, "ppm")$)], [Offset, drift, gain error, nonlinearity], + + [Random error budget], [$qty(632.455, "uVrms")$ ($qty(90, "dB")$)], [Thermal noise, $1/f$ noise, interference], + ), + caption: [Error budgets allocation], +) + +The $qty(90, "dB") upright("SNR")$ allows $qty(632.455, "uVrms")$ random +noise, while the $qty(10, "ppm")$ precision requires $lt qty(200, "uV")$ +systematic error. These are independent budgets. + +In real-world analog computing (such as differential equation solving), feedback +loops and integrators inherently ast as low-pass filters +($tau gt.double qty(25, "uV")$). As a result, long-term or dynamic patch +execution naturally attenuates the random noise variance toward zero, leaving +the $qty(10, "ppm")$ systematic precision as the true controlling factor for +continuous computation. + +==== Drift rate and long-term stability + +The drift rate specification of $qty(0.014, "ppm per hour")$ means: + +$ + dv(epsilon, t) lt.eq 0.014 times 10^(-6) times qty(20, "volt per hour") = qty(280, "nano volt per hour") +$ + +Over 30 days (720 hours), the accumulated drift is: + +$ epsilon_("drift",qty(30, "day")) = 0.014 times 720 = qty(10.08, "ppm") $ + +This is precisely calibrated so that 30 days of drift consumes the entire +systematic error budget. After 30 days, recalibration is required. + +/ Important: The drift specification is a rate, not an absolute value. A module + may have an initial offset of $qty(5, "ppm")$ (within spec) and drift at + $qty(0.014, "ppm per hour")$. After 15 days, it reaches $qty(10, "ppm")$ total + and is now at the edge of specification. To guarantee a 30-day drift-free + computation period, active compensation topologies must trim or null + $epsilon_"initial"$ to near-zero ($lt qty(0.5, "ppm")$) at $t = 0$. + +==== Bandwidth and dynamic errors + +The DC to $qty(20, "kHz")$ bandwidth requirement introduces frequency-dependent +errors: +/ Gain error vs frequency: Amplifiers have finite gain-bandwidth product, +/ Phase error vs frequency: Relevant for system-level computations (e.g. + solving differential equations), +/ Slew rate limiting: Large signals at high frequency may exceed amplifier slew + rate, +/ Settling time: Step inputs require the output to settle within + $qty(10, "ppm")$ of final value. + +For a sinusoidal signal at frequency $f$ to be reproduced within +$qty(10, "ppm")$ amplitude error, the amplifier gain at the frequency must +satisfy: + +$ + A(f)/A(0) & gt.eq 1 - 10 times 10^(-6) \ + A(f)/A(0) & gt.eq 0.99999 +$ + +For a single-pole system with gain-bandwidth product $upright("GBW")$ and DC +closed-loop gain $G$: + +$ A(f)/A(0) gt.eq 1/sqrt(1 + (f times G/upright("GBW"))^2) $ + +Solving for $qty(10, "ppm")$ gain error at $qty(20, "kHz")$ with $G = 1$ +(unity gain buffer): + +$ + upright("GBW") gt.eq 20000 / sqrt((1/0.99999)^2 - 1) approx 20000/sqrt(0.00002) approx qty(4.5, "MHz") +$ + +For $G = 10$: + +$ upright("GBW") gt.eq qty(45, "MHz") $ + +This is achievable with modern op-amps, but it constrains component selection. + +=== Complete enumeration of error sources + + +To construct a rigorous error budget, we must enumerate every physical mechanism +that can cause the output of an analog circuit to deviate from its ideal +mathematical function. We categorize these into five classes: +/ Noise: Random fluctuations (contributes to $upright("SNR")$ budget). +/ Drift: Time-varying systematic errors (contributes to drift rate budget). +/ Static errors: Fixed systematic errors at a given operating point (contributes + to precision budget). +/ Dynamic errors: Frequency-dependent systematic errors (contributes to + precision budget at bandwidth edges). +/ Nonlinearity: Signal-amplitude-dependent systematic errors (contributes to + precision budget). + +For each error source, we will provide: +/ Physical mechanism: Why does this error exist? +/ Mathematical model: How do we quantify it? +/ Typical magnitude: What values do commodity components exhibit? +/ Where it enters: Which circuit nodes are vulnerable? +/ Compensation strategy: Reference to subsequent sections where mitigation is + proven. + +==== Noise sources + +Noise sources contribute to the random error budget. They determine the +$upright("SNR")$ floor of the system. + +===== Resistor thermal noise (Johnson-Nyquist noise) + +====== Physical mechanism + +Thermal agitation of charge carriers in a resistor produces a random voltage +across its terminals. This is a fundamental thermodynamic phenomenon; it cannot +be eliminated, only minimized. + +====== Mathematical model + +The $upright("RMS")$ noise voltage spectral density of a resistor $R$ at +absolute temperature $T$ is: + +$ e_n = sqrt(4 k_B T R) $ + +Where: +- $k_B = qty("1.381e-23", "joule per kelvin")$ (Boltzmann constant), +- $T =$ absolute temperature ($unit(K)$), +- $R =$ resistance ($unit("ohm")$). + +The total $upright("RMS")$ noise over bandwidth $upright("BW")$ is: + +$ V_(n,"rms") = sqrt(4 k_B T R upright("BW")) $ + +====== Typical magnitude + +At $T = qty(300, "K")$ ($qty(27, "dC")$), for a $qty(10, "kilo ohm")$ resistor +over $qty(20, "kHz")$ bandwidth: + +$ + V_(n,"rms") & = sqrt(4 times num("1.381e-23") times 300 times 10000 times 20000) \ + V_(n,"rms") & approx qty(1.82, "uVrms") +$ + +For a $qty(1, "mega ohm")$ resistor (input impedance): + +$ + V_(n,"rms") & = sqrt(4 times num("1.381e-23") times 300 times 1000000 times 20000) \ + V_(n,"rms") & approx qty(18.2, "uVrms") +$ + +====== Where it enters + +- Input resistors in summing amplifiers, +- Feedback resistors (noise is gained at output), +- High-impedance nodes (input buffers, integrators). + +====== Scaling law + +Thermal noise scales with $sqrt(R)$. Lower resistance values reduce noise but +increase power consumption and loading effects. This creates a fundamental +tradeoff. + +====== Compensation strategy + +Thermal noise is fundamental and cannot be compensated. Mitigation is through: +- Minimizing resistance values where possible, +- Bandwidth limiting (but conflicts with the $qty(20, "kHz")$ requirement), +- Operating at lower temperatures (impractical for SAME). + +For SAME, thermal noise contribution must be budgeted, not eliminated. + == Error compensation strategies == Advanced compensation topologies -- cgit