Switching Nonlinear Model Predictive Control of Collaborative Railway Vehicles in Catenary Grids

This article contributes to the railway control field by proposing a novel approach capable of making trains collaborate, while also minimizing both traction energy and power line losses in catenary grids. The train dynamics are captured by a combination of four operating modes, so that the formulation of a switched control problem naturally applies. This model is interfaced with that of the catenary grid, consisting of the electrical substations and transmission lines over the track. Relying on these models, an eco-drive control system is proposed based on an original switching nonlinear model predictive control (SNMPC). Being collaborative-conceived, the new SNMPC is compared and evaluated against a noncollaborative version of the controller by means of simulation case studies relying on real-world test data, a validated train model, and measured track topology. We obtain that the proposed SNMPC outperforms the noncollaborative counterpart both in terms of traction energy and energy losses on the train rheostats and over the electrical lines. Thus, we demonstrate that the proposed SNMPC for collaborative eco-drive, based on the energy exchange between trains, has a potential positive impact on railway systems in catenary grids.


I. INTRODUCTION
H IGHLY automated and even autonomous vehicles are revolutionizing the transportation mobility, and this evolutionary step is becoming a reality also in the railway sector. Indeed, trains are highly efficient means of transportation due to their limited environmental impact in terms of pollutant emissions. However, energy consumption is significantly influenced by the driving style and the scheduled timetable [1]. Hence, railway control methods have been widely studied by researchers, in order to generate the optimal energy-efficient driving strategy and mitigate its negative effects by reducing energy consumption, power losses, and as a consequence, operating costs. In this context, railway control can regard both driver advisory systems (DASs), to assist the human driver by suggesting the input handles, and automatic train operation (ATO) systems [2]. This article focuses specifically on DASs for trains in catenary grids.

A. Overview on Energy-Efficient Train Control
Most of the research in the railway field deals with the design of optimal energy-efficient strategies aimed at generating the sequence of switching points for the optimal driving regime taking into account a trade-off between energy consumption and travel time. Specifically, among solution methods for optimization, Pontryagin's minimum principle is the most relevant, showing that there exist four possible optimal modes of operation, i.e., acceleration (ACC), cruising (CR), coasting (CO), and braking (BR). Hence, the control problem becomes that of finding the optimal sequence of such modes depending on the track features, timetable, and speed constraints [3]. Such approaches are commonly referred to as eco-drive control. This control paradigm has been widely exploited in the literature for conventional vehicles with the objective of reducing fuel consumption, and possibly pollutant emissions, by finding appropriate control sequences for gas and brake pedal (see [4] and the references therein).
Another line of research is instead devoted to the so-called regenerative braking, which is a valid solution to reduce energy consumption by recovering braking energy, that otherwise would be lost as heat into the environment, see [5], [6], [7], among many others. More specifically, whenever a regenerative braking occurs, the train behaves as a current generator by providing energy to the power distribution system. This generated energy can be used to supply other trains within the same substation or can be used for other loads such as lighting in stations. Such a technique is particularly effective in commuter trains and metro trains due to the fact that their journey is often characterized by frequent stops. Therefore, regenerative braking systems represent a valuable technology, and it is feasible both for alternate current (ac) powered trains and direct current (dc) powered ones. Specifically, its implementation finds a natural application for ac networks, but it is also very promising to reduce the electricity demand in very dense suburban dc powered networks.
More recently, the regenerative braking approach has given rise to a new concept, based on energy sharing by collaboration among trains. Specifically, the regenerative braking energy is supplied to the catenary grid and used to accelerate other trains connected to the same electrical substation instead of demanding energy from the substation itself. This energy share not only reduces the load on the substation but also allows to reduce losses during the energy transfer from the substation to the trains. In the literature this paradigm is indicated as collaborative eco-drive, and several works rely on the optimization of the train timetables, so as to synchronize the train ACC and deceleration to be able to maximize the sharing of the available regenerated energy [8], [9], [10].

