Residual baseline in RC pulse-width discrimination (source code)

= Residual baseline in RC pulse-width discrimination
{title2=$V_b$}

A <capacitor> need not finish discharging before the next pulse arrives. This <residual baseline in RC pulse-width discrimination> changes the next pulse's <RC threshold-crossing time> even if its applied height and duration are unchanged. The relaxed-state acceptance formula assumes an initial output of zero; a repeated <pulse train> can violate that assumption systematically.

Take a first-order <RC circuit> with <time constant> $\tau=RC$, input high level $V_0>0$, zero input low level and initial capacitor output $V_b$. During a pulse of duration $T$,
$$
v(t)=V_0-(V_0-V_b)e^{-t/\tau},\qquad
V_p=V_0-(V_0-V_b)e^{-T/\tau}.
$$
For $0\le V_b<V_{\rm th}<V_0$, solving for the rising threshold gives
$$
\boxed{t_\uparrow=\tau\log\frac{V_0-V_b}{V_0-V_{\rm th}}.}
$$
A finite interval above threshold requires $T>t_\uparrow$. At equality the output only touches the threshold at its peak. A positive residual $V_b$ makes the crossing earlier than the zero-baseline crossing. If the output already exceeds the threshold at the start, this rising-crossing formula no longer describes a new edge.

The input of a repeated <pulse train> is a <periodic function> with high duration $T$, low duration $D>0$ and period $P=T+D$. Put $\alpha=e^{-T/\tau}$ and $\beta=e^{-D/\tau}$. The next baseline is the previous peak multiplied by $\beta$. Writing $b_n$ for the baseline before pulse $n+1$ gives the <linear recurrence relation>
$$
b_{n+1}=\beta(1-\alpha)V_0+\alpha\beta b_n.
$$
Because $0<\alpha\beta=e^{-P/\tau}<1$, the deviation from its <fixed point> is a decaying <geometric sequence>:
$$
b_n=b_*+(b_0-b_*)(\alpha\beta)^n,\qquad
\boxed{b_*=\frac{\beta(1-\alpha)V_0}{1-\alpha\beta},\quad
V_{p,*}=\frac{(1-\alpha)V_0}{1-\alpha\beta}.}
$$
This <periodic RC pulse-train baseline> is a repeatable state of the circuit, rather than random readout <noise>. In the periodic regime, separate rising and falling comparator transitions require $b_*<V_{\rm th}<V_{p,*}$. If $V_{p,*}\le V_{\rm th}$, there is no finite high interval. If $b_*\ge V_{\rm th}$, there is no finite low interval: <missing comparator reset in an RC pulse train> can turn repeated input pulses into one sustained output state.

For an original calculation, choose $\tau=1\,\mathrm{\mu s}$, $V_0=1\,\mathrm V$, $V_{\rm th}=0.50\,\mathrm V$, $T=0.40\,\mathrm{\mu s}$ and $D=0.60\,\mathrm{\mu s}$. An isolated relaxed pulse peaks at only $0.32968\,\mathrm V$ and is rejected. The repeatable train instead has
$$
\boxed{b_*=0.28623\,\mathrm V,\qquad V_{p,*}=0.52155\,\mathrm V.}
$$
Its rising threshold occurs $0.35595\,\mathrm{\mu s}$ after each pulse starts. The falling crossing is $T+\tau\log(V_{p,*}/V_{\rm th})=0.44219\,\mathrm{\mu s}$, giving an above-threshold duration of $0.08624\,\mathrm{\mu s}$. Starting from zero baseline, the first three pulses are rejected, but the fourth peaks at $0.51199\,\mathrm V$ and crosses. A change in pulse acceptance need not mean that the source pulse itself changed.

\Image[/rc-pulse-train-baseline.png]
{title=Residual <capacitor> charge makes a repeated short pulse cross a threshold that rejects the isolated pulse}
{description=Original first-order model, with a 1 µs time constant, 0.4 µs high interval, 0.6 µs low interval and a half-height threshold. The first train starts relaxed; the second panel shows the repeatable baseline and peak. No measured waveforms are used.}

A useful design bound controls timing error rather than merely calling the circuit discharged. Put $a=V_{\rm th}/V_0$ and suppose $0\le V_b/V_0\le\varepsilon<a$. Relative to the relaxed crossing,
$$
\Delta t=\tau\log(1-V_b/V_0),\qquad
|\Delta t|\le-\tau\log(1-\varepsilon).
$$
Since a nonnegative pulse train in this model has $V_p\le V_0$, a low interval $D\ge\tau\log(1/\varepsilon)$ guarantees that baseline bound. Combining the inequalities yields a sufficient <quiet interval required for an RC baseline timing budget> $\delta>0$:
$$
D\ge-\tau\log(1-e^{-\delta/\tau}),\qquad
\varepsilon=1-e^{-\delta/\tau}<a.
$$
For a 1% baseline allowance, $D\ge4.6052\tau$ limits the crossing advance to $0.01005\tau$, or $10.05\,\mathrm{ns}$ when $\tau=1\,\mathrm{\mu s}$. The bound is conservative because it uses the largest possible peak.

A bench test holds pulse height, duration and threshold fixed while sweeping repetition period with a <pulse generator>. Record the actual input and capacitor output on an <oscilloscope>, including the baseline immediately before each pulse. Probe <capacitance> and effective source <electrical resistance> belong in $\tau$. MIT's laboratory uses repetitive square-wave excitation to measure RC decay, providing a direct way to check the underlying <time constant>.<Laboratory 11: Sinusoidal Steady State Response of RC and RL Circuits by MIT OpenCourseWare>[Printed pp. 1–2, natural-response and waveform measurements]{ref} The calculations above assume ideal input edges and zero input low level; comparator <hysteresis> and switching dynamics require their own model.