Next Article in Journal
Raman Lasing and Transverse Mode Selection in a Multimode Graded-Index Fiber with a Thin-Film Mirror on Its End Face
Previous Article in Journal
Influence of Y2O3 Doping on Phase Evolution and Dielectric Characteristics of ZrO2 Ceramics
Previous Article in Special Issue
Temperature Compensation for MEMS Accelerometer Based on a Fusion Algorithm
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Dual-Model Derailment Detection Algorithm Based on Variational Bayesian Kalman Filtering

1
School of Instrumentation Science and Engineering, Harbin Institute of Technology, Harbin 150001, China
2
School of Astronautics, Harbin Institute of Technology, Harbin 150001, China
3
China Ship Research and Development Academy, Beijing 100101, China
*
Author to whom correspondence should be addressed.
Micromachines 2024, 15(8), 939; https://doi.org/10.3390/mi15080939 (registering DOI)
Submission received: 14 June 2024 / Revised: 15 July 2024 / Accepted: 21 July 2024 / Published: 23 July 2024
(This article belongs to the Special Issue MEMS Sensors and Actuators: Design, Fabrication and Applications)

Abstract

:
A derailment detection algorithm for railway freight cars based on micro inertial measurement units was designed to address the complex issue of the disassembly and assembly of derailment braking devices. Firstly, a horizontal attitude measurement model for freight cars was established, and attitude measurement algorithms based on gyroscopes and accelerometers were introduced. Subsequently, a high-precision attitude measurement algorithm based on variational Bayesian Kalman filtering was proposed, which used acceleration information as the observation data to correct attitude errors. In order to improve the accuracy of derailment detection, a dual-model instantaneous attitude difference measurement technique was further proposed. In order to verify the effectiveness of the algorithm, offline data from simulation experiments and in-vehicle experiments were used to validate the proposed algorithm. The results showed that the proposed algorithm can effectively improve the measurement accuracy of horizontal attitude changes, reducing the error by 89% compared to pure inertial attitude calculation, laying a technical foundation for improving the accuracy of derailment detection.

1. Introduction

