You are on page 1of 4

Efficient Frequency Domain Analysis of Large

Nonlinear Analog Circuits


Peter Feldmann Bob Melville David Long
AT&T Bell Laboratories
Murray Hill, NJ 07974

Abstract-In this paper, we present a new implementation for the circuit example in the results section). Letting X
of the harmonic balance method which extends its applica- denote the aggregrate vector of all unknown Fourier coef-
bility to circuits 2-3 orders of magnitude larger than was
previously practical. The results reported here extend our ficients, the harmonic balance equations are written as a
previous work [l]which only considered large circuits oper- system H ( X ) = 0 of size n N .
ating in a mildly nonlinear regime. The new implementation The preferred methods for solving harmonic balance
is based on quadratically convergent Newton methods and
is able to simulate general nonlinear circuits. The signif-
equations are Newton-based techniques [13] because of
icant efficiency improvement is achieved by use of Krylov their fast convergence and high accuracy. However, most
subspace methods and a problem-specific preconditioner for implementations of this approach require the Jacobian ma-
inverting the harmonic balance Jacobian matrix. The anal- drix d H / d X which is of dimension n N and much more
ysis of radio-frequency mixers, implemented in integrated
circuit technology, is an important application of our new dense than conventional matrices which arise in numerical
method. We describe the theory behind the method, then circuit simulation. Hence, inversion of this matrix becomes
report performance results on a complete receiver design a computational bottleneck and is largely responsible for
using detailed transistor models.
the limitation of harmonic balance techniques to relatively
small examples.
I. INTRODUCTION The technical contribution of our paper is a method for
fast exact inversion of the harmonic balance Jacobian ma-
The method of H a r m o n i c Balance is well established for
trix using preconditioned Krylov subspace algorithms. Be-
fast and accurate steady-state analysis of nonlinear circuits,
fore going into details, it might be worthwhile to motivate
especially when driven by two or more periodic inputs at
the need for exact inversion, especially since methods have
widely separated frequencies [2,3,4]. Unlike conventional
been proposed for solving the harmonic balance equations
transient analysis, the computer time required for a har-
using approximate inversions of the Jacobian matrix[G], or
monic‘balance analysis is almost insensitive to the numeric
even not using this matrix a t all[5]:
values of the stimuli frequencies. The gist of the harmonic
balance method is t o express each of the n circuit wave- Newton’s method with accurate Jacobian matrix in-
version exhibits local quadratic convergence, i.e, a so-
forms as a Fourier series truncated to N coefficients, then
replace the circuit’s differential equations by a system of lution to the harmonic balance system can be obtained
nonlinear algebraic equations involving the Fourier coeffi- t o machine precision in a fixed, small number of itera-
tions. Thus, the overall solution time would be small
cients. This is possible because the derivative with respect
t o time of a Fourier series is just an algebraic operation. A if the inversion could be done efficiently.
0 Widely convergent continuation methods[7] for solving
numerical technique, such as Newton’s method, is then em-
ployed to solve the resulting system of nonlinear equations. the harmonic balance equations also require solving
linear systems involving B H / d X as a sub-matrix.
This approach is especially intuitive for radio-frequency de-
t The inverted matrix can be interpreted as a lineariza-
signers because of the natural connection t o spectrum an-
alyzer measurements. tion of the circuit in a small-signal sense, which can
then be used for sensitivity computation [9] and noise
As stated above, we use n t o denote the number of wave-
analysis [SI.
forms which must be stored to capture the behavior of
Hence, we see fast accurate inversion of the Jacobian matrix
the circuit. Even a medium-sized IC can have hundreds
of nodes, especially if a sophisticated transistor model is as a key enabling technology for progress in this area. Re-
used. The transform dimension N can also become large cent work by Rizzoli at al. [lo] also emphasizes the need for
accurate Jacobian matrix inversion and attacks the prob-
in the case of a multi-tone analysis. For the simulation
lem using hierarchical decomposition.
of a mixer, for example, the designer might request 16
harmonics of the local oscillator and 8 harmonics of the
1I. THEORETICA L C 0 N S ID ERATIO N S
signal frequency. Because two real numbers are needed
to capture the amplitude and phase of each spectral com- The most general form of circuit equations, resulting
ponent, the final transform dimension is on the order of from one of the known formulations, e.g., MNA [12], is
N = 2 x 8 x 16 = 256. Note that the overall dimesion
of the system of harmonic balance equations is n N , which
can become quite large in practical examples (over 800,000

21.6.1 461
0-7803-3177-6 $5.00 0 1996 IEEE IEEE 1996 CUSTOM INTEGRATED CIRCUITS CONFERENCE

Authorized licensed use limited to: CNRS -XLIM UMR 6172. Downloaded on May 6, 2009 at 05:22 from IEEE Xplore. Restrictions apply.
t m m
where Y ( u ) ,X(w), F ( w ) , & ( U ) , and B(w) are Fourier
transforms of the time domain functions y(t), z ( t ) >f(x(t)),
q ( x ( t ) ) , and b ( t ) respectively. The n N equations, necessary
to determine n N coefficients, are obtained by forcing the
system of R functional equations (6) t o hold at the N fre-
quency points of interest

Fig. 1. Significant frequencies: (a) one-tone, (b) two-tone Y(wo)Xo + jwoQ(wo) + F ( w o ) - B ( w o ) = 0 (7)
Y(wi)Xi + j w i Q ( ~ i )+ F ( w i ) - B ( w i ) = 0
This is a system of n equations where x ( t ) is an n-vector of
circuit variables (currents, voltages, charges, and fluxes). For notational simplicity, we assume that (1) consists of a
The first term represents the contribution of distributed single equation. The nonlinear functions F and Q depend
elements expressed using Green functions; $ q ( z ( t ) ) repre- on the frequency coefficients [XO, . . . , X N - ~ ] ~We . illus-
sents the contribution of reactive circuit components, such trate the dependence for F . Starting from the frequency
as capacitors, inductors, etc.; and f ( z ( t ) ) represents the coefficients [ X o ,. . . , X N - ~ ]we~ ,transform to the time do-
contribution of non-reactive circuit components, such as main and obtain a sample of circuit variables a t different
resistors. Semiconductor devices such as diodes and tran- time points [ ~ ( t l.). ,. , z ( t ~ - 1 ) ] ~We . evaluate the func-
sistors contribute to both of the last two terms. Finally, b ( t ) tion f for each time point [ f ( z ( t l ) ) ,. . . , f ( z ( t ~ - l ) ) ]and
~
is the excitation term due to independent sources, which, transform the results back to frequency domain. In matrix
in our case, are sinusoidal of one or more incommensurate notation we have
frequencies (tones)
P

where l? represents the time-to-frequency-domain trans-


In the absence of chaos, the response of most practical form and the diagonal "matrix" denotes the application
circuits has a discrete spectrum with components at integer of a nonlinear operator. For the one-tone case, both the
combinations of the excitation frequencies, frequency-domain and time-domain samples are equally
spaced and time-to-frequency and frequency-to-time trans-
forms are just the D F T and IDFT computed using the
efficient FFT algorithm. The use of the FFT can be ex-
tended to the multitone case (unevenly spaced frequencies),
Circuits that oscillate will generate, in addition, compo-
through appropriate selection of time-points [a].
nents at other frequencies. The methods presented in this
The discretized system of circuit equations (7) becomes
paper assume response spectra at combinations of the ex-
citation frequencies but can be extended to handle oscil-
lation. Due to the attenuation of the high frequencies in (9)
practical circuits we can further assume that only a finite
subset of the frequency components is significant

For the case of a one-tone analysis the subset of significant


frequencies consists of a DC coinponent, the fundamen-
tal frequency and a number of harmonics. For a two-tone
analysis the subset contains the DC component, the two
fundamental frequencies, and a number of harmonics and or more compactly
intermodulation products, as illustrated in Figure 1. Sub- YX + Rrq(.)rlx+ rf(.)r-lx- B = 0. (io)
sets for three or more tones are similar. Thus, the response
of the circuit is defined by the N coefficients corresponding Here t,he diagonal matrix 2
! represenk the frequency-
to each of the n circuit variables d o m a i n differentiation o p e r a t o r . We have j u s t obtained
the harmonic balance system of equations H ( X ) = 0. For
N-1
a system of n circuit equations, additional permutation op-
erators need to be inserted to insure the required order of
k=O
the vectors for the various operators.
We apply the Fourier transform to the circuit equa- Using Newton's method to solve H ( X ) = 0 requires a
tions (1). The time-domain convolution is mapped into linear solve with the Jacobian matrix I = d H / d X at each
a frequency-domain product, and we obtain iteration. The Jacobian matrix of (9) is
+
Y ( w ) X ( w ) jwQ(w) + F(u) - B(u) = 0 (6)
21.6.2
462

Authorized licensed use limited to: CNRS -XLIM UMR 6172. Downloaded on May 6, 2009 at 05:22 from IEEE Xplore. Restrictions apply.
HarmonicBalance Mabrix

140, d

Fig. 2. Structure of the Jacobian matrix

where C and G are diagonal (block-diagonal in general) Fig. 3. Magnitudes of circulant matrix entries
matrices, with the diagonal elements representing circuit
linearizations at the sampled time points
where [Cl ... C N ] is ~ the I)FT of [c1 . . . C N ] ~ If.
the circuit is linear, the elements c1, . . . , CN on the diag-
onal of C are all identical - the linearization of a linear
circuit does not vary. In this case only C1 is nonzero and
equal to the diagonal elements. The analysis of the term
containing G is similar. The Jacobian matrix for a linear
Naive Jacobian matrix evaluation results in a large, ( n N x circuit becomes diagonal (block-diagonal)
n N ) , and dense matrix, which is illustrated in Figure 2.
Direct factorization or even storage of such a matrix would
overwhelm any computer even for medium sized circuit.
Iterative methods are the only hope to solve such linear
dystems. Krylov subspace based iterative methods such as
Jlin =
[
Y(w0) +6 +jwoc
y((JN-1) + +jwN-1c
] (15)

QMR [ll]are particlarly suited for this problem since they


and, therefore, easy to invert.
derive all matrix information solely from products of the
matrix with vectors. It is easy to see from the expression When the circuit is nonlinear the circulant matrix fills
up. However, as shown in Figure 3, the strongest entries
JZ = Y Z + a r m - 9 + r G r - 9 (13)
in the matrix (in this case comming from a simple mixer)
are concentrated on the diagonal. We can still set elements
that such matrix-vector products can be computed very c2, . . . CN-1 and 6 2 , . . . 6 ~ - 1to zero and use the result-

efficiently, without ever forming the matrix - only through ing diagonal matrix & a preconditioner. In this case the
multiplications with sparse matrices and FFTs. diagonal elemenk C1 and represent the average of the
Unfortunately iterative linear solvers and Krylov sub- circuit linearizations a t all time-points. If the circuit is
space methods in particular, do not converge reliably. “mildly” nonlinear this diagonal matrix is a good approx-
Convergence is achieved through preconditioning, i.e., sys- imation of the Jacobian matrix and serves as an effective
tem J Z = W is replaced with the preconditioned system preconditioner. When stronger nonlinearities exist in the
J - l J Z = J”-’W, which has, the same solution. For ro- circuit, some off-diagonal elements of the circulant matri-
bust and efficient convergence, the preconditioner matrix ces must also be included in the preconditioner. In this
J” should be, in some sense, a good approximation of J , case, the Jacobian matrix approximation loses its diagonal
and also “easy” to invert. In the remainder of this sec- structure but remains much sparser than the original Jaco-
tion we describe a preconditioning method specific to the bian matrix and, therefore, within the capabilities of direct
structure of the harmonic balance Jacobian matrix. Be- factorization algorithms.
ing problem specific, it is superior t o any general purpose
preconditioning technique. 111. RESULTS
The terms that introduce dense blocks in the Jacobian As an example, we describe a variety of simulations on
matrix are I’Cr-l and I’GJ?’. They result in circulant the front-end for a 900 MHz integrated direct conversion re-
(block-circulant) matrices [14]. We analyze the first one ceiver. The circuit consists of a low-noise amplifier (LNA)
driving I and Q mixers. It has 27 bipolar transistors, plus
a variety of linear devices. The steady-state solution is de-
scribed by just over 300 waveforms, many of which are for
internal nodes of the detailed transistor model that was
used. One-tone simulations of the LNA alone were used to
measure gain and the 1dB compression point. Local oscil-
= circulant (Cl, . . . , C N ) lator (LO) feedthrough from the mixers back into the LNA

21.6.3
463

Authorized licensed use limited to: CNRS -XLIM UMR 6172. Downloaded on May 6, 2009 at 05:22 from IEEE Xplore. Restrictions apply.
TABLE I
SUMMARY
OF SIMULATIONS

-
Circuit -n Transform I Unknowns I Purpose Time
LNA 223 lT, N = 3 669 LNA gain 10s
LNA 223 lT, N = 35 7,805 Compression point lm30s
LNA 223 2T, N = 175 39,025 Intermodulation lm30s
LNA+mixer 317 lT, N = 63 19,971 LO feed-through 15m/2m30s

,
LNASmixer 317 2T, N = 175 55,475 Conversion gain 20m/5m
LNASmixer 317 3T, N = 2,025 641,925 Desensitization 3h
LNA+mixer 317 3T, N = 2,625 832,125 Intermodulation lh40m

was also measured with one-tone simulations. For the lat-


.. . ..
ter, we raised the LO amplitude in steps in order to keep -20 ..,...
the Newton loop under control. Once the LO was being -40
driven with the desired amplitude, we captured the solu- -60
tion and used it as an starting point for subsequent runs. -80 .. .. ... ...
This allowed us to change component values and quickly -100 .. .. ..
resimulate in order t o explore design alternatives. Informa- -120 .. ..
.. ..
tion from the LO feedthrough simulations was used in de-
signing the single-ended to differential conversion circuitry
zx:;?- N;
between the LNA and the mixers. MHz GHz

Two-tone simulations were used to measure intermodu- Fig. 4. Receiver front-end output spectrum
lation in the LNA alone, and conversion gain in the full
circuit. As in the LO feedthrough simulation, for the con-
version gain tests we captured the solution from the initial REFERENCES
run and used it to speed subsequent tests for a number of Melville, R.C., P. Feldmann, and J. Roychowdhury, “Efficient
slightly different circuits. multi-tone distortion analysis of analog integrated circuits,” in
PTOC.of the Custom Integrated Circuits Conf., May 1995.
The most demanding simulation was a blocking test. Kundert, K.S., White, J. K., Sangiovanni-Vincentelli, A.,
The LNA input network was driven with an RF signal at “Steady-state Methods for simulating analog and microwave cir-
cuits”, Kluwer, Boston, MA., 1990.
-98dBm and with a blocking signal 3MHz away a t -23dBm. Gilmore, R.J, and Steer, M.B., ”Nonlinear circuit analysis using
A third frequency was needed for the LO, bringing the to- the method of harmonic balance - a review of the art. Part
tal transform size t o over 2,000 and the total number of I. Introductory concepts,” Int. J. on Microwave and Millimeter
Wave Computer Aided Engineering, Vol. 1, No. 1 , 1991.
unknowns to over 600,000! A transform of this size was Rizzoli, V., Cecchetti, C., Lipparini, A . , Fastri, F., ”General-
needed because the strong blocker and LO signals required purpose harmonic balance analysis of nonlinear microwave cir-
many harmonics to prevent aliasing. The simulation re- cuits under multitone excitation,” IEEE Trans. Microwave The-
ory and Tech., vol. MTT-36, pp 1650-1660, Dec. 1988.
quired three hours on an SGI system (150MHz R4400). Maas, S. A., Nonlinear Mirrowave Circuits, Artech House, 1988.
Figure 4 shows one of the outputs of the front-end. The Rizzoli, V., Mastri, F., Sgallari, F., Frontini, V., “The exploita-
designers were very interested in seeing how much the con- tion of sparse matrix techniques in conjunction with the piece-
wise harmonic balance method for nonlinear microwave circuit
version gain was reduced in the presence of the blocker. analysis,” IEEE MTT-S Int. Microwave Symp. Digest, Dallas,
Because of the large range of frequencies, it was estimated pp. 1295-1298 May 1990.
that getting this information using transient analysis would L. Watson, “Globally convergent homotopy methods: a tuto-
rial,” Appl. Math. and Comp., vol. 31BK, pp. 369-396, 1989.
have required about one week of CPU time. Table I sum- Rohrer, R.A., Nagel L., Meyer, R. and Weber, L., “Computa-
marizes performance data for these simulations. tionally efficient electronic-circuit noise calculations,” IEEE J.
Solid State Circuits, vol. SC-6, pp. 204-213, 1971.
Director, S.W. and Rohrer, R.A., “Automatednetwork design-
IV. CONCLUSION the frequency domaic case,” IEEE Trans. Circuit Theory, Vol.
CT-16, pp. 370-337, 1969.
This paper presents a new harmonic balance algorithm Rizzoli, V., F. Mastri, D. Masotti, “A hierarchical harmonic-
capable of solving problems 2-3 orders of magnitude larger balance technique for the efficient simulation of large size
microwave circuits,” 25th European Microwave Conference,
than its predecessors. The efficiency gain is due to (1) the Bologna, Italy, Sept. 1995, pp. 615-619.
decomposition of the large and dense Jacobian matrix into Freund, R., G.H. Golub, N.M. Nachtigal, ”Iterative solution of
linear systems”, Acta Numerica, pp. 57-100, 1991.
a number of inexpensive-to-apply linear operators, and (2) J. Vlach and K. Singhal, Computer Methods fur Circuit Analysis
use of an iterative linear solver which exploits the decom- and Design. New York, N.Y.: Van Nostrand Reinhold, 1983.
position and avoids the storage and factorization of the Ortega, J.M. and Rheinboldt, W.C., Iterative Solutions of Nun-
lanear Equations in Several Variables. Academic Press, New
Jacobian matrix. The convergence of the linear solver is York, 1969.
ensured by a problem specific preconditioner rooted in en- Roychowdhury, J. S . “Structure in the Jacobian matrices of non-
gineering intuition. linear circuits in steady state,”, AT&T internal document.

21.6.4
464

Authorized licensed use limited to: CNRS -XLIM UMR 6172. Downloaded on May 6, 2009 at 05:22 from IEEE Xplore. Restrictions apply.

You might also like