B. Contributions With Respect to the State-of-the-Art
The main goal of this article is to propose a novel optimal-based collaborative eco-drive control for suburban trains with DAS, connected to the catenary grids.
Optimal control for railway systems has a relatively long history (see [11], [12], [13]) and, among the control solutions, model predictive control (MPC) is a valid option due to its intrinsic capability to take into account state and input constraints [14]. For instance, in [15], a nonlinear MPC (NMPC) is applied for the energy-efficient operation of trains taking into account the inclination and curvature of the track, resistances, and speed limits.
Although the train dynamics are continuous in nature, practical implementation for DASs requires a quantization of the input handles to advise the driver, according to the four different operation modes of the train previously mentioned. Hence, because of the switching nature of the input handle, it is straightforward to formulate the train nonlinear dynamics as a switched system (see [16] for related stability arguments), so that a switching NMPC (SNMPC) needs to be applied [17], [18], [19], [20]. In [21], for instance, a shrinking horizon SNMPC is applied to solve an eco-drive control problem for metro trains.
The idea of coordinated vehicles in railway systems via predictive controllers has been instead investigated, e.g., in [22], where a distributed cooperative MPC has been designed for energy-efficient trajectory planning in the case of multiple high-speed trains. In [23], a hierarchical MPC has been introduced for the coordination of electrical traction substation energy flows at a higher level, and on-route trains energy consumption at a lower level. Recently, exploiting an interpretation of trains as Markov stochastic processes, a dissension-based approach combined with an SNMPC has been proposed in [24].
However, in all the above-mentioned cases, no knowledge of the catenary grid model is taken into account in the optimization problem. This grid is instrumental in the energy exchange among trains, and its effect needs to be considered. Here, relying on the switched model of the trains, we propose an SNMPC based on the model of the catenary grid, taking into account line losses together with those due to the rheostats dissipation, thus enabling the collaboration among trains by coordinating their energy exchanges. To the best of our knowledge, this is the first time that a collaborative eco-drive control problem, properly exploiting the catenary grid, is proposed.
In our formulation, the switched nature of the model enables us to select a reduced set of feasible sequences to solve the eco-drive control problem in a computationally efficient way.
Moreover, in order to cope with possible stringent performance specifications, a move-blocking input parametrization can be adopted to decrease the number of optimization variables, further reducing the computational complexity. Finally, in collaboration with the company Alstom rail transport, we present promising results obtained relying on real data of metro trains, assessing the proposed approach in comparison with a noncollaborative eco-drive strategy.

C. Outline
The article is organized as follows. In Section II, the dynamic and electrical models of the trains together with the catenary grid model are introduced, and the eco-drive control problem is presented. In Section III, the switched model of the train is discussed in detail and the proposed collaborative eco-drive control approach is designed relying on an SNMPC strategy. In Section IV, an extensive simulation campaign based on real data in a realistic simulation environment is illustrated and discussed by shedding light on the advantages and practical feasibility of the proposal. Some conclusions are gathered in Section V, while the real data adopted for the simulations are given in Appendix.
Notation: The notation used in the article is mostly standard. Let N 0 denote the set of natural numbers including zero, while R be the set of real numbers. Let X be a matrix, X ′ is its transpose, and [X ] i, j is its element at row i and column j. The matrix 0 n,m indicates a null matrix with n rows and m columns. Given a set B, its cardinality is denoted as |B|. Let x ∈ R be a signal, the function step(x) is defined such that step(x) = 1 if x > 0, and step(x) = 0 if x ≤ 0. The AND logic operator is indicated with the symbol ∧. Considering a real variable a ∈ R with a ≥ 0, b = ⌊a⌋ is the largest integer less than or equal to a, i.e., b ∈ N 0 . Finally, for a given variable x, x and x correspond to its upper and lower bounds, respectively.

