I’ve decided to go through some basics of circuit design. In this post, I’ll cover the different types of circuit simulator analyses. Most are available in SPICE, Synopsys HSPICE, Cadence Spectre, and Agilent ADS, depending on vendor-specific options.

## Executive Summary

For time-invariant blocks, such as:

• LNA’s
• RF Amplifiers
• Baseband filters
• Operation Amplifiers
• Linear regulators

Use dc analysis to determine bias points, ac analysis to determine gain, noise analysis to measure noise.
Use hb analysis to determine two-tone linearity (IM2, IM3). Use (in order of preference) hb, pss, or transient to determine single-tone linearity (HD2/3/4/5).

In some cases, elevated noise can occur with large inputs. Use (in order of preference) hbnoise or pnoise to measure that.
For blocks with feedback, such as:

• Linear regulators
• Active filters

Use stb analysis to simulate loop gain and determine phase margin.

For time-varying blocks, such as:

• Mixers
• Switched-capacitor circuits

Use dc analysis to determine bias points, use steady analysis to simulate LO operation, and pac + pnoise to simulate small-signal ac and noise inputs/outputs.
Use hb analysis for single input tone linearity (LO + single input tone) and multi-tone simulation (LO + two or more inputs). Use hbnoise to simulate elevated noise levels due to large inputs (blockers).

You can get an estimate of the dynamic operation from looking at ac analysis with switch set in a desired state. For example, with a switched-mode mixer, I might put a dc source on the LO and look at the gain through the Mixer (from LNA to PMA). I can also do a noise simulation to get an estimate of where the noise is coming from. However, these simulations don’t include the actual mixing effects.

## Taxonomy of systems

Before we delve into what analysis is best for what problem, we should first consider the classification of systems in general. They can basically be broken down by the following criteria:

• time base: discrete-time (DT) or continuous-time (CT)
• response dependence: time-variant (TV) or time-invariant (TI)
• linearity: linear or nonlinear

You probably will encounter systems that as a whole do not fit into each of these categories. However, each system can be broken down into a component (call it a sub-system) that fits in each of the above categories. For example, a sigma-delta DAC generally has a discrete-time modulator and a continous-time reconstruction filter. For brevity, we will simply use the term system rather than sub-system.

The first two categories are basically black-and-white: a system is either discrete-time or continuous-time. Likewise, a system is either time-variant or time-invariant. Linearity, however, is a relative term. All circuits are nonlinear. However, if their nonlinearities (distortion) is low enough, we call them linear.

A circuit is discrete-time if it is triggered by some clock (i.e. it approximates some difference equation). Examples of discrete-time circuits are switched-capacitor filters, most sigma-delta modulators, and all digital logic. A circuit is continous-time if it operates continously without being triggered by a clock (i.e. it approximates some differential equation). Examples of continuous-time circuits are filters, linear regulators, and all RF circuits (excluding TI’s Digital Radio Processing).

A circuit is time-invariant if its input-output relationship does not change with time. For example, if I send an input x and get an output y, do I get the same output if delay x by (say) 1 μs? If not, the circuit is time-variant. If so (and if the same holds true for not just a 1 μs delay, but all delays), the circuit is time-invariant. Most circuits you encounter are time-invariant, such as filters, amplifiers, almost all RF circuits. Examples of time-variant circuits are RF mixers (analog multipliers) such as the Gilbert cell and the MOS chopping mixer. I’ve heard many say that it’s wierd that we want mixers to be linear, when a mixer itself is a non-linear device. In truth, the ideal mixer is linear. However, in the past, the preferred way of creating a mixer was to sum two signals (an RF input and an LO) and pass them through a non-linear device (a diode for example); the resulting cross-multiplication (through the nonlinearity of the device) would cause a mixing. The ideal mixer, however, is both linear and time-variant (with respect to its RF input/output and baseband output/input, not its LO).

A circuit is linear if it obeys the rule that the input α×u1 + β×u2 (composed by a weighted sum of any signals u1 and u2) yields an output α×y1 + β×y2. That is, the output is proportional to the input, including sums of different inputs. If I double the input, I should get double the output. I should also be able to sum two different inputs and have the sum of two different outputs come out.

