Harmonic Balance Background

Harmonic Balance is a frequency domain analysis technique for simulating nonlinear circuits and systems. This method assumes the input stimulus consists of a relatively few steady state sinusoids. Therefore the solution can be expressed as a sum of steady state sinusoids that includes the input frequencies in addition to any significant harmonics or mixing terms.

A circuit with a single input source will require a single tone HB simulation. A solution waveform (e.g. the node voltage v(t)) in a single tone HB simulation is approximated as follows:

where f is the fundamental frequency of the source, the Vk's are the complex Fourier coefficients that the HB analysis computes, and K is the level of truncation (number of harmonics).

A circuit with multiple input sources will require a multitone HB simulation. In this case, the steady state solution waveforms are approximated with a multidimensional truncated Fourier series as follows:

where n is the number of tones (sources), f 1...n are the fundamental frequencies of each source, and K 1...n are the number of harmonics for each tone. When having multiple tones in a circuit, mixing products will occur.

The circuit simulator converts N nonlinear differential equations (where N is the size of the circuit, i.e., the number of nodes and branch currents) into the frequency domain, where it becomes a set of N*M nonlinear algebraic equations (where M is the total number of frequencies including the input frequencies, their harmonics, and mixing terms), as shown below:


where F k is the k th spectral component of a Fourier transformation, and w k =2*pi*f*k. The harmonic balance simulator then must simultaneously solve this set of N*M nonlinear algebraic equations for the Vk values. The number of nonlinear equations that must be solved has increased by a factor of M compared to standard time domain simulators. This means that the matrix sizes and memory requirements of harmonic balance increase considerably as M becomes large. The nonlinear devices are still evaluated in the time domain by using an inverse Fourier transformation to convert the V k values into the v(t) waveform prior to evaluating the nonlinear q() and g() functions. The current and nonlinear charge waveforms are transformed into the frequency domain at each iteration so their spectral values can be used in the frequency domain equations. Since the HB simulator uses the Newton's method, the derivatives (nonlinear resistance and capacitance) must also be computed in the time domain and transformed into the frequency domain.

The primary advantage of harmonic balance over time domain solutions is that the linear devices with arbitrary frequency responses can be easily, yet quickly, modeled. Lumped element approximations are no longer required. Time domain convolution has been replaced with simple frequency domain multiplication. This is especially important for RF, microwave and millimeter frequencies, which are often characterized with measured frequency data. An additional benefit is that harmonic balance solutions directly provide the steady state solution without having to wait until the transient solution dies out. For high Q circuits this can be a costly wait. The input stimulus frequencies, f, can also be arbitrarily widely spaced and may actually be non-commensurate, but the harmonic balance solution can still be quickly obtained. The complexity and cost of the solution does not increase just because there is a low frequency tone (a long period) coexisting with high frequency tones (very small time steps).

The limitations of harmonic balance are that the signal must be quasi-periodic; they must be representable as a sum of a relatively few number M of discrete tones. As M becomes large, the amount of required internal memory becomes excessive since the internal matrix size grows as M 2. Using Krylov linear solvers instead of direct methods reduces the memory growth from quadratic to linear (proportional to M). The Krylov solvers therefore enable harmonic balance to be used on very large circuits and circuits with a large number of tones.

Harmonic balance is usually the method of choice for simulating analog RF and microwave problems, since these are most naturally handled in the frequency domain. Examples of devices and circuits suited to this analysis include power amplifiers, frequency multipliers, mixers, and modulators under large signal sinusoidal drive. In the context of high frequency circuit and system simulation, harmonic balance has a number of advantages over conventional time-domain analysis:

How the Harmonic Balance Simulator Operates

Harmonic balance computes the steady state response of nonlinear circuits excited by single or multiple periodic sources. The harmonic balance method is iterative. It is based on the assumption that for a given sinusoidal excitation there exists a steady-state solution that can be approximated to satisfactory accuracy by means of a finite Fourier series. Consequently, the circuit node voltages take on a set of amplitudes and phases for all frequency components.

