Electronic Differential System Based on Adaptive SMC Combined with QP for 4WID Electric Vehicles

: This study investigates an adaptive differential control system for 4WID (4-wheel-independent-drive) electric vehicles. The novel adaptive system will maneuver the in-dependently operating hub motors without the help of any conventional steering mechanism. The control system consists of a hierarchical structure to confront the vehicle stability condition, which includes a novel SMC (sliding mode control) with a fuzzy algorithm parameter modification to achieve the required virtual control signal at the top level, and a quadratic programming-based torque allocation algorithm at the bottom-level controller. The proposed controller was tested through Simulink/Carsim simulation and experiments. All the test cases showed the advantages of the proposed method over some of the currently existing 4WID control strategies.


Introduction
In recent decades, the world has witnessed a surging focus on EV including both full cell type and hybrid type, which has been widely recognized as a sound strategy for global energy and environmental dilemmas. Compared with internal combustion fuel vehicles, the absence of conventional mechanical transmission grants 4WID EV a lighter structure, better control accuracy and faster response speed, which has triggered a research wave towards 4WID EV stability control solutions. The driving torque of four wheels can be controlled independently, and it provides more possibilities for improving the stability and the handling performance of the vehicle.
In spite of all these advantages, balancing such a vehicle with four independent 4-wheel motors, especially in corners and torque allocation which need a coordinated motor controller, could be the most challenging problem that the designers confront. For solving the problem, an efficient controller along with independent control of each wheel can be used, that can enable the driver to keep the vehicle in the correct direction and also enhance the stability. In recent years, many scholars have proposed novel stability control methods to ensure that the vehicle driving in the steady-state [1][2][3][4]. With the development of advanced technology of vehicle safety and mobility, the 4WID EV has become a prime focus in the automobile industry [5]. A direct yaw moment control strategy was introduced for the four-wheel electric vehicles [6]. A novel embedded engineering control method is included in the proposed process, which successfully overcomes parameter variation [7]. A combined AFS/DYC differential method is used for vehicle lateral stability and vehicle handling performance based on the variation of longitudinal velocity [8]. The pre-designed distribution of control parameters should be related to the vehicle stability boundary [9]. A fuzzy yaw rate and independent wheel slip controllers for 4WID electric vehicle stability control with an artificial network yaw rate reference gen-erator are proposed by [10][11][12][13]. A three-layered vehicle dynamic controller for a 4WID vehicle with DC in-wheel motors is presented in [14]. In this method, a fuzzy logic controller is used to define the desired wheel slips; then, a sliding mode controller drives the DC motors. In [15], the desired yaw moment is achieved by minimizing the cost function. This cost function is defined by using yaw rate and body sideslip angle. Reference [16] uses a fuzzy method to control the motor and hydroelectric brakes to ensure lateral stability in a through-the-road hybrid electric vehicle with an engine in the front axle and an electric motor in the rear axle.
In this article, based on a fuzzy algorithm, an adaptive sliding mode controller, together with QP, is designed to enhance the lateral stability of the 4WID EV under complex road conditions. The main contributions of this paper are introduced as follows: (1) designing a Fuzzy-SMC control strategy for the top-level controller to ensure 4WID vehicle stability and mobility, (2) combining the proposed control method with the QP toque allocation method to optimally distribute the actual control input to actuators individually, (3) basing on the Lyapunov stability method to prove that the introduced differential system achieves asymptotically stable criteria, (4) investigating simulation methods to prove the effectiveness of the proposed control strategy, (5) comparing the proposed method with previously proposed SMC to demonstrate the superiority of the proposed method.
This article is organized as follows. The 4WID EV and actuator fault dynamic model is introduced in Section 2. In Section 3, the control system design for the top-level controller and bottom-level controller is established and the closed-loop system stability is proven. The offline simulation and experimental validations for various different vehicle maneuver strategies and actuator fault cases are described in Section 4. Finally, the conclusion is presented in Section 5.

