# Optimized Detection Algorithm for Vertical Irregularities in Vertical Curve Segments
## 2 Virtual Track Inspection Technology
### Inertial Reference Method  
Currently, the dynamic detection of track irregularities primarily relies on the inertial reference method [25]. This technique establishes a unified inertial reference using accelerometers, combined with distance sensors to capture the relative displacement between the detection system and the inertial reference, thereby calculating the track irregularity values. However, in practical measurements, the impact of track irregularities and dynamic  
Figure 1: Comprehensive vehicle multibody dynamics model.  
variations in track geometry can induce multi-degree-of-freedom movements in the detection system. This motion may misalign the accelerometer's sensitive axis with the inertial reference, introducing measurement errors. Therefore, it is essential to remove interference components from the accelerometer signals [26]. The response of the vertical accelerometer can be expressed as follows:  
\[\left\{\begin{array}{l}\alpha_{\mathrm{L}}=\frac{d^{2}z_{\mathrm{L}}}{dt^{2}}+ \mathrm{g}\cos\theta_{\mathrm{b}}\cos\psi_{\mathrm{b}}+\frac{1}{2}\mathrm{G} \frac{d^{2}\theta_{\mathrm{b}}}{dt^{2}}+v\omega_{\mathrm{z}}P\\ \alpha_{\mathrm{R}}=\frac{d^{2}z_{\mathrm{R}}}{dt^{2}}+\mathrm{g}\cos\theta_{ \mathrm{b}}\cos\psi_{\mathrm{b}}-\frac{1}{2}\mathrm{G}\frac{d^{2}\theta_{ \mathrm{b}}}{dt^{2}}+v\omega_{\mathrm{z}}P\\ P=\cos\theta_{\mathrm{b}}\sin\psi_{\mathrm{b}}\sin\varphi_{\mathrm{b}}-\sin \theta_{\mathrm{b}}\cos\sigma_{\mathrm{b}}\end{array}\right. \tag{2}\]  
where \(\alpha_{\mathrm{L}}\) and \(\alpha_{\mathrm{R}}\) represent the vertical acceleration measurements on the left and right sides, respectively; \(G\) is the horizontal distance between the left and right vertical accelerometers; \(\theta_{\mathrm{b}}\), \(\psi_{\mathrm{b}}\) and \(\varphi_{\mathrm{b}}\) denote the roll, pitch, and yaw angles of the detection beam; \(z_{\mathrm{L}}\) and \(z_{\mathrm{R}}\) are the absolute displacements of the left and right vertical accelerometers in inertial space; \(\mathrm{g}\) is the gravitational acceleration; and \(\omega_{z}\) represents the yaw angular velocity of the detection beam.  
The integrated displacement results, along with the measurements from the distance sensors, are mapped onto the corresponding track cross-section to obtain the left and right vertical irregularities, \(Z_{\mathrm{L}}\) and \(Z_{\mathrm{R}}\). The vertical irregularities calculated using Equation (3) are widely applied in track inspection systems, referred to in this study as the acceleration integration method. Where \(\theta_{\mathrm{s}}\) represents the roll angle of the detection beam relative to the track plane; \(\delta_{\mathrm{L}}\) and \(\delta_{\mathrm{R}}\) denote the vertical relative displacements between the left and right vertical accelerometers and their respective rails.  
\[\left\{\begin{array}{l}\theta_{\mathrm{s}}=\frac{\delta_{\mathrm{L}}-\delta _{\mathrm{R}}}{[500]}\\ Z_{\mathrm{L}}=\frac{1}{2}+\delta_{\mathrm{L}})\cos\theta_{\mathrm{s}}\cos \psi_{\mathrm{b}}\\ Z_{\mathrm{R}}=(z_{\mathrm{R}}+\delta_{\mathrm{R}})\cos\theta_{\mathrm{s}}\cos \psi_{\mathrm{b}}\end{array}\right. \tag{3}\]