Figure 1. An LLC Converter
As you can see in Figure 1, I have used a simple trick for the Transformer model: I kept the series and magnetizing inductances separate and used an ideal Transformer utilizing high inductance perfectly coupled inductors. That way, I could monitor the magnetizing current going through Lm (L4) and that going to L3, thus the load eventually. L7, L2 secondaries are sized at 1H/n^2, where n is the turns ratio.
⚠️ What else is important in that schematic?
Switches S2, S3 are working like on/off switches using the Rds_on of the selected mosfet each time. The important part is putting a couple of capacitors in parallel with these to model the output parasitic capacitance. That parameter can be found in the respective datasheets of the selected device. However, there is a trap here!
🤔 Is the output capacitance calculated based on time, or energy?
The output capacitance changes dynamically in mosfets when switching, ranging from a few picofarads to a few nanofarads, as the voltage on the drain-source pins drops from a high to a low potential. The manufacturer has constructed an artificial effective capacitor that either gives the same stored energy value or the same charging time.
Looking at Figure 2 helps to better understand what I’ve just described.