II. MODELING AND PROBLEM STATEMENT
The considered train and catenary grid models are hereafter introduced, and the eco-drive control problem is formulated.
A. Train Model 1) Dynamic Model: Consider the train body of constant mass M moving on a track having curvature radius r (s) ∈ R and slope α(s) ∈ R, with s being the longitudinal displacement, as shown in Fig. 1.
Letting T be the sampling time and k ∈ N 0 , the governing discrete-time model of motion is given by where v ∈ R is the train speed and u ∈ R is the input handle  1]. Note that, for the sake of simplicity, the time index k is omitted in the following. The traction and braking forces, denoted as F T ∈ R and F B ∈ R, respectively, are given by where F T ∈ R and F B ∈ R are, respectively, the maximum traction and braking forces curve depending on the train speed (see Appendix). The resistance force F R ∈ R is instead given by where A, B, and C are the so-called Davis parameters, g is the gravity ACC, and β is a specific constant of the train. Note that the resistance component R v (v) step(v) is zero when the speed is null, as the train is not traveling.
2) Electrical Model: An equivalent scheme of the train electrical model, equipped with a rheostat, is shown in Fig. 2. In this work, we assume that the electrical grid presents reversible substations so that a partial regenerative braking can take place. A portion of the braking current injected back to the grid can be reused by another train connected to the same substation, while the rest is wasted through the rheostat of the braking train whenever the voltage exceeds a predefined threshold V th > 0.
The train absorbs the dc I ∈ R from the catenary grid during the traction phase, behaving as a load, while it operates as a current generator during the braking phase. Let us denote with I T (v) the traction current, and with I B (v) the braking one, which depends on the train speed as shown in Appendix. Whenever the train brakes, part of the current I B (v) flows through the rheostat to avoid an excessive voltage increase on the catenary. Denoting with I rh the current flowing through the rheostat, the dissipated electrical power is where the fraction value η rh ∈ [0, 1] is Therefore, the total current absorbed, or provided, by the train to the catenary grid results in being where the function g(·) is introduced for notational simplicity.

B. Catenary Grid Model
The catenary grid interface is the most widely used solution in electrical railway systems. In this article, we assume that the catenary grid enables bidirectional power flow such that traction power is provided to the train when this is in traction mode (i.e., u ≥ 0), while the braking power is partially converted into electrical power during the so-called regenerative mode (i.e., u < 0).
Before describing the overall catenary grid, the model of a short track (typically less than 5 km) with one single substation and one train is first presented. The substation can be modeled by a voltage generator, namely V s > 0, while rails and catenary lines can be represented through variable resistors depending on the relative distance of the train with respect to the substation, i.e., r · s, with r being the resistance per space of the line. Hence, the train voltage can be written as where I ℓ is the current line, which in this case is equal to I since one substation with a single train is considered. Consider now the catenary grid in Fig. 3, representing a generic railway scenario. This is electrically supplied from two sides, indicated with voltage generators V s , which have distance D between each other, giving rise to bilateral electrical substations.
The presented catenary grid comprises n trains traveling in two separate railway tracks, where p ≤ n trains travel on one track in a direction and other q = n − p trains travel on the other track in the opposite direction. For the sake of simplicity, it is assumed that, for each track, all trains start their journey from the same initial position and at different time instants t [i] 0 , where the notation · [i] is used to indicate variables associated with the ith train.
Hence, the sets P = {1, . . . , p} and Q = { p + 1, . . . , n} are introduced, where P includes the sequence of trains in the first track (circuit at the bottom in Fig. 3), while Q includes the ones in the second track (circuit on the top in Fig. 3). In particular, for each set, trains are numbered in decreasing order with respect to their starting time t [i] 0 (i.e., the first train in each set is the last one leaving the initial position of the track). It follows that , n] and the set N := P ∪ Q comprises all trains in the two tracks.
At this stage, the overall catenary grid model is presented and the following vectors are introduced: where V, I, and I ℓ comprise train voltages, currents, and the catenary line currents, respectively (see Fig. 3). By applying the Kirchhoff laws, the catenary grid model is described as where and G(s [1] , . . . , s [n] ) ∈ R 2n+2×2n+2 is a matrix function that can be written as The matrix E ∈ R n+2×n in (13) can be written as where the matrices P ∈ R p+1× p and Q ∈ R q+1×q have elements On the other hand, L in (13) is a diagonal matrix comprising all catenary resistances, which depend on the distance covered by trains. Thus, introducing the auxiliary vectors ρ and φ, i.e., Note that, in the case of multiple trains, catenary line resistances depend on the distance between consecutive trains on each railway track, and therefore they vary over time.

