Abstract
The existing automatic driving technology of high-speed railway trains has been able to complete the automatic driving of trains in normal scenes, and it has begun to develop in the direction of improving operational efficiency and optimizing driving strategies. Based on the current automatic driving technology, this paper proposes an optimization method of automatic driving strategy for high-speed trains based on an artificial fish swarm algorithm, aiming at reducing train energy consumption, improving train parking accuracy, train punctuality, passenger comfort, and train speed protection. Firstly, based on train dynamics, the dynamic parameter model of the train in the running process is described. Through the train dynamic parameter model, combined with line information such as speed limit, slope, and phase separation area, an artificial fish swarm algorithm is designed that aims at safety, punctuality, energy saving, comfort, and parking accuracy. The artificial fish swarm algorithm is used to simulate the optimal driving strategy of train running and generate the train driving curve. Finally, the driving curve simulated by the artificial fish swarm algorithm is compared with the driving curve simulated by the genetic algorithm and the actual driving curve of the Beijing-Shenyang high-speed train, which shows that the proposed method is effective and the convergence speed of the artificial fish swarm algorithm is better than that of the genetic algorithm.
Keywords
Introduction
In recent years, China’s high-speed railway operation mileage has increased rapidly. The high-speed railway, with its safe, efficient, and high-speed characteristics, has become a new business card for the country.
The development of high-speed railways is inseparable from a safe and reliable train operation control system (CTCS). The control algorithm in the train operation control system can make the train run smoothly and fast with higher control accuracy and less switching mode.
At present, many scholars have studied the driving control algorithm of high-speed trains and are committed to finding the optimal speed distance curve that meets the control requirements. Wang et al. 1 proposed a control algorithm based on iterative learning to adjust the current driving strategy of the train by extracting the historical data of the train. Li and Wang 2 introduced a train control algorithm based on the particle swarm to calculate the ATO strategy of train operation. Li 3 proposed a goodness evaluation method based on extenics to realize the electric multiple units (EMU) operating optimization strategy by iterative rolling screening and optimization. Feng 4 introduced a linear quadratic regulator (LQR) into ATO control and analyzed aspects of parking accuracy and comfort. Meng et al. 5 used a genetic algorithm to optimize the ATO tracing target curve of a high-speed train. Yin et al.6,7 used expert reinforcement learning and data mining methods to calculate intelligent train driving algorithms. Huang et al. 8 proposed a method of using a back propagation (BP) neural network to solve the train driving curve so as to obtain the decompression amount of the train during air braking and ensure the safe operation of the train. Zhang et al. 9 designed a controller independent of the train dynamic model and continuously self-learning to realize the intelligent control of the train. Wang et al. 10 proposed an adaptive genetic algorithm based on the indicators of train safety, punctuality, and passenger comfort to find the switching points of train working conditions so as to minimize the energy consumption of the train during operation. Albrecht et al.11,12 studied the problem of energy-saving driving when trains run in the same direction on non-horizontal tracks and calculated the necessary conditions for minimizing traction power consumption. Khmelnitsky 13 proposed a numerical algorithm to solve the energy saving speed curve of trains. Yu et al. 14 optimized the train control sequence and distance by using a particle swarm optimization method in the binary and real number domains. Song et al. 15 constructed the train control model on the premise of comprehensively considering different train traction characteristic curves and braking characteristic curves to obtain the minimum energy consumption during train operation. Miyatake and Ko 16 obtained the optimal train speed curve by using the dynamic programming method and the gradient method. Havaei and Sandidzadeh 17 proposed a train dynamics model based on the calculation of train energy consumption and then designed the Conscious Search (CS) algorithm to solve the train speed distribution. At the same time, by comparing it with the genetic algorithm (GA), the particle swarm algorithm (PSO), and other heuristic intelligent algorithms, the effectiveness of the CS algorithm is verified. Based on the calculation of train energy consumption, Sandidzadeh and Pedram 18 proposed the Q-SARSA algorithm and the Deep-Q network algorithm to optimize the driving strategy. By adding convergence measure (CM) to the algorithm, the algorithm was prevented from falling into local optimal. The feasibility of the algorithm is verified by comparing it with the data of Tehran Metro Lines 3 and 5.
Although numerous scholars have carried out extensive research on the improvement of driving strategy and the optimization of the target speed curve, the ATO driving strategy of railway field operation often uses cruising conditions to accurately track the target speed, which consumes a lot of energy. In the research of various intelligent algorithms used in traditional curve optimization, there is insufficient consideration of constraints, which makes the optimization results deviate from the actual situation, and at the same time, the traditional intelligent algorithms have the problems of slow calculation speed and low algorithm efficiency.
Li 19 from Shandong University first proposed the artificial fish swarm algorithm. The artificial fish swarm algorithm is an algorithm designed to imitate the behavior of fish, including foraging behavior, tail-chasing behavior, swarming behavior, and random swimming. The algorithm has the advantages of parallelism and the ability to quickly jump out of extreme values. It also has the advantages of fast optimization speed and strong global search ability. Compared with traditional algorithms, the efficiency of the algorithm has been greatly improved. The algorithm can find the global optimal solution with the fastest efficiency based on the optimization direction.
At present, the artificial fish swarm algorithm has been successfully applied to solve complex optimization problems under multi-constraint conditions such as workshop scheduling 20 and train operation diagram adjustment. 21 The automatic train driving strategy is a large-scale optimization problem with multiple constraints. Therefore, the artificial fish swarm algorithm can be applied to the optimization process of the automatic train driving strategy.
How to control the high-speed running of trains is a very complex problem that not only needs to ensure the safety of the train in the process of driving but also needs to reduce the working condition transformation of the train in the process of running so that the train can ensure punctual and smooth running with less energy consumption. At the same time, passenger comfort and train parking accuracy should be taken into account, so it is very demanding to solve the multi-objective optimization problem of train driving strategy.
The artificial fish swarm algorithm updates the state of the fish swarm through its foraging behavior, tail-chasing behavior, and swarming behavior, thus improving the adaptability of each fish and making the algorithm solve in the direction of the optimal solution. At the same time, the algorithm avoids falling into the local optimal solution through random swimming behavior, so as to improve the global search ability of the algorithm. The environment of artificial fish in the algorithm refers to the solution space of the problem and the state of other artificial fish. The state of the artificial fish in the next moment mainly depends on its own state and the surrounding environment, and the artificial fish perceives the external environment mainly through vision. The robustness of this algorithm is excellent, and the global convergence ability is strong. It can solve the problem with real-time requirements, and at the same time, it is not sensitive to the initial value and parameter requirements, so the algorithm can be applied to optimize the driving strategy of trains.
In order to further optimize the driving strategy of trains, this paper constructs an objective function with the optimization direction of reducing train operation energy consumption, improving train parking accuracy, train operation punctuality, and passenger comfort. The artificial fish swarm algorithm is used as the solution method for design.
Firstly, based on the longitudinal dynamics of the train, the dynamic model of the train is established by combining the information of speed limit, slope, and phase division during the train operation. Secondly, the objective function of the artificial fish swarm algorithm is constructed by taking energy consumption, passenger comfort, train punctuality, and parking accuracy as indicators. The automatic driving strategy of a high-speed train is solved by an artificial fish swarm algorithm, and the driving curve of the train is finally obtained. Finally, by comparing the data with the guidance driving curve, the rationality of this method is demonstrated.
Establishment of train dynamics model
The force of the train in the running process is divided into the traction force, the braking force, the basic resistance, and the additional resistance. The running state of the train is determined by the resultant force. 22
Train traction force is the external force provided by the locomotive power unit in the same direction as the train runs. The traction force is not constant, and its magnitude varies according to the speed of the train. Trains have different traction forces at different speeds, and the relationship between the two is shown in the following equation.
where
where
The train braking force is the external force generated by the train braking device, which is opposite to the running direction of the train. Similar to the traction force, the braking force of the train is not a constant value, and the magnitude of the braking force also changes according to the running speed of the train. The calculating relationship between the unit braking force of the train and the train speed is described as follows:
where
where
The braking force of the train is described as follows:
where
The resistance of the
where a, b, and c is constants that vary with the vehicle, and v (km/h) is the velocity.
The additional resistance
During the operation of the train, each carriage of the train can be regarded as a particle. This can better reflect the additional resistance that the train actually suffers during operation. He 24 regards the train connection as a rigid connection, there is no relative motion between the particles, and the length of the train does not change, so the additional resistance of the train can be described as the following formula:
where
The additional resistance of the ramp is the component force of the train’s gravity along the direction of the ramp when the train is running on a line with a non-zero slope. Obstructing the train when the slope is positive. Accelerate the train when the slope is negative. As shown in the following Figure 1.

