Research on Decoupled Optimal Control of Straight-Line Driving Stability of Electric Vehicles Driven by Four-Wheel Hub Motors

: The optimal control strategy for the decoupling of drive torque is proposed for the problems of runaway and driving stability in straight-line driving of electric vehicles driven by four-wheel hub motors. The strategy uses a hierarchical control logic, with the upper control logic layer being responsible for additional transverse moment calculation and driving anti-slip control; the middle control logic layer is responsible for the spatial motion decoupling for the underlying coordinated distribution of the four-wheel drive torque, on the basis of which the drive anti-skid control of a wheel motor-driven electric vehicle that takes into account the transverse motion of the whole vehicle is realized; the lower control logic layer is responsible for the optimal distribution of the driving torque of the vehicle speed following control. Based on the vehicle dynamics software Carsim2019.0 and MATLAB/Simulink, a simulation model of a four-wheel hub motor-driven electric vehicle control system was built and simulated under typical operating conditions such as high coefﬁcient of adhesion, low coefﬁcient of adhesion and opposing road surfaces. The research shows that the wheel motor drive has the ability to control the stability of the whole vehicle with large intensity that the conventional half-axle drive does not have. Using the proposed joint decoupling control of the transverse pendulum motion and slip rate as well as the optimal distribution of the drive force with speed following, the transverse pendulum angular speed and slip rate can be effectively controlled with the premise of ensuring the vehicle speed, thus greatly improving the straight-line driving stability of the vehicle.