With the development of railway technology in China, the demand for freight trains is increasing day by day. As the service time of the railway line increases, the occurrence of long-wave irregularities in the track becomes increasingly common. Its characteristics are complex mechanisms and a wide range of wavelengths, such as simple supported beam deformation, roadbed settlement, bridge deflection deformation, etc. It may also exist at changes in the slope of the railway line, switch areas, road bridge junctions, etc. This situation increases the risk of the derailment of freight trains.
At present, the derailment braking device of existing freight trains is mechanically operated, which collects derailment information by gripping the axle with a pull ring and top beam, as shown in Figure 1. Its function is reliable, but it requires a large amount of work to remove (install) the pull ring during vehicle maintenance and is an emergency response after vehicle derailment, and it does not have the function of preventing and controlling vehicle derailment in advance. The method proposed in the manuscript is to detect derailment by measuring the horizontal attitude angle. When the train is about to derail, the horizontal attitude changes. By collecting experimental data and setting reasonable thresholds, early braking can be applied when there is a significant change in horizontal attitude to prevent and control freight train derailment and reduce losses.
With the development of information technology and its deepening integration with traditional mechanical technology, the early prevention and control of vehicle derailment is becoming possible. In addition, the safety of railway transportation in the new era is receiving increasing attention. In order to further improve the safety of railway freight train operation, build a platform for the development of vehicle derailment early prevention and control technology, and resolve the concern of users to reduce the workload of lifting (dropping) trains, conducting research on the new generation of railway freight train derailment braking device technology based on information technology is of great significance for the safe operation of freight trains.
We propose a new derailment detection device based on horizontal attitude, which installs four inertial measurement units, one control storage computer, one electrically controlled exhaust valve, and a battery on each freight train. The inertial measurement unit is installed on the train bogie (as shown in Figure 2), connected to the control storage computer through the CAN port, and sends measured acceleration and angular velocity information; we control the storage computer to receive acceleration and angular velocity information. Firstly, we use the initial alignment algorithm to obtain the initial pitch angle and roll angle. Then, combined with real-time data, we use the attitude update algorithm to calculate the horizontal attitude information online. Based on the preset threshold, we determine whether the current train is in a derailment state. If it is determined that it is about to derail, we send a command to the electric control exhaust valve. After receiving the command, the electric control exhaust valve performs train braking.
When a freight train derails, the wheels instantly land, causing a significant change in the horizontal attitude in a short period of time. The core of using information technology for derailment detection and braking lies in how to conduct a high-precision horizontal attitude measurement. Due to cost reasons, using high-precision inertial navigation systems to detect horizontal attitude information is unrealistic. The freight train targeted by our designed device does not have power in actual scenarios, and batteries need to be used to power the device. Therefore, the method in this paper mainly focuses on train derailment detection in low-cost and low-power scenarios. Therefore, it is of great engineering significance to utilize low-cost and high-precision MEMS inertial measurement units to achieve a high-precision horizontal attitude information measurement.
Due to the large bias of low-cost MEMS gyroscopes, attitude estimation cannot be provided separately. MEMS accelerometers are usually packaged together with gyroscopes to form inertial measurement units (IMUs). The three-axis accelerometer measures the gravitational force of acceleration, and the horizontal attitude can be determined by the component of the gravity vector on the horizontal axis. However, even under very stable conditions, there is still a lot of noise in the horizontal attitude measured by the accelerometer [1,2,3,4]. Therefore, complementary filters or Kalman filters are used to fuse these two sensors to overcome their respective shortcomings and obtain an overall accurate attitude estimation [5,6,7]. This fusion works well in static or quasi-static states because the accelerometer readings are dominated by gravitational acceleration, but under dynamic conditions, the accelerometer also measures linear or external acceleration, making its measurement results unsuitable for attitude determination. The compensation for this external acceleration must be conducted in some way to extract the gravity acceleration measurement and determine the attitude. Only in this way can it be integrated with gyroscope estimation. Another meaning of this issue is that it is not possible to use an accelerometer to measure the acceleration of a truck, as it also measures gravitational acceleration.
In order to accurately estimate attitude using MEMS, researchers have studied various adaptive algorithms using acceleration and magnetometer measurements. In the early stage, adaptation decisions were made by comparing the accelerometer norm, magnetometer norm, and tilt angle with their reference values [8]. Article [9] implements fuzzy rules for detecting acceleration and adjusting measurement covariance in an attitude reference frame. Some articles also propose the modeling of acceleration or magnetometer disturbances [10,11,12]. Suh proposed an adaptive rule that uses eigenvalues and vectors to calculate the correct innovation covariance using non-negative measurement covariance angles [13]. In terms of finding the fitness coefficient for measuring covariance, an algorithm for minimizing the Frobenius norm of innovative covariance was also proposed [14]. Li and Wang propose an adaptive algorithm that divides acceleration conditions into three stages: uniform motion, low-acceleration motion, and high-acceleration motion [15].
The current research has effectively improved the accuracy of attitude measurement, but the accuracy is still insufficient to meet the requirements for detecting vehicle derailment. Therefore, this article proposes a dual-model derailment detection algorithm based on variational Bayesian filtering. The variational Bayesian algorithm is used to approximate and infer the time-varying parameters of the Kalman filtering model. While recursively estimating the state, the adaptive filtering suppresses the influence of motion acceleration on attitude estimation, which can also track the changing noise variance and update the introduced degree of freedom parameters, thereby enhancing robustness. On this basis, a dual-model algorithm based on variational Bayesian Kalman filtering for attitude estimation and pure inertial attitude update is designed to address the characteristics of freight train derailment. The error of pure inertial attitude update is regularly corrected, and the attitude change of pure inertial solution in a short period of time is used to determine whether the freight train derails.
The main contributions of this article include the following: ① an attitude estimation algorithm based on a variational Bayesian Kalman filter using a variational Bayesian algorithm was designed to address the issue of the impact of freight train acceleration and deceleration on the accuracy of the horizontal attitude measurement; ② a dual-model relative horizontal attitude measurement derailment detection algorithm was designed for the special scenario of freight train derailment during the derailment cycle.

2. Related Work

2.1. Gyroscope-Based Attitude Update Algorithm

