Application of Genetic Algorithms for Driverless Subway Train Energy Optimization

After an introduction on the basic aspects of electric railway transports, focusing mainly on driverless subways and their related automation systems (ATC, ATP, and ATO), a technique for energy optimization of the train movement through their control using genetic algorithms will be presented. Genetic algorithms are a heuristic search and iterative stochastic method used in computing to find exact or approximate solutions to optimization problems. This optimization process has been calculated and tested on a real subway line in Milan through the implementation of a dedicated Matlab code. The so-defined algorithm provides the optimization of the trains movement through a coast control table created by the use of a genetic algorithm that minimizes the energy consumption and the train scheduled time. The obtained results suggest that the method is promising in minimizing the energy consumption of the electric trains.


Introduction
The Europe 2020 strategy sets the objective to create 20% of energy consumption from renewables and increase energy efficiency by 20% by 2020 [1].For this reason, together with supply-side policies, there are many European initiatives to increase the efficiency of energy use, reduce energy demand, and attempt to decouple it from economic growth.Different instruments and implementing measures have been set to reach and evaluate the obtained results, including the energy performance of buildings, the promotion of cogeneration, and energy labelling for domestic appliances [2].
Statistics Explained, the official statistical office of the European Union, assures that, except transport, all sectors helped to reduce the EU's overall emissions between 1990 and 2012 (Figure 1) [3].It is possible to note that the largest reduction has been obtained by manufacturing industries and construction (327 million tons of CO 2 equivalent), followed by energy industries (267 million tons of CO 2 equivalent) which was the sector responsible for the largest share of total emissions.
By contrast, transport emissions were 14% above 1990 levels in 2012.The sector accounted for about 19% of total EU emissions in 2012, making it the second largest source after the energy industries.However, the continual upward trend in transport emissions appears to have been broken.After peaking in 2007, emissions fell by 10% over the following five years.Both the increase between 1990 and 2007 and the recent decline might be linked to corresponding changes in the volume of passenger and freight transport [4].Causes for reduced transport volumes since 2007 may include the economic downturn and a hike in fuel prices.Notwithstanding this positive trend, promoting energy efficiency, and increasing the share of renewable energy remain crucial to limiting the transport sector's GHG emissions, particularly when economic growth picks up again.
The European Union itself does underline that energy efficiency is a major goal for any railways administration both economically and environmentally.For this reason any effort has to be done to improve this goal [5,6].Energy efficiency is a major goal for any railways administration both economically and environmentally [7][8][9].
The main performance indexes of train running contain safety, punctuality, energy consumption, stop precision, and riding comfort [10].Energy consumption in urban rail systems is defined by a wide range of interdependent factors including vehicles, infrastructure, and service [11].
Energy efficient driving (EED) is recognized as one of the best areas to invest to reduce the energy consumption absorbed by the railways vehicles.The application of EED allows substantial savings without the need for large investments in infrastructure [12][13][14][15][16].
One of the most promising ways to achieve energy efficient driving is through the use of genetic algorithms that simulate the processes of natural selection, adaptation to the surrounding environment, and Darwinian evolution of living beings [17][18][19][20].
Traction diagram between two stations is based on the creation of control tables where commands are displayed (traction, braking, and gear inertia) that shall be given to the train and the position along the path where they will be executed.These control tables are turned into strings of bits, called chromosomes, which apply typical processes of natural selection and genetics to find the best solution in terms of energy and passenger comfort.
For the calculation of energy efficient velocity profiles, the genetic algorithms offer the best performance, allowing savings of 40% as compared to the nonoptimized driving [21][22][23].
After an overview of the fundamentals of transport technology and electric traction, which is needed in order to develop the topic and introduce the automated systems of transport, particularly in regard to systems used in subway, such as automatic train control and its subsystems (Automatic Train Operation, Automatic Train Protection, and Automatic Train Supervision), the optimization technique derived from the international literature is presented and discussed [24,25].
The aim of this work is the evaluation of the energy saving after the application of an optimization technique based on genetic algorithms on a real subway line in Milan, through the simulations in Matlab-Simulink environment.The novelty of this work consists in the analysis of the actions proposed by the optimization algorithm and that have to be applied to the train control system (ATC) to reduce the energy consumption for a real subway line characterized by a great variability of the line sections between two stops in terms of morphology of the tracks and length of the segments.Consequently, a comparison with a nonoptimized scenario will be discussed.The main purpose is to achieve the transition from a traditional subway line to a driverless system; therefore it is necessary to understand the actions that the control system has to fulfil in order to carry out the passenger service with the lowest energy amount.This process is just started on the subway lines in Milan in order to maximize the transportation capacity keeping the same infrastructures.Currently, new protection and signaling systems have been applied and some experiments are under test to allow the driverless operation from the last station to the deposit.

