How to couple electrical and thermal models

How to guide for coupling electrical and thermal models in Typhoon HIL Schematic Editor.


Thermal effects play an important role in electrical equipment design. Hardware designers and control engineers are not only interested in the output of independently running thermal models, but also want to close the loop with electrical models in order to include thermal effects in their designs. This application note presents two solutions for realizing electrical-thermal coupling in a variable speed drive model. The Typhoon HIL system architecture allows electrical and thermal models to be simulated in parallel in real time, regardless of the complexity of either model.

Model description

The electrical model of the variable speed drive consists of a diode rectifier, a DC link, a breaking chopper, and an inverter. The mechanical load from the induction motor is model-based, and is implemented in the Mechanical part subsystem. The induction motor is modelled as “voltage behind reactance”, which provides better numerical stability.

Figure 1: Variable speed drive with coupled electrical and thermal models

The thermal model consists of the inverter (heatsink) thermal model and the machine thermal model (Figure 2). In the context of real-time simulation, thermal processes can be classified as “slow” processes. Therefore, both thermal models are implemented using the Signal Processing (SP) toolbox through the Thermal Network component. The thermal network in the heatsink model is based on the Foster thermal model, while in the machine thermal model is based on the Cauer model.

Figure 2: Heatsink and motor thermal models

The ambient temperature (Ta) is an input in both models and it plays an important role in the performance of both the inverter and the motor, as shown in the simulation.

The electrical-thermal coupling between the inverter and its thermal model requires loss calculation to be enabled in the inverter’s properties. Doing so enables one additional input and two outputs for the inverter component as shown in Figure 3. Parameters for loss calculation are imported automatically from an XML file. The power loss vector is fed to the Heatsink thermal model. Additionally, the (P_losses) vector is factored in the inverter efficiency calculation.

Figure 3: Three-phase inverter with loss calculation enabled

The idea behind the machine thermal model is to demonstrate the effects of temperature on the stator resistance. The model takes the stator currents along with ambient temperature and outputs motor temperature as well as changes in stator resistance deltaRs. The electrical-thermal coupling is achieved by using variable resistors, a.k.a Time Varying Elements (TVE), at stator terminals that are directly controlled by deltaRs (Figure 4).

Figure 4: Electrical-thermal coupling of motor models

As there are three variable resistors for each stator phase, the compiler console reports “TVE solvers utilization: 3 out of 16” for the processing core where the TVE are located. Other key resouces being utilized by this model are listed in Table 1.
Table 1. HIL device resource utilization
No. of processing cores 2
Max. matrix memory utilization 50.73%
Max. time slot utilization 58.13%
Simulation step, electrical 1µs
Execution rate, signal processing 200µs


This application comes with a pre-built SCADA panel (Figure 5). The panel offers most essential user interface elements (widgets) to monitor and interact with the simulation in runtime. You can customize it freely to fit your needs.

Figure 5: SCADA panel

When the simulation starts, the default operation ambient temperature is 20°C. At the 26th second, the ambient temperature steps to 40°C. The effects on IGBT and motor temperatures are shown in Figure 6. The test figure shows that stator resistance increases with temperature. Since there is no cooling implementation in the model, both motor and IGBT temperature rise cumulatively even when the ambient temperature and load are kept constant.

You can represent a cool-down “solution” by lowering the motor load. At 42 seconds in the figure below, the load decreases to 5 Nm. As the inverter power output drops, so does the IGBT temperature. Under low-load conditions the Inverter Efficiency widget shows a drop down to 0.92 Nm. You can also experiment with higher temperatures and see that a higher ambient temperature alone will also impact the inverter efficiency negatively.

Figure 6: Manual test sequence for electrical-thermal coupling

Table 2. Minimum requirements
Typhoon HIL files

examples\models\electrical drives\indm losses calculation and thermal model

indm losses calculation and thermal model.tse,

indm losses calculation and thermal model.cus,



Minimum hardware requirements
No. of HIL devices 1
HIL device model HIL402
Device configuration* 4

*This model makes use of variable resistors. Make sure you select a HIL device configuration that supports “Time varying elements”. By default, a HIL402 with configuration 4 is selected in order to accommodate both variable resistors and the machine solver.

Test automation

We don’t have a test automation for this example yet. Let us know if you wish to contribute and we will gladly have you signed on the application note!


[1] Ognjen Gagrica