In this chapter, the general methods for computing eco-driving strategies introduced in Chap. 6 are applied to several driving scenarios. These scenarios roughly reflect the list of Sect. 6.1.1 and comprise of: acceleration to a cruise speed (Sect. 7.1), deceleration to stop (Sect. 7.2), cruising with road slopes (Sect. 7.3), driving between stops with a speed limit (Sect. 7.5), approaching an intersection (Sect. 7.6), approaching a traffic light (Sect. 7.7), and car following (Sect. 7.8).

From the viewpoint of the driving optimization, the first two scenarios do not present external constraints. We shall study the influence of the optimization horizons, and compare the optimal speed profile to typical driving behavior as described by the models of Sect. 4.2.1. For the other scenarios, which are characterized by external constraints, we shall investigate the role of predictive information, which have already been broadly discussed in Sect. 6.1.2, and we shall evaluate the associated energy benefits. For all scenarios, we shall make use of the numerical methods of Chap. 6 to solve the corresponding ED-OCPs. To better illustrate the influence of the various parameters, we also solve several subproblems in an analytical fashion, using the simplified EV model of Sect. 6.5.3.3.

7.1 Acceleration

In this scenario, a target speed \(v_f\) is to be reached from rest in a given distance \(s_f\) and in a free time \(t_f\), or with both distance and time being free parameters. A numerical analysis of this scenario is presented in Sect. 7.1.1. Then in Sect. 7.1.2 we use closed-form solutions of the ED-OCP (6.64) to corroborate the numerical results.

7.1.1 Numerical Analysis

Figure 7.1 shows the numerical results obtained with the DP Algorithm 6 for the ICEV of Table 6.2 and the EV of Table 6.3, for varying end time and given the end position.

In the case of an ICEV, the speed profiles consist of two acceleration phases separated by a pulse-and-glide phase, whose duration increases with the required end time. In the case of an EV, the speed profiles are smoother. For both propulsion systems, when the required end time becomes shorter, the calculated speed profile might first cross the target final speed and then retrieve it with a deceleration phase. The energy consumption generally decreases with an increase of the final time.

Fig. 7.1
figure 1

Optimal speed profiles and Gipps’ speed profile for an acceleration from 0 to 50 km/h with \(s_f=200\) m and varying final time \(t_f\), for an ICEV (a) and an EV (c). Energy consumption as a function of final time, (b) and (d). The black curves and dots represent Gipps’ model

As a basis of comparison, the output of Gipps’ model (4.6) is also shown in the figures. The parameters of the latter are \(a_{max}=1.5\) m/s\(^2\), \(a_{min}=-1\) m/s\(^2\), which yield an acceleration time, that is, the time at which the computed speed reaches within a band of ±0.5 m/s around the target speed, of about 21 s. Calculation of energy consumption for both powertrains (datum not shown for ICEV due to scale) reveals that Gipps’ driving is clearly far from being energy optimal.

7.1.2 Analytical Approach

In order to retrieve and explain the behavior shown by the numerical results of the previous section, we use the simplified EV model of Sect. 6.5.3.3, for which explicit solutions of the ED-OCP can be calculated.

7.1.2.1 Optimal Strategy

The solution of the ED-OCP for the considered EV model is given by (6.74) and (6.75), which we repeat here for \(v_i=0\),

$$\begin{aligned} v(t) = - \frac{2v_f t}{t_f} - \frac{6s_ft^2}{t_f^3} + \frac{6s_ft}{t_f^2} + \frac{3v_f t^2}{t_f^2} \,, \end{aligned}$$
(7.1)
$$\begin{aligned} E_{b} = mhs_f + m \frac{v_f^2}{2} + bh^2t_f + 2bhv_f + 4b \left( \frac{3s_f^2}{t_f^3} - \frac{3s_fv_f}{t_f^2} + \frac{v_f^2}{t_f} \right) \,, \end{aligned}$$
(7.2)

where only the last term represents the effective energy consumption \(E_{b, e}\) as defined in Sect. 6.5.3.3.

First we study the domain of validity of (7.1) in terms of \(t_f\) and \(s_f\), looking for conditions of the type \(F(s_f, t_f)\ge 0\). We use the general results derived in Appendix B and particularize them for \(v_i=0\). A first condition (see (B.14)) is obtained by requiring that the speed profile never becomes negative, which is equivalent to imposing that \(\dot{v}(0)\ge 0\), and reads

$$\begin{aligned} F_{UB1}\triangleq 3s_f - v_ft_f \ge 0\;. \end{aligned}$$
(7.3)

Further, we can impose a maximum speed \(v_{max}\) not to exceed during the acceleration, which leads to the condition (see (B.16))

$$\begin{aligned} F_{LB1}\triangleq \frac{v_f+v_{max}+\sqrt{v_{max}^2-v_fv_{max}}}{3}-\frac{s_f}{t_f}\ge 0\;. \end{aligned}$$
(7.4)

We can also impose the maximum initial acceleration that is allowed. Denoting this value with \(a_{max}\), we obtain (see (B.24) and (B.23))

$$\begin{aligned} F_{LB2}\triangleq -6s_f+2v_ft_f+t_f^2a_{max}\ge 0\;. \end{aligned}$$
(7.5)

and

$$\begin{aligned} F_{UB2}\triangleq 6s_f-4v_ft_f+t_f^2a_{max}\ge 0\;. \end{aligned}$$
(7.6)

The resulting domain of feasibility is illustrated in Fig. 7.2.

Fig. 7.2
figure 2

Domain of feasibility (shaded gray area) of the parabolic speed profile in the plane \(t_f\)\(s_f\) for the acceleration scenario. The curves shown are: \(F_{UB1}\) (orange), \(F_{LB1}\) (purple), \(F_{UB2}\) (green), and \(F_{LB2}\) (blue). Coordinates of the intersection points are A: (\(2/3\cdot \sigma \), \(2\tau \)), B: (\(2/3\cdot \sigma /\upbeta ^2(1+\sqrt{1-\upbeta })(\upbeta +1+\sqrt{1-\upbeta })\), \(2\tau /\upbeta (1+\sqrt{1-\upbeta })\)), and C: (\(\sigma /2\), \(\tau \)), where \(\tau \triangleq v_f/a_{max}\), \(\upbeta \triangleq v_f/v_{max}\), and \(\sigma \triangleq v_f^2/a_{max}\). Also shown (dashed) is the upper bound of the domain of feasibility of the simplified Gipps’ profile

Now we can study the case of a free final time \(t_f\in [t_{f,min},t_{f, max}]\), where \(t_{f, min}\) is given as a function of \(s_f\) by (7.4) or (7.5), while \(t_{f, max}\) by (7.3) or (7.6), as depicted in Fig. 7.2. Local minima of \(E_b\) are found by setting

$$\begin{aligned} \frac{\partial E_b}{\partial t_f} = bh^2+4b \left( \frac{-9s_f^2}{t_f^4} +\frac{6s_fv_f}{t_f^3} - \frac{v_f^2}{t_f^2} \right) =0 \;, \end{aligned}$$
(7.7)

which has four solutions in \(t_f\). For a realistic choice of the parameters, one solution is negative and must be discarded. Among the remaining three, one solution corresponds to a local maximum and two to local minima, with the energy becoming infinitely large for very large end times. The first local minimum is at

$$\begin{aligned} t_f^*=\frac{-v_f+\sqrt{v_f^2+6hs_f}}{h}\;. \end{aligned}$$
(7.8)

For small h, this value may be larger than \(t_{f, max}\). Therefore the energy consumption is a decreasing function of time and the optimal time is \(t_{f, max}\). However, for large values of h (typically, positive slopes), the quantity (7.8) can be lower than the upper bound and thus represents the global minimum. Such a behavior is illustrated in Fig. 7.3, in terms of the normalized energy consumption \(E_b/E_W\) (see (2.5) for the definition of the energy at the wheels \(E_W\)) for two different road grades. The curve for \(\upalpha =10\%\) has a minimum, while that for \(\upalpha =0\) is continuously decreasing.

Fig. 7.3
figure 3

Analytical optimal speed profiles for an acceleration from 0 to 50 km/h with varying final time, \(s_f=200\) m (a). Normalized energy consumption as a function of final time, for \(\upalpha =0\) and \(\upalpha =10\%\) (b). The simplified EV model parameters used are: \(m=1100\) kg, \(h=0.1472\) (\(\upalpha =0\)), \(h=1.1282\) (\(\upalpha =10\%\)), \(b=147.5\)

7.1.2.2 Gipps’ Driving

The full Gipps’ model during an acceleration maneuver is not easily integrable to be used with the simplified EV energy consumption model. However, observing the results of its numerical simulation, it becomes apparent that a simple enough approximation of the speed profile is