We choose the “E-N-U” geographic coordinate system as the navigation reference coordinate system for the derailment detection system, denoted as the n frame. Therefore, the attitude differential equation using the n frame as the reference system is
C ˙ b n = C b n ( ω n b b × )
where the matrix C b n represents the attitude matrix of the body frame (b frame) relative to the n frame (which can be converted to attitude angle). Since the output of the gyroscope is the angular velocity of the b frame with respect to the inertial coordinate system (i frame), and the angular velocity information ω n b b cannot be obtained by direct measurement, it is necessary to transform differential Equation (1) as follows:
C ˙ b n = C b n [ ( ω i b b ω i n b ) × ] = C b n ( ω i b b × ) C b n ( ω i n b × ) = C b n ( ω i b b × ) ( ω i n n × ) C b n
where ω i n n denotes the rotation of the navigational system with respect to the inertial frame, which consists of two parts, the rotation of the navigational system caused by the rotation of the Earth and the rotation of the n frame due to the curvature of the Earth’s surface as the system moves near the Earth’s surface, i.e., there is ω i n n = ω i e n + ω e n n , where
ω i e n = 0 ω i e cos L ω i e sin L T
ω e n n = v N R M + h v E R N + h v E R N + h tan L T
where ω i e is the angular rate of rotation of the Earth, and L and h are the geographic latitude and altitude, respectively.
The initial value of the attitude is obtained by the initial alignment algorithm, which is not described in this paper. When the attitude is calculated by Equation (2) with the initial alignment already in place, the error in angular velocity ω i b b measured by the low-cost MEMS gyroscope accumulates over time, resulting in a gradually larger attitude error.

2.2. Accelerometer-Assisted Horizontal Attitude Estimation Algorithms

In the absence of maneuvering, the input to the accelerometer in the navigational coordinate system is [ 0 , 0 , - g ] T ( g is the acceleration due to gravity), then there are
f x b f y b f z b = g sin θ g cos θ sin γ g cos θ cos γ
The pitch θ and roll γ angles can be obtained as
θ = arcsin f x b g γ = arctan f y b f z b
where [ f x b f y b f z b ] T is the measured value of the accelerometer in the b frame.
When the platform is maneuvering, the accelerometer measurements include not only the gravitational acceleration, and at this time, there is a large error in solving the attitude using Equation (6).
The attitude angle calculated by the accelerometer when the freight train is accelerating or decelerating does not truly reflect the attitude of the vehicle; the attitude angle solved by the gyroscope has high accuracy in the short term, but in the long term, due to the drift and integration operations, the calculated attitude angle generates cumulative errors. Therefore, it is necessary to fuse these two kinds of attitude angles to obtain an accurate attitude angle.

3. Derailment Detection Algorithm Based on Attitude Measurement

3.1. Variational Bayesian Algorithm

The variational Bayesian (VB) algorithm is an approximation algorithm used to find the joint a posteriori probability density, which utilizes known model information, observation information, and a priori information to obtain an approximate solution to the joint a posteriori probability density of the state vector and unknown parameters. The core idea is to approximate the true joint a posteriori probability density p(X, θ |Z) by the easy-to-find and relatively free-form joint probability density, where X denotes the unknown state vector, θ denotes the unknown parameter, and Z denotes the observation vector.
The joint state and unknown parameter inference problem based on the VB algorithm can be expressed as the following optimization problem:
q ( X ) , q ( θ ) = arg min K L D ( q ( X ) q ( θ ) | | p ( X , θ | Z ) ) s . t . q ( X ) d X = 1 , q ( θ ) d θ = 1
K L D ( q ( X ) q ( θ ) | | p ( X , θ | Z ) ) = q ( X ) q ( θ ) log q ( X ) q ( θ ) p ( X , θ | Z ) d X d θ
Since the true joint posterior probability density is unknown, it is not possible to solve the minimization problem in Equation (7) analytically, and it is necessary to introduce a negative free energy function, and the log-likelihood function can be computed as follows using Bayesian formulas:
log p ( Z ) = log p ( X , θ , Z ) p ( X , θ | Z ) = q ( X ) q ( θ ) log p ( X , θ , Z ) p ( X , θ | Z ) = F ( q ( X ) , q ( θ ) ) + K L D ( q ( X ) q ( θ ) | | p ( X , θ | Z ) )
where log p ( Z ) denotes the log-likelihood function and F ( q ( X ) , q ( θ ) ) denotes the negative free energy function.
It is processed using Bayes’ theorem and the normalization property of density:
F ( q ( X ) , q ( θ ) ) = q ( X ) q ( θ ) log p ( X , θ , Z ) q ( X ) q ( θ ) d X d θ = q ( X ) q ( θ ) log p ( X , θ , Z ) d X d θ q ( X ) q ( θ ) log q ( X ) q ( θ ) d X d θ = q ( X ) q ( θ ) log p ( X , θ , Z ) d X d θ q ( X ) log q ( X ) d X q ( θ ) log ( q ( θ ) ) d θ
Since log p (Z) is a constant independent of q(X) and q( θ ), the problem of minimizing the distance to KL can be transformed into a problem of maximizing F ( q ( X ) , q ( θ ) ) . The optimal solutions q(X) and q(θ) can be found by defining the logarithmic density functions log p ˜ ( X ) and log q ˜ ( θ ) .
log p ˜ ( X ) and log q ˜ ( θ ) are defined as follows:
log p ˜ ( X ) = q ( θ ) log p ( X , θ , Z ) d θ + c X , s . t . p ˜ ( X ) d X = 1
log p ˜ ( θ ) = q ( X ) log p ( X , θ , Z ) d X + c θ , s . t . p ˜ ( θ ) d θ = 1
The optimal solutions q(X) and q(θ) satisfy the following equations:
log q ( φ ) = E Θ ( φ ) [ log p ( X , θ , Z ) ] + c φ , s . t . q ( φ ) d φ = 1 Θ { X , θ }
where Θ denotes the set consisting of state vectors and unknown parameters; φ Θ denotes any element in the set Θ ; Θ ( φ ) denotes the element remaining in set Θ after removing element φ ; q ( φ ) denotes the approximate posterior probability density of φ ; and E x denotes the expectation operation with respect to the posterior density q(x) of random variable x.
Since the state vectors and the unknown parameters are coupled with each other, a non-moving point iteration is chosen to solve Equation (13) to obtain the local optimal solution of q ( φ ) . The solution of Equation (13) is based on the state vectors and the unknown parameters.

