Modeling and Optimal Shift Control of a Planetary Two-Speed Transmission

To improve the efficiency of electric vehicles (EVs), a planetary two-speed transmission is proposed, which consists of a brushless direct current (BLDC) motor, a turbo-worm reducer, two multi-disc wet brakes, and a Simpson planetary gearset. Based on the devised electronic actuator for shifting, the rotation direction of the BLDC shaft determines the gear ratio of the transmission. For acquiring smooth shift, the state-space equations with control variables of transmission are derived, and a three-stage algorithm is suggested. During the brake engagement process, the optimal control strategy has been developed using linear quadratic regulator control, considering the jerk and friction work of the brake. The simulation results show that the proposed optimal control strategy could reduce the slipping friction work of the brake and improve the shifting quality of EVs. The optimal control trajectory of the BLDC motor was conducted on the electronic shifting actuator bench test.


Introduction
Electric vehicles (EVs) are increasingly used due to internal combustion engine-related air pollution and global warming. Compared with traditional powertrain system, the driving motor of an EV is able to generate constant torque at low speed and constant power at high speed, which agrees with the requirements of EVs [1]. The cruising ranges of EVs are extended by increasing the energy-storage capacity or improving the efficiency of the transmission system. However, most EVs are equipped with a fixed ratio gearbox. For acquiring high speed and acceleration, the power and torque of driving motor need to be high enough.
Reported studies have found that the gear ratio and shift schedule optimization strategies are related to the efficiency of the EVs equipped with transmissions [2][3][4][5]. In the paper, it is shown that the EV with a two-speed transmission has better performance than a fixed ratio gearbox, in terms of acceleration time, maximum speed, and energy economy [6]. Eberleh et al. found that the efficiency in common driving cycles could be increased when a motor coupled with a two-speed transmission is compared to a motor equipped with a fixed ratio gearbox [7]. Sorniotti and Subramanyan compared a conventional single-speed transmission layout, a two-speed layout, and a continuously variable transmission (CVT) layout 1. The two-speed transmission system showed significant advantages over the single-speed layout and CVT layout. Therefore, the EVs, coupled with a two-speed transmission, will become a development trend for enhanced powertrain efficiency.
The layout and optimal shift control of the adoption of the two-speed transmission system for EVs have been performed. At present, there are several types of two-speed transmissions including manual transmissions (MTs) [8], automated manual transmissions (AMTs) [9][10][11], dual-clutch transmissions (DCTs) [12][13][14][15], and automatic transmissions (ATs) [16]. Sorniotti  sprag clutch to the traditional MT, although it is difficult to shift seamlessly due to the MTs' layout [17]. Two clutches are used in a DCT for removing the torque interruption during gear-shifting [18,19]. Ruan et al. [20] developed three case layouts of powertrain system for EVs, and they found that CVT can reduce energy consumption, and manufacturing cost. Actually, the stability of the steel strip restricts the development of the CVT in high power EVs. Shin et al. [16] presented a two-speed Simpson type planetary gearbox. The result of the vibration test, noise test, and transmission efficiency test was obtained, which meet the demand. As we all know, the planetary gear sets system with torque converter changes gear ratios smoothly [21]. The multiple plates clutch with the hydraulic system is often selected as a clutch for planetary transmission. However, the hydraulic system is not available in EVs. Considering the stability and accuracy of the controller, the motor-driven mechanism for gear-shifting is suitable for drive units for EVs, which permits controlling the pressure of the wet clutch with high accuracy. Therefore, it is necessary to develop an electronic actuator for planetary gear sets for a swift and smooth shift.
For acquiring smooth shifting, researches have proposed optimization algorithms for different types of transmissions [22][23][24][25]. Alizadeh et al. [9] designed an observer to estimate the frictional torque transferred during gear-shifting, and the results demonstrated that the feedback control configuration is suitable to improve the shifting performance of the closed-loop system. The experimental study of the transient shift behavior of an EV coupled DCT was undertaken [12]. Using torque based control techniques, it is possible to achieve high-quality gear-shifting. The authors utilized the torque of the powertrain as an optimal shifting control target through deriving dynamic equations. Roozegar and Angeles used polynomial transition functions as the strategy of the angular velocities based on the calculus of variance [26]. The torques of the driving motor and the clutches during gear-shifting were calculated applying the polynomial transition functions based on the motor specifications considering acceleration and jerk. The optimal torque of the motor was proposed by a linear feed-forward control for inverse AMTs, and a mathematical model was developed for multispeed transmissions in EVs [27,28]. The results showed that the dynamic model of the planetary system could be utilized for optimal shifting control with the response of the transmission. Rahimi et al. designed an observer based on the back-stepping control following the optimal trajectory for minimizing shifting time [29,30]. The shifting controller was designed with the separate discrete-time PID, which improves shifting quality even in the condition of disturbances utilizing a genetic algorithm and trial-and-error [31]. This paper shows that the high fidelity mathematical model and adapted algorithm of a gear-shifting actuator could guarantee the performances of shifting. This paper presents the dynamic model of a two-speed transmission, which includes two brakes and an electronic shifting actuator and develops a three-stage (two sliding friction stages and gap stage) gear-shifting control algorithm. The linear-quadratic optimal control is applied to determine the optimal torque for shifting the motor during sliding friction stages. The speed trajectory of the BLDC motor for shifting was found during the shifting process. The remainder of this paper is arranged as follows. Section 2 describes the topology and dynamic model of the proposed shifting actuator. Section 3 presents the deducing process of the optimal controller for gear-shifting using the LQR (linear quadratic regulator) method. The simulation results in AMESim and discussions are presented in Section 4. A conclusion is shown in Section 5.

