{"id":343,"date":"2008-11-13T14:55:13","date_gmt":"2008-11-13T19:55:13","guid":{"rendered":"https:\/\/www.circuitdesign.info\/blog\/?p=343"},"modified":"2017-05-23T00:47:35","modified_gmt":"2017-05-23T05:47:35","slug":"circuit-simulator-analyses","status":"publish","type":"post","link":"https:\/\/www.circuitdesign.info\/blog\/2008\/11\/circuit-simulator-analyses\/","title":{"rendered":"Circuit Simulator Analyses"},"content":{"rendered":"<p>I&#8217;ve decided to go through some basics of circuit design. In this post, I&#8217;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.<\/p>\n<p><!--more--><\/p>\n<h2>Executive Summary<\/h2>\n<p>For time-invariant blocks, such as:<\/p>\n<ul>\n<li>LNA&#8217;s<\/li>\n<li>RF Amplifiers<\/li>\n<li>Baseband filters<\/li>\n<li>Operation Amplifiers<\/li>\n<li>Linear regulators<\/li>\n<\/ul>\n<p>Use <em>dc<\/em>\u00a0analysis to determine bias points,\u00a0<em>ac<\/em>\u00a0analysis to determine gain, <em>noise<\/em>\u00a0analysis to measure noise.<br \/>\nUse <em>hb<\/em>\u00a0analysis to determine two-tone linearity (IM2, IM3). Use (in order of preference) <em>hb<\/em>, <em>pss<\/em>, or <em>transient<\/em>\u00a0to determine single-tone linearity (HD2\/3\/4\/5).<\/p>\n<p>In some cases, elevated noise can occur with large inputs. Use (in order of preference) <em>hbnoise<\/em>\u00a0or <em>pnoise<\/em>\u00a0to measure that.<br \/>\nFor blocks with feedback, such as:<\/p>\n<ul>\n<li>Linear regulators<\/li>\n<li>Active filters<\/li>\n<\/ul>\n<p>Use <em>stb<\/em>\u00a0analysis to simulate loop gain and determine phase margin.<\/p>\n<p>For time-varying blocks, such as:<\/p>\n<ul>\n<li>Mixers<\/li>\n<li>Switched-capacitor circuits<\/li>\n<\/ul>\n<p>Use <em>dc<\/em> analysis to determine bias points, use <em>steady<\/em>\u00a0analysis to simulate LO operation, and <em>pac<\/em> + <em>pnoise<\/em>\u00a0to simulate small-signal ac and noise inputs\/outputs.<br \/>\nUse <em>hb<\/em>\u00a0analysis for single input tone linearity (LO + single input tone) and multi-tone simulation (LO + two or more inputs). Use <em>hbnoise<\/em>\u00a0to simulate elevated noise levels due to large inputs (blockers).<\/p>\n<p>You can\u00a0get an estimate of the dynamic operation from looking at <em>ac<\/em>\u00a0analysis 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 <em>noise<\/em>\u00a0simulation to get an estimate of where the noise is coming from. However, these simulations don&#8217;t include the actual <strong>mixing<\/strong>\u00a0effects.<\/p>\n<h2>Taxonomy of systems<\/h2>\n<p>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:<\/p>\n<ul>\n<li><span style=\"#808080;\">time base: discrete-time (DT) or continuous-time (CT)<\/span><\/li>\n<li>response dependence: time-variant (TV) or time-invariant (TI)<\/li>\n<li>linearity: linear or nonlinear<\/li>\n<\/ul>\n<p>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 <em>sub-system<\/em>) 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 <em>system<\/em> rather than <em>sub-system<\/em>.<\/p>\n<p>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.<\/p>\n<p style=\"#808080;\">A circuit is discrete-time if it is triggered by some clock (i.e. it approximates some <strong>difference<\/strong> 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 <strong>differential<\/strong> equation). Examples of continuous-time circuits are filters, linear regulators, and all RF circuits (excluding TI&#8217;s Digital Radio Processing).<\/p>\n<p>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 \u03bcs? If not, the circuit is time-variant. If so (and if the same holds true for not just a 1 \u03bcs 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. <span style=\"#999999;\">I&#8217;ve heard many say that it&#8217;s wierd that we want mixers to be linear, when a mixer itself is a non-linear device. In truth, the ideal mixer <em>is<\/em>\u00a0linear. 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).<\/span><\/p>\n<p>A circuit is linear if it obeys the rule that the input \u03b1\u00d7u<sub>1<\/sub> + \u03b2\u00d7u<sub>2<\/sub> (composed by a weighted sum of any signals u<sub>1<\/sub> and u<sub>2<\/sub>) yields an output \u03b1\u00d7y<sub>1<\/sub> + \u03b2\u00d7y<sub>2<\/sub>. 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.<\/p>\n<p>[ad#250&#215;250-circuitdesign]<\/p>\n<h2>Circuit analyses<\/h2>\n<div>So, that taxonomy aside, here are the different analyses. <span style=\"#999999;\">I&#8217;ll admit that most of my experience is with Cadence tools.<\/span><\/div>\n<h3>op<\/h3>\n<p>An operating point analysis solves KCL in a static condition&#8211;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 <em>ac<\/em> analysis and for <em>noise<\/em>\u00a0analysis. In Spectre, an op analysis is a special case of a dc analysis (you select the &#8220;save operating point information&#8221; during a dc analysis).<\/p>\n<p>This analysis is useful for all circuits. Initial conditions or nodeset&#8217;s can be specified to either force or lead the simulator to a preferred solution (in the case of circuits with multiple stable states).<\/p>\n<h3>dc<\/h3>\n<p>This performs several <em>op<\/em>\u00a0analysis, creating a curve by\u00a0sweeping either a voltage source or some design parameter.<\/p>\n<p>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.<\/p>\n<h3>transient<\/h3>\n<p><em>Transient<\/em> extends the op analysis by performing an <em>op<\/em>\u00a0analysis 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.<\/p>\n<h3>steady\/pss<\/h3>\n<p>Periodic steady-state (<em>pss<\/em>) is a special case of <em>transient<\/em>\u00a0which invokes the property that all signals (and responses) are periodic. A transient is run for one\u00a0fundamental\u00a0period. 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.<\/p>\n<p>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.<\/p>\n<h3>ac<\/h3>\n<p><em>ac<\/em>\u00a0analysis takes an operating point and linearizes every element with in the circuit. A sinusoidal source is then applied at the input and the source&#8217;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.<\/p>\n<p>ac is useful for linear, time-invariant (LTI) circuits.<\/p>\n<h3>loop gain\/stability<\/h3>\n<p><em>Loop gain<\/em>\u00a0(<em>lg<\/em>) or <em>stability<\/em> (<em>stb<\/em>) 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.<\/p>\n<p>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.<\/p>\n<p>Loop gain is useful for circuits that contain linear time-invariant (LTI) feedback loops. Examples are linear regulators, active filters, etc.<\/p>\n<h3>noise<\/h3>\n<p>Noise analysis is a specialized form of ac\u00a0analysis 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.<\/p>\n<p><em>noise<\/em>\u00a0analysis 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.<\/p>\n<h3>pnoise<\/h3>\n<p>Periodic noise (<em>pnoise<\/em>) takes the resulting data set from a pss\u00a0run 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.<\/p>\n<p>pnoise\u00a0analysis is useful for time-variant (LTV) circuits with periodic inputs. Like <em>noise<\/em>\u00a0analysis, 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.<\/p>\n<h3>harmonic balance<\/h3>\n<p>Harmonic balance (<em>hb<\/em>) 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.<\/p>\n<p>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.<\/p>\n<p>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.<\/p>\n<h3>pnoisehb\/hbnoise<\/h3>\n<p>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).<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve decided to go through some basics of circuit design. In this post, I&#8217;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.<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[3],"tags":[97,91,98,96,101,61,99,93,100,94,95,92],"class_list":["post-343","post","type-post","status-publish","format-standard","hentry","category-analog-pro","tag-ac","tag-analysis","tag-dc","tag-harmonic-balance","tag-hbnoise","tag-noise","tag-op","tag-pnoise","tag-pnoisehb","tag-pss","tag-steady","tag-transient"],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/poCEy-5x","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.circuitdesign.info\/blog\/wp-json\/wp\/v2\/posts\/343","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.circuitdesign.info\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.circuitdesign.info\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.circuitdesign.info\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.circuitdesign.info\/blog\/wp-json\/wp\/v2\/comments?post=343"}],"version-history":[{"count":26,"href":"https:\/\/www.circuitdesign.info\/blog\/wp-json\/wp\/v2\/posts\/343\/revisions"}],"predecessor-version":[{"id":1080,"href":"https:\/\/www.circuitdesign.info\/blog\/wp-json\/wp\/v2\/posts\/343\/revisions\/1080"}],"wp:attachment":[{"href":"https:\/\/www.circuitdesign.info\/blog\/wp-json\/wp\/v2\/media?parent=343"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.circuitdesign.info\/blog\/wp-json\/wp\/v2\/categories?post=343"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.circuitdesign.info\/blog\/wp-json\/wp\/v2\/tags?post=343"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}