Multi-Mode Switching Control Strategy for IWM-EV Active Energy - Regenerative Suspension Based on Pavement Level Recognition

: Aiming at the problems of poor overall vibration reduction and high energy consumption of in-wheel motor-driven electric vehicle (IWM-EV) active suspension on mixed pavement, a multi-mode switching control strategy based on pavement identification and particle swarm optimization is proposed. First, the whole vehicle dynamic model containing active energy-regenerative suspension and the reference model was established, and the sliding mode controller and PID controller designed, respectively, to suppress the vertical vibration of the vehicle and the in-wheel motor. Second, a road grade recognition model based on the dynamic travel signal of the suspension and the road grade coefficient was established to identify the road grade, and then the dynamic performance and energy-feedback characteristics of suspension were optimized by particle swarm optimization. According to the results of pavement identification, the optimal solution of the suspension controller parameters under each working mode was divided and selected to realize the switch of the suspension working mode. The simulation results show that the control strategy can accurately identify the grade of road surface under the condition of mixed road surface, and the ride index of the optimized active en-ergy-regenerative suspension is obviously improved, while some energy is recovered.


Introduction
The electric vehicle market is growing with the increasing environmental pollution, the energy crisis, and the increasing attention to new energy vehicles at home and abroad.Electric vehicles with in-wheel motor have become one of the research hotspots because of their advantages of energy saving, high efficiency, environmental friendliness, compact structure, and independent control of a single wheel [1,2].However, due to the particular arrangement of the in-wheel motor, the sprung mass is large, and because the vertical vibration of the in-wheel motor acts directly on the wheel, the ride comfort of the vehicle deteriorates sharply.J. Van Schalkwyk et al. analyzed the natural frequency of in-wheel motor-driven electric vehicles and their relationship with load.They considered that the ride comfort and handling stability of in-wheel motor-driven electric vehicles are worse than those of centralized-driven electric vehicles, and more, need to be optimized [3].Therefore, it is essential to design and control in-wheel motor-driven electric vehicle suspension systems.The traditional passive suspension system is challenging in meeting the needs of vehicle ride comfort due to the fixed spring stiffness and damping.Compared with the passive suspension, the active suspension can use the controller to adjust the stiffness and damping of the suspension so that its performance is better than the passive suspension.Hrovat found through many simulation analyses and calculations that compared with the passive suspension system; the ride comfort of the spring mass of the active suspension system is improved by less than 20% under the same wheel runout [4].In terms of active suspension configuration, to design an active suspension configuration suitable for an in-wheel motor-driven electric vehicle based on the Macpherson suspension, Chen L and Dong H L et al. changed the single lower control arm into two independent control arms.They obtained a new suspension structure suitable for an in-wheel motor drive [5].Ma Y and Deng Z X et al. applied the Patternsearch function to optimize the in-wheel motor suspension configuration.They obtained the in-wheel motor suspension configuration and its parameters satisfying the conditions of the prototype [6].On the control method of active suspension, extensive research has been carried out at home and abroad; the control strategy involves H ∞ control [7,8], fuzzy [9,10], adaptive [11,12], PID control [13], sliding mode control [14][15][16], and robust control [17], etc.However, most of these control methods are aimed at fuel vehicles or centralized drive electric vehicles.The research on active suspension control strategy for in-wheel motor drive electric vehicles is relatively limited.Moreover, most of the above studies only considered the vibration reduction characteristics of active suspension under a single road level and a fixed vehicle speed; there is little discussion on the damping characteristics of suspension and the high energy consumption of active suspension under mixed pavement.
To solve the problem of high energy consumption of active suspension, more and more attention has been paid to the energy-feeding performance of the suspension itself; the active energy-regenerative suspension has become the focus of suspension research because its active control has good vertical vibration suppression effect and energy recovery function.The control of active energy-regenerative suspension is the basis of energyregenerative research, so the domestic and foreign scholars works on active energy-regenerative suspension control strategy were studied.Chen Y Q and Song P Y et al. set up the dynamic model of 1/4 car-body energy feedback active suspension with parameter perturbation, designed the robust controller of the system based on the μ synthesis method, and made the control effect more robust [18].Chen S A and Guan Y L et al. identified the coulomb damping and the equivalent inertia mass of the actuator; according to the identification results, the nonlinear controller and dynamic model of the energy-regenerative active suspension were designed; on this basis; a double-constrained H2 / H ∞ controller was designed according to the maximum output force of the actuator [19].Wang P and Song P Y et al. proposed a guaranteed cost/H ∞ robust controller design method, according to the Lyapunov function and the working principle of DC motors, the energy balance equation was derived so that the suspension system could achieve energy recovery while effectively reducing vibration [20].Huang K, Yu F et al. carried on the mathematical modeling to the electromagnetic suspension actuator prototype which was developed, and used the main ring/inner ring layered structure to carry on active control to it; it focuses on the vibration suppression of the vehicle suspension system and the vibration energy recovery of uneven road surface [21].Jacek Caban et al. concluded that compared with passenger cars, off-road vehicles, and trucks, EVs have the best performance in energy recovery by using suspension systems, while the potential for fuel saving is as high as 7-10% [22].Therefore, the research on the energy recovery of in-wheel motor-driven electric vehicle suspension systems has particular value.
However, there is little research on active energy-regenerative suspension for inwheel motor-driven electric vehicles at home and abroad.Moreover, the study mentioned above focuses on the energy-feeding and vibration-reducing characteristics of active regenerative suspension under the condition of fixed road surface class and fixed vehicle speed; in fact, the variability of vehicle driving conditions and the switching of the active energy-regenerative suspension mode have an essential impact on the overall performance of the in-wheel motor-driven electric vehicle.These problems still need further indepth exploration and research.
To sum up, based on the dynamic model of the active regenerative suspension of the in-wheel motor drive electric vehicle, this paper proposes a multi-mode switching control strategy combining the road grade and the vehicle speed as the switching index.First, the two-stage suspension structure type of hub motor suspension is selected: primary suspension between the top of the spring and the wheel, secondary suspension between the hub motor unit and the wheel; the sliding mode controller and PID controller are used to actively control the vertical vibration of the primary and secondary suspensions, respectively.Second, the road surface identification model based on the dynamic travel response of the suspension is used to identify the road surface class; then, according to different grades of road and vehicle speed, the working mode of the suspension is divided, and the particle swarm optimization algorithm is used to optimize the parameters of the two controllers in different operating modes.The optimization results are then selected in combination with the road surface identification results and the speed to achieve the switching of suspension operational modes.Finally, the dynamics model is input into the mixed road surface and simulation verification based on the Matlab/Simulink platform.From the simulation results it was found that the dynamic performance of the active energy-regenerative suspension based on the control strategy in this paper has a substantial improvement compared with the passive suspension and the traditional active suspension.At the same time, the effect of recovering energy is also better so realizing the ride comfort and energy saving of in-wheel motor-driven electric vehicles under mixed road conditions.

