## 3 The Dual-Line Approximation Method for Mitigating Anomalous Rotational Speeds  
Concurrently, during the experimental process, anomalous rotational speeds, significantly exceeding the surrounding average speed, were observed in the recorded speed data, as depicted in Figure 3. This indicates that random toothed disc runout, in addition to introducing macroscopic time-domain errors, also induces micro-level errors in the voltage signal, leading to the failure of the conventional zero-crossing detection method.  
Observation of local voltage signals reveals that to ensure the precision of torsional vibration measurements, a high sampling frequency is required [7,9]. However, under the compound motion of rotation and runout of the toothed disc, the voltage acquired by the sensor frequently fluctuates around the zero-voltage level within very short time intervals, as illustrated in Figure 4. Due to the brief duration between these anomalous points, the rotational speed calculated using the standard zero-crossing detection algorithm [9] becomes severely distorted, consequently hindering the torsional vibration measurement process.  
To overcome this issue of anomalous rotational speed calculation caused by toothed disc runout, this paper proposes a novel algorithm for extracting instantaneous rotational speed from the disturbed voltage signals. The dual-line approximation method, distinct from conventional zero-crossing sampling methods that strictly adhere to time-ordered calculations, differentiates data based on two parallel reference lines: a lower reference (base1) and an upper reference (base2). The principle of this partitioning is illustrated in Figure 5.  
Figure 3: Anomalous rotational speeds observed in the raw data (calculated using conventional zero-crossing detection) at various motor speeds (driving shaft input) with a 15\({}^{\circ}\) joint angle: (**a**) 200 RPM; (**b**) 300 RPM; (**c**) 400 RPM; (**d**) 500 RPM.  
During the processing, signals with potentials below the lower reference (base1) or above the upper reference (base2) are first filtered out. Subsequently, from the remaining data intended to capture a negative-to-positive zero-crossing, data points are monitored. The algorithm identifies the point immediately preceding the first detected transition from a negative to a positive potential; this preceding point is recorded as Point A. Similarly, for a positive-to-negative zero-crossing, data points are monitored, and the point immediately preceding the first detected transition from a positive to a negative potential is recorded as Point B. Lagrangian linear interpolation is then performed between Points A and B to determine Point C (the refined zero-crossing), thereby mitigating the influence of spurious data points between A and B. According to the interpolation theorem, this is given by  
\[t_{\text{C}}=t_{\text{A}}-V_{\text{A}}\frac{t_{\text{B}}-t_{\text{A}}}{V_{ \text{B}}-V_{\text{A}}} \tag{20}\]  
Thus, the algorithm achieves the extraction of zero-crossing time points from anomalous voltage signals, providing a reliable basis for rotational speed calculation. Compared to the traditional zero-crossing detection method, the dual-line approximation method effectively suppresses computational errors arising from voltage signal jitter around the  
Figure 4: Illustration of anomalous data points in the acquired voltage signal near the zero-crossing level due to toothed disc runout.  
Figure 5: Principle of the dual-line approximation method for identifying zero-crossing instants.  
zero-voltage level. This enhances the calculation precision of instantaneous rotational speed and exhibits superior computational efficiency when programmatically processing long sequences of voltage data.