Additional resistance diagram of the ramp.
where
where
According to the trigonometric function calculation, the following formula can be obtained:
where
The above formula shows that the thousand fraction of the ramp is numerically equal to the additional resistance of the unit ramp of the train.
The calculation formula for unit tunnel resistance is shown as follows. 22
The total train resistance
where
When the train runs through the phase separation area, it can only be idle due to resistance.
The actual running state of the train is determined by the combined force of the above forces, as shown below.
where
According to the above force analysis, the following formula can be obtained for the train’s running acceleration.
where
Design of driving strategy optimization method
The artificial fish swarm algorithm is an intelligent algorithm that simulates the four behaviors of artificial fish swarms: foraging behavior, tail-chasing behavior, swarming behavior, and random swimming, to find the optimal solution to complex problems. The foraging behavior lays the foundation for the convergence of the algorithm; the swarming and tail-chasing behavior determine the rapidity and globality of the algorithm; and the random swimming can increase the probability of the algorithm obtaining the global optimal solution.
Driving strategy optimization model
In the process of optimizing the driving strategy, train energy consumption, passenger comfort, train running punctuality, parking accuracy, and train speed protection are modeled as objective functions.
The energy consumption of trains in operation mainly comes from the energy consumption of traction equipment, braking equipment, and auxiliary equipment (electrical equipment), which can be calculated as follows:
where
During the simulation, the train parameters and performance are fixed. During the actual operation of the train, the traction condition and the braking condition will not coexist at the same time, so the energy consumption calculation is simplified as follows:
The passenger comfort index is expressed as the sum of the difference in acceleration per unit time. 25 Then this index is described as follows:
where
The punctuality index of train operation is as follows:
where
The parking accuracy index is as follows:
where
The train speed protection index is as follows:
where
This paper takes the above multi-indicator constraints as the optimization objective and establishes a target optimization model for the artificial fish school algorithm. This paper adjusts the above constraint indicators in the form of a penalty function, and the objective function of the algorithm can be obtained as follows:
where
The above penalty coefficients can be set according to the specific accuracy requirements of the problem. The optimization direction in the paper is to solve for the minimum value of the objective function. In order to ensure that each optimization direction has the same weight, it is necessary to amplify each optimization index to the same order of magnitude through penalty coefficients. At the same time, if the value of the penalty coefficient is large enough, the more likely it is that the solution that does not meet the condition will be eliminated by the algorithm. The overall goal of this paper is to minimize the objective function value while ensuring that all constraints are met.
The values of each parameter in this simulation are shown in the Table 1.
Penalty coefficient value table.
Algorithm implementation process
The overall flow of the algorithm is shown in the Figure 2 below.