Active Energy-Regenerative Suspension Model
Establishing a reasonable system of the dynamics model of vehicle suspension is essential for the design and performance analysis of active suspension systems and for studying energy-feedback characteristics [23].As shown in Figure 1, this paper selects the suspension structure type of the in-wheel motor mounted on the wheel [6].The main suspension is between the upper spring and the wheel, and the secondary suspension is between the wheel and the in-wheel motor unit.A schematic diagram of the vehicle suspension dynamics model is established, as shown in Figure 2, and the vehicle model parameters are shown in Table 1.According to Newton's second law, the dynamic equation of the active energy-regenerative suspension of the electric vehicle driven by the in-wheel motor is as follows: where ms denotes the body mass, mu denotes the wheel mass, θ represents the pitch angle, φ represents the roll angle, csij represents the damping of the main suspension, ksi represents the spring stiffness of the main suspension, kti represents the tire stiffness, kdi represents the spring stiffness of the secondary suspension, Fi represents the control force of the main suspension, fi represents the control force of the secondary suspension, Fb represents the vertical force generated by the torque fluctuation of the switched reluctance motor (the subscripts i = 1, 2, 3, 4 represent the left front, right front, left rear, right rear, respectively), df and db represent the distance from the center of mass to the front axle and the rear axle, dl and dr represent the distance from the left and right wheels to the center of mass, and Ix and Iy represent the moment of inertia when the vehicle rolls and pitches.The linear motor actuators M1 and M2 are placed at the main suspension and the secondary suspension, respectively, and the active control force is the output according to the different road surfaces and vehicle speeds.Figure 1 shows the vehicle suspension dynamics model of the in-wheel motor drive electric vehicle.

