Implementation of an Advanced Modelica Library for Evaluation of Inverter Loss Modeling

This paper introduces a newly developed Power Electronic Inverter library in Modelica. The library has different levels of complexity to approximate the power losses in the power inverter. In addition, it provides two different modelling domains (ABC and DQ). The library utilizes a multi-level approach with increasing model complexity, each model is interchangeable in the system including power inverter, controller and machine. There are two attributes which are implemented into this library. First, the model calculates the electric behaviour of the power semiconductors, i.e. IGBTs, MOSFETs and diodes including the thermal effects. This can be fully parameterized based on the characteristic curves and parameters specified in the manufacturer’s datasheet. Secondly, the analytical approach of power losses approximation based on the datasheet. It is interchangeable between two reference frames (ABC and DQ). The model is then validated with PLECS simulation to confirm the accuracy.


I. INTRODUCTION
Power Electronic Inverters (PEIs) transform Direct Current (DC) electrical power to Alternating Current (AC). They play a crucial role in the modern world and are an essential part of electrical power systems in modern transport applications. For example, they are commonly used to drive electrical machines within electric vehicles [1][2] and actuator systems within More Electric Aircraft [3].
There are a variety of methods for modelling the losses in PEIs. The first approach is a complete numerical simulation of the circuit with integrated or parallel running loss calculation [4][5]. A second approach is to calculate the electrical behaviour of the circuit analytically, i.e. voltage and current, for each power semiconductor device [6]. This approach can lead to complex and intensive mathematics based calculation. Simplified calculations are often used for quicker results. It is not possible to define which method produces the best model, it is necessary to determine the optimal balance between system simulation time and model fidelity for each task/application. In this paper, the presented technique provides the complete analytical calculation of the power semiconductor losses in the PEI within Modelica. The aim is to predict the losses according to the modelling environment i.e. circuit parameters and operating points. This is done in both ABC and DQ domains which will significantly reduce the simulation time. The DQ domain is very useful especially in the machine system as it does not requires the Clarke transformation and Park transformation. By utilizing the DQ rotating reference frame, time varying signals can be represented as constant values allowing larger simulation step size, lower computational demand and hence faster simulations times. Furthermore, the presented techniques also allows the user to parameterize the power semiconductors and interchange between various models of the PEI with different levels of complexity [7]. The developed Modelica library will be presented along with the details and equations. Simulation results will be shown and validated against established market software (PLECS simulation). The main benefit of Modelica software compared to other software such as PLECS and OrCAD capture is the multidisciplinary domains which allow the user to combine mechanical, electrical, thermodynamic, hydraulic, pneumatic, thermal and control systems into a single model.
The structure of this library is classified into switching ABC, non-switching ABC, and non-switching DQ models. The switching ABC model provides the most similar waveform to the practical PEI. It uses the IGBT/MOSFET device in the switching which shows the static and behavior characteristics of the devices. However, using this model will result in high simulation time and processing demand. This is extremely impractical for large, complex system simulation. The nonswitching ABC models and non-switching DQ models do not show the static and behavior characteristics of the devices, only the PEI losses are calculated based on the load voltage and current. This minimizes the total simulation time.

A. IGBT
The IGBT model includes both the conduction losses and switching losses. The characteristics of IGBT depends on the type of technology, two different structures are available; NPT (non-punch through) and PT (punch through) IGBTs. Compared to the MOSFET structure, the NPT IGBT has an additional p+ doped layer between the emitter and collector which means that the forward characteristics of IGBT does not behave like a resistance but acts like a pn-junction. Hence, the static model is slightly different from MOSFET model detailed below. The behavior characteristics are modelled as ideal turnon and turn-off energy losses. In addition, the power losses of the body diode are also included.
The power losses of the IGBT device are based on the information provided by manufacturers' datasheet such as output characteristics (VCE = f(IC)) and switching losses characteristics (Eon, Eoff = F(ICE, T)). To achieve an accurate result, the following parameters need to be set as shown in Figure 1. These parameters can be found in the manufacturers' datasheet. The average conduction loss and switching loss of the IGBT can be calculated by; . , It should be noted that the switching power loss needs to be normalized with the conditions provided for any application with the nominal values of datasheet. Hence, the switching loss can be rewritten as; The average conduction loss and switching loss of the body diode can be found as; . , The final diagram of switching IGBT model is illustrated in Figure 3. The physical structure of a MOSFET is different from an IGBT as mentioned earlier. The operation of the MOSFET is also slightly different as it is able to operate both in forward and reverse mode. The conduction losses of the MOSFET can be modelled as the on-resistance whereas the switching losses are modelled as an ideal turn-on and turn-off energy losses similar to IGBT model. Furthermore, the model also includes the power losses of the body diode.
The power losses of the MOSFET device are based on the information provided by manufacturers' datasheet such as output characteristics (VDS = f(ID)) and switching losses characteristics (Eon, Eoff = F(IDS, T)).
The average conduction loss and switching loss of the MOSFET can be calculated by; . , It should be noted that the switching power loss needs to be normalized with the conditions provided for any application with the nominal values of datasheet. Hence, the switching loss can be rewritten as; The parameters required for the MOSFET model are shown in Figure 4. A diagram of MOSFET device is shown in Figure 5.