Automation Systems for Automatic Urban Subway
For a fully automatic control of the subway trains to be carried out with high degree of safety, a set of functions interacting with each other is needed: train drive, control of the get on and get off of the passengers, and centralized monitoring system.The service of mass transit systems is strongly influenced by the performance of the automatic train control (ATC) system employed.The responsibility for operations management gradually shifts from drivers and operators to the system as the automation increases.The ATC system includes many functions such as monitoring, execution, and control of the whole process.Different levels of automation can be introduced, in particular driver-controlled train operation, semiautomated train operation, and driverless and unattended train operation.The ATC system provides continuous information in the cab display on the movement authority status and supervises the maximum train speed.Therefore, lineside light signals can be avoided.In driverless systems, ATC works with Automatic Train Operation (ATO) and it is from a safety-critical part of the transportation system.ATC system includes three subsystems.
(i) Automatic Train Protection (ATP).It uses a target speed indication and audible warnings to warn the train driver if they are likely to exceed a speed profile that will cause the train to pass a red (danger) signal or exceed a speed restriction.In this case, the system applies the brakes if the driver fails to respond to these warnings.The system takes into account, respectively, the speed and the position of the train.
The system is given maximum allowed permitted speed and location information from the track via encoded balises, via encoded track circuits, or more recently via radio signals.(ii) Automatic Train Operation (ATO).It is an operational safety enhancement device used to help automate operations of trains.Usually, it is used on automated guideway transits and subways, which are easier to ensure safety of humans.Most systems elect to maintain a driver in order to mitigate risks associated with failures or emergencies [28].(iii) Automatic Train Supervision (ATS) Systems.The control system provides different information, in particular a wide range of proven train tracking, route setting, and dispatcher-level functions from the local operator console to the highly automated centralized supervision and control centers.
Figure 2 reports the different automatic train control systems that provide the integrated data management for the automatic driverless operation and support the efficient procedures.

Energy Optimization Algorithms
The main goal of an energy efficient driving (EED) is to drive a train from station A to station B by minimizing the energy used.The velocity profile that derives should be programmed by taking into account the characteristics of the track (slopes, speed limits, etc.), the characteristics of the train (curb weight, maximum acceleration, efficiency of components, etc.), and some operational constraints (in particular the duration of the trip).
There are essentially three techniques of mathematical optimization that can be employed to get the best speed profiles [29][30][31]: (i) Nonlinear Programming.A system of equations and inequalities called constraints is solved on a set of unknown real variables, with an objective function to be maximized or minimized, where some of the constraints or the objective function is nonlinear.
In this case, the objective function is the energy consumed by the train, which is a nonlinear function of the speed.(ii) Fuzzy Logic.It is a form of multivalued logic derived from fuzzy set theory to manage issues by employing approximate reasoning (i.e., "partially true or false") rather than using a true or false logic as in Boolean logic.(iii) Genetic Algorithm.This iterative heuristics is routinely used to generate useful solutions to optimization and search problems.They belong to the larger class of evolutionary algorithms (EA), which generate solutions to optimization problems using techniques inspired by natural evolution, such as inheritance, mutation, selection, and crossover.
The modelization of the whole transportation system that includes the morphology of the track, the characteristics of different rolling stocks, and the typology of the service could be extremely complex depending on the techniques chosen for the energy optimization.Therefore, the performances that can be obtained from the various algorithms are influenced by the approximations introduced during the modelization process.Considering previous works in the international literature [7], it is possible to determine energy reduction that can be achieved using the three proposed optimization methods compared with the energy absorbed by a train driven flat out, that is, accelerating as fast as possible and decelerating as late as possible, that corresponds to the shortest journey time [26].The results are shown in Table 1.
Given the same increase in travel time, genetic algorithms are the method that allows achieving the best performance.On the other hand, genetic algorithms are not deterministic, and this means that the level of performance may not always be the same all the times that the algorithm is applied.