Flowchart of the algorithm.
The implementation steps of the algorithm are as follows:
Step 1. Initializing the algorithm parameters, including the size of the fish (Size), the visual field of the artificial fish (Visual), the step length (Step), the number of attempts (Try number), and the number of iterations (Maxiter).
In the algorithm, the Size represents the number of artificial fish, and each artificial fish represents a set of solutions of the objective function. The larger the Size value, the higher the intelligence level of the group, resulting in faster convergence of the algorithm and stronger ability to jump out of the local extreme value, but the calculation amount of each iteration will be larger, and the algorithm will take more time. Therefore, in the calculation of specific problems, as long as the convergence requirements can be met, the Size can be reduced as far as possible.
The Step is the distance that the artificial fish can move during each iteration. If the Step is too large, the accuracy of the algorithm may not be enough to find the global optimal solution, but if the Step is too small, the calculation amount of the algorithm will be larger and more time-consuming.
The Visual is the visible visual field of the artificial fish, and all behaviors of the artificial fish are carried out in the visual field. A small visual field had adverse effects on the swarming behavior and tail-chasing behavior of artificial fish, but foraging behavior and random swimming behavior were enhanced. A large visual field is conducive to the tail-chasing behavior and swarming behavior of artificial fish, but not conducive to the artificial fish near the global optimal solution to find the global optimal solution. But the larger the visual field, the easier it is to find the global optimal solution.
The Try number is used in the foraging behavior of the artificial fish. When the fish does not find a position more suitable than the current position for Try number of times, it adopts random swimming behavior. For general problems, the algorithm’s efficiency can be improved by increasing the Try number, but for problems with obvious local extrema, if the Try number is too high, the algorithm will easily fall into local optimal.
The number of the Maxiter can meet the convergence requirements of the algorithm.
The following Table 2 describes the parameter values.
Step 2. Initializing line data information, including speed limit information and slope information of the line.
Step 3. The force analysis of the train is carried out according to the line data, and the train dynamics model is established.
Step 4. The objective function model of simulation optimization is established according to several optimization indexes of the train.
Step 5. The state of the train is divided into three states, namely the traction state, the braking state, and the coasting state. When the train is in the traction state, it is affected by the traction force and running resistance. In the braking state of the train, it is affected by the braking force and the running resistance. When the train is coasting, it is affected by the resistance. The artificial fish is encoded in the state of the train, and the state of the train is calculated according to the dynamic model of the train. The first generation of the artificial fish swarms is initialized.
Step 6. Foraging behavior, tail-chasing behavior, swarming behavior, and random swimming are simulated. After the simulation is completed, a new generation of artificial fish is generated, and the new artificial fish is evaluated to find the optimal artificial fish and enter the next iteration.
Parameters of the algorithm.
The tail-chasing behavior makes the artificial fish move in a better direction, and the artificial fish trapped in the local extreme value moves to the global optimal artificial fish so as to avoid the algorithm falling into the local extreme value. The swarming behavior can make a few artificial fish move in the direction of most artificial fish that tend toward the global optimal solution, so as to avoid falling into the local extreme value and finally search for the global optimal solution. Foraging behavior and fewer Try number values increase the probability of random walking of artificial fish, which makes the algorithm easy to jump out of the local extreme value.
In the artificial fish swarm algorithm, foraging behavior lays the foundation for its convergence, swarming behavior increases its stability, tail-chasing behavior increases its speediness and global nature, and random swimming avoids it falling into local extreme values.
Step 7. The algorithm determines whether the maximum number of iterations has been reached. If not, the algorithm goes to Step 6 and continues to iteratively search for the optimal artificial fish. If yes, the algorithm goes to Step 8.
Step 8. According to the optimal artificial fish obtained by simulation, the calculation of train operation and the drawing of the train driving curve are carried out.
Simulation case analysis
In order to verify the feasibility of the above algorithm, this paper uses MATLAB simulation software programming and carries out simulation experiments based on the Beijing-Shenyang high-speed railway line data. The speed limit information, actual driving curve, and slope data of the line are shown in Figures 3 and 4, respectively. At the same time, in order to analyze the algorithm of the artificial fish swarm from the perspective of convergence speed and application, this paper also designs a genetic algorithm to optimize the driving strategy of the above line.

