Accurate, low-latency estimates of the instantaneous phase of oscillations are essential for closed-loop sensing and actuation, including (but not limited to) phase-locked neurostimulation and other real-time applications. The endpoint-corrected Hilbert transform (ecHT) reduces boundary artefacts of the Hilbert transform by applying a causal narrow-band filter to the analytic spectrum. This improves the phase estimate at the most recent sample. Despite its widespread empirical use, the systematic endpoint distortions of ecHT have lacked a principled, closed-form analysis. In this study, we derive the ecHT endpoint operator analytically and demonstrate that its output can be decomposed into a desired positive-frequency term (a deterministic complex gain that induces a calibratable amplitude/phase bias) and a residual leakage term setting an irreducible variance floor. This yields (i) an explicit characterisation and bounds for endpoint phase/amplitude error, (ii) a mean-squared-error-optimal scalar calibration (c-ecHT), and (iii) practical design rules relating window length, bandwidth/order, and centre-frequency mismatch to residual bias via an endpoint group delay. The resulting calibrated ecHT achieves near-zero mean phase error and remains computationally compatible with real-time pipelines. Code and analyses are provided at https://github.com/eosmers/cecHT.
翻译:准确、低延迟的振荡瞬时相位估计对于闭环传感与驱动至关重要,包括(但不限于)锁相神经刺激及其他实时应用。端点校正希尔伯特变换(ecHT)通过对解析频谱施加因果窄带滤波器,减少了希尔伯特变换的边界伪影,从而改进了最新采样点的相位估计。尽管该方法已得到广泛的实际应用,但ecHT的系统性端点失真一直缺乏原理性的闭式分析。本研究通过解析推导得到ecHT端点算子,并证明其输出可分解为期望的正频率项(一个确定性的复增益,会产生可校准的幅值/相位偏差)和设定不可约方差底限的残余泄漏项。由此获得:(i)端点相位/幅值误差的显式表征与边界;(ii)均方误差最优的标量校准方法(c-ecHT);(iii)通过端点群延迟建立窗长、带宽/阶数与中心频率失配关系的实用设计准则。校准后的ecHT实现了接近零的相位平均误差,且计算复杂度仍与实时处理流程兼容。代码与分析详见https://github.com/eosmers/cecHT。