1. Introduction
As a key component of intelligent transportation systems, advancements in autonomous mobility have garnered significant attention, especially in academia and industry [
1,
2]. Path tracking control is a crucial technology for autonomous vehicles, aiming to reduce the discrepancy between the actual trajectory and the desired trajectory by considering the vehicle’s real-time dynamics [
3]. However, when the vehicle is traveling at a rapid pace or operating on a slippery road surface, it is prone to losing stability and deviating from the target trajectory [
4]. Therefore, designing a path tracking control method that maintains high accuracy and strong robustness under complex driving conditions is of great significance for enhancing the safety and reliability of autonomous driving systems.
Existing path tracking techniques mainly include PID control, Pure Pursuit control [
5], backstepping control [
6], fuzzy logic control [
7], LQR control [
8], sliding mode approach [
9], and Model Predictive Control [
10,
11]. Among these, Model Predictive Control has been extensively utilized in path tracking applications owing to its predictive nature and distinct advantages in handling nonlinear dynamics and multi-constraint problems [
12]. However, it still faces some challenges. Many researchers have proposed improvements such as optimizing controller parameters, enhancing model accuracy [
13], and adding constraints [
14]. Wu et al. [
15], by analyzing the impact of the prediction horizon and weighting factors on trajectory accuracy and vehicle yaw stability, plotted the corresponding relationships as three one-dimensional lookup tables, achieving adaptive adjustment of the controller parameters. Yang and Liu [
16] proposed a rule-based adaptive prediction horizon MPC for lateral tracking control and fuzzy PID for forward motion control, which is adapted to changes in vehicle speed. Wang et al. [
17] utilized a fuzzy logic-based approach to dynamically tune the lateral displacement weight coefficient in the MPC trajectory following controller, considering both the average deviation and its rate of change. Yang et al. [
18] designed a trajectory tracking control strategy based on a T–S fuzzy variable-weight MPC controller. The lateral error and heading error are used as fuzzy inputs, while the weighting factors for lateral error, yaw rate error, velocity error, and control increment are treated as outputs. By analyzing the relationship between the outputs and the vehicle states, fuzzy rules are formulated to achieve adaptive adjustment of the controller parameters. Xue and Zheng [
19] developed an adaptive model predictive controller with flexible sampling and prediction intervals, incorporating a rounding function and a contraction factor, where the adaptation is guided by the average curvature’s second-order derivative. Although the aforementioned methods have improved the adaptability of path tracking controllers to complex driving environments to some extent, most of them rely on manually designed lookup tables or fuzzy logic rules. The parameter tuning process heavily depends on empirical knowledge or prior experience and lacks theoretical optimization foundations, making the controller performance is susceptible to subjective factors. In addition, these methods often suffer from insufficient tracking accuracy and degraded stability under extreme conditions such as high speeds, sharp turns, or low-adhesion road surfaces, making it difficult to meet the robustness and safety requirements of autonomous vehicles in complex driving scenarios. Wang et al. [
20] developed a path-tracking strategy utilizing model predictive control with an adaptive prediction horizon, optimized using particle swarm optimization. The method theoretically possesses strong global optimization capabilities and can adapt to various road conditions and vehicle states. However, as an online optimization algorithm, particle swarm optimization typically requires a large number of iterations and multiple objective function evaluations, placing high demands on system computational resources and response time, which significantly increases the online computational burden of the controller. Moreover, due to the potential sensitivity to initial values, the stability and convergence of the optimization results cannot be reliably guaranteed under complex driving conditions.
The lateral controllers in the aforementioned studies only control the front-wheel turning angle. Advancements in autonomous driving technology have enabled the development of vehicles with independently controlled steering and drive systems, providing a platform for advanced control strategies like Active Front/Rear-Wheel Steering (AFS/ARS) and Direct Yaw Moment Control (DYC) [
21,
22].The direct yaw moment control strategy primarily adopts a traditional layered framework, where the higher-level controller obtains the wheel angles and generalized forces, while the lower level controller distributes the generalized forces to the four wheels [
23]. Ren et al. [
24] introduced a unified control approach that combines longitudinal force with front-axle turning angle MPC to fully leverage the advantages of the MPC controller in solving multi-constraint problems. Numerous studies have employed the phase plane analysis to examine the dynamic behavior of vehicles, aiming to resolve the coupling issue between vehicle tracking performance and stability [
25]. Liu and Dai [
26] proposed a coordinated control approach for AFS and DYC, where the instability degree obtained from the
phase plane analysis is used as the controller’s intervention condition. A switching function is designed based on the edge density function of a normal distribution to smoothly transition between the weight coefficients of the two controllers. Zhu et al. [
27] employed an adaptive fuzzy controller and the phase plane method to regulate the quantization and scale factors for calculating the required additional yaw moment. Wang and Song [
28] introduced an error penalty into the optimal distribution control objective function and modified the weight matrix using the vehicle’s steady-state coefficients obtained through
phase plane analysis, optimizing the torque distribution across the wheels during vehicle operation. This method considers the vehicle’s dynamic response during driving to optimize the conditional constraints in the torque distribution strategy, thereby enhancing control performance under specific stability requirements. However, it does not incorporate the longitudinal dynamic response into the control framework, lacking coordinated control over the coupling between vehicle power performance and stability. In real-world scenarios, the vehicle’s longitudinal driving capability and lateral stability are often mutually constrained. Ignoring such coordination under extreme conditions may lead to vehicle instability and compromise driving safety.
Based on the above analysis and discussion, this paper proposes an adaptive path tracking control algorithm for distributed drive electric vehicles, aiming to address several critical issues identified in relevant studies from 2023 to 2025, as summarized in
Table 1. First, existing adaptive MPC approaches generally rely on either predefined rules or fully depend on optimization algorithms. The former suffers from strong subjectivity in controller design, while the latter incurs a high online computational burden, limiting their applicability under complex driving conditions. Second, many existing methods fail to adequately consider the vehicle’s adaptability to varying environments, making it difficult for the system to handle highly dynamic and uncertain driving scenarios. Furthermore, under dynamic driving conditions, there exists a significant coupling between path tracking performance and vehicle stability. Current control strategies lack effective coordination mechanisms to address this coupling and often neglect the influence of longitudinal driving performance on vehicle stability, which ultimately compromises overall control performance. The main contributions of this paper are as follows:
- (1)
The Back Propagation (BP) neural network is utilized to model the intricate non-linear correlation between the MPC weight coefficients and trajectory tracking precision along with dynamic stability, reducing the reliance on manually designed lookup tables or fuzzy logic rules and minimizing the influence of subjective factors. To optimize the weights and biases of the neural network during backpropagation, the Snake Optimization method is employed for iterative tuning of neural network parameters. The neural network model is trained offline using extensive simulation data, and a fitness criterion is formulated by incorporating both trajectory accuracy and stability to reduce online computation costs. The Snake Optimization algorithm is employed to optimize the MPC weight parameters under different driving conditions.
- (2)
To overcome the coupling issue of vehicle tracking capability and stability, a stability control approach utilizing the phase plane method is developed. The dynamic state of the vehicle is analyzed in real-time using the phase plane, and different instability degree-based zone controllers are designed. To ensure smooth switching between controllers, a joint control domain is introduced.
- (3)
Addressing the overlooked impact of the vehicle’s longitudinal power performance on stability in the aforementioned studies, this paper ensures that dynamic performance and stability requirements are met by coordinating the longitudinal driving torque and additional yaw moment based on the instability degree and road friction coefficient. The optimal distribution algorithm is designed to determine the driving torques for each wheel, considering the vehicle’s understeer characteristics.
2. Materials and Methods
This paper develops an integrated path tracking controller based on Model Predictive Control (MPC) for four-wheel independent drive (4WID) vehicles. The control system is based on a three-DOF vehicle dynamics model, which considers the longitudinal, lateral, and yaw motions of the vehicle. The MPC path tracking controller serves as the core module. To fully exploit the advantages of MPC in handling multi-constraint problems, this study selects the front and rear wheel steering angles and the longitudinal driving forces as control variables. The performance of the controller depends on the selection of the weighting matrices Q and R. Improper weighting may lead to reduced tracking accuracy or compromised vehicle stability. The reference model calculates the ideal sideslip angle and yaw rate of the vehicle’s center of mass, which serve as target inputs for the stability control module under varying road conditions.
2.1. Vehicle Model and Ideal Reference Model
In this study, a three-DOF dynamic equation models the vehicle’s motion characteristics during path tracking. The analysis assumes a small front-wheel steering angle and a constant longitudinal velocity along the
x-axis. The model ignores the differences in steering angles between the inner and outer wheels (Ackermann steering geometry), as well as the effects of air resistance and suspension. The corresponding bicycle model is depicted in
Figure 1. The lateral and forward movement of the vehicle, along with its yaw dynamics, are captured by Equation (1).
In the equation,
represents the vehicle’s total mass.
and
denote its forward and lateral velocities, respectively. The yaw angular velocity is denoted by
.
,
,
and
correspond to the longitudinal and side forces acting on the front-axle and rear-axle tires.
represents the moment of inertia;
and
indicate the distances from the center of mass to the front-axle and rear-axle. It should be noted that the three-DOF bicycle model used in this study offers a simplified representation of vehicle dynamics under medium- to high-speed driving conditions. Its accuracy decreases at low speeds and large steering angles, such as during parking maneuvers. Therefore, this study focuses on medium- to high-speed scenarios. Future work will extend the model to address low-speed and large steering angle conditions. When the tires function within the linear range, the side force is given by Equation (2).
In the equation, and denote the equivalent cornering rigidity of the front-axle and rear-axle. The slip angles of the front-axle and rear-axle are denoted by and , while and correspond to their respective steering angles.
In the control framework adopted in this study, the effects of the suspension system and aerodynamic forces are neglected, and parameters such as tire cornering stiffness are simplified as constant values. This modeling approach has been widely adopted in numerous recent studies on lateral control, particularly under typical conditions such as medium- to high-speed driving and lane-keeping scenarios, where it shows strong applicability. When the tire operates within a small slip angle range (typically less than 6°), the variation in cornering stiffness is minimal, making it a reasonable simplification to treat it as a constant [
29]. The cornering stiffness parameters were calibrated experimentally at 90 km/h, and have shown effective control performance across a wide range of medium- to high-speed driving conditions. However, it is acknowledged that under extreme dynamic scenarios involving large slip angles, this simplification may not fully capture the actual vehicle dynamics. In future work, we plan to incorporate online parameter estimation methods, as well as suspension and aerodynamic modeling, to improve model adaptability and robustness.
The vehicle’s total mass and inertia properties, along with the front and rear axle cornering stiffness coefficients, were derived from CarSim 2020.0, a validated commercial vehicle dynamics simulation platform. These parameters correspond to a C-Class Hatchback passenger car model embedded in CarSim’s database, which has been extensively adopted in both academic research and engineering practice due to its realism and representative nature.
The tire’s rotational dynamics are expressed as:
where
is the tire’s rotational inertia,
is the angular velocity of the tire.
is the tire radius,
and
respectively represent the longitudinal force and driving torque of the tire. Equation (1) can be derived and expressed as a differential equation in Equation (4).
Taking road adhesion limitations into account, the maximum allowable angular velocity and body slip angle are derived from Equation (5).
The ideal reference model characterizes the vehicle’s lateral dynamics under steady-state conditions. When the vehicle maintains a steady state,
and
. The required vehicle’s ideal angular velocity and body slip angle for the system are computed as shown in Equation (6).
where
denotes the road friction coefficient, and
is the gravitational acceleration. The parameters
and
correspond to the wheelbase and vehicle stability factor, respectively. Additionally,
signifies the ideal yaw rate, and
refers to the ideal center of mass slip angle.
2.2. MPC Path Tracking Model
During path tracking control, the following relationship exists:
In the equation, represents the vehicle’s heading angle, and denote its forward and lateral positions in the global coordinate system.
Based on Equation (4), the system can be transformed into state-space representation. The state variables are taken as
, the control parameters as
, and the output variables as:
. The resulting state-space equation is presented in Equation (8).
where:
Assuming the current state is
, performing the Taylor series expansion while retaining only the first-order terms yields:
By subtracting Equation (9) from the current state point, we obtain:
Applying the first-order difference approximation, Equation (10) is discretized using a fixed sampling interval
, as shown in Equation (11).
In the equation,
,
and
. In order to limit the control inputs, the state and control variables are augmented into a new set of state variables, denoted as
, and the variation in control inputs at each iteration relative to the preceding one is represented by
, which gives Equation (12).
where:
,
,
.
represents the number of state variables.
denotes the number of control inputs. Let
denote the current time step. To predict the states and outputs for the next
steps, the control input is represented as Equation (13).
where:
. From the above equation, the controller predicts the output
over the next
steps as illustrated in Equation (14).
where:
To ensure smoothness and stability in the tracking process, the optimization objective is to minimize state deviations and control efforts. This objective is formulated as a quadratic programming problem, as shown in Equation (15).
where:
,
,
.
and
are the prediction and control matrices for the MPC, respectively. While
,
and
represent the weights for lateral deviation, yaw rate error, and control input variation, respectively. Model Predictive Control needs to solve the optimal control sequence over the prediction horizon while satisfying the objective function and various constraints. The constraints on the four-wheel steering angles, as well as the longitudinal driving force and its rate of change, are expressed as shown in Equation (16).
Considering the limitations of the steering and drive motors, the front wheel steering angle is constrained within the range of [−0.44, 0.44] radians, with a rate limit of [−0.02, 0.02] radians. The rear wheel steering angle is constrained within [−0.44, 0.44] radians, with a rate limit of [−0.005, 0.005] radians. The longitudinal driving torque is constrained to [−600, 600] Nm, with a rate limit of [−50, 50] Nm. These constraints are based on the technical specifications of typical wheel-side motors and steering actuators, and are compatible with the discretization interval of the MPC used in this study [
30]. By solving the constrained quadratic optimization problem, the optimal front and rear steering angles and longitudinal driving torque can be obtained. Only the first element of the optimal control sequence is applied at each sampling instant, and the optimization process is repeated at every time step.
2.3. Trajectory Tracking Control System Design for 4WID Vehicles
Figure 2 illustrates the framework of the trajectory tracking strategy for a distributed drive vehicle. The planning layer provides road information and vehicle state parameters as inputs to the MPC. Heidfeld et al. [
31] use the Unscented Kalman Filter (UKF) method, combining a nonlinear double-track model with a brush tire model, to achieve real-time estimation of vehicle state parameters including vehicle speed, yaw rate, and road friction coefficient. This approach improves the accuracy and robustness of the vehicle system control. Li et al. [
32] propose a method for estimating the vehicle’s center of mass side-slip angle based on the non-linear Dugoff tire model and the non-singular terminal sliding mode observer (NS-TSMO). This method improves the accuracy of side-slip angle estimation for vehicles driving under varying road adhesion conditions. The signal acquisition method is not the focus of this study. It is assumed that sensor data is accurately obtained, and the vehicle state parameters as well as the road adhesion coefficient are precisely obtained through estimation methods. To enable adaptive adjustment of the controller parameters, a neural network is used to offline-train the nonlinear relationship between the controller parameters and vehicle states under varying driving conditions, such as vehicle speed (
) and road adhesion coefficient (
). The Snake Optimization Algorithm is utilized to iteratively optimize the controller parameters, which are then allocated to the controller to calculate the front and rear wheel steering angles and the longitudinal driving torques. The stability controller uses phase-plane analysis and an ideal reference model to track the desired yaw rate and sideslip angle of the vehicle’s center of mass, thereby calculating the additional yaw moment. The optimal torque distribution controller coordinates the allocation of longitudinal driving torque and the additional yaw moment, and considers the vehicle’s understeer characteristics to determine the driving torque for each wheel, ultimately achieving yaw moment control to enhance vehicle stability.
3. Adaptive Adjustment Strategy for MPC Controller Parameters
Under varying driving conditions, such as changing road adhesion coefficients and vehicle speeds, there exists a complex nonlinear relationship between the parameters of the MPC controller and the accuracy and stability of path tracking. Specifically, the weight coefficients for lateral tracking error and heading error are denoted as and , respectively; the weight coefficient for control increment is denoted as . When vehicle stability is low, increasing the weight on lateral tracking error to improve accuracy may cause instability, which results in larger lateral errors. Therefore, adaptive adjustment of controller parameters under varying driving conditions is essential to maintain both tracking accuracy and stability. Leveraging the universal approximation capability of three-layer neural networks, this paper employs such a network to model the nonlinear mapping between MPC weight parameters and path tracking accuracy and stability under varying driving conditions. A fitness function is designed, and the Snake Optimization Algorithm is utilized to iteratively optimize the MPC weight parameters.
To avoid local optima in gradient descent-based error back-propagation, the Snake Optimization Algorithm is utilized for global search. This helps improve prediction accuracy and generalization by optimizing the neural network’s weights and biases. Vehicle speed, road adhesion coefficient, and MPC weight coefficients serve as the neural network’s inputs, while the maximum lateral error, average lateral error, maximum centroid sideslip angle, and maximum yaw rate are defined as the outputs, as shown in
Figure 3.
To determine the number of hidden layer nodes in the neural network, an empirical formula
was used to narrow down the search range, where
denotes the number of hidden nodes,
the number of input nodes,
the number of output nodes,
is a tuning parameter. A sensitivity analysis was conducted with the number of hidden nodes varying from 6 to 14. As shown in
Figure 4, the RMSE values on both the training and testing datasets initially decrease and then increase as the number of hidden nodes increases. When the number of hidden nodes is 11, the test RMSE reaches its minimum. Consequently, 11 hidden nodes are adopted in this study as the final network structure to achieve a trade-off between prediction accuracy and computational efficiency. This configuration not only ensures prediction accuracy but also effectively prevents overfitting. The iteration limit is set to 1000, with a target error of
and a learning rate of 0.001.
To evaluate the effectiveness of the proposed Snake Optimization (SO) algorithm for optimizing neural network weights and biases, a comparative study was conducted with two well-established methods: Genetic Algorithm (GA) and Particle Swarm Optimization (PSO). To ensure a fair comparison, all three algorithms were implemented under identical experimental settings. Specifically, the number of hidden layer neurons was fixed at 11, the learning rate was set to 0.001, the maximum number of training iterations was limited to 1000, and the target error threshold was defined as
. The convergence behavior of each algorithm during training is illustrated in
Figure 5. The results indicate that the SO algorithm surpasses both GA and PSO in convergence efficiency and final prediction accuracy. In particular, when the convergence criteria were met, GA required 22 iterations to reach a final fitness value of
, while PSO also converged in 22 iterations with a final fitness of
. In contrast, SO achieved convergence in just 6 iterations, reaching a lower final fitness value of
. These outcomes demonstrate that SO not only converges more rapidly but also yields a more accurate solution, indicating superior parameter optimization capability and higher overall efficiency.
To enhance the overall performance and training stability of the neural network model, a systematic sensitivity analysis was conducted on several critical hyperparameters. These included the activation function, learning rate, regularization coefficient, batch size, and early stopping. The detailed results of this analysis are illustrated in
Figure 6. The test root mean square error (Test RMSE) was used as the evaluation metric, with lower values indicating better generalization. Regarding the selection of activation functions, three commonly employed types were evaluated: hyperbolic tangent sigmoid (tansig), logarithmic sigmoid (logsig), and linear (purelin). The results demonstrated that the tansig function achieved the lowest Test RMSE of 0.06, suggesting its superior ability to capture non-linear relationships in the data for this regression task. The learning rate was explored over a range of values: 0.001, 0.01, 0.05, 0.1, 0.15, and 0.2. Among these, the network achieved optimal performance when the learning rate was set to 0.001, with a corresponding Test RMSE of 0.048. To mitigate overfitting and regulate model complexity, the regularization parameter was examined at values of 0.001, 0.05, 0.1, and 0.2. The best result was observed when the parameter was set to 0.001, yielding a Test RMSE of 0.075. The impact of batch size on training dynamics was also analyzed by testing values of 1, 5, 10, 20, 30, 50, and 100. A batch size of 30 resulted in the lowest Test RMSE of 0.054, indicating a favorable balance between convergence speed and stability. Furthermore, the early stopping strategy was evaluated by comparing training outcomes under enabled and disabled settings. Interestingly, disabling early stopping led to improved generalization, achieving a Test RMSE of 0.061. Based on these experimental findings, the final hyperparameter configuration adopted in this study included: the tansig activation function, a learning rate of 0.001, regularization parameter of 0.001, batch size of 30, and training without early stopping. This configuration provides an effective trade-off between generalization and training stability.
3.1. BP Neural Network Training
To enable the MPC controller to adapt to different driving conditions, the road surface is categorized into three types: dry, wet, and icy, with friction coefficients of 0.8, 0.5, and 0.3, respectively. The weight ranges for lateral, yaw angle, and control error are set from 1 to 100. The minimum and maximum speeds are set at 54 km/h and 120 km/h, respectively. A simulation platform is established to conduct MPC integrated control system simulations under various driving conditions, ultimately generating 2376 sample data points.
The forecasted outcomes for the training dataset input and output are presented in
Figure 7a,c, while the predicted results for the test set input and output are shown in
Figure 7b,d. In the figure, RMSE denotes the Root Mean Squared Error. The Snake algorithm optimized neural network parameters converged after the ninth iteration, with a fitness of 0.000128, as shown in
Figure 8. The dataset was divided such that 70% was used for training and the remaining 30% was kept aside for testing. During model training, a subset of the training data was automatically selected for validation to assess learning performance and reduce the risk of overfitting. The test set was solely employed in the final evaluation stage to ensure unbiased performance assessment. The regression functions and correlation are presented in
Table 2. Regarding the training, validation, and testing datasets, the regression slopes remain at 1, with correlation coefficients exceeding 0.98, validating the reliability of the predictive model. Thus, the neural network effectively captures the relationship between MPC weight parameters and vehicle state.
To address the potential risk of overfitting and more thoroughly evaluate the generalization capability of the proposed neural network model, this study employed the K-fold cross-validation technique. Specifically, the entire dataset was randomly divided into five equal subsets (K = 5). In each iteration, one subset was used as the validation set, while the remaining four were used for training. This procedure was repeated five times, ensuring that each subset served as the validation set exactly once. The final performance metrics were obtained by averaging the results across all folds, thereby improving the robustness of the evaluation and reducing dependence on any single data split.
Model performance was assessed using the coefficient of determination (R2), which quantifies the proportion of variance in the observed data that is explained by the model’s predictions. The coefficient of determination is calculated as , where is the observed value, is the predicted value, and is the mean of the observed values. The results demonstrate that the model achieved an average coefficient of determination of 0.9879 on the training folds and 0.9863 on the validation folds, reflecting strong training stability and robust convergence without evident signs of overfitting.
3.2. Snake Optimization Algorithm
The Snake Optimization (SO) method is an optimization technique based on the foraging and reproductive behaviors of snakes. The reason for choosing SO in this study lies in its unique ability to dynamically balance global exploration and local exploitation, which is particularly advantageous for handling high-dimensional and complex problems. Through its two-phase design, SO avoids the premature convergence commonly seen in Genetic Algorithms (GA) and the tendency of Particle Swarm Optimization (PSO) to become trapped in local optima in multimodal problems. In the phase of food scarcity, SO performs extensive global exploration, increasing the likelihood of escaping local optima; when food is sufficient and the temperature is high, the algorithm shifts to local search around the target region, accelerating convergence and improving solution accuracy. Therefore, SO is well suited for solving optimization problems characterized by large search spaces and multiple local extrema, as in this study. The population size for the neural network parameter optimization using the SO algorithm is set to
, and the iteration count is set to
. In the first phase, when food is insufficient (i.e., food quality
), the snake swarm explores and searches for food at random positions, updating their positions as described in Equation (17).
where
represents the
element of the position vector of an individual in the
generation, where
denotes either a female or male individual, and
represents a randomly generated number within the closed interval [0, 1].
,
define the lower and upper limits of the boundary values.
represents the food-seeking ability of individuals in the population, while
,
represent the fitness of a randomly chosen individual and the
individual, respectively.
In the second phase, when food is abundant but the temperature is too high (i.e.,
and
), the snake swarm explores around the food and enters a local search phase, as illustrated in Equation (18).
In the equation,
indicates the best individual’s position in the
generation. If
, the population engage in battle mode, and individuals fight to obtain the best mate of the opposite sex, as described in Equation (19).
When
, the population enter the mating mode, and their movement equation is given as follows:
In the equation:
where
,
signify the optimal fitness levels in the male and female groups, while
and
represent the fitness scores of the
individual within the male and female populations. In mating mode, there is a 50% probability of generating a new individual, which will replace the least fit individual in the population.
Based on the results generated by the neural network model, the maximum and average lateral errors are normalized and represented as , while the maximum centroid slip angle and maximum yaw rate are normalized and represented as . The fitness function is designed, where is a constant. The Snake Algorithm is applied to iteratively optimize the controller parameters to ensure tracking accuracy and stability. The population size for controller parameter optimization is set to 30, with a maximum iteration count of 30, and position limits are set between −1 and 1. The constants , are set to 0.5 and 2, respectively.
4. Stability Control Strategy
4.1. Phase Plane Control Domain Division
Based on Equation (4), using the centroid side slip angle and yaw rate as stability control objectives, the nonlinear vehicle model with direct yaw moment incorporated is derived as follows:
At elevated speeds, the vehicle experiences increased lateral acceleration, and the tires primarily function under non-linear conditions. In this research, the Magic Tire Model combined with the phase plane method is utilized to investigate the vehicle’s nonlinearity under extreme conditions. The model is expressed as shown in Equation (23).
The side force of the wheel is denoted as , while the vertical load is denoted by . is the tire’s sideslip angle, . , , and are the fitting coefficients.
When the vehicle is in motion, the normal forces exerted on the front and rear tires are formulated in Equation (24).
The phase plane method does not require solving nonlinear equations. Instead, it visually describes the system’s stability through phase trajectories. The state points within the stable region, determined by the double-line approach, converge to the origin, while the points in the unstable region diverge. When the steering angle is minor, the intercept of the stability threshold is significantly influenced by the road friction coefficient, while the slope is affected by both the travelling speed and the road friction coefficient [
33]. Therefore, in this study, the vehicle speed is incremented by 9 km/h, spanning from 54 km/h to 126 km/h, and the road adhesion value is assigned to fixed intervals of 0.1, ranging from 0.3 to 1, resulting in 72 sample sets. The boundary parameters, including the slope
and the intercept
, are fitted using the least squares method, as shown in
Figure 9. The parameters
and
, obtained through least squares fitting, yielded coefficients of determination
of 0.9575 and 0.9542, respectively. The RMSE of the fitting results for
and
are 0.6056 and 0.000802, respectively. The results indicate that the constructed model effectively captures the data characteristics and fits the observed data with high fidelity. The relative errors, calculated based on the magnitudes of the two datasets, are 4.04% and 1.04%, respectively. Some data is shown in
Table 3. The expressions for the boundary parameters
and
are given by Equation (25).
To accelerate the convergence process, the stable region is further divided into stable region and joint control domain. The region division formula is expressed by Equation (26).
Given the vehicle’s state and using Equations (21)–(25), the system’s phase trajectory is plotted to obtain the
phase plane diagram.
Figure 10 displays the phase trajectory when the steering angle is 0 degrees, with a speed of 72 km/h and a road friction value of 0.8.
In the
phase plane diagram, the separation from the state point to the stability boundary indicates the vehicle’s instability level. Inside the stable region, the instability degree is zero, as shown in Equation (27).
4.2. Sliding Mode Controller Design
The primary strength of the Sliding Mode Controller (SMC) lies in its robustness to vehicle nonlinearities and external disturbances [
34]. The control variable is defined as the weighted sum of the deviations of the actual side slip angle and yaw rate from their respective reference values, as shown in Equation (28).
To enhance the precision of the approximation process, an integral element is added to the sliding surface.
The sliding mode approximation adopts an exponential convergence rate.
In the sliding mode controller, the parameter
is a key factor in regulating the system’s response characteristics, primarily influencing both the convergence rate and the amplitude of chattering. While a larger value of
can accelerate convergence to the steady state, it may also induce high-frequency oscillations, which can degrade control accuracy and potentially affect the robustness of the controller. To balance dynamic performance and system stability, the parameter
was gradually increased while comprehensively considering the impact of system oscillations. After multiple rounds of simulation and experimental comparisons, the parameter
was ultimately determined to be set at 0.5. By combining Equation (22) with Equations (28)–(30), the yaw moment
is formulated as follows:
In the above equation,
represents the thickness of the sliding mode controller boundary layer, while
denotes the convergence rate exponent. Both
and
are positive numbers.
is defined as:
where
denotes the separation between the phase plane state point and the nearest stability limit, and
represents the spacing between stable boundaries. The continuous function is employed to replace the sign function in order to suppress system chattering, as shown in Equation (33).
Based on Lyapunov stability theory, the system is asymptotically stable if the positive-definite scalar function
has a negative-definite time derivative. The Lyapunov function is defined as:
When or , ; When , . Therefore, always holds, which proves that the system is asymptotically stable.
Once the vehicle enters the instability region, the control objective at this point is to minimize the instability degree
. Using
as the input to the controller, the PID controller is utilized to calculate the needed yaw moment within the instability region, with the output being the yaw moment
.
PID parameter tuning was conducted under high-instability and low-adhesion driving conditions. Specifically, a road friction coefficient of
= 0.3 and a vehicle speed of 60 km/h were selected as the test conditions. The proportional gain was gradually increased to achieve a rapid response to the onset of instability, until the system approached the instability boundary. This ensured quick system response while maintaining an adequate gain margin. The integral term was introduced to eliminate residual yaw rate errors, and the derivative term was tuned to suppress oscillations near the stability boundary. Based on multiple simulation iterations, the final controller parameters were set to
= 8000,
= 90, and
= 50. Finally, with the set values fluctuating by
, the controller maintained stable performance., indicating robustness to parameter variations. Incorporating the phase plane region division, a weighting coefficient
is introduced in the joint control domain, where
represents the road adhesion coefficient and
. The total additional yaw moment is calculated as follows:
According to vehicle stability theory, when the centroid slip angle is small, the vehicle’s stability is primarily affected by the yaw rate. In contrast, when the slip angle becomes large, stability mainly depends on the slip angle itself. Therefore, the integrated error-weighted distribution method, combined with coordinated control regions and designed using the phase-plane approach, can adapt the torque distribution under various driving conditions.
4.3. Optimal Distribution of Longitudinal Driving Torque and Additional Yaw Moment
The optimal distribution is a torque allocation strategy that considers three key factors: tire utilization, motor drive torque, and road friction [
35]. This strategy aims to meet the required total longitudinal driving force
. Simultaneously, the additional yaw moment
, assigned by the upper-level controller, is allocated to each wheel. Through this allocation, direct yaw moment control is achieved. The method can be expressed as shown in Equation (37).
where
denotes the control effect of the longitudinal driving force, and
represents the control effect of the stability controller.
denotes track width. The coupling between the longitudinal and lateral forces can be further illustrated by the friction ellipse model, as shown in
Figure 11. According to the friction ellipse theory, the lateral force of a tire decreases as the longitudinal force increases. The upper limit of the lateral force is inversely proportional to the limit of the longitudinal force, thus indicating that there is a coupling between the longitudinal and lateral forces of the tire. To coordinate the longitudinal control with the stability control,
and
are introduced. The adjusted
and
are expressed as:
Introducing the weighting coefficient
transforms the optimization problem for solving
and
into a single-objective optimization problem, as shown in Equation (39).
where
,
, and
signifies the vertical force on the tire. The larger the value of
, the greater the contribution of the longitudinal controller, and conversely, the greater the contribution of the stability controller. Considering the vehicle’s instability and road adhesion coefficient, parameter
is designed using the sigmoid function, as expressed by:
The parameter is formulated as a sigmoid-type exponential function to represent the nonlinear and gradual variation in the coupling between the longitudinal and lateral forces of the tire. When the phase-plane instability metric is low, indicating near-stable tire conditions, and the road friction coefficient is relatively high, approaches 1. This suggests that the longitudinal force has a limited influence on the lateral force, meaning the coupling between these forces is weak. Conversely, when increases, indicating greater instability, or decreases, indicating smoother road surfaces, decreases. This shows that the longitudinal force has a stronger suppressive effect on the lateral force. This behavior reflects the dynamic coupling characteristics of tire forces under varying operating conditions.
Finally, considering the restrictions of peak motor torque and road adhesion, the driving torque delivered to each tire is determined. The cost function and constraints for optimal wheel torque allocation are formulated using a quadratic programming algorithm as follows:
To further enhance vehicle stability and account for the vehicle’s understeer characteristics, the front wheel weight is set to 1, while the rear wheel weight is derived from phase-plane analysis, as shown in Equation (42).
6. Conclusions
This paper addresses the issue where distributed-driven vehicles cannot effectively adapt to variations in speed road friction coefficient. An adaptive weight MPC-based integrated control strategy, utilizing a neural network, is proposed. The strategy coordinates path tracking accuracy and stability control by employing phase plane analysis and an optimal torque distribution algorithm. A CarSim/Simulink co-simulation platform is established, with double lane change and slalom paths used as reference trajectories to assess the control strategy’s performance under different vehicle speeds and road friction coefficient. Simulation results demonstrate that the proposed control strategy significantly improves the adaptability of the fixed-weight MPC controller to various driving environments while achieving high tracking accuracy and stability. By utilizing an offline-trained neural network model and the Snake Optimization algorithm to iteratively adjust the controller weights, the adaptive adjustment strategy reduces computational cost and enhances the real-time performance of the controller. However, this paper does not take into account the influence of prediction horizon parameters, road curvature, and slope variation on vehicle tracking accuracy and stability. Although the proposed control strategy exhibited some optimization in the high-speed double lane change test, the observed improvements were relatively marginal. Upon analysis, this may be attributed to the choice of prediction horizon. A longer prediction horizon can improve control accuracy, especially in complex road environments, but it also leads to increased computational burden. Therefore, in practical applications, a trade-off between control accuracy and computational cost is essential to ensure the real-time performance and stability of the control system. The current control strategy is primarily composed of a low-complexity controller model and an online parameter optimization algorithm, which theoretically offers low computational complexity and is thus potentially suitable for deployment in resource-constrained onboard systems. However, due to current experimental limitations, the runtime performance of critical modules, such as QP solving, neural network inference, and stability control, has not yet been evaluated on embedded platforms. To comprehensively validate the feasibility of the proposed method for practical deployment, future research will introduce hardware-in-the-loop (HIL) testing and conduct systematic runtime evaluations of the controller modules on representative embedded platforms. In addition, this study will further explore the impact of different prediction horizon settings on system real-time performance by balancing control accuracy and computational resource consumption. The effects of varying road curvature and slope on path tracking performance will also be systematically evaluated. The ultimate goal is to develop an MPC path tracking control strategy that is better suited to real-world driving conditions, thereby further enhancing the vehicle’s tracking performance and overall stability.