1. Introduction
Heavy-haul railways have the characteristics of large capacity, high efficiency, low energy consumption, and low transportation costs and are widely valued by countries all over the world. They have been recognized internationally as the main direction of the development of railway bulk cargo transportation. For China, the United States, Canada, and other continental countries with vast territory, rich products, and uneven distribution of resources, the development of heavy-haul railways will help to rapidly increase transportation capacity, alleviate transportation bottlenecks, and improve transportation economic benefits.
Shuohuang Railway Line is a typical heavy-haul railway line, which is an important coal transportation line in the Chinese West Coal East Transport Project. Like other heavy-haul railway lines, although its driving plan is fixed, the line conditions are very complex, e.g., there are many long and steep downhills along the railway line. A driver of a heavy-haul train usually has to follow a predefined driving curve, which leads to great pressure on the drivers [
1,
2,
3].
Automatic train operation (ATO) has been widely used in urban rail transit systems, which realizes the complete automation of the work performed by train drivers and the highly centralized control of trains. Research shows that if the ATO system were to be applied to heavy-haul trains, the workload of the drivers would be greatly reduced, and the safety and operation efficiency would be greatly increased [
4].
At present, the research on the automatic driving of urban rail transit trains is very mature, and the relevant algorithms of train automatic control include PID classic control theory, genetic algorithm, fuzzy control theory, machine learning, and so on. Gruber and Bayoumi [
5] achieve curve tracking with the goal of minimizing the coupling force caused by disturbances such as slope. Hou [
6] introduced the TILC method to the automatic stopping of the train when entering the station and used the error of the terminal stop position during the previous braking process to update the current control curve. The authors of [
7] introduce GA to generate optimal idle control based on punctuality, comfort, and energy consumption.
Furthermore, many studies have introduced fuzzy control into the control of freight trains. Bonissone et al. synthesized a fuzzy controller to track the speed curve while driving smoothly within the speed limit and used genetic algorithms to adjust the parameters of the fuzzy controller (scaling factor and membership function) to optimize the performance of the fuzzy controller [
8]. Sekine [
9] uses a fuzzy controller to control the speed of coal trains during unloading operations to keep it constant. The literature shows that fuzzy controllers can be successfully applied to specific control tasks.
Based on the historical data of train stops, Bai [
10] modeled the latest status of train braking equipment and introduced fuzzy neural networks to realize intelligent control of freight train stops. Reinforced learning, as a variant of the Markov decision process [
11], also shows good characteristics in train control. Based on the channel characteristics of the CBTC communication system and real-time train position information, Zhu Li uses deep reinforcement learning to achieve joint optimization of communication performance and a train control strategy [
12]; based on transponder positioning information, Chen Dewang et al. modeled train control into multiple models. In the stage of the decision-making process, the reciprocal of the parking error is set as the return value, and reinforcement learning is introduced to solve the maximum return function [
13].
Yet, the research on autonomous driving of heavy-haul trains is relatively rare. Because heavy-haul trains do not have linear time-varying braking and traction systems, they cannot be described by PID control systems. At the same time, due to the flexible formation of heavy-haul trains, it is not possible to generalize the application of fuzzy control models. Machine learning has strong adaptability and a nonlinear processing ability and can learn characteristics of train operation data at different marshaling [
12,
14].
Thus, it becomes possible to apply machine learning in the intelligent driving of heavy-haul trains. However, there are still some problems to overcome, such as the possibility of being trapped in a local optimal solution, slow convergence speed, and ease of overfit. Therefore, this paper uses classification algorithms in data mining and machine learning to build a model of an intelligent heavy-haul train air braking system and to predict different driving strategies.
The main contributions of this paper are as follows:
A random forest algorithm is introduced to reduce the dimensionality of the characteristics of the heavy-haul train operation data.
An AdaBoost-based algorithm is designed to realize the intelligent control of the air brake of the heavy-haul trains.
We optimize the AdaBoost algorithm from two aspects: the extraction method of the training sample subset and the voting weight. Finally, the highly precise control of the air brake and the intelligent driving of heavy-haul trains are realized.
The rest of the paper is organized as follows.
Section 2 introduces the main procedures of the machine-learning-based heavy-haul train intelligent driving method. In
Section 3, we introduce the work of data pre-processing. Then, we use the random forest algorithm to extract features in
Section 4. In
Section 5, we propose the AdaBoost algorithm to build the heavy-haul train air braking model. Then, we present the numerical results in
Section 6 and finally make a conclusion in
Section 7.
2. Main Procedures of the Machine-Learning-Based Heavy-Haul Trains Intelligent Driving Method
Research shows that air braking mainly refers to several different amounts of decompression to control trains [
15]; this paper combines machine learning with classification algorithms in the heavy-haul train air braking intelligent control system. Machine learning processes generally include the following steps.
2.1. Modeling
First, the problems studied in this paper are turned into the mathematical model of machine learning. The intelligent control of heavy-haul trains can be divided into two parts: intelligent control of air braking and intelligent control of electric braking. The pressure values applied to the air brake are discrete; thus, this control process could be defined as a classification problem in machine learning.
2.2. Data Collection
In this paper, the relevant data on the route are collected from Shenchi South Station to Suning North Station of the Shuohuang Railway, including information on the train operation characteristics and line features.
2.3. Data Pre-Processing
In this step, we delete incorrect data from the collected data to make it easy to be calculated. In addition, in order to better supervise learning, the feature labels not collected need to be supplemented.
2.4. Feature Extraction
In order to improve the algorithmic performance, it needs to select the correct features for training and learning, and this paper completes feature extraction engineering by building, extracting, and selecting features in the original data set, which is a basic step of mining data in the field of machine learning. A total of 17 important features are selected in this paper.
2.5. Model Training and Optimization
This paper uses the classification learning algorithm to train the intelligent control model of heavy-haul trains. Firstly, we use the AdaBoost algorithm to learn the characteristic space of the train operating data, and then we adjust the data quantity and the parameters used in the algorithm, so as to optimize the model, and finally encapsulate the model. The processes are shown in
Figure 1.
3. Data Pre-Processing
The data collected from the heavy-haul trains contain errors and anomaly points, as well as random noise during acquisition, which can adversely affect the results. The static and dynamic data collected are not perfect enough, and the missing data must be supplemented. Therefore, the initial collected data need to be pre-processed, including data standardization and data complementation.
3.1. Data Analysis
Analysis of the initial data shows the collected information about the trains in
Table 1. This paper collected a total of 35 items of static line information, such as line slope, speed limit, and other information.
3.2. Data Complement
The cycle of data collection by on-board equipment is not uniquely determined but is triggered by events such as the different operating strategies or the different operating conditions. Thus, data omissions or loss may occur during the processes of collecting data, and they can be matched by asking for the average value of the location context data [
16,
17]. However, in practical applications, air brake decompression, the indicator closely related to air braking, is not collected and cannot be complemented by the above method. Therefore, we design a special algorithm to supplement it.
By studying the air braking system of heavy-haul trains, it can be known that when air braking is applied, the train tube will drain air. When the air brake is released, the air will slowly enter the train’s tube. Therefore, by calculating the pressure difference between the train cylinder in full air and in applied air brake, we will obtain the air brake decompression [
18]. The algorithm is shown in Algorithm 1.
Algorithm 1 An air brake decompression calculation method |
- 1:
set the threshold value for the presser drop of the train tube after the air brake is applied, threshold of train pipe pressure rises after the air brake is released, and the pressure change threshold after the train pipe pressure is stabilized - 2:
calculate the difference between the train tube pressure in this period and the adjacent period, compare with - 3:
ifthen - 4:
the train begins to apply air brake, record the time , turn to step 11 - 5:
else - 6:
no air brake is applied and go directly to the next judgment cycle - 7:
end if - 8:
continue to calculate the pressure difference between adjacent periodic pipes to determine the relationship between and - 9:
ifthen - 10:
the processes of air brake application are deemed to be over, record the time - 11:
calculate the air brake decompression , turn to step 17 - 12:
end if - 13:
continue to calculate the pressure difference between adjacent periodic pipes to determine the relationship between and - 14:
ifthen - 15:
start to release the air brake, record the time - 16:
confirm that to need to apply air brake, and mark as this air brake decompression amount of the sample data for this period - 17:
end if
|
3.3. Data Normalization
We collect a wide range of data, whose scales are at different levels, which will lead to disunity calculation, so the data need to be standardized at the same level. Then, the training speed and accuracy of the model will be improved.
We select the Z-score normalization algorithm, and the formula is shown in Formula (1):
where
is the mean of the sample data, and
is the standard deviation of the sample data.
3.4. Analysis of Unbalanced Data
Data unbalance refers to the large difference between the number of samples of one type and other types in the entire sample set. Samples can then be divided into majority and minority categories based on the sample size. Typically, when the ratio of the number of minority classes to majority classes is less than 1:2, this means that the data are unbalanced for the sample set [
19].
Figure 2 shows a map of the air brake applied by an expert driver between Shenchi South Station and Suning North Station. As can be seen from the figure, air braking is not required all the time while the train is operating, and it is needed only in a few cases, because air braking is applied only when the train speed cannot reduce to the speed limit by electric braking on a long downhill slope. In all the data, the ratio of samples with air brake output to samples without air brake output is 1:6, where the ratio of samples with 80 kPa of decompression to samples without air brake output is 1:15, so the data are seriously unbalanced.
For the classification of unbalanced datasets, in order to minimize the rate of misclassifying, general classifiers tend to focus on the classification effect of majority classes, while ignoring the classification effect of minority classes [
20].
In summary, although the need to apply air braking falls into a minority category, its failure can have serious safety problems, such as speeding, decoupling, and other major accidents, which will result in huge losses. Therefore, in view of the imbalance of train operation data, this paper designs a classifier that can highly and accurately identify majority and minority classes and realize the intelligent driving of heavy-haul trains.
5. AdaBoost-Based Intelligent Control Algorithm for Air Braking on Heavy-Haul Trains
5.1. AdaBoost Algorithm
Heavy-haul trains have strong inertia due to their large mass, so air brakes are used instead of electric brakes as the main braking force to ensure a short braking distance. Through the preliminary analysis of data, the decompression of the air brake is mainly concentrated among 40 kPa, 60 kPa, 80 kPa, 100 kPa, 120 kPa, and 140 kPa. In this paper, the intelligent control of the air brake of the heavy-haul trains is modeled as a multi-class problem. The different gears that do not need to apply the air brake and those that apply the air brake are used as class labels of the classifier, and the model outputs the operation strategies in different states through the extracted feature set to realize the intelligent control of the train air brake.
However, the trains do not need to apply air brakes most of the time during operation. When the trains are on a long downhill slope, the electric brake alone cannot control the train speed below the speed limit. At this time, the driver will consider applying the air brake. Such characteristics mean that the Shuohuang Railway operating data presents a typical imbalance with respect to the air brake output, among which the category of applying the air brake belongs to a minority category.
For such an unbalanced data set, the traditional classifier algorithm cannot achieve high-precision prediction of minority classes. Just as the random forest algorithm used in
Section 4 has a poor prediction effect, the scene that needs to output the air brake is misjudged as not needing to be applied, posing a major threat to the safe operation of trains. The AdaBoost algorithm has a high degree of recognition for unbalanced data sets. This paper introduces the AdaBoost algorithm into the intelligent control of the air brake of heavy-haul trains. AdaBoost is a kind of ensemble boosting algorithm, which constructs a strong classifier through several weak classifiers. The weak classifier here means that the performance of the classifier is better than the result of random prediction, that is, the accuracy of the classifier is more than 50%. The AdaBoost algorithm allows the weak classifier to continue to expand until the error rate reaches a certain set value.
AdaBoost is an iterative algorithm that first samples the training sample set by random sampling and then obtains different subsets. Then, it uses these different subsets to train different base classifiers and finally combines the base classifiers to obtain the final strong classifier through voting.
Since the samples are typically unbalanced data sets, and traditional classifier algorithms can only implement high-precision predictions for majority classes and ignore minority classes, an AdaBoost algorithm is adopted to solve this problem effectively.
AdaBoost needs to solve the problem through continuous iteration. The first step of the algorithm is random sampling. In the second step, we train the base classifier with each subset obtained from the samples. The third step is to obtain a strong classifier based on the weight combination of these base classifiers [
24]. The AdaBoost algorithm flow is shown in
Figure 5. The base classifier selected in this paper is the decision tree algorithm, which is a tree structure with multiple nodes, among which each internal node represents a test on a property, each branch represents a test output, each leaf node represents a category, and the last leaf node represents the final result. The classification results are obtained by training the data in the sample space and judging their characteristics.
The key issue of applying the decision tree algorithm is which feature in the data set plays a decisive role in node classification, that is, the selection of features at each non-leaf node. Therefore, each feature must be evaluated. This process is called the feature selection process of the algorithm. According to the difference of feature selection, commonly used decision tree algorithms include the C4.5 algorithm and CART algorithm. This paper applies these two algorithms to the study of air brake selection strategies for heavy-haul trains and selects a more suitable algorithm through comparison. The comparison and analysis of simulation results between C4.5 and CART are introduced in
Section 5.2.
5.2. Comparison and Analysis of Simulation Results between C4.5 and CART Algorithms
We use the C4.5 and CART algorithms to model the decompression amount applied to the air brake during the operation of the heavy-haul trains to realize its intelligent control. The air brake decompression volume is concentrated among 0 kPa, 40 kPa, 60 kPa, 80 kPa, 100 kPa, 120 kPa, and 140 kPa. Therefore, this article regards these seven category labels as the final air brake pressure reduction output decision Y. In addition, the 17 key features extracted in
Section 4 are selected as the feature set of the model
. In this way, an 18-dimensional array
composed of feature sets and class labels is obtained, 2/3 of the data in the array is randomly selected as the training sample set, and the remaining data are used as the test sample set to build two decision tree models.
The number of seven categories in the data set is shown in
Table 4. When randomly sampling the training sample set and the test sample set, randomly sample 2/3 of the data of each category as the training sample set to ensure the number of minority samples.
The C4.5 algorithm model and the CART algorithm model are obtained through the training of the training sample set for the two decision numbers, and the two models are used to predict the test data set. The verification results are for different air brake output prediction accuracy comparisons. As shown in
Figure 6, it can be seen that the accuracy of the two algorithms has a small difference. Due to the imbalance of the data, this indicator cannot fully evaluate the accuracy of the model.
The predicted recall rates of the two algorithms for different air brake outputs are shown in
Figure 7. From the figure, it can be seen that the recall rate of the CART algorithm is significantly higher than that of the C4.5 algorithm in the prediction of the need to output the air brake. That is, when air brakes need to be applied, CART’s predictive performance is better.
In addition to the above experimental results, in terms of execution efficiency, the C4.5 algorithm uses information gain rate selection features and makes judgments based on the entropy model of information theory. In the calculation process, a large number of logarithmic operations will be designed, and the computer consumes a lot of resources. Whether it is in the model training stage or the final use of the model to predict unknown data, there is a problem of low efficiency. The CART algorithm is more of a square operation, which is more efficient. It is possible that a single decision tree cannot reflect the difference in efficiency, but after a large number of decision trees are integrated through AdaBoost, the performance difference will be magnified, even reaching the level of tens of milliseconds. In the process of heavy-haul train operation, in order to make faster adjustments to the real-time environment and ensure the safety of train operation, the CART algorithm, as the base classifier, undoubtedly has higher execution efficiency.
In summary, the CART algorithm has obvious advantages over the C4.5 algorithm in terms of the prediction effect reflected by the experimental results and the execution efficiency of the theoretical analysis. Thus, we ultimately use the CART decision tree algorithm as the base classifier of the AdaBoost ensemble algorithm.
5.3. CART Model Building
The CART decision tree algorithm uses a binary split binary tree, which divides the data set by using a feature threshold and uses the Gini coefficient as an evaluation indicator when selecting the best split point [
25]. The Gini coefficient describes the purity of the data set: the larger the Gini coefficient, the less pure the data, and the smaller the Gini coefficient, the more uniform the data set. Each iteration of the CART algorithm produces a feature that reduces the Gini coefficient after the data are divided, so that the classification effect of the dataset is gradually enhanced. Assuming that the selected sample set
X has a total of
K kinds, and
is the number of the
category, the Gini coefficient expression of the sample can be shown in Formula (7).
In addition, when the CART algorithm classifies discrete features, it uses the classification criteria of whether the node is a discrete value [
26]. Therefore, for a dataset
X, the sample set is divided into
and
based on the value
m of the feature
M, and the Gini coefficient of the feature
M pair to the collection is shown as Formula (8), which is used as the basis for selecting a specific feature value.
The specific processes of the algorithm are shown as follows:
Initialize the Gini coefficient threshold and the number of samples threshold ;
If the Gini coefficient of the current node is more than , and the number of samples is more than , then return to the node and stop downward recursion;
Calculate the Gini coefficient of all feature values of each feature of the current node to the data set;
Select the feature value m corresponding to the smallest Gini coefficient and divide the data set into two parts, and , according to m, so as to establish left and right nodes.
Recursively call steps 1–3 to the left and right nodes to complete the establishment of the CART decision tree.
5.4. Modeling of Air Braking for Heavy-Haul Trains Based on the AdaBoost Algorithm
Through the research of the data, it is learned that the output of air brake pressure values falls in seven categories, including 0, 40, 60, 80, 100, 120, and 140 kPa, so we introduce the classification idea and consider the above category labels as the final air brake decompression output decision
Y. In addition, we select the 17 key features mentioned above, namely line slope, km mark, current train speed limit, next segment speed limit, train weight, train number, train speed, MA distance, train current speed and speed limit difference, electric traction/brake handle position, turning speed, turning radius, train distance from the next speed limit section starting distance, train pipe wind pressure value, sub-wind cylinder wind pressure, bending rate, and whether it is a bridge as a feature set
of the model. Thus, an 18-dimensional array
consisting of feature sets and class labels is obtained. The specific processes of modeling are shown as follows [
27,
28]:
Initialize the maximum number of iterations of the AdaBoost algorithm and the number of samples p of the training base classifier and set the maximum error rate threshold of the base classifier ;
Enter all sample data , among them ;
Initialize sample weights: ;
Randomly select P groups of sample data with the maximum value in the sample set Q and use this as the training sample set of the basic classifier trained in the current iteration cycle;
Use sample set P to train the CART decision tree ;
Calculate the error rate of the iterative period base classifier:
If , reduce the Gini coefficient threshold of the CART decision tree nodes by 0.01 and turn back to step 5;
Calculate the voting weight of the iterative period base classifier:
Update the sample weight D:
where
is the normalization constant;
, if , then turn to step 4; otherwise, turn to step 11;
Combine the base classifier to obtain the air brake intelligent controller model:
According to Formula (11) we can see that in the iterative cycle, in order to gradually improve the accuracy of the model, AdaBoost increases the proportion of the predicted error samples in the previous cycle in this sample extraction, thus giving the minority classes of samples more opportunities to be trained after being misrated. At the same time, as can be seen from Formula (10), the final vote will give a higher weight to the better performing basic classifier to reduce the error impact of the poorly performing base classifier. In addition, the base classifier with high error rate is eliminated according to the set maximum error value to further improve the optimal performance of the algorithm.
After modeling according to the steps above, we next obtain the best performance by adjusting the number of features and the maximum number of iterations. We use the sequence back search method, remove the features with the lowest contribution value in the 17 indicators obtained by the feature extraction process, and train it to make the feature set optimal. In addition, the number of iterations has a great impact on the performance of the algorithm: if is too small, the model cannot accurately understand the data, and if is too large, the model identifies the data as too redundant. Therefore, in order to mitigate the impact of the number of iterations on the performance of the algorithm, this paper assumes that the starting point and the end point to optimize the number of iterations.
The algorithm has a certain universality. In the algorithm, the input is 17 key train operating characteristics and the output is seven different air brake decompressions. Using these data as a training set, the AdaBoost algorithm is used to learn the potential characteristics of the data set, so as to build a high-precision model to predict the decision of air braking on trains. The input train operating characteristics can be collected on each line, not unique to a particular line, so for other lines, as long as the train operating data can be collected, the train driving strategy can be modeled into a choice of different discrete values, such as the implementation of brake gear and brake pressure, which can use the algorithm designed in this paper to achieve intelligent driving. Among them, the input is the most important factor for the train driving strategy in the train operation data, and the output is different discrete strategy values.
5.5. Improved AdaBoost Algorithm Based on Heavy-Haul Trains
In this paper, the AdaBoost algorithm is improved from two aspects, namely the selection of the training subset and the determination of the voting weight.
Improve the training subset.
The traditional AdaBoost algorithm will consider the importance of the samples to randomly select a training subset with a certain capacity, and the sampling method is sampling with replacement, which will make the selection of a more important sample more likely than a less important sample, resulting in the loss of key information, and the accuracy of the base classifier cannot be guaranteed [
29]. In addition, the output air brake pressure values are mainly 40, 60, 80, 100, 120, and 140 kPa, but they are all minority classes. As the algorithm is repeated again and again, the data of not needing to output air braking in the randomly selected samples may drop drastically. Therefore, it will cause difficulties for the classifier not only in determining the timing of applying the air brake but also in determining the specific decompression value, which makes the final classifier performance worse.
To eliminate the above disadvantages, we present a plan to optimize the method of training sets. Specifically, the number of training sets is not set in stone and is not obtained by sampling. In contrast, any data from the sample set are selected, and the data can be selected multiple times. The number of selections is the importance of the data multiplied by the total number of sample sets, rounded to the nearest integer. So the number of times a sample appears in the training set generated for the
cycle is
The improved scheme prevents minority classes from being discarded on the basis of ensuring the correct classification rate, prevents the loss of critical information, and prevents the overfit of minority classes.
Improve the voting weight.
The research shows that under the condition of data imbalance, the traditional AdaBoost algorithm cannot fit minority data accurately and cannot grasp their important characteristics accurately [
30]. In order to improve the prediction accuracy of minority data, we adopt cost-sensitive unbalanced learning, the main idea of which is that when the base classifier correctly classes minority data, the well-performing base classifier should be properly rewarded through the loss function, thereby enhancing its importance. Correspondingly, when the minority class is misclassified, its loss function should be increased.
The idea is to set the majority data in the samples to 1, minority to −1, and calculate the ratio of minority and majority classes. The final voting weight is shown in Formula (14):
where
K is the number of sample class labels;
is the error rate of the classifier; and
needs to satisfy Formula (15).
Combining these two scenarios, the improved AdaBoost algorithm flow is shown as follows:
Set the maximum number of iterations to , set the sample category that does not require air brakes to , and set the sample category that requires air brakes to ;
Enter all sample data , among them ;
Initialize sample weights: ;
When , the original training sample set was used as the training subset of the iteration period; when , the number of times each sample appeared in the training subset was calculated according to the weight distribution and the size of the original training sample set using Formula (13), and then the training subset is obtained;
Use sample set P to train the CART decision tree ;
Calculate the error rate of the iterative period using Formula (9);
According to
, calculate the ratio of the minority class to the majority class in the training subset of the iterative period:
Calculate the highest misclassification threshold of the base classifier according to Formula (15). If , reduce the Gini impurity threshold of the CART decision tree node by 0.01, return to step 5 and retrain until , and obtain the qualified base classifier, restoring the CART decision tree Gini impurity threshold;
Calculate the voting weight of the iterative period base classifier according to Formula (14);
Update the sample weight D according to Formula (11);
. If , go back to step 4, otherwise, go to step 11;
Combine the base classifier according to Formula (12) to obtain the air brake intelligent controller model;
7. Conclusions
This paper introduces the classification ideas in machine learning into the intelligent control of the air brake of heavy-haul trains, collects the operation data of heavy-haul trains in different formations of the Shuohuang Railway, and introduces a random forest algorithm to evaluate the characteristics of the train operation data. The AdaBoost algorithm is used to model the intelligent control of the air brake of the heavy-haul trains with the CART decision tree as the base classifier, and the AdaBoost algorithm is optimized by improving the generation method of the training subset and the voting weight.
In order to verify the feasibility of the intelligent control model, Shenchi South Station to Suning North Station is selected as the verification interval. By comparing the control results of the intelligent control model with the speed limit information, it is verified that the trains will not stop halfway, and the trains are guaranteed to run at a safe speed. By comparing the intelligent control model with the average driving speed and running time of the driver, the punctuality of the model is verified by using the punctuality index. By comparing the output of the intelligent control model and the air brake driven by the driver on the long downhill, it is confirmed that the two have similar cyclic brake output results, and the recharge time meets the minimum requirements for safe driving.
In short, the feasibility of the algorithm is confirmed from the above indicators, and it is proved that it can ensure the safe and stable operation of trains after being applied to the intelligent driving process of heavy-haul trains.