Statement of Planetary Two-Speed Transmission
The two-speed planetary gear system with electronic actuators was established, as shown in Figure 1. This transmission has a Simpson planetary gearset and two brakes which connect with the ring gears, and the detailed parameters are shown in the Table 1. Based on this structure, the speed ratio was around 2, which achieved a smooth shift easily. When brake 1(B1) engaged, the ring gear of the left planetary system became static, and the planetary system became a differential gear train. When brake 2(B2) engaged, the ring gear of the right planetary system became static, and the gear ratio was the larger one.

Planetary Gear Sets Modeling
According to the Lagrange method, the dynamic model of planetary gear sets is built based on the structure of the two-speed transmission, which includes two sets of planetary gears shown in Figure 2. Considering the generalized meshing equations, there are four constraint equations for the planetary systems, where α 1 represents the angle of the S1 and S2, β 1 represents the angle of C1 and R2, γ 1 represents the angle of pinions in the left planetary, θ 1 represents the angle of R1, β 2 represents the angle of C2 and γ 2 represents the angle of pinions in the right planetary. We assume that there is no sliding between the sun gears and pinions and pinions and ring gears in these two planetary system.
The system has two degrees of freedom (DOF) and (β 2 , α 1 ) is chosen as the set of independent coordinates. Using the constraint equations, it is easy to find the relationship between the remaining coordinates and the independent coordinates.   Based on the kinetic energies equations in terms of each gear, the virtual work of the system with the virtual displacements of the independent coordinates is derived as where the applied torque on the gears due to friction elements is 1 2 s s in It can be seen that the 11 D , 12 D , 21 D , and 22 D are constants from Equation (5) and are almost always non-singular. Therefore, the input and output angular accelerations have a linear relation with the friction torque of brakes and input torque.

Shifting Actuator
The gear-shifting actuator proposed in this paper consists of a BLDC motor, enveloping worm, worm gear with a screw surface, guide mechanism, and two brakes. Compared with hydraulic actuators for shifting, the electronic shifting system has the following advantages: simple structure, comfortable deployment, and fast response. This electronic actuator with a worm gear, which enables large reduction ratios to be achieved, presses the plates of the brake for changing the gear ratio by the BLDC motor. Due to the self-locking characteristics of the worm system, the BLDC motor avoids turning on after the brake is engaged. The BLDC motor drives the worm shafts which rotate following the desired direction, and the range of the worm gear is around 120 degree. The worm gearing and guide mechanisms with helicoid implement translational motion instead of rotation, and it pushes the plates of the brakes for shifting. The structure of the electronic shift system is shown in Figure 3, but the pistons of the brakes are replaced by the guide mechanism with a screw surface. Based on the kinetic energies equations in terms of each gear, the virtual work of the system with the virtual displacements of the independent coordinates is derived as where the applied torque on the gears due to friction elements is T s1s2 = T in , T c1r2 = T b2 , T r1 = T b1 , T c2 = −T f . The equation of dynamics and constraint for two-speed transmission are written in matrix form.
It can be seen that the D 11 , D 12 , D 21 , and D 22 are constants from Equation (5) and are almost always non-singular. Therefore, the input and output angular accelerations have a linear relation with the friction torque of brakes and input torque.

