  Combining three themes: port-Hamiltonian energy-based modelling, structural
analysis as used in the circuit world, and structural analysis of general
differential-algebraic equations, we form a new model for electrical circuits,
the compact port-Hamiltonian equations. They have remarkable simplicity and
symmetry, and always have index at most 1 and other good numerical properties.
The method has been implemented in Matlab. We give proofs and numerical
results.
