Vectorization in PLECS

Hello,

I need to simulate a system with about 240 identical DC-DC converters. Each converter has the same circuit structure, only the control signals. and input signals differ.

From a simulation speed and memory usage perspective, is it better in PLECS to:

  1. Replicate 240 individual converter subsystems, or

  2. Use a vectorized modeling approach (e.g. vectorized switches, sources, and control logic)?

Does vectorization in PLECS significantly speed up the simulation when handling such a large number of converters? Also, are there recommended best practices for modeling many identical modules efficiently?

Thanks in advance for your advice!

Does vectorization in PLECS significantly speed up the simulation when handling such a large number of converters?

The same underlying equations must be solved regardless if the model schematic is implemented in a vectorized or non-vectorized fashion. Therefore vectorization does not impact speed or memory usage. Vectorization has major advantages in making your model more maintainable, modular, and flexible, such that you don’t have to copy/edit/connect 240 individual instances of your converter subsystem.

Also, are there recommended best practices for modeling many identical modules efficiently?

I would also recommend reviewing the Model Reference component, which can “clone” any subsystem. When you make changes to the source component, all references are updated on the next simulation run. This is helpful if for example your 240 converters are subdivided into smaller groups, say you have groups of 10 converters dispersed throughout a microgrid, you would have one source component and 23 model reference’s linked to the source.

Please see the PLECS tutorial Implicit Model Vectorization. A few demo models also show vectorized implementations. See: Multiphase Synchronous Buck Converter, Flying Capacitor DC-DC Converter, Flying Capacitor Single-Phase Inverter, HVDC Transmission System with MMCs,