Intelligent Torque Allocation Based Coordinated Switching Strategy for Comfort Enhancement of Hybrid Electric Vehicles

This paper proposes two intelligent torque distribution strategies based on particle swarm optimization (PSO) and fuzzy logic control (FLC) to provide convenient torque allocation that maximizes hybrid electric vehicle (HEV) propulsion power. PSO torque distribution strategy uses torque transfer ratio (TTR) as a fitness function to select the best torque candidates and differential arrangements that maximize HEV propulsion torque. A proposed FLC controller with adequate membership functions is designed to ensure convenient torque vectoring across vehicle wheels. A new coordinated switching strategy is proposed in this paper to address the undesired transient ripples occurring during drivetrain commutations and power source switchings. The proposed coordinated switching strategy controls the switching period duration through transition functions fitting the transient dynamics of power sources. In non-uniform surfaces, intelligent torque allocation strategies converted $84\sim 86$ % of the generated torque into propulsion torque whereas the equal torque distribution strategy yielded a torque transfer ratio of 50%. Thanks to the proposed coordinated switching strategy, DC bus voltage ripples were reduced to a narrow band of $\pm ~5\text{V}$ , transient power ripples were limited to a narrow band of 600 W and torque jerks were almost suppressed. Real-time simulation using the RT LAB platform confirms that the proposed coordinated switching strategy has reduced transient torque overshoot from 69% to almost zero and this is expected to improve HEV driving comfort.


I. INTRODUCTION
Since the transportation sector generates large greenhouse gas emissions, all countries around the world have reoriented their policies toward the electrification of their transport sectors. Conventionally, vehicle drivetrains are made of a single-engine [1], [2]. The drivetrain hybridization concept, on the other hand, introduces additional electric machines to the vehicle board to increase its security and propulsion The associate editor coordinating the review of this manuscript and approving it for publication was Yiming Tang . power. However, if HEV torque is not conveniently allocated, the extra machines on the vehicle board will change from being an advantage to becoming a drawback. This is because they increase HEV weight without adding any propulsion torque, especially on non-uniform ground surfaces. The over-actuated drivetrain architectures presented in [3]- [8] distribute torque equally across vehicle wheels. HEV propulsion power will be significantly reduced if one of the vehicle wheels is on a low friction surface that doesn't allow the development of any propulsion force. Modern powertrains are over-actuated systems that use torque distribution VOLUME 10, 2022 This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/ strategies (TDS) to deliver the desired traction torque with an infinite number of feasible contributions of their multiple drivetrains [9]. In [10], authors developed TDS based on PSO and fuzzy logic techniques without taking into consideration real driving conditions to which HEV is subjected.
In reference [11], a TDS based on a multi-objective PSO algorithm is proposed to optimize the energy consumption of electric machines while minimizing the dynamic tire slip loss simultaneously. In reference [12], the authors designed a TDS that considers HEV safety and energy saving as optimization goals. These two last-mentioned strategies provided good results in terms of energy consumption but the authors didn't study the impact of the proposed TDS on HEV propulsion power. In reference [13], a TDS based on the Newton-Lagrange algorithm is developed to search for optimal torque values to be allocated to HEV wheels under constraints of minimum energy consumption. However, the developed TDS was verified only under a uniform surface friction coefficient of 0.85 which is far from real driving conditions. A novel intelligent TDS based on neural networks and fuzzy logic strategies is proposed in [14] to enhance HEV dynamic behavior. Authors in this last-mentioned work claimed to send greater torque commands to motors whose wheels have more grip. However, the proposed strategy was validated only on a surface with a constant friction coefficient. Many other torque distribution approaches that rely on intelligent techniques can be found in [15]. The common denominator in all the previously mentioned works is that minimum energy consumption is considered as the primary optimization goal neglecting to investigate the impact of proposed TDS on HEV propulsion performance. In references [16]- [18], a TDS based on the geometrical placement of traction machines is proposed in which two electric machines are used to drive respectively the rear and the front HEV wheels. The rear motor is turned on only in cases where the front motor cannot handle alone the torque applied to it. This TDS improves significantly HEV propulsion performance but toggling from rear to front driving modes and vice versa causes unwanted torque jerks and ripples that lower the driving comfort. The negative impact of transient jerks and ripples occurring during drive mode switchings are discussed in [19]. Solutions to the unwanted vibrations and torque peaks occurring during drive mode commutations are proposed in [20], [21]. In reference [22], a coordinated control strategy for transient performance enhancement of a dual-motor vehicle is developed. In reference [23], the authors established a multilevel torque coordination technique to synchronize the transient intervention of torques coming from the engine and electric motors. A practical anti-jerk strategy based on power source torque changing rate limitation is discussed in [24] to smooth the drive mode transition process. Miscoordination between traction power sources during drive mode transitions is also among the reasons causing jerks in HEV as it is reported in [25], [26]. A mode transition control strategy using the state-space methodology to smoothen the variation rate of vehicle acceleration during drive mode transitions is developed in [27]. The model predictive control strategy was proposed in [28] to achieve a smooth mode transition. To summarize, most TDS found in literature aim to maximize HEV propulsion either by employing distributed drivetrains which cause undesired passenger felt transient torque jerks, or via torque allocation strategies mostly validated only in uniform ground surfaces. In this paper, PSO and fuzzy logic control are used to ensure convenient torque distribution that enhances HEV propulsion power. PSO-based torque distribution is carried out with the help of a proposed fitness function that provides the best torque split and differential arrangement that maximize vehicle propulsion. Fuzzy torque distribution is performed using proposed membership functions and a set of well-established fuzzy rules. In this work also, to guarantee safe and comforTable HEV operation, the high currents and large torque ripples occurring respectively during power source switchings and drive mode commutations are addressed using a new proposed a coordinated switching strategy that compensates fuel cell (FC) slow transient response and protects it from large currents drawn during abrupt load variations. This strategy allows the control of the switching period duration and the definition of appropriate transition functions fitting the dynamics of the sources undergoing transitions. The effectiveness and feasibility of the proposed coordinated switching strategy is verified in real-time using OPAL-RT LAB simulator at both power sources and traction motors levels and the obtained results were satisfactory as it will be seen throughout this work.
The rest of this paper is organized as follows: Section 2 presents the used HEV drivetrain. The two proposed TDS are detailed in section 3. In section 4, the coordinated switching strategy proposed for drivetrain commutations and power source switching is presented. Section 5 points out the obtained simulations under MATLAB/Simulink. Section 6 concludes this paper and confirms the feasibility of the proposed coordinated switching strategy using the RT LAB simulator and outlooks the future work.

