thermal model T-Type

Hi!
I’m trying to build a thermal model of the single leg of a T-Type, consisting of 4 MOSFETs+diodes. When I try to run, I get that in Sub4 the graph has a negative peak before reaching stationat conditions, even if, when I record the MOSFET+diode temperature, this is always increasing.
I’m leaving the model built below, together with the XML for the thermal model.
I’ve only been using PLECS for a short time and I can’t figure the mistake out. If someone could help me, it would be very welcome!
Thank you very much

SPWM_Single_Leg.plecs (86 KB)

SCT020H120G3AG.xml (374 KB)

Hello, can you also include the XML file for SCT020H120G3AG that you are using in your model?

Hello, I was able to reproduce what you mentioned. Here the initial power flow in Device 4 goes to charge up the large junction capacitance you assigned (1 J/K, to all device junctions) before then flowing out to ambient. This is just the nature of your circuit and its parameters. In this case I might suggest that you either use a much lower thermal capacitance value or import the transient thermal impedance curve from the datasheet (Figure 2 - single pulse) into the Thermal Editor’s Thermal chain tab directly (and then not use the external Cth_j and Rth_jc values). When I imported this curve you can see the order of magnitude of the capacitance values assigned:

From a quick simulation this then shows a positive-only transient heat flow out from device 4’s junction.