Modeling and Shift Control of Two-Speed Electric Vehicle

The automotive industry is undergoing a profound transformation as global energy shortages and environmental degradation intensify. In this thesis, I concentrate on the development of a two-speed pure electric vehicle, which is recognized as a practical solution for reducing greenhouse gas emissions and fossil-fuel dependence. The research covers system-level parameter matching, multi-objective gear-ratio optimization, shift schedule development, coordinated shift control, and hardware-in-the-loop validation. Throughout the project, the idea of the electric vehicle has been examined from multiple viewpoints: powertrain architecture, energy efficiency, dynamic performance, and real-time implementation. The findings confirm that a carefully optimized two-speed electric vehicle can substantially outperform a conventional single-speed electric vehicle in both acceleration capability and energy consumption.

The motivation for this work arises from the fact that most existing battery electric vehicles use a single-speed reducer, which forces the motor to operate over an extremely wide speed range. Although this design is simple and inexpensive, it cannot keep the motor inside its high-efficiency zone at all times. In contrast, a two-speed electric vehicle can adjust the transmission ratio according to driving conditions, thus expanding the high-efficiency region of the motor and improving the overall vehicle economy. In my study, the electric vehicle is a commercial van with a gross vehicle weight below 4.5 tonnes, and it is intended to operate both in urban and suburban environments. The design targets include a maximum speed of 100 km/h, a maximum grade of 30%, a 0–100 km/h acceleration time below 12 seconds, and a driving range greater than 250 km.

To establish a fair platform for this research, I first compared single-speed and two-speed powertrain layouts through simulation. The single-speed electric vehicle simulation model was built in MATLAB/Simulink using vehicle dynamic equations and a tested motor map. Simulation results showed that the single-speed design could satisfy the acceleration target but failed to meet the maximum speed and gradeability requirements. This outcome confirmed the necessity of a multi-speed transmission. A two-speed automated manual transmission (AMT) with a parallel-shaft layout was therefore selected. By adding an overdrive gear, the motor can spin at a lower speed during high-speed driving, and by adding a low gear, the motor can deliver increased torque during launch and climbing. The trade-off between performance and efficiency can be balanced through the optimization of gear ratios and shift control logic.

Vehicle Powertrain Architecture and Component Matching

The powertrain of the two-speed electric vehicle that I studied is composed of a permanent magnet synchronous motor (PMSM), a power battery pack, a two-speed AMT, a final drive, and a vehicle control unit (VCU). The PMSMs are widely used in electric vehicles due to their high power density, high efficiency, and excellent controllability. They have also become the mainstream choice for modern electric vehicles, from passenger cars to commercial vehicles, because their torque response is fast and their efficiency map contains a broad flat region. I choose PMSM as the drive motor after comparing several motor technologies, including DC motors, induction motors, and switched reluctance motors. The PMSM not only offers a high efficiency in the range of 90–95%, but also has a large overload capability that supports transient driving demands.

Parameter matching starts with the power requirement of the electric vehicle. According to the longitudinal vehicle dynamics, the power required at the wheels can be expressed as the sum of power to overcome rolling resistance, air drag, and acceleration resistance. For a vehicle climbing an uphill road, the gradient resistance must also be considered. The equation of vehicle motion can be written as:

$$ P_M = \frac{1}{\eta_t} \left[ \frac{m g f u_a \cos\alpha}{3600} + \frac{m g u_a \sin\alpha}{3600} + \frac{C_D A u_a^3}{76140} + \frac{\delta m u_a}{3600} \frac{du_a}{dt} \right] $$

where PM is the motor power in kW, ua is the vehicle speed in km/h, m is the vehicle mass, g is the gravitational acceleration, f is the rolling resistance coefficient, α is the road grade angle, CD is the aerodynamic drag coefficient, A is the frontal area, δ is the rotational mass factor, t is time, and ηt is the driveline efficiency. Based on the vehicle design requirements, I calculated three power conditions:

  • Power for maximal speed on a flat road:

$$ P_{u_{\max}} = \frac{1}{\eta_t} \left( \frac{m g f u_{a\max}}{3600} + \frac{C_D A u_{a\max}^3}{76140} \right) $$

  • Power for climbing maximum grade at a steady low speed:

$$ P_{i_{\max}} = \frac{1}{\eta_t} \left( \frac{m g f u_i \cos\alpha_{\max}}{3600} + \frac{m g u_i \sin\alpha_{\max}}{3600} + \frac{C_D A u_i^3}{76140} \right) $$

  • Power for acceleration from standstill to 100 km/h:

$$ P_{t_{\max}} = \frac{1}{\eta_t} \left( \frac{m g f u_t}{3600} + \frac{C_D A u_t^3}{76440} + \frac{\delta m u_t}{3600 \cdot 1.5} \right) + \frac{m u_t^2}{7200 \eta_t t} $$

The maximum motor power was selected as the largest value among these three calculations. After considering the power rating of available motors and the efficiency characteristics, a PMSM with a peak power of 120 kW, a rated power of 65 kW, a peak torque of 350 N·m, a rated torque of 270 N·m, and a maximum speed of 12,000 r/min was selected. The rated speed is 5,500 r/min, and the voltage range fits the battery pack that I subsequently designed.

For the battery system, a lithium iron phosphate (LiFePO4) battery was chosen due to its high safety, long cycle life, and good thermal stability. The battery pack voltage was set to 540 V to match the motor inverter. The number of cells in series was determined by:

$$ n = \frac{V_t}{V_c} $$

where Vt is the total pack voltage and Vc is the nominal voltage of a single cell. To achieve the target driving range of 250 km, the required total battery energy can be obtained from the energy consumption per kilometer. The final battery pack capacity is 110 kWh, which is built from 150 cells rated at 3.6 V each.

For the gear ratios, I used the maximum gradeability and maximum speed to determine the upper and lower boundaries of the total transmission ratio. The maximum total ratio igmax is chosen so that the driving force on the steepest road exceeds the total resistance, but it must also be limited by the road adhesion so that the wheels do not slip. The minimum total ratio igmin must allow the vehicle to reach its maximum speed at the motor’s maximum speed and still produce enough driving force at that speed. The relevant equations are:

$$ i_{g\max} \geq \frac{r \left( m g f \cos\alpha_{\max} + m g \sin\alpha_{\max} + \frac{C_D A u_i^2}{21.15} \right)}{T_{tq\max} i_0 \eta_t} $$

$$ i_{g\max} \leq \frac{\varphi m g r b}{T_{tq\max} i_0 \eta_t (l – h_g)} $$

$$ i_{g\min} \leq \frac{0.377 n_{\max} r}{u_{a\max}} $$

$$ i_{g\min} \geq \frac{9550 \left( m g f + \frac{C_D A u_{a\max}^2}{21.15} \right) r}{P_{\max} i_0 \eta_t} $$

where r is the tire radius, Ttqmax is the maximum motor torque, i0 is the final drive ratio, nmax is the maximum motor speed, φ is the road adhesion coefficient, l is the wheelbase, b is the distance from the center of gravity to the rear axle, and hg is the center-of-gravity height. Through this initial matching, the initial gear ratios were set to ig1 = 4.55, ig2 = 1.65, and i0 = 6.15, which later became the baseline for the optimization study.

Simulation Platform Development

A forward-facing simulation model of the two-speed electric vehicle was established in MATLAB/Simulink to serve as a virtual testbed for the performance evaluation, gear-ratio optimization, and control strategy design. The model includes six main components: the driving cycle, the driver model, the drive motor model, the battery model, the transmission system model, and the vehicle longitudinal dynamics model. The architecture is forward-looking because the driver compares the target speed with the actual speed and produces accelerator or brake signals that are sent to the VCU. The VCU then commands the motor and the transmission to track the driver’s request. This configuration is suitable for testing logic control algorithms because it captures causality in a realistic way.