III. NON-SWITCHING ABC MODEL
In this model, an analytical approach is implemented to calculate the power losses for the PEI. The benefit of this model is the low simulation time (CPU time) which is a key desired feature in a closed-loop system simulation. The classic PWM frequency is in the range of 500Hz to 50Kz which can be extremely computationally demanding. Therefore, it is necessary to find simplify the model that reduces the CPU time need.
The simulation results of this model show significant reduction of simulation time of approximately of 20,000 times when compared to the switching ABC model. The concept of this model is to use the information from controller (reference voltage and current) to approximate the current flowing in each switching device and diode. Hence, the conduction losses and switching losses can be approximated. The model is based on analytical approach by using the reference voltage and current to calculate the conduction losses and switching losses in each device. Then the power losses are subtracted from the input power.
The concept of this model begins by calculating the power factor angle by measuring the active power (P), reactive power (Q), and apparent power (S). These can be found by: To simplify the calculation, the load current of the PEI is assumed to be sinusoidal. Since the power factor angle is determined, the average and RMS values of transistor and diode currents can be calculated by the following equations; This information is used to evaluate power losses based on piecewise linear approximation of the device's on voltage characteristics. The power dissipated in a device can be divided into two parts; first is a constant voltage drop which can be calculated by the average current multiply by the voltage drop. Second is a resistive element which is equal to the squared of the RMS current multiply by the resistance. The sum of these is the total power dissipated in the device. Therefore, the conduction losses for transistors and diodes can be found as: For this three phase PEI, the total conduction losses are then six times the sum of transistor and diode conduction losses.
The switching losses in the transistor depend on the type of transistors (IGBT and MOSFET) and dynamic characteristics. During the turn-off, the power losses depend on two factors; speed of the gate drive and the IGBT's tail current due to minority carriers. However, MOSFETs do not have this tail current effect. The turn-on losses are due to the rate of current change and the stored charge in the free-wheeling diode. The total of switching losses energy can be measured by integrating the product of the current and voltage over time. These energy values are normally given in the device datasheet. As mentioned earlier, the control used in the model is sine wave PWM. The switching losses are the total switching energy divided by the carrier PWM frequency.
where is the switching energy as a function of current.
The average switching losses in the transistor can be found by integrating the energy over half a sine period (0 to ), Generally, the information of turn-on and turn-off energy (Eon and Eoff) given in the device datasheet are calculated based on certain test conditions. Therefore, it is necessary to scale it to the operating condition.
where is the datasheet test voltage.
For three phase PEIs, the focus of this paper, the total inverter losses are therefore six times the sum of the diodes and transistor power losses. These losses are then subtracted from the input power to balance the energy of the system.

IV. NON-SWITCHING DQ MODEL
This model aims at accurate and efficient simulation of the PEI power losses within the DQ reference frame. By utilizing the DQ rotating reference frame, time varying signals can be represented as constant values allowing larger simulation step size, lower computational demand and hence faster simulations times.
In this model, the output reference values of voltage and current are in the DQ domain (Vdq and Idq). This can be converted into active power, passive power, apparent power, and power factor by using the following equations; Active power: Apparent power: = √ 2 + 2 (23) Power factor: By using this information, the power losses in the switching devices and diode can be calculated in the similar way as "Nonswitching ABC model" To validate the non-switching DQ model, the simulation is compared with the non-switching ABC mode. The total inverter losses are shown in 6. The result showed exactly the same PEI power losses. Furthermore, the non-switching DQ model can further reduce simulation time significantly. Compared to the non-switching ABC model, the simulation time is reduced by a factor of 30 for the IGBT + Diode DQ model and by a factor of 28 for MOSFET + Diode DQ model.

IV. MODEL VALIDATION
In order to verify the power losses in the PEI Modelica models, which were built in Dymola, the models are compared with established equivalent models within the PLECS simulation environment. In PLECS, the IGBT/MOSFET devices are able to be parameterized based on manufacturer's datasheets. This is then used to calculate the power losses of the device. This is therefore a good equivalent to the newly implemented models developed in Modelica which are described in this paper. The test circuit which was utilised is shown in Figure 7    A PM Machine was built that has the same characteristics and input parameters as the PLECS simulation model. Figure 9 and Figure 10 show the input parameters for the PM in Dymola-Modelica and PLECS, respectively.  The power losses of the PEI are then simulated and compared between both software. The results of simulation are shown in Figure 11. A. Total PEI losses Figure 11. A comparison of total PEI losses for different models.