# Off-Line Optimization Based Active Control of Torsional Oscillation for Electric Vehicle Drivetrain
## 4 Results and Discussion  
The proposed anti-oscillation active control algorithm is tested on a business software AMEsim(r), with identical sample time of MATLAB. A drivetrain model is established on AMEsim(r) based on parameters and drivetrain structure of an electric vehicle, and parameters of controller is calculated and optimized by MATLAB off-line. The performance of optimized system is compared with unloading motor torque directly and other arbitrary parameters. In order to make the simulation test more realistic, external characteristic of permanent magnet synchronous motor (PMSM) is considered, as shown in Figure 7, which limits the torque command according to the peak torque limit, and the efficiency map related to energy consumption; also, while it is not discussed in this article, some critical parameters are shown in Table 3.  
The critical parameters are listed as the following Table 4.  
The test is conducted on the condition when the AMT receive a signal of shifting in the 3 rd second, the motor is triggered to unload torque dynamically from initial 80 Nm as normal driving force. The first gear engaged is considered for instance, drag torque \(l\) is set to 60 Nm constantly. Figure 8 shows the process of evolution of 100 generations. Because the optimization is quite time-consuming, this searching for the optimal parameter is finished off-line. The optimal \(\eta\) will be searched out \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Parameter** & **Configuration** & **Parameter** & **Configuration** \\ \hline \(m\) & 1500 kg & \(r\) & 0.29 m \\ \(i_{t}\) & 3.4545 & \(i_{f}\) & 4.831 \\ \(k\) & 246,371 Nm/rad & \(J_{m}\) & 0.05 kg\(\cdot\)m\({}^{2}\) \\ \(l_{1}\) & 0.01055 kg\(\cdot\)m\({}^{2}\) & \(l_{2}\) & 128.15 kg\(\cdot\)m\({}^{2}\) \\ \(d\) & 9.549 Nm/(rad/s) & \(d_{1}\) & 0.2 Nm/(rad/s) \\ \(d_{2}\) & 31.17 Nm/(rad/s) & - & - \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Critical parameters of EV drivetrain. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Parameter** & **Configuration** & **Parameter** & **Configuration** \\ \hline Encoding & real code & Crossover Fraction & 0.4 \\ Population Size & 100 & Generations & 100 \\ Elite Amount & 10 & Mutation Function & constrained mutation \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Configuration parameters of genetic algorithm (GA). \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Parameter** & **Configuration** & **Parameter** & **Configuration** \\ \hline maximum power & 60 kW & maximum torque & 150 Nm \\ maximum speed & 9000 rev/min & - & - \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Configuration parameters of permanent magnet synchronous motor (PMSM). Figure 7: External characteristic of permanent magnet synchronous motor. if the fitness namely fitness function \(f\) reaches the minimum value. The pink mark is average fitness function of a population with 100 individuals in one generation, and the blued mark is the corresponding best fitness function value. From Figure 8, it can be observed that after revolution of about 20 generations, the best fitness is getting convergent and keep stable, so optimization results of the fitness function with the optimized \(\eta~{}=~{}9.8912\) is obtained. The optimal feedback gains is shown as follows. \[\mathbf{K_{c}}~{}=~{}\left[~{}-5072.2~{}~{}~{}-45~{}~{}~{}2.5~{}\right],K_{0}~ {}=~{}6.8523\times 10^{-7},~{}K_{l}~{}=~{}-0.0052.\]  
As a result of the physical characteristics of the motor, such as inertia of motor rotor, the torque output cannot actually be identical with the torque command as shown in Figure 9. It can be observed that motor torque output decreases dynamically instead of decreasing to zero directly, and friction moment, damping moment, inertia moment etc. are surmounted to decrease transmission torque \(\tau\), steady-state torque value compensates for large load torques due to losses and inertia.