Shifting Actuator
The gear-shifting actuator proposed in this paper consists of a BLDC motor, enveloping worm, worm gear with a screw surface, guide mechanism, and two brakes. Compared with hydraulic actuators for shifting, the electronic shifting system has the following advantages: simple structure, comfortable deployment, and fast response. This electronic actuator with a worm gear, which enables large reduction ratios to be achieved, presses the plates of the brake for changing the gear ratio by the BLDC motor. Due to the self-locking characteristics of the worm system, the BLDC motor avoids turning on after the brake is engaged. The BLDC motor drives the worm shafts which rotate following the desired direction, and the range of the worm gear is around 120 degree. The worm gearing and guide mechanisms with helicoid implement translational motion instead of rotation, and it pushes the plates of the brakes for shifting. The structure of the electronic shift system is shown in Figure 3, but the pistons of the brakes are replaced by the guide mechanism with a screw surface.

The BLDC Motor Used for Shifting
The BLDC motor drives the worm pairs through a coupler, which overcomes the moment of inertia and the moment of friction. The dynamic equation of the BLDC motor displays as follows: where m J is the inertia of the rotor, m ω is the angular velocity, m T is the output torque of the BLDC motor, 0 m T is the torque of the load, and m C is the damping coefficient.

Coupling Model
An elastic coupler connects the output shaft of the BLDC motor and worm shaft, and the torque of the motor transfers to the shaft of the worm by overcoming the inertia moment of the coupler. The torque can be calculated as where si T ω is the input torque of the worm shaft, c J is the inertia of the coupler, and c ω is the angular speed of the coupler.

Worm Gearing with Screw Surface Model
The worm gear with screw surface not only converts the rotation to translation, but the translational motion moves along the screw surface to change the displacement accurately. Thus, the guide mechanism plays the role as a piston to change the working conditions of the brakes. The equivalent dynamic equation of worm gearing system can be presented as follows: where so T ω is the output torque of the worm shaft, s J ω is the inertia of the worm shaft,

The BLDC Motor Used for Shifting
The BLDC motor drives the worm pairs through a coupler, which overcomes the moment of inertia and the moment of friction. The dynamic equation of the BLDC motor displays as follows: where J m is the inertia of the rotor, ω m is the angular velocity, T m is the output torque of the BLDC motor, T m0 is the torque of the load, and C m is the damping coefficient.

Coupling Model
An elastic coupler connects the output shaft of the BLDC motor and worm shaft, and the torque of the motor transfers to the shaft of the worm by overcoming the inertia moment of the coupler. The torque can be calculated as where T ωsi is the input torque of the worm shaft, J c is the inertia of the coupler, and ω c is the angular speed of the coupler.

Worm Gearing with Screw Surface Model
The worm gear with screw surface not only converts the rotation to translation, but the translational motion moves along the screw surface to change the displacement accurately. Thus, the guide mechanism plays the role as a piston to change the working conditions of the brakes. The equivalent dynamic equation of worm gearing system can be presented as follows: where T ωso is the output torque of the worm shaft, J ωs is the inertia of the worm shaft, ω ωs is the angular speed of the worm shaft, T ωgi is the input torque of the worm gear, i is the ratio of the worm gearing, i = ω ωs ω ωg , ω ωg is the angular speed of the worm gear, and η is the transmission efficiency of the worm system.
Analyzing the dynamical performances of the worm gear, the equation of translation along the axis is presented as follows: where M wg is the mass of the worm gear, S wg is the axial displacement of the worm gear, F ws is the support force by the worm, γ is the lead angle of the worm system, F n is the normal force on plates of the brake, F sr is the support force by the guide mechanism, α is the spiral angle between the worm gear and guide mechanism, and C s−wg is the axial damping coefficient. The rotate motion of the worm gear is represented by following dynamical equation.
where J ωg is the inertia of the worm gear, ..
θ ωg is the angular acceleration of the worm gear, T ωg is the driving torque of the worm gear, T f is the friction torque between the worm gear and friction plates, R cp is the equivalent radius of the friction plates, and C ωg is the damping coefficient of the rotation motion.
Since the worm gear contacts with guide mechanism invariably, the geometric constraint between the rotation motion and translation motion is stated by the following equation, which is related to the screw pitch and lift range. The dynamical equation of worm gear could deduce by the mentioned Equations (10)- (12).

