How to increase your PSIM simulation throughput and increase your CPU utilization with scripting
Increase your PSIM simulation throughput and increase your CPU utilization with scripting
A common question is how to increase the CPU utilization when running PSIM simulations. The simple answer is that one PSIM simulation runs on 1 CPU. If you want to use more CPU bandwidth then run more simulations. The reason for this is fundamental with the solve of algorithm of PSIM. PSIM solves the power equations simultaneously at the same timestep. This is key to provide a numerically robust simulation when there are constant large derivatives in voltage and current as a result of the switching.
So we are only able to run 1 simulation at a time but we can run multiple simulations in parallel. There are other methods we can employ as well. The simultaneous solve allows us to change timestep or change component attributes from one timestep to the next. We can use this to use initial conditions to seed multiple child simulations.
The key command is to use the "asimulate" command in a PSIM script. Refer to the PSIM tutorial documents that install PSIM for more information on all the PSIM scripting commands. This tutorial video highlights getting started with scripting
Please have a look at this tutorial video which covers strategies for long simulations.
Attached is a simple simulation that shows how to use the initial conditions and parallel simulations. There are also other examples in the PSIM example library that show how to do this