# RF Harmonic Balance Analysis for Nonlinear Circuits

*You may need RF harmonic balance analysis to determine the best operating point and frequency domain response in this PCB*

Designers make a lot of noise about impedance matching, and this is often discussed in idealized situations that are only approximations to reality. As much as we like to think that an AC driver is truly sinusoidal, this is not the case in reality, which makes impedance matching difficult for real signals. Fortunately, RF harmonic balance analysis can help you determine appropriate impedance matching in linear and nonlinear circuits for real sinusoidal signals or nearly digital signals.

## The Challenge in Analyzing Nonlinear RF Circuits

In linear and nonlinear circuits that are driven with a periodic signal, the system will eventually enter a steady state after the transient response decays to zero. Note that this also applies to stable circuits with feedback; the system will eventually enter a stable steady-state where the response in the circuit follows that of the driver.

In RF circuits, especially at mmWave frequencies, one common task is impedance matching at different points in the network. Providing maximum power transfer from one network (i.e., a driver) to a downstream network (i.e., a receiver) and suppressing reflection at the downstream input requires impedance matching at the particular frequencies of interest. When working with an ideal sinusoidal driving signal in linear circuits, this is simple enough; your job is to match impedance at a single frequency. However, nonlinear circuits can have nonlinear resistance, meaning the current is a nonlinear function of the driving voltage.

Unfortunately, real drivers do not generate perfectly sinusoidal signals, and many circuits are not purely linear. Even if your driver does manage to generate a perfectly sinusoidal signal, the signal seen at the receiver will no longer be perfectly sinusoidal. Problems like power bus noise, EMI received in a trace connecting the driver and receiver, reflections on a trace due to impedance discontinuities (e.g., vias, bends, solder connections, or other variations in trace geometry), and phase noise cause the intended sinusoidal signal to deviate from the desired frequency and/or phase.

Real circuits can also contain nonlinear elements (e.g., diodes) that will generate harmonics from a sinusoidal tone. Just as the fundamental frequency needs to be impedance matched at the output port of a particular circuit, ideally these harmonics also should be impedance matched their respective input voltage levels. Unfortunately, this is simply not possible without iteratively creating a cascaded LC network that matches impedance at the fundamental frequency and each harmonic. In theory, this would require an infinite number of cascaded impedance matching networks.

*These tuning forks will generate multiple overtones*

The best you can do is determine the voltage level of each harmonic that causes the circuit to satisfy Kirchoff’s current law at the desired frequency while accounting for the driver’s bandwidth, any harmonics present in the signal, and the fact that impedance can be a nonlinear function. This is where RF harmonic balance becomes important for analog circuits with nonlinear subcircuits and/or circuits that are driven with a less-than-perfect sinusoidal tone. You can then analyze reflections in the circuit to determine the appropriate impedance that produces matching for this particular input signal.

This unique frequency domain analysis technique allows a designer to analyze the relationship between an imperfect sinusoidal driving signal, the driving level of each harmonic, the currents in the network, and even the impedance of a network, all in the presence of nonlinear circuit elements. Note that this applies to time-invariant nonlinear circuits, although some researchers have used RF harmonic balance for periodically-varying or nearly-periodic circuits. You can calculate the current in the circuit as a function of the input frequency spectrum and input voltage level. The output from this simulation should match the current you would measure in the frequency domain with a vector network analyzer, thus the simulation provides a useful comparison with experiments.

## How RF Harmonic Balance Works

The goal in RF harmonic balance analysis is to estimate the input voltages required to satisfy Kirchoff’s current law in a network at particular frequencies. This is done by taking a nonlinear circuit and splitting it into its linear and nonlinear subcircuits. Note that you cannot perfectly satisfy Kirchoff’s current law with the numerical techniques listed above, but you can satisfy it to within some user-defined threshold (called error below):