[ad#250×250-circuitdesign]

## Circuit analyses

So, that taxonomy aside, here are the different analyses. I’ll admit that most of my experience is with Cadence tools.

### op

An operating point analysis solves KCL in a static condition–that is all derivatives are zero, and nothing is varying with respect to time. This analysis is useful for determining bias conditions. It is also used as a starting point for ac analysis and for noise analysis. In Spectre, an op analysis is a special case of a dc analysis (you select the “save operating point information” during a dc analysis).

This analysis is useful for all circuits. Initial conditions or nodeset’s can be specified to either force or lead the simulator to a preferred solution (in the case of circuits with multiple stable states).

### dc

This performs several op analysis, creating a curve by sweeping either a voltage source or some design parameter.

This analysis is useful for all circuits. It is useful for genering device (I-V) curves and for measuring other device or circuit parameters with respect to design parameters.

### transient

Transient extends the op analysis by performing an op analysis and then constructing future timesteps through integral/differential relationships. By making these incremental time steps forward, the entire sequence of circuit operation can be performed with respect to time.

### steady/pss

Periodic steady-state (pss) is a special case of transient which invokes the property that all signals (and responses) are periodic. A transient is run for one fundamental period. The resulting simulation set is then used as a starting point for another transient run over a fundamental period. The process is repeated until a specified accuracy is reached.

In spectre, a beat frequency (or fundamental period) must be specified. This period determines the length of the simulation. Unfortunately, when multiple tones are present, this analysis can be computationally time consuming. For example, if one has a 1.0 GHz input and a 1.00001 GHz input, the fundamental period is 100 us. Yet, since the inputs are on the order of 1 GHz, the time steps must be kept to the range of 1 ns, resulting in a very long computation time.

### ac

ac analysis takes an operating point and linearizes every element with in the circuit. A sinusoidal source is then applied at the input and the source’s frequency is swept to produce a frequency response. Typically, dedicated ac source parameters are defined on voltage/current sources to excite the circuit for this analysis.

ac is useful for linear, time-invariant (LTI) circuits.

### loop gain/stability

Loop gain (lg) or stability (stb) is a speciallized form of ac analysis used to determine circuit stability. It is essentially made to handle the problem that when one breaks a feedback loop, one is no longer loading the output of the loop with its input. Loop gain ensures that the correct bias points are met and ensures that the opened loop sees the same impedance that it would when the loop was closed.

The result is a frequency-domain response that captures the loop gain or return ratio of the circuit. From this response, several stability criteria (gain margin, phase margin) can be measured.

Loop gain is useful for circuits that contain linear time-invariant (LTI) feedback loops. Examples are linear regulators, active filters, etc.

### noise

Noise analysis is a specialized form of ac analysis where all the noise sources (rather than user-specified ac sources) of the circuit are invoked. These noise sources are computed from device models. The intent is to accurately predict the resulting noise of the circuit in the form of a noise spectrum. Most simulators will also yield a noise power that results from integrating this noise spectrum over a specified bandwidth.

noise analysis is useful for time-invariant (LTI) circuits. Technically, the noise terms are assumed to combine linearly to the output spectra, and nonlinearities operating on the noise are not captured. Most of the time, the noise levels are low enough that nonlinear noise is not important.

### pnoise

Periodic noise (pnoise) takes the resulting data set from a pss run and linearizes it for noise. The circuit is not assumed to be time-invariant, and mixing of noise (noise spectra being shifted in frequency) is reflected in the analysis.

pnoise analysis is useful for time-variant (LTV) circuits with periodic inputs. Like noise analysis, the noise terms are assumed to combine linearly to the output spectra, and nonlinearities operating on the noise are not captured. However, time-varying noise (caused by the periodic input) is captured.

### harmonic balance

Harmonic balance (hb) is probably one of the most advanced analyses. Instead of operating purely in the time-domain (like ac) or purely in the frequency domain (ac), it switches between the two. This hybrid allows for multiple tones in the circuit while capturing both nonlinear and time-variant behavior.

harmonic balance is typically used to capture distortion (IM2/IP2, IM3/IP3, IM5/IP5). It is a good replacement for transient analysis when the inputs are composed of tones. Circuit instabilities will show in transient while they might not in harmonic balance. The reason is that harmonic balance only expects to find tones at the specified input frequencies; if the circuit will oscillate at some other frequency, it will go undetected.

There are extensions on harmonic balance analysis for oscillator design. They essentially sweep frequency to determine the oscillation frequency and then simulate at that frequency.

### pnoisehb/hbnoise

Harmonic balance noise is the equivalent of pnoise, except that the noise is linearized based on a previous harmonic balance analysis (rather than being based on a pss analysis).