Skip to Content
MathematicsMathematics
  • Article
  • Open Access

29 December 2025

37 Pages

Research on a Lane Changing Obstacle Avoidance Control Strategy for Hub Motor-Driven Vehicles

,
,
,
,
,
and
1
School of Automotive Engineering, Wuhan University of Technology, Wuhan 430070, China
2
Hubei Collaborative Innovation Center for Automotive Components Technology, Wuhan University of Technology, Wuhan 430070, China
3
School of Mechanical and Electrical Engineering, Wuhan Business University, Wuhan 430056, China
4
Hangzhou Advance Gearbox Group Co., Ltd., Hangzhou 311203, China

Abstract

Hub motor-driven vehicles can control vehicle attitude by regulating the speed and torque of four wheels, supporting safe and stable lane changing and obstacle avoidance. However, under high-speed scenarios, these vehicles often suffer from poor stability, limited comfort, and inadequate trajectory tracking accuracy during lane changing and obstacle avoidance operations. To address these challenges, this study proposes a lane changing obstacle avoidance control strategy for hub motor-driven vehicles based on collision risk prediction. A fuzzy controller featuring a variable weight objective function is designed to balance lane changing efficiency and ride comfort, thereby generating an optimal lane changing and obstacle avoidance trajectory. Furthermore, a linear time-varying model predictive controller (LTV-MPC) is developed, which adaptively adjusts both the weighting coefficient of lateral displacement error in the objective function and the prediction horizon of the controller, enabling dynamic tuning of vehicle trajectory tracking accuracy. A dSPACE hardware-in-the-loop (HIL) platform was established to conduct simulations under typical obstacle avoidance scenarios. The simulation results show that under two easily destabilized conditions—high-adhesion, high-speed, large-curvature, and low-adhesion, medium-speed, large-curvature maneuvers—the proposed optimized control strategy limits the maximum lateral trajectory tracking error to 0.116 m and 0.143 m, representing reductions of 58.6% and 79.6% compared with the baseline control strategy. These results demonstrate that the proposed method enhances trajectory tracking accuracy and stability during lane changing and obstacle avoidance maneuvers.

1. Introduction

Vehicles equipped with hub motors feature independently measurable and controllable wheels with rapid response capabilities, which facilitate lane changing and obstacle avoidance maneuvers [1,2]. However, the emergency scenarios encountered during vehicle operation are highly complex. Under such conditions, the successful execution of these maneuvers depends on multiple factors, including road adhesion coefficients, the driving environment, and actuator system performance. Therefore, it is of significant importance to investigate key issues such as collision risk prediction, obstacle avoidance trajectory planning, and trajectory tracking control.
The primary step for intelligent vehicles to execute lane change obstacle avoidance is to predict collision risk, with risk prediction mainly evaluated through deterministic and probabilistic methods [3,4]. Wu et al. [5] incorporated temporal and spatial risk levels into a comprehensive risk index, improving the accuracy of risk identification. Wang et al. [6] proposed an obstacle avoidance system based on fuzzy risk level detection, which enhances the accuracy of lane change decision-making. Xia et al. developed a risk estimation method based on the Geometry-Driven Risk Field (GDRF). This method outperforms previous risk-oriented potential field methods, providing more human-centered and safer trajectories [7]. Planning a reasonable and effective obstacle avoidance trajectory is critical to successful obstacle avoidance, with commonly used planning algorithms including graph search, random sampling, curve interpolation, numerical optimization, and mechanistic models [8,9,10]. Yang et al. [11] applied an optimized Dijkstra algorithm to obtain the shortest lane change path, considering the effective lane change time. Xu et al. [12] proposed an improved RRT* trajectory planning algorithm, using a greedy algorithm to eliminate redundant path points and obtain a trajectory that ensures vehicle stability. Kou et al. [13] improved the quintic polynomial model by developing a longitudinal sixth-order polynomial model, addressing issues with estimating lane change completion time and endpoint, and establishing a bi-objective performance evaluation function. With the parameters before and after a lane change understood, this model enables real-time planning of safe and efficient lane change routes. Zhang et al. [14] constructed an improved dual quintic polynomial planning model, considering different motion states and obstacle sizes, and verified the effectiveness and superiority of the proposed planning model.
Trajectory tracking enables a vehicle to follow a path stably and accurately. Current research focuses on trajectory tracking algorithms such as pure pursuit control, Stanley control, preview control, PID control, fuzzy control, deep/reinforcement learning, sliding mode control, linear quadratic optimal control, and model predictive control [15,16,17]. Wang et al. proposed a trajectory tracking method based on the heading error rate, which adapts through error feedback to reduce tracking errors [18]. Islam et al. [19] and Tan et al. [20] applied a double deep Q-network algorithm to train a deep neural network that controls the vehicle to follow a desired path, with the simulation results showing a high-precision path following, even under external disturbances. Nan et al. [21] introduced an improved vehicle kinematic model, incorporating a front-wheel steering angle correction function to enhance the tracking performance of a kinematic model-based path tracking controller.
Vehicles tend to lose stability, and additional yaw moment control is often applied to enhance maneuvering stability under complex conditions. According to the controller structure, this can be divided into centralized and hierarchical structures [22,23,24]. Ardashir et al. [25] proposed an adaptive robust fuzzy vehicle stability control algorithm, significantly improving lane changing safety. Min et al. [26] designed a two-layer structure direct yaw moment controller, using quadratic programming to calculate additional yaw moments, which effectively improves vehicle stability. Teng et al. [27] developed an improved model predictive control (MPC) stability controller based on sliding mode adaptive active steering and differential torque yaw control, which delivers superior trajectory tracking performance and vehicle stability under extreme conditions. Fu et al. [28] addressed the roll stability challenges in high-center-of-gravity off-road vehicles by model predictive control (MPC) for real-time rollover risk prediction. However, their work has neither incorporated real-time collision risk prediction as a core basis for control decision-making nor established an adaptive fusion framework capable of dynamically adjusting the weights of control objectives according to risk levels. Research in the field of vehicle motion control has increasingly adopted hierarchical control architectures combined with robust nonlinear control methods to address parameter uncertainties and external disturbances. Ghaedi et al. [29] proposed a two-layer Integral Terminal Sliding Mode Control (ITSMC) scheme, where the upper layer generates the desired longitudinal force and yaw moment within a finite time while the lower layer optimally distributes the hub motor torques under constraints, significantly improving lateral trajectory tracking and stability on low-friction road surfaces.
In summary, risk prediction models tend to have high computational demands and prediction errors in scenarios without restrictions. While in trajectory planning, simple models suffer from poor real-time performance and smoothness, complex models are computationally intensive and are prone to local optima. Currently, the weight coefficients in model predictive controllers are constant, leading to poor tracking accuracy and robustness under varying conditions. In light of the challenges, this study proposes a collision risk-aware lane changing and obstacle avoidance control framework for hub motor-driven vehicles. Emergency maneuvers are identified via a critical safety distance model and a data-driven risk predictor, which jointly generate a lane change label (LC). An optimal trajectory is then planned using a fuzzy-based trajectory planner with a variable weight objective function that balances efficiency and ride comfort. To achieve high-precision and robust tracking, a two-layer control architecture is developed. In the obstacle avoidance control layer, three coordinated controllers operate in parallel—(i) a linear time-varying model predictive controller (LTV-MPC), whose lateral weight Qy and prediction horizon Np are adaptively tuned by a fuzzy logic system based on lateral error Δ Y and vehicle speed vx, generates the steering command δ; (ii) a linear quadratic regulator (LQR) computes the desired additional yaw moment Δ Mz to enhance vehicle stability; and (iii) an improved integral sliding mode controller (ISMC) tracks the desired longitudinal speed and outputs the total longitudinal force demand Fxdes. In the torque allocation layer, a constrained least squares optimization problem is solved under tire friction limits and motor torque constraints to determine the optimal wheel torque commands Ti (i = 1, 2, 3, 4). Hardware-in-the-loop simulations validate the system’s tracking accuracy and robustness under instability-prone scenarios, including high-speed, high-curvature maneuvers on high-friction roads and medium-speed, high-curvature maneuvers on low-friction surfaces. The overall technical roadmap is illustrated in Figure 1.
Figure 1. Hierarchical control architecture for lane changing obstacle avoidance.

2. Risk Prediction and Trajectory Planning for Lane Changing and Obstacle Avoidance Based on Safe Distance

2.1. Lane Changing Obstacle Avoidance Risk Prediction