The driver model was implemented as a PID controller that outputs a normalized pedal signal. The output is limited to the range [-1,1], where positive values correspond to accelerator pedal action and negative values correspond to brake action. The motor model uses a lookup table based on the measured efficiency map and torque-speed characteristics. Its output torque is limited by both the peak torque envelope and the battery discharge capability. The battery model is based on an equivalent circuit with an ideal voltage source and an internal resistor. The state of charge (SOC) is updated according to:

$$ SOC = SOC_0 – \int_0^t \frac{\eta_y I}{C_0} dt $$

where SOC0 is the initial state of charge, ηy is the battery discharge efficiency, I is the current, and C0 is the total capacity. The transmission model receives the current gear as a discrete signal and outputs the ratio and driveline torque. The gear selection logic is contained in a Stateflow chart, which will be described later. The vehicle model calculates the total resistance forces according to:

$$ F_{res} = m g f \cos\alpha + \frac{C_D A u_a^2}{21.15} + m g \sin\alpha + \delta m \frac{du_a}{dt} $$

By using this simulation platform, the electric vehicle’s performance can be evaluated under various driving cycles such as the China Heavy-Duty Truck Cycle for light trucks (CHTC-LT). This cycle is particularly appropriate for the studied electric vehicle because it includes frequent stops, acceleration, steady speed, and high-speed cruising. It provides a comprehensive benchmark for SOC consumption and motor operating point distributions.

Gear Ratio Optimization with Non-dominated Sorting Whale Optimization Algorithm

The fixed initial gear ratios were chosen from experience and approximate boundary calculations. To better balance the conflict between acceleration performance and energy economy, the gear ratios need to be globally optimized. I considered two objective functions for the Pareto optimization: the time needed to accelerate from 0 to 100 km/h and the SOC consumed over one complete CHTC-LT driving cycle. The design variables are the first gear ratio, the second gear ratio, and the final drive ratio. The problem can be expressed as:

$$ \min F(X) = \left[ F_t(X), F_c(X) \right]^T $$

with X = [ig1, ig2, i0]. The search ranges were set as 4.1 ≤ ig1 ≤ 6.7, 3.4 ≤ ig2 ≤ 4.8, 0.9 ≤ i0 ≤ 1.9, and 2.6 ≤ ig1/ig2 ≤ 4.1. These constraints ensure that the total ratios are within practical limits and that adjacent gear ratios do not cause excessive step jumps.

To reduce the computational cost, I employed the optimal Latin hypercube sampling method to fill the design space with 50 sample points. Each sample was simulated with the full vehicle model to obtain the acceleration time and the SOC consumption. Since the physical simulations are expensive, I approximated the mapping between the design variables and the objective functions with a second-order polynomial regression model. The resulting response surfaces can be written as:

$$ T = a_0 + a_1 i_{g1} + a_2 i_{g2} + a_3 i_0 + a_{11} i_{g1}^2 + a_{22} i_{g2}^2 + a_{33} i_0^2 + a_{12} i_{g1} i_{g2} + a_{13} i_{g1} i_0 + a_{23} i_{g2} i_0 $$

$$ SOC = b_0 + b_1 i_{g1} + b_2 i_{g2} + b_3 i_0 + b_{11} i_{g1}^2 + b_{22} i_{g2}^2 + b_{33} i_0^2 + b_{12} i_{g1} i_{g2} + b_{13} i_{g1} i_0 + b_{23} i_{g2} i_0 $$

All coefficients were estimated from the simulation data using the method of least squares. The coefficient of determination R2 for the acceleration-time response was 0.99871, and for the SOC-consumption response it was 0.99187. This excellent fit confirms that the polynomial model can replace the full simulation model in the optimization process without losing significant accuracy.

The optimization algorithm that I applied is called the Non-dominated Sorting Whale Optimization Algorithm (NSWOA). This algorithm is inspired by the hunting behavior of humpback whales, which includes three strategies: encircling prey, spiral bubble-net feeding, and searching for prey. Each individual whale position in the population represents a candidate gear-ratio vector. The position update for the encircling phase is given by:

$$ \vec{D} = | \vec{C} \cdot \vec{X}^*(t) – \vec{X}(t) | $$

$$ \vec{X}(t+1) = \vec{X}^*(t) – \vec{A} \cdot \vec{D} $$

where X* is the current best solution and A and C are coefficient vectors. For the spiral bubble-net phase, the movement is described by:

$$ \vec{X}(t+1) = \vec{X}^*(t) + \vec{D}’ \cdot e^{b l} \cdot \cos(2\pi l) $$

in which D′ = |X*(t) − X(t)| is the distance between the whale and the prey, b is a constant for defining the logarithmic spiral shape, and l is a random number in [-1,1]. For the random search phase, the position update is:

$$ \vec{D} = | \vec{C} \cdot \vec{X}_{rand} – \vec{X}(t) | $$

$$ \vec{X}(t+1) = \vec{X}_{rand} – \vec{A} \cdot \vec{D} $$

The NSWOA implementation integrates non-dominated sorting and crowding distance calculation, which allow it to handle multiple conflicting objectives simultaneously and to maintain a well-distributed Pareto front. The algorithm parameters were set to a population size of 150 and a maximum iteration count of 200. At every generation, the population was ranked based on Pareto dominance, and the crowding distance was used to preserve diversity. Eventually, a Pareto-optimal front was obtained.

To select the best compromise solution from the Pareto front, I used the combination ordered weighted averaging (COWA) operator and the TOPSIS method. First, the objective values in the Pareto set were normalized. The COWA operator computed the objective weights based on the data dispersion. In this case, the weight of the acceleration time was 58.10% and the weight of SOC consumption was 41.90%. Then, TOPSIS determined the relative closeness of each Pareto solution to the ideal solution. The optimal solution was the one with the highest closeness index. Table 1 presents the top five candidate solutions and their corresponding objective values.

Table 1: Top five Pareto optimal solutions selected by COWA-TOPSIS
Rank ig1 ig2 i0 Acceleration time (s) SOC consumption per cycle (−) Closeness index
1 4.089 1.728 5.820 10.90220 0.05518415 0.904828
2 3.909 1.696 4.100 10.87649 0.05522957 0.904796
3 3.606 1.753 5.855 10.90959 0.05517188 0.904713
4 3.885 1.816 4.334 10.88874 0.05521140 0.904654
5 4.563 1.728 5.820 10.91771 0.05515856 0.904541

As a comparison, I also optimized the same problem with the Multi-Objective Genetic Algorithm (MOGA) with the same population size and iteration number. The NSWOA produced a Pareto front that was more uniformly distributed and had a higher density near the ideal region. Moreover, the global search time of NSWOA was only 18.248 seconds, which is about one-fifth of the time required by MOGA. Table 2 compares the simulation performance before and after the NSWOA-based optimization.

Table 2: Simulation results before and after optimization
Performance indicator Before optimization After optimization Design target
0-100 km/h acceleration time (s) 10.003 10.902 <12
Maximum gradeability (%) 49.9 43.3 >30
Maximum speed (km/h) 102.5 107.3 >100
SOC consumption over CHTC-LT cycle (%) 5.66 5.51
CHTC-LT driving range (km) 278.99 286.68 >250

The optimized electric vehicle has a slightly longer full-throttle acceleration time than the initial configuration because the initial ratio had a larger first-gear ratio. However, the maximum speed is increased and the SOC consumption is reduced. The motor efficiency distribution was plotted after running one CHTC-LT cycle, and I observed that the percentage of operating points with motor efficiency higher than 80% increased by 4.3% after the optimization. This explains the improvement in driving range and shows that the two-speed electric vehicle can move the motor operating points closer to the high-efficiency island.

Shift Schedule Design