The currents flowing from nodes into linear elements including all distributed elements are calculated by means of straightforward frequency-domain linear analysis. Currents from nodes into nonlinear elements are calculated in the time-domain. A frequency-domain representation of all currents flowing away from all nodes is available. According to Kirchhoff's Current Law (KCL), the currents should sum to zero at all nodes. The probability of obtaining this result on the first iteration is extremely small. Therefore, an error function is formulated by calculating the sum of currents at all nodes. This error function is a measure of the amount by which KCL is violated and is penalized to adjust the voltage amplitudes and phases. If the method converges (that is, the error function is driven to a given small value), then the resulting voltage amplitude and phases approximate the steady-state solution. The diagram below is a flow chart to demonstrate the harmonic balance method.

The following diagram gives a global overview of the HB simulator in ADS.

Newton's Method

Mathematical theory has shown that there are simple formulas for solving linear and quadratic algebraic equations. However, there are no specific formulas for solving quintic or higher order, non-linear algebraic equations analytically. There are, however, several numerical techniques for solving these types of equations. One of these is Newton's method. In this method, the first step is to make a guess for the root of the equation f(x)=0. Then use that approximation to get a second. A second to get a third, and so on.

Harmonic Balance uses Newton's method to solve a system of nonlinear algebraic equations, by starting with an initial guess and repeatedly solving the iteration equation. This is done until some convergence criteria are met. Consider the following circuit in which the node voltages and branch currents are solved for using Newton's method.

Using KCL, the following nonlinear algebraic equations are derived:

For this circuit, let I=1A, R1=6 Ohms, and R2=4 Ohms. The nonlinear resistor i-v relationship is given as:

We will use Newton's method to solve the above system of equations to determine the voltage for nodes V1 and V2. This is an iterative method defined by the following equation:

where v is the vector of node voltages, f is the vector of nodal equations, and J is the Jacobian of the vector f at v. The Jacobian represents the linearized circuit and is defined below:

For this problem, we write the circuit equations for f as follows:

Next the Jacobian is determined:

Start with the initial guess:

In Newton's method, we start with the initial guess, v (0) and compute f(v (0)) and J(v (0)) to compute Δv=v (1) -v (0), from which we obtain v (1). The next step is to compute f(v (1)) and check the convergence for f(v (1)) and Δv. If both have converged to with in tolerance limits, then the iterations stop and we are done. If convergence was not obtained, then J(v (1)) is computed and used to determine v (2). Then f(v (2)) and Δv=v (2) -v (1) are computed and checked for convergence. If convergence is achieved, then Newton's method is complete, otherwise, the Jacobian is computed and the iterations continue. This process is carried out until both of the convergence criteria are met, namely the KCL residual is less than 1pA and the Δv is less than 1 µV. The values at each iteration are shown in the table below:

Iteration k v (k) J(v (k)) f(v (k)) v (k+1) -v (k)
0
1
2
3
4
5
6

For this example, it took 6 iterations to arrive at acceptable solutions for V1 = 3V and V2 = 1V. The column labeled f(v (k)) is the KCL residual and the column labeled v (k+1) -v (k) is the solution update, or Δv. It is seen from the 6th iteration that the KCL residual is less than 1 pA and that Δv is less than 1 µV. Convergence was achieved for Δv at the end of the 5th iteration.

Newton's method can be understood from a graphical point of view as well. The single dimensional case is shown in the diagram below. It is desired to solve for v*, such that f (v*) =0. For this method, the first step is to make an initial guess, v (0), then linearize about v (0), then solve for the next guess v (1), and so on. If all goes well, as the k becomes sufficiently large, v (k) will asymptotically approach the solution v*.

 

Privacy Statement  | Terms of Use  | Legal | Contact Us  | © Agilent 2000-2008 

Contents
Additional Resources