Optimization Methods
The optimization method proposed in [32] is based on a genetic algorithm.The genetic algorithm is a stochastic algorithm based on the principles of genetics, natural selection, and Darwinian evolution that allows the survival of the individual with the genetic baggage that is more suited to survive in the environment in which he lives, allowing the reproduction and transmission of the best genes to the new generation.In this case, where the focus is not on living beings, the chromosomes of the genetic baggage involved in the process will be bit strings, and the environmental conditions to which these will have to adapt will be a fitness function that will allow a close evaluation of several factors, so as to optimize the different objectives chosen.This method can also be used in other areas by appropriately adapting objectives and participants in the selection.The traction control table provides indications to the ATO regarding specific actions that should be taken while driving, such as accelerating, braking, or using the coasting running making sure that these actions do not affect the safety or the accuracy in the stop position of the train.The sequence always begins with a command to coasting, proceeding with a traction drive.In this way, the commands usually alternate between coasting and traction.The number of commands can be even or odd.If they are even, the last command sends to the train all the procedures to stop at the designated station.If they are odd, the last command is to keep the coasting march.In this situation, the ATO can ignore the table and take control of the brakes and bring the train to destination with high degree of precision.In any case, the speed limit imposed by the ATP bypasses the command of the roadmap in order to keep the train below the limit of maximum allowed speed.
Each chromosome contains all information of the control table.Thus, each chromosome has a variable length and contains genes with a fixed number of bits.Each gene represents the relative position between the stations where the command is given, as shown in Figure 4.
In this case, the chromosome consists of four genes and each gene has a length of 10 bits.The order of the genes on chromosome indicates a specific decision of the control table.The genes in odd position represent the command of coasting.Those in even position represent the command to start the traction.If the chromosome has an even number of genes, the last gene represents the command to decelerate the train to stop at the destination.In this way, the chromosomal representation is consistent with the command table.

Optimization Technique Proposed
The algorithm developed consists in automatically creating the initial 16 chromosomes derived from the same number of control tables randomly generated by the system.From these 16 chromosomes, the two that maximize the fitness function will be selected and will be used as first parents for the next generation.
For the sake of simplicity of implementation, it was decided to restrict the number of commands to four, including the command to stop at the station.A number higher than 5 commands, however, would not allow achieving substantial improvements in terms of energy saving, as shown in [26] and reported in Figure 5.In this way, the chromosomes have all four genes and are composed of 10 bits each.

Description of the Simulator.
To estimate the energy consumed by the train and the travel time [33][34][35], a simulator using Matlab-Simulink has been implemented.The equivalent mass   of the train is modeled by the following: where  is the mass of the vehicle.The equivalent mass of all rotating masses shall be set equal to 0.06 times the mass of the vehicle and it is estimated that the average mass of passengers transported is worth 0.15 times the mass of the vehicle, as suggested in [36].
It considers the vehicle or combination of vehicles as a concentrated mass .Indicating with  the resultant of all tractive or braking efforts and with  the resultant of all resistances applied to the vehicle, the equation of motion is where  is given by the mechanical characteristic of the motors, shown in Figure 6.
For rolling stocks as light trams or subways, without particular aerodynamics shape, given the limited running speed, it is possible to use the empiric expression (3) for the calculation of the drag resistance  0 for a flat and straight way [26].The following equation gives the drag resistance in N for each kN of weight of the vehicle: The resistance due to the grade indicated as   is given by the component of the weight  parallel to the slope that is traveling: Considering that in railway lines the maximum slope is 25-35‰, in such case the angle  is so small as the per-unit grade resistance can be approximated as follows: The resistance due to the curves   depends, in rail vehicles, on several factors such as the parallelism between the wheelsets and the friction between wheel flanges and rail.All these factors lead to a resistant force   and the corresponding unitary resistance   , but the evaluation of these is theoretically not easy, to which reference is made to the experimental formulas.For example, by returning the formula of Von Röckl [37], where  is the radius of the curve and the terms  and  assume the following values for standard gauge: Or it is possible to use a simpler formula as needed: If it is possible to use the simplified expressions, the overall resistance to the motion can be expressed as the sum of all terms proportional to the weight  of the vehicle, whereas the overall per-unit resistance variable with the speed V is expressed with the following: Therefore, the total energy consumed by the train can be estimated from the following: where  is the tractive effort [N];  is the braking effort [N]; V is the velocity [m/s];  is the power required by the onboard auxiliary services [W];   is the travel time between two stations [s];   is the efficiency during the traction; and   is the efficiency during braking.