C. Single Train Eco-Drive Control Problem
Now, let us introduce the eco-drive control problem aimed at minimizing the energy consumption of each ith train while fulfilling the constraints (2), and making the train arrive at the final station at a prescribed time instant t [i] f . As this problem is independently applied to each train, the notation [i] is here omitted. The eco-drive problem consists in minimizing the discretized integral of the square value of the train ACC in traction Therefore, it follows that where k 0 := ⌊(t 0 /T )⌋ and k f := ⌊(t f /T )⌋ are the initial and the final time step of the train journey, respectively, while f (s k , v k , u k ) represents the system dynamics (1) under (3) and (4). Remark 1 (Comfortability): It is worth noticing that problem (14) does not only enable to reduce train's energy consumption, but it is also beneficial from passengers' perspective, as their comfort is much higher when ACCs are reduced. The problem stated in (14) is a nonlinear control problem characterized by high computational complexity, as the whole travel time horizon k f is considered and the problem is nonconvex, e.g., considering (3) and (4). On the other hand, each train is independently optimized in (14), and the joint coordination of multiple trains to maximize the overall energy efficiency and minimize electrical grid losses is not addressed. Therefore, alternative efficient control strategies are hereafter proposed.

III. PROPOSED SWITCHING PREDICTIVE CONTROL
Having in mind DAS trains, a quantization of the input handle is needed to make human assistance easier, meaning that, instead of inputs taking any value in a connected compact set, the proposed predictive controller will suggest to the driver one out of a finite discrete set of possible driving modes. Since m = 4 operation modes can be used to capture the dynamics of the train [3], as depicted in Fig. 4, the input handle can be accordingly quantized.
The considered train motion modes and the corresponding values of the input handle used in (3), provided by Alstom rail transport relying on data analysis and computational insights in the field, are: 1) ACC mode, where the handle can assume two values u ∈ {0.5, 1}, selected by the optimizer in order to enable more flexibility for energy savings over all the track; 2) CR mode, where the train travels at constant speed, thus the input handle is properly selected, as u = u cr ; 3) CO mode, where the traction force is null and so u = 0; and 4) BR mode, where the maximum braking force is assumed to be selected for safety reason, i.e., u = −1, see (3b). In particular, to maintain constant speed in CR mode, the input handle u = u cr is automatically computed by an inner control loop ensuring that F T = F R for positive slopes and F B = F R for negative slopes.
Therefore, introducing the switching signal σ k ∈ = {1, . . . , 5} and the set U sw = {0.5, 1, u cr , 0, −1}, the input handle u k (σ k ) ∈ U sw can be modeled as a switching input. This enables to reformulate the train dynamic model (14b) as a switched system, i.e., where f is a nonlinear function due to train forces dependency on speed and position (3) and (4). Using (15) for the train dynamic model, (14) becomes a switching control problem where the integer variable σ k , ∀ k ∈ [k 0 , k f ], must be optimized, eventually defining the optimal values of the input handle suggested by the DAS. Nevertheless, this can still be not a practical approach as the whole train travel time is considered in (14), possibly leading to computational-intensive problem solutions. To overcome this issue, a switching predictive control strategy exploiting the receding horizon approach is hereafter proposed.