Actual driving curve and speed limit information.

Slope information of the line.
Figure 3 is the actual driving curve of the train and the speed limit information of the line when the driver is running in this section, and Figure 4 is the line gradient data. Under the above line conditions, the artificial fish swarm algorithm and the genetic algorithm 26 are used to optimize the driving strategy of the train. The optimization processes of the artificial fish swarm algorithm and the genetic algorithm are shown in Figures 5 and 6, respectively.

Optimization process of artificial fish swarm algorithm.

Optimization process of genetic algorithm.
It can be seen from Figure 5 that the artificial fish swarm algorithm converges around the 16th generation, and then the algorithm reaches stability in the process of solving, which indicates that the algorithm obtains the optimal solution in the 16th generation, that is, the optimal driving strategy. Also, from Figure 6, it can be seen that the genetic algorithm reaches convergence around the 35th generation. The simulation curves and data analysis obtained by using the above two algorithms are as follows:
In the above figure, the black line represents the actual driving curve, the red line represents the line speed limit, the blue line represents the simulated driving curve obtained by the artificial fish swarm algorithm, and the yellow line represents the driving curve obtained by the genetic algorithm.
Data analysis is shown in Tables 3 and 4.
Train operation index comparison.
Train operation index comparison.
It can be seen from Figure 7, Tables 3 and 4 that the driving curve simulated by the artificial fish swarm algorithm reduces energy consumption by about 8.68% and improves comfort by 5.46% compared with the actual driving curve. Although there is a parking error of 0.25 m in the simulated driving curve, this error value is very small and will not endanger the safety of parking. The simulated driving curve not only meets the speed protection requirements during train driving but also advances the running time by 48.32 s.