International Journal of Vehicular Technology
In this case, it is considered that below the speed of 10 km/h regenerative braking is interrupted and replaced by the mechanical brake and that the maximum power injection in line is limited to 2.25 MW, as proposed in [26].It is also assumed in first approximation that the contact line is always in condition to receive it.
Different vehicle data are required as input data to the simulator such as (i) the vehicle mass, (ii) the total power of the traction motors, (iii) energy efficiency in traction and braking phase, (iv) the maximum tractive effort, (v) the power absorbed by the auxiliary services.
The track data needed to the algorithm are (i) line length, (ii) maximum speed limits, (iii) grades along the line, (iv) curves radius.

Fitness Function. The fitness function choice is of the following type:
where  is the energy consumed measured in MJ and () is the penalty factor for delays.The penalty factor for jerk is not implemented, because the choice of assessment of the jerk is based on the maximum number of variations of the states of traction, braking, and coasting.Besides, given that the maximum number of possible commands of the control table is four, this guarantees an acceptable comfort to the passengers.In fact, in other studies done [35], the jerk is not considered in the evaluation of the fitness function.

Penalty Factor for Delays.
The   factor indicates a virtual increase of the absorbed energy to regain one second of delay.
It is set equal to 0.02, determining that one second delay is penalized with an increase in energy of 2%.Longer delays are penalized with exponential increases in energy consumed.
For the calculation of the factor penalty for delays is used through this relation: The equation is modified as where  is the difference in seconds between the travel time programmed and the actual travel time.The travel time programmed is calculated from nonoptimized travel time increasing it by 10%: where  flatout is the travel time without giving coasting commands.Table 2 shows some penalty factor values in relation to the deviation in seconds from time planned trip.
In the case where the plano-altimetric layout of the line leads to a substantial energy saving and consequently to a high evaluation of the fitness (e.g., strong grades), without, however, being acceptable in the neighborhood of the scheduled time (it has been chosen a band of 3% compared to the programmed time value), it was decided to make more penalizing factor for the delays, elevating the   factor to 0.05.With this arrangement, applied only where the optimization algorithm gives a solution with journey times out of range, ( 12) is changed to the following:

Control of Speed and Stop at the Station.
To control the motion of the train two proportional-integral controllers are implemented, one of which controls the stop position of the train and one controls the speed.The first controller has the task of bringing the train to the destination with the aid of an estimator of the braking distance, modulating the speed reference between zero and the maximum permitted speed.The braking distance has been estimated through this relation: where   is the average constant deceleration set equal to 0.675 m/s 2 and V is the speed of the train before braking.The speed controller modulates between zero and its maximum value the traction effort of the motors obtained by the mechanical characteristic, to achieve the speed reference given by the control.To allow the simulation of the coasting commands an inhibitor of the commands of the speed controller is placed downstream of the two controllers, which during the coasting phases set to zero the tractive effort .
In the case where a control table that does not bring the train to more or less than 1.1 m from the destination is generated, the system penalizes with a factor of 100 the fitness, so as to ensure nonsurvival of these individuals in the population.The principle of the control system is shown schematically in Figure 7.