The shift schedule determines when the vehicle should change between first and second gear. For the two-speed electric vehicle, a well-designed shift schedule should not only satisfy the driver’s power demand but also improve the energy economy. After analyzing the available options, I selected a dual-parameter shift schedule using vehicle speed and accelerator pedal opening as the scheduling variables. This is the most commonly applied method in modern vehicles because it simultaneously reflects the driver intention and the current vehicle state. It can also be adapted to different driving modes by embedding separate shift curves.

There are three principal families of shift schedules: single-parameter, dual-parameter, and three-parameter schedules. The single-parameter schedule uses only vehicle speed, and although it is simple, it cannot respond to rapid changes in pedal position. The three-parameter schedule uses speed, pedal opening, and acceleration or load, which is more accurate but difficult to calibrate. The dual-parameter schedule balances complexity and performance, and it is especially suitable for the two-speed electric vehicle.

In my design, the dynamic-performance shift schedule was constructed based on the maximum-acceleration criterion. For a given pedal opening, the vehicle acceleration in each gear as a function of speed is derived from the longitudinal dynamics equation. The acceleration in gear g can be expressed as:

$$ a_g = \frac{1}{\delta m} \left[ \frac{T_{tq}(n_{motor}) i_0 i_g \eta_t}{r} – \frac{C_D A u_a^2}{21.15} – m g f \right] $$

The acceleration curves for first and second gear are then plotted and the intersection point gives the speed where shifting from first to second gear yields the same acceleration. Shifting below that speed would give lower acceleration in second gear, whereas shifting above that speed would make second gear superior. By connecting the intersection points for all pedal positions, the dynamic upshift curve is obtained. To prevent frequent gear oscillations, the downshift curve is shifted to lower speeds by 5–10 km/h, creating a hysteresis band. The same procedure was repeated for an economic shift schedule based on the motor efficiency map.

The economic shift schedule is generated by comparing the overall driveline efficiency between first and second gear. The total system efficiency at a given operating point depends on the motor efficiency and the transmission efficiency. Since the transmission efficiency is nearly constant for AMT, the motor efficiency becomes the dominant factor. The motor efficiency is a function of torque and speed: η = f(T, n). By using the efficiency MAP, I plotted curves of vehicle speed versus efficiency for the first and second gears under different pedal positions. The intersection of the two efficiency curves for a fixed pedal position gives a speed where first and second gear produce the same motor efficiency. Therefore, shifting at that point does not degrade efficiency. If the vehicle speed is below the intersection, first gear has higher efficiency; if it is above, second gear is more efficient. By connecting all such intersection points, I obtained the economic upshift curve. A corresponding downshift curve with hysteresis is established as well. Table 3 gives the economic upshift speeds for different accelerator pedal openings.

Table 3: Economic upshift speeds for different accelerator pedal openings
Pedal opening (%) 10 20 30 40 50 60 70 80 90 100
Vehicle speed (km/h) 20.09 23.12 27.82 29.41 28.58 45.44 52.03 69.00 72.89 78.07

A notable observation is that the economic upshift speed does not monotonically increase with pedal opening. This is a consequence of the complex efficiency topology of the electric motor. At low pedal openings, the motor is lightly loaded and its efficiency is low at high speeds. At medium pedal openings, the motor reaches its high-efficiency island and the upshift can occur at moderate speeds. At high pedal openings, torque demand is large, so the higher first gear may keep the motor inside the high-efficiency region at higher speeds. The shift schedule must follow these measured trends instead of using a simple empirical formula.

Driving Mode and Shift Control Strategy