3.2. Horizontal Attitude Estimation Algorithm Based on Variational Bayesian Kalman Filtering

3.2.1. System Model

The discrete-time system for horizontal attitude estimation used in railroad freight train derailment detection is denoted as
x k + 1 = F k x k + w k z k + 1 = H k x k + 1 + v k + 1
where k is the sampling time, x k + 1 n is the state vector, and F k n × n is the state transfer matrix. z k + 1 m is the measure vector. H k + 1 m × n is the measurement matrix, and n and m are the dimensions of the state vector and measurement vector, respectively. w k is the process noise and v k + 1 is the measurement noise. The process noise obeys a Gaussian distribution.
p ( w k ) = N ( w k ; 0 n , Q k )
where p(·) denotes the probability density function and N ( w k ; 0 n , Q k ) denotes a Gaussian distribution with mean 0 n and covariance Q k .
We choose the horizontal misalignment angle and gyro zero-bias error as state variables and the horizontal component of the acceleration information measured by the accelerometer in the n frame as the measure variable, so the following applies:
x k = ϕ x ϕ y ε x ε y ε z T z k = f x n f y n T
where ϕ x denotes the eastward misalignment angle, ϕ y denotes the northward misalignment angle, ε x , ε y , ε z denotes the gyro drift in the x, y, and z axes, and f x n , f y n denotes the eastward and northward acceleration information.
The state transfer matrix can be expressed as
F k = 1 0 C b n ( 1 ) H n 0 1 C b n ( 2 ) H n 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1
where C b n ( 1 ) denotes the first row of matrix C b n , C b n ( 2 ) denotes the second row of matrix C b n , and Hn denotes the sampling period.
The measurement matrix can be expressed as
H k = 0 g 0 0 0 g 0 0 0 0
where g denotes the acceleration of gravity.

3.2.2. Variational Bayesian Kalman Filter