II. HEV DRIVETRAIN STRUCTURE
Powertrain architectures are among the characteristics that have been strongly diversified since the invention of HEVs because it is the key factor toward HEV performance enhancement. The number and the location of the used electric machines are used as a scale in HEV classification which is extensively discussed in [29]. The most used HEV drivelines are depicted in Fig. 1(a)-(d). From the last-mentioned Figure, one can notice that to enhance HEV propulsion power, the number of electric traction machines is increased on the HEV board. This solution enhances vehicle performance at the expense of its cost and weight. Furthermore, one can notice that the torque to be received by each vehicle wheel is fixed and this is not suitable in cases where HEV is on ground surfaces with different friction coefficients. The idea of equal torque distribution is very common, in [30], HEV propulsion is ensured by a unique PMSM connected to the rear wheels. The limitation of such drivetrain architecture appears when most of the load torque is exerted on the front-driven wheels instead of the rear driving wheels. In [31], [32], both HEV rear wheels are driven by a five-phase PMSM. This driveline structure will increase HEV propulsion power, but in case of failure of one traction machine, the vehicle may skid away. Added to that, if the rear driving wheels are on an icy surface with a low friction coefficient, the torque attributed to them will not develop significant propulsion power. Four traction machines are used for HEV traction in [5], [33], this will increase HEV propulsion power but it will be at the expense of vehicle price and weight. The limitation of all the previously mentioned research works is that all the generated torque is either sent to rear or front wheels or is equally distributed over all HEV wheels which is unsuiTable in non-uniform ground surfaces. For that reason, researchers have developed several torque distribution strategies [34]. Figure 2 shows the drivetrain structure of the HEV considered in this work which can be powered using one or two power sources and may be driven by either one or two permanent magnet synchronous machines (PMSM) chosen mainly for their high torque to mass ratio [35]. The turnon and extinction of FC and supercapacitor (SC) responsible for powering the HEV are governed by a proposed coordinated power management strategy. When the load torque, T L , applied on the vehicle is less than the specified threshold torque value T TH , the HEV will be driven only using PMSM1. As soon T L exceeds the defined threshold, SW will be closed and PMSM2 will be turned on letting both motors share equally the load torque applied on the HEV. Transitions from single motor drive mode to dual motor mode is performed via a proposed coordinated switching strategy that will be discussed in detail in the forthcoming sections. Two proposed TDS are used in this paper to distribute the generated torque, T HEV , to front and rear HEV wheels so that to maximize its propulsion as will be seen throughout this paper. The torque allocation bloc shown in Figure 2 outputs k R and k F which represent, respectively, the percentage of total torque attributed to the rear and front differentials. The relation between k F and k R at every time instant is given by equation (1).
T F,REF and T R,REF in Figure 2 represent, respectively, the amount of torque sent to the front and rear differentials. They are defined by the set of equations given in equation (2) where T m1 and T m2 are the electromagnetic torque values developed by PMSM 1 and PMSM 2 . η is the transmission efficiency of the front and rear differentials and center gear system.
The center differential shown in Figure 2 performs the first torque orientation by sending the reference torque values T F,REF and T R,REF to HEV front and rear wheels. After that, RD and FD, which are bistate differentials, perform the second and last torque vectoring. When they are open, RD and FD provide an equal torque split over HEV right and left wheels. If FD and RD are closed, 95% of the front or rear reference torque will be allocated to the HEV wheel on which more load torque is applied and the remaining 5% will be allocated to the other wheel to ensure its rotation. The torque transmitted to each vehicle wheel is by equation (3) where N RR , N RL , N FR, and N FL are respectively geared ratios of VOLUME 10, 2022 rear right, rear left, front right, and front left wheels that are defined using equation (4).
The relation between the torque allocated to an HEV wheel and the maximum propulsion torque that can be produced by an HEV wheel depends on the surface friction coefficient µ that exists between the vehicle tire and ground surface. In reference [36], it is stated that tire friction coefficient is a function of several parameters such as tire inflation and wheel slip. According to [37], the estimate of the road friction coefficient can be performed using equation (5) where F x and F z are the longitudinal and normal forces applied to the tire, Cs is the tire stiffness andλ is the HEV wheel slipgiven by equation (6) in which R represents wheel radius, w stands for motor angular speed and v highlights wheel speed.
Using equation (5), the total propulsion torque that can be developed by HEV is rewritten as given by equation (7) where µ RR , µ RL , µ FR and µ FL are respectively the rear right, rear left, front right and front left surface friction coefficients between HEV tires and the ground surface.
Equation (8) highlights the torque transfer ratio (TTR) which is used in this paper as a performance measure to evaluate the goodness of the proposed TDS. It can be seen that TTR is nothing more than the ratio between the total propulsion torque developed by vehicle wheels, T prop , and the electromagnetic torque generated by the two traction machines, T HEV . As pointed out by equation (8), TTR ranges between 0 and 1, and the greater it is, the more effective the TDS will be and vice versa.
The term ETD (equal torque distribution) stands for HEVs whose generated torque is equally split over vehicle wheels as is the case in [4]- [8], [38]. The TTR of these last-mentioned reference works gets significantly reduced in non-uniform ground surfaces. To prevent TTR deterioration, two TDS that rely on the use of PSO and FLC are discussed in this paper and they are presented in the next section.