The next step in this research was to embed the shift schedule within a comprehensive vehicle-level control strategy. The VCU receives the driver’s start key, gear selector, accelerator pedal signal, brake pedal signal, and battery SOC, and determines the appropriate driving mode. I defined six modes for the two-speed electric vehicle: parking control mode P, neutral N, reverse R, dynamic mode V, economic mode E, and failure mode F. The state transition among these modes is modeled in Stateflow. The state machine logic is expressed in the following rules:

  • If the vehicle is stationary and the driver selects park, mode P becomes active. The electric parking brake is engaged.
  • If the driver selects neutral, mode N is activated. The motor torque is set to zero and the driveline is disengaged.
  • If the driver engages reverse, the motor rotates in the opposite direction and the gear remains fixed at a constant ratio; no shifting is permitted in reverse.
  • If the vehicle is in drive, the VCU may choose either economic mode or dynamic mode depending on the driver input or a dedicated mode switch. The dynamic mode uses the dynamic shift schedule to maximize acceleration. The economic mode uses the economic shift schedule to minimize energy consumption.
  • If a safety-related sensor fault is detected and the system cannot operate normally, the VCU enters failure mode, also called limp-home mode. In this mode, the motor torque is limited and the transmission is locked in first gear, allowing the driver to bring the electric vehicle to a workshop safely.

The shift process of the two-speed AMT includes three phases: clutch separation, gear synchronization, and clutch engagement. During the clutch separation phase, the motor torque is reduced and the clutch is opened to interrupt power flow. During the gear synchronization phase, the synchromesh device matches the speed of the main and driven gears while the motor speed is adjusted to the target speed. The dynamics equations for the input disc and output disc during separation can be written as:

$$ J_k \ddot{\theta}_k + C_k \dot{\theta}_k = T_e – M_c $$

$$ \left( J_c + \frac{J_v}{i_g^2} \right) \ddot{\theta}_c + \left( C_c + \frac{C_v}{i_g^2} \right) \dot{\theta}_c = -M_f – T_f – \frac{M_v}{i_g^2} $$

During the synchronization phase, the clutch torque is zero and the motor is controlled to track the desired speed of the transmission input shaft. During clutch engagement, the clutch torque is ramped smoothly while the motor torque is restored. The coordination between the clutch and the motor is crucial for minimizing shift jerk and avoiding an uncomfortable driveline oscillation.

The controller for the synchronous phase was implemented with a PI-based speed regulation algorithm. However, the shift decision itself was originally based on static maps. To improve the adaptability of the shifting logic under dynamic driving conditions, I developed a dynamic shift control strategy that combines an Extended Kalman Filter (EKF) with a fuzzy logic controller. The purpose of the EKF is to estimate the vehicle longitudinal speed, acceleration, and road grade in real time, because these quantities cannot always be measured accurately. The vehicle state vector is defined as:

$$ x_k = \begin{bmatrix} u_k \\ a_k \\ \theta_k \end{bmatrix} $$

where uk is the longitudinal velocity, ak is the longitudinal acceleration, and θk is the road grade angle. The control input vector is:

$$ u_k = \begin{bmatrix} T_m \\ F_b \end{bmatrix} $$

with the motor torque Tm and the braking force Fb. The nonlinear process model comes from the vehicle longitudinal dynamics:

$$ f(x_k,u_k) = \begin{bmatrix} v_k + a_k \Delta t \\ \frac{T_m i_0 i_g \eta_t}{m r} – \frac{C_D A v_k^2}{21.15 m} – g f \cos\theta_k – g \sin\theta_k \end{bmatrix} $$

In the EKF algorithm, the prediction equations are:

$$ \hat{x}_{k|k-1} = f(\hat{x}_{k-1|k-1}, u_{k-1}) $$

$$ P_{k|k-1} = F_{k-1} P_{k-1|k-1} F_{k-1}^T + Q $$

where Fk-1 is the Jacobian matrix of the state transition function, Q is the process noise covariance matrix, and P is the error covariance. The Kalman gain is computed as:

$$ K_k = P_{k|k-1} H^T \left( H P_{k|k-1} H^T + R \right)^{-1} $$

with H being the Jacobian of the observation function. The state estimate and covariance are updated via:

$$ \hat{x}_{k|k} = \hat{x}_{k|k-1} + K_k \left( z_k – h(\hat{x}_{k|k-1}) \right) $$

$$ P_{k|k} = \left( I – K_k H \right) P_{k|k-1} $$