Introduction
Distributed drive is a new drive mode for electric vehicles in which the speed and torque of each drive wheel can be controlled quickly, accurately, and independently. It is even possible to drive on one side and brake on the other, facilitating drive/brake antiskid, power steering and active transverse moment control, thereby greatly improving the handling stability of the vehicle [1][2][3]. Based on these advantages, distributed drives have become a hot research topic in the field of electric vehicles. Distributed drives include both wheel-side drives and hub motor drives. In the last decade, hub motor-driven electric vehicles have been widely developed. The ground driving force of an electric vehicle driven by a hub motor acts directly on the body. As each wheel is independently driven, the force produced by each wheel on the body is different, which can effectively change the yaw of the body. Hub motor drive electric vehicle without a deceleration device, the wheel speed and motor the same, can directly control the motor and change the wheel speed [4].
GM, Ford, Mercedes Benz, and other automobile enterprises have applied hub motor technology in some of their electric vehicle models. GM applied the self-developed hub wheel speed and motor the same, can directly control the motor and change the wheel speed [4].
GM, Ford, Mercedes Benz, and other automobile enterprises have applied hub motor technology in some of their electric vehicle models. GM applied the self-developed hub motor to the Chevrolet S-10 pickup truck. The wheel weight increased by only 15 kg, but the driving torque was 60% higher than that of the ordinary Chevrolet S-10 four-cylinder pickup truck [5]. In [6][7][8], the hub motor drive adopts the direct torque control (DTC) control strategy. DTC is famous for its fast torque response, simple structure, and low parameter dependence [6]. However, it has the disadvantages of poor low-speed performance and large torque ripple [8]. In [9], a controller based on GWO algorithm is designed for all variables, which can minimize the speed ripple during low-speed and high-speed torque operation. It runs the optimization algorithm in real time to explore the optimal control input to ensure satisfactory dynamics.
Satoshi et al. carried out the force analysis of the additional torque of the whole vehicle generated by the transmission of the driving/braking torque of the hub motor through the suspension, as shown in Figure 1, which reflects that the hub motor drive has a stronger vehicle motion control effect than the half axle drive but did not reveal the essential mechanism and subsequent control method of the additional torque generated by the hub motor drive [10]. In [11], through mechanical analysis, it is concluded that the reaction torque of wheel driving torque of wheel motor-driven vehicle on suspension is much greater than that of traditional half axle driven vehicle, which is directly transmitted back to the transmission system through the half axle and acts on the body position fixed by the transmission system. Finally, the yaw stability controller based on model predictive control and the roll stability controller based on feedback optimal control are designed. The bottom coordinated distribution of four-wheel drive torque is carried out through spatial motion decoupling, and the roll stability control of hub motor-driven electric vehicle considering the yaw motion of the whole vehicle is realized. Zheng Yuanbai et al. installed the hub motor on both sides of the semi-trailer and generated the differential torque by coordinating and controlling the driving/braking torque of the hub motor and the differential braking of the mechanical braking system, so as to effectively improve the lateral stability of the vehicle. The research shows that this strategy is better than the traditional differential braking control system (ESP) [12]. Ma Haiying   Zheng Yuanbai et al. installed the hub motor on both sides of the semi-trailer and generated the differential torque by coordinating and controlling the driving/braking torque of the hub motor and the differential braking of the mechanical braking system, so as to effectively improve the lateral stability of the vehicle. The research shows that this strategy is better than the traditional differential braking control system (ESP) [12]. Ma Haiying et al. studied the influence of different wind angles, crosswinds, and vehicle speeds on the straight-line driving of electric vehicles driven by four-wheel hub motors, and established a direct yaw moment control model based on fuzzy logic to improve the straight-line driving stability of electric vehicles driven by four-wheel in-wheel motors under crosswinds. The results proves that velocity of vehicle make biggest difference to the influence on vehicle under the cross wind, and the DYC model can decline the amplitude of yaw rate and improve the straight-line stability of vehicle well [13].
Due to the changes in the structure and drive system of a hub motor-driven electric vehicle and the changes in the vehicle's handling stability, passability, dynamics, and smoothness, it is particularly important to establish control technology suitable for distributed drive vehicles with reference to conventional vehicle control systems. Among them, the vehicle straight-line driving performance as the primary solution, can reduce the difficulty of the driver to maneuver the vehicle, improve the safety, power and passability of the vehicle in high-speed straight-line driving, can increase the driver's ability to deal with complex road conditions, is the four-wheel hub motor drive vehicles focus on solving the technology.
Straight-line driving stability includes the lateral stability of the vehicle, the rate of wheel slip, and the response of the vehicle speed. Conventional transverse stability strategies for Distributed Drive Electric Vehicles (DDEV) are usually implemented by means of a torque distribution strategy [14][15][16]. To ensure the robustness of the vehicle system, the conventional control algorithm is usually optimized [17][18][19]. For example, Eman Mousavinejad has developed an integrated vehicle dynamics control algorithm that improves the transient response of vehicle yaw rate and side slip angle tracking controllers using both integral and non-singular fast terminal sliding mode (NFTSM) control strategies [20]. Carrie G. Bobier-Tiu and Craig E. Beal extend the application of phase diagrams in vehicle dynamics to control synthesis by illustrating the relationship between the boundaries of stable vehicle operation and the state derivative contours of the yaw rate-slippage phase plane because of their high fidelity in capturing planar stability characteristics [21]. Some people designed a BP-PID controller based multi-model control system (MMCS) for DDEV by direct yaw control (DYC), which ensured the lateral stability of DDEV under different road adhesion coefficients [22].
As one of the most popular vehicle active safety systems, acceleration slip regulation (ASR) is widely used in distributed drive electric vehicles to improve vehicle acceleration performance [23,24]. Guodong Yin proposes an accelerated slip regulation (ASR) algorithm based on a fuzzy logic control strategy to keep the wheel slip rate within the optimum range by dynamically adjusting the motor torque [25]. A new robust adaptive algorithm based on a state observer is designed to achieve tracking control of wheel slip rates [26]. In view of the long braking time of the existing wheel slip rate control method, the obvious gap between the slip rate and the optimal slip rate, and the poor control effect, the fuzzy algorithm is introduced to design the wheel slip control method to improve the control effect [27].
Distributed-drive electric vehicles use four hub motors to drive four wheels, each of which can be controlled independently. It is particularly important that each wheel speed is coordinated during the drive, which ensures the stability of the vehicle as it accelerates to the desired speed. A robust control method is used to control the permanent magnet synchronous motor, controlling and maintaining the vehicle speed and motor torque within the driver's desired reference range [28].
To ensure the stability of distributed drive electric vehicles in a straight line, three conditions have to be fulfilled: (1) Yaw stability (2) The slip rate is in a safe area (3) speed follows desired speed Regardless of whether it is a traditional car or an in-wheel motor-driven electric car, most of the research studies on the control of motion stability use a single variable to optimize the control algorithm. Although it brings performance improvements in this area, it still affects other variables. As a multi-variable coupling system, the vehicle system's lateral movement, slip rate, and speed are all regulated by the driving torque, which makes the distribution of the driving wheel torque very difficult. Therefore, the control process must consider the problem of kinematic coupling to achieve the optimal distribution of wheel drive torque to ensure that each variable can reach the optimal state.
For this reason, this paper selects the yaw rate, slip rate, and vehicle speed as the control variables, and designs the four-wheel hub motor-driven electric vehicle straightdriving stability decoupling optimal control system to ensure the stability of the vehicle in the straight-line driving process. It is an innovation that strives to achieve a balance between the multiple variables of the vehicle system. Working conditions such as high and low adhesion coefficient roads and split roads have verified the effectiveness of the control system. The symbols and meanings involved in this formula are shown in Table 1.