III. PROPOSED TORQUE DISTRIBUTION STRATEGIES A. PSO BASED TORQUE ALLOCATION
PSO is a naturally inspired optimization algorithm originating from the social behavior of organisms, such as bird flocking, fish schooling, and human social relations [10], [39]. To solve a given optimization problem, PSO uses a population of candidate solutions to explore a search space whose dimension is defined by the problem to be solved. While exploring the search space, particles update their speed and velocity by exchanging their information to converge to an optimal solution. In a swarm of P particles, let x t i and v t i represent, respectively, the position and velocity of a particle i at iteration t. The particle's position and speed are accordingly updated after each iteration using equations (9) and (10). Figure 3 points out how a particle adjusts its flying position and velocity according to its own flying experience and its companions' flying experience.
x t+1 i and v t+1 i denote, respectively, the position and the velocity of the i th particle at the next iteration. P t best is the personal best position of the i th particle at iteration t. G t best is the global best position of the swarm. w t is the inertia weighting factor which decreases linearly between w min and w max . r 1 and r 2 are two random numbers. c 1 and c 2 represent, respectively, the cognitive and social factors that represent the influence of global swarm decision and particle's decision on particle position update. In this work, PSO is used to provide optimal torque distribution and an optimal differential arrangement that maximizes HEV propulsion as it is running on non-uniform ground surfaces.
To do so, first, we generate a random population of n torque candidate solutions in a four-dimensional search space as given in equation (11). Each matrix column represents a set of all possible torque values that may be allocated to a given HEV wheel. Each matrix row represents a torque vector combination that may be applied to HEV wheels. At any instant k, the population matrix T should satisfy two simultaneous conditions given by equation (12): Notice that the fitness function J given by equation (13) which is nothing more than the TTR already defined in equation (8) which is evaluated for each population candidate 4)] and for every possible differentials arrangement.
As already discussed in the previous section, the set of possible values that N RR , N RL , N FR and N FL can take is given by equation (14). Mathematically, If S is a finite set whose cardinality is n(S) = k, then the number of subsets in S is 2 k . Considering four HEV wheels and applying this lastmentioned theorem to equation (14) we deduce that 8 differential arrangements or 8 torque orientations are possible for each load torque value T L . Equation (15) depicts the matrix of all possible differential configurations N whose row number is 2 S and column number is equal to HEV wheel number The best torque distribution and the best differential arrangement are respectively updated after each iteration as given using equations (16) and (17). Notice that only candidate solutions that maximize the TTR of HEV are kept.
The global optimum differential arrangement and the global optimum torque distribution that resulted in the highest fitness value (TTR) are respectively given using equations (18) and (19). Optimal torque percentages to be allocated to front and rear wheels are given using equation (20). Before the use of PSO for torque distribution, its convergence is tested using the benchmark test function shown in Figure (3) whose expression is given by equation (21). This benchmark function is full of local minima and has a unique global optimum as highlighted in the Figure and this may trap the algorithm if it is not well-conceived. Figure (4) shows the result of the minimization of equation (21) using the PSO algorithm. Notice that after 72 iterations PSO converged to the same global optimal solution which is −18.59.
The flowchart shown in Figure (5) explains how PSO was integrated to provide an optimum torque allocation and to maximize HEV propulsion power in non-uniform ground surfaces. Notice that PSO is initiated only when the road conditions are not uniform.