Modeling of Multi-Disc Wet Brakes
The guide mechanism driven by the worm gear presses the friction plates to shift gears. The force of friction plates is analyzed in the following: where M cp is the mass of the friction plates, S cp is the displacement of the plates, and C cp is the damping coefficient. When the guide mechanism is not in contact with friction plates, the support force is zero. While the guide mechanism presses the plates, the static friction torque T c f is shown as: where µ c is the coefficient of the kinetic friction coefficient of static friction, N is the number of plates, and R 0 and R 1 are the radius of external diameter and inner diameter, respectively. The friction plates are copper-based, and the coefficient of kinetic friction is 0.06-0.08, and the maximum coefficient of static friction is 0.1-0.13. The model of the brake considers the change in the coefficient of friction in off-going states and on-coming states, but the heat loss during sliding mode and the friction resistance by oil stickiness are neglected. Since the normal pressure of plates is difficult to measure during shifting, the displacement of the guide mechanism could be used to judge the state of the brake.

Optimal Trajectories in the Gear-Shifting Process
The proposed optimal controller for gear-shifting is elaborated in this section. Assuming fixed drag torque during shifting, the driving torque is decided by the angle of acceleration pedal. According to the indexes of shifting quality, the jerk and sliding friction work, the performance index function is designed by the state equations described in Section 2.1. The optimal quadratic control is applied to obtain the shifting controller.

Problem Statement of Gear-Shifting
Based on the structure of an electronic shifting actuator, the shifting process includes brake off-going stage, gap stage, and brake on-coming stage. Since there is no pressure applied on the plates, the friction torques of B1 and B2 remain zero during the gap mode, T b1 = 0, T b2 = 0. However, friction heat is produced by the plates during the brake off-going stage and on-coming stage. The friction works of brakes are T b1 0 and T b2 = 0 when B1 remains in sliding mode. During B2 working in the off-going stage and on-coming stage, the torques of friction of B1 and B2 are T b1 = 0 and T b2 0, respectively. Therefore, the brake off-going stage and on-coming stage take a long time for smooth shifting, and the gap stage should take a short time for avoiding interruption. The friction torque of the brakes during the off-going stage and on-coming stage are calculated by Equation (14), which corresponds to the torque of the BLDC motor, given the parameters of the brake and support force of the guide mechanism. To improve the shifting quality and reduce shifting time, the performance indexes include the friction work of the brakes and jerk of EVs. Building the quadratic optimal controller, the optimal trajectory of torque for brakes, T b1 and T b2 , are obtained during shifting.
To improve the shift quality, the optimal quadratic control would be applied for the off-going stage and on-coming stage. During shifting, the torque of the driving motor changes in different stages. Then the driving motor works following the speed closed-loop and the two-speed transmission begins a down shift when the speed increases to the objective value n 2 . The driving motor operates by direct torque close-loop control after shifting. The control strategy of the driving motor is shown in Figure 4a, and Figure 4b shows the speed control strategy of the BLDC motor during shifting. dex function is designed by the state equations described in Section 2.1. The optimal quadratic ontrol is applied to obtain the shifting controller.