The Jacobian matrices are derived from the vehicle model and are populated with the physical parameters of the electric vehicle. This EKF framework allows me to smooth noisy speed sensor measurements and to infer acceleration and road slope in a robust and computationally efficient way.

The fuzzy controller uses the estimated speed and acceleration as inputs, and produces an output variable that represents the desired mode decision between economic shifting and dynamic shifting. Specifically, I define two input linguistic variables: vehicle speed v with three membership functions: L (low), M (medium), H (high); and acceleration a with five membership functions: VS (very small), S (small), M (medium), L (large), VL (very large). The output variable S has two membership functions: Se (economic mode) and Sp (dynamic mode). The output range is normalized between 0 and 1. The fuzzy rule base is summarized in the following table.

Table 4: Fuzzy rule base for shift mode decision
Acceleration \ Speed L M H
VS Se Se Se
S Se Se Sp
M Se Sp Sp
L Sp Sp Sp
VL Sp Sp Sp

The rule surface created with the centroid defuzzification method is used to compute a crisp output value. If the crisp output value is below a lower threshold, the controller applies the economic shift curves; if it is above an upper threshold, the controller applies the dynamic shift curves. In the hysteresis zone around the threshold, the previous shift mode is retained, which avoids unnecessary switching between different shift schedules.

Hardware-in-the-Loop Testing

After the control strategy was verified offline in simulation, I constructed a hardware-in-the-loop (HIL) test platform to validate the real-time response and robustness of the controller. HIL testing is an important step in the V-model development process because it replaces the real vehicle with a virtual model that runs on a real-time processor. This method allows me to test the electronic control unit (ECU) with deterministic timing, repeatable driving cycles, and the ability to inject faults. The platform uses National Instruments (NI) PXI real-time hardware and the VeriStand software environment. The tested ECU is a dedicated VCU that runs the mode-switch and shift control logic. The vehicle Simulink model is compiled into a dynamic link library and loaded into the PXI real-time target. The I/O cards interface the VCU with the virtual electric vehicle through analog, digital, and CAN communication channels.

The HIL testbed includes a PXIe-1062Q chassis, an embedded PXIe-8861 controller, a PXIe-8510 CAN interface board, and several analog I/O boards. Signal conditioning modules adjust voltage levels to match the ECU. A fault-injection unit can simulate short circuits, open circuits, and abnormal voltage levels during the test. The host computer runs NI VeriStand, which manages the real-time application, monitors signals, and records data. The control strategy is developed in MATLAB/Simulink with the ECUCoder toolchain, which generates C code for the target microcontroller. The compiled code is flashed into the VCU through a USBCAN adapter. After flashing, the user interface can modify the calibration parameters and observe live data.

I performed four categories of tests. The first test was mode-switching functionality. The VCU was commanded to switch among parking, neutral, reverse, economic, and dynamic modes every 10 seconds. In addition, a fault was simulated by breaking a sensor signal so that the controller should enter limp-home mode. The recorded digital outputs show that the VCU switched modes instantly and the mode requests matched the state machine outputs. In the fault condition, the controller correctly entered limp-home mode and refused to switch to economic or dynamic modes. No unintended mode transitions were observed.

The second test was the upshift functionality. The vehicle model was initialized in first gear, and a full accelerator pedal command was applied. The motor torque increased quickly and the vehicle began to accelerate. When the vehicle speed reached the upshift line for the given pedal position, the controller issued the upshift command. The speed curve remained smooth because the motor torque was rapidly reduced and restored after gear engagement. The third test was the downshift functionality. The vehicle was initialized in second gear at a speed of 100 km/h and a brake pedal signal was applied. The controller detected that the speed fell below the downshift threshold and commanded a shift to first gear. The gear position data confirmed that the downshift occurred promptly without any oscillation or delay.