B. FUZZY TORQUE ALLOCATION
The load torque applied on each HEV wheel is sensed. After that, the total load torque is applied to the rear and front HEV wheels that are fed to the designed fuzzy logic controller. The used FLC controller fuzzifies the sensed front and rear load torque applied on the vehicle using six fuzzy sets which are: very low ''VL'', low ''L'', below average ''BA'', average ''A'', high ''H '' and very high ''VH''. This is performed using two trapezoidal and four triangular membership functions as it is shown in Figure 6 from which one can see that the universe of discourse is between zero and maximum torque supported by  PMSM1 and PMSM2. After rule evaluation, defuzzification is performed using two triangular and two trapezoidal membership functions as shown in Figure 8. VLG, LG, MG, and HG stand, respectively, for very low, low, medium, and high gears. Physically, each membership function represents a gear ratio level that will result in a given torque split. The most important part in FLC design is the establishment of a rulebased system that governs its operation and stores the expert knowledge on how to split the torque over HEV wheels. The dependency between FLC inputs and outputs presented by their corresponding membership functions and the set of established fuzzy rules is better explained by the surface map shown in Figure 9. Table 1 shown below points out the set of fuzzy rules used to generate the reference torque to be sent to HEV front wheels (T F,REF ). Notice that when the same load torque is applied on the front and rear vehicle sides, the generated torque (T HEV ) will be shared equally between the front and rear wheels. After T F,REF determination using the set of fuzzy rules given in Table 1, T R,REF is concluded using equation (22) shown below:

IV. COORDINATED SWITCHING STRATEGY A. COORDINATED MOTOR SWITCHING
Drive mode switching problems are extensively studied in the last years [25], [40] as they subject traction machines  to abrupt and high currents that may cause their damage. Furthermore, abrupt drive mode switching gives rise to large undesired torque ripples that reduce HEV drivability and produce undesired passenger-felt jerks. Figure 9 shows one of   the negative impacts occurring when the drivetrain structure shown in Figure 1 toggles from single to dual motor traction mode. Notice that when PMSM 2 is abruptly turned on at t=4.4s, large transient torque ripples reaching 45 N.m are observed as can be seen in Figure 9-a. The same unwanted transient behavior is noticed during abrupt PMSM 2 extinction when switching from dual to single traction mode. To address these undesired torque jerks that reduce driving comfort, a proposed coordination switching strategy is proposed. At any time, instant, the torque developed by the HEV shown in Figure 2 is expressed using equation (23) shown below: According to the HEV operation given in section 2, equation (23) can be rewritten as expressed in equation (24): c m1 and c m2 are respectively the torque contribution factors of PMSM1 and PMSM2. Each of these two factors represents the percentage of total load torque handled by each machine. When HEV traction is ensured by PMSM1 only, c m1 equals 100% and c m2 is null. As soon as HEV switches to dual traction mode, both c m1 and c m2 are set to 50%. The relation between c m1 and c m2 and the set of their possible values are given in equation (25): Instantaneous HEV torque ripples are expressed by taking the time derivative of equation (26): Equation (27) provides the numerical approximation of each left-hand side term of equation (26). T s in equation (26) represents the calculation step. Derivative of T m1 and T m2 are equal to zero because the torque developed by PMSM 1 and PMSM 2 between t and t + T s is almost the same.
Using the approximations of equation (27), equation (26) can be rewritten as follow: Since T s is in the order of 10 −6 , the two ratios on the righthand side of equations (28) will result in significant transient torque ripples that lower HEV driving comfort during drive mode switchings reducing the lifespan of PMSMs and reducing the driving comfort. To avoid these aforementioned drawbacks, a coordinated switching strategy that smoothens drive mode switchings and that coordinates the torque coming from the two traction machines is proposed in this paper and its basic steps are described by the flowchart in Figure 10. The old and the new torque contribution factors of PMSM 1 are denoted respectively by c old m1 and c new m1 are acquired and stored as given in equation (29) where t trig is the instant at which T L gets beyond or blows T TH .
The old and the new torque references of PMSM 1 are denoted respectively by T old m1 and T new m1 are calculated as given in equation (30).
Since T s is in the order of 10 −6 , T L t trig ≈ T L t trig − T s . Hence, equation (30) is rewritten as given in equation (31).
Mathematically, there exist an infinite number of curves that can be used to join the old torque reference of a traction machine, T old m1 and its new torque reference T new m1 . In this work, the exponential transition function given by equation (32) is used to provide smooth and coordinated drive mode switching. Notice that the proposed transition function takes into account PMSM dynamics and controls the rate of change of torque reference. τ m1 represents PMSM 1 time constant which is chosen to be one-fifth the duration of the transition period T SWM as stated by equation (33).
Substituting equation (31) in (32) yields the coordinated torque reference of PMSM 1 in terms of its torque contribution factors as shown below: Substituting equation (34) in equation (23) yields the coordinated torque reference that will be delivered to PMSM 2 during drive mode switchings as expressed by the equation (35):   integrated into nowadays energy production and storage systems. This can be easily seen by the large number of papers discussing this topic [41]- [44]. However, the aforementioned power sources are sensitive and have to be used with protection procedures against overcurrent and unwanted transient effects. Undesired transient effects are not only caused exclusively by drive mode switching. They are also noticed during power source switchings as it can be seen in Figure 9 of [45] and Figure 15 of [46]. These ripples are due to the transient dynamic difference between HEV power sources. In references [47], [48], authors have discussed FC slowness due to the purifier that is responsible of transforming fuel to pure hydrogen. They concluded that the purifier causes a delay of 2.2 the FC no load time constant (τ NL FC ) which is given in by equation (36) in which R act is the resistance due to activation polarization, R con is the resistance due to conduction polarization and R ohm is the resistance due to ohmic polarization. In references [49], [50], the purifier's delay is estimated to be 3τ NL FC where τ NL FC is the no-load FC time constant.
A coordinated switching strategy is proposed in this paper to compensate for FC's poor transient response and to protect sensitive power sources from damages caused by sudden load variations. In this paper, FC and SC are used to power the HEV and their usage can be summarized by the following sentence: ''At any driving instant, FC and SC can deliver any desired fraction of the total power required for traction''. This last sentence can be expressed mathematically using equations (37) shown below where C FC and C SC are respectively the FC and SC power contribution factors that represent the percentage of total required to power that FC and SC will deliver. P HEV is the total power required for traction.
FC reference power is varied by changing its C FC . In this work, we choose to operate FC at five operating points as indicated in equation (38).
Following the same approach already presented in subsection 4.1, FC and SC switchings are coordinated using the transition functions given by equations (39) and (40). P old FC and P new FC represent respectively the old and the new FC reference power. τ FC is the controlled FC time constant which is defined by equation (41). T FC is the manufacturer time constant that represents the time required for FC to reach, safely, its full power from off state. Figure 12 shown below highlights how the proposed coordinated strategy is integrated into the energy management strategy. It is worth noticing that the used energy management strategy is not deeply discussed throughout this paper as it is not the main subject of the study. From Figure 12, one can notice that the management strategy output is not directly applied to HEV power sources. Instead, it is passed through a coordination switching strategy that compensates for the difference between power source dynamics, especially FC slowness and protects them from possible damages caused by sudden load variations.

