Harmonic balance analysis for systems with circuit-field iterations

A state variable implementation of harmonic balance circuit analysis for spatially distributed systems is developed. The equations are formulated with the minimum number of unknowns and error functions starting from the modified nodal admittance matrix of the linear part of the circuit. The program uses advanced numerical techniques, such as automatic differentiation to calculate the Jacobian of the system and it is compatible with port-based network descriptions which occur with electromagnetic modeling.