Case Study
To test the optimization algorithm developed, the following assumptions have been made in terms of train and track characteristics: (i) vehicle's mass 295,000 kg, (ii) maximum electric power 5,000 kW, (iii) total efficiency in traction 0.85, (iv) total efficiency in braking 0.65, (v) maximum tractive force 300 kN, (vi) auxiliary power 235 kW, (vii) max load: 1200 passengers.
Figure 8 reports the trend of the electric power absorbed by the motors as a function of speed, both plotted with the use of the simulator.

Characteristics of the Track.
The subway line is considered to be 21.73 km long and consists of 24 stations, for a number of routes to simulate equal to 23.The length of the sections between stations (denominated in alphabetical order, ignoring the letters X and Y) is shown in Table 3.
The altitude profile of the subway line is shown in Figure 9.
The speed limits are set for all routes equal to 40 km/h for the first 100 m and the last 100 m and 90 km/h for the rest of the route.In some segments, there are some curves; in particular for the segments G-H, H-I, and I-J the radius of curvature is equal to 1000 m, whereas for the segment M-N the radius of curvature is equal to 500 m.

Energy Consumption with Nonoptimized Driving.
In order to calculate the amount of energy saved through the use of the optimization algorithm, it must first calculate the energy consumed during the year with nonoptimized guidance, which corresponds to the driving style that allows shorter travel times by using full speed and decelerating as late as possible.Table 4 shows the energy consumption in MJ and kWh and travel times for each segment.The total travel time, equal to 28 minutes, does not include the waiting times at stops, which are assumed equal even in the case of nonoptimized driving.Figure 10 shows three traction diagrams' velocity-time for different segments, in particular for the case of short section, average section, and long section.

Convergence of Algorithm.
In order to achieve an optimal solution it is very important to properly set the number of generations that the algorithm will create and analyze.
Based on the experience developed by other items such as [27], the proposed genetic algorithm converges to a result between the eleventh and twelfth generation, in which the algorithm has been run for 20 generations.5 shows the energy consumption and the travel times obtained with the proposed optimization technique.In the line segments F-G, J-K, and T-U, expression (14) has been used for the penalty factor instead of (12) since its application does not produce acceptable solutions regarding the travel time.

Energy Consumption with Optimized Driving. Table
For a comparison of driving styles, Figure 11 reports the speed-time diagram for the sections R-S, M-N, and V-W obtained with the use of the optimization algorithm.
As it is possible to note, the optimized driving style is strongly influenced by the morphology of the track, in particular by its altitude profile.For example, regarding the R-S segment, characterized by a flat track, the optimization introduces a long coasting phase and a lower maximum speed that allow a great energy saving since the traction motors are off in view of a negligible increase of the traveling time (around 5 s).In the other cases, the coasting phase cannot be too long if the train moves upward (e.g., V-W segment) or whenever the maximum speed cannot be too low not to compromise the travel time (e.g., M-N segment).It is worth noting that in cases (b) and (c) the train control system has to achieve many actions, continuously changing from traction to coasting or from coasting to braking.This is an important aspect for the correct training of the train automation system (ATO) in order to minimize the energy consumption compatibly with the transportation service.
6.5.Energy Saving and Travel Times.Percentage of energy saving as compared to nonoptimized guide is reported in Table 6 together with the percentage deviation between the travel time with EED and, respectively, minimum travel time and scheduled travel time.Also in this case in the highlighted sections, expression (14) has been used for the penalty factor instead of ( 12) since its application does not produce acceptable solutions regarding the travel time.Traveling times vary from 9.56% to 12.95% compared to nonoptimized guidance, resulting in a total increase of travel time on the whole of around 10.57%, equivalent to about 3 minutes.
The energy saving increases from a minimum of 19% in the V-W, which has a length much greater than the others and is the one that presents a strong positive slope, to a maximum of 66% in F-G that has on the contrary a strong negative slope and that for which it was necessary to formulate more stringent factor penalties for delays in reaching a solution which increases the total travel time to no more than 3% of the scheduled travel time.
Considering the totality of the line, in view of an increased journey time equal to 10.57%, a decrease of the energy consumed compared to a nonoptimized driving style is equal to 32.89%.The total energy saved thanks to the optimization technique is 195.8 kWh per trip.
The small increase in the travel time does not constitute a problem in this case because the actual service is influenced by many other interferences, that is, time for getting on and getting off, that tend to affect the journey.On the contrary, it is important to highlight the great energy saving achievable with an optimized driving style.