A. SNMPC for the Single Train Eco-Drive Problem
An SNMPC control problem is formulated to be solved at each time instant k ∈ N 0 . The adopted prediction horizon is defined as T k := {k, . . . , k + N − 1} ∩ {k 0 , . . . , k f }, with the integer N ≥ 1, so as to exclude the time instants out of the train journey in the SNMPC problem. For the sake of notational compactness, let us introduce N k := min(k f −k, N ), so that k + N k − 1 is always the final time step in T k . In the following, the index t is used to span along the prediction horizon, i.e., t ∈ T k .
Since a finite prediction horizon T k is considered, the final constraint on the position cannot be imposed, i.e., s k f = s f in (14d). Hence, this is relaxed and included as an additional term in the SNMPC cost function. This is defined as The first term l(·) in (16) expresses the eco-drive problem cost function (14a), while the second term w(·) is used to avoid unnecessary switching of the input handle, making the human driver assistance easier and improving passengers comfort. The third term ξ(·) in (16) evaluates the final position error with respect to the space horizon S k , which is a parameter representing the distance that must be traveled over the prediction horizon to guarantee the prescribed arrival time.
Remark 2 (Space Horizon): The value S k in ξ(s k+N k ) can be computed according to a heuristic procedure. For instance, the train all-out solution (that is the one giving the shortest arrival time compatible with the train parameters and constraints) can be exploited.
The weight γ ∈ [0, 1] in (16) is a tuning parameter, either prioritizing the reduction of train ACC, and so the absorbed current, or increasing the traveled distance and consequently minimizing the travel time. Introducing σ k = [σ k , . . . , σ k+N k −1 ] ′ , the SNMPC formulation for the eco-drive problem is stated as where [s k ,ṽ k ] ′ expresses the measured state at each k ∈ N 0 . The formulated SNMPC problem (17) can be still computational-demanding, so that actually further realistic simplifications have to be considered. These have been defined in accordance with the industrial partner Alstom rail transport, which provided the real-world test data presented in Appendix. The adopted simplification guidelines are hereafter reported.
1) Braking Distance Precomputation: As the train approaches its final position, it must brake to satisfy the final state condition (14d). In this context, the braking distance D BR can be computed, representing the space needed by the train to go from the actual speed to zero when the BR mode is activated, as depicted in Fig. 5.
Under the BR condition, the train model (1) becomes an autonomous dynamical system implying that the state-free motion starting from an initial condition s k =s k , v k =ṽ k can be analyzed. The number of time steps needed to stop the train, denoted as k BR , can be computed by iterating the speed dynamical equation, i.e., where the state dynamics (18) is recursively substituted in (19). Therefore, exploiting the dynamical equation of the position, the braking distance can be computed as The information on the braking distance can be used to force the train to brake when the remaining distance D BR,k := s f −s k is equal to or lower than D BR,k , as evident from Fig. 5. Introducing the Boolean variable δ BR,k , defined as δ BR,k = 1 if D BR,k ≥ D BR,k , the following constraints can be included to (17) to force the BR mode: where t ∈ T k , ϵ > 0 in (21a) is chosen as a very small number, while H ≫ 0 in (21) as a very large one [25].
The braking distance D BR,k is also analyzed at each k ∈ N 0 , right before executing the SNMPC problem (17). In fact, in case D BR,k ≥ D BR,k , the problem (17) is avoided to be solved and the BR mode is directly forced, posing u k (σ k ) = −1 until the train stops.
2) Switching Rules: The optimal input sequence obtained by (17), denoted as u * k = [u * k (σ * k ), . . . , u * k+N k −1 (σ * k+N k −1 )], is contained in the set of all possible input sequences W, where in particular |W| = (m+1) N k . This number is strictly related to the computational complexity of (17), and it can become very large in the presence of large prediction horizons. To overcome this issue, switching rules are introduced, reducing the set of feasible input sequences, i.e., u * k ∈ F ⊂ W. The latter are determined relying on driving data analysis in the field so that the permitted switchings between modes are those described by the finite state machine diagram depicted in Fig. 6. In particular, it is imposed that: 1) a direct transition between the ACC and the BR mode cannot occur; 2) a direct transition from the BR mode to the CR mode cannot occur; and 3) apart from the medium ACC mode (u = 0.5), a direct transition between the maximum ACC mode (u = 1) and any other mode cannot occur. The switching rules can be easily implemented as mixed-integer linear constraints using techniques discussed in [25].
3) Move-Blocking Strategy: To further reduce the computational burden of the algorithm, the move-blocking parametrization approach can be adopted [26]. According to this strategy, the input variables are constrained to vary at each N u steps along the prediction horizon, instead of at each time instant, where 1 < N u < N . This approach can drastically reduce the set of possible input sequences, and so the computational complexity, still being able to vary the input at any time instant as (17) is solved at each k ∈ N 0 . The eco-drive control problem presented in (14), solved through the SNMPC strategy in (17), considers the energy consumption minimization of each single train, without taking into account the overall system. Nevertheless, as described in Section II-B, multiple trains supplied by the same power line are all electrically connected. This means that their joint operation can be controlled so as to maximize the energy efficiency of the overall railway system.
In particular, energy dissipations in catenary lines and train rheostats can be minimized by coordinating the operation modes of the multiple trains. As an example, the regenerative energy recovered by a train while in the BR mode, instead of being passively transferred to the substations or dissipated by the rheostat, can be re-used by the "closest" train connected to the grid through its synchronous activation of the ACC mode, as shown in Fig. 7. This joint coordination will have the beneficial effect of minimizing energy losses in railway systems, still enabling trains to arrive at their destinations in prescribed time. To accomplish this task, a collaborative control strategy is designed and presented in the following.