In the variational Bayesian Kalman filter (VBKF) algorithm, the mutually independent state variables x k and the measurement noise covariance R k are used as random variables, i.e., parameters to be estimated.
At the k − 1 observation moment, the prediction process can be defined as follows, assuming that the prior distribution of the joint probability density function of the state variable and the measurement noise covariance is the product of a Gaussian distribution and an inverse Wishart distribution:
p ( x k , R k | z 1 : k ) = p ( x k | z 1 : k ) p ( R k | z 1 : k ) = N ( x k 1 | x ^ k | k 1 , P k | k 1 ) IW ( R k | v ^ k | k + 1 , V ^ k | k 1 )
where the inverse Wishart distribution probability density function IW(·) is defined as
IW ( R | v , V ) = V v / 2 2 v d / 2 Γ d v 2 R v + d + 1 / 2 e 1 2 tr V R 1
where R is a symmetric positive definite random matrix; the distribution parameter v is the degrees of freedom parameter; V is a symmetric positive definite matrix; d is the dimension of R; Γ n · denotes the multivariate gamma function; and tr[·] is the trace of the sought matrix.
In the process of variational updating, the true posterior probability distribution p ( x k , R k | z 1 : k ) is approximated as the product of q x ( x k ) = N ( x k , P k ) obeying a Gaussian distribution and q R ( R k ) = IW ( R k | v k , V k ) obeying an inverse Wishart distribution according to the standard variational Bayesian algorithm, and the KL distance between the true distribution and the approximated distribution is computed iteratively to infer the optimal estimated value of the parameter to be evaluated, and the scatter function KL(·) is defined as
K L q x ( x k ) q R ( R k ) | | p ( x k , R k | z k ) = q x ( x k ) q R ( R k ) × ln q x ( x k ) q R ( R k ) p ( x k , R k | z k ) d x k d R k
An important derivation of the variational updating process is specified as
K L q x ( x k ) q R ( R k ) | | p ( x k , R k | z k ) = q x ( x k ) q R ( R k ) × ln q x ( x k ) q R ( R k ) p ( x k , R k | z k ) d x k d R k ln q ( i + 1 ) ( R k ) = C 0.5 ( m + v ^ k | k + 1 + 2 ) ln R k 0.5 tr ( ( E ( i ) z k H k x k ) )
where q(i) (·) denotes the approximate probability distribution of q(·) at the ith iteration, C is a constant independent of the form of the distribution, and m is the dimension of the observed real matrix. Further, the expectation part of Equation (22) is defined as T k ( i ) and expanded as
T k ( i ) = E ( i ) z k H k x k z k H k x k T = z k H k x ^ k i z k H k x ^ k i T + H k P k i H k T
It is easy to see that q ( i + 1 ) ( R k ) obeys a new form of inverse Wishart distribution, i.e., q ( i + 1 ) ( R k ) = IW ( R k | v ^ k ( i + 1 ) , V ^ k ( i + 1 ) ) , with distribution parameters v ^ k ( i + 1 ) and V ^ k ( i + 1 ) , respectively:
v ^ k ( i + 1 ) = v ^ k | k 1 + 1 V ^ k ( i + 1 ) = V ^ k | k 1 + T k i
Similarly, the logarithmic expression of the approximate distribution of the state of the system takes the following form:
ln q ( i + 1 ) ( x k ) = 0.5 ( z k H k x k ) T E ( i + 1 ) [ R k 1 ] ( z k H k x k ) 0.5 ( x k x ^ k | k 1 ) T P k | k 1 1 ( x k x ^ k | k 1 ) ) + C = 0.5 x k T P k | k 1 1 + H k T R ^ k i + 1 H k x k + x k T [ P k | k 1 1 x ^ k | k 1 + H k T R ^ k i + 1 z k ] + C
where R ^ k i + 1 = E ( i + 1 ) [ R k 1 ] 1 = ( v k i + 1 m 1 ) 1 V k i + 1 . Since q(xk) obeys a Gaussian distribution, i.e., q ( x k ) = N ( x k | x ^ k , P k ) , the control gain K k i + 1 , the system state x ^ k i + 1 , and the state covariance P k i + 1 in the variational measurement update are corrected as follows:
K k i + 1 = P k | k 1 H k T ( H k P k | k 1 H k T + R ^ k ( i + 1 ) ) 1 x ^ k i + 1 = x ^ k | k 1 + K k i + 1 ( z k H k x ^ k | k 1 ) P k i + 1 = ( x ^ K k i + 1 H k ) P k | k 1
From the above derivation and analysis, it can be seen that Equations (23), (24) and (26) constitute the implicit solution of the variational updating equation, and the optimal estimation of the parameter to be estimated at time k can be obtained by using the expectation–maximization algorithm for repeated iterative calculations.

3.3. Dual-Model Relative Horizontal Attitude Measurement Derailment Detection Algorithm