Motor Vertical Force Model
In this paper, the switched reluctance motor (SRM) is selected as the in-wheel motor, and the SRM motor torque ripple is considered.
According to literature [2,24,25], the vertical force produced by the torque ripple of a switched reluctance motor is the following: where Te is the electromagnetic torque of the in-wheel motor, a is the motor speed, b is the air gap length, R is the stator inner radius, r is the rotor cooling radius, Lmin is the minimum inductance, K is the ratio of inductance to rotor angular displacement, T is the torque ripple frequency, and Nr is the number of rotor poles.i is the motor winding current, n = 1, 2, 3, 4...As shown in Table 2 and Figure 3, the vertical force of the in-wheel motor is due to torque fluctuation during the driving process of the vehicle.

Active Suspension Energy-Regenerative Circuit Model
The executive structure of the electromagnetic active suspension is a linear motor actuator.The linear motor can work as both a motor and a generator because of its fourquadrant working characteristics [26].In this paper, linear motors are installed as actuators at the main suspension and the secondary suspension, respectively.In the process of energy feeding, two actuators are connected in series to form a loop.Its induced electromotive force and induced current can be expressed as below: ( ) ( ) where U0 and U * 0 are the electromotive force of the main suspension and the secondary suspension, respectively, and I0 and I * 0 are the induced current of the main suspension and the secondary suspension, respectively, Ke is the back electromotive force coefficient of the linear motor, R0 is the motor internal resistance.When the linear motor is used as the motor, the main suspension motor electromagnetic power Fi and the secondary suspension motor electromagnetic power fi can be expressed as follows: where Kf is the thrust coefficient.When the linear motor is used as the generator, the equivalent damping Ce is as follows: The voltage at both ends of the capacitor is U1, and the current through the shock absorber is as below: When the linear motor is used as a generator, the energy-feeding circuit is shown in Figure 4. R1 is the load resistance, L1 is the internal inductance, L0 is the external inductance, and the inductance can be ignored in the calculation.The parameters of the energy-feeding circuit model of the linear motor are shown in the following Table 3.

Parameter
Ke

Improved CVD Skyhook Reference Model of Vehicle
In this paper, the vehicle model based on the improved CVD skyhook damping control strategy is selected as the reference model; the damping coefficient is adjustable and connected with the spring in parallel to form a suspension system.The difference from the traditional skyhook control strategy is that the damping coefficient of the shock absorber changes continuously within a certain range and approaches the skyhook damping force to the maximum extent [27]: , () where Fde is the actual damping force, Cmax, Cmin is the upper and lower limits of the damping force coefficient of the suspension.Then the upper and lower limits of the damping coefficient are set to 6000 N/m and 500 N/m, respectively.

Design of Main Suspension Controller
Because of the instability of one side of the car body in three directions (vertical, lateral, and longitudinal), a nonlinear control theory controller is chosen as the central controller.Compared with other nonlinear control theories, the design of the sliding modes in sliding mode control is independent of object parameters and disturbances, it has fast response, is insensitive to parameter change and disturbance (robustness), has no need for system on-line identification, and has simple physical realization.Moreover, the sliding mode control has good robustness to the imprecision of the model itself and the external disturbance.The goal of sliding mode control is to make the system state of the controlled object move along the desired sliding mode surface [28].In this paper, the function of sliding mode control is to make the controlled vehicle's vibration response follow the reference vehicle's vibration response.
The output of the sliding mode controller is defined as uz, ux, and uy, which are the control force and torque required to track the vertical, pitch, and the roll motion of the body spring mass of the CVD improved skyhook reference model, respectively.It is generated by the linear motor actuator M1 and can be expressed as follows: The error vector of the vertical motion of the vehicle sprung mass is as below: where zsr is the vertical displacement of the reference model, and the sliding surface is defined as follows:    ( ) ( ) The output of the sliding mode controller includes two parts, the equivalent control ueq and the switching control usw, namely, The equivalent control output is the following: Fzij is the vertical load of four wheels (ij represents left front, right front, left rear, and right rear, respectively).The switch control output is as given: , sgn( ) The sliding mode control output is as given: Kz is determined by the performance and stability conditions of the actuator.The stability condition of Lyapunov is as given: The role of the equivalent control uz, eq is to let sz = 0, then Formula ( 23) can be expressed as follows: where Kz ≥ η, the sliding mode control system satisfies the Lyapunov stability condition, at the same time, in order to avoid the problem of 'chattering' caused by the unsatisfactory switching control output in the actual control system, the sign function in the formula can be replaced by the saturation function to form a quasi-sliding mode.The output of the sliding mode controller can be expressed as below: According to the same design method, the output of the sliding mode controller for the pitch and roll motion of the sprung mass can be obtained: , where θr and φr are the rolling angle and pitching angle of the reference model.According to Formula (24), the corresponding control damping force of each suspension is expressed as below: where [•]denotes matrix, [•] + denotes inverse pseudo-matrix.