Based on the established models for critical safe distances in braking and lane changing, braking to avoid obstacles is more effective at low speeds, whereas lane changing to avoid obstacles is more effective at medium to high speeds. Scholars have also noted that steering to change lanes for obstacle avoidance is significantly more effective than braking under medium- to high-speed conditions [4]. Furthermore, as demonstrated by optimal control theory [30], combining steering with braking for a lane change maneuver can achieve an even shorter minimum avoidance distance compared to pure steering alone, making it the most effective strategy under many high-speed scenarios.
The lane changing safety factor is denoted as κ , defined as the ratio of the longitudinal distance S between the ego vehicle and the following vehicle to the critical safe distance for lane changing, S t . The ego vehicle is considered safe when κ is greater than 1, indicating it can avoid a collision with the obstacle vehicle by changing lanes. When κ equals 1, the ego vehicle reaches the point of critical collision. When κ is less than 1, the ego vehicle cannot avoid a collision with the obstacle vehicle by changing lanes, indicating a dangerous state. The criteria for the ego vehicle to engage in emergency lane changing to avoid obstacles, derived from the safe distance model, are as follows: the actual distance S between the ego vehicle and the obstacle vehicle must be greater than the critical safe distance for lane changing S t but less than the critical safe distance for braking S w ; that is
S t < S < S w
Considering the driving state of the ego vehicle and assessing the current environment for lane changing and obstacle avoidance, 11 key parameters that influence the maneuver are identified, as illustrated in Figure 2.
Figure 2. Schematic diagram of 11 characteristic parameters for heavy-duty vehicle lane changing obstacle avoidance.
In Figure 2, v c and a c denote the velocity and acceleration of the ego vehicle, respectively. v d and a d denote the velocity and acceleration of the obstacle vehicle, respectively. v m and a m denote the velocity and acceleration of the leading vehicle in the target lane, respectively. v n and a n denote the velocity and acceleration of the following vehicle in the target lane, respectively. D c d indicates the distance between the ego vehicle and the obstacle vehicle. D c m indicates the distance between the ego vehicle and the leading vehicle in the target lane. D c n indicates the distance between the ego vehicle and the following vehicle in the target lane.
The HighD dataset [31] is used as the experimental data to design a predictive model for lane changing and obstacle avoidance risk. Although the HighD dataset was recorded on German highways using conventional vehicles, the input features used in our Bi-LSTM model capture generic traffic interaction patterns rather than vehicle-specific dynamic properties. Lane changing intention, as a high-level behavioral decision, is primarily driven by situational awareness and risk perception, which are largely independent of the powertrain architecture. Consequently, the dataset remains representative for learning lane change decision logic. To ensure compatibility with the dynamics of in-wheel motor electric vehicles, our control framework adopts a hierarchical structure. The Bi-LSTM predictor operates at the behavioral level, while the subsequent trajectory planning and LTV-MPC tracking modules are explicitly tailored to the vehicle’s dynamic model and actuation constraints. This decoupling enhances domain adaptability without compromising decision accuracy.
The detailed procedure includes the following.
(1)
Model inputs, outputs, and normalization
The model takes as input a dataset of 11 key characteristic parameters, with the output indicating the lane change status of the vehicle. LC = 1 indicates a lane change, while LC = 2 indicates no change. Normalization is applied using the maximum x m a x and minimum x m i n values extracted from the data, as detailed in Equation (2), as follows:
x ~ = x − x m i n x m a x − x m i n
(2)
Feature input and hyperparameter configuration for Bi-LSTM
The model is initialized with a learning rate of 0.01. To ensure the stability and convergence of the model, the learning rate is increased to 0.1 after 700 training epochs. The model is trained and tested after the configuration of model parameters. The performance of the model is assessed based on the error between the predicted and actual values to determine if it meets the expected standards. If it meets the standard, the model produces output results and confirms the completion of the modeling process. If it fails to meet the standard, the model parameters are readjusted for another round of training (Table 1).
Table 1. Parameter settings of the LSTM neural network model.

2.2. Trajectory Planning of Lane Change Obstacle Avoidance

