Harmonic balance is a method used to calculate the steady-state response of nonlinear differential equations,[1] and is mostly applied to nonlinear electrical circuits.[2][3][4]
It is a frequency domain method for calculating the steady state, as opposed to the various time-domain steady-state methods. The name "harmonic balance" is descriptive of the method, which starts with Kirchhoff's Current Law written in the frequency domain and a chosen number of harmonics. A sinusoidal signal applied to a nonlinear component in a system will generate harmonics of the fundamental frequency. Effectively the method assumes a linear combination of sinusoids can represent the solution, then balances current and voltage sinusoids to satisfy Kirchhoff's law. The method is commonly used to simulate circuits which include nonlinear elements,[5] and is most applicable to systems with feedback in which limit cycles occur.
Microwave circuits were the original application for harmonic balance methods in electrical engineering. Microwave circuits were well-suited because, historically, microwave circuits consist of many linear components which can be directly represented in the frequency domain, plus a few nonlinear components. System sizes were typically small. For more general circuits, the method was considered impractical for all but these very small circuits until the mid-1990s, when Krylov subspace methods were applied to the problem.[6][7]
The application of preconditioned Krylov subspace methods allowed much larger systems to be solved, both in the size of the circuit and in the number of harmonics. This made practical the present-day use of harmonic balance methods to analyze radio-frequency integrated circuits (RFICs).
Example
[8]
Consider the differential equation
. We use the ansatz solution
, and plugging in, we obtain
![{\displaystyle -A\omega ^{2}\cos(\omega t)+A^{3}{\frac {1}{4))(\cos(3\omega t)+3\cos(\omega t))=0.}](https://wikimedia.org/api/rest_v1/media/math/render/svg/7da6b7ff98f5900e1ad90fabeafd2832e0f404a1)
Then by matching the
terms, we have
,
which yields approximate period
.
For a more exact approximation, we use ansatz solution
. Plugging these in and matching the
,
terms, we obtain after routine algebra:
![{\displaystyle \omega ={\sqrt {\frac {3}{4))}A_{1}{\sqrt {1+y+2y^{2))},\quad y=A_{3}/A_{1},\quad 51y^{3}+27y^{2}+21y-1=0.}](https://wikimedia.org/api/rest_v1/media/math/render/svg/0efc8fb4083cb8837336d672db13b9be792bdc2b)
The cubic equation for
has only one real root
. With that, we obtain an approximate period
![{\displaystyle T={\frac {2\pi (1+y)}((\sqrt {\frac {3}{4))}A{\sqrt {1+y+2y^{2))))}\approx {\frac {7.402}{A))}](https://wikimedia.org/api/rest_v1/media/math/render/svg/439264a7617694ac46df0246cb2ca81507a7b515)
Thus we approach the exact solution
.
Algorithm
The harmonic balance algorithm is a special version of Galerkin's method. It is used for the calculation of periodic solutions of autonomous and non-autonomous differential-algebraic systems of equations. The treatment of non-autonomous systems is slightly simpler than the treatment of autonomous ones. A non-autonomous DAE system has the representation
![{\displaystyle 0=F(t,x,{\dot {x)))}](https://wikimedia.org/api/rest_v1/media/math/render/svg/734d50c817e52e6090a15e990de7b720b6661f0b)
with a sufficiently smooth function
where
is the number of equations and
are placeholders for time, the vector of unknowns, and the vector of time derivatives.
The system is non-autonomous if the function
is not constant for (some) fixed
and
. Nevertheless, we require that there is a known excitation period
such that
is
-periodic.
A natural candidate set for the
-periodic solutions of the system equations is the Sobolev space
of weakly differentiable functions on the interval
with periodic boundary conditions
.
We assume that the smoothness and the structure of
ensures that
is square-integrable for all
.
The system
of harmonic functions
is a Schauder basis of
and forms a :Hilbert basis of the Hilbert space
of square-integrable functions. Therefore, each solution candidate
can be represented by a Fourier-series
with Fourier-coefficients
and the system equation is satisfied in the weak sense if for every base function
the variational equation
![{\displaystyle 0=\langle \psi ,F(t,x,{\dot {x)))\rangle _{H}:={\frac {1}{T))\int _{0}^{T}\psi ^{*}(t)\cdot F(t,x,{\dot {x)))dt}](https://wikimedia.org/api/rest_v1/media/math/render/svg/b2b524457c6ef66d7ca6259e08aed8985355a8d1)
is fulfilled. This variational equation represents an infinite sequence of scalar equations since it has to be tested for the infinite number of base functions
in
.
The Galerkin approach to the harmonic balance is to project the candidate set as well as the test space for the variational equation to the finitely dimensional sub-space spanned by the finite base
.
This gives the finite-dimensional solution
and the finite set of equations
![{\displaystyle 0=\langle \psi _{k},F(t,x,{\dot {x)))\rangle \quad {\text{ with ))k=-N,\ldots ,N}](https://wikimedia.org/api/rest_v1/media/math/render/svg/1b6664084fe30a3dab96b09cec133d78f97ea056)
which can be solved numerically.
In the special context of electronics, the algorithm starts with Kirchhoff'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.