Current-sign certificate for an averaged sensor sample (source code)

= Current-sign certificate for an averaged sensor sample

A <current-sign certificate for an averaged sensor sample> bounds the difference between a filtered current reading and the actual <electric current> throughout a future switching interval. An average is a weighted history, so it cannot automatically be treated as an instantaneous reading at the end of its acquisition window. This matters for <current-polarity dead-time compensation>, whose current-path model can fail if the actual current crosses zero during the interval. The physical recirculation paths are documented in the manufacturer’s bridge-switching diagrams.<Using power MOSFETs in DC motor control applications by Nexperia>[IAN50004, §4.1, Figures 5–6]{ref}

Let an averaging window end at $t_b$ and have age coordinate $a\in[0,T_a]$. Suppose the reported reading is
$$
i_m=\int_0^{T_a}k(a)i(t_b-a)\,da+\eta,
\qquad \int_0^{T_a}k(a)\,da=1,\qquad |\eta|\le\epsilon_i.
$$
Assume $|di/dt|\le L_i$ over the acquisition history and target interval ending at $t_e\ge t_b$. If $k\ge0$, then for every future $t\le t_e$,
$$
|i(t)-i_m|\le\epsilon_i+L_i\int_0^{T_a}k(a)(t-t_b+a)\,da
\le\boxed{\epsilon_i+L_i(t_e-t_b+\bar a)},
$$
where $\bar a=\int_0^{T_a}ak(a)\,da$ is the mean sample age. The triangle inequality and the derivative bound prove this result; nonnegative normalized weights make it a convex average. A positive sign is certified by $i_m>b$, and a negative sign by $i_m<-b$, with $b$ the boxed quantity.

Uniform averaging gives $\bar a=T_a/2$. A triangular weighting favoring recent values, $k(a)=2(1-a/T_a)/T_a$, instead gives $\bar a=T_a/3$. For an original comparison, take $T_a=6\,\mathrm{\mu s}$, $t_e-t_b=2.5\,\mathrm{\mu s}$, $L_i=5000\,\mathrm{A/s}$ and $\epsilon_i=0.020\,\mathrm A$. The uniform bound is $0.0475\,\mathrm A$; the triangular bound is $0.0425\,\mathrm A$. A $0.0450\,\mathrm A$ reading certifies positivity only under the triangular model, leaving a $0.0025\,\mathrm A$ lower margin. This comparison holds the error bound fixed; changing a real filter can also change noise and calibration errors.

Timestamp uncertainty enlarges the age budget. If the actual window could end another $\delta t$ earlier than reported, use $t_e-t_b+\delta t$ in the bound. Any uncertain output scheduling or gate delay likewise belongs in the latest possible target end time. These are bounds on the complete timing relation, not just the controller’s nominal sampling period.

A <signed-filter current-sign certificate> needs a different expression when a reconstruction filter has negative coefficients. The safe bound is
$$
|i(t)-i_m|\le\epsilon_i+L_i\int_0^{T_a}|k(a)|(t-t_b+a)\,da.
$$
Normalization alone does not justify replacing this by a mean age. For the two-tap estimate $i_m=2i(t_b)-i(t_b-T_a)$, the weighted timestamp lies in the future, but the estimate is not a future measurement. At $t=t_b$, the general bound is $L_iT_a$ before sensor error, and a current ramp can attain it. A naive negative-age bound would give a false certificate.

A proposed validation applies known ramps and switching waveforms while recording the acquisition weighting, timestamps and independent current trace. Test the claimed derivative and sensor-error bounds over the whole contributing history. Infinite-memory filters require a bounded contribution from the unobserved tail or a justified history assumption. A successful certificate excludes a zero under its assumptions; a failed one leaves the interval undecided rather than proving a sign reversal.