The final and most comprehensive test was a complete CHTC-LT driving cycle. The desired speed profile was fed into the driver model, and the controller was required to operate the virtual electric vehicle for 1600 seconds while changing modes and gears in response to the dynamic driving conditions. The measured actual speed closely tracked the target speed, with an average error below 1 km/h. The controller switched between economic and dynamic modes according to the inferred driving load. The gear-shift actions occurred at appropriate moments, and the motor torque and braking torque behaved consistently. The HIL results demonstrate that the two-speed electric vehicle controller is stable under realistic operating conditions and can be deployed in an actual vehicle with high confidence.

Energy Management and Efficiency Analysis

Beyond the control algorithms, the HIL environment enabled me to quantify the benefit of the optimized two-speed electric vehicle concept. I compared the motor operating point distribution from the virtual drive test with that of the initial single-speed configuration. The optimized electric vehicle used a larger proportion of operating points in the region where motor efficiency exceeds 85%. The table below summarizes the simulated motor efficiency distribution before and after the gear-ratio optimization.

Table 5: Motor efficiency distribution comparison
Efficiency range Initial configuration (%) Optimized configuration (%)
>90% 36.2 41.5
85–90% 24.8 26.9
80–85% 14.5 11.8
<80% 24.5 19.8

In the economic mode, the two-speed electric vehicle consumed about 5.51% SOC over the CHTC-LT cycle, corresponding to a range of 286.68 km. The dynamic mode consumed slightly more energy but provided quicker acceleration response when the driver demanded high torque. The fuzzy decision algorithm allows the vehicle to select economic mode during steady urban cruising and dynamic mode during acceleration or climbing, resulting in a good trade-off between range and drivability.

Conclusion and Future Work

In this work, I systematically investigated the modeling, parameter matching, multi-objective gear-ratio optimization, shift schedule design, and real-time control of a two-speed pure electric vehicle. The main contributions of my research can be summarized as follows. First, the powertrain parameters were matched based on the vehicle dynamic requirements, and a complete forward-facing simulation platform was established for the electric vehicle. Through the comparison between single-speed and two-speed layouts, I demonstrated that the two-speed electric vehicle can simultaneously improve the gradeability and the maximum speed without sacrificing economy.

Second, a Non-dominated Sorting Whale Optimization Algorithm was adopted to optimize the transmission ratios. By using polynomial regression models for acceleration time and SOC consumption, the optimization was performed efficiently. The COWA-TOPSIS decision-making method provided a rational compromise between the conflicting objectives. The final ratio combination used in the two-speed electric vehicle resulted in an increased maximum speed, a lower energy consumption, and a higher motor efficiency over the driving cycle. The optimized electric vehicle also met all design targets for acceleration, gradeability, and driving range.

Third, a dual-parameter shift schedule was developed based on both acceleration and efficiency considerations. The shift schedule was embedded in a state machine controller that supports multiple driving modes. To handle dynamic driving conditions more intelligently, I designed an EKF-based state observer combined with a fuzzy controller. This approach allows the electric vehicle to estimate unmeasured states accurately and to choose the shift schedule that best matches the instantaneous driver demand and driving environment. Simulation and HIL tests both verified the validity of this adaptive strategy.

Finally, a hardware-in-the-loop test platform was established with NI PXI systems. Through mode-switching tests, upshift/downshift tests, and full cycle tests, the VCU demonstrated fast response, accurate gear changing, and robust fault handling. The test results confirmed the overall control architecture for the two-speed electric vehicle is suitable for prototype development.

There are several directions for future research. Real-world road tests should be conducted to evaluate the electric vehicle under actual traffic conditions, temperature variations, and driver behavior. More advanced shift control methods that use model predictive control or reinforcement learning could be explored to further reduce shift jerk and energy loss. Extreme conditions such as continuous grade climbing, wet roads, and low SOC operation deserve dedicated studies. Additionally, because the electric vehicle may be used in fleet applications, the powertrain control could be integrated with cloud-based route prediction and cloud-enabled adaptive shift optimization. Despite the remaining work, this thesis provides a strong foundation for the intelligent gear-shift control of a two-speed electric vehicle and contributes to the development of low-carbon transport systems.

Scroll to Top