aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Chevalier <perso@denischevalier.fr>2026-08-09 00:17:33 +0200
committerDenis Chevalier <perso@denischevalier.fr>2026-08-09 00:17:33 +0200
commitae7f32dba37a0a81a3e6dcac9b331b46de5b1e35 (patch)
tree317b81754defbde9e8d893008be46a45a901c49a
parentfc7c9d37cc3e05233aa25fa6c9f4486d0bbafa9e (diff)
downloadsame-ae7f32dba37a0a81a3e6dcac9b331b46de5b1e35.tar.gz
same-ae7f32dba37a0a81a3e6dcac9b331b46de5b1e35.tar.bz2
same-ae7f32dba37a0a81a3e6dcac9b331b46de5b1e35.zip
fix custom units and num for times 10^(-n)$ constructions
-rw-r--r--module-design.typ102
-rw-r--r--preamble.typ12
2 files changed, 57 insertions, 57 deletions
diff --git a/module-design.typ b/module-design.typ
index 3e389d3..4d8c142 100644
--- a/module-design.typ
+++ b/module-design.typ
@@ -107,10 +107,10 @@ operators.
table(
columns: 4,
table.header([Symbol], [Definition], [Value], [Unit]),
- [$k_B$], [Boltzmann constant], [$1.381 times 10^(-23)$], [$unit("joule per kelvin")$],
+ [$k_B$], [Boltzmann constant], [$num("1.381e-23")$], [$unit("joule per kelvin")$],
- [$upright(T)$], [Absolute temperature], [N/A], [$unit(K)$],
- [$upright(e)$], [Elementary charge], [$1.603 times 10^(-19)$], [$unit(C)$],
+ [$T$], [Absolute temperature], [N/A], [$unit(K)$],
+ [$upright(e)$], [Elementary charge], [$num("1.603e-19")$], [$unit(C)$],
),
caption: [Fundamental constants],
) <table-fundamental-constants>
@@ -121,12 +121,12 @@ operators.
table(
columns: 3,
table.header([Symbol], [Definition], [Typical unit]),
- [$upright(V)$], [Voltage (general)], [$unit(V)$],
- [$upright(I)$], [Current (general)], [$unit(A)$],
- [$upright(R)$], [Resistance], [$unit("ohm")$],
- [$upright(C)$], [Capacitance], [$unit(F)$],
- [$upright(L)$], [Inductance], [$unit(H)$],
- [$upright(P)$], [Power], [$unit(W)$],
+ [$V$], [Voltage (general)], [$unit(V)$],
+ [$I$], [Current (general)], [$unit(A)$],
+ [$R$], [Resistance], [$unit("ohm")$],
+ [$C$], [Capacitance], [$unit(F)$],
+ [$L$], [Inductance], [$unit(H)$],
+ [$P$], [Power], [$unit(W)$],
[$f$], [Frequency], [$unit("Hz")$],
[$omega$], [Angular frequency ($omega = 2 pi f$)], [$unit("radian per second")$],
@@ -169,12 +169,12 @@ operators.
table(
columns: 3,
table.header([Symbol], [Definition], [Typical unit]),
- [$upright(G)$], [Gain (closed-loop)], [dimensionless or $unit("dB")$],
- [$upright(A)$], [Gain (open-loop)], [dimensionless or $unit("dB")$],
- [$upright(A)_"OL"$], [Open-loop gain (explicit)], [dimensionless],
+ [$G$], [Gain (closed-loop)], [dimensionless or $unit("dB")$],
+ [$A$], [Gain (open-loop)], [dimensionless or $unit("dB")$],
+ [$A_"OL"$], [Open-loop gain (explicit)], [dimensionless],
[$beta$], [Feedback factor], [dimensionless],
- [$upright(A) beta$], [Loop gain], [dimensionless],
- [$upright(H)$], [Transfer function], [dimensionless],
+ [$A beta$], [Loop gain], [dimensionless],
+ [$H$], [Transfer function], [dimensionless],
[$R_f$], [Feedback resistor], [$unit("ohm")$],
[$R_"in"$], [Input resistor], [$unit("ohm")$],
[$Z_"in"$], [Input impedance], [$unit("ohm")$],
@@ -239,7 +239,7 @@ operators.
[$f_c$], [Noise corner frequency ($1/f$ to white)], [$unit("Hz")$],
- [$upright(V)_n$], [Total noise voltage], [$unit("V") upright("RMS")$],
+ [$V_n$], [Total noise voltage], [$unit("V") upright("RMS")$],
[$upright("CNI")$], [Current noise index (potentiometers)], [$unit("dB")$],
),
caption: [Noise quantities],
@@ -252,14 +252,14 @@ operators.
table(
columns: 3,
table.header([Symbol], [Definition], [Typical unit]),
- [$upright(D)$], [Duty cycle], [$unit("percent")$ or dimensionless],
+ [$D$], [Duty cycle], [$unit("percent")$ or dimensionless],
[$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")$],
- [$upright(t)_"settle"$], [Settling time], [$unit("s")$],
- [$upright(t)_h$], [Timing jitter], [$unit("ps")$ or $unit("ns")$],
+ [$t_"settle"$], [Settling time], [$unit("s")$],
+ [$t_h$], [Timing jitter], [$unit("ps")$ or $unit("ns")$],
),
caption: [Time domain and modulation quantities],
) <table-time-domain-and-modulation-quantities>
@@ -270,19 +270,19 @@ operators.
table(
columns: 3,
table.header([Symbol], [Definition], [Typical unit]),
- [$upright(T)$], [Temperature (absolute)], [$unit("K")$],
+ [$T$], [Temperature (absolute)], [$unit("K")$],
[$delta upright(T)$], [Temperature difference], [$unit("celsius")$ or $unit("K")$],
- [$(Delta upright(T))/(upright(d) y)$], [Vertical temperature gradient], [$unit("celsius per centi meter")$],
+ [$(Delta T)/(upright(d) y)$], [Vertical temperature gradient], [$unit("celsius per centi meter")$],
[$theta_"conv"$], [Convective thermal resistance], [$unit("celsius per watt")$],
[$theta_"cond"$], [Conductive thermal resistance], [$unit("celsius per watt")$],
[$accent(Q, dot)$], [Heat flux], [$unit("W")$],
- [$accent(upright(m), dot)$], [Mass flow rate], [$unit("kilo gram per second")$],
+ [$accent(m, dot)$], [Mass flow rate], [$unit("kilo gram per second")$],
- [$upright(c)_p$], [Specific heat capacity], [$unit("J")/(unit("kg") unit("K"))$],
+ [$c_p$], [Specific heat capacity], [$unit("J")/(unit("kg") unit("K"))$],
),
caption: [Thermal quantities],
) <table-thermal-quantities>
@@ -341,18 +341,18 @@ Standard SI prefixes are used throughout:
Used for expressing frequency stability of precision oscillators.
/ Decibels ($unit("dB")$): Logarithmic ratio.
/ For voltage or amplitude ratios:
- $unit("dB") = 20 log_10(upright(V)_1/upright(V)_2)$.
- / For power ratios: $unit("dB") = 10 log_10(upright(P)_1/upright(P)_2)$.
+ $unit("dB") = 20 log_10(V_1/V)_2)$.
+ / For power ratios: $unit("dB") = 10 log_10(P_1/P_2)$.
/ $unit("dBc")/unit("Hz")$: Phase noise specification. Power spectral density of
phase fluctuations relative to carrier power, per hertz of bandwidth.
/ Subscript conventions for matched pairs: When two components are matched,
subscripts 1 and 2 (or A and B) denote individual components, while the ratio
- $upright(R)_1/upright(R)_2$ denotes the matched ratio whose tolerance is
+ $R_1/R_2$ denotes the matched ratio whose tolerance is
tighter than either individual tolerance.
/ Temperature in calculations: Noise calculations use absolute temperature
(Kelvin). Temperature coefficients use Celsius ($unit("celsius")$), since only
- temperature differences matter and $Delta upright(T)$ in Kelvin equals
- $Delta upright(T)$ in Celsius.
+ temperature differences matter and $Delta T$ in Kelvin equals
+ $Delta T$ in Celsius.
/ Frequency-domain notation: Transfer functions are expressed in the Laplace
domain with the complex frequency variable $s = sigma + j omega$, where
$j = sqrt(−1)$. For sinusoidal steady-state analysis, $s = j omega$.
@@ -406,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)_f$ and input resistor
- $upright(R)_"in"$, noise gain equals
- $1 + upright(R)_f/upright(R)_"in"$.
+ amplifier with feedback resistor $R_f$ and input resistor
+ $R_"in"$, noise gain equals
+ $1 + R_f/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
@@ -419,13 +419,13 @@ Standard SI prefixes are used throughout:
/ Temperature Coefficient (Tempco): The rate at which a component parameter
changes with temperature, typically specified in $unit("ppm per celsius")$.
Lower tempco indicates greater temperature stability.
-/ Voltage Coefficient of Resistance ($upright(V)_"CR"$): The rate at which
+/ Voltage Coefficient of Resistance ($V_"CR"$): The rate at which
resistance changes with applied voltage, specified in $unit("ppm")/unit("V")$
- or $unit("ppm")/unit("V")_2$. $upright(V)_"CR"$ creates nonlinearity in
+ or $unit("ppm")/unit("V")_2$. $V_"CR"$ creates nonlinearity in
circuits with signal-dependent voltage across resistors.
-/ Voltage Coefficient of Capacitance ($upright(V)_"CC"$): The rate at which
+/ Voltage Coefficient of Capacitance ($V_"CC"$): The rate at which
capacitance changes with applied voltage. Class 2 ceramic capacitors (X7R,
- X5R) can exhibit $upright(V)_"CC"$ of
+ X5R) can exhibit $V_"CC"$ of
$qtyrange(-30, -80, "percent", delimiter: "\"to\"")$ at rated voltage, making
them unsuitable for signal paths.
/ Dielectric Absorption ($upright("DA")$): A memory effect in capacitors where
@@ -454,13 +454,13 @@ Standard SI prefixes are used throughout:
=== Amplifier and circuit terminology <amplifier-and-circuit-terminology>
-/ Input Offset Voltage ($upright(V)_"OS"$): The DC voltage that must be applied
- between an op-amp's inputs to force the output to zero. $upright(V)_"OS"$
+/ Input Offset Voltage ($V_"OS"$): The DC voltage that must be applied
+ between an op-amp's inputs to force the output to zero. $V_"OS"$
appears as an error at the input that is multiplied by the noise gain.
-/ Input Bias Current ($upright(I)_upright(B)$): The DC current flowing into or
+/ Input Bias Current ($I_B$): The DC current flowing into or
out of an op-amp's input terminals required to bias the input stage. Bias
current through source impedances creates voltage errors.
-/ Input Offset Current ($upright(I)_"OS"$): The difference between the bias
+/ Input Offset Current ($I_"OS"$): The difference between the bias
currents at an op-amp's two input terminals. Balancing source impedances can
reduce bias current error to offset current error.
/ Common-Mode Rejection Ratio ($upright("CMRR")$): The ratio of differential
@@ -471,10 +471,10 @@ Standard SI prefixes are used throughout:
gain to power supply gain, expressing an amplifier's immunity to supply
voltage variations. $upright("PSRR")$ degrades with frequency, making
high-frequency supply noise more problematic.
-/ Open-Loop Gain ($upright(A)_"OL"$): The gain of an amplifier without feedback,
+/ Open-Loop Gain ($A_"OL"$): The gain of an amplifier without feedback,
typically $106$ to $108$ ($qtyrange(120, 160, "dB")$) for precision op-amps.
Finite open-loop gain creates closed-loop gain error proportional to
- $upright(G)_"ideal"/upright(A)_"OL"$.
+ $G_"ideal"/A_"OL"$.
/ Gain-Bandwidth Product ($upright("GBW")$): The product of an op-amp's DC
open-loop gain and the frequency at which open-loop gain falls to unity. For a
single-pole op-amp, $upright("GBW")$ is constant and determines gain error at
@@ -489,9 +489,9 @@ Standard SI prefixes are used throughout:
periodically reversing signal polarity and correcting for the resulting
offset. Chopper-stabilized amplifiers achieve offset drifts below
$qty(0.05, "micro volt per celsius")$.
-/ Loop Gain: The product of forward gain $upright(A)$ and feedback factor $beta$ in a
+/ Loop Gain: The product of forward gain $A$ and feedback factor $beta$ in a
feedback system. Loop gain determines error suppression: errors in the forward
- path are divided by $(1 + upright(A) beta)$.
+ path are divided by $(1 + A beta)$.
=== Computation terminology <computation-terminology>
@@ -524,8 +524,8 @@ Standard SI prefixes are used throughout:
multiplication.
/ Duty Cycle: The fraction of a period during which a pulse signal is high. In
PWAM, the duty cycle encodes signal amplitude: $qty(50, "percent")$
- corresponds to zero, $qty(0, "percent")$ to $minus upright(V)_"ref"$, and
- $qty(100, "percent")$ to $plus upright(V)_"ref"$.
+ corresponds to zero, $qty(0, "percent")$ to $minus V_"ref"$, and
+ $qty(100, "percent")$ to $plus V_"ref"$.
/ Carrier Frequency: The frequency of the triangle wave or pulse train used in
PWAM modulation. The SAME specification uses a $qty(500, "kHz")$ carrier
derived from the $qty(10, "MHz")$ Master Oscillator.
@@ -1004,7 +1004,7 @@ each other.
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") $
+$ epsilon_"max" = qty(20, "V") times num("10e-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
@@ -1018,14 +1018,14 @@ 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")
+ 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")
+ 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
@@ -1042,7 +1042,7 @@ 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)
+ epsilon_"noise" = V_("noise","rms") / sqrt(2 times upright("BW") times tau)
$
For a single-sample measurement at $qty(20, "kHz")$ bandwidth,
@@ -1051,7 +1051,7 @@ $tau = qty(25, "us")$: it represents one Nyquist interval
$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")
+ epsilon_"noise" = qty(632.455, "uV") / sqrt(2 times 20000 times num("25e-6")) = qty(632.455, "uV") / 1 = qty(632.455, "uV")
$
This means noise alone consumes more than our entire precision budget for
@@ -1090,7 +1090,7 @@ continuous computation.
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")
+ dv(epsilon, t) lt.eq num("0.014e-6") times qty(20, "volt per hour") = qty(280, "nano volt per hour")
$
Over 30 days (720 hours), the accumulated drift is:
@@ -1124,7 +1124,7 @@ $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 1 - num("10e-6") \
A(f)/A(0) & gt.eq 0.99999
$
diff --git a/preamble.typ b/preamble.typ
index 1387a68..d6234b6 100644
--- a/preamble.typ
+++ b/preamble.typ
@@ -6,16 +6,16 @@
#add-unit("inch", "\"", "upright(\"\\\"\")", space: false)
#add-unit("micro inch", "u\"", "upright(mu \"\\\"\")", space: false)
#add-unit("digital voltage", "VD", "upright(\"VD\")")
-#add-unit("volt peak-to-peak", "Vpp", "upright(V_\"pp\")")
-#add-unit("milli volt peak-to-peak", "mVpp", "upright(\"mV\"_\"pp\")")
-#add-unit("micro volt peak-to-peak", "uVpp", "upright(mu V_\"pp\")")
+#add-unit("volt peak-to-peak", "Vpp", "V_\"pp\"")
+#add-unit("milli volt peak-to-peak", "mVpp", "\"mV\"_\"pp\"")
+#add-unit("micro volt peak-to-peak", "uVpp", "mu V_\"pp\"")
#add-unit("dBc", "dBc", "upright(\"dBc\")") // decibels relative to the carrier
#add-unit("rack unit", "U", "upright(U)", space: false)
#add-unit("ounce", "oz", "upright(\"oz\")")
#add-unit("american wire gauge", "AWG", "upright(\"AWG\")")
-#add-unit("volt AC", "VAC", "upright(V_\"AC\")")
-#add-unit("volt DC", "VDC", "upright(V_\"DC\")")
-#add-unit("uVrms", "uVrms", "mu upright(V)_\"rms\"")
+#add-unit("volt AC", "VAC", "V_\"AC\"")
+#add-unit("volt DC", "VDC", "V_\"DC\"")
+#add-unit("uVrms", "uVrms", "mu V_\"rms\"")
#set document(
title: [SAME Analog Modular Ecosystem],