$$\begin{aligned} v(t)= {\left\{ \begin{array}{ll} a_{1}t, &{} t\in [0,t_1] \\ v_f, &{} t\in [t_1,t_f] \end{array}\right. }\;, \end{aligned}$$
(7.9)

where \(a_{1}t_1=v_f\). The fulfillment of final distance yields the further condition \(v_ft_f-1/2v_f^2/a_{1}=s_f\), from which the relations

$$\begin{aligned} a_{1}=\frac{v_f^2}{2(v_ft_f-s_f)}\;, \quad t_1=\frac{2(v_ft_f-s_f)}{v_f} \end{aligned}$$
(7.10)

hold. The latter equations bring the bounds for the final time, that is, \(s_f \le v_f t_f \le 2s_f\), which are shown in Fig. 7.2.

The effective energy consumption is evaluated as

$$\begin{aligned} E_{b, e}=\frac{bv_f^3}{2t_f(v_ft_f-s_f)}\;, \end{aligned}$$
(7.11)

which is shown to be always positive and larger than with the optimal strategy, see Fig. 7.3b.

7.2 Deceleration

In this scenario, the vehicle must decelerate from a given speed \(v_i\) to stop in a given distance \(s_f\) and free time \(t_f\). A numerical analysis of this scenario is presented in Sect. 7.2.1. Then in Sect. 7.2.2 we use closed-form solutions of the ED-OCP (6.64) to corroborate the numerical results.

Fig. 7.4
figure 4

Optimal speed profiles for a deceleration from 50 km/h to stop in 200 m with varying final time, for an ICEV (a) and an EV (c). Energy consumption as a function of final time, (b) and (d). The black curves and dots represent Gipps’ model

7.2.1 Numerical Analysis

Figure 7.4 shows the numerical results obtained with the DP Algorithm 6 for the ICEV of Table 6.2 and the EV of Table 6.3, for varying end time and given end position.

In the case of an ICEV, the speed profiles may consist of an initial acceleration, followed by coasting and braking phases, as anticipated in the analysis of Sect. 6.4, although in principle slower decelerations could be achieved by interposing a coasting phase between two braking phases. The maximum deceleration time considered is when only coasting and braking are used. In the case of an EV, the speed profiles are smoother and larger end times are allowed. The energy consumption generally decreases with the final time and becomes negative in the EV case due to larger proportion of regenerative braking.

The output of the Gipps’ model (4.6) with \(a_{min}=-1\) m/s\(^2\) is also shown in the figures. Calculation of energy consumption for both powertrains again reveals that Gipps’ driving is far from being energy optimal.

7.2.2 Analytical Approach

In order to retrieve and explain the behavior shown by the numerical results of the previous section, we use the simplified EV model of Sect. 6.5.3.3, for which explicit solutions of the ED-OCP can be calculated.

7.2.2.1 Optimal Strategy

The solution of the ED-OCP for the considered model is given by (6.74) and (6.75), which we repeat here for \(v_f=0\),

$$\begin{aligned} v(t) = v_i-\frac{4v_it}{t_f} - \frac{6s_ft^2}{t_f^3} + \frac{6s_ft}{t_f^2} + \frac{3v_it^2}{t_f^2} \;, \end{aligned}$$
(7.12)
$$\begin{aligned} E_{b} = mhs_f - m \frac{v_i^2}{2} + bh^2t_f - 2bhv_i + 4b \left( \frac{3s_f^2}{t_f^3} - \frac{3s_fv_i}{t_f^2} + \frac{v_i^2}{t_f} \right) \,. \end{aligned}$$
(7.13)

Similarly to the previous section, we find the conditions \(F(t_f, s_f)\ge 0\) for which (7.12) is an admissible speed profile. We use the general results derived in Appendix B and particularize them for \(v_f=0\). Imposing that the speed profile never becomes negative yields

$$\begin{aligned} F_{UB1}\triangleq 3s_f - v_it_f \ge 0\;. \end{aligned}$$
(7.14)

Imposing a maximum speed \(v_{max}\) yields

$$\begin{aligned} F_{LB1}\triangleq \frac{v_i+v_{max}+\sqrt{v_{max}^2-v_iv_{max}}}{3}-\frac{s_f}{t_f}\ge 0\;. \end{aligned}$$
(7.15)

Imposing the maximum deceleration \(a_{min}\) yields

$$\begin{aligned} F_{LB2}\triangleq -6s_f+2v_it_f-t_f^2a_{min}\ge 0 \end{aligned}$$
(7.16)

and

$$\begin{aligned} F_{UB2}\triangleq 6s_f-4v_it_f-t_f^2a_{min}\ge 0\;. \end{aligned}$$
(7.17)

The resulting feasibility domain is illustrated in Fig. 7.2.

Fig. 7.5
figure 5

Domain of feasibility (shaded gray area) of the parabolic speed profile in the plane \(t_f\)\(s_f\) for the deceleration scenario. The curves shown are: \(F_{UB1}\) (orange), \(F_{LB1}\) (purple), \(F_{UB2}\) (green), and \(F_{LB2}\) (blue). The coordinates of the intersection points are A: (\(2/3\sigma \), \(2\tau \)), B: (\(2/3\cdot \sigma /\upbeta ^2(1+\sqrt{1-\upbeta })(\upbeta +1+\sqrt{1-\upbeta })\), \(2\tau /\upbeta (1+\sqrt{1-\upbeta })\)), and C: (\(\sigma /2\), \(\tau \)), where \(\tau \triangleq v_f/|a_{min}|\), \(\upbeta \triangleq v_f/v_{max}\), and \(\sigma \triangleq v_f^2/|a_{min}|\). Also shown (dashed) is the upper bound of the domain of feasibility of the simplified Gipps’ profile

Now we study the case of a free final time \(t_f\in [t_{f,min},t_{f, max}]\), where \(t_{f, max}\) is given as a function of \(s_f\) by (7.14), while \(t_{f, min}\) is given by (7.15) or (7.16), as depicted in Fig. 7.5. In both cases, the same expressions as in the acceleration scenario are obtained, with \(|a_{min}|\) replacing \(a_{max}\) and \(v_i\) replacing \(v_f\). Therefore, (7.7) and (7.8) are still valid with the aforementioned replacements.

The consumed energy is now lower in absolute value than the wheel energy, which is a negative quantity. As shown in Fig. 7.6, the stationary point (7.8) is now a maximum. However, the latter belongs to the feasibility domain only for sufficiently low road grades (steep downhills).

Fig. 7.6
figure 6

Analytical optimal speed profiles for a deceleration from 50 km/h to stop, with varying final time, \(s_f=200\) m (a). Normalized energy consumption as a function of final time, for \(\upalpha =0\) and \(\upalpha =-10\%\) (b). The simplified EV model parameters used are: \(m=1100\) kg, \(h=0.1472\) (\(\upalpha =0\)), \(h=-0.834\) (\(\upalpha =-10\%\)), \(b=147.5\)

7.2.2.2 Gipps’ Driving

The Gipps’ model is easily integrable in the deceleration case, at least for small step times \(\Delta t\) (see Eq. 4.6), yielding a speed profile

$$\begin{aligned} v(t) = {\left\{ \begin{array}{ll} v_i,&{} t\in [0,t_1] \\ v_i+a_{1}t, &{} t\in [t_1,t_f] \end{array}\right. }\;, \end{aligned}$$
(7.18)

where \(t_f-t_1=v_i/|a_{1}|\). The fulfillment of the final distance yields the further condition \(v_it_f-v_f^2/(2|a_{1}|)=s_f\), from whence the relations

$$\begin{aligned} a_{1}=-\frac{v_i^2}{2(v_it_f-s_f)}\;, \quad t_1=\frac{2s_f}{v_i}-t_f \end{aligned}$$
(7.19)

hold. The latter equations impose the bounds on the final time, \(s_f\le v_it_f \le 2s_f\), which are shown in Fig. 7.5.

The effective energy is evaluated as

$$\begin{aligned} E_{b, e}=\frac{bv_i^3}{2(v_it_f-s_f)}\;, \end{aligned}$$
(7.20)

which is shown to be always positive and larger than with the optimal strategy, see Fig. 7.6.

7.3 Road Slopes

As anticipated in Chap. 1, a dominating factor in vehicle power demand is road grade, in particular on steep roads, and more so for heavier vehicles. Therefore, not surprisingly, energy-optimal speed profiles are strongly affected by road grade and its prior knowledge is highly beneficial in predictive eco-driving. For example, a vehicle can slow down in anticipation of a steep descent or speed up in preparation for a climb.

In this section we aim at illustrating the dependency between road grade and optimal speed. We consider the baseline situation of cruising at constant speed (e.g., on a highway) and we introduce a sinusoidal altitude profile of the type

$$\begin{aligned} z(s) = z_0 \sin (\Omega s) + z_1\,, \end{aligned}$$
(7.21)

from which grade is evaluated as

$$\begin{aligned} \upalpha (s)=dz(s)/ds=\Omega z_0 \cos (\Omega s)\;. \end{aligned}$$
(7.22)

Note that the absolute altitude level \(z_1\) has no influence on \(\upalpha \). A numerical analysis of this scenario is presented in Sect. 7.3.1. Then in Sect. 7.3.2 we use closed-form solutions of the ED-OCP (6.64) to corroborate the numerical results.

7.3.1 Numerical Analysis

We consider a baseline scenario (\(z_0=0\)) of cruising at a constant speed of 36 km/h. Figure 7.7a, b show the optimal speed profiles obtained with the DP (Algorithm 6) for the ICEV in Table 6.2 and the EV in Table 6.3, respectively for varying \(z_0\). These optimization results confirm the intuitive rule that a vehicle should be slowed down before a downhill and accelerated before a climb. In other terms, one can observe an inverse correlation between optimal speed and altitude, that would be in principle useful to adapt speed when future altitude (grade) is estimated.

Fig. 7.7
figure 7

Optimal speed profiles for sinusoidal slope profiles of the type (7.21), with \(\Omega =\pi /100\) m\(^{-1}\) and \(z_0=\{-4,-2,0,2,4\}\) m, \(v_i=v_f=36\) km/h, \(s_f=200\) m, \(t_f=20 \pm 1\) s, and measures of performance, for an ICEV (a, c) and an EV (b, d). Normalized altitude profile is shown as a dashed line

We can regard the optimal speed profile as the output of a predictive (P) eco-driving strategy that, using GPS and 3D GIS information (see Sect. 4.1), perfectly anticipates the upcoming road slope. To illustrate the effects of such preview, we compare the energy consumption of the P strategy with that of a non-predictive strategy (NP) that has no preview and would keep following a constant speed despite the slope changes. We define a measure of performance as

$$\begin{aligned} \varepsilon = \frac{E_T^{(NP)}-E_T^{(P)}}{E_T^{(P)}}\;, \end{aligned}$$
(7.23)

where \(E_T\) is the tank energy, that is, the fuel energy for the ICEV and the battery energy for the EV, while the superscripts P, NP stand for the predictive and non-predictive strategies, respectively.

Figure 7.7c, d show the calculated values of \(\varepsilon \) as a function of \(z_0\). Clearly, the higher \(z_0\) in absolute value, the higher \(\varepsilon \). The ICEV is affected more than the EV by the prediction of the road slope. The numbers reveal that keeping a constant speed (actually, the optimal speed for \(z_0=0\), which is a pulse-and-glide profile) can consume two to three times more energy than following the optimal slope-sensitive speed profile.

7.3.2 Analytical Approach

In order to retrieve and explain the behavior shown by the numerical results of the previous section, we use the simplified EV model of Sect. 6.5.3.3, for which explicit solutions of the ED-OCP can be calculated.

With respect to the assumptions in that section, here we relax the constancy of slope and make the resistance term h(s) variable with the position. According to (7.21), the resistance term is evaluated as

$$\begin{aligned} h(s) = h_0 + g\upalpha (s)=h_0+g\Omega z_0 \cos (\Omega s)\;, \end{aligned}$$
(7.24)

where \(h_0\) is the constant factor due to rolling resistance, g is gravity and \(\Omega \) is chosen such that the net difference of altitude is zero, i.e., \(\sin (\Omega s_f)=0\).

To solve this problem in a closed form, we consider \(v_i=v_f=s_f/t_f\) and perturb the solution for \(z_0=0\), which is trivially \(v(t)\equiv s_f/t_f\). We consider small altitude variations, i.e., \(gz_0 \ll (s_f/t_f)^2\), and small resistance forces, i.e., \(bh_0 \ll (s_f/t_f)\). With these positions, it is easy to show that the control input \(u_p(t)\approx h_0\) and the speed profile

$$\begin{aligned} v(t) \approx \frac{s_f}{t_f}-2bh_0-\frac{gz_0 t_f}{s_f}\sin (\Omega s(t)) \end{aligned}$$
(7.25)

satisfies the necessary conditions for optimality and is thus the optimal solution sought. Note that for \(z_0=0\), the profile (6.73)–(6.74) is retrieved, with \(h=0\).

The energy consumption can be evaluated by integrating the battery power over position and using the transformation \(ds/dt=v\),

$$\begin{aligned} E_b= \int _0^{s_f} muds + \int _0^{s_f} b \frac{u^2}{v}ds = mh_0s_f+bh_0^2 \int _0^{s_f} \frac{ds}{v(s)}\;. \end{aligned}$$
(7.26)

Under the assumptions above, the latter integral is equal to \(t_f\). Thus the energy consumption of the optimal speed profile is

$$\begin{aligned} E_b^{(P)} = mh_0s_f+bh_0^2t_f\;, \end{aligned}$$
(7.27)

the same value that would be obtained by (6.75) with \(h\equiv h_0\) and a constant speed. These results confirm the observations made in the previous section that the optimal speed follows the altitude profile and that the optimal energy consumption is largely independent of the altitude.

The energy consumption of the non-predictive strategy that follows a constant speed despite the altitude variations is obtained by evaluating the control input as \(u_p=h\) and then inserting it into the expression (7.26). The result is

$$\begin{aligned} E_b^{(NP)}=mh_0s_f+bh_0^2t_f+\frac{1}{2} bg^2\Omega ^2 z_0^2t_f\;. \end{aligned}$$
(7.28)

Consequently, the measure of performance defined in (7.23) is evaluated as

$$\begin{aligned} \varepsilon =\frac{1}{2} \cdot \frac{bg^2\Omega ^2 z_0^2 t_f}{mh_0s_f+bh_0^2t_f}\;, \end{aligned}$$
(7.29)

whose quadratic dependency on \(z_0\) clearly matches the numerical results of Fig. 7.7.

7.4 Constrained Eco-Driving

In the rest of this chapter (Sects. 7.57.8), we shall treat scenarios with trip constraints imposed on the optimization of the speed profile, under the form of state or interior constraints.

In particular, we shall present the constrained-optimal speed profiles for the scenarios considered. These solutions shall be regarded as the output of a predictive (P) eco-driving strategy that, assuming that the vehicle is equipped with dedicated sensors and/or communication technology, perfectly anticipates the trip constraints with unlimited preview distance. The P speed profiles shall be compared with the respective unconstrained optimal speed profiles to illustrate the effects of the constraints on the energy consumption.

As discussed in Chap. 1, energy savings are highly dependent on the preview capability, and we shall study the effects of such anticipation. Therefore, we shall further compare the P speed profiles and energy consumption with those of non-predictive (NP) eco-driving strategies, which have no or limited preview of the trip constraints (but are supposed to know the trip duration).

Generally speaking, the NP strategy is composed of four phases for all the constrained scenarios considered: (i) in the first phase, it follows the unconstrained optimum until a constraint is detected, assuming visual preview only; (ii) upon detection, the NP strategy adjusts its trajectory to match the constraint and (iii) then it tracks the constraint perfectly; (iv) lastly, the NP strategy retrieves a sub-optimal behavior to complete the trip in the desired duration and distance. In some cases we shall assume the adjustment phase (ii) as instantaneous for simplicity.

In order to understand the differences between P and NP strategies, we use the simplified EV model of Sect. 6.5.3.3, for which explicit solutions of the ED-OCP can be calculated.

$$\begin{aligned} v^*(t)=\frac{6 s_f}{t_f} \left( \frac{t}{t_f} \right) \left( 1-\frac{t}{t_f}\right) \;. \end{aligned}$$
(7.30)

In terms of \(t_f\), \(s_f\), both conditions \(F_{UB1}\) and \(F_{UB2}\) (see Appendix B) are always satisfied for \(v_i=v_f=0\), thus there is no upper bound on \(t_f\) for a given \(s_f\), see Fig. 7.8. Condition \(F_{LB2}\) reads \(t_f\ge \sqrt{6s_f/a_{max}}\), while condition \(F_{LB1}\) reads \(t_f\ge 3s_f/(2v_{max})\). The unconstrained minimal energy consumption is found as

$$\begin{aligned} E_{b}^* = mhs_f+bh^2t_f+ \frac{12bs_f^2}{t_f^3}\;. \end{aligned}$$
(7.31)
Fig. 7.8
figure 8

Domain of feasibility of the parabolic speed profile (shaded gray area) in the plane \(t_f\)\(s_f\) for the constrained scenarios. The curves shown are: \(F_{LB1}\) (purple) and \(F_{LB2}\) (blue). The coordinates of the intersection points are A \(\equiv \) C: (0, 0) and B: (\(8/3\cdot v_{max}^2/a_{max}\), \(4v_{max}/a_{max}\))

7.5 Speed Limit

In this section, we discuss the eco-driving along a route in the presence of a maximum speed limit,

$$\begin{aligned} v(t) -v_{max}(t) \le 0, \quad t\in [0,t_f] \;, \end{aligned}$$
(7.32)

which is a pure state constraint of the form (6.5). The key factor for effective eco-driving in such a situation is the ability to anticipate the limit and its variability along the route.

A numerical analysis of this scenario is presented in Sect. 7.5.1. Then in Sect. 7.5.2 we use closed-form solutions of ED-OCP (6.64) to corroborate the numerical results and highlight the influence of the preview ability and other parameters of the problem.

7.5.1 Numerical Analysis

We consider a trip having fixed distance \(s_f\) and duration \(t_f\), with a constant speed limit \(v_{max}\). The unconstrained optimal speed profile, used as a baseline, is denoted as \(v^*(t)\). We further compare predictive (P) and non-predictive (NP) constrained optimal speed profiles, as they have been defined in Sect. 7.4. The latter has no information about the upcoming limit, while predictive eco-driving perfectly anticipates the speed constraint.

Speed profiles P and NP can be obtained numerically using the methods introduced in Chap. 6. With dynamic programming, a speed constraint is easily enforced by making unfeasible all the points of the grid that exceed the limit value. The predictive speed profile is thus obtained by solving the constrained OCP for the original boundary conditions, see Table 7.1. The non-predictive speed profile is obtained by concatenating (i) the unconstrained solution until a time \(t_N\), such that \(v^*(t_N)=v_{max}\), with (ii) the solution of the constrained OCP from \(t_N\) to the end time, with a distance to cover \(s_f-s^*(t_N)\), an initial speed equal to \(v_{max}\) and a final speed of zero.

Table 7.1 Boundary conditions for the speed-limit-constrained scenario

Figure 7.9a shows the three speed profiles for \(s_f=1500\) m, \(t_f=120\) s, \(v_i=v_f=0\), \(v_{max}=50\) km/h, computed with the DP Algorithm 6 and the EV model of Table 6.3. Note how the non-predictive speed profile is forced to keep the top speed longer than the P profile in order to cover the prescribed distance in the prescribed time.

Fig. 7.9
figure 9

Unconstrained optimal (U), predictive (P), and non-predictive (NP) strategies for a trip with \(s_f=1500\) m, \(t_f=120\) s, \(v_i=v_f=0\), \(v_{max}=50\) km/h. Speed profiles (a) and performance indexes (b)

As a measure of performance of the eco-driving strategies, the relative energy loss with respect to the unconstrained optimum is defined as

$$\begin{aligned} \varepsilon ^{(\{P,NP\})} \triangleq \frac{E_{b}^{(\{P, NP\})}-E_{b}^*}{E_{b}^*}\;, \end{aligned}$$
(7.33)

where \(E_{b}^*\) is the energy consumption for the unconstrained optimal strategy and \(E_{b}^{(\{P, NP\})}\) are those for the predictive and non-predictive strategy, respectively.

The values obtained for \(\varepsilon ^{(P)}\) and \(\varepsilon ^{(NP)}\) for the aforementioned scenario are plotted in Fig. 7.9b as a function of the speed limit. The latter has an influence only if it is smaller than the maximum speed reached in the unconstrained case (53 km/h for this scenario). Clearly, the energy losses increase dramatically as the speed constraint becomes more aggressive, because the vehicle does not have enough time to take advantage of coasting.

7.5.2 Analytical Approach

In order to retrieve and explain the behavior shown by the numerical results of the previous section, we use the simplified EV model of Sect. 6.5.3.3, for which explicit solutions of the ED-OCP can be calculated. We assume that the maximum road speed limit is held constant over the sub-trip.

This model, with \(v_i=v_f=0\), yields an unconstrained optimal speed profile \(v^*\) given by (7.30) and an overall energy consumption \(E_b^*\) given by (7.31), and will be now compared with the values achieved by the predictive and the non-predictive strategies as a function of \(v_{max}\).

For later use, we introduce here the ratio between the speed limit and the maximum speed in the unconstrained case (larger speed limits would have no effect),

$$\begin{aligned} r_s \triangleq \frac{2v_{max}t_f}{3s_f} \;, \end{aligned}$$
(7.34)

with \(2/3<r_s<1\) by virtue of condition \(F_{LB1}\) (see Sect. 7.4).

7.5.2.1 Predictive Strategy

Anticipating the presence of the speed limit allows the implementation of a constrained-optimal speed profile. The necessary conditions for optimality are obtained from (6.72) in the Lagrangian form with the addition of the conditions (6.31)–(6.34). Using the nomenclature introduced in Sect. 6.2.2.1, the speed constraint \(g(\mathbf {x}(t), t)=v(t)-v_{max}\le 0\) is of the first order (\(p=1\)), since \(\dot{g}=g^{(1)}=\dot{v}=u_p-h\). Additionally, we have \(\partial g/\partial v=1\), \(\partial g/\partial s=0\) and, from the assumption of constant \(v_{max}\), \(\partial g/\partial t= 0\). Therefore, the system of equations to be solved reads

$$\begin{aligned} \left\{ \begin{aligned}&\dot{s}=v(t), \quad s(0)=0, \quad s(t_f)=s_f \\&\dot{v}=u_p(t)-h, \quad v(0)=v_i, \quad v(t_f)=v_f\\&\dot{\lambda }=-mu_p(t)-\mu , \quad \lambda (0)=\lambda _0 \\&u_p(t) = -\frac{1}{2b}(\lambda (t)+mv(t)+\eta (t)) \\&\eta (t)g(v(t))=0, \quad \eta (t)\ge 0, \quad \dot{\eta }\le 0 \\&\lambda (\tau ^-)=\lambda (\tau ^+)+\pi _0, \quad \pi _0 \ge 0, \quad \pi _0g(v(t))=0 \\&H(\tau ^-)=H(\tau ^+) \end{aligned} \right. \end{aligned}$$
(7.35)

where \(\tau \) is a junction time (entry or contact time) for the constraint and the Hamiltonian is \(H=mu_pv+bu_p^2+\lambda (u_p-h)+\mu v\).

When the speed constraint is not active (interior intervals), \(\eta (t)\equiv 0\) and the optimal control input is linear in time with a constant derivative \(\dot{u}_p=(\mu +mh)/(2b)\). Thus the speed is quadratic in time as in the unconstrained case, see (6.73)–(6.74). The jump conditions together with the algebraic relation between \(u_p\) and \(\lambda \) imply the continuity of the control input.Footnote 1 Since inside the boundary interval (when the constraint is active), it must be \(\dot{v}\equiv 0\), which is ensured by \(u_p\equiv h\), then \(u_p(\tau ^-)=u_p(\tau ^+)=h\).

Once the solution has left the first boundary interval, the control input keeps varying with time with the same constant derivative as in the first interior interval. That means that the trajectory \(u_p(t)\) cannot reach the boundary value h more than once. In other terms, the speed constraint can be active only on a single boundary interval, between an entry time \(t_1\) and an exit time \(t_2\). The constrained-optimal control law is thus made up of just three phases, see Fig. 7.11a.

Given the constancy of \(\ddot{v}=(\mu +mh)/(2b)-h\) in the two unconstrained (parabolic) phases and the symmetric boundary conditions \(v_i=v_f=0\), the two unconstrained phases must be symmetrical, thus \(t_2=t_f-t_1\). Further imposing the continuity of the control input at the junction times (\(\dot{v}(t_1)=\dot{v}(t_2)=0\)), the speed profile is completely characterized by the boundary conditions and the unknown parameter \(t_1\). Explicitly, it readsFootnote 2

$$\begin{aligned} v(t) = {\left\{ \begin{array}{ll} \dfrac{2v_{max}}{t_1}t-\dfrac{v_{max}}{t_1^2}t^2, &{} t\in [0,t_1)\\ v_{max}, &{} t\in [t_1,t_2] \\ \dfrac{2v_{max}}{t_1}(t_f-t)-\dfrac{v_{max}}{t_1^2}(t_f-t)^2, &{} t\in (t_2,t_f] \end{array}\right. }\;. \end{aligned}$$
(7.36)

The time \(t_1\) is found by imposing the overall distance,

$$\begin{aligned} t_{1}= & {} \frac{3}{2}\cdot \frac{v_{max}t_f-s_f}{{v}_{max}}\;. \end{aligned}$$
(7.37)

We find now the conditions \(F(t_f, s_f)\ge 0\) for which (7.36) is an admissible speed profile. As discussed earlier, the general conditions on the unconstrained speed profile \(F_{UB1}\) and \(F_{UB2}\) are both inactive for \(v_i=v_f=0\), while \(F_{LB1}\) and \(F_{LB2}\) fix the unconstrained lower bound.

This lower bound can be exceeded by the constrained speed profile, as discussed in detail in Appendix B. A first obvious constraint is

$$\begin{aligned} v_{max}-\frac{s_f}{t_f}\ge 0\;. \end{aligned}$$
(7.38)

On the other hand, limiting the acceleration/deceleration of the constrained speed profile to a maximum value \(a_{max}\), that is, imposing \(\dot{v}(0)=-\dot{v}(t_f)=a_{max}\) yields

$$\begin{aligned} F_{LB2'}(t_f, s_f)\triangleq v_{max}t_f-s_f-\frac{4v_{max}^2}{3a_{max}} \ge 0\;. \end{aligned}$$
(7.39)

Note that the latter condition implicitly ensures that \(t_1\) given by (7.37) is a positive quantity. It also is intrinsically more restrictive than (7.38), which is thus never active.

The domain of feasibility is illustrated in Fig. 7.10.

Fig. 7.10
figure 10

Domain of feasibility of the unconstrained speed profile (shaded gray area) and of the constrained speed profile (dark gray area) in the plane \(t_f\)\(s_f\) for the limit speed scenario. The curves shown are: \(F_{LB1}\) (purple), \(F_{LB2}\) (blue), \(F_{LB2'}\) (black), and the inactive constraint (7.38) (dashed)

Finally, the effective energy consumption, as defined in (6.76) for the unconstrained profile, is evaluated by particularizing and summing (6.76) for the three phases, with phase 2 that has no contribution. After tedious calculations, we obtain

$$\begin{aligned} E_{b, e}^{(P)} = \frac{12bs_f^2}{t_f^3}\left( \frac{r_s^3}{3r_s-2}\right) \;. \end{aligned}$$
(7.40)

7.5.2.2 Non-predictive Strategy

The non-predictive strategy initially follows the unconstrained optimal speed profile \(v^*(t)\). Then, at a time \(t_N\), the speed limit is reached and the strategy is forced to keep the speed constant. As the numerical results of the previous section have shown, there is a time, denoted here as \(t_N<t_T<t_f\), when the NP strategy retrieves a sub-optimal (parabolic, within the assumption of the model) speed profile until stop. Therefore the NP speed profile is made of three phases and, imposing the continuity of the control input (\(\dot{v}(t_T)=0\)), it is completely characterized by the boundary conditions and the unknown parameters \(t_N\), \(t_T\). The latter are found by imposing that \(v^*(t_N)=v_{max}\) and the overall distance.

The first condition, using (7.30) and (7.34), yields

$$\begin{aligned} t_{N} = \frac{t_f}{2} \left( 1-\sqrt{1-r_s} \right) \;, \end{aligned}$$
(7.41)

while the second condition yields

$$\begin{aligned} t_{T} = t_f\left( -\frac{1}{2} + \frac{1}{r_s} - \left( 1-\frac{1}{r_s}\right) \sqrt{1-r_s}\right) \;. \end{aligned}$$
(7.42)

The effective energy consumption is finally found as

$$\begin{aligned} {E}_{b, e}^{(NP)} = \frac{6bs_f^2}{t_f^3} \left( \frac{3r_s^2 + 2r_s - 3 + (2r_s^2 - 5r_s+3)\sqrt{1 - r_s}}{4r_s - 3}\right) \;, \end{aligned}$$
(7.43)

where \(s_N\triangleq s^*(t_N)\) is easily evaluated from (7.30).

7.5.2.3 Analysis

As a measure of performance of eco-driving strategies, we use here the relative effective energy loss with respect to the unconstrained optimum, defined as

$$\begin{aligned} \varepsilon _e^{(\{P,NP\})} \triangleq \frac{E_{b,e}^{(\{P,NP\})}-E_{b,e}^*}{E_{b, e}^*}\;. \end{aligned}$$
(7.44)

With this definition, the influence of vehicle parameters vanishes and (7.44) is a function of the scenario parameter \(r_s\) only.

For the predictive strategy,

$$\begin{aligned} \varepsilon _e^{(P)}=\frac{r_s^3-3r_s+2}{3r_s-2}\;, \end{aligned}$$
(7.45)

while for the non-predictive strategy

$$\begin{aligned} \varepsilon _e^{(NP)} = \frac{3r_s^2-6r_s+3+(2r_s^2-5r_s+3)\sqrt{1-r_s}}{2(4r_s-3)}\;. \end{aligned}$$
(7.46)

Functions (7.45)–(7.46) are plotted in Fig. 7.11b. Although they cannot be compared quantitatively, the analytical predictions show the same trend of the numerical results of Fig. 7.9. Note that the energy losses become unrealistically high as \(r_s\) approaches its lower bound of 2/3 (when \(s_f=v_{max}t_f\) the acceleration and deceleration phases become infinitely fast).

Fig. 7.11
figure 11

Schematic strategies for the limit speed scenario: unconstrained optimal, non-predictive sub-optimal, and predictive (a); performance index as a function of the parameter \(r_s\) (b)

7.6 Intersection

This section discusses the effect of an intersection or a stop sign in the middle of a route that is otherwise unconstrained. This circumstance imposes the interior constraints

$$\begin{aligned} s(t_t)=s_t, \quad v(t_t)=v_t\;, \end{aligned}$$
(7.47)

with \(s_t\) denoting the position of the intersection, \(v_t\) the prescribed crossing speed, while the crossing time \(t_t\) is free.

A numerical analysis of this scenario is presented in Sect. 7.6.1. Then in Sect. 7.6.2 we use closed-form solutions of the ED-OCP (6.64) to corroborate the numerical results and highlight the influence of the preview ability and other parameters of the problem.

7.6.1 Numerical Analysis

As in the previous sections, we consider a trip having a fixed distance \(s_f\) and duration \(t_f\). The unconstrained optimal speed profile, used as a baseline, is denoted as \(v^*(t)\). We further compare predictive (P) and non-predictive (NP) constrained optimal speed profiles, as they have been defined in Sect. 7.4. The latter has just some limited visual preview of the intersection, quantified by the preview distance \(r_ts_t\) (\(0\le r_t<1\)), while predictive eco-driving perfectly anticipates the intersection constraint with unlimited preview distance (\(r_t=1\)).

Speed profiles P and NP can be obtained using the methods introduced in Chap. 6. In particular, if the intersection crossing time \(t_t\), is fixed, the optimization of the trip ahead of the intersection becomes independent from that after it. The predictive speed profile is thus obtained by solving a first unconstrained OCP from the initial time to the crossing time, then a second one from \(t_t\) to the end time. As for the NP speed profile, it results from the concatenation of: (i) the unconstrained optimal speed profile until the time \(t_N\) at which the intersection is detected, such that \(s^*(t_N)=s_t(1-r_t)\), (ii) the solution of an unconstrained OCP from time \(t_N\) to the crossing time \(t_t\), and (iii) downstream of the intersection, the solution of an unconstrained OCP from \(t_t\) to the end time. In both cases, the crossing time \(t_t\) is further optimized to have minimal energy consumption. See Table 7.2 for a more detailed list of the respective boundary conditions.

Table 7.2 Boundary conditions for the intersection-constrained scenario

Figure 7.12a shows the three speed profiles for \(s_f=1500\) m, \(t_f=120\) s, \(v_i=v_f=0\), \(s_t=s_f/2=750\) m, \(v_t=0\) (stop), \(r_t=0.2\) (preview distance of 150 m), computed with the DP Algorithm 6 and the EV model of Table 6.3. The optimal crossing time for the predictive strategy is found as \(t_t=t_f/2=60\) s, which yields two equal speed profiles before and after the intersection, while for the NP strategy it is found to be around 64 s.

Fig. 7.12
figure 12

Unconstrained optimal (U), predictive (P), and non-predictive (NP) strategies for a trip with \(s_f=1500\) m, \(t_f=120\) s, \(v_i=v_f=0\), \(s_t=s_f/2=750\) m, \(v_t=0\). Speed profiles (a) and performance indexes (b)

The values of the measures of performance (7.45) are plotted in Fig. 7.12b as a function of the preview distance. While \(\varepsilon ^{(P)}\) does not depend on the preview distance, \(\varepsilon ^{(NP)}\) generally decreases with it. Note that the optimal crossing time in the NP strategy varies with the preview distance, ranging from 65 s at small preview distances, while decreasing to 60 s as \(r_t\) increases.

7.6.2 Analytical Approach

In order to retrieve and explain the behavior shown by the numerical results of the previous section, we use the simplified EV model of Sect. 6.5.3.3, for which explicit solutions of the ED-OCP can be calculated.

In particular, the benefits of preview and anticipation are analyzed as a function of two parameters, namely the preview distance and the crossing speed, while setting the intersection position at \(s_t=s_f/2\). We define for later use the ratio between the crossing speed \(v_t\) and the average speed along the route,

$$\begin{aligned} r_v \triangleq \frac{v_t t_f}{s_f} \;, \end{aligned}$$
(7.48)

with \(0\le r_v\le 3/2\) since \(v_t\) cannot exceed the top speed of the unconstrained scenario, \(2/3(s_f/t_f)\). As for the preview distance, we convert it into a more easily treatable preview time, by using the average speed of the unconstrained profile. In such a way, the ratio \(r_t\) takes the new formulation

$$\begin{aligned} r_t =\frac{t_t-t_N}{t_t} \;, \end{aligned}$$
(7.49)

with \(r_t\in [0,1]\).

7.6.2.1 Predictive Strategy

The predictive speed profile is composed of two separate parabolic phases, before and after the intersection. Imposing the crossing speed and the distance of both phases, the P profile is completely defined by the crossing time \(t_t\), see Fig. 7.13. The optimal value for this parameter is found by minimizing the consumption. Using (7.30), the effective energy consumption as a function of \(t_t\) is

(7.50)
Fig. 7.13
figure 13

Schematic strategies for the intersection scenario: unconstrained optimal, non-predictive sub-optimal, and predictive, with \(r_v=0\)

The minimum of this function is obtained for

$$\begin{aligned} \frac{\partial E_{b, e}^{(P)}}{\partial t_t} = 0 \rightarrow t_t=\frac{t_f}{2}\;, \end{aligned}$$
(7.51)

meaning that the predictive speed profile is made of two equal phases, the result numerically found in Sect. 7.6.1. With this optimal crossing time, the effective consumption is derived as

$$\begin{aligned} {E}_{b, e}^{(P)} = \frac{16b s_f^2}{t_f^3} \left( 3 - 3r_v + r_v^2 \right) \;. \end{aligned}$$
(7.52)

7.6.2.2 Non-predictive Strategy

The non-predictive strategy initially follows the unconstrained optimal speed profile \(v^*\). This phase ends at time \(t_N=t_t(1-r_t)\) when the presence of the intersection is detected. The corresponding distance and speed are easily evaluated as

$$\begin{aligned} s^*(t_N)= & {} \frac{s_f}{4}(2-3r_t+r_t^3)\;, \end{aligned}$$
(7.53)
$$\begin{aligned} v^*(t_N)= & {} \frac{3s_f}{2t_f}(1-r_t^2)\;, \end{aligned}$$
(7.54)

respectively. The intersection is then approached with a second parabolic profile to be reached at time \(t_t\). After that, a third parabolic speed profile is performed until stop at the final distance. Imposing the crossing speed and the distance of the two latter phases, the NP speed profile is completely characterized by the boundary conditions and the unknown parameter \(t_t\). The latter should in principle be found by minimizing the energy consumption, similarly to the predictive scenario. Instead of attempting such an optimization that would lead to formulas difficult to manage, we shall consider for simplicity the same value as in the predictive scenario, i.e., \(t_t=t_f/2\), for which the overall consumption is derived as

$$\begin{aligned} {E}_{b, e}^{(NP)} = \frac{4bs_f^2}{t_f^3} \cdot \frac{(9-12r_v+4r_v^2)+r_t(15-12r_v+4r_v^2)}{2r_t}\;. \end{aligned}$$
(7.55)

Note that for \(r_t=1\), the fully predictive result (7.52) is retrieved.

7.6.2.3 Analysis

The performance indexes for the predictive and the two non-predictive strategies are obtained from (7.52), (7.55) as

$$\begin{aligned} \varepsilon _e^{(P)}= \frac{(3-2r_v)^2}{3} \end{aligned}$$
(7.56)

and

$$\begin{aligned} \varepsilon _e^{(NP)} = \frac{(1+r_t)(3-2r_v)^2}{6r_t}\;. \end{aligned}$$
(7.57)

Functions (7.56)–(7.57) are plotted in Fig. 7.14a. As in the previous section, these results are not quantitatively comparable with the numerical ones shown in Fig. 7.12. However, the qualitative trend shows that, as the preview horizon increases, energy loss of the non-predictive strategy monotonically decreases.

Fig. 7.14
figure 14

performance indexes for the intersection scenario as a function of the parameters \(r_t\) (a) and \(r_v\) (b)

On the other hand, the energy loss decreases with an increase of the desired speed at the intersection, as shown in Fig. 7.14b for a preview distance corresponding to \(r_t=0.25\). If the vehicle must stop at the traffic signal (\(r_v=0\)), the resulting energy loss with the NP strategy is several times higher than that of the P strategy, which is due to higher electric losses during the regenerative braking process.

These results are largely independent of the choice of the boundary conditions. For a slightly different scenario where the vehicle would cruise at a constant speed if the intersection was not present (\(v_i=v_f=s_f/t_f\)), the effective energy consumption of the three strategies are

$$\begin{aligned} E_{b, e}^*=0, \quad E_{b, e}^{(P)}=\frac{16bs_f^2}{t_f^3}(1-r_v)^2, \quad E_{b, e}^{(NP)}=\frac{8bs_f^2}{t_f^3}(1-r_v)^2\left( 1+\frac{1}{r_t}\right) \;, \end{aligned}$$
(7.58)

showing a similar dependency on \(r_v\), \(r_t\) than (7.52)–(7.55).

7.7 Traffic Light

The scenario studied in this section is the presence of a signalized intersection (traffic light) in the middle of the route (at \(s_t=s_f/2\)), allowing the crossing only during fixed time slots that correspond to the green light periods. In particular, the light is set to be red at time \(t_f/2\). Denoting the crossing time with \(t_t\) (such that \(s(t_t)=s_t\)), the constraint reads

$$\begin{aligned} t_t\le \frac{t_f}{2}(1-r_x) \quad \vee \quad t_t \ge \frac{t_f}{2}(1+r_x)\;, \end{aligned}$$
(7.59)

where \(r_x\) is the parameter that defines the duty cycle of the traffic light (see Sect. 4.1.3) and Fig. 7.15.

Fig. 7.15
figure 15

Schematic definition of the traffic light scenario

A numerical analysis of this scenario is presented in Sect. 7.7.1. Then, in Sect. 7.7.2 we use closed-form solutions of ED-OCP (6.64) to corroborate the numerical results and highlight the influence of the preview ability and other parameters of the problem.

7.7.1 Numerical Analysis

As in the previous sections, we consider a trip having a fixed distance \(s_f\) and duration \(t_f\). The unconstrained optimal speed profile, used as a baseline, is denoted as \(v^*(t)\). We further compare predictive (P)  and non-predictive (NP) eco-driving, as they have been defined in Sect. 7.4. The latter has just visual information of the signal phase and color, while predictive eco-driving perfectly anticipates the traffic light constraint.

The enforcement of the interior constraint (7.59) requires that the optimization of the speed profiles P and NP is made with a DP algorithm having speed and time as state variables. To speed up the calculation, a single-state DP code can still be used, provided that time \(t_t\) is considered a free parameter to be further optimized.

For the predictive strategy, we can reasonably assume from physical considerations that the optimal choice for \(t_t\) is to equal the last useful green time, that is, \(t_t=t_f/2(1-r_x)\).Footnote 3 The original OCP can thus be split into two partial OCPs, before and after the traffic light crossing. However, these two OCPs are not independent as in the intersection case of Sect. 7.6, but coupled by the crossing speed \(v_t\) that plays the role of final speed in the former OCP and initial speed in the latter. The parameter \(v_t\) must therefore be further optimized to have the minimal energy consumption.

As for the NP speed profile, it first follows the unconstrained solution until the time at which the traffic light is assumed to be detected, which we also set at \(t_N=t_f/2(1-r_x)=t_t\). Then, having no preview about the red phase duration, the NP strategy should decelerate and stop in an arbitrary time, and wait for the next green phase. The faster the deceleration, the larger is the energy consumption. We consider the best-case scenario (from the NP perspective), where the strategy exactly chooses to stop at the last time on red, \(t_A=t_f/2(1+r_x)\), only to start again soon after. Thus, the rest of the NP profile is found by concatenating (i) the solution of an unconstrained OCP from time \(t_t\) to the time \(t_A\), and (ii) after the traffic light, the solution of an unconstrained OCP from \(t_A\) to the end time. See Table 7.3 for a more detailed list of the respective boundary conditions of the three strategies.

Table 7.3 Boundary conditions for the traffic-light-constrained scenario

Figure 7.16a shows the three speed profiles for \(s_f=800\) m, \(t_f=120\) s, \(v_i=v_f=0\), \(s_t=s_f/2=400\) m, \(r_x=0.3\), computed with the DP Algorithm 6 and the EV model of Table 6.3. Figure 7.16b shows the respective position trajectories, together with the forbidden window with the traffic light being red. The optimal crossing speed of the predictive strategy is found to be around 30 km/h in this case.

The values of the measures of performance (7.33) are plotted in Fig. 7.16c as a function of the duty cycle parameter \(r_x\). While \(\varepsilon ^{(P)}\) increases with an increase of \(r_x\) and tends to zero as \(r_x\) tends to zero, \(\varepsilon ^{(NP)}\) results from two opposite trends and shows a minimum. On the one hand, small values of \(r_x\) mean small preview times and strong decelerations/accelerations to catch the new green period. On the other hand, large values of \(r_x\) mean longer red intervals and thus stronger accelerations in the second green period to complete the trip.

Fig. 7.16
figure 16

Unconstrained optimal (U), predictive (P), and non-predictive (NP) strategies for a traffic light scenario with \(s_f=800\) m, \(t_f=120\) s, \(v_i=v_f=0\), \(s_t=s_f/2=400\) m, \(r_x=0.3\). Speed (a) and position (b) profiles and performance indexes (c)

7.7.2 Analytical Approach

In order to retrieve and explain the behavior shown by the numerical results of the previous section, we use the simplified EV model of Sect. 6.5.3.3, for which explicit solutions of the ED-OCP can be calculated.

7.7.2.1 Predictive Strategy

The predictive strategy perfectly anticipates the presence of the traffic light and chooses the optimal crossing time and speed satisfying the constraint imposed by its timing. As discussed above, we assume the optimal timing choice as \(t_t=t_f/2(1-r_x)\). However, the crossing speed \(v_t\) is free and can be optimized. Similarly to (7.50), we evaluate the overall consumption as a function of \(v_t\),

$$\begin{aligned} E_{b, e}^{(P)}(v_t) = 4b\left( \frac{12s_f^2}{t_f^3} \frac{1+3r_x^2}{(1-r_x^2)^3} - \frac{12s_fv_t}{t_f^2}\frac{1+r_x^2}{(1-r_x^2)^2} + \frac{4v_t^2}{t_f}\frac{1}{(1-r_x^2)} \right) \;. \end{aligned}$$
(7.60)

The minimum of function (7.60) is obtained for

$$\begin{aligned} \frac{\partial E_{b, e}^{(P)}}{\partial v_t} = 0 \rightarrow v_t=\frac{3s_f}{2t_f}\cdot \frac{1+r_x^2}{1-r_x^2}\;. \end{aligned}$$
(7.61)

Note that for \(r_x=0\) the top speed of the unconstrained optimal profile is retrieved.

With this choice of crossing speed, the effective consumption is derived as

$$\begin{aligned} E_{b, e}^{(P)} = \frac{12bs_f^2}{t_f^3}\cdot \frac{1+6r_x^2-3r_x^4}{(1-r_x^2)^3} \end{aligned}$$
(7.62)

and equals the unconstrained optimum for \(r_x=0\).

7.7.2.2 Non-predictive Strategy

For the non-predictive strategy, we set \(t_N=t_f/2(1-r_x)\) and we impose a stop (\(v_t=0\)) at the traffic light at time \(t_A=t_f/2(1+r_x)\), as in the numerical analysis. Thus the effective consumption is derived as

$$\begin{aligned} {E}_{b, e}^{(NP)} = \frac{12 b s_f^2 }{t_f^3}\cdot \frac{(1 + r_x^2) (3 + r_x (31 + (-3 + r_x) r_x (8 + r_x^2))}{ 16 (1 - r_x)^3 r_x }\;. \end{aligned}$$
(7.63)

7.7.2.3 Analysis

The performance indexes (7.44) are evaluated as

$$\begin{aligned} \varepsilon _e^{(P)}=\frac{r_x^2 (3 - r_x^2)^2}{(1 - r_x^2)^3} \end{aligned}$$
(7.64)

and

$$\begin{aligned} \varepsilon _e^{(NP)}=\frac{3 + 15 r_x + 27 r_x^2 - 9 r_x^3 - 11 r_x^4 + 9 r_x^5 - 3 r_x^6 + r_x^7}{ 16 (1 - r_x)^3 r_x}\;. \end{aligned}$$
(7.65)

Figure 7.17 shows the two functions (7.64)–(7.65) as a function of the parameter \(r_x\). Clearly, the trend numerically obtained and shown in Fig. 7.16c is retrieved, with \(\varepsilon ^{(P)}\) increasing with \(r_x\) and \(\varepsilon ^{(NP)}\) showing a minimum.

Fig. 7.17
figure 17

Performance index for the traffic light scenario as a function of the parameter \(r_x\)

These results are largely independent of the particular boundary conditions chosen. For a slightly different scenario where the vehicle is cruising at a constant speed (\(v_i=v_f=s_f/t_f\)) except for the traffic light, the effective energy consumption of the three strategies are

$$\begin{aligned} E_{b, e}^*=0, \quad E_{b, e}^{(P)}=\frac{48bs_f^2}{t_f^3}\cdot \frac{r_x^2}{(1-r_x)^3} , \quad E_{b, e}^{(NP)}=\frac{8bs_f^2}{t_f^3}\cdot \frac{1+r_x+r_x^2}{(1-r_x)^3}\;, \end{aligned}$$
(7.66)

showing a similar dependency on \(r_x\) to (7.62)–(7.63).

7.8 Car Following

In the scenario of this section, the host vehicle is subject to avoiding rear-end collisions with a preceding vehicle, whose motion is described by a temporal law \(s_p(t)\). That imposes a constraint of the type

$$\begin{aligned} s(t)-(s_p(t)-s_{min}(v(t), v_p(t))) \le 0, \quad t\in [0,t_f]\;, \end{aligned}$$
(7.67)

where \(s_{min}\) is the minimum inter-vehicle safe distance. The latter quantity can actually describe a distance headway or a time headway enforced by the road law or other considerations. While the minimal safe distance headway is usually a constant, the minimal safe time headway depends on the relative speed of the two vehicles. In this section, we shall assume that the safe distance at most depends on the preceding vehicle’s speed \(v_p\) only (not on the host vehicle’s speed), and thus it will be considered as a prescribed function of time, \(s_{min}(t)\).

A numerical analysis of this scenario is presented in Sect. 7.8.1. Then in Sect. 7.8.2 we use closed-form solutions of ED-OCP (6.64) to corroborate the numerical results and highlight the influence of the preview ability and other parameters of the problem.

7.8.1 Numerical Analysis

Position constraint (7.67) plays the role of a state constraint in the ED-OCP. Additionally, there might be speed constraints such as those studied in Sect. 7.5. The key factor for performing eco-driving in such a situation is the ability to detect the position and the velocity of the preceding vehicle. That is usually feasible with current ADAS-type sensors (see Sect. 3.2.1), which nevertheless have a finite range. An extension of the preview distance provided by standard ADAS sensors could be made possible by the use of dedicated vehicle-to-vehicle or vehicle-to-infrastructure communication (see Sect. 3.1).

As in the previous sections, we consider a trip having a fixed distance \(s_f\) and duration \(t_f\). The preceding vehicle is assumed to advance at constant acceleration, that is, we assume \(s_p(t)=s_{p, 0}+v_{p, 0}t+a_pt^2/2\).Footnote 4 The unconstrained optimal speed profile, used as a baseline, is denoted as \(v^*(t)\). We further compare predictive (P) and non-predictive (NP) constrained optimal speed profiles, as they have been defined in Sect. 7.4. The latter has just a limited preview of the preceding vehicle, defined by the preview distance \(r_ds_f\), with \(0 \le r_d \le 1\). Here we consider only the case \(r_d=0\). The predictive eco-driving perfectly anticipates the preceding vehicle constraint with unlimited preview distance (\(r_d=1\)).

Table 7.4 Boundary conditions for the position-constrained scenario
Fig. 7.18
figure 18

Unconstrained optimal (U) and predictive (P) strategy for a trip with \(s_f=500\) m, \(t_f=60\) s, \(v_i=v_f=0\), \(s_{p, 0}=\{20,50\}~m\), \(v_{p, 0}=15\) km/h, and \(a_p=\{0.14,0.17\}\) m/s\(^2\)

The speed profile P is obtained using the methods introduced in Chap. 6. In particular, a full two-state DP code can be used, with time as the independent variable and velocity and position as state variables. In this way it is possible to enforce the position constraint directly, by making unfeasible all the points of the position grid that exceed the maximal allowed position \(s_p(t)-s_{min}(t)\). The predictive speed profile is thus obtained by solving the constrained OCP for the original boundary conditions, see Table 7.4. The non-predictive speed profile is obtained by concatenating (i) the unconstrained solution until a time \(t_N\) such that \(s^*(t_N)=s_p(t_N)-s_{min}(t_N)\) with (ii) the solution of the constrained OCP from \(t_N\) to the end time, with a distance to cover \(s_f-s^*(t_N)\), an initial speed equal to \(v^*(t_N)\) and a final speed of zero. Note that this definition might imply an unrealistic speed discontinuity at \(t_N\) if \(v_p(t_N)<v^*(t_N)\).

Figure 7.18a, b shows the U and P profiles in terms of speed and position computed with the two-state DP and the EV model of Table 6.3 for \(s_f=500\) m, \(t_f=60\) s, \(v_i=v_f=0\), and two leader’s scenarios: \(s_{p, 0}=20\) m, \(v_{p, 0}=15\) km/h, \(a_p=0.14\) m/s\(^2\) (P1) and \(s_{p, 0}=50\) m, \(v_{p, 0}=15\) km/h, \(a_p=0.17\) m/s\(^2\) (P2). Clearly, the P profiles present milder initial accelerations to allow a rendez-vous with the leader when the two vehicles have the same speed. For the sake of figure readability, these figures do not show the NP profiles.

7.8.2 Analytical Approach

In order to retrieve and explain the behavior shown by the numerical results of the previous section, we use the simplified EV model of Sect. 6.5.3.3, for which explicit solutions of the ED-OCP can be calculated.

We further assume that the preceding vehicle departs from the same position as the host vehicle (\(s_{min}=0\)) and drives at a constant speed, denoted by \({v}_{p}\). A more general case, including initial separation and relative speed between the two vehicles, and a constant leader acceleration, is treated in Appendix B. The unconstrained solution in terms of speed is still given by (7.30).

7.8.2.1 Predictive Strategy

The predictive speed profile is the result of a constrained optimization. The necessary conditions for optimality derive from (6.72) in the Lagrangian form with the addition of the conditions (6.31)–(6.34). Using the nomenclature introduced in Sect. 6.2.2.1, the position constraint \(g(\mathbf {x}(t), t)=s(t)-v_pt\le 0\) is of the second order (\(p=2\)), since \(\ddot{g}=g^{(2)}=\dot{v}=u_p-h\). Additionally, we have \(\partial g/\partial s=1\), \(\partial g^{(1)}/\partial v=1\), \(\partial g/\partial t=-v_p\), and \(\partial g^{(1)}/\partial t=\partial g^{(1)}/\partial s=\partial g/\partial v=0\). Therefore, the system of equations to be solved reads

$$\begin{aligned} \left\{ \begin{aligned}&\dot{s}=v(t), \quad s(0)=0, \quad s(t_f)=s_f \\&\dot{v}=u_p(t)-h, \quad v(0)=v_i, \quad v(t_f)=v_f\\&\dot{\lambda }=-mu_p(t)-\mu , \quad \lambda (0)=\lambda _0 \\&\dot{\mu }=0, \quad \mu (0)=\mu _0 \\&u_p(t) = -\frac{1}{2b}(\lambda (t)+mv(t)+\eta (t)) \\&\eta (t)g(s(t), t)=0, \quad \eta (t)\ge 0, \quad \dot{\eta }\le 0, \quad \ddot{\eta }\ge 0 \\&\lambda (\tau ^-)=\lambda (\tau ^+)+\pi _1 \\&\mu (\tau ^-)=\mu (\tau ^+)+\pi _0 \\&\pi _0 \ge 0, \quad \pi _1\ge 0, \quad \pi _0g(s(t), t)=0, \quad \pi _1g(s(t), t)=0 \\&H(\tau ^-)=H(\tau ^+)+\pi _0v_p \end{aligned}\right. \end{aligned}$$
(7.68)

where \(\tau \) is a junction time (entry or contact time) for the constraint and the Hamiltonian is \(H=mu_pv+bu_p^2+\lambda (u_p-h)+\mu v\).

When the position constraint is not active, \(\eta (t)\equiv 0\) and the optimal control input is linear in time with a constant derivative \(\dot{u}_p=(\mu _0+mh)/(2b)\). Thus the speed is quadratic in time as in the unconstrained case, see (6.73)–(6.74). The position constraint can be active either on a boundary interval or at a contact point. Here only the case with a contact point \(t_1\) is considered. The tangency conditions impose that \(s(t_1)=s_p(t_1)=v_pt_1\) and \(v(t_1)=v_p\). The jump conditions together with the algebraic relation between \(u_p\) and \(\lambda \) imply the continuity of the control input at the contact point.Footnote 5

The constrained-optimal trajectory is thus made up of two parabolic phases separated by the contact point, see Fig. 7.20a, b. Imposing the tangency conditions, the speed profile is completely characterized by the boundary conditions and the unknown parameter \(t_1\). Explicitly, it reads

$$\begin{aligned} v(t) = {\left\{ \begin{array}{ll} \displaystyle \frac{4v_p}{t_1}t-\frac{3v_p}{t_1^2}t^2, &{} t\in [0,t_1) \\ 3v_p-\displaystyle \frac{2v_p}{t_1}t+\frac{v_p}{t_1}\frac{2t_f-3t_1}{(t_f-t_1)^2}(t-t_1)^2, &{} t\in [t_1,t_f] \end{array}\right. }\;. \end{aligned}$$
(7.69)

Note that the first of (7.69) implies that the first phase has a maximum at \(2/3t_1\). The maximum speed reached is \(4/3v_p\). Here we shall assume that this speed is lower than any top speed limit.

The contact time is found by imposing the overall distance, yielding

$$\begin{aligned} t_{1} = \frac{t_f^2v_p}{4t_fv_p-3s_f}\;. \end{aligned}$$
(7.70)

We find now the conditions \(F(t_f, s_f)\ge 0\) for which (7.69) is an admissible speed profile. As discussed earlier, the general conditions on the unconstrained speed profile \(F_{UB1}\), \(F_{UB2}\), and \(F_{LB1}\) are always satisfied when \(v_i=v_f=0\) and \(v_{max}\rightarrow \infty \). Thus the only conditions to be fulfilled, which defines the limits of feasibility of the unconstrained speed profile, are \(F_{LB2}\) (maximum acceleration/deceleration) and \(F_{LB3}\) that is imposed by the position constraint. The latter condition can be expressed by the requirement that the quadratic-in-time equation \(s^*(t)=v_p t\) has at most one degenerate real root. As shown in Appendix B, that reads

$$\begin{aligned} F_{LB3}(t_f, s_f)\triangleq 8v_pt_f-9s_f\ge 0\;. \end{aligned}$$
(7.71)
Fig. 7.19
figure 19

Domain of feasibility of the unconstrained speed profile (shaded gray area) and the constrained speed profile (dark gray area) in the plane \(t_f\)\(s_f\) for the car following scenario. The curves shown are: \(F_{LB2}\) (blue), \(F_{LB3}\) (yellow), \(F_{LB2''a}\) (dashed green), \(F_{LB2''d}\) (dashed blue), and \(F_{LB3''}\) (red). The coordinates of the intersection points are D: (\(128/27\sigma \), \(16/3\tau \)), where \(\sigma \triangleq v_{p}^2/a_{max}\), \(\tau \triangleq v_{p}/a_{max}\)

The domain of feasibility of the unconstrained speed profile can be exceeded by the constrained speed profile. However, we must obviously require that the final position does not exceed the final leader position, that is,

$$\begin{aligned} F_{LB3''}(t_f, s_f)\triangleq v_pt_f-s_f\ge 0\;. \end{aligned}$$
(7.72)

Note that this condition implicitly ensures that \(t_1\) given by (7.70) is a positive quantity.

In the position-constrained profile’s domain of feasibility, the lower bound \(F_{LB2}\) is replaced by the condition that the maximum acceleration and deceleration of the position-constrained profile, a(0), are lower than \(a_{max}\) and \(|a_{min}|=a_{max}\), respectively. That yields

$$\begin{aligned} F_{LB2''a}\triangleq a_{max}-\frac{4}{t_f^2}(4t_fv_p-3s_f)\ge 0\;, \end{aligned}$$
(7.73)

which is always satisfied in the region of interest, and

$$\begin{aligned} F_{LB2''d}\triangleq a_{max}-\frac{2}{3t_f^2}\frac{(4t_fv_p-3s_f)(2t_fv_p-3s_f)}{t_fv_p-s_f}\ge 0\;, \end{aligned}$$
(7.74)

which in turn limits the domain of feasibility of the position-constrained profile.

The domain of feasibility in terms of \(s_f\), \(t_f\) is illustrated in Fig. 7.19. For later use, we introduce here a speed ratio

$$\begin{aligned} r_p \triangleq \frac{v_p}{s_f/t_f}-1\;, \end{aligned}$$
(7.75)

with \(0\le r_p\le 1/8\) as a consequence of (7.71).

Finally, the effective energy consumption is derived as

$$\begin{aligned} {E}_{b, e}^{(P)} = \frac{4b s_f^2}{9t_f^3} \cdot \frac{(4r_p+1)^3}{r_p}\;. \end{aligned}$$
(7.76)
Fig. 7.20
figure 20

Schematic strategies for the car following scenario: unconstrained optimal (blue), predictive (orange), and non-predictive (green) speed (a) and position (b) profiles; performance indexes as a function of the parameter \(r_p\) (c)

7.8.2.2 Non-predictive Strategy

The non-predictive speed profile initially follows the unconstrained optimal speed profile \(v^*\), see Fig. 7.20. This phase ends at time \(t_N\) when the preceding vehicle is reached (assuming \(s_{min}=0\)). The preceding vehicle is then followed, assuming for simplicity instantaneous adaptation (i.e., infinitely fast deceleration) of the NP speed to \(v_p\). This phase lasts until time \(t_T\), at which the non-predictive speed profile retrieves a parabolic sub-optimal profile until stop.

Therefore, the speed profile is made of three phases and, imposing continuity of the control input at \(t_T\) (\(\dot{v}(t_T)=0\)), it is completely determined by the boundary conditions and the unknown parameters \(t_N\), \(t_T\). Imposing the condition \(s^*(t_N)=s_p(t_N)=v_pt_N\), the contact time is evaluated as

$$\begin{aligned} t_N = \frac{3t_f}{4}\left( 1-\sqrt{1-\frac{8t_fv_p}{9s_f}}\right) \;. \end{aligned}$$
(7.77)

On the other hand, the switching time \(t_T\) is found by imposing the overall distance, yielding

$$\begin{aligned} t_A=\frac{3s_f}{v_p}-2t_f\;. \end{aligned}$$
(7.78)

Finally, the effective energy consumption is evaluated as

$$\begin{aligned} {E}_{b, e}^{(NP)} = \frac{4bs_f^2}{t_f^3}\cdot \frac{(1+r_p)^2((1+r_p)\sqrt{1-8r_p}-3(1+13r_p))}{9r_p(\sqrt{1-8r_p}-3)}\;. \end{aligned}$$
(7.79)

7.8.2.3 Analysis

The performance indexes (7.44) are evaluated as

$$\begin{aligned} \varepsilon _e^{(P)}=\frac{(1-8r_p)^2(1+r_p)}{27r_p} \end{aligned}$$
(7.80)

and

$$\begin{aligned} \varepsilon _e^{(NP)}=\frac{9r_p(1+r_p)\sqrt{1-8r_p}+(1-2r_p)(2-17r_p-r_p^2)}{54 r_p}\;. \end{aligned}$$
(7.81)

Note that \(\varepsilon ^{(P)}\) goes to zero for \(r_p=1/8\), where \(\varepsilon ^{(NP)}\) would be negative. It is thus clear that the domain of feasibility of the NP profile in terms of \(r_p\) is smaller than that of the P profile. These trends are shown in Fig. 7.20c where the two performance indexes are plotted as a function of the speed ratio \(r_p\).

figure a

The scenarios presented in this chapter are obviously oversimplified and represent real-life situations only in an idealized way. However, their analysis has allowed us to identify for each of them the key parameters that induce energy inefficiencies and how to alleviate them with predictive optimal driving control. While the existing literature has often addressed these scenarios separately with ad hoc strategies, the next chapter, grounded on the theory of Chap. 6, will discuss their implementation in a unified eco-driving system. More realistic conclusions can be drawn after several of these scenarios are treated in the detailed case studies of Chap. 9.