The height of the railroad track is generally less than 200 mm, and the length of each car in a railroad freight train is generally less than 25 m. The change in derailment time t and derailment pitch angle Δ θ can be expressed as follows:
t = 2 h g 0.4 9.8 = 0.202 s Δ θ = 0.2 25 = 0.008 rad 0.46 °
Therefore, the derailment time of the freight train is very short, and we can judge whether it is derailed or not by accurately measuring the attitude change within 0.3 s. Because the acceleration and deceleration process of the railroad freight train has a great influence on the horizontal component of the n-system horizontal acceleration, the filtering results have up and down fluctuations during acceleration and deceleration, and this fluctuation affects the judgment of train derailment. Therefore, this thesis proposes a dual-model derailment detection algorithm, using the gyroscope to calculate the attitude angle of a short period of time with high accuracy, so the use of this purely inertial attitude-solving algorithm is to calculate Δ θ , to determine whether it is greater than the set threshold for derailment detection σ , and, through variational Bayesian Kalman filtering, to periodically correct the purely inertial solving results to protect its long-term measurement accuracy, and the specific process shown in Figure 3.

4. Experiments

In order to verify the effectiveness of the algorithm proposed in this paper in processing real data, the on-board experimental data are utilized for offline processing and analysis. Due to the condition limitation, the on-board experiment utilizes an unmanned vehicle instead of a freight train and uses IMU with a gyro zero bias of 10°/h and an accelerometer zero bias of 0.2 mg for testing. The test uses a high-precision fiber optic gyro inertial navigation system as the attitude reference, and the equipment in the test is shown in Figure 4. The experimental trajectory includes turning, acceleration, deceleration and other scenarios, so we can verify the effectiveness of the method.
The experimental setup utilized MEMS gyroscope parameters as detailed in Table 1. The onboard vehicle experiment aimed to simulate the experimental conditions described in the third section. The unmanned vehicle traversed over stepped and bumpy road segments to simulate train derailment phenomena for experimental testing. Data collected from these experiments were processed accordingly.
The experiment time is 1875 s. The results of pure inertial attitude solving relying only on the gyroscope are shown in Figure 5. The reference value in Figure 5 is the horizontal attitude information measured by the high-precision inertial navigation system. The horizontal attitude measurement error is less than 0.05 degrees, which can meet the requirements of the measurement process for the reference value.
From Figure 5, it can be seen that the pure inertial attitude solution using gyroscopes is significantly different from the attitude reference, and further calculation of the error is shown in Figure 6.
From Figure 6, it can be seen that the pure inertial attitude solving error of the IMU in the test is very large, and the maximum error reaches −5°. In the first 200 s of which there is no movement of the cart, the error disperses with time, and later, due to the movement of the cart and the turn, the two horizontal misalignment angle errors are coupled to affect the attitude angle errors, resulting in the conclusion that the attitude angle error does not appear to exhibit a smooth change.
The error in the amount of horizontal attitude angle change for the purely inertial attitude solution in 0.3 s is shown in Figure 7.
In Figure 7, the pure inertial attitude-solving algorithm reaches an error of 0.6° in the amount of pitch angle change and roll angle change, and the following results of our offline solving using Kalman filter (KF) and VBKF attitude estimation algorithms are shown in Figure 8 and Figure 9.
From Figure 9, it can be seen that the attitude solution using VBKF can significantly improve the attitude measurement accuracy compared with the pure inertial solution. Meanwhile, the pitch error of the KF attitude measurement algorithm is 0.776°, the roll error of the KF attitude measurement algorithm is 0.986°, the pitch error of the VBKF attitude measurement algorithm proposed in this paper is 0.521°, and the roll error of the VBKF attitude measurement algorithm proposed in this paper is 0.490°. The two algorithms whose pitch angle changes in 0.3 s compared with the reference frame are shown in Figure 10.
From Figure 10, it can be seen that the errors of the KF attitude measurement algorithm in pitch angle change and roll angle change within 0.3 s are 0.491° and 0.209°, respectively. The errors of our proposed VBKF attitude measurement algorithm in pitch angle change and roll angle change within 0.3 s are 0.277° and 0.073°, respectively, which is a nonnegligible error for Δ θ and can easily cause a misjudgment of the derailment detection threshold. We further validate the dual-model relative horizontal attitude measurement algorithm, and the results of the relative pitch angle change amount calculation within 0.3 s using the VBKFDM algorithm are shown in Figure 11 and Figure 12.
As can be seen in Figure 12, it can be seen that the pitch angle change error and roll angle change error within 0.3 s calculated by our proposed VBKFDM algorithm are 0.065° and 0.073°, respectively, which are much smaller than the horizontal attitude change when the train derails, and can meet the requirements of train derailment measurement.

5. Conclusions