Design of Secondary Suspension Controller
Due to the vertical vibration generated by the in-wheel motor itself and the vertical force generated by the torque fluctuation inside the motor, which can affect the normal operation of the in-wheel motor, in this paper an active control module is added to the secondary suspension side.A linear motor is used as an actuator suspended in the secondary suspension along with the in-wheel motor.The PID controller has the advantages of simple principles, strong robustness, and wide application.Compared with other controllers, the control parameters of the PID controller are relatively independent, and it is easy to realize.Therefore, the PID controller is selected as the controller of the secondary suspension.A PID controller is selected as the controller for this module.
Set the given value of the vertical acceleration of the in-wheel motor to 0, and use the difference between the given value 0 and the actual output value of the vertical acceleration of the in-wheel motor as the input signal of the PID controller; the principle of the PID controller is to carry out proportional (proportional), integral (integral) and differential (derivative) operations [29], and then pass the signal to the secondary suspension actuator, so as to realize the active control of the secondary suspension.The differential equation of the PID control is as follows: where Kp is the proportional gain in the PID controller, Ki is the integral gain in the PID controller, Kd is the differential gain in the PID controller, and U is the control signal transmitted by the PID control to the controlled object (in-wheel motor); that is, the secondary suspension linear actuator M2 outputs the control force fi.
There are many methods to improve the PID control algorithm and to adjust the parameters; for example, the ESO extended symmetric optimal method is described in [30], and the control effect of the open-loop system is compared.It is shown that the ESO extended symmetric optimal method can improve the performance of the PI and PID controller, and the subsequent work will focus on the advanced PID control algorithm.In this paper, in order to achieve the goal of multiple mode switching, PSO (particle swarm optimization) is used to adjust the parameters of the PID controller in different operating modes, and the control effect of suspension is optimized under different working modes.

Road Recognition Model
This paper establishes a pavement identification model and identifies the pavement class based on the transfer function relationship between the dynamic travel response of the suspension and the pavement inputs of the improved CVD skyhook reference model of the vehicle.
First, a section of pavement containing different speeds and different pavement classes is constructed by using the triangular level method [31].Second, the pavement identification model is obtained by taking the dynamics model of the reference model of the whole vehicle improvement canopy as the main body, and using the transfer function relationship between the CVD continuously adjustable semi-active control strategy, the dynamic travel of the parallel riser suspension, and the input of the pavement.Finally, pavement identification is carried out on the constructed hybrid pavement, and the pavement classes are classified based on the obtained signals.Figure 5 shows the timedomain model of the class B pavement constructed by the triangular level method, while the power spectral density is shown in Figure 6.According to Reference [32], the functional relationship between the mean square value of the suspension dynamic travel  ̅ 2 and the road grade coefficient R and the vehicle speed V is as follows: where M and m are the spring loaded mass and unsprung mass, respectively, C value is the damping coefficient, and V is the vehicle speed.Further simplification of the above equation can be obtained: ( ) The relationship between R-value and pavement grade is as follows (Table 4): In Formula (28), V can be measured based on the CVD reference model.The change of m and M is small, so the influence on the identification results will be relatively small, and is not considered in this paper.The C value changes in real-time in the CVD control algorithm, and the control algorithm gives the C(t) value at any time.Therefore, the average value of C(t) can be taken within the road recognition time, and the road roughness grade flag is defined as follows: where q = lgR, flag = 1, 2, 3 corresponding to A/B grade pavement, C/D grade pavement, and E/F grade pavement, respectively.The road grade coefficient R can be obtained using Formula (30), and then the road grade can be judged using Formula (31).
Based on the method of trigonometric series, a random road spectrum including ISO-A, D, C is established, in which the speed of A grade road is 25 m/s, that of D grade road is 5 m/s, and that of C grade road is 10 m/s; thus, the journey time for each segment is 4 s, as shown in Figure 7  As shown in Figure 8, the recognition interval time is 1 s, and the method can accurately identify the grade of the road surface at different speeds.The identification of vehicle driving conditions provides a practical basis for the next step of the work mode of the suspension division and optimization algorithm.

