Derived is infinite or NaN in hot simulation

When using PLECS 4.7.4 software to perform thermal simulation on the inverter, I found that the temperature of the device would continuously rise to infinity. However, I removed the relevant settings for thermal simulation and only performed electrical simulation, and the circuit was running normally. I would like to know how to handle this issue so that my thermal simulation can run normally.