Algorithm
The algorithm starts with Kirchoff's current law written in the frequency-domain. To increase the efficiency of the procedure, the circuit may be partitioned into its linear and nonlinear parts, since the linear part is readily described and calculated using nodal analysis directly in the frequency domain.
First, an initial guess is made for the solution, then an iterative process continues:
- Voltages are used to calculate the currents of the linear part, in the frequency domain.
- Voltages are then used to calculate the currents in the nonlinear part, . Since nonlinear devices are described in the time domain, the frequency-domain voltages are transformed into the time domain, typically using inverse fast Fourier transforms. The nonlinear devices are then evaluated using the time-domain voltage waveforms to produce their time-domain currents. The currents are then transformed back into the frequency domain.
- According to Kirchhoff's circuit laws, the sum of the currents must be zero, . An iterative process, usually Newton iteration, is used to update the network voltages such that the current residual is reduced. This step requires formulation of the Jacobian .
Convergence is reached when is acceptably small, at which point all voltages and currents of the steady-state solution are known, most often represented as Fourier coefficients.
Read more about this topic: Harmonic Balance