V. SIMULATION AND RESULTS
The effectiveness of all the presented torque distribution strategies and the impact of the coordinated switching technique on vehicle performance is investigated through numerical simulations under MATLAB/Simulink environment using the different simulation parameters shown in Tables 2, 3, and 4.
After the use of benchmark test functions to test the convergence of the PSO algorithm alone as discussed in section 3.1, the HEV driving case shown in Figure 13 is used to test the effectiveness of the PSO algorithm when it is integrated with the proposed torque distribution strategy. As it can be seen, the vehicle is assumed to be on a non-uniform ground surface.     The left side wheels lay in a low friction ground surface compared to the right wheels and this is expected to reduce vehicle propulsion torque and power. Notice that a load torque of 50 N.m is applied on the HEV.
Since HEV wheels are on a non-uniform ground surface, the PSO algorithm will be initiated to find the best torque distribution and the best differential arrangements that maxi- mize HEV propulsion torque. Figure 14 shows the evolution of PSO candidate solutions over iterations for a load torque value of 50 N.m. After 20 iterations, PSO has converged to the optimal torque values to be attributed to each HEV wheel to maximize its propulsion. It can be seen that most of the generated torque is sent to HEV right wheels that are on ground surfaces with a large friction coefficient and more gripe that maximize HEV propulsion power. Also, the torque value sent to the rear right wheel is greater than the one sent to the rear front wheel because its corresponding surface friction coefficient is larger. One can remark from Figure 14 that the sum of torque allocated to HEV wheels is equal to the load torque applied on the vehicle which is 50 N.m. Figure 15 shows the differential arrangement that resulted in maximizing the fitness function in equation (13). From Figure 15, [(N RR ) opt (N RL ) opt (N FR ) opt (N FL ) opt ] = [95% 5% 95% 5%] which means that 95% of rear torque is allocated to the rear right wheel and 95% of front torque is allocated to the front right wheel. Figure 16 shows the evolution of the fitness function given by equation (13) over 20 iterations. It could be seen that PSO algorithm has converged to a global best propulsion torque of 42.71 N.m. Using equation (8), a TTR of 0.8542 is obtained. This means that 85.42% of the generated torque is converted into propulsion torque thanks to the optimal torque allocation. The driving case of Figure 13 was simulated using the drivetrain architectures of some recently published works and the results are shown in Table 5. Even though [3] and [4] used, respectively, one and two traction machines, they have obtained the same TTR. The same conclusion can be made on the drivetrain proposed by [4] and [7] which used 2 and 4 traction machines respectively. One can conclude that over-actuating an HEV without an adequate torque distribution doesn't necessarily improve HEV propulsion power. From Table 5, it can be seen that PSO-TDS avoids HEV propulsion deterioration in non-uniform ground surfaces.    To point out the positive impact of the proposed TDSs and to show the enhancements brought by the proposed coordinated switching strategy on both power sources and traction machines, the driving scenario shown in Figure 16 is considered. During its ride of 94 seconds, the HEV rolls on a uniform and non-uniform ground surfaces. One can notice that in regions 2 and 4, respectively, the HEV left and right side wheels lay on a snowy surface and this is expected to reduce HEV propulsion power. Figure 17 shows the value of the friction coefficient between each HEV tire and the ground surface during the ride. Figure 19 shows the resulting TTR using PSO and FLC. These obtained results are compared to the conventional ETD strategy which assumes that the generated torque will be  split equally over the four HEV wheels. The first captivating remark is that the two used torque allocation strategies based on artificial intelligence succeeded to maintain high the HEV torque transfer ratio (TTR) in non-uniform ground surfaces (regions 2 and 4). However, in uniform ground surfaces (regions 1, 3, and 5) both intelligent TDS and ETD strategies resulted in the same TTR. One can see that Fuzzy and PSO torque distribution techniques have kept HEV TTR around 85%. However, the ETD strategy resulted in an almost 50% TTR drop during the time instants [40 s; 50 s] and [68 s; 80 s] which means that only half of the torque generated by traction machines will be transformed into propulsion torque. From Figure 19 also, PSO TDS yielded the highest TTR during all vehicle rides in both uniform and non-uniform regions. This confirms the effectiveness and the superiority of swarm intelligence. Figure 20 shows the developed HEV propulsion power using different torque distribution strategies. It can be seen that when using Fuzzy and PSO techniques for torque distribution, HEV propulsion power wasn't affected on non-uniform ground surfaces. However, vehicle propulsion power was reduced almost by half when using ETD. The zoom on Figure 19 confirms that PSO is the distribution technique that maximized the most vehicle propulsion power among other used distribution techniques.   PMSM1 reaches 80 N.m, PMSM 2 will be switched on to ensure half of the torque applied on the vehicle. One could notice significant torque ripples reaching up to 30 N.m occur each time PMSM 2 is switched on or off. These ripples which are due to the application of abrupt and high load torque reference to the traction machines reduce significantly HEV riding comfort and produce unwanted passenger felt jerks. The negative impact of abrupt switching on HEV speed is noticed in Figure 22 from which one can notice important speed jerks that lower the driving comfort during each motor. Figure 23-a and Figure 23-b show the torque developed by PMSM 1 and PMSM 2 when they are switched without using the proposed coordinated switching strategy. The proposed coordinated motor switching reduced the transient torque ripples through the use of the transition functions given by equations (34)(35). This enhances the driving comfort, and motors' lifespan and will protect them from possible damages caused by large and abrupt currents. Figure 24 highlights the obtained HEV speed when the two PMSMs are switched using the proposed coordinated switching strategy. It could be seen that the last-mentioned technique has a positive impact on HEV performance and has almost eliminated the speed jerks noticed during each motor switching and this will enhance the HEV driving comfort.  In Figure 26, once the load torque reaches 80N.m, PMSM 2 is smoothly turned on using the transition function given by equation (34) to ensure half of the load torque applied on the vehicle. Meanwhile, PMSM 2 is turned on using the same strategy within a transition period T SWM using the transition function given by equation (35) as it is shown in Figure 27. One can deduce that coordinated motor switchings   or coordinated drive mode commutations has suppressed the transient torque ripples that lower vehicle driving comfort. Figure 28 shows the evolution of FC and SC powers. From the last-mentioned Figure, Figure 29 reveals that abrupt switching between FC and SC gives rise to significant and unwanted  power peaks. For example, at t=44 s, a harmful power peak of 7kW is observed. These peaks are due to the difference in transient dynamics as will be demonstrated below. Large transient peaks are harmful to power sources and may cause failures or at least lifespan reduction to sensitive power sources such as FCs. Figure 30 shows how the proposed coordinated switching strategy via the transition functions given by equations (39)(40) has suppressed all the transient power ripples noticed during abrupt switchings between FC and SC. One can notice that the proposed transition functions have compensated for the difference in transient power source VOLUME 10, 2022   dynamics through the control of power coming from them during switching instants. Another advantage of such switching is that power sources are not subjected to high and sudden current which can cause their damage.
To investigate deeply the reasons that caused the high power ripples during FC and SC switchings zooms of Figures (28) and (29) are shown in Figures (31) and Figure (32). Before the switching instant at t=69 s, both FC and SC were ensuring half of the power required for traction was equal to 2.5 kW which means (C FC = C SC = 50%). At t=69 s, C FC is set to 100% letting FC ensure all the required power for traction which is 5 kW and SC is turned off  by setting C SC to 0. When FC and FC have switched abruptly without the use of the proposed coordinated strategy, the miscoordination is well apparent during the period delimited by the two dashed lines in Figure (31). Notice that SC power rapidly went to zero before the FC develops the required power for traction. This creates a transient power lack that causes ripples that impact negatively the performance of the HEV. Note that at any instant between the two dashed lines of Figure (31), the sum of FC and SC powers is less than the required power for traction. Figure (32) depicts a zoom of coordinated FC-SC switching which is performed using the proposed exponential transition functions (38)(39). Notice that at each instant during the transition period delimited by the two dashed lines, the sum of SC and FC powers is almost equal to the required HEV power with a tolerable error. For example, at t=45.91 s, the sum of FC and SC powers is equal to 3.98 kW and the required power for traction is 4 kW. The coordination is performed by forcing FC and SC to follow the reference powers generated by the proposed transition functions. It is worth noticing that this strategy of switching protects the power sources from high and abrupt currents which may cause damage or reduce their lifetime. Figure 33 shows the DC bus voltage obtained when FC and SC are switched using abrupt switching and the proposed coordinated switching strategy. Abrupt power source switching resulted in voltage fluctuations within a ripple band of   12 volts. However, the use of a coordinated switching strategy for power source switching has minimized DC bus voltage ripples to a narrow band of 3 volts. The proposed coordinated switching strategy minimized up to four times the DC bus ripples compared to classical abrupt switching. Table 6 summarizes the improvement made by the proposed coordinated switching strategy in comparison to abrupt switching. The comparison is made on basis of DC bus voltage fluctuations and transient torque and power ripples. Notice that the proposed switching strategy has resulted in significant minimization of the previously mentioned quantities and this improves vehicle performance and driving comfort.  The percentage overshoot of DC bus voltage is calculated using equation (42). Figure 34 compares the PO V obtained using the proposed coordinated switching strategy to other published works. The proposed coordinated strategy reduced significantly DC bus voltage in comparison to other reference works and resulted in a PO V of 0.35% and this enhances by much HEV performances. Figure 35 compares the transient power peaks obtained using the proposed coordinated switching strategy to those obtained in other published works. Notice that large and harmful transient ripples are noticed in many research papers. In [52] 'p. 10', significant transient power ripples reaching 40 kW are recorded during each SC turn-on and extinction. In [45] 'p. 6', power peak of 30 kW is noticed in FC power during the starting and this may cause its damage. The same transient phenomenon is noticed in [46] 'p.68' where a power large peak of 15kW is noticed during FC starting. The proposed coordinated switching strategy has limited the transient power ripples to a narrow hysteresis band of 600 W.

