HARMONIC BALANCE SIMULATOR
Term Paper primary design goals. First, they must transmit
a specified amount of power while consuming
Abstract —Radio-frequency (RF) circuits
as little power as possible. Second, they must
exhibit several distinguishing characteristics
not interfere with transceivers operating on
that make them difficult to simulate using
adjacent channels. For receivers, there are
traditional SPICE transient analysis. The
three primary design goals. First, they must
various extensions to the harmonic balance
faithfully recover small signals. Second, they
and shooting method simulation algorithms are
must reject interference outside the desired
able to exploit these characteristics to provide
channel. And third, like transmitters, they must
rapid and accurate simulation for these
be frugal power consumers.
circuits.
A. Small Desired Signals
RF circuits have several unique characteristics
that are barriers to the application of Receivers must be very sensitive to detect
traditional circuit simulation techniques. Over small input signals. Typically, receivers are
the last decade, researchers have developed expected to operate with as little as 1
many special-purpose algorithms that microVolt at the input. The sensitivity of a
overcome these barriers to provide practical receiver is limited by the noise generated in
simulation for RF circuits, often by exploiting the input circuitry of the receiver. Thus, noise
the very characteristic that represented the is an important concern in receivers, and the
barrier to traditional methods ability to predict noise by simulation is very
important. As shown in Fig. 1, a typical
This paper is an introduction to Harmonic
superheterodyne receiver first filters and then
Balance simulation.
amplifies its input with a low-noise amplifier
THE RF INTERFACE (LNA). It then translates the signal to the
intermediate frequency (IF) by mixing it with
WIRELESS transmitters and receivers can be the first local oscillator (LO). The noise
conceptually separated into baseband and performance of the front end is determined
radio-frequency (RF) sections. Baseband is the mainly by the LNA, the mixer, and the LO.
range of frequencies over which transmitters While it is possible to use traditional SPICE
take their input and receivers produce their noise analysis to find the noise of the LNA, it
output. The width of the baseband determines is useless on the mixer and the LO because the
the underlying rate at which data can flow noise in these blocks is strongly influenced by
through the system. There is a considerable the large LO signal.
amount of signal processing that occurs at
baseband designed to improve the fidelity of
the data stream being communicated and to
B. Large Interfering Signals
reduce the load the transmitter places on the
transmission medium for a particular data rate. Receivers must be sensitive to small signals
The RF section of the transmitter is even in the presence of large interfering
responsible for converting the processed signals, often known as blockers. This
baseband signal up to the assigned channel and situation arises when trying to receive a weak
injecting the signal into the medium. or distant transmitter with a strong nearby
Conversely, the RF section of the receiver is transmitter broadcasting in an adjacent
responsible for taking the signal from the channel. The interfering signal can be 60–70-
medium and converting it back down to dB larger than the desired signal and can act to
baseband. With transmitters there are two block its reception by overloading the input
stages of the receiver or by increasing the Oscillators are generally used in RF circuits to
amount of noise generated in the input stage. generate the LO signal for mixers. The noise
Both of these problems result if the input stage performance of the mixer is strongly affected
is driven into a nonlinear region by the by noise on the LO signal. The LO is always
interferer. To avoid these problems, the front passed through a limiter, which is generally
end of a receiver must be very linear. Thus, built into the mixer, to make the mixer less
linearity is also an important concern in sensitive to small variations in the amplitude
receivers. Receivers are narrow-band circuits of the LO. However, the mixer is still sensitive
and so the nonlinearity is quantified by to variations in the phase of the LO. Thus, it is
measuring the intermodulation distortion. This important to minimize the phase noise
produced by the oscillator. Nonlinear
involves driving the input with two sinusoids
oscillators naturally produce high levels of
that are in band and close to each other in
phase noise.
frequency and then measuring the
intermodulation products. This is generally an OVERVIEW:
expensive simulation with SPICE because
many cycles must be computed in order to Harmonic balance is a frequency-domain
have the frequency resolution necessary to see analysis technique for simulating distortion in
the distortion products. nonlinear circuits and systems. It is usually the
method of choice for simulating analog RF and
microwave problems, since these are most
naturally handled in the frequency domain.
Within the context of high-frequency circuit
and system simulation, harmonic balance
offers several benefits over conventional
time-domain transient analysis. Harmonic
Figure 1 RF receiver indicting front end part in balance simulation obtains frequency-domain
pink color. voltages and currents, directly calculating the
II. BASIC RF BUILDING BLOCKS steady-state spectral content of voltages or
currents in the circuit. The frequency
RF systems are constructed primarily using integration required for transient analysis is
four basic building blocks—amplifiers, filters, prohibitive in many practical cases.
mixers, and oscillators. Amplifiers and filters
are common analog blocks and are well Many linear models are best represented in
handled by SPICE. However, mixers and the frequency domain at high frequencies.
oscillators are not heavily used in analog Use the HB simulation to:
circuits, and SPICE has limited ability to
analyze them. 1. Determine the spectral content of
voltages or currents.
A. Mixers 2. Compute quantities such as third-order
Mixers translate signals from one frequency intercept (TOI) points, total harmonic
range to another. They have two inputs and distortion (THD),
3. and intermodulation distortion
one output. One input is for the information
components.
signal and the other is for the clock signal, the
4. Perform nonlinear noise analysis.
LO. Ideally, the signal at the output is the
same as that at the information signal input,
except shifted in frequency by an amount Harmonic Balance Background
equal to the frequency of the LO.
Unlike time domain simulators, HB simulators
B. Oscillators analyze circuits in the frequency domain. The
development of frequency domain simulation
technology was motivated by the following
deficiencies of time domain methods in resorting to a frequency domain formulation of
applications to high-frequency circuits: circuit equations (equations that arise from an
application of Kirchoff's laws and the circuit
Distributed circuit elements are almost
elements' constitutive relations.) The
exclusively modeled, measured and
frequency domain formulation is obtained by
analyzed in the frequency domain, and
substituting the unknown waveforms with
their incorporation in SPICE-like
their phasor equivalents, and then matching
simulators is notoriously unreliable and
the phasor coefficients that correspond to
inefficient.
distinct frequencies.
Multi-tone simulations (those that involve
an application of two or more sinusoids The elegance of the HB approach, in reference
that are harmonically unrelated) are very to the problems seen by time domain
common in RF and microwave simulators, lies in the following observations:
applications but, again, very difficult to At each step of the iterative solution
handle in time domain simulators. search, the currents entering the linear
Consider, for example, an amplifier that is subnetwork are related to the
to be tested by an application of two interconnecting port voltages by the
equal-amplitude sinusoids located at 9.999 linear subnetwork's Y-parameters.
GHz and 10.001 GHz. Such a test is Distributed components, therefore, are
frequently applied to determine the third- simulated in the most natural way, by
order intercept, a popular figure of merit means of frequency domain linear
of an amplifier's linearity. circuit techniques.
The two-tone input may be viewed as a The frequency domain representation
high-frequency carrier modulated by a of two-tone signals, as will soon be
comparatively very slow sinusoid where, apparent, usually consists of less than
in this case, fcarrier = 10 GHz and fmodulation = 1 100 terms. This is in contrast to the
MHz. So, there are 10,000 carrier cycles time domain representation that
per one cycle of the modulation (envelope) requires hundreds of thousands of
signal and, in addition, the simulator must samples.
follow the slow envelope over several
HB simulators impose the steady-state
periods to determine the steady-state.
conditions by virtue of phasor
More importantly, a time domain
expansion of the unknown signals.
simulator takes many steps per carrier
Simulation times are, therefore,
cycle in order to maintain accuracy. In all,
independent on the length of circuit
each unknown circuit waveform (in a time
transients.
domain simulator, "unknown circuit
waveforms" are usually the node voltages
and certain branch currents) is sampled at The following figure illustrates the principle
hundreds of thousands of instants to find behind HB simulation.
the solution, and worse, the number of
samples increases with the ratio of
carrier/envelope bandwidth. The solution
process is therefore slow, memory
consuming, and often simply impractical.
Many high-frequency circuits are high-Q,
implying that they exhibit transients that
last over hundreds and even thousands of
carrier cycles. RF and microwave
designers are primarily interested in
steady-state responses, and time is wasted As shown in this figure, the circuit is
in the process of simulating through the partitioned in two subnetworks -- one that
transients. contains all the linear elements and another
HB simulators overcome these problems in a that encompasses the nonlinear devices. The
rather elegant and efficient manner, by voltages at the interconnecting ports are
considered as the unknowns, so the goal of HB
analysis is to find the set of voltage phasors in
such a way that Kirchoff's laws are satisfied to
desired accuracy. One way to state this goal in
formal terms is:
Find
V1(ωk),V2(ωk),...,VN(ωk) (6.1)
for all ωk such that relation
|IL(ωk)-INL(ωk)|<ε (6.2) For the purposes of simulation, you truncate
this representation to a finite set of terms by
holds at each interconnecting port. discarding components beyond some point
Here, ωk is the set of significant frequencies in n=N. The act of spectrum truncation is a
the port voltage spectra and ε specifies the natural one, however, as high-frequency terms
desired accuracy. become less significant due to the band-limited
nature of physical circuits.
The solution search, in most general terms,
consists of the following steps: Generally, the choice of N depends on the
degree of nonlinearity. Power amplifiers
Specify the set of significant operating deep in compression, for example,
frequencies, specify the desired require more terms than low-noise amplifiers
accuracy, and determine an initial or amplifiers that behave almost linearly. The
guess at the solution. former may require N=8, for example, while
Calculate the currents that enter the the latter may need as little as N=3.
linear subnetwork.
Calculate the currents through the The idea of spectrum truncation is slightly
nonlinear devices. more complicated in the case of "multi-tone"
excitations. A multi-tone excitation involves
Calculate the difference between the
two or more tones that are not integer-related,
two sets of currents.
as in the previous example that involved
Determine a new guess at the solution
ω1=9.999 GHz and ω2=10.001 GHz. In that
in a way that reduces the difference. case, it may be shown that circuit phasors
Repeat the process starting at Step 2 correspond to frequencies in the set
until Kirchoff's laws are satisfied.
Again, you truncate this set as shown in the
following figure.
Choice of Significant Frequencies
In general, the spectral components that are
In general, phasor equivalents of nonlinear retained in the simulation are given by
circuit waveforms consist of an infinite
number of terms. If a circuit is driven by a |mω1+nω2| (6.3)
sinusoidal waveform at a frequency ω0, for
example, these terms correspond to Where,
frequencies in the set nω0,n = 0,1,...,∞
as shown in the following figure.
In the previous figure, the truncation was simulation results changed by a negligible
performed using M=N=2. The terms nω1 are amount.
often referred to as tone-1 harmonics and,
For most users, it is intuitive that a pure
similarly, mω2 are called tone-2 harmonics.
sinusoidal input requires single-tone analysis,
The multipliers m and n are referred to as
and that two closely spaced sinusoids require a
harmonic indices. The quantity |m|+|n| is
two-tone analysis. Confusion arises in
known as the order of an intermodulation
simulations that involve sources such as
(also, mixing or distortion) product.
square-wave pulses, which consist of a large
The two-tone spectrum shown in the figure number of harmonics that are not closely-
may be simplified further by discarding spaced.
intermodulation products that are higher than
To prevent confusion, you should keep in
some K=|m|+|n|. In a near-linear low-noise
mind that a simulation is considered n-tone if n
amplifier tested under two-tone excitation, for
is the smallest number of frequencies whose
example, experience shows that the terms at
integer linear combinations describe all the
2ω2-2ω1 and 2ω2+2ω1 are negligibly small.
other frequencies in the source. A square wave
These terms being of order 4, it may be
signal, or any periodic signal, has frequency
reasonable to exclude them from consideration
components that are integer multiples of one
by setting K=3. Modern HB simulators, like
frequency -- namely, the fundamental;
the ones featured in the AWR Microwave
therefore, such a simulation is considered
Office program, are very efficient and, in
single-tone.
terms of speed, far less sensitive to the number
of frequencies than early HB simulators; the Calculation of Nonlinear
speed improvement gained by limiting K is
therefore small, and setting it to a small Device Currents
number should be avoided. As previously presented, the calculation of
The case of three-tone analysis is analogous to currents entering the linear ports is rather
the two-tone situation described previously. straightforward as it involves the familiar
Three-tone simulations are very useful for (but theory of linear multi-ports in the
not limited to) linearity testing of mixers, frequency domain. It is, however, less
where the circuit is subject to an LO excitation obvious how an HB simulator calculates
and two-closely spaced sinusoids as an IF (or the nonlinear device currents.
RF) input. In this case, every waveform in the Nonlinear devices are almost exclusively
circuit has an equivalent phasor representation specified as time domain functions of the
at frequencies in the set controlling voltage waveforms. In an HB
simulator, however, the controlling
voltages are represented in the frequency
and this set is truncated subject to domain. To evaluate the nonlinear device
functions, the simulator resorts to the
following procedure: 1) it converts the
voltage phasors to the time domain by
application of Fourier transformations 2) it
Typically, the circuit behavior with respect to evaluates the nonlinear devices in the time
the LO signal is highly nonlinear, while the domain, and 3) it applies another set of
input signal suffers relatively mild distortion. Fourier transformations to obtain the
In applications, therefore, P should be set current phasors.
larger than M and N; typically, P is at least 5
Because of this brief excursion to the time
(and often two to three times as high), versus 2
domain, HB simulators are sometimes
or 3 for the remaining limits.
referred to as mixed (frequency-time)
Regardless of the type of simulation, you domain techniques. This is mostly a
should verify that the frequency set used in the matter of nomenclature, but the frequency
analysis provides accurate results by domain label is preferred because of the
increasing the number of frequencies slightly, phasor representation of the unknown
repeating the simulation, and verifying that the signals.
Measuring Voltages and
Specifying Simulation Currents
Accuracy
HB simulation is an iterative process that
terminates when Kirchoff's laws for the
circuit are satisfied. Two criteria are used
to determine whether these laws are
satisfied: the maximum absolute tolerance
and the maximum relative tolerance
between the linear and nonlinear currents
at each frequency and at each
interconnecting port. The simulation ends
when either of these two criteria are met:
EXAMPLE:
Example Circuit: First and Last Iterations
simulation of spectrum of mixer output:
Sim
Simulation of Intermodulation distortion in the
front end of the circuit.