 Original Article
 Open access
 Published:
RealTime Cooptimization of Gear Shifting and Engine Torque for Predictive Cruise Control of HeavyDuty Trucks
Chinese Journal of Mechanical Engineering volume 37, Article number: 42 (2024)
Abstract
Fuel consumption is one of the main concerns for heavyduty trucks. Predictive cruise control (PCC) provides an intriguing opportunity to reduce fuel consumption by using the upcoming road information. In this study, a realtime implementable PCC, which simultaneously optimizes engine torque and gear shifting, is proposed for heavyduty trucks. To minimize fuel consumption, the problem of the PCC is formulated as a nonlinear model predictive control (MPC), in which the upcoming road elevation information is used. Finding the solution of the nonlinear MPC is time consuming; thus, a realtime implementable solver is developed based on Pontryagin’s maximum principle and indirect shooting method. Dynamic programming (DP) algorithm, as a global optimization algorithm, is used as a performance benchmark for the proposed solver. Simulation, hardwareintheloop and realtruck experiments are conducted to verify the performance of the proposed controller. The results demonstrate that the MPCbased solution performs nearly as well as the DPbased solution, with less than 1% deviation for testing roads. Moreover, the proposed cooptimization controller is implementable in a realtruck, and the proposed MPCbased PCC algorithm achieves a fuelsaving rate of 7.9% without compromising the truck’s travel time.
1 Introduction
Heavyduty trucks have an irreplaceable role in freight transportation in the daily life of human beings. As a commercial transport, one of the main concerns for the heavyduty truck is energy consumption [1]. One way of reducing energy consumption is by the development of a smarter cruise control (CC) system [2]. At present, CC system which releases the driver from operating either on the accelerator or brake pedal is widely equipped to reduce driver workload [3] for some heavyduty trucks. However, the traditional CC system usually brakes under slope conditions; this mechanism is not conducive to energy saving. Predictive cruise control (PCC) technologies, which can avoid the unnecessary braking by allowing the vehicle speed to vary around the set speed, has attracted a tremendous attention for heavyduty trucks, considering the increasing demand for fuel economy [4,5,6]. As an optimal control problem, PCC uses the upcoming road traffic information to optimize the longitudinal driving strategies [7, 8].
Given that dynamic programming (DP) can provide a global optimal control solution of the optimization problem of PCC, it is used as a benchmark to analyze the optimal trajectories [9]. However, DP cannot be directly applied to realtime control because of the heavy computation burden (known as the curse of dimensionality) [10]. Similar to other advanced driving assistance system, PCC should be run on vehicle control unit in real time. Biswas et al. divided the realtime controllers in energy management systems into three categories, namely, (i) precomputed control laws, (ii) online computed control laws, and (iii) blended pre and online computed control laws [11]. The precomputed control laws, such as rulebased and fuzzy logic controllers [12, 13], need tremendous calibration of the control parameters. Traditionally, these approaches are less robust to model inaccuracies and the change of the driving conditions. An example of the blended pre and online computed control laws is explicit model predictive control (MPC) [14]. However, the explicit MPC involves the exponential growth of the number of control regions for the long predictive horizon and many constraints [15].
MPC is expected to generate online computed control laws of the realtime controllers [16, 17]. However, the considerable computational burden from finding an optimal solution restricts the application of MPC in realtime manner [18, 19]. If the optimization problem can be formulated as a linear convex quadratic programming (QP) problem, the fast computation time can be achieved [20]. Unfortunately, the PCC problem is a nonlinear and constrained optimization problem. Finding an analytical solution for such problem is often impossible or extremely difficult. To avoid solving complex optimization problems directly, some hierarchical optimization methods are utilized, for example, doublelayer scheme for energyoptimal braking control [21], bilevel MPC for ecodriving applications [22].
At present, many studies are focused on numerical solution methods instead of the analytical solution for MPC problems [23, 24]. These numerical approaches fall into two broad categories [25], namely, (i) direct methods, and (ii) indirect methods. In the direct method, the original optimization problem is transcribed to a nonlinear programming problem by parameterizing the state and control input, while in the indirect method, the original optimization problem is converted into a boundaryvalue problem by using optimality conditions [26]. Pontryagin’s maximum principle (PMP) can be used as an optimal control theory to obtain the optimality conditions [27]. Then, the shooting method is used to solve a boundary value problem by guessing an initial value of the costate variable. In Ref. [28], the authors used the indirect shooting method to derive an online optimal control law of the gearshift command for multispeed electric vehicles. Many heavyduty trucks are equipped with automated manual transmission with discrete gear ratios. Thus, cooptimization of gear shifting and engine torque for PCC problem involves a mixedinteger programming problem [29]. Considering that finding a fast optimal solution for the mixedinteger programming problem is extremely challenging, two substep optimization method is proposed by converting an original optimization problem into two suboptimization problems in Ref. [30].
Based on the above previous works, a realtime implementable PCC is proposed to simultaneously optimizes engine torque and gear shifting for heavyduty trucks. The main contributions of this study are devising a realtime implementable cooptimization method and deriving an MPCbased solution. The MPCbased solution performs nearly the same as a global optimal control solution for the PCC optimization problem. The procedure to achieve this goal is summarized as follows. First, the PCC problem for heavyduty trucks is formulated as a nonlinear MPC with discrete control input of the gear shifting command. Second, after simplifying that gear shifting only occurs in the first step of the predictive horizon, a fast solution is derived using PMP and an indirect shooting method, in which the state constraints on the truck speed and gear position are treated in practical implementation approaches. Third, hardwareintheloop (HIL) experiments on a embedded computer and a vehicle control unit are carried out to show the realtime capability of the proposed cooptimization controller. Fourth, realtruck experiments are conducted to evaluate the fuelsaving performance of the proposed MPCbased controller, and a fuelsaving rate of 7.9% is achieved.
The remainder of this paper is organized as follows. The PCC system and system model of heavyduty trucks are presented in Section 2. The optimization formulation of the PCC problem is discussed in Section 3. The solution methods are derived based on MPC and DP in Section 4. The proposed PCC solutions are evaluated through simulation, HIL and realtruck experiments, and some main results are represented in Section 5 and Section 6. Finally, the conclusions are provided in Section 7.
2 PCC System and System Model
In this section, the fuelsaving reasons of PCC system are firstly demonstrated by comparison to the conventional CC. Then, the longitudinal dynamic model of a heavyduty truck is constructed. Thereafter, the fuel consumption rate is fitted by a 2D polynomial function.
2.1 FuelSaving Reasons of PCC System
The conventional CC is designed to maintain the driver’s set speed. It can be regarded as a speed tracking problem. PCC uses the information on the road profile to optimize the velocity profiles to reduce fuel consumption. It can be regarded as a speed optimization problem with upcoming road information. The difference between PCC and CC is shown in Figure 1. Compared with CC, the main fuelsaving reason for typical uphill and downhill conditions can be summarized as follows.

I.
When approaching an ascent, the truck with PCC accelerates in advance, but the truck with CC does not have any uphill preparation. When climbing the ascent, the engine for CC works in a lowspeed and hightorque region, and the truck often gains more torque by downshifting. The truck with PCC can maintain a high gear due to the early acceleration. Because working in a high gear is conducive to fuel saving, PCC saves more fuel than CC.

II.
When approaching a descent, the truck with PCC decelerates in advance, but the truck with CC does not have any downhill preparation. When on the descent, CC often brakes the truck to avoid excessive speed, while PCC can reduce the brake operation due to the early deceleration. Brake dissipates the energy in the form of heat; thus, PCC saves more fuel by avoiding unnecessary braking.
2.2 Longitudinal Dynamic Model
The vehicle under discussion is a heavyduty truck. Its power comes from an internal combustion engine (ICE) mated to an automated manual transmission (AMT). Engine torque, brake torque, and gear number are the control inputs to determine the longitudinal motion of the truck. Traditionally, the engine and the brake system do not work simultaneously. The engine works in the traction mode, and the brake system works in brake mode. When the truck is in the brake mode, engine drag occurs, and the engine drag resistance force is equal to the minimum (negative).
2.2.1 Traction Mode
The longitudinal dynamic motion of the truck can be described using the truck distance s, the truck speed v and the longitudinal acceleration a, as follows:
The force diagram of the heavyduty truck moving on a slope is shown in Figure 2. According to the force balance, the engine traction force is the sum of various external forces, as follows:
where \(F_t\) is the traction force, \(F_f\) is the rolling resistance, \(F_w\) is the aerodynamic friction, \(F_i\) is the gravitational resistance, and \(F_j\) is the acceleration resistance.
The discrete equation of the engine traction force is as follows:
where \(\eta _{t}\) is the combined transmission efficiency, which accounts for both the efficiency of the transmission and the main gearbox, \(i_{f}\) is the final drive ratio, G(k) is the gear number at step k, \(i_{g}(G(k))\) is the transmission ratio in gear G(k), \(T_{e}(k)\) is the engine torque at step k, and \(r_{w}\) is the wheel radius. The transmission ratio \(i_{g}\) is determined by the selected gear G(k).
The discrete equations of the resistance force are given as follows:
where m is the mass of the truck, g is the gravity constant, f is the rolling resistance coefficient, \(\alpha (k)\) is the slope angle at step k that varies along with the position of the truck, \(C_D\) is the aerodynamic drag coefficient, A is the frontal area, \(\rho\) is the air density, and \(\delta\) is the lumped rotational inertia coefficient.
The discrete equation of the longitudinal dynamic motion in the traction mode can be expressed as follows:
where \(\Delta t\) is the time interval from step k to step \(k+1\).
2.2.2 Brake Mode
According to the force balance, the longitudinal dynamic motion in the brake mode is given as follows:
where \(F_{drag}\) is the engine drag resistance force, and \(F_b\) is the braking force.
The discrete equation of the longitudinal dynamic motion in the brake mode can be expressed as follows:
2.2.3 Gear Shifting
The transmission system for the investigated truck is 12speed AMT. A gear shift input \(u_g(k)\) is introduced to describe the gearshift operation, as follows:
Gear skipping in the gearshift operation is not allowed. The gearshift operation only includes downshift, hold, and upshift. Thus, the gear shift input \(u_g(k)\) has three entries, \(u_g(k) \in \{1,0,1\}\), which respectively represent downshift, hold, and unshift.
2.3 Fuel Consumption Rate
Fuel consumption rate (g/s) is used to model the fuel consumption of ICE. Traditionally, the engine manufacturer provides a map of brake specific fuel consumption (BSFC) (g/kW·h). The fuel consumption rate can be obtained from the BSFC map by unit conversion. For a convenient mathematical formulation, the fuel consumption rate \(Q_t\) is fitted by a 2D polynomial function
where \(\iota _{i, j}\) represent the fitting coefficients, and \(\omega _e\) is the engine speed. The fitting performance of the fuel consumption rate is shown in Figure 3. Black dots in the upper subfigure of Figure 3 are experimental data points, which are obtained by a large number of steady state experiments. The bottom subfigure of Figure 3 shows the model residuals of the 2D polynomial function (9). The root mean square error (RMSE) is 0.1493.
The relationship between the engine speed \(\omega _e\) and the vehicle speed v(k) can be described as follows:
3 Problem Formulation
This section formulates the optimization problem of PCC. PCC allows the speed of the truck to vary around the driver’s set speed. The speed variation range provides opportunity to reduce fuel consumption by using the upcoming road slope information. PCC can be regarded as a speed optimization problem. Compared with our previous work in Refs. [16, 31], the optimal control input of the gear selection is considered.
3.1 Objective Function
Evidently, the goals of PCC are to track the driver’s set speed and to reduce the fuel consumption. Thus, the problem of the PCC can be described as a nonlinear multiobjective optimization. The performance index to be minimized is formulated as follows:
with
where N is the predictive horizon, \(v_{r e f}\) is the driver’s set speed, and \(\kappa _{1}\) and \(\kappa _{2}\) are weighting coefficients. The item \(Q_{t}(k) \Delta t\) is penalized to minimize the fuel consumption. The item \(\left( v(k)v_{r e f}\right) ^{2}\Delta t\) is penalized to minimize the tracking error of the driver’s set speed. The terminal constraint \((v(N)v_{r e f})^{2}\) is penalized to guarantee that the vehicle reaches the reference speed at step N. The terminal constraint \(\varphi [x(N), N]\) is a soft constraint with respect to the terminal state v(N).
3.2 System Dynamics
The state equation of the discrete system is given as follows:
3.3 Capacity Constraints
When the engine is working, the engine torque \(T_e(k)\) has a capacity constraint, expressed as follows:
where \(T_{e, l}\) and \(T_{e, u}\) are the minimal and maximal torques, respectively.
PCC allows the speed of the truck to vary within a specified range. Thus, the speed of the truck has a band constraint,
where \(v_{\min }\) and \(v_{\max }\) are the minimal and maximal speeds, respectively.
The truck under investigation has a 12speed transmission. The transmission ratio \(i_{g}(G(k))\) in different gears is designed to meet not only the maximum climbing slope, but also the maximum speed. The lowest gear is related to the maximum climbing slope, and the highest gear is related to the maximum speed. The applicable gear ratio for a specified truck speed is constrained by the engine speed range because the engine has a speed range. According to Eq. (10), the constraints of the applicable gears G(k) can be expressed as follows:
where \(\omega _{e,\min }\) and \(\omega _{e,\max }\) are the minimal and maximal engine speeds, respectively. To determine the suitable gears for the current vehicle speed, we can use the given velocity v(k) and Eq. (16), along with the maximum speed \(\omega _{e,\text{max}}\), to calculate the transmission ratio \(i_g(G(k))\) of the large value, which corresponds to the low gear. Similarly, by combining v(k) with the minimum speed \(\omega _{e,\text{min}}\), we can calculate the transmission ratio \(i_g(G(k))\) of the small value, corresponding to the high gear. These calculations help us determine the range of the transmission ratio, and subsequently, we can check if the transmission ratio of gears 1 to 12 falls within this range. On this basis, we can determine which gears are appropriate for the present vehicle speed. As a result, only some of the twelve gears can satisfy the constraint (16) for a given vehicle speed.
3.4 Formulation Summary
In summary, the PCC problem is formulated as a constrained nonlinear optimization problem, written as follows:
In the formulation of Eq. (17), the optimal control inputs are the engine torque and the gear shifting command, i.e., \(u(k)=\begin{bmatrix}T_e(k)&u_g(k)\end{bmatrix}^\text{T}\). Note that the engine torque is a continuous variable and the gear shifting is a discrete variable. The actuator system of the gear shifting \(u_g(k)\) is a transmission control unit, and the actuator system of the engine torque \(T_e(k)\) is an engine control unit (ECU). Traditionally, the ECU receives the position signal of the accelerator pedal, then a twodimensional map of the pedal position and the engine speed is used to determine an engine torque command. The engine responds to the torque demand via many control loops, such as the air/fuel ratio feedback loop and the ignition angle feedforward loop. The ECU under investigation can directly receive the torque demand by a controller area network. Thus, the engine torque demand, instead of the pedal position, is selected as the optimal control input.
The system states are the truck distance, the truck speed, and the gear position, i.e., \(x(k)=\begin{bmatrix} s(k)&v(k)&G(k)\end{bmatrix} T\). The optimization problem is subject to state and input constraints.
4 Solution
Bearing the realvehicle implementation in mind, this section proposes a realtime implementable solution for PCC optimization problem with consideration of gear shifting. First, a realtime solution is derived based on PMP under the framework of MPC. Then, a nonrealtime solution is given based on DP as a benchmark.
4.1 Solution Method Based on MPC
In this part, an indirect method is discussed firstly on the basis of PMP for optimization problem (17). Then, the implementation of the fast solver is summarized. Thereafter, the treatment on state constraint and gear shifting implementation are discussed from an engineering implementation perspective.
4.1.1 Pontryagin’s Minimum Principle
The PCC optimization problem considering gear selection is a challenging task due to the discrete nature of gears. To obtain rapid solution method, a simplification that the gear position in the predictive horizon remains unchanged is made. In other word, the gear shifting only occurs in the first step of the predictive horizon, and the gear position does not change for the remaining steps of the predictive horizon. Thus, the gear position G(k) in the predictive horizon has three states, namely, downshift, hold, and upshift.
Benefit from this simplification, only two of the system states need to be well treated for finding the optimal solution of the optimization problem (17), i.e., states of the truck distance and the truck speed. Following the idea of Ref. [32], the Hamiltonian function is defined by the following:
where \(\lambda _1(k+1)\) and \(\lambda _2(k+1)\) are the costate variables with respect to states s(k) and v(k), respectively.
According to the statement of Pontryagin’s Minimum Principle, the optimal control input \(u^*(k)\), the optimal state trajectory \(x^*(k)\), and the corresponding costate variables \(\lambda ^*(k+1)=\begin{bmatrix} \lambda ^*_1(k+1)&\lambda ^*_2(k+1)\end{bmatrix}^\text{T}\) must minimize the hamiltonian function so that
for all steps, \(k=1,2,\cdots ,N\) and for all permissible control inputs \(u \in \Omega\). In addition, the update equation for costate variables
must be satisfied. The boundary conditions of the costate variables are as follows:
Given that the slope angle \(\alpha (k)\) varies slowly along the truck distance s(k), i.e., \(\frac{\partial \alpha (k)}{\partial s(k)}\approx 0\), the update equation for the costate \(\lambda _1(k)\) becomes as follows:
In addition, the boundary condition of the costate \(\lambda _1(k)\) is as follows:
Thus, the following relationship can be obtained:
for all steps \(k=1,2,\cdots ,N\). The Hamiltonian function (18) then becomes as follows:
For clarity of expression, the Hamiltonian is reformulated by a 2D polynomial using control variable \(T_e (k)\) and state variable v(k) as follows:
where
By substituting Eq. (26) into Eq. (20b), the update equation for the costate \(\lambda _2(k)\) becomes as follows:
Using the expansion formula of \(\rho _{4}(k)\) and \(\rho _{5}(k)\), the transformation relationship between the costate variables \(\lambda _2(k)\) and \(\lambda _2(k+1)\) can be expressed as follows:
where \(\frac{\delta mC_{D} A \rho v(k) \Delta t}{\delta m} \approx 1\) is used.
From Eq. (21b), the boundary condition of the costate \(\lambda _2(k)\) is as follows:
We now turn our attention to treat the necessary condition (19) of the optimal control. The gear shifting command \(u_g(k)\) is a discrete variable, while the engine torque \(T_e(k)\) is a continuous variable. In the predictive horizon, the gear shifting command \(u_g(k)\) is used only in the first step, and the gear position G(k) has three possible states. Thus, the three different gear shift operation (downshift, hold, and upshift) have three independent Hamiltonian functions, defined as
where subscripts \(1,0,1\) represent downshift, hold, and upshift, respectively.
The optimal control \(\left\{ T^*_e(k),u_g^*(k) \right\}\) must minimize the Hamiltonian function H at every step instant, written as follows:
Given that each Hamiltonian function in Eq. (30) is the quadratic function of the optimal input \(T_e(k)\) (see Eq. (26)), the explicit optimal solution can be solved to minimize the Hamiltonian function, as follows:
4.1.2 Implementation of the Fast Solver
It can be seen from Eq. (32) that if the optimal state variable \(v^*(k)\) and the optimal costate variable \(\lambda _2^*(k)\) are known, the optimal control inputs \(\left\{ T^*_e(k), u_g^*(k) \right\}\) can be obtained. When the initial covariate \(\lambda _2(0)\) is given, the corresponding terminal costate \(\lambda _2(N)\) can be obtained step by step by using the update Eq. (28). If the obtained the terminal costate \(\lambda _2(N)\) satisfies the boundary condition (29), then, the optimal control input for the initial covariate \(\lambda _2(0)\) is the optimal solution of the optimization problem (17). If the obtained terminal costate \(\lambda _2(N)\) does not satisfy the boundary condition (29), then, we need to adjust the initial covariate \(\lambda _2(0)\). This description is the socalled shooting method. The original optimization problem (17) is formulated as a problem of finding an initial value. Here, the bisection method is used to solve the problem of finding an initial value. Detailed information on using the bisection method can be found in our previous work [16].
4.1.3 Discussion on the Braking Torque Input and the Band Constraint of Vehicle Speed
In the solution derivation, the state constraint \(v_{\min } \le v(k) \le v_{\max }\) is inefficiently considered mainly because considering this constraint directly complicates the solution method, and the computational burden becomes huge. Instead of directly considering ths constraint, an engineering method is used to deal with the constraint. If the state constraint \(v_{\min } \le v(k) \le v_{\max }\) is violated, the control input is determined by a prescribed lookup table, i.e.,
By defining \(F_{req}=F_w+F_i+F_j\), \(e_1=vv_{\min }\) and \(e_2=v(v_{\max }+\varsigma )\), the prescribed lookup tables are written as
where \(\varsigma\) is the speed tolerance, \(k_{p0}(e_1)\) and \(k_{i0}(e_1)\) are the controller gains of the traction mode, and \(k_{p1}(e_2)\) and \(k_{i1}(e_2)\) are the controller gains of the brake mode. When the state constraint \(v_{\min } \le v(k) \le v_{\max }\) is not violated, the fast solver is used to determine the optimal control input.
4.1.4 Discussion on Gear Shifting Implementation
Eq. (16) shows that the gear G(k) has twelve candidates which are constrained by the velocity v(k) and the engine speed \(\omega _e(k)\). Therefore, the optimal control laws for downshift, hold, and upshift operations from the three Hamiltonian functions Eq. (31) should be met the gear constraint Eq. (16). If the upshift and downshift operations violate the constraint, then the gear position will hold the last step’s value. In addition, a gear hold time, such as 2 s, is introduced to prevent frequent shifting. Once the gear is shifted, the current gear position needs to be held for 2 s.
4.2 Solution Method Based on DP (Benchmark)
The DP algorithm is selected as a benchmark because it can provide a global optimal control. The illustration of the DP calculation is shown in Figure 4 for the optimization problem (17). The driving distance is divided into N equal segments. Every segment of the distance has a truck speed v(k). The truck speed v(k) is discretized as follows:
where \(\sigma\) is the discretization interval.
According to Bellman’s optimality principle, the recursive equation of DP is given for the optimization problem (17), as follows:
where \((k=0,1,\cdots , N1)\). Starting from the terminal state, the optimal solution and the corresponding value function can be obtained by a backward iterative procedure. Setting \(k=N1\), Eq. (36) becomes
where \(J_{N}^{*}[x(N)]\) is the value function of the terminal state. The value function of the terminal state is as follows:
The corresponding optimal input at step \(N1\) can be obtained by the following argument,
Then, setting \(k=N2,\cdots , 1, 0\), the value functions \(\left\{ J_{N2}^{*}[x(N2)], \cdots , J_{1}^{*}[x(1)], J_{0}^{*}[x(0)]\right\}\) and optimal control sequence \(\left\{ u^{*}(N2), \cdots , u^{*}(1), u^{*}(0)\right\}\) can also be obtained by the backward iterative procedure.
Given an initial state x(0), the optimal control input \(u^*(0)\) at step \(k=0\) is generated. Then, applying the optimal control input \(u^*(0)\) on the system model (13) yields a new state x(1). For the new state x(1), the optimal control input \(u^*(1)\) at step \(k=1\) is generated. Similarly, the optimal state trajectories and the optimal control policy can be generated by a forward iterative procedure.
5 Simulation Results
The simulations are conducted in a joint simulation environment to demonstrate the effectiveness of the proposed PCC scheme. The highfidelity model of the heavyduty truck is constructed using the commercial software Trucksim, and the proposed PCC is built in Matlab/Simulink. The important parameters of the truck are given in Table 1. More detailed information on parameters can be found in Ref. [33]. The complete control architecture of the proposed predictive cruise control is shown in Figure 5. The reference speed is set by the driver. The vehicle speed is measured by speed sensor. The position and roadslope information are provided by GPS and HD map, respectively. The proposed controller receives this information and provides the cooptimization control law. Then, the actuators of engine control unit, electronic stability control system and AMT respond to the cooptimization control law by controlling the heavyduty truck.
In the simulation validation, three methods, namely, PID controller, DP algorithm, and MPC algorithm, are used. PID controller represents the traditional constantspeed cruise. DP algorithm as the benchmark of optimal control problem provides a global optimal solution. The artificial and authentic roads are used to evaluate the control performance of the proposed predictive cruise controller. The cruise speed is set as 90 km/h to simulate a highspeed cruise condition.
The performance index of the fuel saving rate will be used to evaluate the performance of each control algorithm, which is defined as
where \(f_{PID}\) and \(S_{PID}\) are the fuel consumption and travel distance of the PID controller, \(f_{DP,MPC}\) and \(S_{DP,MPC}\) are the fuel consumption and travel distance of the MPC controller or DP controller.
5.1 Artificial Road
A single ascent road is first used to conduct the simulation to show the fuelsaving mechanism. The initial speed of the truck is set to the driver’s set speed, i.e., \(v_{ref}=90\) km/h. The allowed range of the speed is set as [80 100] km/h. Simulation results for the single ascent road are shown in Figure 6. Figure 6 shows that the truck with MPC algorithm and DP algorithm accelerates in advance when approaching an ascent. Acceleration in advance can avoid excessive reduction in the truck speed for the uphill process. The times to downshift gear for MPC algorithm and DP algorithm are later than that of the PID controller. The proposed controller saves more fuel than PID controller because working in a high gear is conducive to fuel saving.
Similarly, the simulation is conducted with a descent road. The corresponding results are shown in Figure 7. It is can be seen from Figure 7 that the truck with MPC algorithm and DP algorithm decelerates in advance when approaching a descent, while the truck with PID controller does not have any downhill preparation. When on the descent, the truck with PID controller has brake operation, whereas the proposed PCC has no brake operation. Brake dissipates the energy in the form of heat; thus, PCC saves more fuel by avoiding unnecessary braking.
Table 2 summarizes the performance comparison for the three different controllers. Compared with the PID controller, the fuel saving rate for the PCC with MPC algorithm and DP algorithm is approximately 1% for the ascent condition, approximately 17% for the descent condition. The deviation of fuel saving rates between MPC algorithm and DP algorithm is small. Note that the fuel savingperformance of Table 2 depends on how long the flat road before and after the slopes. The greater the proportion of flat roads is, the smaller fuel savings the PCC controller obtains.
5.2 Authentic Road
Two expressway routes are used to persuasively compare the control algorithms. The selected test roads are authentic roads, as shown in Figure 8. One route is from Yicheng service area to Chenan toll station (Route I), and the other is from Caopuyuan to Xijin (Route II). Their mileages are approximately 33 km and 40 km, respectively. Route I is an expressway section between two cities. Route II is an expressway across the city of Quzhou. The slope information on these two routes is provided by the map vendor of NavInfo. Simulation results are shown in Figure 9 and Figure 10. From Figure 9, a discernible discrepancy exists in vehicle speed between the DP algorithm and the MPC algorithm within the range of 25000 m to 30000 m. This disparity arises because the DP algorithm, serving as a global optimal controller, employs a more extensive set of global road slope information. Consequently, it initiates deceleration earlier when approaching a descent. In contrast, the MPC algorithm relies solely on the road slope information within the predictive horizon, resulting in less advanced deceleration. The findings within the 25000 m to 30000 m range align with those illustrated in typical descent roads in Figure 7. Similarly, the results in the 28000 m to 32000 m range of Figure 10 exhibit similar patterns.
To further compare the fuel efficiencies for the three different controllers on authentic roads, the distribution of engine operating points for Figure 9 and Figure 10 are shown in Figure 11 and Figure 12. Probability distribution graphs are presented to evaluate the distributions quantitatively. BSFC values are divided into five regions, ranging from less than 207 g/kW·h to more than 252 g/kW·h. Given that the engine does not inject fuel under zero or negative torque conditions, this portion of the data is not utilized as the statistical data. Judging from Figure 11 and Figure 12, it can be seen that the number of operating points in high efficiency area are near for DP algorithm and MPC algorithm, greater than that of the PID controller. The difference in the distribution of working points leads to the difference in fuel saving.
Table 3 summarizes the performance comparison for these two expressway routes. Compared with the PID controller, the fuel saving rate for the PCC with MPC algorithm and DP algorithm is approximately 4%−6% for the authentic roads. As revealed in Table 3, the control performance of the proposed MPCbased solution is nearly the same as that of the DPbased solution with less than 1% deviation and considerably better than PID controller.
6 Experimental Results
HIL and realtruck experiments are conducted to verify the realtime capability of the proposed cooptimization controller. The experiments are first implemented in an embedded computer with high computation capability, then in an invehicle control unit, and finally on a real truck driving on real roads.
6.1 Embedded Computer
The HIL test bench of the embedded computer is shown in Figure 13. The series of the embedded computer is DS1002, which uses the NIRT as the realtime controller environment. The embedded computer communicates with the host PC via TCP/IP. The monitor are used to display the computational state and the experimental results. Before HIL experiments, C source codes of the vehicle plant model and controller model are generated by using the MATLAB toolbox C/C++ Coder, and then are downloaded to the embedded computer. A commercial software VeriStand as a realtime test application is used for data acquisition and realtime logging. The sampling time in HIL experiments is 0.05 s.
The testing road consists of two types. One is the constant slope, and the other is the varying slope. The set cruise speed and the initial speed of the vehicle are 90 km/h. The proposed cooptimization controller is implemented in realtime manner under the hardware conditions of the HIL platform. The results of HIL experiments are shown in Figure 14. It can be seen that the simulation results and HIL experimental results are consistent. This agreement is primarily attributed to the utilization of identical algorithms, parameters, and initial conditions in both environments. Additionally, both the HIL platform and Matlab/Simulink software employ floatingpoint calculations, ensuring the absence of computational deviation.
6.2 Vehicle Control Unit
The HIL test bench of the vehicle control unit is shown in Figure 15. The vehicle control unit is an automotivegrade processing chip, SAKTC233L, which is developed by Infineon. The vehicle control unit communicates with the upper computer via LAUTERBACH Debugger and ValueCAN. The C source code of the proposed controller was generated via MATLAB toolbox C/C++ Coder, after which it was compiled by the HighTec’s compiler. An upper computer was used to monitor and record the inputs and outputs of the vehicle control unit.
The proposed control method is integrated into the system as a functional component, constituting only a fraction of the entire framework. Consequently, the choice of the sampling time necessitates consideration of other functional components and the realtime characteristics of the entire system. A small sampling time may impede realtime execution, leading to system overrun prompts. Inheriting the original engineering requirements of the developed control unit, the sampling time of the vehicle control unit is set at 0.02 s. In this case, the proposed control method can be implemented in a realtime vehicle control unit, and the HIL experimental results of the vehicle control unit are shown in Figure 16. The test scenario is from an authentic road. The road slope information is provided by the map vendor. The set reference speed is 78 km/h. The initial speed differs from that in Figure 14. The divergence in initial speeds allows us to assess the adaptive performance of the proposed algorithms under various initial conditions, simulating realworld scenarios where vehicles may initiate tasks at different vehicle speeds. The results in both Figure 14 and Figure 16 show that the proposed controller works well for different initial speeds. As demonstrated in Figure 16 that the simulation results are nearly consistent with the results of the HIL test. The zoomed subfigure reveals slight deviations around 410 s. This is mainly due to the effect of data type conversion. Typically, the vehicle control unit does not support floatingpoint operations due to their large memory occupation and computational burden. In HIL test, SAKTC233L employs fixedpoint operations, whereas Matlab/Simulink software utilizes doubletype floatingpoint operations.
6.3 Real Truck Implementation
To validate the capability of implementing the proposed algorithm in real trucks and its fuelsaving performance, a realtruck experiment is conducted in Hubei Province using the test truck shown in Figure 17. The experiment covers a test route from HeDianzhen to Gucheng toll station, as illustrated in Figure 17. The test distance is 100 km, and the speed limit for trucks is 100 km/h. During the experiments, a digital map is equipped to the test truck to provide upcoming road information. Moreover, the driver is required to intervene in emergency circumstances by applying brakes. The rulebased PCC developed by a component company is employed as the benchmark controller.
The experimental results, as depicted in Figure 18, show that the PCC algorithm outperforms the rulebased PCC on the same road section without any driver intervention. Specifically, the fuel consumption of the rulebased PCC and the proposed MPCbased PCC algorithm are 40.56 L and 37.35 L, respectively. Furthermore, the average vehicle speeds of the rulebased PCC and the proposed MPCbased PCC algorithm are 89.95 km/h and 89.19 km/h, respectively, with corresponding travel times of 1.11 h and 1.12 h. The proposed MPCbased PCC algorithm achieves a fuel saving rate of 7.9%, without compromising the truck’s travel time.
7 Conclusions
The paper designs a realtime cooptimization of gear shifting and engine torque in PCC problem of heavyduty trucks. After simplifying that the gear shifting only occurs in the first step of the predictive horizon, a fast solution is derived using PMP and an indirect shooting method. The simulations in a joint simulation environment, and the experiments on the HIL platforms and the real truck are conducted to demonstrate the effectiveness of the proposed PCC scheme. The main results are as follows. (1) The control performance of the proposed MPCbased solution is nearly the same as that of the DPbased solution with less than 1% deviation for testing roads. (2) The proposed cooptimization controller can be realized in a realtime vehicle control unit. (3) A realtruck experiment is conducted to evaluate the fuelsaving performance of the proposed MPCbased controller, and a fuelsaving rate of 7.9% is achieved.
Future work will focus on the realtime cooptimization method with the removal of assumption that the gear shifting only occurs in the first step of the predictive horizon. The potential directions are fast solution of mixedinteger programming problems and hierarchical controller design.
Availability of Data and Materials
Not applicable.
References
M Held, O Flärdh, J Mårtensson. Experimental evaluation of a lookahead controller for a heavyduty vehicle with varying velocity demands. Control Engineering Practice, 2021, 108: 104720.
A K Madhusudhanan. A method to improve an electric vehicle’s range: Efficient Cruise Control. European Journal of Control, 2019, 48: 83–96.
J Yao, G Chen, Z Gao. Target vehicle selection algorithm for adaptive cruise control based on lanechanging intention of preceding vehicle. Chinese Journal of Mechanical Engineering, 2021, 34: 135.
E Hellström, M Ivarsson, J Åslund, et al. Lookahead control for heavy trucks to minimize trip time and fuel consumption. Control Engineering Practice, 2009, 17(2): 245–254.
J Liu, B Pattel, A S Desai, et al. Fuel efficient control algorithms for connected and automated linehaul trucks. 2019 IEEE Conference on Control Technology and Applications (CCTA), IEEE, 2019: 730–737.
H Dong, W Zhuang, B Chen, et al. Predictive energyefficient driving strategy design of connected electric vehicle among multiple signalized intersections. Transportation Research Part C: Emerging Technologies, 2022, 137: 103595.
B Asadi, A Vahidi. Predictive cruise control: Utilizing upcoming traffic signal information for improving fuel economy and reducing trip time. IEEE Transactions on Control Systems Technology, 2010, 19(3): 707–714.
F Xu, T Shen. Lookahead predictionbased realtime optimal energy management for connected HEVs. IEEE Transactions on Vehicular Technology, 2020, 69(3): 2537–2551.
F Zhang, X Hu, R Langari, et al. Energy management strategies of connected HEVs and PHEVs: Recent progress and outlook. Progress in Energy and Combustion Science, 2019, 73: 235–256.
H Tan, H Zhang, J Peng, et al. Energy management of hybrid electric bus based on deep reinforcement learning in continuous state and action space. Energy Conversion and Management, 2019, 195: 548–560.
A Biswas, A Emadi. Energy management systems for electrified powertrains: Stateoftheart review and future trends. IEEE Transactions on Vehicular Technology, 2019, 68(7): 6453–6467.
M Sorrentino, G Rizzo, I Arsie. Analysis of a rulebased control strategy for onboard energy management of series hybrid vehicles. Control Engineering Practice, 2011, 19(12): 1433–1441.
D Gao, Z Jin, Q Lu. Energy management strategy based on fuzzy logic for a fuel cell hybrid bus. Journal of Power Sources, 2008, 185(1): 311–317.
S Zhang, Y Luo, K Li, et al. Realtime energyefficient control for fully electric vehicles based on an explicit model predictive control method. IEEE Transactions on Vehicular Technology, 2018, 67(6): 4693–4701.
L H Csekő, M Kvasnica, B Lantos. Explicit MPCbased RBF neural network controller design with discretetime actual Kalman filter for semiactive suspension. IEEE Transactions on Control Systems Technology, 2015, 23(5): 1736–1753.
H Chu, L Guo, B Gao, et al. Predictive cruise control using highdefinition map and real vehicle implementation. IEEE Transactions on Vehicular Technology, 2018, 67(12): 11377–11389.
H Borhan, A Vahidi, A M Phillips et al. MPCbased energy management of a powersplit hybrid electric vehicle. IEEE Transactions on Control Systems Technology, 2011, 20(3): 593–603.
W Chu, Q Wuniri, X Du, et al. Cloud control system architectures, technologies and applications on intelligent and connected vehicles: A review. Chinese Journal of Mechanical Engineering, 2021, 34: 139.
W Zhuang, L Qu, S Xu, et al. Integrated energyoriented cruising control of electric vehicle on highway with varying slopes considering battery aging. Science China Technological Sciences, 2020, 63(1): 155–165.
S Boyd, S P Boyd, L Vandenberghe. Convex optimization. Cambridge University Press, 2004.
H Dong, W Zhuang, G Yin, et al. Energyoptimal braking control using a doublelayer scheme for trajectory planning and tracking of connected electric vehicles. Chinese Journal of Mechanical Engineering, 2021, 34: 83.
L Guo, B Gao, Y Gao, et al. Optimal energy management for HEVs in ecodriving applications using bilevel MPC. IEEE Transactions on Intelligent Transportation Systems, 2016, 18(8): 2153–2162.
M Diehl, H J Ferreau, N Haverbeke. Efficient numerical methods for nonlinear MPC and moving horizon estimation. Nonlinear Model Predictive Control, 2009: 391–417.
S Richter, C N Jones, M Morari. Computational complexity certification for realtime MPC with input constraints based on the fast gradient method. IEEE Transactions on Automatic Control, 2011, 57(6): 1391–1403.
O Von Stryk, R Bulirsch. Direct and indirect methods for trajectory optimization. Annals of Operations Research, 1992, 37(1): 357–373.
H Waschl, I Kolmanovsky, M Steinbuch, et al. Optimization and optimal control in automotive systems. Springer, 2014.
S Stockar, V Marano, M Canova, et al. Energyoptimal control of plugin hybrid electric vehicles for realworld driving cycles. IEEE Transactions on Vehicular Technology, 2011, 60(7): 2949–2962.
L Guo, B Gao, Q Liu, et al. Online optimal control of the gearshift command for multispeed electric vehicles. IEEE/ASME Transactions on Mechatronics, 2017, 22(4): 1519–1530.
T Rudolf, T Schürmann, S Schwab, et al. Toward holistic energy management strategies for fuel cell hybrid electric vehicles in heavyduty applications. Proceedings of the IEEE, 2021, 109(6): 1094–1114
S Xu, S E Li, B Cheng, et al. Instantaneous feedback control for a fuelprioritized vehicle cruising system on highways with a varying slope. IEEE Transactions on Intelligent Transportation Systems, 2016, 18(5): 1210–1220.
H Chu, L Guo, Y Yan, et al. Energyefficient longitudinal driving strategy for intelligent vehicles on urban roads. Science China Information Sciences, 2019, 62(6): 64201.
G L Thompson. Optimal control theory: Applications to management science and economics. Springer, 2006.
S W Hunt, A M C Odhams, R L Roebuck, et al. Parameter measurement for heavyvehicle fuel consumption modelling. Proceedings of the Institution of Mechanical Engineers, Part D: Journal of Automobile Engineering, 2011, 225(5): 567–589.
Acknowledgements
The authors would like to thank Zhenyi Hao, Xianning Li for their help in HIL experiments.
Funding
Supported by International Technology Cooperation Program of Science and Technology Commission of Shanghai Municipality of China (Grant No. 21160710600), National Nature Science Foundation of China (Grant No. 52372393), and Shanghai Pujiang Program of China (Grant No. 21PJD075).
Author information
Authors and Affiliations
Contributions
HC: Writing, Resources, Methodology, Validation, Investigation. XN: Truck modeling, Parameter resource, Review and editing. HL: Software, Simulation, Data processing, Review. YW: Discussion, Methodology, Review. ZY: HIL test bench, Truck experiments, Review. LZ: Writing, Methodology, HIL test bench, Review and editing. HC: Conceptualization, Review. All authors read and approved the final manuscript.
Corresponding author
Ethics declarations
Competing interests
The authors declare that they have no competing interests.
Rights and permissions
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.
About this article
Cite this article
Chu, H., Na, X., Liu, H. et al. RealTime Cooptimization of Gear Shifting and Engine Torque for Predictive Cruise Control of HeavyDuty Trucks. Chin. J. Mech. Eng. 37, 42 (2024). https://doi.org/10.1186/s10033024010157
Received:
Revised:
Accepted:
Published:
DOI: https://doi.org/10.1186/s10033024010157