Vehicle Stability Analysis in a Straight Line
As shown in Figure 2, the vehicle is running in a straight line with the front wheels turning at an angle of 0. When the driving forces of the wheels on both sides of the vehicle are not balanced, assuming F xrl + F xrr > F x f l + F xrl , the longitudinal driving force of the wheels on both sides will produce a counterclockwise torque around the center of mass axis. To achieve a state of kinematic equilibrium, the tire is sideways deflected and the lateral force on the front axle of the wheel will generate a clockwise moment around the center of mass axis to counteract the increase in angular velocity of the transverse pendulum. With the increase of tire lateral force, the torque generated by longitudinal and lateral forces of the wheel around the centroid axis is balanced. This process will produce a non-zero yaw rate and lateral velocity, causing the vehicle to continue to run off track.
In addition, when the vehicle is running on a low-adhesion road, the wheel driving torque can easily exceed the maximum torque provided by the road, causing excessive wheel slip, and the vehicle's ability to resist lateral interference is weakened, even if it is subjected to a small lateral force. The wheels will also slip, making the vehicle unable to drive stably, and aggravate the deviation of the vehicle. Therefore, the reason for the deviation of the vehicle in a straight line is the imbalance of the driving force of the wheels on both sides of the vehicle, which causes the vehicle to produce yaw rate, which causes the vehicle to yaw and deviate from the predetermined trajectory. Especially when the wheels are excessively slipped, the vehicle will slip. With a loss of stability, the amount of deviation will further increase. In addition, when the vehicle is running on a low-adhesion road, the wheel driving torque can easily exceed the maximum torque provided by the road, causing excessive wheel slip, and the vehicle's ability to resist lateral interference is weakened, even if it is subjected to a small lateral force. The wheels will also slip, making the vehicle unable to drive stably, and aggravate the deviation of the vehicle. Therefore, the reason for the deviation of the vehicle in a straight line is the imbalance of the driving force of the wheels on both sides of the vehicle, which causes the vehicle to produce yaw rate, which causes the vehicle to yaw and deviate from the predetermined trajectory. Especially when the wheels are excessively slipped, the vehicle will slip. With a loss of stability, the amount of deviation will further increase.

Vehicle Model
Complete vehicle dynamics modelling with Carsim2019.0. The object of study in this paper is a hub motor-driven electric vehicle, whose transmission structure does not include transmission components such as engine, gearbox and differential. As shown in Figure 3, when building the distributed drive system, the torque source for each wheel was disconnected from the conventional powertrain and all external interface inputs were used in order to be able to control the drive/brake torque of the four-wheel motors in real time. The drivetrain (hub motor model) for this paper was built in the software MATLAB/Simulink, and the vehicle dynamics model was refined through a communication interface in both software.

Vehicle Model
Complete vehicle dynamics modelling with Carsim2019.0. The object of study in this paper is a hub motor-driven electric vehicle, whose transmission structure does not include transmission components such as engine, gearbox and differential. As shown in Figure 3, when building the distributed drive system, the torque source for each wheel was disconnected from the conventional powertrain and all external interface inputs were used in order to be able to control the drive/brake torque of the four-wheel motors in real time. The drivetrain (hub motor model) for this paper was built in the software MAT-LAB/Simulink, and the vehicle dynamics model was refined through a communication interface in both software.

Wheel Hub Motor Matching Calculation
In this paper, the simulated outer rotor permanent magnet synchronous motor is used as the hub motor of the vehicle. According to the vehicle parameters in Table 2, the vehicle power transmission system matching design is carried out. The demand power formula of the vehicle in any kind of driving condition is as follows [29]:

Wheel Hub Motor Matching Calculation
In this paper, the simulated outer rotor permanent magnet synchronous motor is used as the hub motor of the vehicle. According to the vehicle parameters in Table 2, the vehicle power transmission system matching design is carried out. The demand power formula of the vehicle in any kind of driving condition is as follows [29]: (1) In the formula, P t is the required power for driving of the vehicle; M is the curb weight of the vehicle; f is the rolling resistance coefficient of the vehicle; g is the acceleration of gravity; C D is the air resistance coefficient; A is the windward area of the vehicle; u is the speed of the vehicle; δ is the conversion factor of rotational inertia; η is the mechanical transmission efficiency; i is the road gradient.
By setting the parameters, f = 0.01, C D = 0.32, A = 1 m 2 , η = 0.9. To make the powertrain meet the conditions: Calculated from Equation (1): At the same time the powertrain needs to meet the vehicle's maximum climbing requirements, when the vehicle is climbing at speed u ≥ 30 km/h on a road with a gradient angle i ≥ 30 • .
Calculated from Equation (1): In addition, the maximum speed of the hub motor needs to meet the maximum speed target of the vehicle.
where u is the vehicle speed, u max is the maximum vehicle speed, P is the wheel hub motor demand power, and n max is the maximum wheel hub motor speed. Based on the above calculations, a hub motor was selected with the parameters shown in Table 3.  Pure mathematical approach to hub motor modelling: the maximum drive torque of the wheel hub motor can be calculated using the S-function in MATLAB and compared with the torque calculated for each drive wheel by the control strategy. When the maximum drive torque of the hub motor is large, the calculated drive wheel torque is output; when the maximum drive torque of the hub motor is small, the maximum drive torque is output.

CarSim Vehicle Model Straight-Line Driving Capability Validation
The vehicle power system establishes a vehicle longitudinal speed following module based on a PID controller, based on the driver's desired speed expectation, the longitudinal drive force is calculated in real time and distributed equally among the four drive motors (this drive method is referred to as the no controlled model in the simulation).
After completing the vehicle dynamics model based on CarSim2019.0 software, the vehicle's ability to drive in a straight line needs to be verified to ensure the accuracy of the vehicle modelling.
The         As a result, the vehicle has good straight-line performance and can be used to verify the validity of the algorithm.

Decoupled Optimal Control of Straight-Line Driving Stability Control System Architecture Design
Yaw rate is one of the best state variables to describe the stability of a vehicle's chassis motion, and wheel slip rate refers to the ratio of the difference between the theoretical and actual speed of the vehicle to the theoretical speed. The slip ratio affects both average speed and energy consumption.
In this paper, Yaw rate is taken as the control variable of the transverse pendulum motion and the wheel speed is taken as the control variable of the slip rate, and the joint decoupling control of Yaw rate and slip rate is carried out, and finally the drive force based on the speed following control is optimally distributed. First, the desired yaw rate is determined; the desired yaw torque increment is calculated in real time by the yaw motion model prediction controller; First, the desired yaw rate ω d is determined; the desired yaw torque increment ∆Mz is calculated in real time by the yaw motion model prediction controller; then, the corresponding expected wheel speed 1 through the optimal slip rate w ref of the current road surface is obtained, the gain torque ∆T ij of each wheel is obtained by PID control method; Then, the yaw torque increment and the wheel drive anti-skid gain torque are jointly controlled and decoupled to obtain the torque increments ∆T f l , ∆T f r , ∆T rl , ∆T rr of the four driving wheels; Finally, the generalized drive force of the whole vehicle is found by sliding mode control according to the desired vehicle speed, based on the quadratic programming algorithm of tire utilization rate, the generalized driving force is optimally allocated.
Thus, the final driving torques T f l + ∆T f l , T f r + ∆T f r , T rl + ∆T rl , T rr + ∆T rr are obtained; to complete the closed loop control, they are input into the complete vehicle model. The whole control process is shown in Figure 7.
motion, and wheel slip rate refers to the ratio of the difference between the theoretical and actual speed of the vehicle to the theoretical speed. The slip ratio affects both average speed and energy consumption.
In this paper, Yaw rate is taken as the control variable of the transverse pendulum motion and the wheel speed is taken as the control variable of the slip rate, and the joint decoupling control of Yaw rate and slip rate is carried out, and finally the drive force based on the speed following control is optimally distributed.
First, the desired yaw rate is determined; the desired yaw torque increment is calculated in real time by the yaw motion model prediction controller; First, the desired yaw   Figure 7. Decoupled optimal control system framework.

Expectation Model
Assuming the vehicle is travelling in a straight line with no wheel slip, constant longitudinal speed, little lateral acceleration and tire lateral deflection characteristics in a linear range, the vehicle is in equilibrium after neglecting lateral, pitch, longitudinal and vertical movements.
The control of the yaw motion is controlled by the additional driving force and torque generated by the hub motor on the driving wheels.
Its equation of state: .
In the formula,

