## 2 Materials and Methods
### PMSM Dynamic Modeling  
The three-phase supply voltages and currents are related as expressed in [35; 44] as follows:  
\[\begin{cases}V_{A}=\frac{d}{dt}\Psi_{A}+I_{A}R_{s}\\ V_{B}=\frac{d}{dt}\Psi_{B}+I_{B}R_{s}\\ V_{C}=\frac{d}{dt}\Psi_{C}+I_{C}R_{s}\end{cases} \tag{16}\]  
where \(\Psi_{A}\), \(\Psi_{B}\), \(\Psi_{C}\) are the flux linkages [Weber], \(I_{A}\), \(I_{B}\), \(I_{C}\) are the phase currents [A], \(R_{s}\) is the phase resistance [\(\Omega\)]. If \(L_{s}\) is the phase inductance [H], the rotor coupling flux linkage is expressed as in [44] as:  
\[\begin{cases}\Psi_{A}=L_{s}I_{A}+\Psi_{r}\cos\theta\\ \Psi_{B}=L_{s}I_{B}+\Psi_{r}\cos(\theta-\frac{2\pi}{3})\\ \Psi_{C}=L_{s}I_{C}+\Psi_{r}\cos(\theta+\frac{2\pi}{3})\end{cases} \tag{17}\]  
However, using the \(d_{q}\) reference frame, the model of the PMSM can be represented in \(d_{q}\) rotating reference frame:  
\[\begin{cases}V_{q}=R_{s}I_{q}+\omega_{r}\lambda_{d}+\frac{d}{dt}\lambda_{q}\\ V_{d}=R_{s}I_{d}-\omega_{r}\lambda_{q}+\frac{d}{dt}\lambda_{d}\end{cases} \tag{18}\]  
where:  
\[\begin{cases}\lambda_{q}=L_{q}I_{q}\\ \lambda_{d}=L_{d}I_{d}+\lambda_{r}\end{cases} \tag{19}\]  
Therefore, Equation (18) becomes:  
\[\begin{cases}V_{q}=R_{s}I_{q}+\omega_{r}(L_{d}I_{d}+\lambda_{r})+\frac{d}{dt}L _{q}I_{q}\\ V_{d}=R_{s}I_{d}-\omega_{r}L_{q}I_{q}+\frac{d}{dt}(L_{d}I_{d}+\lambda_{r})\end{cases} \tag{20}\]  
Therefore, the electromagnetic torque [Nm] in this type of electric motor is expressed as follows:  
\[T_{e}=\frac{3}{2}\frac{P}{2}\big{(}\psi_{r}I_{q}+\big{(}L_{d}-L_{q}\big{)}I_{d }I_{q}\big{)} \tag{21}\]  
where \(P\) in Equation (22) is the number of pole and for the PMSM, the d-axis inductance is equal to the q-axis inductance [H]. Therefore, Equation (22) becomes:  
\[T_{e}=\frac{3}{2}\frac{P}{2}\big{(}\psi_{r}I_{q}\big{)} \tag{22}\]  
The PMSM field oriented control (FOC) approach was studied in detailed and adapted from [44]. Table 5 presents the technical specification of the PMSM and Table 6 presents its four quadrant operation.  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Parameter** & **Value** & **Symbol [Unit]** \\ \hline Motor Maximum Power & 82.3 & \(P_{m}\) [kW] \\ Motor Maximum Torque & 173 & \(T_{m}\) [Nm] \\ Motor Maximum Speed & 8000 & \(\omega_{m}\) [ppm] \\ Time Constant & 0.02 & \(\tau\) [s] \\ Series Resistance & 0 & \(R_{s}\) [\(\Omega\)] \\ Rotor Inertia & 0.00039 & \(I_{r}\) [kg \(\cdot\) m\({}^{2}\)] \\ Rotor Damping & 0.00001 & \(D_{r}\) [Nm \(\cdot\) s/rad] \\ \hline \hline \end{tabular}
\end{table}
Table 5: PMSM Technical Specifications [35].  
The four quadrant operation of the motor is used when the vehicle is accelerating or decelerating. When the vehicle accelerates, the motor operates in the first quadrant, and its speed and torque are both positive. In this way, the motor converts electrical energy into mechanical rotational motion, supporting the vehicle's movement. When the car decelerates, the motor acts as a generator and converts the mechanical energy into electrical energy, thus opposing the vehicle's motion. The electrical losses of the three-phase model were used to simulate the electric car at the system level, which captures the behavior of the complex model.  
Electric Mode Gearbox Design and Gearshift  
Table 7 presents the initial parameters of the gearbox and how it was used to obtain the new gear ratio of the e-motor mode such as 1.54, 3.4, and 2.33. A Single-speed gearbox was designed for the simulated hybrid model with respect to the different test profile.  
Figure 10 shows the location of the new gearbox designed located at the real wheel of the vehicle.