A vehicle lane changing trajectory is designed by a quintic-order polynomial, considering trajectory constraints to determine a set of feasible trajectories. A fuzzy controller with a variable weighting objective function is designed to output trajectories for lane changing and obstacle avoidance to balance multiple objectives of efficiency and comfort.
The trajectory for lane changing and obstacle avoidance, described by the fifth-order polynomial [32], is detailed as follows:
y ( x ) = a 0 + a 1 x + a 2 x 2 + a 3 x 3 + a 4 x 4 + a 5 x 5
where x and y represent the lateral displacement and longitudinal displacement of the vehicle, respectively. a 0 , a 1 , a 2 ,   a 3 , a 4 , and a 5 are the coefficients to be determined for the trajectory function.
Based on objective conditions [33], Formula (4) can be derived as follows:
{ y ( 0 ) = y ˙ ( 0 ) = y ¨ ( 0 ) = 0 y ( x e ) = y e y ˙ ( x e ) = y ¨ ( x e ) = 0
Consider the autonomous vehicle traveling with constant longitudinal velocity v c during lane changing; that is, x = v c t , x e = v c t e . The expression for the trajectory of lane changing and obstacle avoidance is as follows:
y ( t ) = y e t e 5 ( 6 t 5 − 15 t e t 4 + 10 t e 2 t 3 )
By differentiating Equation (5) successively, we obtain Expression (6) for the lateral velocity v y , lateral acceleration a y , and the measure of lateral impact j y as follows:
{ v y ( t ) = 30 y e t e 5 ( t 4 − 2 t e t 3 + t e 2 t 2 ) a y ( t ) = 60 y e t e 5 ( 2 t 3 − 3 t e t 2 + t e 2 t ) j y ( t ) = 60 y e t e 5 ( 6 t 2 − 6 t e t + t e 2 )
The trajectory for lane changing to avoid obstacles is primarily subject to constraints imposed by road boundaries and limits on lateral acceleration. The lateral displacement y e and the time required for obstacle avoidance t e influence the lateral acceleration. The expression for the maximum lateral acceleration is derived by differentiating the lateral velocity v y ( t ) as presented in Equation (7) as follows:
a y m a x = 10 3 y e 3 t e 2
The maximum lateral acceleration is specified as 0.85 μg [34]. The minimum time required for lane changing to avoid an obstacle, denoted as t e m i n , is calculated to be the following:
t e m i n = 10 3 y e 2.55 μ g
The duration for vehicle lane changes typically does not exceed 7 s [35]. The maximum time allotted for lane changing to avoid obstacles in this paper is set at 7 s. To guarantee the safety of the vehicle during lane changing, the lateral displacement after the lane change must be limited [36]. The corresponding expression is detailed as follows:
y e + B 2 ≤ y e d g
where B represents the width of the vehicle body. y e d g represents the distance from the road boundary to the central axis of the vehicle. Taking y e = 3.75   m , different constraints and t e m i n are set to obtain a cluster of obstacle avoidance trajectories under different lane changing times.
This paper proposes an evaluation function for lane changing trajectories to optimize the lane changing time, designing the lane changing efficiency weight ω 1 and the lane changing comfort weight ω 2 with ω 1 + ω 2 = 1 . The vehicle can adaptively adjust the corresponding weights according to the obstacle avoidance scenario. The expression for trajectory optimization is as follows:
m i n J ( t e , S x , a y m a x , j y m a x ) = ω 1 ( t e t ~ e m a x + S x S ~ x m a x ) + ω 2 ( | a y m a x | a ~ y m a x + | j y m a x | j ~ y m a x ) s . t .       0 < t e < t ~ e m a x , | a y m a x | ≤ a ~ y m a x , ω 1 + ω 2 = 1

2.3. Fuzzy Control-Based Allocation of Lane Change Efficiency and Comfort Weights

According to the improved lane change obstacle avoidance trajectory optimization formulation, the selection of the lane change trajectory is influenced by the lane change efficiency weight ω 1 and the lane change comfort weight ω 2 . Specifically, when the efficiency weight ω 1 exceeds 0.5, the selected trajectory exhibits relatively abrupt changes; conversely, when the lane changing comfort weight ω 2 exceeds 0.5, the selected trajectory changes more gradually. This section proposes a fuzzy controller to output the lane changing comfort weight under obstacle avoidance scenarios, ensuring lane changing safety while achieving optimal obstacle avoidance performance across varying driving conditions by acquiring the optimal lane changing obstacle avoidance trajectory.
Fuzzy control emulates human-like fuzzy reasoning and decision-making processes, achieving desired control performance by fuzzifying inputs and outputs [37]. The inputs to the fuzzy controller include the lane changing safety factor, the ego vehicle speed, the road adhesion coefficient, and the width of the obstacle vehicle in the same lane. The output is the lane changing comfort weight. The fuzzy logic principle underlying the variable weight for lane changing comfort is illustrated in Figure 3.
Figure 3. Variable weight fuzzy control for lane change comfort.
The fuzzy rules are defined as follows. The domain for the lane changing safety factor κ is [1, 3], with a quantification factor κ U and membership functions {LS, SM, MI, LA}, indicating the degree of urgency to safety in lane changing. LS, SM, MI, and LA denote moderately urgent lane changes, urgent lane changes, relatively safe lane changes, and safe lane changes, respectively. The domain for the speed of the ego vehicle v c is [0, 12], with a quantification factor v c U of 0.1 and membership functions {SM, MI, LA}. SM, MI, and LA represent low-speed, medium-speed, and high-speed lane change scenarios of the ego vehicle, respectively. The domain for the road surface adhesion coefficient μ is [0, 10], with a quantification factor μ U of 10 and membership functions {Poor, Medium, Good}. The domain for the width of the obstacle vehicle w is [1.3, 2.3], with a quantification factor w U of 1 and membership functions {Narrow, Medium, Wide}. The domain for the comfort weight coefficient ω 2 is [0, 10], with a quantification factor ω 2 U of 0.1 and membership functions {A, B, C, D, E, F, G, H, I, J, K}, which represent the following comfort weight levels: extremely low, very low, relatively low, slightly low, minimally low, medium, minimally high, slightly high, relatively high, very high, and extremely high.
The 36 fuzzy rules listed in Table 2 were manually designed based on the following explicit engineering principles for lane changing obstacle avoidance scenarios:
Table 2. Fuzzy rule table ( w = SW/MW/BW).
①
When the lane changing safety factor κ increases, that is, the longitudinal lane changing distance increases, and the lane changing comfort weight coefficient ω 2 should be increased;
②
When the ego vehicle speed v c decreases, ω 2 should be increased;
③
When the road friction coefficient μ increases, ω 2 should be increased;
④
When the width w of the obstacle vehicle in the same lane decreases, ω 2 should be increased.
The area centroid method is selected. The calculation Formula (11) is as follows:
ω 2 = ∫ x i u N ( x ) d x ∫ u N ( x ) d x
where x i represents the domain of the output variable. u N ( x ) denotes the membership function of the output variable.

3. Design of a Coordinated Control Strategy for Trajectory Tracking Accuracy and Stability in Lane Changing Obstacle Avoidance

Following the planning of trajectories for lane change obstacle avoidance, ensuring precise trajectory tracking and stable lane changing by the vehicle presents a significant challenge. A two-tiered control framework is introduced that includes an obstacle avoidance control layer and a torque distribution layer. The control objectives are set as the desired lateral displacement and heading angle for lateral trajectory tracking. Incorporating the lateral tracking error and longitudinal vehicle speed into a fuzzy control algorithm determines the weight of the displacement deviation target function and predicts the time domain, with the steering wheel angle control output used to track the lateral displacement. An optimized Intelligent Smith Motion Controller (ISMC) algorithm calculates the total longitudinal demand force for following the longitudinal vehicle speed, ensuring trajectory tracking accuracy. A two-degrees-of-freedom vehicle model is used to establish a stability control model, with the linear quadratic regulator (LQR) algorithm determining the desired additional yaw moment for vehicle stability control. The torque distribution layer aims to coordinate trajectory tracking accuracy with stability, considering the equality constraints of the total longitudinal demand force and additional yaw moment, as well as the inequality constraints of road adhesion limits and motor peak torque. The optimal torque distribution is formulated as a constrained least squares optimization problem, with the effective set algorithm determining the optimal torque for each wheel motor under these multi-objective constraints. The technical approach is depicted in Figure 4.
Figure 4. Roadmap of lane changing and obstacle avoidance control.

3.1. Design of a Three-Degrees-of-Freedom Vehicle Dynamics Model

A three-degrees-of-freedom (3-DOF) vehicle dynamics model is constructed, which includes longitudinal motion, lateral motion, and vertical motion, as shown in Figure 5.
Figure 5. A 3-DOF vehicle dynamics model.
The coordinate system XOY has its origin fixed on the ground as the geodetic coordinate system, and the coordinate system xoy has its origin fixed at the centroid of the vehicle body as the vehicle body coordinate system. The force balance equations along the axes and the torque balance equation around the axis can be derived as follows:
{ ∑ F x = m a x = m ( v ˙ x − γ v y ) = F x _ F c o s δ − F y _ F s i n δ + F x _ R − F f − F w ∑ F y = m a y = m ( v x γ + v ˙ y ) = F y _ F c o s δ + F x _ F s i n δ + F y _ R ∑ M z = I z γ ˙ = L F ( F y _ F c o s δ + F x _ F s i n δ ) − L R F y _ R
where rolling resistance is F f = m g ⋅ f , air resistance is F w = 0.5 C d A ρ v x 2 ,   m represents the gross vehicle mass, a y denotes the lateral acceleration of the vehicle, a x denotes the longitudinal acceleration of the vehicle, v x denotes the longitudinal speed of the vehicle, v y denotes the lateral speed of the vehicle, γ denotes the yaw rate of the vehicle, δ denotes the front wheel steering angle, I z denotes the moment of inertia of the vehicle about the z a x i s , L F and L R represent the distances from the vehicle’s center of gravity to the front and rear axles, respectively, F y _ F ,   F y _ R ,   F x _ F , and F x _ R represent the total lateral and longitudinal forces on the front and rear wheels, respectively, f is the rolling resistance coefficient, C d is the air drag coefficient, A is the frontal area, and ρ is the air density.
Considering the transformation between the geodetic and vehicle body coordinate systems, the motion state of the vehicle can be expressed in the geodetic coordinate system. The detailed relationship is given by Equation (13) as follows:
{ Y ˙ = x ˙ s i n θ + y ˙ c o s θ X ˙ = x ˙ c o s θ − y ˙ s i n θ θ ˙ ≈ γ

3.2. Trajectory Tracking Precision Control of Lane Changing and Obstacle Avoidance

3.2.1. Design of the Lateral Displacement Tracking Accuracy Controller

The design of the lateral displacement tracker is detailed, with the total lateral force expressed as follows:
{ F y _ F = C F ( β + L F γ v x − δ ) F y _ R = C R ( β − L R γ v x )
where C F and C R represent the lateral stiffness of the front and rear wheels, respectively. β denotes the sideslip angle. δ represents the steering angle of the front wheel.
The differential Equation (15) for the relevant states of the predictive system is as follows:
{ v ˙ y = − γ v x + C F S F δ m + C F m ( v y + L F γ v x − δ ) + C R m ( v y − L R γ v x ) θ ˙ = γ γ ˙ = L F I Z [ C F S F δ + C F ( v y + L F γ v x − δ ) ] − L R C R I Z ( v y − L R γ v x ) Y ˙ = c o s θ · v y + s i n θ · v x
The system state variables are chosen as ξ = [ v y θ γ Y ] T , the control input as u = [ δ ] , and the output variables as η = [ θ   Y ] T , considering the linearization of the equations before processing the vehicle model. The linear time-varying Equation (16) can be obtained by performing a Taylor series expansion of the state equations around the reference point ( ξ r , u r ) and retaining only the first-order terms.
ξ ˙ d = A ( t ) ξ d ( t ) + B ( t ) u d ( t )
where ξ d ( t ) = ξ − ξ r , u d ( t ) = u − u r . A ( t ) and B ( t ) represent the Jacobian matrix.
Considering that the state equations are not discrete and are not applicable to the design of the system model prediction, Equation (16) is processed using the forward Euler method to obtain the discretized Equation (17).
ξ ( k + 1 ) = A k , t ξ ( k ) + B k , t u ( k ) + ο k , t ( k )
where A k , t and B k , t represent matrices related to the system sampling step size T . ξ ( k ) and u ( k ) represent the system state variables and input variables at the current moment, respectively. ο k , t ( k ) represents the deviation of linearization and discretization of the system.
The prediction model introduces state feedback to improve the accuracy of the model, which estimates the predicted state at the kth moment based on the system state at the ( k − 1 ) t h moment. The prediction error is calculated by comparing it with the actual sampled data at the k t h moment.
After introducing the state feedback, the new state space Equation (18) is constructed as follows:
{ ξ ~ ( k + 1 | t ) = A ~ k , t ξ ~ ( k | t ) + B ~ k , t Δ u ( k | t ) + o ~ k , t ( k | t ) + e ~ k , t ( k | t ) η ( k | t ) = C ~ k , t ξ ~ ( k | t )
where Δ u ( k | t ) = u ( k | t ) − u ( k − 1 | t ) .
We assume that N p and N c are the prediction time domain and control time domain, respectively ( N p ≥ N c ). The state quantities and output quantities in the time domain are obtained by iteratively updating the equations. The prediction Equation (19) is established as follows:
Y ( t ) = Ψ t ξ ~ ( t | t ) + Θ t Δ U ( t ) + Γ t Φ ( t )
where ψ t ,   Θ t , and Γ t denote the state variable, control input, and error feedback matrices, respectively. Y ( t ) and Δ U ( t ) denote the output and control column vectors, respectively. Φ ( t ) denotes the matrix of state error feedback coefficients.
To ensure that the vehicle can follow the desired lane change trajectory smoothly and quickly, the objective function Equation (20) is established as follows:
J ( ξ ( t ) , u ( t − 1 ) , Δ U ( t ) , ε ) = ∑ i = 1 N P | | η ( k + i | k ) − η d e s ( k + i | k ) | | Q e 2 +               ∑ i = 1 N P − 1 | | Δ u ( k + i | k ) | | R e 2 + ∑ i = 1 N c − 1 | | u ( k + i | k ) | | S e 2 + ρ ε 2
where η des denotes the desired output vector, which transforms the objective optimization function into a quadratic programming problem.
The controller system constraints should be satisfied as follows:
{ Δ U m i n ≤ Δ U ( t ) ≤ Δ U m a x U m i n ≤ W t Δ U ( t ) + Δ U ( t − 1 ) ≤ U m a x Y m i n − ε ≤ Y ( t ) ≤ Y m a x + ε 0 ≤ ε ≤ ε m a x
The values of the kinetic constraints are shown in Table 3 [38].
Table 3. The values of the kinetic constraints.
Substituting the constraints into the QR equation, the control increment and relaxation factor within the control time domain are as follows:
Δ U t ∗ = [ Δ u t ∗ , Δ u t + 1 ∗ , · · · , Δ u t + N c − 1 ∗ , ε ] T
The actual output is taken from the leading term of Equation (21). The final output is obtained by integrating the control input from the previous time step with the actual output, which is applied to the system to achieve trajectory tracking control for obstacle avoidance.
u ( t ) = u ( t − 1 ) + Δ u t ∗
To guarantee the stability of the proposed LTV-MPC controller, a rigorous stability analysis is conducted based on the Lyapunov method. Considering the closed-loop system formed by the error dynamics, in the unconstrained case, the optimal control increment Δ U t ∗ is the first element of the optimal control sequence obtained by solving the optimization problem at each sampling instant. t can be viewed as a state feedback control law, i.e., Δ U t ∗ = − K ( t ) ξ ~ ( t ∣ t ) , where K ( t ) is a time-varying state feedback gain matrix.
Substituting the optimal control law into the discrete error state in Equation (17) and neglecting the disturbance terms for stability analysis yields the nominal closed-loop system as follows:
ξ ~ ( k + 1 ) = ( A ~ k − B ~ k K ( t ) ) ξ ~ ( k )
Define a Lyapunov function candidate as a quadratic form of the state error as follows:
V ( ξ ~ ( k ) ) = ξ ~ ( k ) T P ( k ) ξ ~ ( k )
where P ( k ) = P ( k ) T > 0 is a positive definite symmetric matrix.
To guarantee the stability of the closed-loop system, the following Lyapunov inequality must be satisfied:
( A ~ k − B ~ k K ( t ) ) T P ( k + 1 ) ( A ~ k − B ~ k K ( k ) ) − P ( k ) < 0
Within the model predictive control framework, stability is typically indirectly ensured through the design of the optimization cost function. Specifically, the terminal cost term in the designed objective function (20) implicitly serves as a Lyapunov function. To rigorously ensure stability, the following assumptions and design considerations are required:
①
Terminal Cost Set. Assume the existence of a terminal region Ω and a local control law u = K f ξ , such that for all ξ ∈ Ω, the closed-loop system satisfies the Lyapunov stability condition.
②
Terminal Constraint. Terminal constraint ξ ( t + N p ∣ t ) ∈ Ω is imposed at the end of the prediction horizon N p .
③
Terminal Weight. The terminal weight matrix Q e in the objective function must be chosen appropriately, typically as the solution to the Lyapunov equation from the infinite horizon linear quadratic regulator problem.
When the above conditions are satisfied, the optimal cost function J ∗ ( t ) can act as a Lyapunov function for the closed-loop system. Since its value is non-increasing at each sampling instant, we have the following:
J ∗ ( ξ ~ ( t + 1 | t + 1 ) ) ≤ J ∗ ( ξ ~ ( t | t ) ) − ∥ η ( t ) − η d e s ( t ) ∥ Q e 2
where ∥ η ( t ) − η d e s ( t ) ∥ Q e 2 is the weighted squared tracking error.
The system state will asymptotically converge to the desired trajectory, thereby guaranteeing the closed-loop stability of the system.
A fuzzy controller is designed, with all membership functions using triangular functions. The inputs to the fuzzy controller are the lateral displacement error Δ Y and the longitudinal vehicle speed v x . The outputs are the lateral displacement error weight Q Y and the prediction time domain N p . Based on existing research and extensive debugging experience, the basic universe of discourse for the lateral displacement error Δ Y is set to [0, 0.2], for the longitudinal vehicle speed v x to [60, 120], for the lateral displacement error weight Q Y to [80, 200], and for the prediction time domain N p to [15, 30]. The membership functions of Δ Y , v x , Q Y , and N p are shown in Figure 6.
Figure 6. Membership function (a). Lateral displacement error Δ Y . (b) Longitudinal vehicle speed v x . (c) Lateral displacement error weight Q Y . (d) Prediction time domain N p .
To enable adaptive control behavior based on real-time risk assessment, the parameters of the MPC controller, specifically, the lateral displacement error weight Q Y and the prediction horizon N p , are dynamically adjusted according to the output of the Bi-LSTM predictor. Let LC ∈ {1, 2} denote the lane change decision generated by the Bi-LSTM model (where LC = 1 indicates a required lane change and LC = 2 indicates no change), as defined in Section 2.1.
Q Y f i n a l = γ Q ( L C ) ⋅ Q Y f u z z y ,   γ Q ( L C ) = { 1 i f   L C = 2 γ Q > 1 i f   L C = 1
N P f i n a l = γ N ( L C ) ⋅ N p f u z z y ,   γ N ( L C ) = { 1 i f   L C = 2 γ N > 1 i f   L C = 1
γ Q and γ N are empirical tuning factors calibrated to enhance tracking performance during high-risk maneuvers (LC = 1). This design ensures that the fuzzy logic system retains its original structure while being augmented by the strategic decision from Bi-LSTM.
As shown in Table 4, TD, SD, MD, BD, and LD represent very small, small, medium, large, and very large, respectively. The optimal lateral displacement weight coefficient and prediction time domain for the vehicle can be determined according to the lateral position error and longitudinal vehicle speed based on the aforementioned fuzzy control strategy, thereby improving the accuracy of trajectory tracking.
Table 4. Fuzzy rule list.

3.2.2. Longitudinal Speed Following Controller

The total required longitudinal force F x _ t o t a l replaces the longitudinal forces on four wheels. The system equations can be obtained as follows:
m a x = m ( v ˙ x − γ v y ) = F x _ t o t a l − F y _ F s i n δ − F f − F w
The sliding mode surface is adjusted using an integral link and a sliding mode factor to obtain the improved sliding mode surface, as shown below.
s = e + ρ ∫ 0 t e d t + ζ
where e = v x − v x d e s . ρ denotes a constant greater than zero. ζ denotes the sliding mode factor, and ζ > 0 . ζ allows adjustment of the initial value of the sliding surface s(0), enabling the system to commence sliding motion from a more favourable initial state, thereby accelerating convergence or preventing excessive control effort caused by unfavourable initial conditions. Furthermore, ζ can be regarded as a form of pre-compensation for unknown disturbances, thereby improving the robustness of the system against parametric uncertainties and external disturbances.
The first-order derivative is obtained by associating Equation (30) as follows:
s ˙ = 1 m ( F x _ t o t a l − F y _ F s i n δ − F f − F w ) + v y γ − v ˙ x d e s + ρ e
In order to reduce the jitter of the system, the sign function sgn(s) is added to the selected exponential convergence law with Equation (33) as follows:
s ˙ = − ε · s g n ( s ) − k s
where k and ε denote the coefficients of the convergence and isochronous convergence terms, respectively ( k > 0 , ε > 0 ).
By constructing the Lyapunov function and applying the second derivative criterion, we can obtain the following:
V ˙ = s s ˙ = s [ 1 m ( F x _ t o t a l − F y _ F s i n δ − F f − F w ) + v y γ − v ˙ x d e s + ρ e ]
By substituting Equation (34) into the above Equation (33), we can obtain the following:
V ˙ = s s ˙ = s ( − ε · s g n ( s ) − k s ) = − | | s | | ε − k s 2 < 0
The sliding mode control strategy proposed ensures the asymptotic stability of the system based on V ˙ < 0 . To reduce chattering of the system, the saturation function s a t ( s ) is applied to replace the sign function s g n ( s ) . The total required longitudinal force F x _ t o t a l can be expressed as follows:
F x _ t o t a l = F y _ F s i n δ + F f + F w + m [ v ˙ x d e s − v y γ − ρ e − ε s a t ( s ) − k s ]
Finally, the longitudinal total demand force F x _ t o t a l to satisfy the vehicle speed following is calculated as a constraint to be substituted into the torque allocation strategy to achieve the tracking accuracy control of the longitudinal vehicle speed.

3.3. LQR-Based Additional Yaw Moment Controller

When the vehicle is in a stable state, i.e., v ˙ y = 0 and γ ˙ = 0 , the desired yaw rate γ and sideslip angle β can be solved as follows:
{ γ d e s = δ v x L ( 1 + K v x 2 ) β d e s = ( L R v x 2 + m L F C R L ) · δ v x 2 L ( 1 + k v x 2 )
where L = L F + L R , K = m L 2 ( L F C R − L R C F ) represents the vehicle stability factor.
The vehicle lateral acceleration satisfies Equation (38) on extreme road conditions as follows:
| a | = v ˙ y + v x γ = v x γ + tan ( β ) v ˙ x + v x β ˙ 1 + tan 2 ( β ) ≤ μ g
The vehicle is traveling with β ≈ 0 , and the combined contribution of the last two terms in Equation (38) accounts for approximately 15% as follows:
γ ≤ 0.85 μ g v x
The desired yaw rate, considering the constraint limitations, can be re-expressed as follows:
γ d e s = min { | δ v x L ( 1 + K v x 2 ) | , | 0.85 μ g v x | } · s g n ( δ )
Considering that the road surface adhesion coefficient has a significant impact on the extreme values of the sideslip angle, a formula is used to limit these extreme values, which is expressed as follows:
β d e s ≤ a r c t a n ( 0.02 μ g )
The desired center of gravity side slip angle can be re-expressed as follows:
β d e s = m i n { | ( L R v x 2 + m L F C R L ) · δ v x 2 L ( 1 + k v x 2 ) | , | a r c t a n ( 0.02 μ g ) | }
An additional yaw moment controller is established, with the controller inputs and state variables set as the front wheel steering angle δ. β d e s and γ d e s represent the desired sideslip angle and the desired yaw rate, respectively. The state error space is as follows:
[ Δ β ˙ Δ γ ˙ ] = [ C C F + C C R m v x L F C C F − L R C C R m v x 2 − 1 L F C C F − L R C C R I Z L F 2 C C F + L R 2 C C R I Z v x ] · [ Δ β Δ γ ] + [ 0 1 / I Z ] T · Δ M Z
Considering the general form of the equation, the state variables are set as x = [ Δ β Δ γ ] T , and the input variables are set as u = Δ M z , where Δ β = β − β d e s , Δ γ = γ − γ d e s .
To reduce the state error and minimize the control input, an objective optimization function is established based on the aforementioned additional yaw moment and state error space equation as follows:
J = 1 2 ∫ 0 ∞ [ x ( t ) T Q x ( t ) + u ( t ) T R u ( t ) ] d t
where Q = d i a g [ q 1 , q 2 ] a n d   R = [ r ] , which represent the weight matrices for the control state error and the control input, respectively. The objective optimization function is transformed into a quadratic programming problem to find the optimal additional yaw moment. By introducing the co-state variables and constructing the Hamiltonian function, the additional yaw moment is obtained as follows:
∆ M Z = k 1 ∆ β + k 2 Δ γ
where k 1 and k 2 represent the rate of optimal control.
To ensure the closed-loop stability of the designed LQR-based additional yaw moment controller, a Lyapunov stability analysis is conducted. From the state error Equation (44) and the control law (45), the closed-loop system equation can be written as follows:
x ˙ = ( A − B K ) x
where A = [ c C F + c C R m v x L F c C F − L R c C R m v x 2 − 1 1 0 ] ,   B = [ 0 1 I z ] ,   K = [ k 1   k 2 ]
Consider the following Lyapunov function:
V ( x ) = x T P x
where P is a symmetric positive definite matrix obtained by solving the Riccati equation as follows:
P A + A T P − P B R − 1 B T P + Q = 0
The time derivative of V(x) along the closed-loop trajectory is as follows:
V ˙ ( x ) = x T [ ( A − B K ) T P + P ( A − B K ) ] x
Substituting K = R − 1 B T P yields the following:
V ˙ ( x ) = − x T ( Q + P B R − 1 B T P ) x
Since Q > 0 , R > 0   a n d   P B R − 1 B T P ≥ 0 , it follows that V ˙ ( x ) < 0   a n d   ∀ x ≠ 0 .
Therefore, the closed-loop system is asymptotically stable at the origin.
Furthermore, the eigenvalues of the closed-loop system are determined by the following:
d e t ( s I − ( A − B K ) ) = 0
Under typical vehicle parameters and selected weighting matrices Q = diag (q1, q2) and R = [r], all computed eigenvalues exhibit negative real parts, confirming good dynamic convergence of the system.
In summary, the designed LQR controller ensures that the state errors ( ∆ β , ∆ γ ) converge asymptotically to zero and that the closed-loop system is stable.

3.4. Coordinated Control of Tracking Accuracy and Stability of Lane Changing Obstacle Avoidance Trajectory Under Multi-Objective Constraints

Considering the varying loads on each wheel during vehicle travelling, a wheel load weight coefficient c i j is applied to the tire adhesion utilization. The lateral force of the tire can be described by the longitudinal force. The optimization expression for the objective function is as follows [37]:
{ F y _ i j = F x _ i j C y _ i j t a n α i j C x _ i j λ i j min J = m i n ∑ i j = F L , F R , R L , R R 4 c i j F x _ i j 2 μ i j 2 F z _ i j 2
Torque distribution must not only satisfy the additional yawing moment Δ M Z required to maintain vehicle stability and the total required longitudinal force F x _ t o t a l for following the longitudinal vehicle speed but also consider constraints such as the peak torque T p _ i j of the motor and the road adhesion limit μ i j F z i j . The corresponding constraints are summarized as follows:
{ ( F x _ F L + F x _ F R ) c o s δ + F x _ R L + F x _ R R = F x _ t o t a l B F 2 ( F x _ F R − F x _ F L ) c o s δ + B R 2 ( F x _ R R − F x _ R L ) + L F ( F x _ F L + F x _ F R ) s i n δ = Δ M Z − min { T p _ i j i g r , μ i j F z _ i j } ≤ F x _ i j ≤ min { T p _ i j i g r , μ i j F z _ i j }
The longitudinal forces on four wheels are adjusted to meet the longitudinal and lateral torque requirements in the lane changing obstacle avoidance scenario; that is, B u ( t ) = v ( t ) . The optimal torque distribution problem under multiple constraints can be represented as follows:
{ min J = m i n ∑ i j = F L , F R , R L , R R 4 c i j F x _ i j 2 μ i j 2 F z _ i j 2 B u ( t ) = v ( t ) − min { T p _ i j i g r , μ i j F z _ i j } ≤ F x _ i j ≤ min { T p _ i j i g r , μ i j F z _ i j }
The optimal torque distribution problem with multiple constraints can be converted into a least squares problem (SLS) with constraints, and the finite pointset method will be used to solve the optimal torque distribution problem. The standard effective set can be obtained by changing the equation constraints of Equation (54) into L2 paradigm form as follows:
u = arg min lb ≤ u ≤ ub ( | | W u ( u − u d ) | | 2 + ε | | W v ( B u − v ) | | 2 )     = arg min lb ≤ u ≤ ub | | A u − b | | 2
where
{ u = [ F x _ F L , F x _ F R , F x _ R F , F x _ R R ] T , u d = 0 , v = [ F x _ t o t a l Δ M Z ] T B = [ c o s δ c o s δ 1 − B F c o s δ 2 + L F s i n δ B F c o s δ 2 + L F s i n δ − B R 2         1 B R 2 ] W u = d i a g [ c F L μ F L F z _ F L , c F R μ F R F z _ F R , c R L μ R L F z _ R F , c R R μ R R F z _ R R ] , W v = d i a g ( 1,1 ) l b = [ l b F L     l b F R     l b R L     l b R R     ] T , u b = [ u b F L     u b F R     u b R L     u b R R   ] T l b i j = − min ( T p i j i g r , μ i j F z i j ) , u b i j = min ( T p i j i g r , μ i j F z i j ) A = ( ε W v B W u ) ,       b = ( ε W v v W u u d )
W u and W v denote the diagonal weighting matrix, respectively. ε denotes the weighting coefficient, taking ε = 10,000 .
The driving force F ^ x − i j of each wheel can be solved using Matlab software R2017a after the optimized torque allocation. According to the wheel rotational dynamics model, the driving force F ^ x _ i j of each wheel can be transformed into the target torque of each motor T ^ x _ i j .
The optimized driving forces for each wheel, F ^ x _ i j can be calculated using Matlab software. Furthermore, based on the wheel rotation dynamics model, the driving forces of each wheel F ^ x _ i j can be converted into the target torques for each motor.
T ^ x _ i j = ( J w i j d ω i j d t + F f r + F ^ x _ i j r ) / i g

4. The Validation of Lane Changing and Obstacle Avoidance Control

To validate the lane changing and obstacle avoidance control strategy designed in this paper, and considering that the dSPACE hardware-in-the-loop (HIL) simulation platform offers excellent real-time performance, high computational speed, flexible modularity, strong compatibility between software and hardware, and support for multiple hardware interfaces, the simulation environment for the proposed lane changing and obstacle avoidance control strategy is built based on the dSPACE HIL simulation platform.
The dSPACE HIL simulation platform primarily consists of an upper-level host computer and a lower-level control cabinet. The control cabinet includes two main components: the MicroAutoBox II (a rapid prototyping controller) and the SCALEXIO (a real-time simulator). The MicroAutoBox II is used to execute the control strategy in real time, while the SCALEXIO simulates the closed-loop “driver–vehicle–road” environment. The SCALEXIO incorporates built-in vehicle and road environment models. Through Simulink-integrated CAN communication and analog-to-digital conversion modules, the MicroAutoBox II acquires vehicle state parameters fed back from the models running on the SCALEXIO, and then, based on its embedded lane changing and obstacle avoidance control strategy model, generates a lane change command, performs trajectory planning, and computes the optimal steering wheel angle and individual wheel motor torque commands required to track the planned lane changing and obstacle avoidance trajectory.
The upper-level host software includes MATLAB/Simulink R2017a, ControlDesk 6.2, ModelDesk 4.6, and MotionDesk 4.1. These tools compile the low-level communication modules and strategy models into C code, which is subsequently downloaded onto the DS1401 processor board of the MicroAutoBox II and the DS1006 processor board of the SCALEXIO, respectively. ControlDesk enables real-time observation and online parameter adjustment of the strategy model; ModelDesk allows configuration of driver behaviors and road models corresponding to specific test scenarios; and MotionDesk provides visualization of the HIL simulation results. The dSPACE HIL simulation platform and its physical setup are shown in Figure 7 and Figure 8, respectively.
Figure 7. Construction of a hardware simulation platform based on dSPACE.
Figure 8. Hardware-in-the-loop simulation platform.

4.1. Construction of the dSPACE HIL Simulation Platform

The parameters of the hub motor-driven test vehicle are shown in Table 5. Parameters of the hub motor assembly are shown in Table 6. Parameters of the controller are shown in Table 7.
Table 5. Specifications of heavy-duty vehicles.
Table 6. Parameters of hub motor assembly.
Table 7. Parameters of the controller.
The basic control is defined as conventional LTV-MPC control combined with sliding mode control and load distribution. The lateral displacement tracking of the vehicle is achieved using the LTV-MPC control, while the longitudinal velocity tracking is calculated using sliding mode control to determine the total required force. Considering road adhesion and the torque constraints of the hub motors, a load distribution method is used to coordinate the torque control of each wheel. The integrated optimization control designed in this paper is defined as an improved LTV-MPC control combined with optimized integral sliding mode control and optimal torque distribution. Simulation comparisons are conducted to verify the basic control and the integrated optimization control.

4.2. Simulation and Verification of Lane Changing Obstacle Avoidance Risk Prediction

Randomize the 2000 sets of vehicle characteristic parameter data from the HighD dataset (Table 8) and select 1500 sets and 500 sets of vehicle characteristic parameters as the training set and test set, respectively.
Table 8. Vehicle characteristic parameters.
Apply the Adam optimization algorithm to train the model. The loss function is observed to stabilize. The LC value denotes the label of lane changing, with LC = 1 indicating that the vehicle is changing lanes and LC = 2 indicating that the vehicle is not changing lanes. As shown in Figure 9, the accuracy of LC prediction reaches 98.8% after 800 training sessions and 2500 iterations. Due to the high accuracy, the actual and predicted curves nearly overlap. The results indicate that the lane changing obstacle risk model proposed based on Bi-LSTM is highly feasible.
Figure 9. Training results of the Bi-LSTM risk prediction model and confusion matrix.

4.3. Simulation of Lane Changing Obstacle Avoidance on a High-Adhesion Surface

4.3.1. Ego Vehicle High-Speed and Obstacle Vehicle Stationary Test on a High-Adhesion Surface

The simulation scenario test conditions are shown in Table 9. The results compared the basic control strategy with the optimized control strategy and are shown in Figure 10.
Table 9. High-speed simulation scenario test conditions (coefficient of adhesion 0.9).
Figure 10. Simulation results of ego vehicle high-speed and obstacle vehicle stationary test on a high-adhesion surface. (a) Safety distance-switch to safety factor. (b) Relative distance between the vehicle and the obstacle vehicle. (c) Lane change trajectory. (d) Steering wheel angle turn signal. (e) Travel trajectory and lateral displacement deviation. (f) Heading angle. (g) Yaw rate. (h) Longitudinal speed. (i) Sideslip angle. (j) Adjustment torque of each wheel. (k) Yaw rate deviation. (l) Longitudinal speed deviation.
From Figure 10a, the safety factor of lane changing is 1.48, so the vehicle can achieve emergency obstacle avoidance by turning to change lanes. From Figure 10b, it can be seen that the relative distance to the side vehicle during the lane changing obstacle avoidance is greater than 0, and the minimum value is 4.88 m. From Figure 10c, it can be seen that the optimal lane changing obstacle avoidance time under the current working condition is 2.1 s, while the calculation result based on the fixed weight is 3.2 s. The optimal lane changing obstacle avoidance time under the current working condition is 2.1 s, while the calculation result based on the fixed weight is 3.2 s. From Table 10 and Figure 10d–j, compared with the base control, the maximum lateral displacement error and the maximum heading angle error of the optimized control strategy are reduced by 58.6% and 27.6%, respectively, with high trajectory tracking accuracy. In Figure 10k,i, compared with the base control, the proposed approach reduces the peak yaw rate error from 16.070°/s to 6.199°/s (a 61.4% reduction) and lowers the peak longitudinal velocity error from 0.238 m/s to 0.103 m/s (a 55.0% reduction). Compared with the baseline control, the optimized strategy not only facilitates rapid steering adjustments and faster convergence but also effectively mitigates fluctuations in the sideslip angle and yaw rate. This directly leads to improved torque distribution efficiency and enhanced vehicle stability.
Table 10. Results of different control strategies at high speeds on a high-adhesion surface.

4.3.2. Ego Vehicle Medium-Speed and Obstacle Vehicle Deceleration Test on a High-Adhesion Surface

The simulation scenario test conditions are shown in Table 11. The results comparing the basic control strategy with the optimized control strategy are shown in Figure 11.
Table 11. Medium-speed simulation scenario test conditions (coefficient of adhesion 0.9).
Figure 11. Simulation results of ego vehicle medium-speed and obstacle vehicle deceleration test on a high-adhesion surface. (a) Safety distance switch to safety factor. (b) Relative distance between the vehicle and the obstacle vehicle. (c) Lane change trajectory. (d) Steering wheel angle turn signal. (e) Travel trajectory and lateral displacement deviation. (f) Heading angle. (g) Yaw rate. (h) Longitudinal speed. (i) Vehicle sideslip angle. (j) Adjustment torque of each wheel. (k) Yaw rate error. (l) Longitudinal speed deviation.
Figure 11a shows that the safety factor for lane changing of the ego vehicle is calculated to be 1.54, which is higher than that in the high-adhesion scenario, indicating a decrease in the urgency of lane changing. Figure 11b indicates that the relative distance between the ego vehicle and adjacent vehicles during lane changing for obstacle avoidance is greater than 6.56 m, with no collisions occurring with other vehicles. Figure 11c illustrates that the optimal time for lane changing to avoid obstacles based on adaptive variable weighting is calculated to be 2.4 s at the start of steering for lane changing to avoid obstacles, while the optimal time based on fixed weighting remains 3.2 s.
As shown in Table 12 and Figure 11d–j, with the decrease in the curvature of the obstacle avoidance trajectory and the reduction in vehicle speed, compared to the basic control strategy, the maximum lateral displacement error and the maximum heading angle error of the combined optimized control strategy have been reduced by 68.3% and 64.8%, respectively, resulting in higher trajectory tracking accuracy. In Figure 11k,i, compared with the base control, the proposed approach reduces the peak yaw rate error from 7.493°/s to 1.975°/s (a 73.6% reduction) and lowers the peak longitudinal velocity error from 0.093 m/s to 0.063 m/s (a 32.4% reduction), with the yaw rate error converging to near zero at 3.6 s. The sideslip angle and yaw rate in the optimized control strategy are essentially consistent with the desired values, achieving coordinated control of trajectory tracking with accuracy and stability.
Table 12. Results for control strategies at a high-adhesion surface and at medium speeds.

4.4. Simulation of Lane Changing Obstacle Avoidance on a Low-Adhesion Surface

4.4.1. Ego Vehicle Medium-Speed and Obstacle Vehicle Stationary Test on a Low-Adhesion Surface

The simulation scenario test conditions are shown in Table 13. The results between the basic control strategy and the optimized control strategy are shown in Figure 12.
Table 13. Medium-speed simulation scenario test conditions (coefficient of adhesion 0.4).
Figure 12. Simulation results of ego Vehicle Medium-Speed and Obstacle Vehicle Stationary Test on a Low-adhesion surface. (a) Safety distance switch to safety factor. (b) Relative distance between the vehicle and the obstacle vehicle. (c) Lane change trajectory. (d) Steering wheel angle turn signal. (e) Travel trajectory and lateral displacement deviation. (f) Heading angle. (g) Yaw rate. (h) Longitudinal speed. (i) Sideslip angle. (j) Adjustment torque of each wheel. (k) Yaw rate error. (l) Longitudinal speed deviation.
Figure 12a indicates that the ego vehicle’s lane changing safety factor is 1.17, which fulfills the criteria for obstacle avoidance during lane changing. Figure 12b demonstrates that the relative distance to the adjacent vehicle remains above 5 m during lane changing, with no collisions occurring. Figure 11c shows that, compared with Figure 11c, the minimum time required for lane change obstacle avoidance increases as the road surface adhesion coefficient decreases. The optimal time calculated with adaptive variable weights is 2.5 s, while with fixed weights, it is 3.7 s.
The results comparing the basic control strategy with the optimized control strategy are shown in Figure 12. Table 14 and Figure 12d–j reveal that as the road surface adhesion coefficient decreases, the tire saturation force diminishes, leading to steering wheel angle oscillations in two control strategies. The optimized control strategy experiences oscillations for approximately 0.5 s, stabilizing at 0 deg after 6 s, whereas the basic control strategy exhibits high-amplitude oscillations for about 1.5 s, failing to converge to 0 deg after the lane change. Compared to the basic control, the combined optimized control strategy reduces the maximum lateral displacement error and the maximum heading angle error by 68.1% and 47.8%, respectively, enhancing the accuracy of trajectory tracking. In Figure 12k,i, compared with the base control, the proposed approach reduces the peak yaw rate error from 14.879°/s to 10.258°/s (a 31.1% reduction) and lowers the peak longitudinal velocity error from 0.161 m/s to 0.103 m/s (a 35.7% reduction). Compared to basic control, the fluctuations in the sideslip angle and yaw rate are reduced and stabilized at 4.5 s, effectively improving the yaw stability of the vehicle.
Table 14. Results for control strategies at a low-adhesion surface and at medium speeds.

4.4.2. Ego Vehicle Medium-Speed and Obstacle Vehicle Deceleration Test on a Low-Adhesion Surface

The simulation scenario test conditions are shown in Table 15. The results comparing the basic control strategy with the optimized control strategy are shown in Figure 13.
Table 15. Low-speed simulation scenario test conditions (coefficient of adhesion 0.4).
Figure 13. Simulation results of ego vehicle medium-speed and obstacle vehicle deceleration test on a low-adhesion surface. (a) Safety distance switch to safety factor. (b) Relative distance between the vehicle and the obstacle vehicle. (c) Lane change trajectory. (d) Steering wheel angle turn signal. (e) Travel trajectory and lateral displacement deviation. (f) Heading angle. (g) Yaw rate. (h) Longitudinal speed. (i) Sideslip angle. (j) Adjustment torque of each wheel. (k) Yaw rate error. (l) Longitudinal speed deviation.
Figure 13a reveals that the ego vehicle’s lane changing safety factor is calculated to be 1.35, indicating that the vehicle could achieve an emergency obstacle avoidance by steering to change lanes. As shown in Figure 13b, the minimum relative distance to the adjacent vehicle during lane changing is 5.32 m, with no collisions occurring. Figure 13c demonstrates that the optimal lane change obstacle avoidance time with adaptive variable weighting is 2.7 s, which is superior to the 3.7 s calculated with fixed weighting, suggesting that the optimized control strategy can reduce the risk and increase the efficiency of lane changes.
Table 16 and Figure 13d–j indicate that the steering wheel angle exhibits minimal oscillation and quickly converges to 0 deg under the optimized control strategy, whereas under the basic control strategy, there is a small oscillation of 0.5 s, and the angle does not converge to 0 deg during lane changing, reaching a maximum absolute value of 34.23 deg, leading to instability of the vehicle and the failure of control. Compared to the basic control strategy, the maximum lateral displacement error and the maximum heading angle error under the combined optimized control strategy are 0.045 m and 1.281 deg, respectively, decreasing by 79.6% and 45.1%. As the curvature of the obstacle avoidance trajectory decreases, the optimized control strategy can effectively reduce the maximum lateral displacement error and heading angle error, and the maximum fluctuation amplitudes of the sideslip angle and yaw rate are also reduced, indicating that the combined optimized control can ensure the stability of the vehicle during high-speed driving while meeting tracking accuracy requirements. In Figure 13k,i, compared with the base control, the proposed approach reduces the peak yaw rate error from 6.562°/s to 4.405°/s (a 32.9% reduction) and lowers the peak longitudinal velocity error from 0.135 m/s to 0.063 m/s (a 53.4% reduction).
Table 16. Results for control strategies at a low-adhesion surface and at medium speeds.

5. Conclusions

This paper proposes a lane changing and obstacle avoidance control strategy for hub motor-driven vehicles based on collision risk prediction and compares the trajectory tracking accuracy and stability of vehicles in two control strategies. The main conclusions are as follows:
(1) In response to collision risk prediction in emergency situations, obstacle avoidance, trajectory planning, and tracking control, the paper investigates the lane changing obstacle avoidance control strategy for wheel hub motor-driven vehicles. A Bi-LSTM lane changing obstacle avoidance risk model is designed based on a HighD dataset to decide whether the vehicle should change lanes, with a prediction accuracy of 98.8%.
(2) An adaptive variable weighting method for lane changing trajectory planning is proposed, which balances lane changing efficiency and comfort, effectively improving vehicle lane changing efficiency and reducing collision risk. A trajectory tracking control strategy with high precision and robustness for lane change and obstacle avoidance was designed to realize the coordinated control of trajectory tracking accuracy and stability under multi-objective constraints.
(3) A dSPACE HIL platform is constructed. Typical application scenarios for lane changing obstacle avoidance are selected. Vehicles using basic and optimized control strategies are compared for trajectory tracking effects. The results show that an improved LTV-MPC lateral displacement tracking controller minimizes vehicle tracking errors and enhances trajectory tracking performance during lane changing and obstacle avoidance. Additional yawing moments are adjusted through torque vector optimization distribution methods to enhance vehicle stability.
Due to the current focus of our experimental validation, we did not include comparisons with external benchmark controllers in this study. Future work will focus on integrating real-time tire force estimation and vertical load transfer modeling into the control framework to enable more accurate assessment of tire utilization near friction limits. Furthermore, benchmarking the proposed control strategy against established approaches, such as LQR and conventional MPC, will be conducted through quantitative performance comparisons, including confidence intervals, to provide a more comprehensive and rigorous validation of its advantages in lane changing and obstacle avoidance scenarios. To further assess the robustness of the control system, a detailed sensitivity analysis will be conducted under parameter variations and complex road disturbances as part of our extended research. Third, to bridge the gap between algorithmic capability and embedded feasibility, we will pursue targeted optimizations for resource-constrained automotive platforms, including lightweight neural network design (e.g., structured pruning and quantization of Bi-LSTM), efficient MPC solver implementations (e.g., explicit MPC or warm-started iterative methods), and AUTOSAR-compliant hierarchical task scheduling.

Author Contributions

Methodology, J.W. (Jiaqi Wan) and T.Y.; software, S.Y. and T.N.; validation, J.W. (Jijie Wang); formal analysis, Z.X.; investigation, Z.X.; writing—original draft, J.W. (Jiaqi Wan), Z.X., J.W. (Jijie Wang), S.Y., and T.N.; writing—review and editing, T.Y. and F.Y.; visualization, J.W. (Jiaqi Wan), J.W. (Jijie Wang), S.Y., and T.N.; supervision, J.W. (Jiaqi Wan), T.Y., and F.Y.; project administration, T.Y.; funding acquisition, F.Y. All authors have read and agreed to the published version of the manuscript.

Funding

This research is funded by the National Key R&D Program of China (2023YFB2504300 and 2022YFC3006000) and the 2024 University-Industry-Research Innovation Fund of China (2024IT275).

Data Availability Statement

The original contributions presented in this study are included in the article. Further inquiries can be directed to the corresponding authors.

Conflicts of Interest

Author Shuiyan Yang was employed by the Hangzhou Advance Gearbox Group Co., Ltd. The remaining authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.

References

  1. Shi, D.; Sun, L.; Zhang, Q.; Wang, S.; Zhang, K.; Yin, C.; Li, C. Nonlinear Dynamics Analysis of the Wheel-Side Planetary Reducer with Tooth Wear for the In-Wheel Motored Electric Vehicle. Mathematics 2025, 13, 2885. [Google Scholar]
  2. Zhu, S.; Wei, B.; Chen, C.; Gao, J.; Ning, W.; Huang, Z. Emergency steering collision avoidance control based on distributed driving intelligent vehicles. Concurr. Comput. Pract. Exp. 2023, 35, e7486. [Google Scholar]
  3. Song, R.; Li, B. Surrounding Vehicles’ Lane Change Maneuver Prediction and Detection for Intelligent Vehicles: A Comprehensive Review. IEEE Trans. Intell. Transport. Syst. 2021, 99, 6046–6062. [Google Scholar] [CrossRef] [Scilit]
  4. Shangguan, Q.; Fu, T.; Wang, J.; Fang, S.; Fu, L. A proactive lane-changing risk prediction framework considering driving intention recognition and different lane-changing patterns. Accid. Anal. Prev. 2022, 164, 106500. [Google Scholar] [CrossRef] [Scilit]
  5. Wu, J.; Wen, H.; Qi, W. A new method of temporal and spatial risk estimation for lane change considering conventional recognition defects. Accid. Anal. Prev. 2020, 148, 105796. [Google Scholar] [CrossRef] [Scilit]
  6. Wang, Z.; Ramyar, S.; Salaken, S.M.; Homaifar, A.; Nahavandi, S.; Karimoddini, A. A collision avoidance system with fuzzy danger level detection. In Proceedings of the 2017 IEEE Intelligent Vehicles Symposium (IV), Los Angeles, CA, USA, 11–14 June 2017; pp. 283–288. [Google Scholar]
  7. Xia, T.; Chen, H.; Yang, J.; Guo, Z. Geometric field model of driver’s perceived risk for safe and human-like trajectory planning. Transp. Res. C Emerg. Technol. 2024, 159, 104470. [Google Scholar] [CrossRef] [Scilit]
  8. Tomar, R.S.; Verma, S.; Tomar, G.S. Prediction of Lane Change Trajectories through Neural Network. In Proceedings of the International Conference on Computational Intelligence & Communication Networks, Bhopal, India, 26–28 November 2010; pp. 249–253. [Google Scholar]
  9. Song, C.; Ding, Z.; Xu, W. Vehicle Lane change trajectory learning and prediction model considering vehicle interactions and driving styles in highway scene. Int. J. Sens. Netw. 2023, 43, 172–183. [Google Scholar] [CrossRef] [Scilit]
  10. Li, S.; Shu, K.; Chen, C.; Cao, D. Planning and Decision-making for Connected Autonomous Vehicles at Road Intersections: A Review. Chin. J. Mech. Eng. 2021, 34, 133. [Google Scholar] [CrossRef] [Scilit]
  11. Yang, I.; Kim, H.J.; Jeon, W.H.; Kim, H. Development of realistic shortest path algorithm considering lane changes. J. Adv. Transp. 2016, 50, 541–551. [Google Scholar] [CrossRef] [Scilit]
  12. Xu, L.; Xu, R.; Kuang, X. Research on path planning of automated guided vehicle based on improved RRT* algorithm. In Proceedings of the International Conference on Computer Application and Information Security (ICCAIS), Online, 23–24 December 2023; Volume 12609, pp. 16–23. [Google Scholar]
  13. Kou, Y.; Ma, C. Dual-objective intelligent vehicle lane changing trajectory planning based on polynomial optimization. Physica A 2023, 617, 128665. [Google Scholar] [CrossRef] [Scilit]
  14. Zhang, D.; Jiao, X.; Zhang, T. Lane-changing and overtaking trajectory planning for autonomous vehicles with multi-performance optimization considering static and dynamic obstacles. Robot. Auton. Syst. 2024, 182, 104797. [Google Scholar] [CrossRef] [Scilit]
  15. Liu, Z.; Kang, H. Research on trajectory tracking of unmanned vehicle based on model predictive control. J. Phys. Conf. Ser. 2021, 1861, 012116. [Google Scholar] [CrossRef] [Scilit]
  16. Wu, H.D.; Li, Z.H.; Si, Z.L. Trajectory tracking control for four-wheel independent drive intelligent vehicle based on model predictive control and sliding mode control. Adv. Mech. Eng. 2021, 13, 16878140211045142. [Google Scholar] [CrossRef] [Scilit]
  17. Qi, L.; Jiao, X.; Wang, Z. Trajectory Tracking Control of Intelligent Driving Vehicle Based on Model Predictive Control. In Proceedings of the Chinese Automation Congress (CAC), Shanghai, China, 6–8 November 2020; pp. 285–289. [Google Scholar]
  18. Wang, L.; Chen, Z.L.; Zhu, W. An improved pure pursuit path tracking control method based on heading error rate. Ind. Robot. Int. J. 2022, 49, 973–980. [Google Scholar] [CrossRef] [Scilit]
  19. Hassan, I.A.; Attia, T.; Ragheb, H.; Sharaf, A.M. Design of unmanned ground vehicle (UGV) path tracking controller based on reinforcement learning. Int. J. Heavy Veh. Syst. 2023, 30, 577–587. [Google Scholar] [CrossRef] [Scilit]
  20. Tan, G.; Li, M.; Hou, B.; Zhu, J.; Guan, L. Achieving accurate trajectory predicting and tracking for autonomous vehicles via reinforcement learning-assisted control approaches. Eng. Appl. Artif. Intell. 2024, 135, 108773. [Google Scholar] [CrossRef] [Scilit]
  21. Nan, J.; Ge, Z.; Ye, X.; Burke, A.F.; Zhao, J. Model predictive control for autonomous vehicle path tracking through optimized kinematics. Results Eng. 2024, 24, 103123. [Google Scholar] [CrossRef] [Scilit]
  22. Liu, C.; Liu, H.; Han, L.; Wang, W.; Guo, C. Multi-Level Coordinated Yaw Stability Control Based on Sliding Mode Predictive Control for Distributed Drive Electric Vehicles Under Extreme Conditions. IEEE Trans. Veh. Technol. 2023, 1, 72. [Google Scholar] [CrossRef] [Scilit]
  23. Wu, J.; Wang, Z.; Zhang, L. Unbiased-estimation-based and computation-efficient adaptive MPC for four-wheel-independently-actuated electric vehicles. Mech. Mach. Theory 2020, 154, 104100. [Google Scholar] [CrossRef] [Scilit]
  24. Liu, Z.; Yin, D.; Guo, R. Coordinated control of path following and yaw stability for distributed drive autonomous vehicle. J. Phys. Conf. Ser. 2022, 2264, 012030. [Google Scholar] [CrossRef] [Scilit]
  25. Mohammadzadeh, A.; Taghavifar, H. A robust fuzzy control approach for path-following control of autonomous vehicles. Soft Comput. 2020, 24, 3223–3235. [Google Scholar] [CrossRef] [Scilit]
  26. Min, Q.; Deng, M.; Zheng, Z.; Wang, S.; Gui, X.; Zhang, H. Research on Direct Yaw Moment Control Strategy of Distributed-Drive Electric Vehicle Based on Joint Observer. Energy Eng. 2021, 118, 853–874. [Google Scholar] [CrossRef] [Scilit]
  27. Teng, F.; Wang, J.; Jin, L.; Wang, Z.; Zhou, Z.; Liu, Z. Cooperative control strategy of trajectory tracking and driving stability for distributed-drive vehicles under extreme conditions. Control Eng. Pract. 2024, 147, 105905. [Google Scholar] [CrossRef] [Scilit]
  28. Fu, X.; Wan, J.; Liu, D.; Huang, S.; Wu, S.; Liu, Z.; Wang, J.; Ruan, Q.; Yang, T. Synthetic Optimization of Trafficability and Roll Stability for Off-Road Vehicles Based on Wheel-Hub Drive Motors and Semi-Active Suspension. Mathematics 2024, 12, 1871. [Google Scholar] [CrossRef] [Scilit]
  29. Ghaedi, M.; Bayat, F.; Fekih, A.; Mobayen, S. Robust performance improvement of lateral motion in four-wheel independent-drive electric vehicles. IEEE Access 2020, 8, 203146–203157. [Google Scholar] [CrossRef] [Scilit]
  30. Singh, P.; Nishihara, O. Nondimensionalized univariate equation characterizing optimal state feedback control for collision avoidance. IEEE Trans. Intell. Transp. Syst. 2018, 19, 3346–3360. [Google Scholar] [CrossRef] [Scilit]
  31. Krajewski, R.; Bock, J.; Kloeker, L.; Eckstein, L. The HighD dataset: A drone dataset of naturalistic vehicle trajectories on German highways for validation of highly automated driving systems. In Proceedings of the 21st International Conference on Intelligent Transportation Systems (ITSC), Maui, HI, USA, 4–7 November 2018; pp. 2118–2125. [Google Scholar]
  32. Zhang, Y.; Chen, L.; Li, N. Improved Quintic Polynomial Autonomous Vehicle Lane-Change Trajectory Planning Based on Hybrid Algorithm Optimization. World Electr. Veh. J. 2025, 16, 244. [Google Scholar] [CrossRef] [Scilit]
  33. Zhang, S.; Wang, Y.; Hu, Y. Lane-change trajectory planning method for driverless vehicles based on trajectory prediction. In Proceedings of the Sixth International Conference on Traffic Engineering and Transportation System (ICTETS), Dalian, China, 18–20 September 2023; Volume 12591, pp. 541–549. [Google Scholar]
  34. Chen, G.; Hua, M.; Liu, W.; Wang, J.; Song, S.; Liu, C.; Yang, L.; Liao, S.; Xia, X. Planning and tracking control of full drive-by-wire electric vehicles in unstructured scenario. Proc. Inst. Mech. Eng. Part D J. Automob. Eng. 2023, 238, 3941–3956. [Google Scholar] [CrossRef] [Scilit]
  35. Tijerina, L.; Garrott, W.R.; Stoltzfus, D.; Parmer, E. Eye Glance Behavior of Van and Passenger Car Drivers During Lane Change Decision Phase. Transp. Res. Rec. 2005, 1, 37–43. [Google Scholar] [CrossRef]
  36. Wu, X.; Qiao, B.; Su, C. Trajectory Planning with Time-Variant Safety Margin for Autonomous Vehicle Lane Change. Appl. Sci. 2020, 10, 1626. [Google Scholar] [CrossRef] [Scilit]
  37. Yang, J.; Guo, T.; Yu, Y.; Jiang, P.; Cao, C.; Pang, X.; Dong, Q.; Wang, X. Adaptive Fuzzy Fractional-Order Terminal Sliding Mode Control Using Adaptive Neural Network Observation Architecture with Application to Ultra-Precision Stages. Control Eng. Pract. 2025, 165, 106623. [Google Scholar] [CrossRef] [Scilit]
  38. Liang, Y.; Li, Y.; Zheng, L.; Yu, Y.; Ren, Y. Yaw rate tracking-based path-following control for four-wheel independent driving and four-wheel independent steering autonomous vehicles considering the coordination with dynamics stability. Proc. Inst. Mech. Eng. Part. D J. Automob. Eng. 2021, 235, 260–272. [Google Scholar] [CrossRef] [Scilit]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Article Metrics

Citations

Article Access Statistics

Multiple requests from the same IP address are counted as one view.