B. SNMPC for Collaborative Eco-Drive
The collaborative control strategy involves the joint optimization of the operations of all trains in N , always according to an SNMPC approach, solved at each k ∈ N 0 . In particular, each ith train is characterized by its own prediction horizon considering the initial and final instants, i.e., The maximum prediction horizon is also introduced and defined as T k := ∪ ∀ i∈N T [i] k . As mentioned, the control problem presented in this section enables not only to optimize energy exchanges between trains but also to reduce electrical power losses. Therefore, the cost function J † t related to each ith train is defined as where the first terms are defined as in (16), while the last term comprises the rheostat power losses. Note also that the weight γ k is now time-varying, as it will be optimized at each k ∈ N 0 to enhance the collaboration between trains.
The SNMPC problem for collaborative trains is stated as The cost function (23a) aims at minimizing trains' local cost functions and the power losses in the catenary grid weighted by γ ℓ . The latter are computed through the resistance matrix L t and the line currents, modeled in (23i) as described in Section II-B. Among the constraints, the dynamical and electrical train models are considered in (23b)-(23d), the local train constraints in (23e) and (23f), while (23g) avoids optimizing trains out of their starting and arrival time. Finally, (23h) is also included, as γ [i] k is now an optimization variable, where ⊆ [0, 1] is a suitably chosen finite set to limit the computational burden.
The variable γ [i] k in (23) plays a crucial role in the collaborative control strategy, being optimized to prioritize either the minimization of the train ACC or the remaining space distance. In particular, low values of γ [i] k make the train slow down (i.e., less energy is required), while high values of γ [i] k make the train accelerate (i.e., more energy is absorbed from the catenary grid). The objective of the optimal control problem (23) is actually to coordinate these operations, meanwhile minimizing the overall losses in the catenary. Considering the example shown in Fig. 7, as the second train starts to brake, injecting energy in the catenary grid, the proposed SNMPC determines an increase of γ [1] k for the first train, so as to reduce its weight of the ACC term, exploiting the energy regenerated by the second train.
Remark 3 (Practical Feasibility): According to a preliminary feasibility study of the proposal, the solution to the SNMPC problem (23) can be computed in correspondence of the substations which trains share during their journey. It is indeed physically reasonable to assume any substation equipped with the needed computational power and capable of receiving data from and sending data to trains, which can in turn communicate any information among each other.  IV. CASE STUDY In this section, the proposed SNMPC is assessed in simulation relying on realistic scenarios based on real data, provided by Alstom rail transport.

A. Settings
The simulated test benchmark consists of two scenarios with two stops and bilateral ESS, one placed at the departure station and the other in correspondence of the second stop. The first scenario represents an illustrative case study with n = p = 2 (i.e., only one track) metro trains, in order to clearly show the concept of collaboration between trains and the advantages of the proposed SNMPC approach. Then, a more complex and realistic scenario is also reported. The latter involves n = 7 metro trains, with p = 4 trains on one track, and q = 3 trains on the other track in the opposite direction. The parameters of the tracks, the trains and the catenary grid, are reported in Appendix. The proposed SNMPC is designed by considering a sampling time T = 1 s and horizon N = 10. The weight on the variation of the input handle in (22) is chosen as γ [i] u = 0.005, ∀ i ∈ N , while = {0.85, 0.98}. This set has been defined after a tuning procedure, choosing its minimum value to fulfill travel time requirements (the smaller γ [i] k , the smaller the weight on the final position), and its maximum value being slightly lower than 1 to never neglect the ACC term in (22).

