2.3.1. Electric Machine Model

The electric machine model is applicable for modeling a motor or generator. The model uses a first-order inertia link to represent the response delay between the output and the target torque. The dynamic output is also limited by the voltage range, maximum current, and external characteristic torque, which can be denoted by

$$T\_{\rm em} = \begin{cases} \min(T\_{\rm em,ul\nu}, T\_{\rm em,cl\nu}, T\_{\rm em,max}) & \text{motor mode} \\ \max(T\_{\rm em,ul\nu}, T\_{\rm em,cl\nu}, T\_{\rm em,max}) & \text{generator mode} \end{cases} \tag{5}$$

$$T\_{\rm em,ul} = \begin{cases} T\_{\rm em,cmd} \cdot \frac{1}{1 + \tau\_{\rm em}s} & \mathcal{U}\_{\rm em,min} \le \mathcal{U}\_{\rm em} < \mathcal{U}\_{\rm em,max} \\ 0 & \mathcal{U}\_{\rm em} < \mathcal{U}\_{\rm em,min} \text{ or } \mathcal{U}\_{\rm em} \ge \mathcal{U}\_{\rm em,max} \end{cases} \tag{6}$$

$$T\_{\rm em,cl} = \begin{cases} lL\_{\rm em}I\_{\rm em,max}/\alpha\_{\rm em} & \text{motor mode} \\ -lL\_{\rm em}I\_{\rm em,max}/\alpha\_{\rm em} & \text{generator mode}' \end{cases} \tag{7}$$

$$T\_{\rm em,max} = \begin{cases} T\_{\rm em,max}^{\rm dr}(\omega\_{\rm em}) \cdot \frac{1}{1 + \tau\_{\rm em}\varepsilon} & \text{motor mode} \\ T\_{\rm em,max}^{\rm br}(\omega\_{\rm em}) \cdot \frac{1}{1 + \tau\_{\rm em}\varepsilon} & \text{generator mode}' \end{cases} \tag{8}$$

where *T*em is the output torque of the electric machine; *T*em,ul, *T*em,cl, and *T*em,max are the limited torque of the voltage, current, and external characteristic, respectively; *T*em,cmd is the target torque command; τem is the torque respond time constant; *U*em, *U*em,min, and *U*em,max are the current, minimum, and maximum voltage of the electric machine, respectively; *I*em,max is the maximum current of the electric machine; ωem is the angular speed of the machine; and *T*dr em,max and *T*br em,max are the maximum permissible limit in the driving or braking process, respectively.

The torque balance equation of the electric machine links the relationship of the torque and the angular speed as follows:

$$T\_{\rm em} - T\_{\rm em,l} = f\_{\rm em} \frac{d\omega\_{\rm em}}{dt} \,, \tag{9}$$

where *T*em,l is the load torque and *J*em is the rotational inertia of the electric machine.

The efficiency module is the main part of the electric machine model. The efficiency is calculated by a look-up table obtained from an electric machine characteristic experiment, which can be described as

$$
\eta\_{\rm em} = f\_{\eta, \rm em}(T\_{\rm em}, n\_{\rm em})\_{\prime} \tag{10}
$$

where ηem is the electric machine efficiency and *f*η,em is the interpolation function of the electric machine efficiency map.

Figure 4 provides the efficiency maps of a driving motor and generator. Due to the fact that the electric machine could work in four quadrants as a motor, including the driving and braking state of forward and reverse, the efficiency data of the motor spreads over the four quadrants, while the generator can only operate in one quadrant to generate power.