VI. REAL-TIME RT LAB SIMULATION
In this section, the RT LAB simulator is used to test and validate the real-time feasibility of the proposed coordinated VOLUME 10, 2022 switching used for switching from single to dual traction mode. As it is shown in Figure 36, the first step toward real-time simulation is the model separation. HEV system is split into computation and console blocs. Blocs that contain computations such as the coordination control strategy, HEV model, FC, and SC models are placed on the computation subsystem. Scopes and constants are placed in the console bloc. Each computation subsystem will be executed on one CPU core of the RT simulator. Data between the computation subsystem and console are exchanged asynchronously through the TCP/IP link but data exchange between two computation subsystems is performed synchronously through shared memory. Data from the RT simulator are displayed on the digital oscilloscope using BNC to BNC cable. Figure 37 shows the real-time simulation bench established in our research laboratory in which element 1 represents the host PC, element 2 shows the FPGA-based real-time simulator (OP 5700), and element 3 highlights the unit measurement of a data acquisition interface (OP8660) and element 4 is a digital oscilloscope. The real time results of non-coordinated FC-SC switchings obtained using RT LAB are presented in Figure (38-a). It can be remarked that large and harmful ripples occur each time FC power toggles from P old FC to P new FC . Figure (38-b) shows the results of FC-SC switchings using the proposed coordinated switching strategy. Notice that the coordinated switching strategy has reduced notably the transient power ripples via the exponential-based transition function. This switching strategy compensates for the difference in dynamics between power sources and protects them from abrupt and high currents which may cause their damage. In subsection 4.2, it is said that FC can deliver any predefined percentage of total traction power. This is can be seen in Figure (   FC delivering different percentages of the total required traction power which is set to 7kW. In Q1 the FC delivers all the required traction power whereas at Q2 it is the SC that delivers all the required traction power and FC is off. In Q3, FC delivers 70% of the required power and the SC deliver the  remaining 30%. In Q4, FC delivers 30% of the required power and SC delivers the remaining 70%. At Q5, both FC and SC deliver 50% of the required power. Figure (39-a) shows PMSM2 phase currents when the drive mode is performed without coordinated motor switching. Note that high current ripples occur during motor starting and this produces undesired jerks that reduce vehicle comfort. Figure (39-b) shows PMSM2 phase currents when it is commutated with PMSM1 using the proposed coordinated switching strategy. Note how the phase currents went smoothly from zero to their nominal value without any ripples or jerks which enhances the ride comfort.   It can be seen that as soon as the load torque T L exceeds the threshold set to 80 N.m, c m2 will be turned on and will be equal to 0.5 V, and c m1 will toggle from 1 to 0.5 meaning that both PMSM1 and PMSM2 will ensure 50% of the torque applied on the HEV. Figure (41) and Figure (42) show, respectively, motor switching using a coordinated switching strategy and abrupt switching. It is worth noting that abrupt motor switching resulted in injurious torque percentage overshoots of 69%for PMSM1 and 72% for PMSM2 during the commutation from single to dual traction mode as it is mentioned in Figure 42. On the other hand, the proposed coordinated switching strategy via the use of exponential transition function has provided smooth commutation from single to dual traction mode and vice versa. Figure (41) shows that the torque percentage overshoot for both traction machines is 0%. Furthermore, the rise time of the torque developed by PMSM1 and PMSM2 is 0.09 s, indicating that drive mode switchings are well coordinated.

VII. CONCLUSION
The smart torque allocations investigated in this paper have demonstrated their ability to improve HEV propulsion power while avoiding performance degradation on non-uniform ground surfaces. It was found that PSO and fuzzy torque allocation strategies kept vehicle propulsion power high even on non-uniform ground surfaces and have converted 84∼ 86% of the generated torque into propulsion torque. Thanks to the proposed coordinated switching strategy, DC bus voltage percentage overshoot was reduced to 0.35%, and the injurious power ripples occurring during power source switchings were reduced to a narrow band of 600 W. Furthermore, the transient torque jerks taking place during drive mode commutations were reduced. As further work, it is intended to take advantage of PSO intelligence to ensure an optimal torque distribution will minimize the power drawn from power sources. In addition to that, PSO may also be of great interest if used for maximum energy harvesting during regenerative braking instants.