.1. Problem Statement of Gear-Shifting
Based on the structure of an electronic shifting actuator, the shifting process includes brake ff-going stage, gap stage, and brake on-coming stage. Since there is no pressure applied on the lates, the friction torques of B1 and B2 remain zero during the gap mode, owever, friction heat is produced by the plates during the brake off-going stage and on-coming age. The friction works of brakes are 1 T 0 b ≠ and 2 T 0 b = when B1 remains in sliding mode. uring B2 working in the off-going stage and on-coming stage, the torques of friction of B1 and B2 re 1 T 0 = b and 2 T 0 b ≠ , respectively. Therefore, the brake off-going stage and on-coming stage take long time for smooth shifting, and the gap stage should take a short time for avoiding interruption. he friction torque of the brakes during the off-going stage and on-coming stage are calculated by quation (14), which corresponds to the torque of the BLDC motor, given the parameters of the rake and support force of the guide mechanism. To improve the shifting quality and reduce ifting time, the performance indexes include the friction work of the brakes and jerk of EVs.
uilding the quadratic optimal controller, the optimal trajectory of torque for brakes, 1 b T and 2 b T , re obtained during shifting.
To improve the shift quality, the optimal quadratic control would be applied for the off-going age and on-coming stage. During shifting, the torque of the driving motor changes in different ages. Then the driving motor works following the speed closed-loop and the two-speed ansmission begins a down shift when the speed increases to the objective value 2 n . The driving otor operates by direct torque close-loop control after shifting. The control strategy of the driving otor is shown in Figure 4a, and Figure 4b shows the speed control strategy of the BLDC motor uring shifting.  Generally, the performance indexes of brake consist of jerk and friction work, which influence the shifting quality and the work-life of the brakes. The value of the jerk would make i uncomfortable for passengers, and it also has an adverse effect on the powertrain system. Therefore the jerk during shifting should be in a certain range, which is given as To evaluate the jerk during shifting, 1 g is the performance index, which is represented by where t is the time of shifting. In addition, the friction work has a relationship with the work-life of the brakes, which is expressed as Generally, the performance indexes of brake consist of jerk and friction work, which influence the shifting quality and the work-life of the brakes. The value of the jerk would make it uncomfortable for passengers, and it also has an adverse effect on the powertrain system. Therefore, the jerk during shifting should be in a certain range, which is given as where To evaluate the jerk during shifting, g 1 is the performance index, which is represented by g 1 = t 0 j 2 dt, where t is the time of shifting. In addition, the friction work has a relationship with the work-life of the brakes, which is expressed as where t 1 is the time of B1 for off-going, t 2 is the time of B2 for on-coming, and w r is the angular speed of the plates. Since there is a trade-off between the friction work and jerk during shifting, the expression of the comprehensive evaluation index can be represented as where α is a weighting coefficient, (0 < a < 1). When α is a large value, it is shown that the jerk takes a greater proportion during shifting, and it is easy to balance the proportion of friction work and jerk by tuning the coefficient. With regard to the weighting coefficient, α, we tune the coefficient to make the maximum values of the integral of the jerk during shifting close to the value of the friction work.

Optimal Trajectory Control for Brakes
We set the state variables as X = x 1 x 2 x 3 and control variable as U = [u], where the state variables are presented by and control variable is given as u = dT b1 dt . Therefore, the state equation could be expressed by . X = AX + BU + V, where A is the coefficient matrix of the state variables, B is the coefficient matrix of control variables and V is interference matrix which depends on the torque of the driving motor and the resistance torque of the vehicle. Because the matrix [ B AB A 2 B ] is a non-singular matrix, the system is completely controllable.

The B1 Off-Going Stage
When B1 works in the off-going stage, the coefficient matrix of the state equation could be deduced by Equation (5), where Because the matrix [ B AB A 2 B ] is a non-singular matrix, the system is completely controllable. The cost function is selected as The linear-quadratic function can be expressed by J = (X(t) T QX(t) + U(t) T RU(t))dt, and R = αa 3 2 , and the designed Hamilton's function is H = (X(t) T QX(t) + U(t) T RU(t) + λ T (AX(t) + BU(t) + V))dt where λ(t) is the Lagrange multiplier.
When the shifting ends, the torque of the brakes should be 0, which means the terminal constraint is x 3 (t n ) = 0. Applying the principle of the minimum, the undetermined matrix is represented based on the state of the final value and terminal constraints.
The objective for optimal control is to find the trajectory of friction torque for the brakes while minimizing the cost function. Since there is an interference matrix, the related matrix should be substituted into the equation U(t) = −R −1 B T λ(t). The solved control variables matrix is the optimal trajectory of friction torque for B1 during the off-going stage, and the process of the solving process is developed by a quadratic problem with disturbance.

The Gap Stage
The initial state and terminal state of the angular displacement of the BLDC motor output shaft, s(t f ) = 0. The angular velocity of the motor tracks the optimal trajectory, which falls in the field of the calculus of variations. Researchers found that a quintic polynomial has good performances during shifting. Therefore, the quintic polynomial, s = ax 5 + bx 4 + cx 3 + dx 2 + ex 1 + f , could be used as the optimal trajectory during the gap mode for the angular velocity of the BLDC motor. According to the constraints of initial and terminal states, the trajectory can be calculated by s(t) = 6t 5 − 15t 4 + 10t 3 shown in Figure 5, World Electric Vehicle Journal 2019, 10, 53 10 of 17 The initial state and terminal state of the angular displacement of the BLDC motor output shaft, ( ) s t should follow the equations The angular velocity of the motor tracks the optimal trajectory, which falls in the field of the calculus of variations. Researchers found that a quintic polynomial has good performances during shifting. Therefore, the quintic polynomial, 0 58 -