Design of the Model Predictive Controller
The state Equation (8) is discretized using the forward Euler method. .
Take the system state predicted in the next ρ control cycle as follows: The control quantities in the predicted time domain are: Through the discretized state equation, the system state in the next ρ control cycles is predicted in turn: Among them, define an optimization objective function in terms of the cumulative error between the predicted state vector and the reference value.
In the formula, T L is the maximum remaining driving torque. The quadprog function of the MATLAB toolbox can be used to solve the control input increment U(k) at time k.
In the formula, U(k) is ∆Mz. At this point, the yaw torque increment can be obtained.

Design of Acceleration Slip Controller
When the wheels are in excessive slip, the vehicle will slip sideways even when subjected to a small lateral force and thus lose stability. Therefore, when the wheel slip rate exceeds the optimal slip rate S OPT , the wheel is considered to have excessive slip, and the wheel speed needs to be controlled by driving torque to make the wheel run within a stable range.
The slip rate equation is [30,31]: Equations (16) and (17) show the input-output relationship between speed and slip rate, and pid control is simpler and more efficient in processing this relationship [32][33][34][35]. When the wheel slip rate exceeds the optimal slip rate, the actual wheel speed is greater than the expected wheel speed. At this time, the wheel slips excessively. The PI controller is used to control the wheel speed to obtain the adjusting torque ∆T sij .
when the wheel slip rate is less than the optimal slip rate, the actual wheel speed is less than the expected wheel speed, the wheel does not slip excessively, and it is in a normal state. The adjustment torque ∆T sij = 0.

Yaw Movement Bottom Control
The resulting force analysis of the entire vehicle plane motion is shown in Figure 8. ∆F x f l , ∆F x f r , ∆F xrl , ∆F xrr are the drive force increments of the four wheels and α 1 , α 2 , α 3 , α 4 are the lateral deflection angles of the four wheels.  The additional yaw moment obtained is distributed by the vertical load proportion of the front and rear axles.

Slip Rate Bottom Control
The drive to each wheel is distributed according to the regulated torque of the individual wheels. The additional yaw moment obtained is distributed by the vertical load proportion of the front and rear axles.

Slip Rate Bottom Control
The drive to each wheel is distributed according to the regulated torque of the individual wheels.
Drive force increment of left front wheel: Drive force increment of right front wheel: Drive force increment of left rear wheel: Drive force increment of right rear wheel:

Decoupling Control
Since the control of yaw rate and slip rate is derived from the driving force and torque of the wheels, it is necessary to perform joint control and necessary control decoupling in the bottom distribution of torque.
The decoupling is done as follows.
Rewrite Equations (19)- (23) in matrix form as: v =Bu Among them, v = ∆Mz ∆T T , u = ∆F xfl ∆F xfr ∆F xrl ∆F xrr T , The torque constraints of the hub motor need to be taken into account when actually distributing the motor torque.
where T dmax is the maximum residual braking torque and T lmax is the maximum residual driving torque, i =1, 2, 3, 4. Under the constraints of Formula (25), the formula may not have a solution. To ensure that the problem can be solved, the Formulas (24) and (25) are combined as: where Ω is the domain of feasible solutions and W is the control weights such that, W= diag w 1 w 2 , and w 1 , w 2 are the weights controlling yaw rate and slip rate. After obtaining the driving force increments ∆F xfl , ∆F xfr , ∆F xrl , ∆F xrr of each driving wheel, the driving torque increments of each driving wheel ∆T f l , ∆T f r , ∆T rl , ∆T rr can be obtained by Formula (27): In this way, the final drive torque increment assigned to each wheel is obtained and input into the vehicle model.

