# Path Tracking Control Strategy Based on Adaptive MPC for Intelligent Vehicles
## 4 Condition-Adaptive MPC Controller
### Solving Optimal Time Domain Parameter Combination Based on GA  
Table 4 delineates numerous typical curve conditions (totaling 100 groups), rendering the enumeration method impractical for identifying the optimal solution. The genetic algorithm (GA) offers distinct advantages, including robust global search capabilities, rapid convergence speed and high search efficiency. Consequently, in this study, the genetic algorithm toolbox within MATLAB R2020b is employed to optimize the time domain parameters across various operational conditions.  
The time domain parameter matrix of the MPC controller is determined as the optimization objective:  
\[K_{1}=\begin{bmatrix}N_{\mathrm{P}}&N_{\mathrm{c}}\end{bmatrix} \tag{19}\]  
To improve the optimization efficiency, set the prediction horizon value range \(N_{\mathrm{P}}\)\(\in\)(0,40] and the control horizon value range \(N_{\mathrm{c}}\)\(\in\)(0,20].  
Since the dimensions of the lateral deviation and heading deviation of vehicle path tracking are inconsistent, they are normalized:  
\[\left\{\begin{array}{l}\overline{y}_{\mathrm{e}}=1-2\frac{y_{\mathrm{emax}}- y_{\mathrm{e}}}{y_{\mathrm{emax}}-y_{\mathrm{emain}}}\\ \overline{\varphi}_{\mathrm{e}}=1-2\frac{\varphi_{\mathrm{emax}}-\varphi_{ \mathrm{e}}}{\varphi_{\mathrm{emax}}-\overline{\varphi}_{\mathrm{emin}}}\end{array}\right. \tag{20}\]  
where \(\overline{y}_{\mathrm{e}}\) and \(\overline{\varphi}_{\mathrm{e}}\) are, respectively, the lateral deviation and heading deviation after the above treatment. \(y_{\mathrm{emax}}\) and \(y_{\mathrm{emin}}\) are, respectively, the maximum and minimum lateral deviation generated when tracking the target path. \(\varphi_{\mathrm{emax}}\) and \(y_{\mathrm{emin}}\) are the maximum and minimum values of heading deviation, respectively.  
Set the comprehensive deviation during vehicle path tracking as  
\[e=\kappa\overline{y}_{\mathrm{e}}+(1-\kappa)\overline{\varphi}_{\mathrm{e}} \tag{21}\]  
where \(\kappa\) denotes the deviation weight coefficient, which is assigned a value of 0.5 in this paper.  
The fitness function for the genetic algorithm is designed by incorporating the time index and the squared error resulting from time multiplication [37]:  
\[J=\int_{\mathrm{t}_{1}}^{\mathrm{t}_{2}}t\mid e(t)|\mathrm{d}t \tag{22}\]  
(1) Optimization Problem Definition:  
The performance function is explicitly defined in Equation (22) as the fitness function for GA optimization, combining the tracking accuracy and control effort. The search space  
\begin{table}
\begin{tabular}{c c c c c c c c c c} \hline Speed/km/h & 10 & 20 & 30 & 40 & 50 & 60 & 70 & 80 & 90 & 100 \\ \hline \multirow{8}{*}{Radius of road curvature /m} & 6 & 15 & 30 & 60 & 90 & 125 & 185 & 250 & 320 & 400 \\  & 8 & 20 & 35 & 65 & 100 & 135 & 200 & 270 & 350 & 440 \\  & 10 & 25 & 40 & 70 & 110 & 145 & 215 & 290 & 380 & 480 \\  & 12 & 30 & 45 & 75 & 120 & 155 boundaries for the time domain parameters are _Np_\(\in\)(0,40] and _Nc_\(\in\)(0,20]. The vehicle stability constraints in Equation (14) ensure that the yaw rate and lateral velocity remain within safe limits.  
GA Configuration and Performance:  
Parameters: Population size = 50, Generations = 20, Crossover probability = 0.5, Mutation probability = 0.1.  
Performance: The optimized results in Table 5 demonstrate the GA's effectiveness in identifying the best time domain parameters for various operating conditions.  
The [\(N_{\text{p}}\)\(N_{\text{c}}\)] combination obtained through iterative optimization using the genetic algorithm represents the optimal time domain parameter combination under various operating conditions. The optimized results are presented in Table 5.