Vehicle Dynamic Modelling
The stability of EV is mainly determined by lateral motion and yaw motion. The vehicle model is shown in Figure 1, considering the longitudinal motion along with the x-axis direction, the lateral motion along the y-axis direction and the yaw motion around the z-axis. The model contains three degrees of freedom. It is simplified and assumed as follows: Ignore external factors such as wind resistance; ignore the vehicle pitch and roll angles; assume that the wheel tracks are equal and the mechanical properties of the tire are the same; assume that the front wheel angles are equal.
Vehicle lateral motion equation Vehicle yaw motion equation where is the complete vehicle mass, is the speed along the x-axis, is the longitudinal acceleration, is the speed along the y-axis, is the lateral acceleration, r is the yaw rate, and are the longitudinal and lateral forces of the tire respectively ( = 1,2,3,4), is the moment of inertia around the z-axis, a and b are the distance from the centroid to the front and rear axles respectively, and is the wheel track, δ is the front wheel angle.
With the longitudinal acceleration ax and lateral acceleration ay being easily measured by inertial sensors, the normal load of each tire can be calculated as follows: where is the tire load, and ℎ are wheelbase and centroid height of vehicle respectively, and is the track width between the front and rear wheels of the vehicle, g is the acceleration of gravity.
The slip ratio of the four tires is calculated as follows: where ui is the speed of each wheel center, and the calculation formula is as follows: To estimate the tire lateral force, it is essential to have the slip angle of each tire, which can be calculated as follows: where, is the vehicle longitudinal velocity and is the vehicle lateral velocity. and can be estimated by various observers. In this paper, it is assumed that the lateral/longitudinal speed signals have no time delays.

Tire Model
To achieve the desired total yaw moment in the torque allocation, it is important to guarantee that the tire forces do not exceed the limitations of tire-road friction. The maximum tire longitudinal force and lateral force are inherently coupled, and the behaviour can be described by the friction ellipse concept as a simplification.
According to the wheel dynamics model shown in Figure 2, the balance equation of wheel rotational motion moment can be obtained from the force condition. where is the equivalent moment of inertia of the electric wheel, including the moment of inertia of the wheel and hub-motor.
In torque allocation, the upper bound of admissible motor torque is determined by the maximum achievable tire longitudinal force. According to the friction ellipse concept, it is necessary to first estimate the tire lateral force which is a complex nonlinear function of tire normal force, slip angle, and tire-road friction coefficient. With tire normal force and slip angle, and assuming that the tire-road friction coefficient is known or can be estimated, the Magic Formula [17] tire model of the following expression is adopted: where is the stiffness factor, is the shape factor, is the peak factor, E is the curvature factor.

Controller Designs
The calculation flow diagram of the introduced control method, which consists of two parts-a high-level controller, and a low-level controller-is shown in Figure 3. The high-level controller is designed to determine the desired dynamics, namely, a longitudinal reference speed and a reference yaw rate signal. The desire dynamics are calculated based on the driver inputs, sensor signals, and driving conditions. In this paper, a new sliding mode control method is proposed and the high levelcontroller is designed based on this SMC method. The proposed SMC method is more robust and faster than the classic SMC. The low-level controller is designed to obtain the front and rear driving motors torques. At this level, torque distribution between the driving motors is carried out optimally, based on QP.

Reference Model
A two-degree of freedom vehicle model is used to study the ideal working condition and determine the target yaw rate. A linear 2-DOF vehicle model is shown in Figure 4. Assuming that the body is rigid and supported on the ground by two lateral elastic tires, its longitudinal forward speed is regarded as constant and it has two degrees of freedom of lateral and yaw motion. In addition, the adhesion coefficient between the tire and the road is good, and the tire cornering characteristics are in the linear range.
where is the equivalent lateral stiffness of the front and rear wheels, is the sideslip angle of the center of mass, is the yaw rate, is the vehicle yaw angle, is the moment of inertia of the car around the z-axis. Thus, the mathematical expression of yaw rate is deduced: where is the ideal target yaw rate. Lateral acceleration should follow corresponding friction ellipse when the vehicle is driving: where μ is the tire lateral adhesion coefficient, is the acceleration of gravity. According to the relationship between lateral acceleration and yaw acceleration: Assuming the ideal uniform speed of the vehicle, the yaw speed range: Then the value of the target yaw rate is derived as follows:

Adaptive SMC
SMC is a widely applied [11,13,18] nonlinear control method. Traditional sliding mode control is insensitive to parameter changes and disturbances. In practical engineering, even if the mathematical model is determined under certain conditions, its dynamic parameters and model structure often change after the working conditions and environmental conditions change. The traditional controller parameters cannot meet the control problems caused by environmental changes when the plant model is little known or the environmental conditions change dynamically. Therefore, to improve the traditional sliding mode control, adaptive sliding mode control is the organic combination of sliding mode control and adaptive control to solve the control problem of parameter uncertainty.
The first step in designing a sliding mode controller is determining the sliding surface. In order to track the desired center of mass lateral deflection and yaw rate, the sliding surface has to take the sideslip angle and yaw angle into consideration, which is used for analysis and control design. Namely: where stands for the Weighting coefficient, usually meaning the Exponential approach speed.
In this paper, the switching surface dynamics are chosen as follows: In the formula, the constant ε can be used to describe the velocity of any moving point moving to the sliding surface, and ̇= − is the index approach term. In order to reduce the chattering, we can increase ε and decrease at the same time.
The yaw motion equation of the vehicle is as follows: Consider the linear tire force, i.e., the lateral force is the product of the cornering stiffness and the cornering angle. The expression is as follows: According to the above formula, after adding the front and rear side deflection forces, the same items can be combined, and the below equation can be conducted: where we can design the weight coefficient as follows: From Equation (2), the following equation can be inferred: from which the vehicle axle lateral stiffness can be written as: The upper controller of the system, which calculates the yaw moment required for stability according to the vehicle reference trajectory. When the vehicle is running in the limit condition, the load of the rear axle is transferred to the front axle, and the load of the inner wheel is transferred to the outer wheel, which makes the structural parameters of the vehicle such as the lateral stiffness constantly change.
Basically, the vehicle axle lateral stiffness varies dramatically from −160,000 N/rad to −60,000 N/rad when encountering different road conditions and driving habits, which could, apparently, hugely affect the normal calculation of conventionally designed SMC controller. Considering the uncertainty of the three parameters, ξ ξ ξ , the defect of control accuracy is incurred. The traditional sliding mode variable structure controller cannot solve this nonlinear problem, so the adaptive control law is introduced to compensate for the uncertainty of the system.
To compensate for the uncertainty, five sets of SMC Weighting Coefficient are predesigned, each containing three parameters, , , , as shown in Figure 5. Correspondently, five identical switching indexes B are introduced here, each representing one specific set of the SMC Weighting Coefficient.

1
φ1 ε1 λ1 2 φ2 ε2 λ2 3 φ3 ε3 λ3 4 φ4 ε4 λ4 5 φ5 ε5 λ5 Considering that the SMC Weighting Coefficient is switching based on the continuous varying of vehicle axle lateral stiffness, the front and rear axle, a fuzzy controller is designed to conduct the switch priority. This is shown in Figure 6. In this paper, the front axle lateral stiffness and the rear axle lateral stiffness are taken as the basic domain of input variables, and its membership function and the membership function of the switching indexes, which is the fuzzy output, constitute the required three membership functions. The commonly used triangular membership function and trapezoidal membership function are adopted.
The fuzzy algorithm is used to calculate the switching index B. After a large number of experimental adjustments, the domain of front axle lateral stiffness is [−140,000, −40,000], which is divided into five fuzzy sets: negative (N), middle (ZO), positive small (PS), positive middle (PM) and positive large (PB). The domain of rear axle lateral stiffness is set as [−140,000, −40,000], which is divided into five fuzzy sets: negative large (NB), negative small (NS), zero (ZO), positive small (PS) and positive large (PB). The domain of switching index B is set as [1,5], which is divided into five fuzzy sets: less than (BB), slightly less than (BS), approximate to (ON), slightly greater than (AS) and relatively greater than (AB). After simulation analysis, the range of input value of fuzzy algorithm is the same as that of the corresponding universe, so scale transformation is needed to fuzzily generate the precise value of membership function according to the design. The membership function of input and output of fuzzy algorithm adopts triangle membership function, as shown in Figure 7. The fuzzy rules are shown in Table  1.  The basic idea of establishing the fuzzy inference rules is shown in Table 1: the lateral stiffness of the shaft describes the response sensitivity of the lateral force to the wheel angle. The greater the front axle stiffness value, the greater the adjustment margin of the controller parameters. In order to improve the performance of the controller, the switching index B can be increased appropriately; from the perspective of vehicle acceleration safety, in order to ensure the stability of fare adjustment, the greater the rear and front axle stiffness value, the more it is necessary to suppress the adjustment speed of controller parameters, and the smaller the switching index B. Since Equation (34) is negative definite, it can be concluded that the closed-loop system is asymptotically stable.
From the above deduction, the final control law can be written as follow:

Torque Allocation
It is known that the 4WID-EV is a redundancy control system. There are numerous strategies for the driving torques to generate the total yaw moment ΔMz generated by the upper-level controller. There is a certain existence of control allocation methods that can determine the optimal solutions. Tire force, or the ratio of tire force and tire normal load, is selected as the optimization objective to guarantee the adhesion margin of each wheel. The optimal solution is obtained by a rule-based calculation or solving a linear matrix equation. Quadratic forms which consider generalized control effect and/or actuator control efforts were chosen as cost functions, and general quadratic programming techniques or improved algorithms for low computational burden were adopted.
Different cost functions are designed based on different optimization objectives. Generalized control effect errors and actuator control efforts are generally considered by most researchers. For vehicle motion control, the tire-road friction is also an important factor. To guarantee good adhesion potentials, the tire force of each tire should stay away from the boundary of the corresponding friction ellipse, as shown in Figure 8. Therefore, the objective of the torque allocation algorithm in this paper is to find an optimum combination of motor torque that can simultaneously satisfy the total yaw moment demand, minimize the control efforts, and equally utilize the adhesion of each tire. Elliptic curve equation of tire adhesion: Therefore, the torque allocation is transformed to a quadratic programming (QP) problem with constraints. Optimization objective function can be written as follows: where Wu is the weight coefficient matrix, which determines the weight relationship between the longitudinal forces distributed by each wheel, is the weight matrix of allocation demand.
The sequential least squares programming problem can be transformed into a weighted least-squares problem.
With the total yaw moment being achieved by the torque of each in-wheel motor, the discrete-time model with the actual control efforts can be obtained by substituting Equation (39) into Equation (43):

Simulation and Experimental Validation
To validate the introduced strategy, both Carsim-Matlab/Simulink simulations and platform EV experiments are carried out. Software simulation is carried out via MATLAB and Carsim, whereas experimental verification is based on the AD5436 EV platform, based on which the vehicle is tested on the experimental ground.

Numerical Simulations
In this section, numerical simulations were carried out using both Matlab/Simulink and Carsim environments. First of all, the proposed strategy models are built-in Simulink, which contains a reference model, novel adaptive SMC and QP toque allocation method. A 4WID EV is built in the Carsim at the same time, which serves as a virtual controlled object.
In order to verify the effectiveness of the proposed stability control system, a closed-loop double lane shift test is carried out at 120 km/h. The road adhesion coefficient is 0.8, and the driver has no active acceleration or deceleration operation [19]. In the simulation, the stability controller based on differential braking is added as a comparison. The DLC path in Figure 9 is a double-line shifting trajectory, and the test results are shown from Figures 9-12. In the simulation, as shown in Figure 6, the traditional SMC control vehicle failed to complete the double line shifting test, and the new SMC control vehicle completed the double line shifting test without pole collision or instability. As shown in Figure 11, the yaw rate response of the new SMC control vehicle is ideal, the lateral acceleration response is in the ideal range, and the variation trend of the sideslip angle of the mass center is reasonable. However, the speed decreases greatly, as shown in Figure 10. The reason is that only relying on the braking force to generate the yaw moment will inevitably lead to a decrease in the speed, and the same amount of yaw moment will be generated, which requires greater braking force [20]. The results show that there is little difference between "stability control based on differential braking" and "stability control based on quadratic programming", and the latter is slightly better; the variance of lateral acceleration indicates the possibility of rollover, and the latter has stronger ability to resist rollover; furthermore, the former is less busy when steering, because the differential braking reduces the speed. Compared with the lateral force acceleration in Figure 12, the latter has certain advantages, indicating that it has a higher lateral stability margin. Through the overall evaluation index results, the new SMC control strategy has more obvious advantages and better comprehensive performance.