B. Results on the Two-Train Scenario
Consider now the case of n = p = 2 trains. According to the proposed control logic, the speed profiles of the two trains are depicted in Fig. 8. As expected, the two trains complete their journey in prescribed times, each of them starting at a different k [i] 0 . Moreover, despite the relaxation of the final state constraint (14d), the trains travel the required distance to reach the final stops, as reported in Fig. 9.  The collaborative behavior induced by the proposed SNMPC is also evident from Fig. 8. In fact, during the BR phase of each train in correspondence of the first stop, one has that the other train starts to accelerate, thus exploiting the regenerated energy. The shadow windows in Fig. 8 highlight such phases. It is worth highlighting that when train i = 2 brakes between 210 and 225 s, train i = 1 does not exploit the regenerated energy to accelerate, that is no collaboration occurs. This happens because, in that time interval, train i = 2 is closer to the ESS placed at the second stop rather than to train i = 1, as evident also from Fig. 9, and the collaboration between the two trains would imply higher line losses.
The value of γ [i] k is adapted by the SNMPC to enhance such a collaboration, as depicted in Fig. 10. In fact, during the collaborative phases (shadow windows in Fig. 10), the weight γ [i] k is optimized so as to reach its highest value in , thus inducing the ith train to accelerate and recover the regenerated braking energy. The corresponding voltage profiles are depicted in Fig. 11. In particular, it is possible to observe that voltages are kept below the voltage threshold V th by virtue of the rheostat current absorption, thus limiting the current flowing and the voltage drops along the catenary. Finally,  note that the proposed SNMPC has been tested on a laptop with an Intel Core i7-11850H processor, achieving an average computational time of 0.03 s to solve (23).
Comparison and Discussion: In order to further assess the proposed collaborative eco-drive (briefly, C-eco) strategy, a comparison with the corresponding noncollaborative (briefly, NC-eco) counterpart is performed. The latter is meant as the solution to the optimization problem (17), solved independently for each train. In particular, the value of γ [i] is kept constant in (17) and set equal to γ [i] = 0.98 ∈ , ∀ i ∈ N , to fulfill the travel time requirements.
In Fig. 12, it is evident that trains controlled via the NC-eco strategy accomplish their journey in prescribed time, without any interaction between each other (note that the two speed-profiles are identical). Such a behavior corresponds to higher line losses in the catenary grid since all regenerative power is transferred to the substations or wasted through the rheostat instead of being directly shared between trains. On the other hand, it is evident that the total travel time increases in the case of C-eco strategy, as visible also in Fig. 13, where the catenary voltages, whose magnitude is comparable for the two optimization-based approaches, are illustrated.
Finally, the outcomes of the simulation campaign in terms of provided energy from the substations, catenary line losses,  I   PERFORMANCE INDEXES IN THE TWO-TRAIN SCENARIO   TABLE II   PERFORMANCE INDEXES IN THE TWO-TRAIN SCENARIO WITH EQUAL  TRAVEL TIME FOR THE NC-ECO AND THE C-ECO STRATEGIES rheostat losses, and average travel time for each stop are reported in Table I. It is worth noticing that high energy savings are achieved by the collaborative eco-drive at the price of a higher (8%) average travel time. Specifically, if on the one hand, an 11.6% and 16.7% reduction are achieved in terms of energy supplied by the substations and energy saved from lines, respectively, a much higher amount of energy is saved from rheostat power losses, i.e., 36.6%. The results confirm the expected benefits due to the energy exchange conditions between trains.
Remark 4 (Travel Time): As evident from Table I, the NCeco solution allows a shorter travel time with respect to the C-eco strategy, thus leading to higher energy consumption. The NC-eco solution has been also simulated with γ [i] = 0.97, ∀ i ∈ N to achieve the same travel time obtained by using the C-eco strategy. As evident from Table II, even with the same travel time, the C-eco strategy is still more convenient with respect to NC-eco one in terms of energy consumption.