Optimal Distribution of the Generalized Drive Torque
Vehicle longitudinal speed Equation [36]: In the formula, v, u, ω are the longitudinal, transverse and vertical velocities respectively, ω r , p, q are the yaw rate, roll rate and pitch rate, respectively, M s is the sprung mass.
The vehicle speed is tracked using a sliding mode variable structure control method, using the vehicle longitudinal speed as the sliding mode function for error tracking. get: .
Taking the exponential rate of convergence of the saturation function. .
The control equation is obtained as: The generalized drive force for the whole vehicle drive F x is obtained from Equation (32) to achieve the tracking of the expected vehicle speed.
The longitudinal generalized force is equally distributed to the four driving wheels according to the previous principle of equal distribution, without considering factors such as vehicle axle load transfer, motor and braking system output torque limitations, and road adhesion conditions, which will reduce the robustness of the vehicle stability control system. Therefore, the generalized driving force is optimally allocated, and the optimal value of the driving force of each wheel is solved by the quadratic programming algorithm based on the tire utilization rate [37].
In Equation (33), ρ ij is the tire utilization rate and µ ij is the road adhesion coefficient. The equation for the total longitudinal force on the vehicle is shown below.
In mathematics, nonlinear programming is to solve an optimization problem defined by a set of equations and inequalities (collectively referred to as constraints) consisting of a series of unknown real functions, accompanied by an objective function to be maximized or minimized, just some constraints or the objective function is non-linear. It is the most common method for optimally handling nonlinear problems [38][39][40][41][42][43][44][45][46]. Taking the minimum square sum of all tire utilization rates as the objective function to distribute the force of each tire, it can ensure that each wheel can remain stable and have a certain stability margin The constraints of the objective function are: Equation (37) is expressed as the output limit of the hub motor.
Equation (38) is the pavement adhesion condition limit. According to Equations (36)- (38), the following equations can be obtained: Among them, Finally, the optimal driving forces for each drive wheel F xfl , F xfr , F xrl , F xrr are obtained. The optimal driving torque of each driving wheel can be obtained by Equation (40): In this way, the optimal driving torque allocated to each driving wheel is obtained, and the additional driving torque obtained from decoupling control is input to the vehicle model together to realize the closed loop of the whole system.

Simulation Analysis of Control Effects
The simulation objects are vehicles that use PID to track vehicle speed and evenly distribute torque (marked as "No control"), vehicles based on additional yaw moment control (marked as "Yaw control"), and vehicles with acceleration slip control (marked as "Slip rate control") and decoupling optimally controlled vehicles (marked as "decoupling optimal control").

High Adhesion Pavement Simulation Analysis
The vehicle is simulated on a road with a road surface adhesion coefficient of 1, accelerating from 0 km/h along a straight line to 72 km/h and then maintaining a constant speed.
As shown in Figure 9, under the action of no control, yaw rate control, slip rate control and decoupling optimal control, the speed all reached 72 km/h after 8 s without overshooting.
As shown in Figures 10 and 11, the vehicle yaw rate and deviation (Marked as "displacement in the Y-axis direction") value under the four controls are very small, indicating that the four control methods make the vehicle have a good straight-line driving ability on a high-adhesion road.
The vehicle is simulated on a road with a road surface adhesion coefficient of 1, accelerating from 0 km/h along a straight line to 72 km/h and then maintaining a constant speed.
As shown in Figure 9, under the action of no control, yaw rate control, slip rate control and decoupling optimal control, the speed all reached 72 km/h after 8 s without overshooting.  As shown in Figures 10 and 11, the vehicle yaw rate and deviation (Marked as "displacement in the Y-axis direction") value under the four controls are very small, indicating that the four control methods make the vehicle have a good straight-line driving ability on a high-adhesion road.  As shown in Figures 12-15, in the four control modes, the front and rear wheel slip rates are maintained in a stable area without excessive slip. As shown in Figures 10 and 11, the vehicle yaw rate and deviation (Marked as "displacement in the Y-axis direction") value under the four controls are very small, indicating that the four control methods make the vehicle have a good straight-line driving ability on a high-adhesion road.  As shown in Figures 12-15, in the four control modes, the front and rear wheel slip rates are maintained in a stable area without excessive slip. As shown in Figures 12-15, in the four control modes, the front and rear wheel slip rates are maintained in a stable area without excessive slip.          This shows that all four control methods can guarantee the stability of a four-wheel independent drive electric vehicle driving in a straight line on a high adhesion road.

Low Adhesion Pavement Simulation Analysis
The vehicle was simulated on a road with a road surface adhesion coefficient of 02 . , accelerating from 0 km/h along a straight line to 72 km/h and then maintaining a constant speed.
As shown in Figure 16, the vehicle continues to accelerate to 74 km/h without control and then stabilizes at 72 km / h , with an overshoot of 2.8% ; the speed under slip rate control reaches 73 km / h after11s , with an overshoot of 1.3% , after which the vehicle is driven at 72 km/h ; under yaw speed control, the vehicle speed reached 73.8 km/h after11 s , then stabilized at 72 km/h , and the overshoot was 2.5% ; under the decoupling optimal control, the vehicle speed reaches 72 km/h in 11 s , and then it keeps driving at a constant speed. Decoupled optimal control for vehicle speed following is more accurate and smoother than no control, slip rate control, and crossswing angular speed control. As shown in Figures 17 and 18, the yaw rate and deviation of the vehicle under the four control modes are in a small range, and the vehicle has a good straight-line driving ability.  This shows that all four control methods can guarantee the stability of a four-wheel independent drive electric vehicle driving in a straight line on a high adhesion road.