The B2 On-Coming Stage
The state equation of B2 is related to the dynamic function of planetary system P2, which is the same as the off-going stage. The state variables include w r2 , w m , and w b2 , and the control variable is dT b2 dt , where the state variable is represented by

187.8
] is a non-singular matrix, the system is completely controllable. According to the state matrix of the gear-shifting system, the optimal quadratic algorithm is applied to solve the trajectory of angular velocity for the BLDC motor. Since there is limited shifting time and computational capabilities, the trajectory can be fitted in different conditions, which are saved into the controller. The optimal trajectory can be found rapidly for real-time control.
For improving the shift quality, the optimal controller is designed based on quadratic optimization in this section for the down shifting process. As mentioned, there are three stages of shifting, and the linear-quadratic optimization is applied for the B1 off-going stage and B2 on-coming stage. The optimal control rate of the brakes is calculated by the quadratic algorithm, where VP(t) is the feedback matrix and the gain of the controller.
where, P ij is the elements of matrix P and r is the parameter of matrix R. Therefore, the control variable u is given as Following the main steps in Figure 6, the optimal trajectory of state variable could be obtained based on the Riccati matrix. For improving the shift quality, the optimal controller is designed based on quadratic optimization in this section for the down shifting process. As mentioned, there are three stages of shifting, and the linear-quadratic optimization is applied for the B1 off-going stage and B2 on-coming stage. The optimal control rate of the brakes is calculated by the quadratic algorithm, where ( ) VP t is the feedback matrix and the gain of the controller. 13 23 where, is the elements of matrix P and r is the parameter of matrix R . Therefore, the control variable u is given as Following the main steps in Figure 6, the optimal trajectory of state variable could be obtained based on the Riccati matrix. According to the optimal control algorithm, the controller diagram of electronic actuators is shown in Figure 6. Because the shifting process lasts only for a short time, it is impossible to solve the optimal trajectory by optimal quadratic control for the BLDC motor in that process. We calculated the parameters ( ) VP t and ( ) W t in different shifting conditions, then they were fitted by a polynomial function. Those fit coefficients are saved in the control unit, which is used to fit the control policy during real-time control.

Simulation Results and Discussions
The dynamic model of EVs included the power system module, two-speed transmission, vehicle system, and driver-environment module, which were built in AMESim. The simulation model of EVs is shown in Figure 7.  According to the optimal control algorithm, the controller diagram of electronic actuators is shown in Figure 6. Because the shifting process lasts only for a short time, it is impossible to solve the optimal trajectory by optimal quadratic control for the BLDC motor in that process. We calculated the parameters VP(t) and W(t) in different shifting conditions, then they were fitted by a polynomial function. Those fit coefficients are saved in the control unit, which is used to fit the control policy during real-time control.

Simulation Results and Discussions
The dynamic model of EVs included the power system module, two-speed transmission, vehicle system, and driver-environment module, which were built in AMESim. The simulation model of EVs is shown in Figure 7. For improving the shift quality, the optimal controller is designed based on quadratic optimization in this section for the down shifting process. As mentioned, there are three stages of shifting, and the linear-quadratic optimization is applied for the B1 off-going stage and B2 on-coming stage. The optimal control rate of the brakes is calculated by the quadratic algorithm, where ( ) VP t is the feedback matrix and the gain of the controller. 13 23 where, is the elements of matrix P and r is the parameter of matrix R . Therefore, the control variable u is given as Following the main steps in Figure 6, the optimal trajectory of state variable could be obtained based on the Riccati matrix. According to the optimal control algorithm, the controller diagram of electronic actuators is shown in Figure 6. Because the shifting process lasts only for a short time, it is impossible to solve the optimal trajectory by optimal quadratic control for the BLDC motor in that process. We calculated the parameters ( ) VP t and ( ) W t in different shifting conditions, then they were fitted by a polynomial function. Those fit coefficients are saved in the control unit, which is used to fit the control policy during real-time control.