Design of Working Mode Switching Strategy for Active Regenerative Suspension
The suspension control switching strategy, whether active suspension is in active mode or energy-feeding mode, needs to be selected according to the actual working conditions: under good road surface or slow vehicle speed, the vibration of the spring and the in-wheel motor is not significant, the suspension should be in the active energy feeding mode when the vehicle speed is moderate, and in the worse road surface, the suspension should be in the active mode to restrain the vehicle vibration, at the same time to ensure security.To avoid the suspension system instability caused by frequent switching in different road surfaces, the hysteresis module should be added to the control system [17]; when a vehicle travels a certain distance on a particular class of road surface, it switches the feedback control mode, which is related to the current class of road surface and the speed of the vehicle.The switching strategy is shown in Table 5. Note: In the table, the control mode on the side of the upper spring of the main suspension is marked as 1 , and the control mode on the side of the in-wheel motor of the secondary suspension is marked as 2 .

Controller Parameter Optimization
To solve the problem of poor overall damping and high energy consumption of the vehicle on the mixed road due to the single controller parameters of the active suspension, it is necessary to make the vehicle on the different grades of the road achieve the optimal damping or energy-feeding performance.Therefore, in Section 4, the parameters of the two controllers are adjusted by using the particle swarm optimization controller combined with the road grade.Compared with other linear and nonlinear control theory systems with fixed parameters or with manual adjustment, the self-adaptability of the control strategy to the mixed pavement is improved, ensuring that the car in different grades of road surface smoothness and energy-saving achieves the optimum.

Particle Swarm Optimization
In 1995, Dr .Eberhart and Dr .Kennedy proposed (particle swarm optimization, PSO) that mimics the way birds search for food.In D-dimensional space, there are N particles, xi = (xi1, xi2,..., xiD) for the first particle, vi = (vi1, vi2,..., vid) for the velocity of the first particle, pbesti = (pi1, pi2,..., piD) represents the best position that the first particle has ever experienced, gbest = (g1, g2,..., gD) is the best position the population has ever experienced.The ith particle's d-dimensional velocity is updated to the following: The updated formula for the position of the ith particle in the d dimension is as follows: where V k+1 id is the d-dimensional component of the flight velocity vector of the ith particle in the k+1 iteration, V k id is the d-dimensional component of the position vector of the ith particle in the kth iteration, c1, c2 are the numbers of the accelerated constant, r1, r2 are two random functions, ω is the inertia weight, X k id is the position of the kth particle, X k+1 id is the position of the k + 1st particle, P k id is the dth dimension of the individual extreme value of i variable in the kth iteration, and P k gd is the dth dimension of the global optimal solution of the kth iteration.
The flow chart of the particle swarm optimization algorithm is shown in Figure 9.To make the active energy-regenerative suspension give the best performance under different working modes and realize the switching of the working mode of the suspension, it is necessary to adjust the controller's parameters under different working modes.Due to the poor accuracy and general effect of manual parameter adjustment, the particle swarm optimization algorithm has a certain degree of adaptability, can adaptively adjust the cable strategy, has strong global search ability, and can quickly find the optimal solution.Therefore, this paper used the particle swarm optimization algorithm to optimize the vehicle's ride comfort and energy-regenerative index under different working conditions and took two controller parameters as the optimization variables.The optimal solution under different working modes is obtained to improve the control effect; Figure 10 shows a frame diagram of a particle swarm optimization active energy-regenerative suspension control strategy.

Selection of Objective Functions
The controller parameters cz, cx, cy, Kp, Ki, Kd are used as optimization variables, and the optimal variables range from 1 to 100.Taking the vertical acceleration of body mass center ̈, the dynamic deflection of suspension  1 −  1 , the vertical acceleration of inwheel motor ̈, the pitch angle acceleration ̈, the roll angle acceleration  ̈, the tire runout, the energy efficiency as optimization objectives, then the subscript 0 represents the index of passive suspension.Because the saving and dynamic performance of the system are inversely proportional, the system's energy saving will be sacrificed while improving the dynamic performance.Therefore, this paper has the following considerations.When the working mode is active-energy feeding mode, L2 is taken as the objective function to improve the system's dynamic performance.When the actuator working mode is active mode, L1 is taken as the objective function.