Due to the nonlinear nature of many circuits, you’ll quickly find that you need to solve one or more transcendental equations to determine the voltage value at each frequency in the driving signal. For example, if you include a fundamental frequency and its first three harmonics, you have a total of eight (four amplitude and four phase equations) transcendental equations, which may be coupled to each other. These problems quickly become intractable, thus an iterative numerical method (e.g., Newton-Raphson) is normally used, or the problem can be rewritten as an optimization problem and solved using trial-and-error (e.g., with an evolutionary algorithm).

*Flowchart showing a harmonic balance simulation flowchart*

Once your simulation converges, you can transform the estimated input spectrum back to the time-domain with an inverse Fourier transform. This gives you the time-dependent waveform for the input signal. The final iteration of the linear and nonlinear current also tells you the time-dependent current throughout the circuit. The product of these two functions gives you the instantaneous power.

## Building a Model for RF Harmonic Balance

As the input waveform becomes more nonlinear in the time domain, or more square-shaped, more harmonics are required to correctly describe the input waveform in the frequency domain. This will begin to slow down the simulation as more unknowns are added to the matrix. In reality, parasitics cause any physical circuit to be band-limited in nature, which is particularly the case in RF circuits and devices. Therefore, you can limit the useful frequencies to a low number.

For any periodic waveform sent into the circuit under consideration, you could theoretically construct an input spectrum with an infinite number of discrete frequencies, and the frequencies under consideration need not be related by integers. This means that, despite the term “harmonic balance”, you can consider things like intermodulation products or noise in the input spectrum. Nonlinear components in the circuit will naturally generate harmonics from the set of input frequencies, and you should not include these particular frequencies in the input spectrum.

When the input signal has finite discrete spectrum, the models used to describe the components in the circuit under consideration are S-parameter files. Note that these model descriptions can be generalized to X-parameters for nonlinear components, which provide a more complete description of the circuit’s behavior at any input signal level. Including more frequencies in the calculation increases the required convergence time, and there is no guarantee that your simulation will converge as this depends on the iteration step implemented during estimation and the time step used in the discrete Fourier transform.

## RF Harmonic Balance for Multi-band Components and Antennas

With RF harmonic balance analysis, it is possible to examine the response of a receiver to multiple carrier frequencies that may be supplied by a driver, as well as their harmonics and intermodulation products, if they are present. This becomes important in analog multiplexers, multi-band antennas, frequency mixers or multipliers, modulators, power amplifiers, the less-often-used analog serializer, or any other network as these components must operate at multiple frequencies simultaneously.

One example is a Bluetooth or Wifi antenna with a 2x2 MIMO transceiver and input/output amplifiers. This type of transceiver could operate at 2.4 and 5 GHz simultaneously with a dual-band matching network. If you treat the antenna as driver that supplies two input signals and any spurious harmonic content, you can determine the signal levels that will satisfy Kirchoff’s laws for each of these frequency bands with RF harmonic balance analysis.

*This Bluetooth module can be analyzed with RF harmonic balance analysis*

One might ask the following: why can’t I just use the circuit’s transfer function and the impedance at the desired frequency to determine something like impedance matching? The reason is that transfer functions (or transfer matrices for N-port networks) are only defined for linear circuits, thus you cannot use these tools to examine the effects of nonlinear frequency mixing and/or harmonic generation in a nonlinear circuit.

When combined with another technique like sensitivity analysis, you now have the tools to analyze how small variations in your components will affect your results from RF harmonic balance analysis. Transient analysis is normally performed before RF harmonic balance analysis in order to examine how long the circuit must operate before settling into its steady-state oscillation. This shows how the circuit responds to a sudden stimulus in the time-domain and finally settles to a steady state.

Note that not all simulators can perform these multiple analyses simultaneously. However, you can perform RF harmonic balance analysis alongside something like sensitivity or transient analysis manually or in sequence. This will give you a comprehensive examination of how your circuits will be affected by variations in component values, fast changes in DC bias levels (e.g., if ground bounce occurs), and how long the circuit takes to reach the steady state oscillation.

If you’re looking to learn more about how Cadence has the solution for you, talk to us and our team of experts.