Experimental Validation
In the experimental validation process, the control strategy is implemented in the Simulink environment ( Figure 13) at first; then, the corresponding .c .h files are generated according to the Simulink model through RTW, which are ready to be downloaded to the AD5436 platform (This device is a general controller that can be used for high-speed measurement and custom control program execution) to serve as a vehicle IPC. The AD5436 systems run in real-time.  Figure 22 shows the block diagram of the experimental setup. As indicated in the figure, the proposed control algorithm is implemented in the AD5436 processor, whereas the vehicle dynamic model is replaced by our new vehicle dynamic testing platform (EV). The actual control input u is sent through the I/O module, physically planted on the AD5436, and is received by the I/O module of the vehicle throng the local CAN communication system. The yaw rate and sideslip angle will be sensed and sent back to the controller to close the loop, as shown in Figure 13. Note that the entire local CAN communication protocol is set up prior.
The experimental condition is set as a fixed speed of 30 km/h, and the fixed torque is applied to the steering wheel after 2 s. Compared with the traditional SMC control effect, the influence of the control strategy on the low-speed steering vehicle is verified.
By analyzing the above simulation results, it can be seen that after adding the new SMC control strategy, due to the compensation for the changes of the front and rear cornering stiffness, the power torque generated after acting on the steering system is more accurate, and the accuracy of the steering angle based on the vehicle condition is improved. The simulation results are shown in Figure 14. Compared with the traditional SMC control strategy, after adding the parameter self-tuning method based on the fuzzy algorithm, the driving stability of the whole vehicle is improved, and the lateral speed of the vehicle is reduced under the same vehicle conditions, as shown in Figure 15. The yaw rate is also optimized, as shown in Figure 16. The slip rate calculated according to the wheel speed is shown in Figures 17 and 18. The slip rate of the left rear wheel decreases greatly, and the change of the slip rate is more stable. Further, the torque coordination is more stable.     At the initial speed of 120 km/h, the deceleration double lane shifting test is carried out, and the braking torque of 30 n·m is always applied to each wheel to simulate the deceleration and obstacle avoidance conditions in the double lane shifting [18]. The vehicle controlled by traditional SMC is directly unstable, as shown in Figure 19, and the double lane shifting test is not completed; the vehicle equipped with the new SMC control strategy ensures the driving stability of the vehicle, and successfully completes the double lane shift test [19]. The vehicle equipped with stability control based on quadratic programming accelerates smoothly, as shown in Figures 20 and 21, which ensures the driving stability of the vehicle and successfully completes the double lane shift test.

Conclusions
In order to improve the dynamic performance and stability of the electric vehicle during changes in road topology, a new adaptive SMC strategy is introduced, which, based on a fuzzy algorithm combined with the QP torque allocation method, is presented for the control of an electric vehicle traction system powered by four individual induction motors integrated in the front and rear wheels. A completely separate AD5436 control platform is accomplished,as shown in Figure 22. The simulation results illustrated the presented controller accuracy in the reference to longitudinal speed and in reference to yaw rate tracking. Moreover, this paper illustrated that the proposed sliding mode control method is more robust, accurate, and fast. In the vehicle dynamics modeling in this paper, only the balance of transverse and longitudinal forces is considered, and a set of control systems is designed, which is apparently inadequate for an actual vehicle operator. In the follow-up research, the embodiment of vehicle vertical balance modeling in controller design will be considered. Funding: 1. Jiangsu Natural Science Foundation (bk20151259), research on anti lock coupling mechanism of motor regenerative braking and hydraulic braking; 2. Suzhou science and technology planning project (sgz2014019) is the development of engine idle stop and start system based on composite energy storage.