Comparison chart of driving curves.
Compared with the simulation results of the artificial fish swarm algorithm and the genetic algorithm, both of them meet the requirements of speed protection and parking accuracy. In terms of train punctuality, the error of the simulation curve of the genetic algorithm is 43.32 s, which is better than the calculation result of the artificial fish swarm algorithm (48.32 s). In terms of passenger comfort, the simulation result of the genetic algorithm is 3.7% higher than that of the artificial fish swarm algorithm, but in terms of energy consumption, the result of the genetic algorithm is 3.1% higher than that of the artificial fish swarm algorithm.
The comparison between Figures 5 and 6 shows that the convergence speed of the artificial fish swarm algorithm is better than that of the genetic algorithm.
Conclusion
The automatic driving strategy of high-speed trains is a multi-objective optimization problem. Based on the train dynamics model, this paper takes the energy consumption, passenger comfort, train punctuality, parking accuracy, and speed protection of the train as the optimization goals and uses the artificial fish swarm algorithm to optimize the driving strategy of the high-speed train. Based on the line data of the Beijing-Shenyang railway, the simulated driving curve was calculated by the artificial fish swarm algorithm. Comparing the simulated driving curve with the actual driving curve, it can be seen that when the simulated curve meets the requirements of speed protection and parking accuracy, the train energy consumption, passenger comfort, and train punctuality have been improved, which proves that the artificial fish swarm algorithm proposed in this paper is effective in optimizing the driving strategy of high-speed trains and the simulated driving strategy is feasible.
This paper uses a genetic algorithm to solve the designed objective function, and by comparing the simulation results with the artificial fish swarm algorithm, it can be seen that the optimization results of the two algorithms for each constraint index are close, and the driving strategy curve obtained by the optimization is similar, but the convergence speed of the artificial fish swarm algorithm is faster than that of the genetic algorithm, the optimization ability is faster, and the algorithm efficiency is higher.
Footnotes
Handling Editor: Chenhui Liang
Declaration of conflicting interests
The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
Funding
The author(s) disclosed receipt of the following financial support for the research, authorship, and/or publication of this article: This work was funded by the Key Project Foundation of China State Railway Group Co., Ltd. under Grant 2022YJ271.
