PLECS (Piece-wise Linear Electrical Circuit Simulation) is a Simulink toolbox for system-level simulations of electrical circuits. It is especially designed for power electronics but can be used for any electrical network.
The concept of integration into Simulink has the advantage that only the part of the system in which electrical units are of interest needs to be modeled as an electrical circuit. The simulation of all non-electrical parts such as controls and mechanics should be done in Simulink.
Matlab can be employed to compute circuit parameters and to post process and visualize the simulation results.
When simulating complex power electronic systems, however, the processes during switching are of little interest. Here, it is more appropriate to use ideal switches that toggle instantaneously between a closed and an open circuit. This approach, which is implemented in PLECS, has two major advantages: Firstly, it yields systems that are linear between two switching instants. Secondly, to handle discontinuities at the switching instants only two integration steps are required. Both speed up the simulation considerably.