This article studies a derailment detection method for railway freight trains based on micro inertial measurement units, designs a variational Bayesian Kalman filter (VBKF) attitude estimation algorithm, and proposes a pure inertial dual model coupled with VBKF to calculate the change in horizontal attitude angle during the derailment detection period. We finally validated the effectiveness of the algorithm proposed in this paper through in-vehicle testing. The maximum error of the pitch angle change calculated by the VBKFDM algorithm within 0.3 s is 0.073°, which is 85% smaller than the maximum error of the KF algorithm at 0.491°.
The algorithm proposed in this paper has wide applicability, and its measurement accuracy can meet the needs of derailment detection, which has important engineering significance.

Author Contributions

S.F. and Y.Z. designed the research; X.G. and H.C. performed experiments; S.F. and X.G. wrote this article; and G.Y. and Q.H. performed review & Editing. All authors have read and agreed to the published version of the manuscript.

Funding

This work was supported in part by the National Natural Science Foundation of China under Grant 52071121 and Grant 52271311, and in part by the Heilongjiang Postdoctoral Fund LBH-Z22161, and in part by the Aeronautical Science Foundation ASFC-2022Z022077002.

Data Availability Statement

The original contributions presented in the study are included in the article, further inquiries can be directed to the corresponding author.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Chang, L.; Qin, F.; Zha, F. Pseudo Open-Loop Unscented Quaternion Estimator for Attitude Estimation. IEEE Sens. J. 2016, 16, 4460–4469. [Google Scholar] [CrossRef]
  2. Tuck, K. Tilt Sensing Using Linear Accelerometers; Technical Report AN3107; Freescale Semicond: Austin, TX, USA, 2007. [Google Scholar]
  3. Park, M.; Gao, Y. Error analysis and stochastic modeling of low-cost MEMS accelerometer. J. Intell. Robot. Syst. 2006, 46, 27–41. [Google Scholar] [CrossRef]
  4. Liu, S.Q.; Zhu, R. A Complementary Filter Based on Multi-Sample Rotation Vector for Attitude Estimation. IEEE Sens. J. 2018, 18, 6686–6692. [Google Scholar] [CrossRef]
  5. Fourati, H.; Manamanni, N.; Afilal, L.; Handrich, Y. A Nonlinear Filtering Approach for the Attitude and Dynamic Body Acceleration Estimation Based on Inertial and Magnetic Sensors: Bio-Logging Application. IEEE Sens. J. 2011, 11, 233–244. [Google Scholar] [CrossRef]
  6. Lefferts, E.J.; Markley, F.L.; Shuster, M.D. Kalman filtering for spacecraft attitude estimation. J. Guid. Control Dyn. 1982, 5, 417–429. [Google Scholar] [CrossRef]
  7. Ahmed, H.; Tahir, M. Terrain-based vehicle localization using low cost MEMS-IMU sensors. In Proceedings of the 2016 IEEE 83rd Vehicular Technology Conference (VTC Spring), Nanjing, China, 15–18 May 2016; pp. 1–5. [Google Scholar]
  8. Sabatini, A.M. Quaternion-based extended Kalman filter for determining orientation by inertial and magnetic sensing. IEEE Trans. Biomed. Eng. 2006, 53, 1346–1356. [Google Scholar] [CrossRef] [PubMed]
  9. Kang, C.W.; Park, C.G. Attitude estimation with accelerometers and gyros using fuzzy tuned Kalman filter. In Proceedings of the 2009 European Control Conference (ECC), Budapest, Hungary, 23–26 August 2009; pp. 3713–3718. [Google Scholar]
  10. Sabatini, A.M. Variable-state-dimension Kalman-based filter for orientation determination using inertial and magnetic sensors. Sensors 2012, 12, 8491–8506. [Google Scholar] [CrossRef] [PubMed]
  11. Sabatini, A.M. Estimating three-dimensional orientation of human body parts by inertial/magnetic sensing. Sensors 2011, 11, 1489–1525. [Google Scholar] [CrossRef] [PubMed]
  12. Lee, J.K.; Park, E.J.; Robinovitch, S.N. Estimation of attitude and external acceleration using inertial sensor measurement during various dynamic conditions. IEEE Trans. Instrum. Meas. 2012, 61, 2262–2273. [Google Scholar] [CrossRef] [PubMed]
  13. Suh, Y.S. Orientation estimation using a quaternion-based indirect Kalman filter with adaptive estimation of external acceleration. IEEE Trans. Instrum. Meas. 2010, 59, 3296–3305. [Google Scholar] [CrossRef]
  14. Yu, M.-J. INS/GPS integration system using adaptive filter for estimating measurement noise variance. IEEE Trans. Aerosp. Electron. Syst. 2012, 48, 1786–1792. [Google Scholar] [CrossRef]
  15. Li, W.; Wang, J. Effective adaptive Kalman filter for MEMSI-MU/magnetometers integrated attitude and heading reference systems. Navigation 2013, 66, 99–113. [Google Scholar] [CrossRef]
