Automate PSIM using Python in Altair Compose


Altair PSIM is a simulation and design software for power electronics, motor drives, and power conversion systems. Altair Compose is an environment for doing math calculations, handling data, automating workflows and much more.

 

A new, powerful, library has been released on Compose from v2022.3 onwards, the PSIM Integration library. This library allows to seamlessly build workflows integrating both tools for running simulations in batch mode, extracting, handling, and writing results for further usage and, in general, for saving time and effort in design and simulation tasks on PSIM.

 

I have put together the Compose – PSIM Integration Starter’s Guide, in which you can learn how to use this library. You can check it out here:

 

  1. PsimSimulate
  2. PsimASimulate
  3. PsimSimview, PsimWriteGraphFile, PsimReadGraphFile

 

All these posts will show you how to leverage this library using OML, Compose’s main programming language, but it’s also possible to execute and debug Python and TCL scripts in Compose.

 

For anyone used to scripting in Python and who wants to continue doing so, I’m sharing these alternative scripts which are written in Python and leverage the OML – Python bridge available in Compose. Basically, everything is handled in Compose’s Python environment except for calls to the PSIM Integration library. For those, commands like exporttooml and EvalOmlScript are useful, which send variables to the OML environment and execute OML commands, respectively.

 

Try running the attached scripts from Compose and look at how the PSIM Integration library and the Python – OML bridge allow for a seamless integration of your PSIM workflows using Python.