Trend of Fitness and Energy.
To verify if the choice of the number of generations is correct, the progress of the fitness function for each generation is reported in Figure 12.
As can be noted, the fitness function reaches a stable value after about 15 generations; therefore, the choice to simulate 20 generations is a good compromise between accuracy and  speed of calculation of the solution.The trend of energy to the sections considered is shown in Figure 13.
As it is possible to easily notice, in each generation the power consumption tends to decrease, reaching the final value after about 15 generations.
In some places, such as between generation 8 and generation 10, the power consumption in M-N (Figure 13(b)), the energy consumed increases, in contrast to the fitness function.This happens because the solution found in generation 10 has such a power consumption greater than that of generation 8 but will have a travel time which deviates less from the programmed time, leading to an overall increase of fitness.

Conclusions
Today, the concept of energy efficiency is very important for both the policy and economic and environmental grounds.
The energy efficient driving (EED) is recognized as one of the top areas for energy saving.
The aim of this work was shown and the work tested the potential of optimization techniques based on the use of genetic algorithms on a subway line in Milan in order to fulfil the transition from a traditional system to a driverless one.
The performances of the optimization technique presented are very satisfactory, since they allow achieving an energy saving equal to 32.89%, causing a negligible increase of the travel time up to 0.51% compared to scheduled timetable.
These results are comparable with those obtained by other optimization techniques developed in the international literature.The use of genetic algorithms allows achieving excellent results in optimization problems even with limited available data, allowing the reprogramming command quickly in case of unpredicted events or changes of the parameters of the trains and of the line.
International Journal of Vehicular Technology The travel time deviations, with respect to scheduled timetable, are all below the threshold of 3%.This value makes it virtually negligible delay, because it is comparable with the delays that may occur due to unpredictable events, such as the increase in time spent for the passenger to get in and get off of the train.In case the maximum allowed delay is exceeded, it is possible to tighten the constraints in order to let the algorithm find a better solution.
These measures can be implemented in a driverless metro system, where the Automatic Train Operation (ATO) controls traction, braking, and coasting, at almost zero cost, since no investment is needed for infrastructure or additional components.
The benefits gained in economic and environmental terms of using a good energy optimization are significant, since with the proposed technique the energy saved by a train for each service is 195.8 kWh.On the other hand, the optimization of the energy consumption requires more actions, for example, traction → coasting or coasting → braking, that the control system (ATO) has to fulfil.Besides, these actions are strongly dependent on the morphology of the track.This is the reason why genetic algorithms have been chosen as optimization method that has good performances in every condition without a strong detailed modelization of the system.The obtained results can be used during the design and training phases of the Automatic Train Operation (ATO).
Genetic algorithms, by their nature, make it difficult to exactly replicate the results obtained in previous optimizations, because the solution is obtained by repeated iterations, which involves random parameters.This can be considered a deficit of methods based on genetic algorithms, as every best solution found at different time is similar but it does not coincide even with the same initial conditions used.
Finally, it is to be remembered that, in real situations, the minimum travel time driving that represents the worst condition from the energetic point of view is not normally set to the ATO as driving style, except in special situations, typically during the recovery of a delay, in which the achievement of energy efficiency is not so important.

Figure 3
Figure 3 shows an example of traction diagram comparing a train with nonoptimized guide with EED.

Figure 5 :Figure 6 :
Figure 5: Energy consumption as a function of the number of commands.

Figure 7 :Figure 8 :
Figure 7: Block diagram of the simulated control system.

Figure 9 :
Figure 9: Altitude profile for different segments of the subway lines.

Figure 10 :
Figure 10: Traction diagrams velocity-time nonoptimized: (a) R-S segment is equal to 407 m, (b) M-N segment is equal to 821 m, and (c) V-W segment is equal to 3631 m.

Table 2 :
Different values of the penalty factor.

Table 3 :
Length of different segments.

Table 4 :
Energy consumption and travel times with nonoptimized driving.

Table 5 :
Energy consumption and travel times with EED.

Table 6 :
Energy saving and percent delay.