Figure 1. Freight train derailment detection and braking device.
Figure 1. Freight train derailment detection and braking device.
Micromachines 15 00939 g001
Figure 2. Diagram of derailment detection system components and installation.
Figure 2. Diagram of derailment detection system components and installation.
Micromachines 15 00939 g002
Figure 3. Dual-model derailment detection algorithm flow.
Figure 3. Dual-model derailment detection algorithm flow.
Micromachines 15 00939 g003
Figure 4. Diagram of the experimental equipment.
Figure 4. Diagram of the experimental equipment.
Micromachines 15 00939 g004
Figure 5. Pure inertial attitude solution results.
Figure 5. Pure inertial attitude solution results.
Micromachines 15 00939 g005
Figure 6. Pure inertial attitude solution error.
Figure 6. Pure inertial attitude solution error.
Micromachines 15 00939 g006
Figure 7. Error in the amount of horizontal attitude angle change in 0.3 s of purely inertial solution algorithm.
Figure 7. Error in the amount of horizontal attitude angle change in 0.3 s of purely inertial solution algorithm.
Micromachines 15 00939 g007
Figure 8. KF and VBKF algorithm attitude solution results.
Figure 8. KF and VBKF algorithm attitude solution results.
Micromachines 15 00939 g008
Figure 9. KF and VBKF algorithm attitude solution errors.
Figure 9. KF and VBKF algorithm attitude solution errors.
Micromachines 15 00939 g009
Figure 10. Error in the amount of horizontal attitude angle change in 0.3 s for KF and VBKF algorithms.
Figure 10. Error in the amount of horizontal attitude angle change in 0.3 s for KF and VBKF algorithms.
Micromachines 15 00939 g010
Figure 11. Amount of horizontal attitude angle change in 0.3 s for KF and VBKFDM algorithms.
Figure 11. Amount of horizontal attitude angle change in 0.3 s for KF and VBKFDM algorithms.
Micromachines 15 00939 g011
Figure 12. Error in the amount of horizontal attitude angle change in 0.3 s of VBKFDM algorithms.
Figure 12. Error in the amount of horizontal attitude angle change in 0.3 s of VBKFDM algorithms.
Micromachines 15 00939 g012
Table 1. Performance parameters of MEMS IMU.
Table 1. Performance parameters of MEMS IMU.
ParameterIndex
GyroMeasuring range±450°/s
Bias stability10°/s
Scale factor nonlinearity200 ppm
Cross coupling200 ppm
Bandwidth88.6 Hz@200 Hz
AccelerometerMeasuring range±8 g
Bias stability0.2 mg
Scale factor200 ppm
Cross coupling200 ppm
Vandwidth88.6 Hz@200 Hz
Electrical characteristicsVoltage5 ± 0.5 VDC
Power consumption0.3 W
Structural characteristicsSize38 × 24 × 11.5 mm
Weight20 g
Usage environmentOperating temperature−40 °C~+85 °C
Storage temperature−40 °C~+85 °C
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Fan, S.; Gao, X.; Zhang, Y.; Chen, H.; Yi, G.; Hao, Q. Dual-Model Derailment Detection Algorithm Based on Variational Bayesian Kalman Filtering. Micromachines 2024, 15, 939. https://doi.org/10.3390/mi15080939

AMA Style

Fan S, Gao X, Zhang Y, Chen H, Yi G, Hao Q. Dual-Model Derailment Detection Algorithm Based on Variational Bayesian Kalman Filtering. Micromachines. 2024; 15(8):939. https://doi.org/10.3390/mi15080939

Chicago/Turabian Style

Fan, Shiwei, Xu Gao, Ya Zhang, Huhe Chen, Guoxing Yi, and Qiang Hao. 2024. "Dual-Model Derailment Detection Algorithm Based on Variational Bayesian Kalman Filtering" Micromachines 15, no. 8: 939. https://doi.org/10.3390/mi15080939

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop