# Parallel Hybrid Electric Vehicle Modelling and Model Predictive Control
## 5 The MPC with Softened Constraints for the HEV
### The MPC for the HEV in High Speed with ICE  
When the HEV runs at a high speed, the starter/generator ME2 starts the ICE. Depending on the required output torque, the ICE alone, or the ICE and ME1, or all ICE, ME1 and ME2 will be running and together providing torque.  
In this mode, we assumed that the vehicle runs at \(\omega_{3}=2000\) rpm, and the torque of the air drag resistance at this speed of \(M_{\rm 50}=30\) Nm. The parameters of the starter motor EM2 are as constants \(k_{E2}=k_{T2}=15\), inertia \(J_{1}=1\), damping coefficient \(k_{\beta 1}=0.5\), resistance \(R_{\rm 11}=7\), compensation \(\varsigma=0.5\), and a discrete time of \(0.05\) s.  
The softened constraints were imposed on the input voltage constraints for the starter of \(|V_{1}|\leq 48\) V, \(u(t)=+/-5\,\mathrm{V}/interval\), and the output constrained torque on shaft 1 of \(|T_{2}|\leq 455\) Nm.  
For the MPC parameters, we selected the predictive horizon length of \(N_{u}=N_{y}=N_{p}=5\) and the weighting matrices \(Q=\left[\begin{array}{cc}10&0\\ 0&10\end{array}\right]\) and \(R=\left[\begin{array}{cc}1&0\\ 0&1\end{array}\right]\). The MPC performance with starting EM2 is shown in Figure 8.  
Figure 8 shows that the EM2 starts in 1 s and the ICE is fully ignited and runs in 2.3 s; the ICE speed reaches the setpoints of 2000 rpm and steadily runs at 6.2 kW, providing the output torque of 31 Nm.  
In the next simulation, we run the EM2 and the ICE to track the speed desired setpoints and ignite the clutch engagement. It was assumed that the main motor EM1 runs at 1500 rpm and the starter EM2 starts the ICE and is engaged into the system. The clutch engagement must take place at \(\omega_{1}\geq\omega_{2}\) or \(\omega_{1}=1.05*\omega_{2}\) for driving comfortability and a low jerk. The ICE and ME2 must track on the EM1 speed at +5% offset. The full engagement is completed in 2.3 s, as shown in Figure 9.  
Figure 8: The MPC for the HEV with ICE and ME2.  
In Figure 9, we see the ICE and ME2 tracking ME1 on the desired setpoints in 1.9 s. In the normal mode, at speed higher than 40 km/h, the starter ME2 ignites the ICE and is turned as a generator charging to battery. The main motor EM1 now is also turned off. Only the ICE propels the HEV.  
In Figure 10, it can be seen that the ME2 is turned off and becomes the generator after igniting the ICE. The main motor EM1 is also turned off, and the ICE alone propels the HEV. The HEV reaches and tracks the desired speed setpoints after 3.5 s.  
Finally, we compared the performances of the MPC with hard constraints and he MPC with softened constraints. We run the MPC with hard constraints in Equation (31) and the MPC with softened constraints in Equation (36) to track the desired speed setpoints, as shown in Figure 11.  
Figure 10: The MPC for the HEV propelled by only ICE.  
Figure 9: The MPC for the HEV with ICE and ME2.  
Figure 11 shows that the MPC with hard constraints generates smaller inputs and, hence, it needs a longer time to track into the speed setpoint. The MPC with hard constraints reaches the speed setpoint after 4.5 s, while the MPC with softened constraints needs only 3.5 s to fully track into the speed setpoint.