Controller Parameter Optimization Results
Because of the different effects of various road surfaces and various vehicle speeds on vehicle ride comfort, the fixed suspension controller parameters cannot adapt to other working conditions.Thus, they cannot give full play to the suspension performance.Therefore, this paper optimizes the vehicle performance at different road grades and speeds by using the particle swarm optimization and obtains the controller parameters of the suspension at different operating conditions.Based on the results of road identification and vehicle speed identification, the controller parameters are assigned according to the different working modes of suspension.
The IWM-EV vehicle active regenerative suspension Simulink model is simulated by the particle swarm optimization algorithm, and the sliding mode controller parameters cz, cx, cy, and PID controller parameters Kp, Ki, and Kd are optimized by particle swarm optimization.Shown in Figure 11 is the function value convergence curve of the objective function L1 under the A-level road speed of 25 m/s, etc.Under other road grades and vehicle speeds, the optimization results are shown in Table 6.Sections 3 and 4 use the structural characteristics of the suspension itself to set and optimize the sliding mode controller and the PID controller at the main suspension and the secondary suspension, respectively.This improves the vertical vibration suppression effect of the suspension on the body and the motor and plays a positive role in solving the coupling effect between the two.Compared with previous studies, and comparing with Reference [13], on the basis of sliding mode control, not only the vertical vibration of the body is considered, but also the vertical vibration and unbalanced excitation of the hub motor are taken into account.At the same time, the change of the road level leads to the switching of the suspension mode.Compared with the particle swarm optimization method proposed in reference [16], this paper has more optimization objectives, and uses a more robust sliding mode controller on the spring, which can improve the ride comfort and safety of the vehicle on different roads.As shown in Figure 12, this is a block diagram of the vehicle control strategy for this article.

Simulation and Analysis
In order to verify whether the control strategy proposed in this paper is appropriate, that is, whether it can improve the overall vibration reduction performance of the vehicle on the mixed road surface, whether it can improve the ride comfort of the vehicle, and whether it has an ideal energy-regenerative effect, the vehicle is selected to use three different suspensions for comparison: passive suspension without any active control participation, active suspension using sliding mode controller and PID controller for joint control, and active energy-regenerative suspension using the particle swarm optimization algorithm to adaptively adjust the controller parameters according to the different road grades based on the active suspension proposed in this paper.The simulation comparison was carried out in a Matlab/Simulink environment.Choose A, D, C grade road as road input, in 0~4 s for A grade road a speed of 25 m/s, 4~8 s for D grade road a speed of 5 m/s, 8~12 s for C grade road a speed of 15 m/s, and mixed grade road input as shown in Figure 13.7-9.α (%) is the variable percentage of the active suspension and the passive suspension, and β (%) is the variable percentage of the optimized active energy-regenerative suspension and the active suspension.In 0~4 s, the active energy-regenerative suspension is in the active control mode.In 4~8 s, the active energy-regenerative suspension is in the active energy-regenerative mode.In 8~12 s, the active energy-regenerative suspension is in the active control mode.According to the simulation results in the above three time periods, it can be concluded from Figures 14-20 and Tables 1-3 that for the root mean square value of the vertical acceleration of the center of mass, the active suspension is reduced by 14.1%, 1.4%, and 15.4%, respectively, compared with the passive suspension; compared with the active suspension, the optimized active regenerative suspension decreased by 6.8%, 5.1%, and 24.8%, respectively.For the root mean square value of the dynamic deflection of the suspension, the active suspension is reduced by 15.4%, 10.9%, and 4.3%, respectively, compared with the passive suspension; compared with the active suspension, the optimized active regenerative suspension decreased by 27.2%, 10.2%, and 15.9%, respectively.For the root mean square value of tire runout, the active suspension decreased by 16.7%, 2.6%, and 11.1%, respectively, compared with the passive suspension; after optimization, the active energyregenerative suspension is reduced by 30%, 9.9%, and 21.4%, respectively, compared with the active suspension.From the changes of the above three indexes it can be seen that the active energy-regenerative suspension based on the control strategy of this paper can improve the vertical vibration effect of the vehicle body on the mixed grade road surface and improve the ride comfort of the in-wheel motor drive electric vehicle compared with the active suspension and the passive suspension.Similarly, for the root mean square value of roll angle acceleration, the active suspension is reduced by 28%, 23.4%, and 4.04%, respectively, compared with the passive suspension, and the optimized active regenerative suspension is reduced by 27.7%, 24.8%, and 7.4%, respectively, compared with the active suspension; for the root mean square value of pitch angle acceleration, the active suspension is reduced by 43%, 4.3%, and 4.04%, respectively, compared with the passive suspension.Compared with the active suspension, the optimized active regenerative suspension is reduced by 16.6%, 8.3%, and 21.4%, respectively.The changes in these two indicators show that the vehicle's driving safety has been dramatically improved, especially in poor road conditions; the reduction of pitch angle and roll angle acceleration dramatically reduces the risk of vehicle slip and sideslip or rollover.