C. Results on the Seven-Train Scenario
In order to assess the scalability of the proposal in a more complex scenario, the case of n = 7 trains is now discussed.
Figs. 14 and 15 on the left show the speed profiles of the p = 4 trains traveling on the first track and the q = 3 trains moving on the other track, respectively. Note that the three trains in the second track move in the opposite direction, and, as a consequence, the optimization takes accordingly into account the track profile. As in the two-train scenario, also in this case the proposed SNMPC induces a collaborative behavior highlighted by the shadow windows in the figures. This collaboration is enhanced by the adaptation of the weight γ [i] k , which reaches the highest value during the collaboration phases, as reported in Figs. 14 and 15 on the right.
It is worth highlighting that, despite the increased number of trains in a more complex scenario, the solution to the proposed SNMPC is still feasible with an average computational time of 0.17 s to solve (23). Clearly, as expected, the computation time rises with the higher number of trains. Yet, even with the most demanding settings, the average computation time for the SNMPC is below T = 1 s. Note that, due to the catenary grid configuration, the proposal could be further sped up via parallelization, thus allowing to linearly scale the proposed algorithm computations with the number of tracks.  Comparison and Discussion: The proposed collaborative eco-drive strategy in this larger-scale scenario is again compared with the corresponding noncollaborative counterpart. The same performance indexes adopted for the two-train scenario are hereafter provided in Table III. Analogously to the previous case, higher energy savings are achieved by the collaborative eco-drive. Although a higher average travel time is evident (less than 30 s) for the collaborative approach, a 7.6% reduction is achieved in terms of energy  III   PERFORMANCE INDEXES IN THE SEVEN-TRAIN SCENARIO supplied by the substations, a 22.5% of energy is saved from lines, and an 83.6% of energy is saved from rheostat power losses, thus again confirming the beneficial effects due to the energy exchange among trains.

V. CONCLUSION
In this article, a novel energy-efficient train control strategy is proposed based on an SNMPC tailored to enhance eco-driving in a collaborative fashion among all the trains connected to the catenary grids. The proposed approach exploits the potential of prediction-based recursive online optimization for minimizing the energy consumption of the trains, contemporarily taking into account power line losses, and guaranteeing constraints satisfaction on speed limits and arrival times. Moreover, the proposal is designed to meet specific requirements that make the implementation of DAS trains possible, where the human driver could easily select the input sequences provided by the controller. A numerical validation based on a realistic simulation environment and real data is also presented showing the potentiality of the proposed approach.
Future works could be devoted to the development of distributed predictive control approaches for trains without catenary grids, and in the presence of storage devices which inevitably imply the introduction of new models and constraints. A future direction could be also that of designing hierarchical collaborative eco-drive control approaches for ATO trains and the optimization of train timetables.

APPENDIX CASE STUDY REAL WORLD TEST DATA
The following data have been provided by Alstom rail transport, relying on real-world test cases.
The parameters of the catenary grid and the metro trains used for the case study described in Section IV are reported in Table IV. The trains are simulated to reach two consecutive stops on the same track. The track length to reach the first stop from the initial position, and the one to reach the second stop from the first one, is the same, i.e., S f = 1237 m. The slope along the track, i.e., α(s), is depicted in Fig. 16, while the curvature radius is r (s) = 0, ∀ s ∈ [0, 2 S f ]. The maximum traction and braking force curves of the trains, i.e., F T (v) and F B (v), are depicted in Fig. 17(a), while the traction and braking currents, i.e., I T (v) and I B (v), are depicted in Fig. 17(b). The start and arrival times for the two-train and seven-train scenarios are reported in Table V.
Finally, with the objective of reducing the computational complexity of the SNMPC problem, a reduced set of feasible handle sequences is considered, according to a predefined