Simulation Results and Discussions
The dynamic model of EVs included the power system module, two-speed transmission, vehicle system, and driver-environment module, which were built in AMESim. The simulation model of EVs is shown in Figure 7. With NEDC (new European driving cycle) drive cycle, the input of the model was the desired velocity of the vehicle, and the difference between the desired value and actual velocity exported the signals of acceleration and brake to the drive-environment module. In addition, the vector control method was applied to the driving motor by the PI control for angular velocity and torque. The states of the driving motor followed the desired torque and angular velocity by adjusting the current when the desired torque and actual torque were compared. The shifting controller of the BLDC motor was similar to the driving motor controller, and the PI control was used to track the objective curve for gear-shifting. Actual values of the powertrain system parameters are given in the Nomenclature. During the NEDC drive cycle, the simulation results showed that the velocity of the vehicle followed the desired value, which consisted of three times upshifts and downshifts.

Simulation Results Following NEDC Drive Cycle
Based on the simulation result with the NEDC drive cycle, we chose the first downshift, which is shown in Figure 8 by an arrow. Two control policies were applied during downshift, and one is named the original control, which used the BLDC motor speed fitted by the 3-4-5 polynomial mentioned in Section 4.2 during shifting. The other is the optimal control, which used the BLDC motor speed calculated by the optimal quadratic algorithm during the sliding stages and the shifting speed fitted by the 3-4-5 polynomial during the gap stage. With NEDC (new European driving cycle) drive cycle, the input of the model was the desired velocity of the vehicle, and the difference between the desired value and actual velocity exported the signals of acceleration and brake to the drive-environment module. In addition, the vector control method was applied to the driving motor by the PI control for angular velocity and torque. The states of the driving motor followed the desired torque and angular velocity by adjusting the current when the desired torque and actual torque were compared. The shifting controller of the BLDC motor was similar to the driving motor controller, and the PI control was used to track the objective curve for gear-shifting. Actual values of the powertrain system parameters are given in the Nomenclature. During the NEDC drive cycle, the simulation results showed that the velocity of the vehicle followed the desired value, which consisted of three times upshifts and downshifts.

Simulation Results Following NEDC Drive Cycle
Based on the simulation result with the NEDC drive cycle, we chose the first downshift, which is shown in Figure 8 by an arrow. Two control policies were applied during downshift, and one is named the original control, which used the BLDC motor speed fitted by the 3-4-5 polynomial mentioned in Section 4.2 during shifting. The other is the optimal control, which used the BLDC motor speed calculated by the optimal quadratic algorithm during the sliding stages and the shifting speed fitted by the 3-4-5 polynomial during the gap stage. The BLDC motor speed follows the curve shown in Figure 4b, which is called the original control. The angular velocity followed the desired velocity based on the optimal quadratic algorithm when the simulation results of the original control and optimal control were compared. The controller of the BLDC motor had a swift response for tracking drive cycle. During the first down-shifting, the maximum jerk with the optimal controller reduced by 35%. As can be seen from Figure 8, the indexes of shifting quality have degraded gracefully, which led to acquiring a smooth and swift shift by tracking the desired trajectory.

Verification for Optimal Control Trajectory
According to the optimal angular velocity of the BLDC motor, the testbed of the actuator for shifting in our lab is shown in Figure 9. The output shaft of the BLDC motor connects the worm shaft, and the brakes system was neglected. In the test, the controller of the BLDC motor outputs optimized angular velocity, which was measured and shown on a computer. To drive the BLDC motor, the NI-CRIO was adopted as the main controller. LabVIEW was applied for communications between the computer and the NI-CRIO NI9401 boards for data acquisition. The test bench is shown in the Figure 10. The BLDC motor speed follows the curve shown in Figure 4b, which is called the original control. The angular velocity followed the desired velocity based on the optimal quadratic algorithm when the simulation results of the original control and optimal control were compared. The controller of the BLDC motor had a swift response for tracking drive cycle. During the first down-shifting, the maximum jerk with the optimal controller reduced by 35%. As can be seen from Figure 8, the indexes of shifting quality have degraded gracefully, which led to acquiring a smooth and swift shift by tracking the desired trajectory.