Class D pavement
For the root mean square value of the dynamic displacement of the hub motor, the active suspension is reduced by 17.2%, 7.1%, and 5.8%, respectively, compared with the passive suspension, and the optimized active regenerative suspension is reduced by 12.5%, 19.3%, and 10.2%, respectively, compared with the active suspension; For the root mean square value of the vertical acceleration of the in-wheel motor, the active suspension is reduced by 22.8%, 12.5%, and 15.4%, respectively, compared with the passive suspension, and the optimized active regenerative suspension is reduced by 5.9%, 6.5%, and 20.2% compared with the active suspension.It can be seen from the two indicators of the hub motor that the vertical vibration of the hub motor is suppressed during the driving process of the vehicle, thus providing a good solution for the coupling characteristics of the pulse on the side of the hub motor and the side of the body.
From Figure 21 and Table 2, it can be seen that in the energy-regenerative characteristics of the active energy-regenerative suspension, the recoverable energy of the linear motor increases by 14.08 J, and the energy-regenerative efficiency is 17%, indicating that the energy-regenerative characteristics are good.It can be seen from the simulation results within 0~12 s; compared with the other two suspensions, the optimized active energy-regenerative suspension can significantly improve the ride comfort of the vehicle on the mixed road surface, and the adaptability of the control strategy is more robust.When the active energy-regenerative suspension is in the active energy-regenerative mode, it can recover part of the energy.Compared with the active suspension that cannot recover energy, the energy-saving performance is improved to a certain extent.Therefore, the active energy-regenerative suspension using the control strategy proposed in this paper can ensure the vehicle achieves safety, comfort, and energy-saving on different levels of road surface.

Conclusions
The main contents are summarized as follows.The dynamic model of the active energy-regenerative suspension of the in-wheel motor drive vehicle, considering the torque fluctuation of the switched reluctance motor and the road excitation, was established.The vehicle reference model based on the CVD control algorithm was set, and the reference model identifies the road grade.
A sliding mode controller and a PID controller based on the reference model were designed to control the upper spring part and the in-wheel motor part, respectively.Based on the results of road surface identification and vehicle speed identification, the working modes of the suspension were divided, and the dynamic and energy-saving indexes of the suspension under different working modes were optimized based on particle swarm optimization.The controller parameters under different working modes were obtained, which were switched with vehicle speed and road grade.
The simulation results show that compared with the traditional active suspension, the optimized active energy-regenerative suspension significantly improves the ride comfort of the vehicle body and recovers more energy due to the mode switching under different working conditions, improving the vehicle's comfort and energy efficiency.

Figure 2 .
Figure 2. Dynamic model of vehicle active energy-regenerative suspension.

Figure 3 .
Figure 3. Vertical force of in-wheel motor.

Figure 5 .
Figure 5. Class B pavement time domain model.

Figure 6 .
Figure 6.Power spectral density of Class B pavement.

Figure 7 .
Figure 7. Time domain model of composite pavement.

Figure 8 .
Figure 8. Recognition results of composite pavement.

Figure 10 .
Figure 10.Control strategy of active regenerative suspension based on particle swarm optimization algorithm.

Figure 11 .
Figure 11.Evolution curve of fitness value.

Figure 13 .
Figure 13.Mixed grade pavement input.The suspension's dynamic performance and energy recovery efficiency are shown in Tables7-9.α (%) is the variable percentage of the active suspension and the passive suspension, and β (%) is the variable percentage of the optimized active energy-regenerative suspension and the active suspension.

Table 5 .
Working mode switching strategy.

Table 6 .
Controller parameter optimization results.

Table 7 .
Performance of 0-4 s active regenerative suspension before and after optimization.

Table 8 .
Performance of 4-8 s active regenerative suspension before and after optimization.

Table 9 .
Performance of 8-12 s active regenerative suspension before and after optimization.