Low Adhesion Pavement Simulation Analysis
The vehicle was simulated on a road with a road surface adhesion coefficient of 0.2, accelerating from 0 km/h along a straight line to 72 km/h and then maintaining a constant speed.
As shown in Figure 16, the vehicle continues to accelerate to 74 km/h without control and then stabilizes at 72 km/h, with an overshoot of 2.8%; the speed under slip rate control reaches 73 km/h after 11 s, with an overshoot of 1.3%, after which the vehicle is driven at 72 km/h; under yaw speed control, the vehicle speed reached 73.8 km/h after 11 s, then stabilized at 72 km/h, and the overshoot was 2.5%; under the decoupling optimal control, the vehicle speed reaches 72 km/h in 11 s, and then it keeps driving at a constant speed. Decoupled optimal control for vehicle speed following is more accurate and smoother than no control, slip rate control, and cross-swing angular speed control. This shows that all four control methods can guarantee the stability of a four-wheel independent drive electric vehicle driving in a straight line on a high adhesion road.

Low Adhesion Pavement Simulation Analysis
The vehicle was simulated on a road with a road surface adhesion coefficient of 02 . , accelerating from 0 km/h along a straight line to 72 km/h and then maintaining a constant speed.
As shown in Figure 16, the vehicle continues to accelerate to 74 km/h without control and then stabilizes at 72 km / h , with an overshoot of 2.8% ; the speed under slip rate control reaches 73 km / h after11s , with an overshoot of 1.3% , after which the vehicle is driven at 72 km/h ; under yaw speed control, the vehicle speed reached 73.8 km/h after11 s , then stabilized at 72 km/h , and the overshoot was 2.5% ; under the decoupling optimal control, the vehicle speed reaches 72 km/h in 11 s , and then it keeps driving at a constant speed. Decoupled optimal control for vehicle speed following is more accurate and smoother than no control, slip rate control, and crossswing angular speed control. As shown in Figures 17 and 18, the yaw rate and deviation of the vehicle under the four control modes are in a small range, and the vehicle has a good straight-line driving ability. As shown in Figures 17 and 18, the yaw rate and deviation of the vehicle under the four control modes are in a small range, and the vehicle has a good straight-line driving ability.  However, it is clear that yaw rate control is more effective than slip rate control and that slip rate control is even less effective than no control at all, compared with the other three control methods, the decoupled optimal control significantly reduces the large fluctuation of yaw velocity during the acceleration stage.
Under the decoupling optimal control, the vehicle deviation is basically 0 , which improves the control effect by an order of magnitude compared with the other three control methods.
As shown in Figure 19, the wheels slip quickly without control and under the control of the yaw rate, and the slip rate rises rapidly. Under the action of slip rate control, although the wheel is also in a slipping state, the peak value drops by 10% . Compared with the previous two control methods, it enters a safe state 0.5 s earlier. Under the action of decoupling optimal control, the slip rate of front and rear wheels is always maintained in the safe area. This shows that the decoupling optimal control can greatly improve the degree of wheel slip on low adhesion roads and ensure the stability of the vehicle.  However, it is clear that yaw rate control is more effective than slip rate control and that slip rate control is even less effective than no control at all, compared with the other three control methods, the decoupled optimal control significantly reduces the large fluctuation of yaw velocity during the acceleration stage.
Under the decoupling optimal control, the vehicle deviation is basically 0 , which improves the control effect by an order of magnitude compared with the other three control methods.
As shown in Figure 19, the wheels slip quickly without control and under the control of the yaw rate, and the slip rate rises rapidly. Under the action of slip rate control, although the wheel is also in a slipping state, the peak value drops by 10% . Compared with the previous two control methods, it enters a safe state 0.5 s earlier. Under the action of decoupling optimal control, the slip rate of front and rear wheels is always maintained in the safe area. This shows that the decoupling optimal control can greatly improve the degree of wheel slip on low adhesion roads and ensure the stability of the vehicle. However, it is clear that yaw rate control is more effective than slip rate control and that slip rate control is even less effective than no control at all, compared with the other three control methods, the decoupled optimal control significantly reduces the large fluctuation of yaw velocity during the acceleration stage.
Under the decoupling optimal control, the vehicle deviation is basically 0, which improves the control effect by an order of magnitude compared with the other three control methods.
As shown in Figure 19, the wheels slip quickly without control and under the control of the yaw rate, and the slip rate rises rapidly. Under the action of slip rate control, although the wheel is also in a slipping state, the peak value drops by 10%. Compared with the previous two control methods, it enters a safe state 0.5 s earlier. Under the action of decoupling optimal control, the slip rate of front and rear wheels is always maintained in the safe area. This shows that the decoupling optimal control can greatly improve the degree of wheel slip on low adhesion roads and ensure the stability of the vehicle. Energies 2021, 14, x FOR PEER REVIEW 20 of 25 Figure 19. Slip rate.

