## 3 Problem Formulation  
This section is dedicated to fully explaining the procedure of formulating the eco-driving problem to find the desired speed profile. The objective of the optimization problem is to obtain an optimal speed profile that minimizes energy over a predefined travel route while considering RB and its limitations. To fulfill this, the problem is analyzed by taking advantage of spatial domain equations instead of conventional time domain equations based on (1) [3]:  
\[\frac{dv}{dt}=\frac{dv}{ds}\frac{ds}{dt}=v\frac{dv}{ds} \tag{1}\]  
where \(ds\) represents the traveled distance in m, \(v\) is the vehicle speed in m/s, and \(dt\) is time in seconds. Moreover, the basic form of the objective function is given by:  
\[E=\frac{1}{3600}\bigg{(}\int_{s\in\mathit{acc}/\mathit{cru}}\frac{1}{\eta_{ \mathit{acc}/\mathit{cru}}}Fds+\int_{s\in\mathit{dc}}\eta_{\mathit{dec}}Fds \bigg{)} \tag{2}\]  
where \(E\) is the total energy in Wh comprised of the acceleration/cruising energy and the RB energy during deceleration, and \(\eta_{\mathit{acc}/\mathit{cru}}\) and \(\eta_{\mathit{dec}}\) represent the powertrain efficiency during acceleration/cruising and during deceleration, respectively. \(F\) denotes the vehicle tractive force in \(N\) and can be written as:  
\[F=F_{R}+ma \tag{3}\]  
where \(m\) is the mass of vehicle in kg, \(a\) is the acceleration/deceleration of the vehicle in m/s\({}^{2}\) and \(F_{R}\) is the total resistive force acting on the vehicle in N. The total resistive force can be broken down to the different components below:  
\[F_{R}=F_{w}+F_{g}+F_{r}=\frac{1}{2}\rho_{a}C_{d}A_{f}(v-v_{w})^{2}+mg\mathit{ sin}(\alpha)+mgf_{r}\mathit{cos}(\alpha) \tag{4}\]  
Where \(F_{w}\) is the aerodynamic drag, \(F_{g}\) is the grading resistance, and \(F_{r}\) is the rolling resistance, all in \(N\). Moreover, \(\rho_{a}\) is the mass air density of the air in kg/m\({}^{3}\), \(f_{r}\) is the rolling resistance coefficient of the tires, \(C_{d}\) is the aerodynamic drag coefficient that characterizes the shape of the vehicle's body, \(\alpha\) is the road slope angle, \(A_{f}\) is the frontal area of the vehicle in m\({}^{2}\), \(v\) is the vehicle's speed in m/s, and \(v_{w}\) is component of the wind speed on the same direction as the vehicle movement, measured in m/s. While accelerating or cruising on a flat road with no wind, \(F\) becomes positive, indicating that the energy flows from the  
Figure 1: Three-dimensional plot showing dynamic low speed boundary (dashed line) as the threshold for current direction change at different operating points. battery pack to the electric motor. During deceleration, however, \(F\) can have a negative value, meaning that energy can be extracted and stored in the battery. Traffic-based constraints for this eco-driving problem are expressed by (5)-(7)  
\[v_{l}\leq v\leq v_{u} \tag{5}\]  
where \(v_{u}\) and \(v_{l}\) are upper and lower speed bounds along the route, meaning that high and low limitations on the vehicle speed are imposed. \[t=\int_{t_{0}}^{t_{N}}dt=\int_{0}^{S}\frac{1}{v}ds\leq t_{max} \tag{6}\]  
where \(S\) is the total distance of the route to be travelled. This constraint enforces the AEV to complete the entire route no later than \(t_{max}\). \[a_{max,dec}\leq a=v\frac{dv}{ds}\leq a_{max,acc} \tag{7}\]  
where \(a_{max,acc}\) and \(a_{max,dec}\) are the maximum possible acceleration and deceleration rates that the vehicle can achieve, respectively. This constraint guarantees that the calculated vehicle acceleration/deceleration rates stay below the vehicle's capability. It also determines the feasible region of possible speed states at each step. For each step, acceleration is assumed to be constant and is calculated from the speed of current and next step:  
\[a=\frac{v_{k}^{2}-v_{i}^{2}}{2\Delta s} \tag{8}\]  
where \(v_{i}\) and \(v_{k}\) denote the speed at the current step and next step, respectively, and \(\Delta s\) is the length of each step.