Verification for Optimal Control Trajectory
According to the optimal angular velocity of the BLDC motor, the testbed of the actuator for shifting in our lab is shown in Figure 9. The output shaft of the BLDC motor connects the worm shaft, and the brakes system was neglected. In the test, the controller of the BLDC motor outputs optimized angular velocity, which was measured and shown on a computer. To drive the BLDC motor, the NI-CRIO was adopted as the main controller. LabVIEW was applied for communications between the computer and the NI-CRIO NI9401 boards for data acquisition. The test bench is shown in the Figure 10  The speed regulation of the BLDC motor was adjusted by the PWM wave through LabVIEW. The duty ratio of the PWM wave had a linear relationship with the angular velocity after testing with different loads for the worm gear with a screw surface and the worm system. Tracking the optimal angular velocity of the BLDC motor, the velocity mode was adopted to follow the optimal trajectory obtained with the quadratic algorithm. Figure 11a,b represent the measured result of the actual rotary angle and the error between the actual angle and desired angle. Due to the inhibiting device for the actuator, the error did not exist at the end of the test. The maximum value of the error appeared at the end of the gap stage when the polynomial was applied, and it began to decrease along with the optimal torque control. Since the impact often happened in the off-going stage and on-coming stage, the maximum error of angular velocity failed to influence the shifting quality. The testbed verified the track effect with optimal quadratic control, and the response of BLDC motor achieved the real demands.  The speed regulation of the BLDC motor was adjusted by the PWM wave through LabVIEW. The duty ratio of the PWM wave had a linear relationship with the angular velocity after testing with different loads for the worm gear with a screw surface and the worm system. Tracking the optimal angular velocity of the BLDC motor, the velocity mode was adopted to follow the optimal trajectory obtained with the quadratic algorithm. Figure 11a,b represent the measured result of the actual rotary angle and the error between the actual angle and desired angle. Due to the inhibiting device for the actuator, the error did not exist at the end of the test. The maximum value of the error appeared at the end of the gap stage when the polynomial was applied, and it began to decrease along with the optimal torque control. Since the impact often happened in the off-going stage and on-coming stage, the maximum error of angular velocity failed to influence the shifting quality. The testbed verified the track effect with optimal quadratic control, and the response of BLDC motor achieved the real demands. The speed regulation of the BLDC motor was adjusted by the PWM wave through LabVIEW. The duty ratio of the PWM wave had a linear relationship with the angular velocity after testing with different loads for the worm gear with a screw surface and the worm system. Tracking the optimal angular velocity of the BLDC motor, the velocity mode was adopted to follow the optimal trajectory obtained with the quadratic algorithm. Figure 11a,b represent the measured result of the actual rotary angle and the error between the actual angle and desired angle. Due to the inhibiting device for the actuator, the error did not exist at the end of the test. The maximum value of the error appeared at the end of the gap stage when the polynomial was applied, and it began to decrease along with the optimal torque control. Since the impact often happened in the off-going stage and on-coming stage, the maximum error of angular velocity failed to influence the shifting quality. The testbed verified the track effect with optimal quadratic control, and the response of BLDC motor achieved the real demands.

Conclusions
Due to the complex structure of a clutch compared to brakes, a planetary two-speed transmission was designed for EVs, which was only coupled with brakes instead of clutches. The optimal control for the shifting process of an electronic actuator with a screw surface was proposed. By using the Lagrange method, the dynamics model of the designed planetary two-speed transmission and electronic actuator model were developed. Then, a three-stage optimal control algorithm was developed considering different stages for gear-shifting. The controllers of the BLDC motor were designed using quadratic optimal control theory for off-going and on-coming stages, and variation calculus for the angular velocity was applied in the gap stage. The optimal torque trajectories were proposed by using the quadratic method considering the external disturbances during sliding friction stages. When jerks and friction work of the brakes were compared, it was concluded that the optimal quadratic control for torque improved the shifting quality for EVs. Based on the test bench of the electronic actuator, experimental results demonstrated that the optimal trajectory could be achieved by the designed controller of the BLDC motor.

Conclusions
Due to the complex structure of a clutch compared to brakes, a planetary two-speed transmission was designed for EVs, which was only coupled with brakes instead of clutches. The optimal control for the shifting process of an electronic actuator with a screw surface was proposed. By using the Lagrange method, the dynamics model of the designed planetary two-speed transmission and electronic actuator model were developed. Then, a three-stage optimal control algorithm was developed considering different stages for gear-shifting. The controllers of the BLDC motor were designed using quadratic optimal control theory for off-going and on-coming stages, and variation calculus for the angular velocity was applied in the gap stage. The optimal torque trajectories were proposed by using the quadratic method considering the external disturbances during sliding friction stages. When jerks and friction work of the brakes were compared, it was concluded that the optimal quadratic control for torque improved the shifting quality for EVs. Based on the test bench of the electronic actuator, experimental results demonstrated that the optimal trajectory could be achieved by the designed controller of the BLDC motor.