Simulation Analysis of Split Roads
In order to further verify the control effect, get more obvious control the effect. The vehicle is simulated on a road with a road adhesion coefficient of 0.2 on the left and a road adhesion coefficient of 1 on the right. It accelerates in a straight line from 0 km/h to 72km/h , and then maintains a constant speed.
As shown in Figures 20-22

Simulation Analysis of Split Roads
In order to further verify the control effect, get more obvious control the effect. The vehicle is simulated on a road with a road adhesion coefficient of 0.2 on the left and a road adhesion coefficient of 1 on the right. It accelerates in a straight line from 0 km/h to 72km/h, and then maintains a constant speed.
As shown in Figures 20-22, in the no controlled mode, the vehicle continues to accelerate until 72 km/h, and then the vehicle begins to skid on the road, resulting in a serious imbalance in speed. Under the control of slip rate, the vehicle accelerates to 72.8 km/h after 12 s, and the speed overshoots. After that, the vehicle quickly recovers to 72 km/h and keeps a constant speed. Under the yaw speed control, the expected speed is as unstable to follow in the acceleration stage as it is without control. After accelerating to 72 km/h, the vehicle keeps constant speed.       Under the decoupling optimal control, the vehicle accelerates quickly and smoothly to 72 km/h in 11 s, and then maintains a constant speed.
As shown in Figures 23 and 24, the vehicle deviates greatly from the straight track without control. Under the action of slip rate control, the maximum amplitude of vehicle yaw rate is 18 deg/s, and the maximum deviation of vehicle is 0.7 m. Under the action of yaw rate control, the maximum amplitude of yaw rate is 2 deg/s, and the maximum deviation of vehicle is 0.07 m. Under the action of decoupling optimal control, the yaw rate of the vehicle is basically 0, and the vehicle deviation is basically 0. It can be seen that the decoupling optimal control has excellent effect. action of yaw rate control, the maximum amplitude of yaw rate is 2 deg /s , and the maximum deviation of vehicle is 0.07 m . Under the action of decoupling optimal control, the yaw rate of the vehicle is basically 0 , and the vehicle deviation is basically 0 . It can be seen that the decoupling optimal control has excellent effect.  As shown in Figure 25, without control, the left wheel skids rapidly and the slip rate rises rapidly. Later, the right wheel skids rapidly and the slip rate rises rapidly due to the vehicle completely swerving to the left road surface.   As shown in Figure 25, without control, the left wheel skids rapidly and the slip rate rises rapidly. Later, the right wheel skids rapidly and the slip rate rises rapidly due to the vehicle completely swerving to the left road surface.  As shown in Figure 25, without control, the left wheel skids rapidly and the slip rate rises rapidly. Later, the right wheel skids rapidly and the slip rate rises rapidly due to the vehicle completely swerving to the left road surface. Under the control of the slip rate, the peak slip rate of the left front and rear wheels decreased by about 5%, the peak slip rate of the right front and rear wheels decreased by about 10% .
Under the control of yaw rate, the slip rate of the left front and rear wheels is higher than that no control, while the slip rate of the right front and rear wheels remains in the stable zone.
Under the action of decoupling optimal control, the slip rate of left and right front and rear wheels keeps in a stable region.
The results show that the yaw rate control is weaker than the slip rate control, while the decoupling optimal control has the best effect.

Conclusions
(1) Based on the stability analysis of hub motor driven electric vehicle in straight line driving, the cause of vehicle deviation is revealed. (2) Through the motor matching calculation, the carsim vehicle dynamics model is established, and simulation tests are carried out, which proves that the simulation Under the control of the slip rate, the peak slip rate of the left front and rear wheels decreased by about 5%, the peak slip rate of the right front and rear wheels decreased by about 10%.
Under the control of yaw rate, the slip rate of the left front and rear wheels is higher than that no control, while the slip rate of the right front and rear wheels remains in the stable zone.
Under the action of decoupling optimal control, the slip rate of left and right front and rear wheels keeps in a stable region.
The results show that the yaw rate control is weaker than the slip rate control, while the decoupling optimal control has the best effect.