HSPICE® User Guide: Advanced Analog Simulation and Analysis: Version N-2017.12, December 2017
HSPICE® User Guide: Advanced Analog Simulation and Analysis: Version N-2017.12, December 2017
Advanced Analog
Simulation and Analysis
Version N-2017.12, December 2017
Copyright and Proprietary Information Notice
© 2017 Synopsys, Inc. This Synopsys software and all associated documentation are proprietary to Synopsys, Inc. and may only be
used pursuant to the terms and conditions of a written license agreement with Synopsys, Inc. All other use, reproduction,
modification, or distribution of the Synopsys software or the associated documentation is strictly prohibited.
Destination Control Statement
All technical data contained in this publication is subject to the export control laws of the United States of America.
Disclosure to nationals of other countries contrary to United States law is prohibited. It is the reader’s responsibility to
determine the applicable regulations and to comply with them.
Disclaimer
SYNOPSYS, INC., AND ITS LICENSORS MAKE NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH
REGARD TO THIS MATERIAL, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
Trademarks
Synopsys and certain Synopsys product names are trademarks of Synopsys, as set forth at
https://www.synopsys.com/company/legal/trademarks-brands.html.
All other product or company names may be trademarks of their respective owners.
Third-Party Links
Any links to third-party websites included in this document are for your convenience only. Synopsys does not endorse
and is not responsible for such websites and their practices, including privacy practices, availability, and content.
Synopsys, Inc.
690 E. Middlefield Road
Mountain View, CA 94043
www.synopsys.com
iii
Contents
Steady-State HB Sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Harmonic Balance Output Measurements . . . . . . . . . . . . . . . . . . . . . . . . 32
HB .PRINT and .PROBE Output Syntax . . . . . . . . . . . . . . . . . . . . . . . . . 34
HB Output Data Files and Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
HB Error and Warning Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
HB Analysis Error Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
HB Analysis Warning Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Calculating Power Measurements After HB Analyses . . . . . . . . . . . . . . . 39
Power Dissipated in a Resistor. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Power Delivered to a Port Element. . . . . . . . . . . . . . . . . . . . . . . . . . 40
Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Calculations for Time-Domain Output . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
Using .MEASURE with .HB Analyses . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Troubleshooting Convergence Issues with Harmonic Balance Analysis . . . . . 46
Phase Differences Between HB and SIN Sources . . . . . . . . . . . . . . . . . . . . . 47
Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
Optimization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
Optimizing with HB Measurements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
References. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
iv
Contents
4. Oscillator Analysis. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
Oscillator Analysis (.HBOSC and .SNOSC). . . . . . . . . . . . . . . . . . . . . . . . . . . 68
Tutorial Examples Using HBOSC Analysis . . . . . . . . . . . . . . . . . . . . . . . 69
Example 1 — Colpitts Oscillator. . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
Example 2 — Using HBOSC for a CMOS GPS VCO. . . . . . . . . . . . 75
.HBOSC Output Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
Using the .MEASURE Command with .HBOSC . . . . . . . . . . . . . . . . . . . 83
HB Simulation of Ring Oscillators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
Troubleshooting Convergence Problems . . . . . . . . . . . . . . . . . . . . . . . . . 84
General Convergence Issues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
Outer Loop Convergence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
Inner Loop Convergence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
Shooting Newton Oscillator Analysis (.SNOSC) . . . . . . . . . . . . . . . . . . . . . . . 90
Ring Oscillator Example. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
References. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
v
Contents
vi
Contents
vii
Contents
viii
Contents
ix
Contents
x
Contents
References. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259
xi
Contents
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 337
xii
About This Guide
This user guide focuses on advanced analog analysis and modeling and
concentrates on advanced analog circuit characterization, noise modeling and
analysis, and behavioral analysis including Verilog-A.
Chapter Description
Chapter 1, HSPICE Advanced Describes how to use HSPICE advanced analog analyses,
Analog Features take advantage of its specialized features, and use the
Custom WaveView tool; introduces the HSPICE solutions for
noise analysis.
Chapter 2, Harmonic Balance Describes how to use harmonic balance analysis for
Analysis frequency-driven and steady-state analysis.
Chapter 3, Shooting Newton Describes the HSPICE advanced analog steady-state time
Analysis domain analysis based on a Shooting-Newton algorithm.
Chapter 4, Oscillator Analysis Describes how to use the HSPICE advanced analog
functions to perform oscillator and phase noise analysis on
oscillator circuits.
Chapter Description
Chapter 7, Large Signal AC, Describes how to use both harmonic balance-based and
Transfer Function, and Noise Shooting Newton-based AC analysis and transfer function
Analyses analyses, as well as nonlinear, steady-state noise analysis.
Chapter 11, Transient Noise Describes the HSPICE solutions to perform transient noise
Analysis analysis and compute noise statistics and their variation over
time for circuits driven with non-periodic waveforms.
Chapter 13, Behavioral Modeling Describes how to create and use behavioral models.
of Nonlinear Circuits
Chapter 14, Laplace Transform Describes modeling filters and networks, including Laplace
Modeling of Filters and Networks transforms.
Manual Description
HSPICE® Quick Start Guide Provides information to quickly get you started with using the
HSPICE tool for simulation and analysis of your circuit designs.
See also Topics in This Document in the HSPICE Quick Start
Guide.
HSPICE® User Guide: Basic Describes how to use HSPICE to simulate and analyze your
Simulation and Analysis circuit designs, and includes simulation applications. This is the
main HSPICE user guide. See also Topics in This Document in
the HSPICE User Guide: Basic Simulation and Analysis.
HSPICE® User Guide: Describes the syntax for the basic elements of a circuit netlist in
Elements HSPICE, descriptions of each of the element keywords, and
examples of common usage for each element. See also Topics
in This Document in the HSPICE User Guide: Elements.
HSPICE® User Guide: Signal Describes how to use the HSPICE simulator to achieve and
Integrity Modeling and maintain signal integrity in your chip design. See also Topics in
Analysis This Document in the HSPICE User Guide: Signal Integrity
Modeling and Analysis.
HSPICE® User Guide: This guide. Describes how to use the special set of analysis and
Advanced Analog Simulation design capabilities added to HSPICE to support RF and high-
and Analysis speed circuit design. See also Topics in This Document.
HSPICE® Reference Manual: Describes the individual HSPICE commands you can use to
Commands and Control simulate and analyze your circuit designs. See also Topics in
Options This Document in the HSPICE Reference Manual: Commands
and Control Options.
HSPICE® Reference Manual: Describes standard models you can use when simulating your
Device Models circuit designs in HSPICE, including passive devices, diodes,
JFET and MESFET devices, and BJT devices. See also Topics
in This Document in the HSPICE Reference Manual: Device
Models.
Manual Description
HSPICE® Reference Manual: Describes the available MOSFET models you can use when
MOSFET Models simulating your circuit designs in HSPICE. See also Topics in
This Document in the HSPICE Reference Manual: MOSFET
Models.
Conventions
This manual follows these typographical conventions in Synopsys HSPICE®
documentation.
Convention Description
Bold Indicates user input—text you type verbatim—in syntax and examples.
For a graphical user interface, Bold indicates a GUI element such as a
button, menu, field, or other control.
( ) When shown, the parentheses ( ) are part of the syntax. For example:
+ LISTFREQ=(1k 100k 10meg)
Convention Description
Edit > Copy Indicates a path to a menu command, such as opening the Edit menu and
choosing Copy.
Control-c Indicates a keyboard combination, such as holding down the Control key
and pressing c.
Customer Support
Customer support is available through the Synopsys SolvNet customer support
website and by contacting the Synopsys support center.
Accessing SolvNet
The SolvNet support site includes an electronic knowledge base of technical
articles and answers to frequently asked questions about Synopsys tools. The
site also gives you access to a wide range of Synopsys online services, which
include downloading software, viewing documentation, and entering a call to
the Support Center.
To access the SolvNet site:
1. Go to the web page at https://solvnet.synopsys.com.
2. If prompted, enter your user name and password. (If you do not have a
Synopsys user name and password, follow the instructions to register.)
If you need help using the site, click Help on the menu bar.
■
Creating a Configuration File
■
Using Wildcards
■
Limiting Output Data Size
■
Generating Measurement Output Files
■
Advanced Analog Demonstration Input Files
■
Calculation of the transfer function from an arbitrary source and harmonic in
the circuit to a designated output with the .HBXF command.
■ .OPTION SIM_ACCURACY provides simplified accuracy control for all
simulations while .OPTION SIM_ORDER and SIM_TRAP improve transient
analysis simulation controls.
■
DSPF Flow for fast analysis by using parasitic data from layout.
■
Shooting Newton steady-state time domain analysis; the Shooting Newton
algorithm provides functionality to support the following commands: .SN,
.SNAC .SNFT, .SNNOISE, .SNOSC, and .SNXF.
■
Periodic Time-Dependent Noise Analysis (.PTDNOISE) calculates the
noise spectrum and the total noise at a point in time. This analysis
determines jitter in a digital threshold circuit from the total noise and the
digital signal slew rate.
■
HSPICE advanced analog analyses supports the ISUB syntax with the
exception of wildcard support with the “?” sign. For example, HSPICE
advanced analog analyses does not support isub(x1.a?).
■
HSPICE advanced analog analyses supports case sensitivity.
HSPICE advanced analog analyses also includes the following measurement
capabilities:
■
1dB compression point.
■
Intercept points (for example, IP2, IP3).
■
Mixer conversion gain and noise figure.
■
VCO output spectrum.
■
Oscillator phase noise.
■
Options simplify specifying levels of accuracy. As a result, HSPICE provides
effective simulation solutions for advanced analog, high-speed, and PCB
signal integrity circuit challenges.
■
Verilog-A is supported for all advanced analog analyses.
Standard restrictions for Verilog-A in periodic steady-state analysis are the
same as other advanced analog simulators that use Verilog-A. For example:
• Verilog-A modules that are time-dependent are illegal for HB or SN
unless the time dependence is periodic with a period that matches the
HB or SN setup.
Mixers - Yes
5. To create a new chart, use the File > New menu. Select either XY Graph,
Smith Chart, or Polar Chart. You can also use the first three icons in the
tool bar to create new chart windows.
6. Use the Custom WaveView tool bar to change how signals look, to delete
signals, and to group or ungroup signals.
7. Right-click on a frequency-domain signal name and use the To Time
Domain command to convert the histogram waveform (for example, from
a .hb0 file) to a time domain waveform.
8. Configure the axis scale and grid by right-clicking a horizontal or vertical axis
and selecting the desired scale or grid from the context-sensitive menu.
9. Zoom in and out, using the zoom icons on the tool bar, or use the mouse
cursor to select an area directly on the waveform.
10. You can use dynamic meters to see the precise value of the signal at
different points. From the menu, select Tools > Dynamic Meter or use the
Dynamic Meter icon in the tool bar. Select and configure the desired
dynamic meter. You can then move the meter to the desired location on the
selected signal.
11. To use the measurement tools, choose Tools > Measurement. You can use
the following advanced analog options available under the All tab of the
Measurement Tool window:
• 1db compression point (P1dB).
• 2nd order intercept point (IP2).
• 3rd order intercept point and spurious free dynamic range (IP3/SFDR).
hier_delimiter Changes the delimiter for subcircuit hierarchies from “.” to hier_delimiter /
the specified symbol.
integer_node Removes leading zeros from node names. For example, integer_node
HSPICE considers 0002 and 2 to be the same node.
negative_td Allows negative time delay input in pwl (piecewise linear If you do not set
with repeat), pl (piecewise linear), exp (exponential, rising negative_td, the
time delay only), sin (damped sinusoidal), pulse negative time delay defaults
(trapezoidal pulse), and am (amplitude modulation) to zero.
formats.
port_element_ Allows the alternate Port element definition. A Port element port_element_
voltage_ matchload consists of a voltage source in series with a resistor. voltage_
For the explanation that follows, let the user-specified DC, matchload
AC, or transient value of the Port element be V, and let the
voltage across the overall port element be Vp.
By default, HSPICE advanced analog analyses set the
internal voltage source value to V. The value of Vp is lower
than V, depending on the internal impedance and the
network's input impedance.
With the alternate definition, the internal voltage source
value is adjusts to 2*V, so that Vp=V when the Port
element's impedance matches the network input
impedance. The actual value of Vp still depends on the port
and network impedances.
rcxt_divider Defines the hierarchy delimiter in the active nodes file in rcxt_divider /
RCXT format.
Using Wildcards
You can use wildcards to match node names. HSPICE advanced analog uses
wildcards somewhat differently than standard HSPICE.
Before you use wildcards, you must define the wildcard configuration in
a .hspicerf file. For example, you can define the following wildcards in
the .hspicerf file:
file .hspicerf
wildcard_match_one ?
wildcard_match_all *
wildcard_left_range [
wildcard_right_range ]
.OPTION SIM_POSTTOP Use this option to limit the data written to your waveform file to data from
only the top n level nodes. This option outputs instances up to n levels
deep.
Note: To enable the waveform display interface, you also need the
POST option.
.OPTION SIM_POSTSKIP Use this option to have the SIM_POSTTOP option skip any instances
and their children that the subckt_definition defines.
.OPTION SIM_POSTAT Use this option to limit the waveform output to only the nodes in the
specified subcircuit instance.
This option can operate in conjunction with the SIM_POSTTOP option
and when present, has precedence over the SIM_POSTSKIP option.
.OPTION SIM_POSTDOWN Use this option to include an instance and all children of that instance
in the output.
This option can operate in conjunction with the SIM_POSTTOP option
and when present, has precedence over the SIM_POSTSKIP option.
.OPTION SIM_POSTSCOPE Use this option to specify the signal types to probe from within a scope.
■
.mpn# for measurements from PHASENOISE analysis when using HB to
obtain the steady state solution
■ .msnpn# for measurements from PHASENOISE analysis when using SN to
obtain the steady state solution
■
.msnptn# for measurements in PTDNOISE analysis
For more information about .MEASURE statements, see HSPICE Netlist
Commands in the HSPICE Reference Manual: Commands and Control
Options.
.end
For a single-tone analysis with base frequency 950 MHz and 10 harmonics.
■
The HB source in Vrf1:
HB ‘Vin/2’ 0.0 1 1.
This produces two output files named pa.tr0 and pa.hb0, containing the
transient and HB output, respectively. To view and compare the output:
1. Type wv at the prompt to invoke Custom WaveView.
2. Use File > Import Waveform File and select the pa.tr0 and pa.hb0 files
from the Open: Waveform Files dialog box.
3. Select the v(out) signal from pa.hb0 in the signal browser. Double-click on
the signal name, or drag and drop the signal in the waveform. The histogram
shows lines at 950MHz, and multiples thereof, up to 9.5GHz.
4. In the waveform, right click in the name area of the panel containing the
signal v(out), left-click on the waveform label for v(out) from the pa.hb0 file.
From the Panel menu, choose Signal 'v(out)' > To Time-Domain.
5. In the Convert to Time Domain window, change the X-End (sec) value to
10n.
6. Click OK to accept the settings.
7. The new waveform shows a new time domain waveform named IFT.0|v(out).
8. Select the v(out) signal from pa.tr0 in the signal browser. Drag and drop
the signal in the waveform containing IFT.0|v(out). This should overlay the
IFT.0|v(out) and v(out) signals on the same waveform. Zoom into the
transitions to see the slight differences between the waveforms.
Second, the .HB command designates the frequencies of the two tones and
establishes the power sweep. The intmodmax parameter has been set to 7 to
include intermodulation harmonic content up to 7th order effects.
.HB tones=900MEG,910MEG nharms=11 intmodmax=7
+ SWEEP Pin dec 10 1e-8 1e-3
2. The following reference selectively dumps the power in resistor Rload at the
first harmonic of the 1st tone.
.PRINT HB P(Rload)[1,0]
3. The following reference selectively dumps the power in resistor Rload at the
3rd intermodulation product frequency (890 MHz).
.PRINT HB P(Rload)[2,-1]
satisfies KCL and KVL (Kirchoff's current and voltage laws) with the circuit
solution.
Typical applications include performing intermodulation analysis, oscillator
analysis, and gain compression analysis, on amplifiers and mixers. HB analysis
also serves as a starting point for periodic AC and noise analyses.
For more information on control options, see .HB command in the HSPICE
Reference Manual: Commands and Control Options.
The following sections discuss these topics:
■
Features Supported
■
Harmonic Balance Equations
■
Steady-State HB Sources
■
Harmonic Balance Output Measurements
■
HB .PRINT and .PROBE Output Syntax
■
HB Output Data Files and Examples
■
HB Error and Warning Messages
■
Calculating Power Measurements After HB Analyses
■
Calculations for Time-Domain Output
■
Using .MEASURE with .HB Analyses
Features Supported
HB supports the following features:
■
All existing HSPICE advanced analog analyses models.
■
An unlimited number of independent input tones.
■
Sources with multiple HB specifications.
■
SIN, PULSE, VMRF, and PWL sources with TRANFORHB=1.
Prerequisites and Limitations
The following prerequisites and limitations apply to HB:
■
Requires one .HB statement.
■
Treats sources without a DC, HB, or TRANFORHB description as a
zero-value for HB, unless the sources have a transient description, in which
case, the time=0 value becomes a DC value.
Equation 1
t
f v t = i v t + d q v t + y t – v d + is t = 0
dt
–
■
i(v(t)) represents the resistive currents from nonlinear devices
■
q represents the charges from nonlinear devices
■
y represents the admittance of the linear devices in the circuit
■
is represents the vector of independent current sources
■
v is a variable that represents the circuit unknowns, both node voltages and
branch currents, and f(v,t) is an error term that goes to zero to satisfy
Kirchoff's current law.
Transforming this equation to the frequency domain results in:
Equation 2
F V = I V + Q V + Y V + I s = 0
All terms above are vectors that represent the circuit response at each analysis
frequency.
The following equation shows the vector of (complex-valued) unknowns in the
frequency domain for a circuit with K analysis frequencies and N unknowns.
Equation 3
V = V 1 0 V 1 1 V 1 K – 1 V 2 0 V N K – 1
HSPICE advanced analog analyses finds the unknown vector (V), to satisfy the
system of nonlinear equations, in the equation above. The Newton-Raphson
technique uses either a direct solver to factor the Jacobian matrix, or an indirect
solver. The HSPICE advanced analog analyses indirect solver is in the
Steady-State HB Sources
The fundamental frequencies used with harmonic balance analysis are
specified with the .HB TONES command. These frequencies can then be
referenced by their integer indices when specifying steady-state signal sources.
For example, the .HB specification given by the following line:
.HB TONES=1900MEG,1910MEG INTMODMAX=5
This specifies two fundamental frequencies: f tone = 1 = 1.9GHz and
f tone = 2 = 1.91GHz . Their mixing product at 10 MHz can then be referenced
using indices as f 2 – f 1 , while their 3rd order intermodulation product at 1.89
GHz can be referenced as 2f 1 – f 2 .
Steady-state voltage and current sources are identified with the HB keyword
according to
[HB [mag [phase [harm [tone [mod harm [modtone]]]]]]]
The source is mathematically equivalent to a cosine signal source that follows
the equation
A cos t +
where:
A = mag
= 2 harm f tone + modharm f mo dtone
= --------- phase
180
Values for tone and modtone (an optional modulating tone) must be non-
negative integers that specify index values for the frequencies specified with
the .HB TONES command. Values for harm (harmonic) and modharm
(modulating tone harmonic) must be integers (negative values are valid) that
specify harmonic indices.
Examples
Example 3 The following example is a 1.0 Volt (peak) steady-state cosine voltage
source, which is at the fundamental HB frequency with zero phase and
with a zero volt DC value:
Vsrc in gnd DC 0 HB 1.0 0 1 1
Example 4 The following example is a steady-state cosine power source with 1.0mW
available power, which is implemented with a Norton equivalent circuit
and a 50 ohm input impedance:
Isrc in gnd HB 1.0e-3 0 1 1 power=1 z0=50
Example 5 Five series voltage sources sum to produce a stimulus of five equally
spaced frequencies at and above 2.44 GHz using modharm and
modtone parameters. These are commensurate tones (an integer
relation exists); therefore, you only need to specify two tones when
invoking the HB analysis.
.param Vin=1.0
.param f0=2440MEG
.param deltaf=312.5K
.param fcenter='f0 + 2.0*deltaf'
Vrfa in ina HB 'Vin' 0 1 1 $ 2.440625
GHz
Vrfb ina inb HB 'Vin' 0 1 1 -1 2 $
2.4403125 GHz
Vrfc inb inc HB 'Vin' 0 1 1 -2 2 $
2.440 GHz
Vrfd inc ind HB 'Vin' 0 1 1 +1 2 $
2.4409375 GHz
Vrfe ind gnd HB 'Vin' 0 1 1 +2 2 $ 2.44125
GHz
.HB tones=fcenter,deltaf intmodmax=5
Equation 4
j t + j jt
v t = A cos t + = Re Ae = Re Ae e
j
= Re Ae cos t + j sin t
= Re V R + jV I cos t + j sin t
= V R cos t – V I sin at
= A cos cos t – A sin sin t
This equation relates real/imaginary and polar formats with the standard
convention:
Equation 5
j
V R + jV I = Ae
V R = A cos
V I = A sin
2 2
A = VR + VI
VI
tan = ------
VR
The result of HB analysis is a complex voltage (current) spectrum at each
circuit node (or specified branch). Let a[i] be the real part and b[i] be the
imaginary part of the complex voltage at the ith frequency index. The Fourier
series expansion gives the conversion to a steady-state time-domain waveform
as in Equation 6:
Equation 6
v(t) = a[0] + a[1]*cos(2f[1]*t) – b[1]*sin(2f[1]*t)
+ a[2]*cos(2f[2]*t) – b[2]*sin(2f[2]*t)
+ a[3]*cos(2f[3]*t) – b[3]*sin(2f[3]*t)
+...
+ a[N]*cos(2f[N]*t) – b[N]*sin(2f[N]*t)
Where:
■
v(t) is the resulting time domain waveform.
■
N+1 is the total number of harmonics (including DC) in the frequency
domain spectrum of the *.hb0 file (the zero-th data point represents DC).
■
a[i] is the real component at the ith frequency
■
b[i] is the imaginary component at the ith frequency
■
f[i] is the ith frequency value (with i=0 representing the zero frequency
DC term). These frequencies do not need a harmonic relationship.
This frequency domain (Fourier coefficient) representation converts to a
steady-state time domain waveform when you use the .PRINT or .PROBE
HBTRAN output option or you invoke the To Time Domain function on complex
spectra within Custom WaveView.
.PROBE HB TYPE(NODES|ELEMENTS)[INDICES]
Parameter Description
INDICES Index to tones in the form [n1, n2,..., nN], where nj is the index of the HB tone and the
HB statement contains N tones. Wildcards are illegal if you use the INDICES keyword.
Use the following output syntax to transform HB data into the time domain:
.PRINT hbtran ov1 [ov2...]
.PROBE hbtran ov1 [ov2...]
Where ov1 ... are the output variables to print or probe.
Outputting Phase Noise Source as ASCII Data Files Using *.printpn0
HB phase noise and phase noise analyses can output simulation results as
ASCII data in *.printpn0 files for HBOSC and HBNOISE. Extend the E- and
■
Output from the .PROBE HB statement is written to a .hb# file. It is in the
same format as the HSPICE transient analysis .tr# file. Besides the output
waveform, it contains the information of harmonic indices and basic tone
frequencies.
■
Output from the .PRINT HBTRAN statement is written to a printer file. The
format is identical to a .print# file.
■
Output from the .PROBE HBTRAN statement is written to a .hr# file. The
format is identical to a .tr# file.
■
Reported performance log statistics are written to a .lis file.
.HB Output Example
.PRINT HB P(rload) $ RMS power (spectrum)
$ dissipated at the rload resistor
.PROBE HB V(n1,v2) $ Differential voltage (spectrum)
$ between the n1,n2 nodes
.PRINT HB VP(out)[1] $ Phase of voltage at the out
$ node, at the fundamental
$ frequency
.PROBE HB P(Pout)[2,-1] $ RMS power delivered to the Pout
$ port, at third-order intermod
.PRINT HBTRAN V(n1) $ Voltage at n1 in time domain
.PROBE HBTRAN V(n1, n2) $ Differential voltages between n1
$ and n2 node in time domain.
File Description
File Description
HB_ERR.13 Source named in the tones list does not have TRANFORHB specified.
HB_ERR.15 Source named in the tones list must be HB, SIN, PULSE, PWL, or VMRF.
HB_ERR.16 Tone specification for the source is inconsistent with its frequency.
File Description
HB_WARN.2 Tone specified for V/I source not specified in .HB command.
File Description
Equation 7
1
P rms = --- Re VI
2
In the case of a simple resistor, its current and voltage relate to each other
according to Vn=InR. Equation 8 gives the power dissipated in a resistor of
(real) value R at frequency index n :
Equation 8
2
Vn
P rms resistor n = -----------
2R
Zo In
+
+
Remainder
Port
Vn of
Vs Element
Circuit
-
Let Vn be the (peak) voltage across the terminals of the port element (at
frequency index n). Let In be the (peak) current into the (1st) terminal of the
port element (at frequency index n). Let Zo be the impedance value of the z0
port element. Then, you can compute the power wave flowing into the terminals
of the port element (at frequency index n) according to:
Equation 9
1 Vn + Zo In 2
P in n = --- ----------------------
-
2 2 Z
o
This power expression remains valid whether or not the port element includes
an internal voltage source at the same frequency. If the port element includes a
voltage source at the same frequency, you can use this power calculation to
compute the magnitude of the related large-signal scattering parameters.
If you expand the preceding formula, you can determine the power delivered to
a port element with (real) impedance Zo:
Equation 10
2 2 2
1 Vn + Zo In 1
P rms port n = --- ------------------------------------ + --- Re V n In
2 4Z o 2
This power value represents the power incident upon and delivered to the port
element's load impedance (Zo) due to other power sources in the circuit, and
due to reflections of its own generated power.
If you use the port element as a load resistor (no internal source), the
preceding equation reduces to that for the simple resistor.
If you use the port element as a power source (with non-zero available power,
that is, a non-zero Vs) and it terminates in a matched load (Zo), the port
power-measurement returns 0 W, because no power is reflected.
You can request power measurements in the form of complete spectra or in the
form of scalar quantities that represent power at a particular element. To
request a complete power spectrum, use the following syntax.
.PRINT HB P(Elem)
.PROBE HB P(Elem)
To request a power value at a particular frequency tone, use the following
syntax:
.PRINT HB P(Elem)[<n1<,n2<n3,...>>>]
.PROBE HB P(Elem)[<n1<,n2<,n3,...>>>]
The Elem is the name of either a Resistor (R) or Port (P) element, and n1, n2,
and n3 are integer indices used for selecting a particular frequency in the
Harmonic Balance output spectrum.
Examples
Example 6 Prints a table of the RMS power (spectrum) dissipated by resistor R1.
.PRINT HB P(R1)
Example 9 Outputs the RMS power dissipated by resistor R1 at the (low-side) 3rd
order intermodulation product after an HB two-tone analysis.
.PROBE HB P(R1)[2,-1]
Example 10 Prints the RMS power dissipated by resistor R1 at the (high-side) 3rd
order intermodulation product after an HB two-tone analysis.
.PRINT HB P(R1)[-1,2]
Example 11 Outputs the RMS power (spectrum) delivered to port element Pload.
.PROBE HB P(Pload)
Example 12 Prints the RMS power delivered to port element Pload at the fundamental
HB analysis frequency following a one-tone analysis.
.PRINT HB P(Pload)[1] $
Example 13 Outputs the RMS power delivered to port element Pload at the (low-side)
3rd order intermodulation product after an HB two-tone analysis.
.PROBE HB P(Pload)[2,-1]
Equation 11
The output time ranges from 0 to twice the period of the smallest frequency in
the HB spectra.
Minimizing Gibbs Phenomenon
You can use the HB_GIBBS option for HBTRAN output to minimize Gibbs’
phenomenon that may occur in transforming a square-wave signal from the
frequency domain to the time domain. The syntax is .OPTION HB_GIBBS=n
(defaults to zero, which is equivalent to not using it at all). The result is that the
N
A sin c x function filters HBTRAN waveforms before they transform to the
time domain via FFT. This option applies only to single-tone output. For
example:
.option hb_gibbs = 2
...
.print hbtran v(2)
Figure 6 Upper square-wave signal shows HB_GIBBS = 2, while the lower shows
the option = 0
Examples
Example 14 For the following .HB simulation control statement, the independent
variable is the swept tone frequency, and the .MEASURE command
values return results based on this frequency sweep:
* HARMONIC BALANCE tone-frequency sweep for amplifier
.param freq1=1.91e9 power=1e-3
.HB tones=freq1 nharms=10 sweep freq1 LIN 10 1.91e9 2.0e9
.MEASURE HB Patf0 FIND P(Rload)[1] AT=1.95e9 $ Power at
+ f0=1.95Ghz
.MEASURE HB Frq1W WHEN P(Rload)[1]=1. $ freq1 @ 1 Watt
.MEASURE HB BW1W TRIG AT=1.92e9 TARG P(Rload)[1] VAL=1.
+ CROSS=2 $ 1 Watt bandwidth
.MEASURE HB MaxPwr MAX P(Rload)[1] FROM=1.91e9 TO=2.0e9
+ $ Finds max output power
.MEASURE HB MinPwr MIN P(Rload)[1] FROM=1.91e9 TO=2.0e9
+ $ Finds min output power
Example 15 In the following example, the independent variable is the power variable,
and the .MEASURE values return results based on the power sweep.
Units are in Watts.
* HARMONIC BALANCE power sweep for amplifier
.param freq1=1.91e9 power=1e-3
.HB tones=freq1 nharms=10 sweep power DEC 10 1e-6 1e-3
.MEASURE HB Pat1uW FIND P(Rload)[1] AT=1e-6 $ Pout at 1uW
.MEASURE HB Pin1W WHEN P(Rload)[1]=1. $ Pin @ 1 Watt Pout
.MEASURE HB Prange1W TRIG AT=1.92e9 TARG P(Rload)[1] VAL=1.
+ CROSS=2 $ 1W oper. range
Example 16 In this example, the independent variable is again the power variable, and
the .MEASURE values return results based on the power sweep. This is a
two-tone sweep, where both input frequency sources are at the same
power level in Watts.
* HARMONIC BALANCE two-tone sweep for amplifier
* An IP3 calculation is made at 10uW in the sweep
.param freq1=1.91e9 freq2=1.91e9 power=1e-3
.HB tones=freq1,freq2 nharms=6,6 sweep power DEC 10 1e-6 1e-3
.MEASURE HB Pf1dBm FIND ’10.*LOG(P(Rload)[1,0]/1.e-3)’
+ AT=1e-5 $ P(f1) at 10uW input
.MEASURE HB P2f1_f2dBm FIND ’10.*LOG(P(Rload)[2,-1]/1.e-3)’
+ AT=1e-5 $ P(2f1-f2) at 10uW input
.MEASURE HB OIP3dBm PARAM = ‘0.5*(3.*Pf1dBm-P2f1_f2dBm)’
.MEASURE HB IIP3dBm PARAM = ‘OIP3dBm-Pf1dBm+20.0’
.MEASURE HB AM2PM DERIV VP(outp,outn)[1] AT=1e-5
+ $ AM to PM Conversion in Deg/Watt
Equation 12
A sin t +
while the HB sources follow:
Equation 13
A cos t +
In order for the two sources to yield identical results it is necessary to align
them by setting their phase values accordingly using:
Equation 14
A cos t + = A sin t + + 90
Equation 15
A sin t + = A cos t + – 90
Example
Example 17 To specify sources with matching phase for HB and TRAN analysis, use
a convention similar to:
** Example #1 with equivalent HB and SIN sources
** SIN source is given +90 phase shift
.param freq1=2400MEG Vin=1.0
Vsrc in gnd DC 0 HB 'Vin' 0 1 1 SIN(0 'Vin' 'freq1' 0 0 90)
.HB tones=freq1 intmodmax=7
** Example #2 with equivalent HB and SIN sources
** HB source is given -90 phase shift to align with SIN
.param freq1=2400MEG Vin=1.0
Vsrc in gnd DC 0 HB 'Vin' -90 1 1 SIN(0 'Vin' 'freq1' 0)
.HB tones=freq1 intmodmax=7
** Example #3 with equivalent .HB and .TRAN sources
** SIN source is activated for HB using "TRANFORHB"
.param freq1=2400MEG Vin=1.0
Vsrc in gnd DC 0 SIN(0 'Vin' 'freq1' 0) TRANFORHB=1
.HB tones=freq1 intmodmax=7
Optimization
To perform optimization, create an input netlist file that specifies:
■
Optimization parameters with upper and lower boundary values along with
an initial guess.
■
An HB or HBOSC optimization statement.
■
An optimization model statement.
■
Optimization measurement statements for optimization parameters.
If you provide the input netlist file, optimization specifications, limits, and initial
guess, then the optimizer reiterates the simulation until it finds an optimized
solution.
Usage Notes and Examples
■
Optimization works for HB, HBOSC, and HBAC analyses.
■
You can add the GOAL options in every meaningful .MEASURE statement,
like FIND-WHEN, FIND-AT, and so on.
■
A data sweep does not need definition in the .HB statement for HB
optimization to use the measured result from .MEASURE HBNOISE, or
PHASENOISE statements. Therefore, this type of optimization does not
support parameter sweep.
■
Optimize multiple parameters with multiple goals by selecting .MODEL OPT
LEVEL=0 (modified Lavenberg-Marquardt method).
■
Optimize single parameters in single measurement situations by selecting
.MODEL OPT LEVEL=1 (bisection method).
■ Examples
• Setting optimization parameters
.param W=opt1(231u, 100u, 800u)
.param Rs=opt1(10,8,20)
References
[1] S. Maas, Nonlinear Microwave Circuits, Chapter 3, IEEE Press, 1997.
[2] R. Gilmore and M.B. Steer, “Nonlinear Circuit Analysis Using the Method of
Harmonic Balance - A Review of the Art, Part I, Introductory Concepts.”
International Journal of Microwave and Millimeter-wave Computer-Aided
Engineering, Volume 1, No. 1, pages 22-37, 1991.
[3] R. Gilmore and M.B. Steer, “Nonlinear Circuit Analysis Using the Method of
Harmonic Balance - A Review of the Art. Part II. Advanced Concepts.”
International Journal of Microwave and Millimeter-wave Computer-Aided
Engineering, Volume 1, No. 2, pages 159-180, 1991.
[4] V. Rizzoli, F. Mastri, F. Sgallari, G. Spaletta, “Harmonic-Balance Simulation
of Strongly Nonlinear Very Large-Size Microwave Circuits by Inexact
Newton Methods,” MTT-S Digest, pages 1357-1360, 1996.
[5] S. Skaggs, Efficient Harmonic Balance Modeling of Large Microwave
Circuits, Ph.D. thesis, North Carolina State University, 1999.
[6] R.S. Carson, High-Frequency Amplifiers, 2nd Edition, John Wiley & Sons,
1982
[7] S.Y. Liao, Microwave Circuit Analysis and Amplifier Design, Prentice-Hall,
1987.
[8] J. Roychowdhury, D. Long, P. Feldmann, “Cyclostationary Noise Analysis of
Large RF Circuits with Multitone Excitations”, IEEE JSCC, volume 33,
number 3, March 1998.
[9] Y. Saad, Iterative Methods for Sparse Linear Systems, PWS Publishing
Company, 1995.
[10] J. Roychowdhury, D. Long, and P. Feldmann, “Cyclostationary Noise
Analysis of Large RF Circuits with Multitone Excitations,” IEEE Journal of
Solid-State Circuits, volume 33, pages 324–336, March 1998.
[11] K. Kurakawa, “Power waves and the Scattering Matrix,” IEEE Trans.
Microwave Theory Tech., vol. MTT-13, pp. 194-202, March 1965.
■
Mixer conversion gain
■
Phase-frequency detectors (PFDs)
■
Mixer noise figure
Functionality includes:
■
Both driven and oscillator (autonomous) analyses
■
Time domain or frequency analysis based on advanced Shooting Newton
algorithm
■
Shooting Newton with Fourier Transform (.SNFT)
■
Shooting Newton AC Analysis (.SNAC)
■
Shooting Newton Oscillator Analysis (.SNOSC)
■
Oscillator Analysis
This section covers the following topics:
■
Shooting Newton Analysis — Tutorial Example
■
SN .PRINT and .PROBE Output Syntax
*------------------------------------------------------------
* Circuit:
*
Vdd VDD 0 DC 'vdd'
Xrout VDD ref outa inverter
* Chain of 4 inverters
Xb11 VDD outa outb11 inverter
Xb12 VDD outb11 outb12 inverter
Xb13 VDD outb12 outb13 inverter
Xb14 VDD outb13 outb14 inverter
RLb1 outb14 0 100k
* Chain of 6 inverters
Xb21 VDD outa outb21 inverter
Xb22 VDD outb21 outb22 inverter
Xb23 VDD outb22 outb23 inverter
Xb24 VDD outb23 outb24 inverter
Xb25 VDD outb24 outb25 inverter
Xb26 VDD outb25 outb26 inverter
RLb2 outb26 0 100k
*------------------------------------------------------------
* SN analysis setup
*
*
* Using frequency domain syntax
.sn tone='freq' nharms=63 trinit='10*period' numperout=2
*
* Using time domain syntax
.sn tres='0.02*period' period='period' trinit='10*period'
+ numperout=2
*
.snnoise v(outb26) Vsrc dec 10 100 100meg [0,1]
*
*
.probe sn v(ref) v(outa) v(outb14) v(outb26)
.probe snfd v(ref) v(outb26)
.probe snnoise onoise
*
The .SN command can be specified using either the frequency domain syntax
that specifies the tone and number of harmonics, or the time domain syntax
that specifies the period and time resolution. In both cases, a transient
initialization time is set and the number of output periods of the signal are
specified using the NUMPEROUT keyword.
Parameter Description
INDICES Is the harmonic index of the SNFD tone. Index is limited to the single tone associated
with the SN analysis.
Output Files
The time domain data are output to printsn0 and .sn0 files. Frequency
domain data are output to .printsnf0 and .snf0 files.
Output Format
The format for time domain output is the same as standard transient analysis.
For frequency domain output, the format is similar to HB. The main difference is
that the Shooting Newton output in the frequency domain is single tone only.
SN analysis assumes that all stimuli are periodic with period T. If the circuit is
driven with more than one periodic stimulus, then the frequencies must be all
co-periodic and T must match the common period or some integer multiple of it.
The .SN analysis only supports .tran (time-domain) periodic signal sources.
(Refer to the .tran analysis for a detailed documentation on transient signal
sources).
You can use windowing functions to reduce the effects of waveform truncation
on the spectral content. You can also use the .SNFT command to specify:
■
output format
■
frequency
■
number of harmonics
■
total harmonic distortion (THD)
For more information, see the .SNFT command in the HSPICE Reference
Manual: Commands and Control Options.
This section covers the following topics:
■
Other Shooting Newton Analyses
■
SN Error and Warning Messages
Transform (.SNFT).
■
.SNAC is used to perform a linear analysis of a driven (or non-autonomous)
circuit, where the linear coefficients are modulated by a periodic,
steady-state signal. The functionality is similar to the .HBAC command. For
more information, see Shooting Newton AC Analysis (.SNAC).
■
.SNXF is used to calculate transfer functions from an arbitrary number of
small signal sources to a designated output in a circuit under periodic
steady-state conditions. For more information, see Shooting Newton
Transfer Function Analysis (.SNXF).
■
Limit the maximum time-step size used in the simulation by setting the
option DELMAX to a value equal to the waveform period divided by 100.
■ Ensure that the correct frequency is selected. In the case of a driven circuit
containing dividers, use the final divider (slowest) output frequency.
Equation 16
F V 0 = I V 0 + Q V 0 + Y 0 V + I s
HSPICE harmonic balance oscillator analysis (.HBOSC) adds the fundamental
frequency of oscillation to the list of unknown circuit quantities. To
accommodate the extra unknown, HSPICE sets the phase (or equivalently, the
imaginary part of one unknown variable — generally a node voltage) to zero.
The phases of all circuit quantities are relative to the phase at this reference
node (referred to as the “PROBENODE”).
Additionally, the HBOSC analysis tries to avoid the “degenerate solution,”
where all non-DC quantities are zero. Although this is a valid solution of the
above equation (it is the correct solution, if the circuit does not oscillate), the
HBOSC analysis might find this solution incorrectly, if the algorithm starts from
a bad initial solution.
The HBOSC analysis follows a technique similar to that described by Ngoya et
al., which uses an internally-applied voltage probe to find the oscillation voltage
and frequency. The source resistance of this probe is a short circuit at the
oscillation frequency, and an open circuit otherwise. HSPICE advanced analog
analyses use a two-tier Newton approach to find a non-zero probe voltage
which results in a zero probe current.
HB analysis of the oscillator circuit uses the DC solution as a starting point.
This analysis requires, in addition to the DC solution, initial values for both the
oscillation frequency and the probe voltage. HBOSC analysis calculates the
small-signal admittance that the voltage probe sees over a range of
frequencies, in an attempt to find potential oscillation frequencies. Oscillation is
likely to occur where the real part of the probe current is negative and the
imaginary part is zero. You can use the FSPTS parameter to specify the
frequency search. You must also supply an initial guess for the large signal
probe voltage. A value of one-half the supply voltage is often a good starting
point.
For more information on control options, see the.HBOSC command in the
HSPICE Reference Manual: Commands and Control Options.
points for phase noise analysis. The .PRINT and .PROBE commands output
the phase noise values.
The following netlist, osc.sp, simulates an oscillator and performs phase
noise analysis. This example file is available in the HSPICE distribution in the
directory $installdir/demo/hspice/rf_examples/.
Use the .HBOSC command with the PROBENODE and FSPTS parameters set.
PROBENODE=emitter,0,4.27
Identifies the emitter node as an oscillating node and provides a guess value of
4.27 volts for the oscillation amplitude at the emitter node.
FSPTS=40,9e6,1.1e7
Runs phase noise analysis at the specified offset frequencies, measured from
the oscillation carrier frequency. The frequency points specified here are on a
logarithmic scale, 10 points per decade, 10 kHz to 1 MHz.
■
.PROBE PHASENOISE PHNOISE and the similar .PRINT command
instruct HSPICE advanced analog analyses to output phase noise results to
the osc.pn0 and osc.printpn0 files.
**
** Uses emitter resistor limiting to keep output sinusoidal.
** Output can be taken at the emitter (eml node).
**
*---------------------------------------------------------
* Options for Oscillator Harmonic Balance Analysis...
*
.OPTIONS post sim_accuracy=100 hbsolver=0
*---------------------------------------------------------
* Bias NPN transistor for 5V Vce, 10mA Ic
* Emitter follower Colpitts design
Vcc collector 0 9V
Q1 collector base emitter emitter RF_WB_NPN
Re1 emitter eml 100
RLoad eml 0 300
Rb1 collector base 4300
Rb2 base 0 5600
*
*---------------------------------------------------------
* Capacitive feedback network
Ce 0 eml 100pF
Cfb base eml 100pF
Cbb base bb 470pF
Lb bb 0 6uH
*---------------------------------------------------------
* Simulation control for automated oscillator analysis
*
.HBOSC tones=1.0e7 nharms=15
+PROBENODE=emitter,0,4.27
+FSPTS=40,9.e6,1.1e7
*
.PHASENOISE V(emitter) DEC 10 10K 1MEG
+METHOD=0 CARRIERINDEX=1
*
.print hbosc vm(eml) vp(eml) vr(emitter) vi(emitter)
.print hbosc vm(emitter) vp(emitter) P(Rload)
.print phasenoise phnoise
.probe phasenoise phnoise
4. In the waveform, right-click in the name area of the panel containing the
signal v(emitter), left-click on the waveform label for v(emitter) in the
waveform. From the Panel menu, choose Signal 'v(emitter)' > To Time-
Domain.
5. To accept the defaults for range and interval, click OK in the Convert to Time
domain window.
6. In a new waveform, you should now see a time domain waveform named
IFT.0|v(emitter).
This will output a osc.hr0 file that will contain the oscillator output waveform in
the time domain.
**
** NMOS IC Quadrature VCO circuit for GPS local oscillator
**
** Twin differential negative resistance VCOs using NMOS
** transistors for varactors, coupled to produce quadrature
** resonances.
** Design based on 0.35um CMOS process.
**
** References:
** >P. Vancorenland and M.S.J. Steyaert, "A 1.57-GHz fully
** integrated very low-phase-noise quadrature VCO,"
** IEEE Trans. Solid-State Circuits, May 2002, pp.653-656.
** >J. van der Tang, P. van de Ven, D. Kasperkovitz, and A.
Roermund,
** "Analysis and design of an optimally coupled 5-GHz quadrature
** LC oscillator," IEEE Trans. Solid-State Circuits, May 2002,
** pp.657-661.
** >F. Behbahani, H. Firouzkouhi, R. Chokkalingam, S. Delshadpour,
** A. Kheirkhani, M. Nariman, M. Conta, and S. Bhatia,
** "A fully integrated low-IF CMOS GPS radio with on-chip analog
** image rejection," IEEE Trans. Solid-State Circuits, Dec. 2002,
** pp. 1721-1727.
** Setup for Harmonic Balance Analysis
** Oscillation Frequency: ~ 1575 MHz (GPS L1 frequency)
** Amplitude: ~5 Volts peak-to-peak (zero to 5V)
** Vdd: 2.5 V
**
** HSPICE Simulation Options:
*.option delmax=1n ACCURATE LIST NODE
**
** HSPICE advanced analog simulation options :
.option sim_accuracy=10
**
*.option savehb=’a.hbs’ loadhb=’a.hbs’
.option POST
.param Vtune=2.0 $ Failures: vtune=1
.param Cval=0.2p
*---------------------------------
Vtune vc gnd DC Vtune
Vdd vdd gnd 2.5
*---------------------------------
* First oscillator section
** Low-Q resonator with Vdd at center tap of inductors
R1a IP ri 100k $ These R’s set the Q
R1b ri IN 100k
L1 IP vdd 16.5nH
L2 vdd IN 16.5nH
Cc1 IP gnd Cval $ I to Q
See also Outputting Phase Noise Source as ASCII Data Files Using *.printpn0.
The simulation lists the probe voltage and probe frequency for each outer loop
iteration. If an outer loop convergence problem occurs, you may see the
following:
■
Decreasing probe voltage values.
■
Wildly fluctuating values of probe frequency.
Osc probe : voltage = 0.218234 frequency =
6.240794122744832e+09
■
A warning message which indicates that the oscillator simulation has
reached a non-oscillating DC solution.
Warning: HB_ERR.18: HB oscillator analysis has reached the
NULL solution.
GMRES Convergence
HSPICE advanced analog analyses use a GMRES iterative solver to solve the
linear systems that arise on each inner loop Newton-Raphson step. If GMRES
does not solve the linear systems accurately enough, then the inner loop may
not converge.
The GMRES solver is controlled by two options:
■ HBKRYLOVTOL: relative tolerance for GMRES solver. Default is 0.01, or 1%.
For some circuits, setting this option helps inner loop convergence:
.option HBKRYLOVTOL=1e-3
■
HBKRYLOVDIM: dimension of Krylov subspace to use in GMRES iteration.
Also controls maximum number of GMRES iterations. The HSPICE
advanced analog analyses .lis file lists the number of GMRES iterations
taken for each Newton-Raphson step. If that number is equal to
HBKRYLOVDIM, you may improve convergence by increasing
HBKRYLOVDIM. For example:
.option HBKRYLOVDIM=80
If you are using FSPTS, you can increase the number of points. Sometimes, it
is best to supply a guess manually by removing FSPTS and adjusting the
TONES value.
If you do not use HBTRANINIT, you may be able to improve convergence by
manually adjusting the PROBENODE amplitude guess.
To evaluate the effectiveness of your option settings, look at the “probe error”
reported after the first outer loop iteration:
Iteration 1
Osc probe : voltage = 0.2 frequency = 5.980000000000000e+09
hb residual = 7.628260e-10
Rank of HB Jacobian = 9102
Probe error = 0.000154462
dv = -0.0411324 df =-2.30464430e+08
oscillation, use the HERTZ keyword. For example, HERTZ[1] identifies the
fundamental frequency of oscillation.
See also Using Noise Analysis Results as Input Noise Sources.
.title ringosc
vdd vdd 0 3
x1 1 2 vdd inv
x2 2 3 vdd inv
x3 3 4 vdd inv
x4 4 5 vdd inv
x5 5 6 vdd inv
x6 6 7 vdd inv
x7 7 1 vdd inv
c1 1 0 0.022p
.ic v(1)=3
.options post
.options snaccuracy=50
.probe sn v(7)
.probe snfd v(7)
.print phasenoise phnoise v(7)
.probe phasenoise phnoise v(7)
.end
This analysis finds the oscillation frequency of the ring oscillator. Since the
circuit is an oscillator, no input source is required. The oscillator is started by
setting an initial condition at the input of the ring (node 1). In the .SNOSC
command, the node that the analysis will probe for oscillation conditions is
specified, as well as the approximate frequency of oscillation. The number of
harmonics to include in the analysis is specified as well.
The phase noise characteristics of the oscillator are analyzed by using the
.PHASENOISE command. The .PHASENOISE command requires that an
output node, a pair of nodes, or a two-port element and a frequency sweep be
specified. The frequency sweep is used to calculate the phase noise analysis at
the specified offset frequencies, measured from the oscillation carrier
frequency. For this example of phase noise analysis, the default Nonlinear
Perturbation (NLP) method is used.
The signal v(7) will be probed in both the frequency and time domain. The
measure statement is used to measure the fundamental frequency of the
oscillator.
Simulation Status Output
During the simulation, the simulation status is displayed on the screen. In
addition to the screen display, a more detailed status, CPU time, and memory
usage information are also written to the ringoscSN.lis file.
Viewing Results in Custom WaveView
You can view the time-domain ringoscSN.sn0 file, the frequency domain
ringoscSN.snf0 file, and the phase noise ringoscSN.snpn0 file in
Custom WaveView.
1. Enter wv at the prompt to start Custom WaveView.
2. Use File > Import Waveform File to open the ringoscSN.sn0 file.
3. Select the signal v(7) from the signal browser. Drag and drop the signal v(7)
to the right side of the waveform so that panels are opened in row / column
format. The time domain trace shown at the right side of Figure 16 on
page 93.
4. Use File > Import Waveform File to open the ringoscSN.snf0 file.
5. Select the signal v(7) from the signal browser. Drag and drop the signal v(7)
to the right side of the waveform so that panels are opened in row / column
format. The frequency domain spectrum is shown at the left side of
Figure 16 on page 93.
6. Use File > Import Waveform File to open the ringoscSN.snpn0 file.
7. Use Waveview > New to open a new waveform.
8. Select the signal nlp_l(f) from the signal browser. Drag and drop the signal
nlp_l(f) signal in the waveform. Figure 17 on page 94 shows the resulting
phase noise results for the oscillator.
References
[1] E. Ngoya, A. Suarez, R. Sommet, R. Quere, “Steady State Analysis of Free
or Forced Oscillators by Harmonic Balance and Stability Investigation of
Periodic and Quasi-Periodic Regimes,” International Journal of Microwave
and Millimeter-Wave Computer-Aided Engineering, Volume 5, Number 3,
pages 210-223 (1995)
[2] C.R. Chang, M.B. Steer, S. Martin, E. Reese, “Computer-Aided Analysis of
Free-Running Microwave Oscillators,” IEEE Trans. on Microwave Theory
and Techniques, Volume 39, No. 10, pages 1735-1745, October 1991.
[3] G.D. Vendelin, Design of Amplifiers and Oscillators by the S-Parameter
Method, John Wiley & Sons, 1982
[4] A. Demir, A. Mehrotra, J. Roychowdhury, “Phase Noise in Oscillators: A
Unifying Theory and Numerical Methods for Characterization” in Proc. IEEE
DAC, pages 26-31, June 1998.
[5] A. Demir, A. Mehrotra, and J. Roychowdhury, “Phase Noise in Oscillators: A
Unifying Theory and Numerical Methods for Characterization,” IEEE Trans.
Circuits System I, Volume 47, pages 655–674, May 2000.
[6] A. van der Ziel, Noise in Solid State Devices and Circuits, John Wiley &
Sons, 1986.
[7] A. Hajimiri, S. Limotyrakis, and T.H. Lee, “Jitter and phase noise in ring
oscillators,” IEEE J. Solid-State Circuits, vol. 34, no. 6, pp. 790-804, June
1999.
[8] Jitter Analysis Techniques for High Data Rates, Application Note 1432,
Agilent Technologies, Feb. 2003.
[9] Characterization of Clocks and Oscillators, NIST Technical Note 1337,
National Institute of Standards and Technology.
[10] G.V. Klimovitch, “Near-carrier oscillator spectrum due to flicker and white
noise,” Proc. ISCAS 2000 (Geneva), May 2000.
Phase Noise analysis requires first running either the harmonic balance
(HBOSC) or Shooting Newton (SNOSC) analysis, and then PHASENOISE
analysis. The PHASENOISE analysis itself is identical whether you run
SNOSC or HBOSC.
For more information on control options, see the .PHASENOISE command in
the HSPICE Reference Manual: Commands and Control Options.
This chapter discusses the following topics:
■
Introduction to Phase Noise Analysis (.PHASENOISE)
■
Accumulated Jitter Measurement for Closed Loop PLL Analysis
■ Clock Source with Random Jitter
in
v(t)
Equation 17
v t = A cos 0 t + 0
A noisy oscillator has amplitude and phase fluctuations we can write as:
Equation 18
v t = A t cos 0 t + t
In the preceding equation:
■
A(t) is the time varying amplitude for the noisy oscillator.
■
t is the time varying phase for the noisy oscillator.
■
0 is the frequency of oscillation.
In most applications, the phase noise is of particular interest, because it
represents frequency fluctuations about the fundamental, which you cannot
remove. These fluctuations are random processes. Typical expressions are in
terms of their power spectral density. For most oscillators, the phase noise is a
low-frequency modulation that creates sidebands in the oscillator’s spectrum,
about 0 .
For example, the following equation represents a simple sinusoidal variation in
the phase:
Equation 19
v t = A cos 0 t + p sin m t
■
p is the peak phase deviation, specified as p = m .
■
is the peak angular frequency deviation.
For p « 1 , the following equation approximates the output:
Equation 20
p
v t = A cos 0 t – ----- cos 0 + p t – cos 0 + m t
2
That is, when the peak phase deviation is small, the result is frequency
components on each side of the fundamental with amplitude p 2 .
Equation 21
2 2
V sb 2 p rms
L f m = -------- = ----------- = ----------------
A 4 2
This model for oscillator noise shows that sidebands about the fundamental,
due to noise, directly relate to the spectrum of the phase fluctuations t . The
more general definition of phase noise relates it to the spectral density of phase
fluctuations, that is:
Equation 22
p2
S m = ----- = 2L f
2 m
HSPICE advanced analog analyses use several sophisticated analysis
techniques for computing the power spectrum of the phase variations to yield
the phase noise response. This information describes the spectrum of the
oscillator about the fundamental frequency, and its random jitter characteristics.
Any .PHASENOISE analysis results in the calculation of a curve fit for a
power-law model according to:
Equation 23
a3 a2 a1
L f = 10 log -----3- + -----2- + ------ + a0
f f f
To activate the new phase noise spur analysis, use the SPURIOUS keyword in
the .PHASENOISE command. An additional .HBAC analysis predicts the
spurious contributions to the phase noise.
The use of a voltage or current source can to add spurious signals to an
oscillator circuit. The keyword SPUR identifies the spurious signal.
Syntax
Exxxx n1 n2 … [SPUR mag phase freq] … $ voltage spur
Gxxxx n1 n2 … [SPUR mag phase freq] … $ current spur
where:
■
mag is the amplitude in volts or amps
■
phase is the phase in degrees
■
freq is the frequency in Hz
The source is equivalent to a steady-state sinusoidal source at the specified
amplitude, phase, and frequency values and only the spurious analysis uses it.
All other analyses ignore it. The SPUR keyword is combinable into a source
that other analyses use.
Recommendation: Add SPUR sources as separate sources.
phnoise_stationary No No
phnoise_cyclostationary or No Yes
phnoise_cyclo
phnoise_flicker Yes No
Examples
Example 1
This example performs an oscillator analysis by searching for frequencies in
the vicinity of 900 MHz, followed by a phase noise analysis at frequency offsets
from 100 Hz to 10 MHz.
.HBOSC TONE=900MEG NHARMS=9
+ PROBENODE=gate,gnd,0.65
Example 2
This example performs a VCO analysis by searching for frequencies in the
vicinity of 2.4 GHz. This example uses eleven harmonics and sweeps the VCO
tuning voltage from 0 to 5 V. HSPICE advanced analog analyses use the
nonlinear perturbation (NLP) algorithm to perform a phase noise analysis
based on the fundamental frequency for each tuning voltage value.
.HBOSC TONE=2400MEG NHARMS=11
+ PROBENODE=drainP,drainN,1.0
+ FSPTS=20,2100MEG,2700MEG
+ SWEEP Vtune 0.0 5.0 0.2
.PHASENOISE V(drainP,drainN) DEC 10 100 1.0e7
+ METHOD=0 CARRIERINDEX=1 $use NLP algorithm
+ listsouces=on
.PROBE PHASENOISE phnoise
.PRINT PHASENOISE phnoise(X2)
See Also
■
Using Noise Analysis Results as Input Noise Sources
For example:
.HBOSC tone=1g nharms=5 PROBENODE=out,gnd,0.8
+ SWEEP OPTIMIZE=opt1 RESULT=y1,y2 MODEL=m1
.MODEL m1 OPT level=0
.PHASENOISE v(out) DEC 1 1k 1G
.MEAS PHASENOISE y1 FIND PHNOISE at 10k goal=-150dBc
.MEAS PHASENOISE y2 RMSJITTER PHNOISE units=sec goal=1p
■
Measure statement
.MEASURE PHASENOISE measname FIND out_var1 AT=val
+ GOAL=val
■
Output Files
■
Important Note for AM/PM Users
Add a Noise type suffix to each of these noise terms, phnoise, la, ltotal,
onoise, to select specific noise-type components:
Noise_term_phnoise_stationary No No
Noise_term_phnoise_cyclostationary No Yes
Noise_term_phnoise_flicker Yes No
Examples
Example 1
.PROBE PHASENOISE la_phnoise_cyclostationary
You can also show the AM/PM separation for individual noise elements. (To
enable this capability, the listsources option of .PHASENOISE must = on.)
This example outputs the phase modulation noise associated only with cyclo-
stationary sources (that is, sources that are bias dependent, but not frequency
dependent).
Noise Element output is of the form Noise_term(element_name), where
Noise_term can be phnoise, la, ltotal, or onoise, and element_name is
a valid netlist element name.
Example 2
.PROBE PHASENOISE la(x1)
Output Files
■
File *.printpn#: Writes output from the .PRINT statement when using
HB to obtain the steady state solution.
■
File *.pn#: Writes output from the .PROBE statement when using HB to
obtain the steady state solution.
■
File *.printsnpn#: Writes output from the .PRINT statement when using
SN to obtain the steady state solution.
■
File *.snpn#: Writes output from the .PROBE statement when using SN to
obtain the steady state solution.
The .PHASENOISE command line parameters Listfreq, ListCount,
Listfloor, and Listsources control and list noise source contributions
sequentially.The listsources argument must be =on to generate a noise list
block for each output parameter specified in the .PRINT/.PROBE statement
such as phnoise, la, ltotal, and onoise.
.MEASURE Syntax and Outputs
.MEASURE PHASENOISE extends output variables to the set: am[noise]
pm[noise]
.MEASURE output files include:
■
File *.mpn#: Writes output from the .MEASURE statement when using HB
to obtain the steady state solution.
■
File *.msnpn#: Writes output from the .MEASURE statement when using
SN to obtain the steady state solution.
Numerical methods for phase noise analysis have limitations. The main
limitation in the PAC phase noise algorithm is that it rolls off too quickly at low
offset frequencies. In the low frequency region, you can trust NLP. The main
limitation of the NLP algorithm is that it does not cover all high frequency
effects, so you can trust PAC in the high frequency region.
The BPN algorithm attempts to combine the NLP and PAC results to generate a
single result that is valid for all offset frequencies. It may fail if it cannot identify
an overlap region where NLP and PAC results match. If the tool cannot find an
overlap region, you should attempt to increase nharms in the .HBOSC
command, as this increases the accuracy of both algorithms, especially PAC.
PAC accuracy is more sensitive to nharms than NLP.
If you suspect the phase noise results to be inaccurate, check the following:
1. Is the .HBOSC steady state solution fully converged?
Explanation: The NLP or PAC small-signal noise analysis requires a highly
accurate steady state solution.
2. Did the phase noise analysis fully converge?
Explanation: Phase noise analysis uses a GMRES iterative linear solver.
If this iterative solver reaches its iteration limit before full convergence, the
results are not reliable. Check the number of Krylov iterations that the phase
noise analysis required. If it took the maximum number of iterations (as set
by PHASENOISE_KRYLOV_ITR, default=1000), then the results did not fully
converge and you should not trust them.
You can use the options PHASENOISE_KRYLOV_DIM and
PHASENOISE_KRYLOV_ITR to control the GMRES solver. You can
increase PHASENOISE_KRYLOV_DIM to improve the convergence rate at
the expense of memory, or increase PHASENOISE_KRYLOV_ITR to allow
more iterations.
3. Is the phase noise analysis accurate?
Explanation: In rare circumstances, the linear solver accuracy needs to be
improved. The linear solver accuracy is controlled by the PHASENOISETOL
option. The default value of the option is 1e-9. The suggested setting for
PHASENOISETOL is 1e-10, if the accuracy needs to be improved.
Jitter Definitions
HSPICE advanced analog analyses provide several random jitter (RJ)
measurements. This section defines, describes, and compares the various jitter
measurements provided. You derive random jitter measurements from the
results of an HSPICE advanced analog phase noise analysis. The following
presents the relationships between phase noise and the random jitter
measurements, and their means for calculation. The types of random jitter
measurements include: Timing, Phase, Period, Tracking, Long-Term, and
Cycle-to-Cycle Jitter.
Timing Jitter is a measurement of the oscillator uncertainty in the time domain.
For clock applications, time domain measurements are preferable, since most
specifications of concern involve time domain values.
Timing Jitter is the standard deviation of the timing uncertainty, which is a
function of the auto-correlation function in the power spectrum of the phase
variations. Timing jitter is the square root of the variance (standard deviation
squared) of the timing uncertainty between two clock edges separated by an
interval given by = N T o , where T o is the ideal clock period. You can write it
as a function of the auto-correlation function of the power spectrum of phase
variations as:
Equation 24
2 2-
TIE = --------
2
R 0 – R
o
where TIE refers to the Time Interval Error. Call this measurement Timing
Jitter, Accumulated Jitter, or N-Cycle Jitter, since it represents the jitter that
may accumulate over an interval of many periods.
The Weiner-Khintchine Theorem [1] relates the auto correlation function to the
power spectrum of phase variations as in the following equation:
Equation 25
1
S e d = 2 L f cos 2f df
j
R = ------
2
– 0
Equation 26
= 2 L f df
2
R 0 rms
0
Equation 27
8
2
2 2
TIE = --------
- L f sin f df
o
0
to enable currently supported HSPICE advanced analog analyses jitter
measurements to be written as:
Equation 28
From these definitions, several other key jitter measurements can be derived,
including Period Jitter, Tracking Jitter, Long-Term Jitter, and Cycle-to-Cycle
Jitter.
Period Jitter is equivalent to the value for Timing Jitter for a one period interval.
We therefore have:
Equation 29
2
= TIE T 0 = ------ 2 L f sin fT 0 df
2
PER "Period Jitter"
0
0
Tracking Jitter is equivalent to the value (in units of seconds) for RMS Phase
Jitter, or:
Equation 30
rms 1
tr = ph = ---------- = ------ 2 L f df “Tracking Jitter”
0 0
0
Equation 31
rms 2
T = TIE = 2 ---------- = ------
0 0 L f df “Long-Term Jitter”
0
Cycle-to-Cycle Jitter is based on the difference between adjacent Period Jitter
measurements. It is given by:
Equation 32
2 2
CTC = 4PER – TIE 2T 0 “Cycle-to-Cycle Jitter”
In general, each of the above calculations must be performed carefully over
limits of integration to accurately calculate jitter expressions based on the finite
frequency limits provided for the phase noise analysis. Linear interpolation is
used, but the phase noise generally follows more of a power law expansion.
The time samples for the timing jitter output make use of the same number of
points as the phase noise frequency sweep specification.
The output of the timing jitter information uses a corresponding time sampling
derived via:
Equation 33
1 2 N
1 = ------ 2 = ------ ..., N = ------
T0 T0 T0
table specifies the calculation used for units=seconds for each jitter
measurement.
RMSJITTER ph = rms 0
PHJITTER ph = rms 0
TRJITTER ph = rms 0
PERJITTER PER
LTJITTER
T = 2 rms o
CTCJITTER CTC
Example:
.meas phasenoise rj RMSJITTER phnoise from 1K to 100K
+ units = rad
Peak-to-Peak Jitter
As noted in .MEASURE Statements for Jitter, an additional Bit Error Rate (BER)
parameter is supported. This parameter allows you to convert any jitter value
from an RMS value into a Peak-to-Peak value. The RMS jitter values
correspond to an 1-sigma standard deviation value for the Gaussian distribution
of the jitter. Peak-to-peak values represent the full span of the Gaussian
distribution. Since this span is theoretically unbounded for truly random
distributions, the conversion to peak-to-peak values has to be interpreted as
spanning some number of sigma values. You can arrive at this number (in other
words, “sigma multiplier”) by specifying a corresponding BER.
The term “BER” corresponds to the unitless Bit Error Rate that allows for this
conversion. The following table shows some sample conversions from various
BER values into a “sigma multiplier” value, which corresponds to the number of
sigma standard deviations in converting from RMS to peak-to-peak values:
10-3 6.180
10-4 7.438
10-5 8.530
10-6 9.507
10-7 10.399
10-8 11.224
10-9 11.996
10-10 12.723
10-11 13.412
10-12 14.069
10-13 14.698
10-14 15.301
10-15 15.883
10-16 16.444
Equation 34
1---
erfc -------------- = BER
2 2 2
where, erfc is the complementary error function and is the Sigma Multiplier.
Support for peak-to-peak conversions is included for a continuous range of
– 16 –3
BER values from 10 10 (and some values extrapolated outside
this range).
Errors/Warnings
Error handling and recovery is exercised to capture obvious errors in input
specifications. The following error checks are performed:
■
Calculations to be performed if oscillator or phase noise analysis fails.
■
ERROR if L(f) > 1 over any part of the frequency sweep (non-dB form).
■
ERROR if L(f) < 0 over any part of the frequency sweep (non-dB form).
■
Error if any time or frequency samples are negative values.
■
ERROR if BER < 0 for any Jitter measurement.
■
WARNING if BER > 1 for any Jitter measurement.
■
WARNING if f0 < 10 Hz. Message: “Jitter calculations may be
ineffective for offset frequencies under 10 Hz.”
To see the influence that oscillator or VCO phase noise can have on a system
where it is present, it is necessary to perform a phase-domain analysis where
the circuit variables are phase and the input noise stimuli are phase noise. This
is the purpose of the .ACPHASENOISE analysis in HSPICE advanced analog
analyses.
This type of analysis is critical, for example, in analyzing the effects of noise in
a phase-locked loop (PLL). In a PLL design flow, the HBOSC or SNOSC
analyses are used to compute a phase noise response for an oscillator or VCO.
HSPICE advanced analog analyses can be used to compute phase noise
contributions from the other PLL building blocks. A closed loop PLL analysis
can then be performed by using phase-domain models for both signal and
noise responses, where the noise contributions from all blocks are input as
phase noise stimuli. Such an analysis can be performed to determine the PLL
closed-loop phase noise, based on the contributions of each block, determined
by an open loop analysis.
For more information on control options, see the .ACPHASENOISE command
in the HSPICE Reference Manual: Commands and Control Options.
This chapter discusses the following topics:
■
ACPHASENOISE Analysis .PRINT and .PROBE Syntax
■ Behavioral Noise Sources
The first line creates a simple two-terminal current noise source, whose value
is described in A2/(Hz). The output noise generated from this noise source is:
noise_equation*H
Where H is the transfer function from the terminal pair (node1,node2) to the
circuit output, where HSPICE advanced analog analyses measures the output
noise.
The second line produces a noise source correlation between the
(node1,node2) and (node3,node4) terminal pairs. The resulting output noise
is calculated as noise_equation*sqrt(H1*H2*); where:
■
H1 is the transfer function from (node1,node2) to the output.
■ H2 is the transfer function from (node3,node4) to the output.
■
The * on H1*H2* represents the complex conjugate of H1 and H2.
The noise_equation expression can involve node voltages and currents
through voltage sources.
For the PAC phase noise simulation to evaluate the frequency-dependent
noise, the frequency-dependent noise factor in the phase noise must be
expressed between parentheses. For example:
gname node1 node2 noise = '(frequency_dependent_noise)*
bias_dependent_noise'
This is only true when the total noise can be expressed in this form and when
the frequency-dependent noise can be evaluated in the PAC phase noise
simulation. You can also input the behavioral noise source as a noise table with
the help of the predefined Table() function. The Table() function takes two
formats:
■
Noise table can be input directly through the Table() function. For
example:
gname node1 node2 noise = 'Table(arg1,f1,v1,f2,v2,......)'
■
The f1,v1,f2,v2,..... parameters describe the noise table. When arg1 ==
f1, the function returns v1. The arg1 can be an expression of either
HERTZ, bias, or both. For example, arg1 = 'HERTZ * 1.0E+3'.
■
The noise table can be input through a .DATA structure:
.DATA d1
+ x y
+ f1 v1
+ f2 v2
.ENDDATA
The x, y parameters in the DATA structure are two placeholder strings that can
be set to whatever you prefer even if they are in conflict with other parameters
in the netlist. The arg1 parameter can be an expression of HERTZ and bias.
When arg1 == f2, the function returns v2.
This section covers the following topics:
■
Using Noise Analysis Results as Input Noise Sources
■
Syntax Rules for Behavioral Noise Source Files
■
Power Supply Current and Voltage Noise Sources
where:
noisefile='filename' is the name of the ASCII noise data file. Phase
noise analysis and noise analyses can output simulation results as ASCII data
using .PRINT statements. The file name is designated as
'design.printsnpn0' for .SNOSC phase noise and .SNNOISE analyses.
For .PHASENOISE, .HBNOISE and .ACPHASENOISE analyses, the file name
is designated as 'design.printpn0'. For .NOISE analyses, the file name
is designated as 'design.printac0'.
mname='measname' is used to select the appropriate noise measurement
name to be taken from the *.printpn0, *.printsnpn0, or *.printac0
file.
measname can be one of the following:
■
NLP_L(f) – selects the nlp_L(f) phase noise data in units of dBc/Hz.
■
PAC_L(f) – selects the pac_l(f) phase noise data in units of dBc/Hz.
■
BPN_L(f) – selects the bpn_l(f) phase noise data in units of dBc/Hz.
■
ONOISE – selects the onoise data based on .SNNOISE or .NOISE analysis.
The following syntaxes are supported in both HSPICE advanced analog
analyses and HSPICE:
■
Exxx n1 n2 noise data=dataname
■
Exxx n1 n2 noise data=datablock
■
Exxx n1 n2 noisefile='filename'
■
Exxx n1 n2 noise='expression'
■
Exxx n1 n2 noise='Table(arg1,f1,v1,f2,v2...)'
■ Exxx n1 n2 noise='Table(arg1,dotDataBlockName)', where
dotDataBlockName is the .data statement reference.
10.0000x 43.7067n
Syntax
Expression form:
Gxxx node1 node2 noise=‘expression’
Exxx node1 node2 noise=‘expression’
The G noise element represents a noise current source and the E noise
element represents a noise voltage source. The xxx parameter can be set with
a value up to 1024 characters. The node1 and node2 are the positive and
negative nodes that connect to the noise source. The noise expression can
contain the bias, frequency, or other parameters.
Data form:
Gxxx node1 node2 noise data=dataname
Exxx node1 node2 noise data=dataname
.data dataname
+ pname1 pname2
+ freq1 noise1
+ freq2 noise2
+ ...
.enddata
The data form defines a basic frequency-noise table. The .DATA statement
contains two parameters: frequency and noise to specify the noise value at
each frequency point. The unit for frequency is hertz, and the unit for noise is
A2/Hz (for G current noise source) or V2/Hz (for E voltage noise source).
Example
The following netlist shows a 1000 ohm resistor (g1) using a G-element. The
g1noise element, placed in parallel with the g1 resistor, delivers the thermal
noise expected from a resistor. The r1 resistor is included for comparison. The
noise due to r1 should be the same as the noise due to g1noise.
* Resistor implemented using g-element
v1 1 0 1
r1 1 2 1k
g1 1 2 cur='v(1,2)*0.001'
g1noise 1 2
+ noise='4*1.3806266e-23*(TEMPER+273.15)*0.001'
rout 2 0 1meg
.ac lin 1 100 100
.noise v(2) v1 1
.end
■
Two-tone HB Approach
■
HBAC Approach
■
Comparing Results
Two-tone HB Approach
To analyze this circuit using 2-tone HB, add:
■
HB source for LO: add HB 0.5 0 1 1 to the LO voltage source; this sets
the amplitude to 0.5, no phase shift for the first harmonic of the first tone,
which is 1 GHz.
■
HB source for RF: add HB 0.001 24 1 2 to the RF voltage source; this
sets the amplitude to 0.001, 24 degrees phase shift for the first harmonic of
the second tone (0.8 GHz).
■
An .HB command specifying both tones: .hb tones=1g 0.8g nharms=6
3; only a small number of harmonics are required to resolve the signals.
The complete mix_hb.sp netlist for 2-tone HB analysis is then:
* Ideal mixer example: 2-tone HB analysis
.OPTIONS POST
vlo lo 0 1.0 sin (1.0 0.5 1.0g 0 0 90) HB 0.5 0 1 1
rrf1 rf1 rf 1.0
g1 0 if cur='1.0*v(lo)*v(rf)' $ mixer element
c1 0 if q='1.0e-9*v(lo)*v(rf)' $ mixer element
rout if ifg 1.0
vctrl ifg 0 0.0
h1 out 0 vctrl 1.0 $ convert I to V
rh1 out 0 1.0
vrf rf1 0 sin (0 0.001 0.8GHz 0 0 114) HB 0.001 24 1 2
.opt sim_accuracy=100
.hb tones=1g 0.8g nharms=6 3
.end
HBAC Approach
To analyze this circuit using HBAC, start with the 2-tone HB analysis setup and
modify it as follows:
■
Replace the RF HB signal with an HBAC signal: change HB 0.001 24 1
2 to HBAC 0.001 24; this deactivates the source for HB and activates it for
HBAC with the same magnitude and phase.
■
Specify the frequency in the .HBAC command.
■
Change the .HB command to single tone:
.HB tones=1g nharms=6
Comparing Results
After running all three netlists above, you will have generated 3 output files:
■
mix_tran.tr0
■
mix_hb.hb0
■
mix_hbac.hb0
You can compare the results of the three analyses in Custom WaveView.
1. To run the netlists and start Custom WaveView, type:
hspice -i mix_tran.sp -o
hspice -i mix_hb.sp -o
hspice -i mix_hbac.sp -o
wv &
2. Use File > Import Waveform File and select the mix_tran.tr0,
mix_hb.hb0, and mix_hbac.hb0 files from the Open: Waveform Files
dialog box.
3. Select the v(out) signal from the mix_hb.hb0 file in the signal browser.
Double-click on the signal name or drag and drop the signal in the waveform.
You should see a frequency spectrum similar to the one from the
mix_hbac.hb0 file.
4. Select the v(out) signal from the mix_hbac.hb0 file in the signal browser.
Double-click on the signal name or drag and drop the signal in the waveform.
You should see a frequency spectrum similar to the one from the
mix_hb.hb0 file.
You can also use HBAC to perform noise analysis on advanced analog circuits
by using the .HBNOISE command, which is included in the mix_hbac.sp
netlist.
■
The .HBNOISE command invokes noise analysis, identifying an output
node where the noise is measured, an input noise source (in this case, rrf1)
which serves as a reference for noise figure computation and a frequency
sweep for the noise analysis.
■
The .PRINT and .PROBE hbnoise commands instruct HSPICE advanced
analog analyses to save the output noise and noise figure at each frequency
in the mix_hbac.printpn0 and mix_hbac.pn0 output files.
This ideal mixer is noiseless, except for the resistors at the input and output.
The mix_hbac.lis file contains detailed data on the individual noise source
contributions of the resistors. You can view mix_hbac.printpn0 to see the
output noise and noise figure at each frequency. In WaveView, you can view
mix_hbac.pn0 to plot the output noise and noise figure data as a function of
frequency.
Input Syntax
.HBAC frequency_sweep
Parameter Description
frequency_sweep Frequency sweep range for the input signal (also referred to as the input
frequency band or fin). You can specify LIN, DEC, OCT, POI, or
SWEEPBLOCK. Specify the nsteps, start, and stop frequencies using the
following syntax for each type of sweep:
■
LIN nsteps start stop
■
DEC nsteps start stop
■
OCT nsteps start stop
■
POI nsteps freq_values
■ SWEEPBLOCK=swblockname
■
DATA=dataname
Output Syntax
This section describes the syntax for the HBAC .PRINT and .PROBE
statements. These statements are similar to those used for HB analysis.
.PRINT and .PROBE Statements
.PRINT HB TYPE(NODES | ELEM)[INDICES]
.PROBE HB TYPE(NODES | ELEM)[INDICES]
Parameter Description
INDICES Index to tones in the form [n1, n2, ..., nK, +/-1].
■ nj is the index of the j-th HB tone and the .HB statement contains K tones
■
+/-1 is the index of the HBAC tone
You can transform HB data into the time domain and output by using the following syntax:.PRINT
HBTRAN ov1 [ov2 ... ovN].PROBE HBTRAN ov1 [ov2 ... ovN]. See TYPE above for voltage and
current type definitions.
Error Messages
■
HBAC frequency sweep includes negative frequencies. HBAC allows only
frequencies that are greater than or equal to zero.
■
No HB statement is specified (error at parser). HBAC requires an HB
statement to generate the steady-state solution.
Warning Messages
■
More than one HBAC statement (warning at parser). HSPICE advanced
analog analyses uses only the last HBAC statement in the netlist.
■
No HBAC sources are specified (error at parser). HBAC requires at least
one HBAC source.
■
GMRES Convergence Failure. When GMRES (Generalized Minimum
Residual) reaches the maximum number of iterations and the residual is
greater than the specified tolerance. The HBAC analysis generates a
warning and then continues as if the data were valid. This warning reports
the following information:
• Final GMRES Residual
• Target GMRES Residual
• Maximum Krylov Iterations
• Actual Krylov Iterations taken
SNAC Example
The following example is shipped with the HSPICE distribution as
mix_snac.sp and is available in the directory:
$installdir/demo/hspice/rf_examples/.
* Test SNAC: ideal I,Q mixer -rrd
.OPTIONS PROBE
.OPTIONS POST=2
$.OPTIONS snmaxiter=100
.OPTIONS SNACCURACY=5
vlo lo 0 1.0 cos(1.0 0.5 1g) $ Periodic, Large-Signal SN Input
rlo lo 0 1.0
rrf rf 0 1.0 $ Noise source
rrf1 rf1 rf 1.0 $ Noise source
g1 0 if cur='1.0*v(lo)*v(rf)' $ mixer element
c1 0 if q='1.0e-9*v(lo)*v(rf)' $ mixer element
rout if ifg 1.0
vctrl ifg 0 0.0
h1 out 0 vctrl 1.0
rh1 out 0 1.0
vrf rf1 0 snac .001 24.0 $ Small signal for SNAC with 1-tone SN Input
.sn tones=1.0g nharms=3
.snac lin 1 0.8g 0.8g
.print sn v(rf1) v(lo) v(out)
.print snfd v(rf1) v(lo) v(out)
.print snac v(rf1) v(lo) v(out)
.measure snac vout1 find v(out)[1,-1] at=0.8g
.measure snac vout2 find v(out)[0,1] at=0.8g
.measure snac vout3 find v(out)[1,1] at=0.8g
.measure sn vlo1 find v(lo) at=0.5n
.measure sn vlo2 find v(lo) at=1n
.measure snfd vlo3 find v(lo)[1] at=1
.end
Input Syntax
.SNAC frequency_sweep
Parameter Description
frequency_sweep Frequency sweep range for the input signal (also referred to as the input frequency band
or fin). You can specify LIN, DEC, OCT, POI, or SWEEPBLOCK. Specify the nsteps, start,
and stop frequencies using the following syntax for each type of sweep:
■ LIN nsteps start stop
■
DEC nsteps start stop
■ OCT nsteps start stop
■
POI nsteps freq_values
■
SWEEPBLOCK=swblockname
■
DATA=dataname
Output Syntax
This section describes the syntax for the SNAC .PRINT and .PROBE
statements. These statements are similar to those used for HB analysis.
.PRINT and .PROBE Statements
.PRINT SN TYPE(NODES | ELEM)[INDICES]
.PROBE SN TYPE(NODES | ELEM)[INDICES]
Parameter Description
You can transform SN data into the time domain and output by using the following syntax:.PRINT
SNTRAN ov1 [ov2 ... ovN]. PROBE SNTRAN ov1 [ov2 ... ovN]. See TYPE above for voltage and
current type definitions.
Error Messages
■
SNAC frequency sweep includes negative frequencies. SNAC allows only
frequencies that are greater than or equal to zero.
■
No SN statement is specified (error at parser). SNAC requires an SN
statement to generate the steady-state solution.
Warning Messages
■
More than one SNAC statement (warning at parser). HSPICE advanced
analog analyses uses only the last SNAC statement in the netlist.
■
No SNAC sources are specified (error at parser). SNAC requires at least
one SNAC source.
■
GMRES Convergence Failure. When GMRES (Generalized Minimum
Residual) reaches the maximum number of iterations and the residual is
greater than the specified tolerance. The SNAC analysis generates a
warning and then continue as if the data were valid. This warning reports the
following information:
• Final GMRES Residual
• Target GMRES Residual
• Maximum Krylov Iterations
• Actual Krylov Iterations taken
■
I and V Element Syntax
■
Examples
Parameter Description
[[dc] mag] DC voltage or power source value. You do not need to specify DC
explicitly (default=0).
[HBAC [mag [phase]]] Advanced analog HBAC voltage or power source value.
[SNAC [mag [phase]]] Advanced analog SNAC voltage or power source value.
Parameter Description
[hb [mag [phase [harm [tone Advanced analog HB voltage, current, or power source value. Multiple
[modharm [modtone]]]]]]] HB specifications with different harm, tone, modharm, and modtone
values are allowed.
■
phase is in degrees
■ harm and tone are indices corresponding to the tones specified in
the .HB statement. Indexing starts at 1 (corresponding to the first
harmonic of a tone).
■ modtone and modharm specify sources for multi-tone simulation. A
source specifies a tone and a harmonic, and up to 1 offset tone and
harmonic (modtone for tones and modharm for harmonics). The
signal is then described as:
V(or I) = mag*cos(2*pi*
(harm*tone+modharm*modtone)*t + phase)
[transient waveform] (Transient analysis) Any one of waveforms: AM, EXP, PULSE, PWL,
SFFM, or SIN. Multiple transient descriptions are not allowed.
You can use this parameter for transient analysis if the power source is
either DC or SIN.
Parameter Description
Examples
Example 1
This example shows an HB source for a single tone analysis:
.hb tones=100MHz harms=7
I1 1 2 dc=1mA hb 3mA 0. 1 1
Example 2
This example shows HB sources used for a two-tone analysis:
.hb tones=1.e9 1.1e9 intmodmax=5
Vin lo 0 dc=0. hb 1.5 90 1 1
Vrf rf 0 dc=0. hb 0.2 0 1 2
Example 3
The following HB source uses a modtone and modharms:
Example 4
This example uses an HB source specified with a SIN source and TRANFORHB.
.hb tone=1.e8 harms=7
Vt 1 2 SIN(0.1 1.0 2.e8 0. 0. 90) tranforhb=1
Example 5
This example shows a power source (the units are Watts).
.hb tones=1.1e9 harms=9
Pt Input Gnd power=1 Z0=50. 1m 0. 1 1
■
Optimizing with HBNOISE Measurement
■
Errors and Warnings
Supported Features
HBNOISE supports the following features:
■
All existing HSPICE advanced analog noise models.
■
Uses more than one single-tone, harmonic balance to generate the steady-
state solution.
■
Unlimited number of HB sources (using the same tone, possibly multiple
harmonics).
■
Includes stationary, cyclostationary, frequency-dependent, and correlated
noise effects.
■
Swept parameter analysis.
■
Results are independent of the number of HBAC sources in the netlist.
HBNOISE Example
This example performs an HB analysis, then runs an HBNOISE analysis over a
range of frequencies, from 9.0e8 to 9.2e8 Hz. Simulation outputs the output
noise at V(out) and the single side-band noise figure versus the input frequency
band, from 1e8 to 1.2e8 Hz, to the *.pn0 file. The following is the netlist for this
example:
Input Syntax
.HBNOISE [output] [insrc] [parameter_sweep]
+ [n1, n2, ..., nk,+/-1]
+ [listfreq=(frequencies|none|all)] [listcount=val]
+ [listfloor=val] [listsources=on|off]
Parameter Description
output Output node, pair of nodes, or 2-terminal element. HSPICE advanced analog
analyses references equivalent noise output to this node (or pair of nodes).
Specify a pair of nodes as V(n+,n-). If you specify only one node, V(n+), then
HSPICE advanced analog analyses assumes that the second node is ground.
You can also specify a 2-terminal element name that refers to an existing element
in the netlist.
insrc An input source. If this is a resistor, HSPICE advanced analog analyses uses it as
a reference noise source to determine the noise figure. If the resistance value is
0, the result is an infinite noise figure.
Parameter Description
parameter_sweep Frequency sweep range for the input signal. Also referred to as the input
frequency band or fin). You can specify LIN, DEC, OCT, POI, SWEEPBLOCK,
DATA, MONTE, or OPTIMIZE sweeps. Specify the nsteps, start, and stop
frequencies using the following syntax for each type of sweep:
■
LIN nsteps start stop
■ DEC nsteps start stop
■
OCT nsteps start stop
■ POI nsteps freq_values
■
SWEEPBLOCK=swblockname
n1,n2,...,nk, Index term defining the output frequency band (fout) at which the noise is
+/-1 evaluated. Generally,
fout=ABS(n1*f1+n2*f2+...+nk*fk+/-fin)
where:
■ f1,f2,...,fk are the first through k-th steady-state tones determined from the
harmonic balance solution
■
fin is the input frequency band defined by parameter_sweep.
The default index term is [1,1,...1,-1].
For a single tone analysis, the default mode (index term [1,-1]) is consistent with
simulating a high-side, down conversion mixer where the RF signal is specified by
the input frequency band and the noise is measured at a down-converted
frequency that the output frequency band specifies: fout=abs(fLO-fin). Where fLO
corresponds to the large signal specified by the first index 1 and fin is the input RF
signal specified by the second index -1.
In general, you can use the [n1,n2,...,nk,+/-1] index term to specify an arbitrary
offset. The noise figure measurement is also dependent on this index term.
listfreq Prints the element noise value to the .lis file. You can specify at which frequencies
the element noise value is printed. The frequencies must match the
sweep_frequency values defined in the parameter_sweep, otherwise they are
ignored.
In the element noise output, the elements that contribute the largest noise are
printed first. The frequency values can be specified with the NONE or ALL
keyword, which either prints no frequencies or every frequency defined in
parameter_sweep. Frequency values must be enclosed in parentheses. For
example:listfreq=(none)
listfreq=(all)
listfreq=(1.0G)
listfreq=(1.0G, 2.0G)The default value is NONE.
listcount Prints the element noise value to the .lis file, which is sorted from the largest to
smallest value. You do not need to print every noise element; instead, you can
define listcount to print the number of element noise frequencies. For
example, listcount=5 means that only the top 5 noise contributors are printed.
The default value is 1.
listfloor Prints the element noise value to the .lis file and defines a minimum meaningful
noise value (in V/Hz1/2 units). Only those elements with noise values larger than
listfloor are printed. The default value is 1.0e-14 V/Hz1/2.
Parameter Description
listsources Prints the element noise value to the .lis file when the element has multiple
noise sources, such as a FET, which contains the thermal, shot, and 1/f noise
sources. You can specify either ON or OFF: ON prints the contribution from each
noise source and OFF does not. The default value is OFF.
Output Syntax
The HSPICE advanced analog HB and SN noise analyses can output the
output noise (onoise), noise figures (NF, SSNF, and DSNF) and, the input
referred noise (inoise). This section describes the syntax for the HBNOISE
.PRINT and .PROBE statements.
Parameter Description
ONOISE Outputs the voltage noise at the output frequency band across the output nodes in
the .HBNOISE statement. The data is plotted as a function of the input frequency band
points. Units are in V/Hz1/2. Simulation ignores ONOISE when applied to autonomous
circuits.
NF NF and SSNF both output a single-side band noise figure as a function of the input
SSNF frequency band points:
NF = SSNF = 10 Log(SSF)
Single side-band noise factor, SSF = {(Total Noise at output, at the output frequency
band, originating from all frequencies) - (Load Noise originating from the output
frequency band)} / (Input Source Noise originating from the input frequency band).
DSNF DSNF outputs a double side-band noise figure as a function of the input frequency band
points.
DSNF = 10 Log(DSF)
Double side-band noise factor, DSF = {(Total Noise at output, at the output frequency
band, originating from all frequencies) - (Load Noise originating from the output
frequency band)} / (Input Source Noise originating from the input frequency band and
from the image of the input frequency band).
INOISE Outputs input referred noise which can be printed, probed, or measured.
The previous measurement yields the result at the input frequency point
when out_var2 == out_var3.
.MEASURE HBNOISE result WHEN out_var2 = out_var3
The previous measurement yields the input frequency point when out_var2
== out_var3.
■ Average, RMS, min, max, and peak-to-peak
.MEASURE HBNOISE result [RMS] out_var [FROM = IFB1]
+ [TO = IFB2]
■
Integral evaluation
.MEASURE HBNOISE result INTEGRAL out_var
+ [FROM = IFB1] [TO = IFB2]
This measurement integrates the out_var value from the IFB1 frequency to
the IFB2 frequency.
■
Derivative evaluation
.MEASURE HBNOISE result DERIVATIVE out_var AT = IFB1
This measurement yields the result of the input referred noise at a specific
input frequency band point.
.MEASURE [HBNOISE|SNNOISE] result FIND inoise
+ WHEN out_var2 = out_var3
This measurement yields the result at the input frequency point when
out_var2 == out_var3.
.MEASURE HBNOISE result func inoise [FROM = IFB1]
+ [TO = IFB2]
This measurement integrates the inoise value from the IFB1 frequency to
the IFB2 frequency.
.MEASURE HBNOISE result DERIVATIVE inoise AT = IFB1
For example:
.HBOSC tone=1g nharms=5 PROBENODE=out,gnd,0.8
+ SWEEP OPTIMIZE=opt1 RESULT=y1,y2 MODEL=m1
.MODEL m1 OPT level=0
■
Measure statement
.MEASURE HBNOISE measname FIND out_var1 AT=val GOAL=val
Supported Features
SNNOISE supports the following features:
■
All existing HSPICE advanced analog noise models.
■
Uses Shooting Newton to generate the steady-state solution.
■
Unlimited number of sources.
■
Includes stationary, cyclostationary, frequency-dependent, and correlated
noise effects.
■
Swept parameter analysis.
■
Results are independent of the number of SNAC sources in the netlist.
*
$$*-Ideal mixer + noise source
$ prints total noise PSD at the output (2.47e-20 V^2) when q=0
$ single-sideband noise figure, (3.01 dB)
$ double-sideband noise figure. (0 dB)
.OPTION PROBE
.OPTION POST=2
vlo lo 0 0.0 cos (0 1.0 1.0g 0 0 0)
Ilo lo 0 0
rsrc rfin rf1 1.0 $ Noise source
g1 0 if cur='1.0*v(lo)*v(rfin)' $ mixer element
c1 0 if q='1.0e-9*v(lo)*v(rfin)' $ mixer element
rout if 0 1.0
vrf rf1 0 $ hbac 2.0 0.0
.option delmax=0.002n
.SN tones=1G nharms=4 trstab=10n
.SNNOISE rout rsrc lin 11 0.90g 0.92g
.probe SNNOISE onoise ssnf dsnf
.print SNNOISE onoise ssnf dsnf
.end
Input Syntax
.SNNOISE [output] [insrc] [parameter_sweep]
+ [n1+/-1]
+ [listfreq=(frequencies|none|all)] [listcount=val]
+ [listfloor=val] [listsources=on|off]
Parameter Description
output Can be an output node, pair of nodes, or a 2-terminal element. HSPICE advanced analog
analysis references the equivalent noise output to this node (or pair of nodes). Specify a pair
of nodes as V(n+,n-). If you specify only one node V(n+), then HSPICE advanced analog
analysis assumes that the second node is ground. You can also specify a 2-terminal element
name that refers to an existing element in the netlist. If the 2-terminal element is a voltage
source, then HSPICE advanced analog analysis outputs the noise current through the voltage
source in A/sqrt(Hz). For all other 2-terminal devices, HSPICE outputs the noise voltage
across the device in V/sqrt(Hz).
insrc An input source. If this is a resistor, HSPICE advanced analog analyses uses it as a reference
noise source to determine the noise figure. If the resistance value is 0, the result is an infinite
noise figure.
Parameter Description
parameter_sweep Frequency sweep range for the input signal. Also referred to as the input frequency band or
fin). You can specify LIN, DEC, OCT, POI, SWEEPBLOCK, DATA, MONTE, or OPTIMIZE
sweeps. Specify the nsteps, start, and stop frequencies using the following syntax for each
type of sweep:
■
LIN nsteps start stop
■ DEC nsteps start stop
■
OCT nsteps start stop
■ POI nsteps freq_values
■
SWEEPBLOCK=swblockname
n1,+/-1 Index term defining the output frequency band at which the noise is evaluated. The output
frequency is computed according to fout=|n1*f1 +/- fin|, where f1 is the fundamental tone
(inverse of the fundamental period) and fin is from the frequency sweep.
For a single tone analysis, the default mode (index term [1,-1]) is consistent with simulating a
high-side, down conversion mixer where the RF signal is specified by the input frequency band
and the noise is measured at a down-converted frequency that the output frequency band
specifies: fout=abs(fLO-fin). Where fLO corresponds to the large signal specified by the first
index 1 and fin is the input RF signal specified by the second index -1.
See Specifying Variant Indices and Measuring SNNOISE Analyses with .MEASURE.
listfreq Prints the element noise value to the .lis file. You can specify at which frequencies the element
noise value is printed. The frequencies must match the sweep_frequency values defined in the
parameter_sweep, otherwise they are ignored.
In the element noise output, the elements that contribute the largest noise are printed first. The
frequency values can be specified with the NONE or ALL keyword, which either prints no
frequencies or every frequency defined in parameter_sweep. Frequency values must be
enclosed in parentheses. For example:
listfreq=(none)
listfreq=(all)
listfreq=(1.0G)
listfreq=(1.0G, 2.0G)
listcount Prints the element noise value to the .lis file, which is sorted from the largest to smallest value.
You do not need to print every noise element; instead, you can define listcount to print the
number of element noise frequencies. For example, listcount=5 means that only the top 5
noise contributors are printed. The default value is 1.
listfloor Prints the element noise value to the .lis file and defines a minimum meaningful noise value
(in V/Hz1/2 units). Only those elements with noise values larger than listfloor are printed.
The default value is 1.0e-14 V/Hz1/2.
listsources Prints the element noise value to the .lis file when the element has multiple noise sources,
such as a FET, which contains the thermal, shot, and 1/f noise sources. You can specify either
ON or OFF: ON Prints the contribution from each noise source and OFF does not. The default
value is OFF.
This example uses 100 points per decade for the frequency sweep, instead of
1000 points per decade. This is to speed up the simulation. It does not affect
the accuracy of the results.
Output Syntax
This section describes the syntax for the SNNOISE .PRINT and .PROBE
statements.
Parameter Description
ONOISE Outputs the voltage noise at the output frequency band across the output nodes in
the .SNNOISE statement. The data is plotted as a function of the input frequency band
points. Units are in V/Hz1/2. Simulation ignores ONOISE when applied to autonomous
circuits.
Parameter Description
NF NF and SSNF both output a single-side band noise figure as a function of the input
SSNF frequency band points:
NF = SSNF = 10 Log(SSF)
Single side-band noise factor, SSF = {(Total Noise at output, at the output frequency
band, originating from all frequencies) - (Load Noise originating from the output
frequency band)} / (Input Source Noise originating from the input frequency band).
DSNF DSNF outputs a double side-band noise figure as a function of the input frequency band
points.
DSNF = 10 Log(DSF)
Double side-band noise factor, DSF = {(Total Noise at output, at the output frequency
band, originating from all frequencies) - (Load Noise originating from the output
frequency band)} / (Input Source Noise originating from the input frequency band and
from the image of input frequency band).
INOISE Outputs input referred noise which can be printed, probed, or measured.
The previous measurement yields the result at the input frequency point
when out_var2 == out_var3.
.MEASURE SNNOISE result WHEN out_var2 = out_var3
The previous measurement yields the input frequency point when out_var2
== out_var3.
■
Average, RMS, min, max, and peak-to-peak
.MEASURE SNNOISE result [RMS] out_var [FROM = IFB1]
+ [TO = IFB2]
■
Integral evaluation
.MEASURE SNNOISE result INTEGRAL out_var
+ [FROM = IFB1] [TO = IFB2]
This measurement integrates the out_var value from the IFB1 frequency to
the IFB2 frequency.
■
Derivative evaluation
.MEASURE SNNOISE result DERIVATIVE out_var AT = IFB1
This measurement yields the result of the input referred noise at a specific
input frequency band point.
.MEASURE SNNOISE result FIND inoise
+ WHEN out_var2 = out_var3
This measurement yields the result at the input frequency point when
out_var2 == out_var3.
.MEASURE SNNOISE result func inoise [FROM = IFB1]
+ [TO = IFB2]
This measurement integrates the inoise value from the IFB1 frequency to
the IFB2 frequency.
.MEASURE SNNOISE result DERIVATIVE inoise AT = IFB1
Equation 35
Y m j 0 = HBXFm,n j0 ,j + Xn j +
W
where:
■
HBXF m ,n j 0 ,j + is the transfer function from input port n to the
output port m
■
W is the set of all possible harmonics
■
+ is the input frequency
■
is the offset frequency
■
m is the output node number
■
n is the input node number
■
0 is the output frequency
■
Y is the output (voltage or current)
■
X is the input (voltage or current)
The following sections discuss these topics:
■
Supported Features
■ Example
■
HBXF Test Listing
■
Input Syntax
■ Output Syntax
■
Output Data Files
■ Using the .MEASURE Command with .HBXF
Supported Features
The .HBXF command supports the following features:
■
All existing HSPICE advanced analog models and elements
■
Sweep parameter analysis
■
Unlimited number of HB sources
Example
Based on the HB analysis, the following example computes the trans-
impedance from isrc to v(1).
.hb tones=1e9 nharms=4
.hbxf v(1) lin 10 1e8 1.2e8
.print hbxf tfv(isrc) tfi(n3)
Input Syntax
.HBXF out_var freq_sweep
Parameter Description
freq_sweep Frequency sweep range for the input signal (also referred to as the input frequency
band (fin)). A sweep of type LIN, DEC, OCT, POI, or SWEEPBLOCK. Specify the
nsteps, start, and stop frequencies using the following syntax for each type of
sweep:
■ LIN nsteps start stop
■
DEC nsteps start stop
■
OCT nsteps start stop
■
POI nsteps freq_values
■
SWEEPBLOCK=swblockname
Specify the frequency sweep range for the output signal. HSPICE advanced
analog analyses determines the offset frequency in the input sidebands; for
example,
f1 = abs(fout - k*f0) s.t. f1<=f0/2
The f0 is the steady-state fundamental tone, and f1 is the input frequency.
Output Syntax
This section describes the syntax for the HBXF .PRINT and .PROBE
statements.
Parameter Description
Example
Based on the SN analysis, the following example computes the
transimpedance from isrc to v(1).
.SN tones=1e9 nharms=4
.SNXF v(1) lin 10 1e8 1.2e8
print SNXF TFV(isrc) TFI(n3)
Input Syntax
.SNXF out_var freq_sweep
Parameter Description
Parameter Description
freq_sweep Frequency sweep range for the input signal (also referred to as the input frequency
band (fin)). A sweep of type LIN, DEC, OCT, POI, or SWEEPBLOCK. Specify the
nsteps, start, and stop frequencies using the following syntax for each type of
sweep:
■
LIN nsteps start stop
■
DEC nsteps start stop
■
OCT nsteps start stop
■
POI nsteps freq_values
■ SWEEPBLOCK=swblockname
Specify the frequency sweep range for the output signal. HSPICE advanced
analog analyses determines the offset frequency in the input sidebands Fin, where
Fin = abs(n*F0 +/- Fout). F0 is the steady-state fundamental tone, and Fout is the
output frequency. SNXF then generates the transfer functions from all of the input
sidebands (the Fin values) to the output frequency Fout.
Output Syntax
This section describes the syntax for the SNXF .PRINT and .PROBE
statements.
.PRINT and .PROBE Statements
.PRINT SNXF TYPE(NODES | ELEM)
.PROBE SNXF TYPE(NODES | ELEM)
Parameter Description
TYPE can be one of the following:
■ TFV = existing source
■
TFI = placeholder value for the current source attached to the given node.
The transfer function is computed on the output variables and input current or
voltage .NODES | ELEM NODES or ELEM can be one of the following:
■
Voltage type – a single node name (n1), or a pair of node names, (n1,n2)
■
Current type – an element name (elemname)
■ Power type – a resistor (resistorname) or port (portname) element name
References
[1] S. Maas, Nonlinear Microwave Circuits, Chapter 3, IEEE Press, 1997.
[2] R. Gilmore and M.B. Steer, “Nonlinear Circuit Analysis Using the Method of
Harmonic Balance - A Review of the Art, Part I, Introductory Concepts.”
International Journal of Microwave and Millimeter-wave Computer-Aided
Engineering, Volume 1, No. 1, pages 22-37, 1991.
[3] R. Gilmore and M.B. Steer, “Nonlinear Circuit Analysis Using the Method of
Harmonic Balance - A Review of the Art. Part II. Advanced Concepts.”
International Journal of Microwave and Millimeter-wave Computer-Aided
Engineering, Volume 1, No. 2, pages 159-180, 1991.
[4] V. Rizzoli, F. Mastri, F. Sgallari, G. Spaletta, “Harmonic-Balance Simulation
of Strongly Nonlinear Very Large-Size Microwave Circuits by Inexact
Newton Methods,” MTT-S Digest, pages 1357-1360, 1996.
[5] S. Skaggs, Efficient Harmonic Balance Modeling of Large Microwave
Circuits, Ph.D. thesis, North Carolina State University, 1999.
[6] R.S. Carson, High-Frequency Amplifiers, 2nd Edition, John Wiley & Sons,
1982
[7] S.Y. Liao, Microwave Circuit Analysis and Amplifier Design, Prentice-Hall,
1987.
[8] Y. Saad, Iterative Methods for Sparse Linear Systems, PWS Publishing
Company, 1995.
Equation 36
b = Sa
b i,m
S i,j;m,n = -------------------
a j,n
a k j p n = 0
The incident waves, a i ,n and the reflected waves, b i ,n , are defined using
these equations:
Equation 37
V i + n 0 + Z 0i I i + n 0
a i ,n = ---------------------------------------------------------------------------
2 Z 0i
V i + n 0 – Z 0i I i + n 0
b i ,n = ---------------------------------------------------------------------------
2 Z 0i
where:
■
0 is the fundamental frequency (tone).
■
n is a signed integer.
■
i is the port number.
■ a i ,n is the input wave at the frequency + n 0 on the ith port.
■
b i ,n is the reflected wave at the frequency + n 0 on the ith port.
■
V i + n 0 is the Fourier coefficient at the frequency + n 0 of the
voltage at port i.
■
I i + n 0 is the Fourier coefficient at the frequency + n 0 of the current
at port i.
■ Z 0i is the reference impedance at port i.
■
V and I definitions are Fourier coefficients rather than phasors.
For a multi-tone analysis, they can be expressed as:
Equation 38
b = Sa
b i ,m ,m ...m
Si = --------------------------------------
1 2 N
-
,j;m 1 ...m N ,n 1 ,n 2 ...n N a j ,n ,n ...n
1 2 N
a k ,p ,p ...p k j ,p n = 0
1 2 N q q
Equation 39
N N
n j j
Vi +
n j j + Z 0i I i +
j=1 j=1
a i ,n ,n ...n = --------------------------------------------------------------------------------------------------
-
1 2 N
2 Z oi
N N
n j j
Vi +
n j j – Z 0i I i +
j=1 j=1
b i ,n ,n ...n = ------------------------------------------------------------------------------------------------
1 2 N
2 Z oi
where:
■
j is the ith tone.
The frequency translation S-parameters are calculated by applying different
n j j = 1 N to different ports.
Limitations
The HBLIN analysis has these known limitations:
■
Noise parameters are not calculated for a mixed-mode operation.
■
Only the S-parameters corresponding to the set of frequencies specified at
each port are extracted.
■
Multiple small-signal tones are not supported.
■
The port element impedance cannot be specified as a complex number.
The following sections discuss these topics:
■ HB Analysis
■
Port Element
■ HBLIN Analysis
■ Output Syntax
■
Output Data Files
HB Analysis
An HB analysis is required prior to an HBLIN analysis. To extract the frequency
translation S-parameters, a sweep of the small-signal tone is necessary. You
can identify the small-signal tone sweep in the .HBLIN command or in the .HB
command together with a SS_TONE specification.
For additional information regarding HB analysis, see Harmonic Balance
Analysis on page 28.
Port Element
You must use a port (P) element as the termination at each port of the system.
To indicate the frequency band that the S-parameters are extracted from, it is
necessary to specify a harmonic index for each P-element.
Parameter Description
PORT The port number. Numbered sequentially beginning with 1 with no shared port
numbers.
HBLIN Integer vector that specifies the harmonic index corresponding to the tones defined in
the .HB command. The +/-1 term corresponds to the small-signal tone specified by
SS_TONE in the .HB command. If there is no SS_TONE in the .HB command, the +/-
1 term must be at the last entry of the HBLIN vector.
HBLIN Analysis
You use the .HBLIN statement to extract frequency translation S-parameters
and noise figures.
■
Input Syntax
■
Examples
Input Syntax
Without SS_TONE
.HBLIN frequency_sweep
+ [NOISECALC = [1|0|yes|no]] [FILENAME=file_name]
+ [DATAFORMAT = [ri|ma|db]]
+ [MIXEDMODE2PORT = [dd|cc|cd|dc|sd|sc|cs|ds]]
With SS_TONE
.HBLIN [NOISECALC = [1|0|yes|no]] [FILENAME=file_name]
+ [DATAFORMAT = [ri|ma|db]]
+ [MIXEDMODE2PORT = [dd|cc|cd|dc|sd|sc|cs|ds]]
Parameter Description
frequency_sweep Frequency sweep range for the input signal (also referred to as the input
frequency band or fin). You can specify LIN, DEC, OCT, POI, or
SWEEPBLOCK. Specify the nsteps, start, and stop frequencies using the
following syntax for each type of sweep:
■ LIN nsteps start stop
■
DEC nsteps start stop
■
OCT nsteps start stop
■
POI nsteps freq_values
■
SWEEPBLOCK=swblockname
■ DATA=dataname
FILENAME Specifies the output file name for the extracted S-parameters or the object
name after the -o command-line option. The default is the netlist file name.
Parameter Description
MIXEDMODE2PORT Describes the mixed-mode data map of output mixed mode S-parameter
matrix. The availability and default value for this keyword depends on the first
two port (P element) configuration as follows:
■
case 1: p1=p2=single-ended (standard-mode P element)
available: ss
default: ss
■
case 2: p1=p2=balanced (mixed-mode P element)
available: dd, cd, dc, cc
default: dd
■
case 3: p1=balanced p2=single-ended
available: ds, cs
default: ds
■
case 4: p1=single p2=balanced
available: sd, sc
default: sd
Examples
Example 1
Single-tone analysis with frequency translation example. In this example, the 2-
port S-parameters from RF (1G-del_f) to IF (del_f) are extracted. The LO signal
is specified by normal voltage source Vlo. The frequency on port 1 is in the RF
band, 1G-del_f, and the frequency on port 2 is in the IF band, del_f. The IF
band is swept from 0- to 100-MHz. The results are output to the file ex1.s2p.
p1 RFin gnd port=1 HBLIN=(1,-1)
p2 IFout gnd port=2 HBLIN=(0,1)
Vlo LOin gnd DC 0 HB 2.5 0 1 1
.HB tones=1G harms=5
.HBLIN lin 5 0 100meg noisecalc=no filename=ex1
+ dataformat=ma
Example 2
Another single-tone analysis with frequency translation example. In this
example, the 3-port S-parameters are extracted. Port 3 provides the periodic
large signal. The frequency on port 1 is del_f, the frequency on port 2 is
1G*2-del_f, and the frequency on port 3 is 1G*1+del_f. The small-signal
frequency is swept from 0 to 100MHz. HBNOISE calculation is required. The
results are output to the file ex2.s3p.
p1 1 0 port=1 HBLIN=(0, 1)
p2 2 0 port=2 HBLIN=(2, -1)
p3 3 0 port=3 hb 0.5 0 1 1 HBLIN=(1, 1)
.HB tones=1G harms=5
.HBLIN lin 5 0 100meg noisecalc=yes filename=ex2
Output Syntax
This section describes the syntax for the HBLIN .PRINT and .PROBE
statements.
Parameter Description
■
i is the port number.
■ a[i, n] is the input wave at the frequency n*W0 on the ith port.
■
b[i, n] is the reflected wave at the frequency n*W0 on the ith port.
■ V[i](n*W0) is the Fourier coefficient at the frequency n*W0 of the voltage at
port i.
■
I[i](n*W0) is the Fourier coefficient at the frequency n*W0 of the current at
port i.
■ Zo[i] is the reference impedance at port i.
An HBLSP analysis only extracts the S-parameters on the first harmonic (that
is, n=1).
■
Input Syntax
■ Examples
■
Output Syntax
■
Output Data Files
■ HBLSP Analysis Limitations
Input Syntax
.HBLSP NHARMS=nh [POWERUNIT=[dbm|watt]]
+ [SSPCALC=[1|0|YES|NO]] [NOISECALC=[1|0|YES|NO]]
+ [FILENAME=file_name] [DATAFORMAT=[ri|ma|db]]
+ FREQSWEEP freq_sweep POWERSWEEP power_sweep
Parameter Description
FILENAME Output data .p2d filename. Default is the netlist name or the object name after the
-o command-line option.
Parameter Description
FREQSWEEP Frequency sweep specification. A sweep of type LIN, DEC, OCT, POI, or
SWEEPBLOCK. Specify the nsteps, start, and stop times using the following
syntax for each type of sweep:
■ LIN nsteps start stop
■
DEC nsteps start stop
■ OCT nsteps start stop
■
POI nsteps freq_values
■
SWEEPBLOCK=swblockname
Examples
The following example does a 2-port single-tone, power-dependent S-
parameter extraction, without frequency translation:
■ Frequency sweep: The fundamental tone is swept from 0 to 1G
■
Power sweep: The power input at port 1 is swept from 6 to 10 Watts.
■ Five harmonics are required for the HB analysis. Large-signal S-parameters
are extracted on the first harmonic.
■
Five harmonics are required in the HBLSP triggered HB analysis.
■ The DC value in p1 statement is used to set the DC bias, which is used to
perform small-signal analyses.
■ Small-signal S-parameters are required extracted.
■
Small-signal two-port noise analysis is required.
■
The data will be output to the ex1.p2d file.
Output Syntax
This section describes the syntax for the HBLSP .PRINT and .PROBE
statements. These statements only support S and noise parameter outputs.
Node voltage, branch current, and all other parameters are not supported in
HBLSP .PRINT and .PROBE statements.
Parameter Description
Envelope Simulation
Envelope simulation combines the features of time- and frequency-domain
analysis. Harmonic Balance (HB) solves for a static set of phasors for all the
circuit state variables, as shown in this equation:
Equation 40
N
v t = a0 + ai cos i t + bi sin i t
i=1
In contrast, envelope analysis finds a dynamic, time-dependent set of phasors,
as this equation shows:
Equation 41
N
v t = a 0 ˆt + ˆ ˆ
ai t cos i t + bi t sin i t
i=1
In envelope simulation, each signal is described by the evolving spectrum.
Envelope analysis is generally used on circuits excited by signals with
significantly different timescales. An HB simulation is performed at each point in
time of the slower-moving ( ˆt ) timescale. In this way, for example, a 2-tone HB
simulation can be converted into a series of related 1-tone simulations where
the transient analysis proceeds on the ( ˆt ) timescale, and 1-tone HB simulations
are performed with the higher frequency tone as the fundamental frequency.
In HSPICE advanced analog analyses, any voltage or current source identified
as a HB source either in a V or I element statement, or by an .OPTION
TRANFORHB command, is used for HB simulations at each point in ˆt time. All
other sources are associated with the transient timescale. Also, the input
waveforms can be represented in the frequency domain as RF carriers
modulated by an envelope by identifying a VMRF signal source in a V or I
element statement. The amplitude and phase values of the sampled envelope
are used as the input signal for HB analysis.
Some typical applications for envelope simulation are amplifier spectral
regrowth, adjacent channel power ration (ACPR), and oscillator startup and
shutdown analyses.
Nonautonomous Form
.ENV TONES=f1 [f2...fn] NHARMS=h1 [h2...hn]
+ ENV_STEP=tstep ENV_STOP=tstop
Parameter Description
Description
You use the .ENV command to do standard envelope simulation. The
simulation proceeds just as it does in a standard transient simulation, starting
at time=0 and continuing until time=env_stop. An HB analysis is performed
at each step in time. You can use Backward-Euler (BE), trapezoidal (TRAP), or
level-2 Gear (GEAR) integration.
Recommended option settings are:
■ For BE integration, set .OPTION SIM_ORDER=1.
■
For TRAP, set .OPTION SIM_ORDER=2 (default) METHOD=TRAP (default).
■
For GEAR, set .OPTION SIM_ORDER=2 (default) METHOD=GEAR.
Example
.env tones=1e9 nharms=6 env_step=10n env_stop=1u
Parameter Description
PROBENODE Defines the nodes used for oscillator conditions and the initial probe voltage value.
FSPTS Specifies the frequency search points used in the initial small-signal frequency
search. Usage depends on the oscillator type.
Description
You use the .ENVOSC command to do envelope simulation for oscillator startup
or shutdown.
Oscillator startup or shutdown analysis with this command must be helped
along by converting a bias source from a DC description to a PWL description
that either:
■ Starts at a low value that supports oscillation and ramps up to a final value
(startup simulation)
■
Starts at the DC value and ramps down to zero (shutdown simulation).
In addition to solving for the state variables at each envelope time point, the
.ENVOSC command also solves for the frequency. This command is intended to
be applied to high-Q oscillators that take a long time to reach steady-state. For
these circuits, the standard transient analysis is too costly. Low-Q oscillators,
such as typical ring oscillators, are more efficiently simulated with standard
transient analysis.
Example
.envosc tone=250Meg nharms=10 env_step=20n env_stop=10u
+ probenode=v5,0,1.25
+[<WINDOW=keyword] [ALFA=val]
Parameter Description
NP The number of points to use in the FFT analysis. NP must be a power of 2. If not
a power of 2, then it is automatically adjusted to the closest higher number that is
a power of 2. The default is 1024.
ALFA Controls the highest side-lobe level and bandwidth for GAUSS and KAISER
windows. The default is 3.0.
Description
You use the .ENVFFT command to perform Fast fourier Transform (FFT) on the
envelope output. This command is similar to the .FFT command. The only
difference is that the transformation is performed on real data with the .FFT
command, and with the .ENVFFT command, the data being transformed is
complex. You usually want to do this for a specific harmonic of a voltage,
current, or power signal.
Example
.envfft v(out)[1]
Output Syntax
The results from envelope simulation can be made available through the
.PRINT, .PROBE, and .MEASURE commands. This section describes the basic
syntax you can use for this purpose.
.PRINT or .PROBE
You can print or probe the envelope simulation results by using the following
commands:
.PRINT ENV ov1 <ov2... >
.PROBE ENV ov1 <ov2... >
Where ov1... are the output variables to print or probe.
.MEASURE
In HSPICE advanced analog analyses, the independent variable for envelope
simulation is the first tone. Otherwise, except for the analysis type, the
.MEASURE statement syntax is the same as the syntax for HB; for example,
.MEASURE ENV result ...
env_time[0]
f[0] a[0]{v(in)} b[0] {v(in)} a[0] {v(out)} b[0] {v(out)} n0
f0 n1 f1
f[1] a[1]{v(in)} b[1] {v(in)} a[1] {v(out)} b[1] {v(out)} n0
f0 n1 f1
...
f[N] a[N]{v(in)} b[N] {v(in)} a[N] {v(out)} b[N] {v(out)} n0
f0 n1 f1
env_time[1]
f[0] a[0]{v(in)} b[0] {v(in)} a[0] {v(out)} b[0] {v(out)} n0
f0 n1 f1
f[1] a[1]{v(in)} b[1] {v(in)} a[1] {v(out)} b[1] {v(out)} n0
f0 n1 f1
...
f[N] a[N]{v(in)} b[N] {v(in)} a[N] {v(out)} b[N] {v(out)} n0
f0 n1 f1
...
env_time[M-1]
f[0] a[0]{v(in)} b[0] {v(in)} a[0] {v(out)} b[0] {v(out)} n0
f0 n1 f1
f[1] a[1]{v(in)} b[1] {v(in)} a[1] {v(out)} b[1] {v(out)} n0
f0 n1 f1
...
f[N] a[N]{v(in)} b[N] {v(in)} a[N] {v(out)} b[N] {v(out)} n0
f0 n1 f1
Where there are M data blocks corresponding to M envelope time points, with
each block containing N+1 rows for the frequency data. The units for the
env_time sweep are seconds.
HSPICE ships several examples for your use; see Applications of General
Interest Examples in the HSPICE User Guide: Basic Simulation and Analysis
for paths to the demo files.
current, or voltage), and eventually make changes in the design to reduce the
noise levels, if necessary.
Two types of noise are commonly defined: inherent and interference.
■
Inherent noise is the noise created by the elements internal to the circuit
(resistors, diodes, and transistors), caused by movement of electrons in the
circuit.
■
Interference noise refers to the unwanted signals from the environment
absorbed by the circuit.
Eliminating interfering noise can be done by different methods of signal
shielding or code modulation so that the signal can be differentiated from the
noise. Inherent noise, however, can only be affected by changes in the circuit
topology and the bias currents.
This chapter discusses only inherent noise and the HSPICE simulations related
to it. Whenever the term “noise” is used, it refers to “inherent noise”.
Presented first in the following sections are some theoretical definitions for
noise sources in an analog circuit. These are followed by a discussion on how
HSPICE performs a noise simulation and how to interpret outputs from a noise
simulation.
To simulate a noise source in the time domain, you have to know the Probability
Distribution Function (PDF) of that signal and then create a voltage or current
source that produces a random output signal conforming to the PDF. Figure 20
demonstrates a sample PDF for a random signal with a Gaussian distribution.
Extracting PDF parameters from the circuit components is not straightforward
and therefore not common in analyzing noise.
Signal Amplitude
However, noise can be easily modeled and measured in the frequency domain.
The noise models in the frequency domain also relate directly to the
component and circuit characteristics. This is the reason noise analyses are
usually done in the frequency domain.
While we cannot obtain a deterministic value for the noise amplitude in the time
domain because it is a random variable, it is quite possible to determine the
power of the noise if the noise is bandwidth limited. In other words, it is true that
the amplitude of a noise signal changes randomly in the time domain. However,
its power, as defined by Equation 42 is a fixed and finite value if and only if the
Equation 42
T2
P = lim T 1 T
2
v t dt Eq. a
–T 2
T2
P = lim T 1 T
2
i t dt Eq. b
–T 2
The power of a signal can also be described in the frequency domain; by
means of a Power Spectral Density (PSD). A PSD identifies the portion of
signal power present as a function of signal frequency. Figure 21 illustrates two
PSD graphs.
Graph A resembles the PSD of a typical data signal in high speed and RF
communication; a signal with a limited bandwidth. It can be seen from the
graph that the composing frequencies of the signal are between DC (0 Hz) and
200 MHz, with the bulk of power being concentrated around 100 MHz.
Graph B shows a signal with a flat power distribution; meaning that the power is
equally distributed across all frequencies. Such a signal is referred to as the
“white noise”. Resistor thermal noise possesses such a PSD.
PSD PSD
¶ ¶
100 MHz 200 MHz
A B
Signal with the bulk of power Signal with power equally
concentrated around 100 MHz distributed across all frequencies
To obtain the total power of a signal within a certain bandwidth, you must
calculate the area under the PSD curve within the given frequency range, as
defined in Equation 43.
Equation 43
f_2
P = f_1 PSD f df
An example of power calculation in the frequency domain for a noise signal is
shown in Figure 22. In this example, the PSD is a flat curve with a value of
5 x 10-20 V2/Hz.
PSD
5 x 10-20
¶
500 MHz 800 MHz
The power of the noise between the frequencies 500 MHz and 800 MHz is
equal to the shaded area under the curve and is given by:
800M
500M 5 10
– 20 – 20 – 11 2
Pn = df = 800M – 500M 5 10 = 1.5 10 V
The root mean square (RMS) value of the noise signal is given by Equation 44.
The RMS value of a signal is defined as the DC value that would render the
same power as the signal in question. For the general sinusoidal signal
Acos(t), the RMS value is A 2 .
The RMS value of a signal is the root of the 1 ohm normalized signal power:
Equation 44
v rms = P
Which means that the RMS voltage value of the noise signal in the above
example is:
– 11
v rms = 1.5 10 = 5.48V
This means that the power of the noise is identical to that of a sinusoidal signal
with a RMS value of 5.48 uV.
*
Figure 23 Noise summation: independent noise signals add in squared values
It might not be evident from the equation for VnTotal in Figure 23 that when there
are several noise sources in a circuit, only reducing the biggest noise
contributors will reduce the total noise significantly. Reducing the smaller
sources, even by large amounts does not have a considerable effect on the
overall noise value because the power of two of the signals magnifies the
dominance of bigger sources over smaller ones.
To clarify this point, consider the case where two noise sources are present,
with RMS values of v1 = 2 uV and v2 = 9 uV. The total noise is given by:
2 2
v nTotal = 2 + 9 = 9.21V
Now if in an attempt to lower the total noise the designer of the circuit cuts the 2
uV source by 50%, the total noise will be:
2 2
v nTotal = 1 + 9 = 9.06V
Now, if instead we cut the 9 uV source by only 10%, the total noise will be:
2 2
v nTotal = 2 + 8.1 = 8.34V
This emphasizes the fact that to reduce the total noise, we should first
concentrate on the strongest source of noise.
Summary
Important points from this section are:
■
Inherent noise is best modeled in the frequency domain by its PSD.
■
The power of noise depends on the bandwidth of the system and is defined
as the area under the PSD curve between two given frequencies.
■
When multiple noise sources are present, the square of their voltage (or
current) values add up to produce the total noise.
■
When multiple sources of noise are present in a circuit, the most effective
way of reducing the total noise is to focus on reducing the most dominant
noise contributor.
Noise Types
The following sections identify and describe three common types of noise in
analog circuits:
■
Thermal Noise
■ Flicker Noise
■
Shot Noise
■
Summary
Thermal Noise
Thermal noise is generated by random movements of electrons in a resistive
conductor. Any circuit element with resistive characteristics, whether a resistor
or the base junction series resistor in a BJT’s small signal model, disseminates
thermal noise. The models for thermal noise voltage source and their
equivalent current source are shown in Figure 24.
R * vn
R in
A B C
Resistor Resistor modeled as a noiseless Resistor modeled as a noiseless
resistor and a series noise voltage resistor and a shunt current source
The voltage and current PSD functions for a resistor thermal noise are:
2 2
V n f = 4kTR v Hz
2 2
I n f = 4kT R A Hz
where:
k is Boltzmann’s constant equal to 1.38 x 10-23.
T is the temperature in Kelvin degrees: 1 °K = °C + 273. For a room
temperature of 25 °C (88 °F), the default temperature setting in HSPICE, T will
be 298 °K.
R is the resistance in ohms.
It should be noted that the two voltage and current PSD models are equivalent,
they both produce the same amount of open circuit voltage or short circuit
current and can be used interchangeably during noise analysis.
Notice that the thermal noise voltage PSD is proportional to the resistance
while the current PSD is inversely proportional to the resistance. By looking at
the PSD models, a general conclusion can be made: the presence of bigger
resistors in a circuit usually translates to a bigger thermal noise voltage.
The PSD models have been explicitly described as functions of frequency to re-
emphasize the fact that the PSD is only meaningful in the frequency domain
context.
The above models suggest that PSDs are flat across all frequencies. This
assumption will no longer be true for frequencies above a few hundred
gigahertz.
Example 1
What will be the RMS voltage value of the thermal noise generated by a 10
kohm resistor operating in the 1- to 1.2-GHz frequency range? Assuming a
room temperature of 25 °C or 298 °K, the PSD function will be (see also
Figure 25):
2 – 23 – 16 2
V n f = 4kTR = 4 1.38 10 298 10K = 1.64 10 V Hz
2
PSD f df = 1.64 10
2 – 16 – 16 –8
v nrms = df = 1.64 10 0.2G = 3.28 10 V
–8
v nrms = 3.28 10 = 181.11V
Power = 3.28x10-8
PSD
* vn = 181.11mv
1.64x10-16
10 KW
A B
Noise Voltage Model PSD Model
Flicker Noise
Flicker noise is the noise generated by the fluctuations in the average current
travel time in a conductor. As electrons take different random paths to get from
one end of a resistor to the other, at any given time, the average current will
experience different resistance along the way, leading to fluctuations in current,
hence the generation of flicker noise. Figure 26 illustrates how electrons can fall
into paths with different lengths while flowing through a resistor.
PSD
HSPICE uses more general models for CMOS flicker noise PSDs. One of the
models used for a CMOS transistor is the SPICE2/Berkeley noise model:
2 A 2 E 2
I n f = K f I f C ox L f f A Hz
where:
Kf is the flicker noise parameter.
Af is the current exponent.
Cox is the Gate oxide capacitance.
L is the effective length of the transistor.
Ef is the frequency exponent.
Another model used by HSPICE for flicker noise calculation is the BSIM model,
which looks very similar to the above equation. It is important to note that you
usually must not be concerned with the value settings of these parameters.
They must be defined and set to proper values in the transistor models defined
in the technology library.
The combined PSD for flicker and thermal noise is shown in Figure 28 on
page 216.
PSD
Thermal noise
floor
Note that the flicker noise is the dominant source of noise at lower frequencies
and as its magnitude shrinks at higher frequencies, the thermal noise will
become the dominant source of noise. Thermal noise is also referred to as “the
noise floor” because that is the minimum possible amount of noise in a circuit.
Shot Noise
Shot noise is only generated by semiconductor elements and is caused by
random passage of electrons and holes across a potential barrier, such as a
P-N junction. Shot noise is often represented by a current PSD, known as the
“Schottky formula”:
2 2
I n f = 2qI A Hz
Where,
q = 1.6 x 10-19 C is the charge of an electron.
I is the bias current of the junction and can be Ic, collector bias currents for a
BJT transistor.
Shot noise PSD curves are flat across all frequencies.
Summary
The three major types of noise in an analog circuit are:
■
Thermal noise, also known as white noise, is generated by the resistors in
the circuit. Thermal noise is a function of conductor resistance.
■
Flicker noise, also called 1/f noise, is mainly generated by transistors in a
circuit. It is a function of the component geometry and its magnitude drops
as frequency increases.
■
Shot noise is caused by bias currents in the base and collector of BJT
transistors.
Thermal noise
voltage
Channel resistance
* V2 (f)
V2 (f)
thermal noise voltage
I2 (f)
R
*
Flicker noise
A voltage B
Resistor and Diode noise model MOS noise model
V2 (f)
I2 (f) * I2 (f)
The noise model for a diode is identical to that of a resistor with a resistance of:
R d = kT qI d
Where,
Rd is the equivalent resistance of the diode.
k is Boltzmann’s constant.
q is the charge of an electron.
Id is the bias current of the diode.
RX Transfer Function
RX is the transfer function from the noise source to the circuit output. Since the
noise sources for built-in devices are all current sources with PSDs (power
spectral densities) in A2/Hz, and the output is usually a voltage (specified in
the .NOISE statements), RX is a transimpedance (V/A).
The total output noise voltage is the integrated output noise. The output noise
at a given frequency is a PSD in V2/Hz. This can be integrated over the
frequency range (using the .AC command) to get a total output noise in V2. If
you take the square root, you get the total output noise in V.
Example
For example (see Example 30 on page 220), take a simple common source
NMOS amplifier to show how HSPICE calculates the output noise. In this
example, the output port element (P2) is used as a pull-up resistor in the circuit.
For the path to the demo file, noise_app_orig.sp, see Applications of
General Interest Examples in HSPICE User Guide: Basic Simulation and
Analysis. The full path to this example is $installdir/demo/hspice/
apps/noise_app_orig.sp.
vdd
.end
The first step in the noise analysis is to set all the signal voltage and current
sources to 0. The equivalent circuit for our example, after setting vdd=0, is
shown in Figure 31.
Output
Rs d
Input
50 s
HSPICE models each resistor, diode, and transistor with its noise model, and
then calculates the output voltage resulting from the noise signal, one element
at a time.
To start with, it replaces Rs with its noise model, as shown in Figure 32, and
calculates the PSD of the noise voltage as seen at the output port. HSPICE
reports an output voltage PSD of 85.4443x10-18 V2/Hz, caused by the thermal
noise model of Rs. The value rx shown is used to obtain the voltage transfer
function from the Rs noise source to the output port:
output_voltage
Voltage Transfer Function = rx = ------------------------------------------------------
element_noise_current
HSPICE uses rx for its internal calculations and you need not pay any particular
attention to it.
2 – 18
V n f = 85.443 10
frequency = 100.0000x hz
Output
50 s
element 0:rs
Vn (f)
total 85.4443a
rx 509.3796
Figure 32 Circuit noise model for Rs and analysis output at 100 MHz
The circuit for calculating the PSD of the output noise generated by the NMOS
is given in Figure 33.
2 – 15
V n f = 3.4691 10
frequency = 100.0000x hz
50 s rs 0.
id 3.4544f
rx 18.4636k
fn 14.7854a
total 3.4691f
The total PSD at 100 MHz will be the sum of all individual PSDs (the square of
noise signals addition):
2 – 18 – 15 – 15 2
V nTotal f = 100MHz = 85.4443 10 + 3.4691 10 = 3.5546 10 V Hz
– 15 –9
V nTotal f = 100MHz = 3.5546 10 = 59.6204 10 V Hz
It is common to represent the total noise generated by a circuit as the
equivalent input noise (otherwise called as the input referred noise). The input
referred noise voltage/current is the voltage/current that, if applied at the input
of the noise-free circuit, would have generated the same output voltage as the
total output noise voltage.
To calculate the equivalent input noise signal, you have to obtain the transfer
function from the input to the output. For the example circuit above, the transfer
function will be:
Output Voltage V out
TF = ------------------------------------- = -----------------
Input Voltage VS
In the case where the input source is a current source instead of a voltage
source, the TF would be the ratio of the output voltage over the input current.
The equivalent input noise voltage (or current in case of the input current
source) is given by:
Total Output Noise Voltage
Input Referred Noise = ------------------------------------------------------------------
TF
The input referred noise is useful to calculate the circuit's “noise figure,” which
is a measure of how much a circuit is generating inherent noise. A large noise
figure indicates a high level of noise generation by the circuit. Noise figure is
defined as:
Noise Figure = 10 log Noise Factor
Where Noise Factor is given by:
Input Referred Inherent Noise Power
Noise Factor = 1 + -----------------------------------------------------------------------------------------
Power of External Noise at the Input
Example 34 on page 223 shows the HSPICE noise analysis summary output
for the above circuit.
2
Vn f = 100MHz
V n f = 100MHz
**** total output noise voltage = 3.5546f sq v/hz
= 59.6204n v/rt hz
TF
V n f = 100MHz TF
transfer function value:
v(out)/vs = 10.1876
equivalent input noise at vs = 5.8523n /rt hz
V rms TF
Summary
To summarize,
■
HSPICE model elements as noiseless elements connected to noise-
generating voltage and current sources.
■
To calculate the total output noise PSD, set all signal and supply sources to
zero. The simulator then replaces, one-by-one, the noise-generating
elements with their equivalent noise models and calculates the noise
voltage PSD at the output caused by the element's noise source (similar to
an .AC analysis). It then repeats the same process for the next noise-
generating element.
■
Once the output noise PSDs are calculated for all elements, HSPICE adds
the PSDs together to obtain the total output noise voltage PSD.
■
The RMS output noise voltage and the input referred noise can be deduced
from the total output noise PSD.
Transient noise analysis shows the effect of noise on the signal magnitude. It is
also useful to see how noise affects the timing of the signal. Transient noise
simulations include statistically accurate noise source contributions from all
devices. The noise source frequency response is adjustable. From the transient
noise analysis results, you can extract and measure phase noise and jitter. This
capability is especially useful in characterizing phase locked loops (PLL). The
two jitter measurements are time interval error (TIE) and autocorrelation
function. TIE measures the time-shift behavior relative to a reference signal.
The autocorrelation function tracks the relative time-shift behavior of the signal.
This chapter describes two approaches:
■ Monte Carlo (default), where HSPICE uses random signal sources to
predict the statistical characteristics of the circuit performance due to device
noise. (See Monte Carlo Noise Analysis on page 229.)
■ Stochastic Differential Equation (SDE), for advanced users, which makes a
direct prediction of the actual statistics of the output waveforms. (See
Stochastic Differential Equation Analysis on page 245.)
HSPICE includes several different algorithms for understanding circuit behavior
based on the noise generated internally by electronic devices and thermal
noise. PHASENOISE analysis computes the effects that noisy elements have
on the output spectrum of oscillators. HBNOISE and SNNOISE analyses
compute the small-signal variations that noise can create under large-signal
steady-state operating conditions (see Multitone Harmonic Balance Noise
(.HBNOISE) or Shooting Newton Noise Analysis (.SNNOISE). Periodic time-
domain noise (PTDNOISE) analysis computes the noise statistics of a periodic
signal, and how those statistics vary with time over the period of the steady-
Equation 45
2 2 -
= -----------
2
R 0 – R
0
2
where represents the time-dependent variance, is the time advance,
and R is the autocorrelation function that relates to the power spectrum of
phase variations as:
Equation 46
1 j
R = ------ S e d
2
–
These special relationships allow the computation of timing jitter from the
results of .phasenoise analysis, since we can assume L f S f and
therefore derive the time-varying noise from the frequency-domain phase noise
simulation solution.
Other measurements of time-dependent or time-varying noise are also
desirable for circuits other than clocks and oscillators, and for situations other
than the steady-state operation. The purpose of such measurements is usually
similar: derive useful information on the time-varying statistical behavior of the
circuit due to its internal noise sources.
Transient noise analysis is a typical .TRAN simulation but with all random noise
sources within the circuit activated as contributing signal sources. The Monte
Carlo noise analysis is a transient noise simulation approach that uses
uncorrelated random signal sources for device noise in such a way that you can
seed all noise signals uniquely. In addition, you can repeatedly, from run-to-run,
predict the statistical characteristics of the circuit performance due to device
noise. You can typically examine the resulting outputs by using histogram plots
to measure their statistical behavior.
Equation 47
2
i n = 4kTG t f
Then you can model in terms of intensity as the random time-domain current
given by:
Equation 48
jn = 2kTG t t
In the case of flicker noise, it is necessary to create the 1/f power spectrum of
flicker noise sources by filtering a t process. You can accomplish this with
the following rational function transfer relationship:
Equation 49
N s + zi
Hs = --------------------
s + pi
-
i =1
Since you can model all flicker sources over the same frequency range (that is,
bandwidth), you can use this same transfer function for all sources. Tests show
that the above fit is very accurate using one pole/zero per octave. This
modeling technique shows reasonable fits using one pole/zero for every two
octaves, or even with one pole/zero per decade. This fitting algorithm is
therefore frequency range-specific, which is why you use the parameters FMAX
and FMIN for specifying frequency ranges for transient noise analysis similar to
the modeling of the frequency-dependent S-element.
The TRANNOISE analysis includes a time-domain noise source for all noise
contributions within all devices. So, for example, if the transistor model in use
includes induced gate noise, so does .TRANNOISE. For example, if you use a
BSIM4 model and the model parameter set includes values for Induced Gate
Noise, then .TRANNOISE includes this noise in the simulation.
Equation 50
f x· x t = 0
Consider this the noiseless system that HSPICE solves for during a normal
transient analysis. You can consider the transient noise analysis aa a similar
analysis where we now inject noise from all device noise models to give the
modified equation:
Equation 51
f x· x t = – j n t
This system reflects the added noise sources and HSPICE solves it in the
same manner as transient analysis. However, if we consider each noise source
related to a white Gaussian noise function, we must create an ensemble of
waveforms for our unknown x(t) vector to predict the output statistics. This type
of simulation involves generating multiple uncorrelated noise source waveforms
for all noise sources, and then running multiple simulations in a Monte Carlo
fashion. This approach is called the Monte Carlo noise simulation. This method
cannot directly measure the statistics of output signals due to input noise (as
with .NOISE), but instead models noise sources as independent time-domain
stimuli. Generating statistical information in this approach requires running a
plurality of simulations over a variety of random noise-source sequences (to
create an ensemble of output waveforms) and then analyzing the statistics of
the ensemble using histograms of other plots. When the system behavior is
ergodic, it is possible to run a single very long duration simulation in order to
capture the statistical variations of the output signal over time (as with an eye-
diagram). Monte Carlo modeling of the noise sources uses a sum of sinusoids
with random phases [2], or random number generators with the appropriate
statistical distributions [3]. An advantage of the Monte Carlo approach is its
ability to capture very nonlinear noise behaviors. This is useful, for example,
when you know that the responses of circuits with noise have non-Gaussian
variations about their noiseless simulations.
For example:
.TRAN 10p 8u SWEEP MONTE=20 FIRSTRUN=2
* gives 20 Monte Carlo samples from 2-21
* no .trannoise
This method uses the standard SWEEP MONTE keywords to activate Monte
Carlo parameter sampling for GAUSS, AGAUSS, UNIF, and AUNIF defined
parameters. For this analysis, the transient noise is not included. The result of
the simulation is an ensemble of output waveforms that reflect no noise, but
only the traditional Monte Carlo parameter variations.
When setting the noise bandwidth, FMIN is used to set the low-frequency flicker
noise limits and FMAX is used to set the maximum noise-source waveform
bandwidth and ensure Nyquist sampling. The seed values can be reset to re-
run simulations with uniquely different noise waveforms. The output waveforms
can be post-processed to measure the resulting noise effects.
For this analysis, traditional Monte Carlo parameter sampling is disabled and
only the nominal values are used for GAUSS, AGAUSS, UNIF, and AUNIF
defined parameters during the simulation.
The transient noise METHOD=MC keyword will inject random noise waveforms
for all noise sources present in the circuit, including SPICE models. The result
of the simulation is an ensemble of output waveforms that reflect the random
noise waveform injections. Each noise seed sample will have a unique
waveform. This approach is useful for characterizing statistics at specific time
events and the waveforms can be post-processed as a histogram.
The Monte Carlo seeds are set in the transient analysis setting and the same
seed values are shared as the noise seeds in the transient noise analysis. The
traditional Monte Carlo parameter sampling is used for random values from the
GAUSS, AGAUSS, UNIF, and AUNIF defined parameters. The transient noise
METHOD=MC keyword will inject random noise waveforms for all noise sources
present in the circuit, including SPICE models. The simulation result is an
ensemble of output waveforms that reflect both the traditional Monte Carlo
parameter variations and the random noise waveform injections from transient
noise analysis.
The following example generates 20 Monte Carlo noise simulations that starts
with the seed value (that is, index) of 31 for the first simulation.
.TRANNOISE v(out) SAMPLES=20 SEED=31
The following example generates a single noise simulation, with a seed value of
50, and amplifies all noise sources by a factor of 10.
.TRANNOISE v(out) SEED=50 SCALE=10.0
The following example generates six Monte Carlo transient noise simulations
with seed values of 1, 3, 4, 5, 9, and 10. Normalized autocorrelation is
computed for each v(out) output.
.TRANNOISE v(out) SAMPLES=LIST(1,3:5,9:10) AUTOCORRELATION=2
Controlling Noise
Substantial performance improvements can be obtained by removing noise
from the non-critical circuit blocks. It can also be useful to disable various noise
contributors to isolate and identify the dominant circuit noise effects. Transient
noise analysis allows you to ignore noise contributions at the subcircuit level.
To ignore the noise contribution, add the NOISE=0 parameter to any subcircuit
instance specified by an X-element. NOISE=0 is treated as a hierarchical
parameter, causing noise to be disabled down through the subcircuit's
hierarchy.
By default, all noise sources are activated at time=0 in transient analysis.
Using the START keyword in the .TRANNOISE command allows the noise
sources to be activated at a specified time.
For example:
.TRAN 10p 10u
.TRANNOISE v(out)
+ fmin=1k fmax=1e8
+ start=2u $ enable noise sources at 2uS
The following clock buffer example circuit uses a single run Monte Carlo
transient noise analysis. Post-processing is performed using WaveView.
The noise bandwidth is set by FMAX and the SCALE factor is used to scale
the noise sources in the circuit.
■
A pulse source to define the input clock source. The pulse source will also
be used as the ideal reference source for comparison with the noisy buffer
output signals.
Vsrc ref gnd DC 0 PULSE (0.0 'vdd'
+ '0.975*period' '0.05*period' '0.05*period'
+ '0.45*period' 'period')
■
A .PROBE command for plotting the output signals:
.probe tran v(ref) v(outa) v(outb14) v(outb26)
Figure 35 WaveView: Jitter vs. Time measurement to get Timing Interval Error
(TIE) Jitter vs. Time. Measurement based on the reference signal
5. To get the jitter spectrum, click on the FFT/DFT icon in the toolbar. In the
FFT/DFT Parameters window, set the # of points to 1024. Deselect
Sampling Rate. The box next to Stop will now be checked. Enter 260n for
Stop. Select Spectrum Panel for Display Type and click OK. The FFT of
the jitter will be displayed in a new WaveView window.
6. Change the Y-axis to dB10 by right clicking the Y-axis and selecting Plot
Complex > dB10(mag) from the menu.
7. Change the spectrum to lines by right clicking inside the WaveView window
and selecting Configure Spectrum from the menu. In the Spectrum
Settings window, select Draw Lines and click OK. The jitter spectrum looks
similar to the following figure:
Figure 36 FFT of the TIE Jitter samples show the Jitter Spectrum
R = f t f t + dt
–
The example netlist used to illustrate the measurement of TIE jitter can also be
used to illustrate the use of the autocorrelation function. To activate the
autocorrelation calculation for output terminals, the transient noise analysis
statement is:
.trannoise v(outb26) FMAX=20G SCALE=10 autocorrelation=1
This method does not require calibration of the phase detector gain (K) and is
immune to DC offsets, AM noise, and delay values. The phase detector method
is better for measuring the phase noise of PLL circuits.
Jitter Output
The timing jitter calculations are derived from the results of phase noise
analysis. The phase noise output syntax supports the JITTER keyword as an
output keyword in addition to the PHNOISE keyword.
.PRINT TRANNOISE PHNOISE JITTER
.PROBE TRANNOISE PHNOISE JITTER
When jitter is extracted in addition to phase noise from transient noise analysis
and the JITTER keyword is present in the print and probe statements, the
.TRANNOISE analysis also outputs the raw jitter data to the *.trjt0 file when
.OPTION POST is set and .PROBE statements are used. The raw jitter data is
output to the *.printtrjt0 file when .PRINT statements are used. The jitter
data is the TIE timing jitter (Accumulated Jitter) and is a function of time in units
of seconds.
For a discussion on the different jitter measurements available in HSPICE, see
Jitter Definitions on page 114.
Recommendations
The following recommendations should be followed to get the best phase noise
and jitter results from transient noise analysis.
When simulating a PLL, it is important to know when the PLL has reached the
steady-state. It is recommended that the START parameter in the transient
noise command is used to activate noise calculations, at a time after the
transient analysis has reached steady-state and after the PLL loop dynamics
have stabilized. This will speed up the simulation and prevent errors in
measuring phase noise and jitter caused by a PLL that has not yet stabilized to
its steady-state output frequency.
It is important to know the PLL or VCO output frequency since a SIN or PULSE
source that operates at the PLL or VCO output frequency is used as a
reference source for the phase noise and jitter calculations.
To get the low offset frequency phase noise response, a large TSTOP value in
the transient noise command is required. The recommended TSTOP value is
given as:
TSTOP Smoothing / lowest_frequency
Let the time-domain signal resulting from an analysis with signal and noise for
s+n
the same output node be written as v out t .
s
We can define the noise voltage component v out t to be:
Equation 52
n s+n s
v out t = v out t – v out t
We can define a variance equal to the expected value of this noise component
at a given time to be:
Equation 53
2 n n
n t = vout t vout t
If we assume that the noise variations are small, we can create a linear
Stochastic Differential Equation (SDE) for the noise contribution vector x n t
n
(one entry in the vector being the output noise v out t ). This SDE may be
formulated in terms of time-varying coefficient matrices that are evaluated for a
normal transient analysis, which are functions of the noise-free solution vector
x s t and derived from the noise-free transient analysis computations [1]:
Equation 54
A t x n + C t x·n + B t v 0
x n 0 = x n0
We can then create and solve a linear ordinary differential equation (ODE)
T
system for the time-varying noise correlation matrix K t = x n t x n t :
Equation 55
· T
K t = E t K t + F t F t
where E t and F t are derived from A t , B t , and C t , and T indicates
the transpose operation.
In general, simultaneously solving for both the deterministic and stochastic
differential equations can give us the complete time-dependent output signal
waveform vector x s t , as well as the complete time-varying noise correlation/
T
covariance matrix K t = x n t x n t . The entries in this matrix represent time-
2 n
dependent variance values n t for output signals v out t . This output can
be interpreted and plotted as a time-varying RMS noise voltage waveforms for
n 2
v RMS t = n t . The results of such a transient + noise analysis include the
usual deterministic transient analysis waveforms, including the mean voltage
s
output v out t and also its (stochastic) time-varying RMS noise component
n
v RMS t . In this sense, the SDE analysis method provides typical SPICE
output waveforms for circuit unknowns, plus the additional waveform
representing the time-varying statistics of the circuit. The .TRANNOISE SDE
method therefore activates this special analysis and makes this output
available to the user.
Stochastic Differential Equation (SDE) dynamic noise statistics are computed
in the form of a time-varying covariance matrix. SDE techniques allow the
output of a variance waveform for any output signal. Variance waveforms can
be used to construct probability density plots.
The SDE approach gives probability density information and, like the multi-run
Monte Carlo approach, is useful for characterizing statistics at specific time
events.
The following topics are discussed in these sections:
■
SDE Output Data
■
SDE Examples
■
The ONOISE and ONOISE(M) outputs are the same. They represent noise
voltage or current at the node or branch specified by the output keyword.
The ONOISE represents the RMS noise voltage component (square root of
the variance), units in Volts, of the noise at the specified output present in
addition to the noise-less transient voltage.
Note: ONOISE is only output when you use the SDE method; when
using the Monte Carlo method, ONOISE is 0.
■
VRMS: The output of RMS noise voltages at other nodes (that is, the output
for general nodal noise voltage values).
The actual instantaneous output voltage is the sum of the signal plus noise
components:
Equation 56
s+n s n
v out t = v out t + v out t
n
Where the noise component v out t has an assumed Gaussian distribution (in
x ) as:
2
–x
---------2
1 2
-------------- e
2
s
And the output signal v out t is that resulting from the (deterministic) .TRAN
analysis. The time-varying RMS noise voltage waveforms (for onoise) are
n 2
related to the variance at the specified outputs as given by v RMS t = n t
2 n n
where: n t = v out t v out t .
SDE Examples
Example 1. SDE method with maximum frequency of 5GHz.
.TRANNOISE v(7) METHOD=SDE FMAX=5g
Example 2. Activates SDE noise analysis and dumps the ONOISE output to the
*.tr0 file:
.TRANNOISE v(out) METHOD SDE
.PROBE TRANNOISE ONOISE
Example 3. Activates SDE noise analysis placing a lower bound on flicker noise
to be 10kHz and an upper bound on all noise power at 100MHz:
.TRANNOISE v(out) METHOD=SDE FMIN=10k FMAX=100MEG
Note: Invalid values for FMIN and FMAX will be ignored and default
values will be used.
The SDE solving can be substantially slower than transient analysis. Status
reporting includes the progress of the noise analysis.
References
[1] A. Demir, E.W.Y. Liu, A.L. Sangiovanni-Vincentelli, “Time-domain non-
Monte Carlo noise simulation for nonlinear dynamic circuits with arbitrary
excitations,” IEEE Trans. CAD, vol. 15, no. 5. May 1996.
[2] P. Bolcato and R. Poujois, “A new approach for noise simulation in transient
analysis”, Proc. IEEE Int. Symp. Circuits Syst., pp. 887-890, May 1992.
[3] J. A. McNeill, “Jitter in ring oscillators,” Ph.D. dissertation, Boston University,
1994.
[4] M. Okumura and H. Tanimoto, “A time-domain method for numerical noise
analysis of oscillators”, Proc. IEEE Asia Pacific Design Automation
Conference, 1997.
[5] A. van der Ziel, Noise in Solid State Devices and Circuits, John Wiley &
Sons, 1986.
[6] A. Hajimiri, S. Limotyrakis, and T.H. Lee, “Jitter and phase noise in ring
oscillators,” IEEE J. Solid-State Circuits, vol. 34, no. 6, pp. 790-804, June
1999.
[7] P.P. Vaidyanathan, "Ramanujan sums in the context of signal processing",
IEEE Trans. Signal Processing, vol. 62, no. 16, August 15, 2014.
(.PTDNOISE)
Circuits driven by large periodic signals produce cyclostationary noise, that is,
the noise characteristics are periodic in time. Cyclostationary noise can be
characterized in several ways, with the particular application determining which
is appropriate.[1] The time-average power spectral density (PSD) ignores
frequency correlations in the noise, but is adequate when the fundamental
frequency of the cyclostationary noise is much larger than the bandwidth of
interest. The time-average PSD is calculated in the HBNOISE/SNNOISE
analyses. [2]
The harmonic power spectral density (HPSD) or equivalently, the auto-
correlation function, R(t1,t2), contains the correlation information between
noise sidebands. This information is necessary to build behavioral
cyclostationary noise sources and to separate the amplitude modulation (AM)
and the phase modulation (PM) noise components. (See Amplitude
Modulation/Phase Modulation Separation for more information.)
The time-dependent power spectral density (TDPSD) can be integrated over
frequency to yield the time-dependent noise (TDN). TDN can then be used to
determine the jitter associated with a noisy signal crossing a threshold.
PTDNOISE analysis allows the calculation of TDPSD, TDN, and jitter. In
addition, you can calculate both the time-domain power spectral density
(TDSN) and the integrated noise (time-dependent noise, TDN) at multiple time
points.
By measuring the jitter associated with a noisy signal crossing a threshold, the
jitter is modeled by displacing the time in a noise free signal v(t) with a
stochastic process j(t).
Equation 57
V jitter t = v t + j t
We can also determine the voltage at this node including the time-dependent
noise n(t):
Equation 58
Vn t = v t + n t
By equating these two representations, expanding in a Taylor series, and
dropping higher order terms, as follows:
Equation 59
V t + n t = v t + j t = v t + dv t dt j t +
Equation 60
N t = dv t dt j t
In terms of variances, jitter is then defined as:
Equation 61
2 2
Var j t = n t dv t dt
Parameter Description
output Is an output node, pair of nodes, or 2-terminal elements. HSPICE advanced analog analyses
references the equivalent noise output to this node (or pair of nodes). Specify a pair of nodes
as V(n+,n-); only one node as V(n+, n-). If you specify only one node, V(n+), then HSPICE
advanced analog analyses assumes the second node is ground. You can also specify a 2-
terminal element name that refers to an existing element in the netlist.
TIME Time point at which time domain noise is evaluated. Specify either a time point explicitly, such
as: TIME=value, where value is either numerical or a parameter name or a .MEASURE name
associated with a time domain .MEASURE command located in the netlist. PTDNOISE uses
the time point generated from the .MEASURE command to evaluate the noise characteristics.
This is useful if you want to evaluate noise or jitter when a signal reaches some threshold value.
TDELTA A time value used to determine the slew rate of the time-domain output signal. Specified as
TDELTA=value. The signal slew rate is then determined by the output signal at TIME +/-
TDELTA and dividing this difference by 2 x TDELTA. This slew rate is then used in the calculation
of the strobed jitter. If this term is omitted a default value of 0.01 x the .SN period is assumed.
frequency_sweep Frequency sweep range for the output noise spectrum. The upper and lower limits also specify
the integral range in calculating the integrated noise value. Specify LIN,DEC, OCT, POI,
SWEEPBLOCK, DATA sweeps. Specify the nsteps, start, and stop frequencies using the
following syntax for each type of sweep:
■ LIN nsteps start stop
■
DECnsteps start stop
■ OCT nsteps start stop
■
POI nsteps freq_values
■ SWEEPBLOCK=swblockname
■
DATA dataname
Parameter Description
listfreq Prints the element noise value to the .lis file. This information is only printed if a noise
spectrum is requested in a PRINT or PROBE statement. (See PTDNOISE Output Syntax and
File Format.) You can specify which frequencies the element noise is printed. The frequencies
must match the sweep_frequency values defined in the frequency_sweep, otherwise they are
ignored.
In the element noise output, the elements that contribute the largest noise are printed first. The
frequency values can be specified with the NONE or ALL keyword, which either prints no
frequencies or every frequency defined in frequency_sweep. Frequency values must be
enclosed in parentheses. For example:
■
listfreq=(none)
■ listfreq=(all)
■
listfreq=(1.0)
■ listfreq=(1.0G, 2.0G)
The default value is NONE.
listcount Prints the element noise value to the .lis file, which is sorted from the largest to smallest
value. You do not need to print every noise element; instead, you can define listcount to print
the number of element noise frequencies. For example, listcount=5 means that only the top
5 noise contributors are printed. The default value is 1.
listfloor Prints the element noise value to the .lis file and defines a minimum meaningful noise value
(in V/Hz1/2 units). Only those elements with noise values larger than listfloor are printed.
The default value is 1.0e-14 V/Hz1/2.
listsources Prints the element noise value to the .lis file when the element has multiple noise sources,
such as a MOSFET, which contains the thermal, shot, and 1/f noise sources. You can specify
either ON or OFF: ON prints the contribution from each noise source and OFF does not. The
default value is OFF.
File Description
*.printptn# Writes output from the .PRINT statement when using HB to obtain the steady state
solution
*.ptn# Writes output from the .PROBE statement when using HB to obtain the steady state
solution
*.printsnptn# Reports output from the .PRINT statement when using SN to obtain the steady state
solution.
*.snptn# Writes output from the .PROBE statement when using SN to obtain the steady state
solution.
Noise source contributions are listed sequentially and are controlled by the
PTDNOISE command line parameters: listtime, listfreq, listcount, listfloor, and
listsources.
slewrate v/sec Output signal slewrate at the time point specified by TIME=val.
jitter sec Calculated from the noise voltage (integrated over the frequency range
specified by frequency_range), divided by the slew rate at the same
node(s), at the time point specified by TIME=val.
File Description
*.msnptn# Contains output from the .MEASURE statement when using .SN to obtain the steady
state solution.
Usage Example
The following test case illustrates the PTDNOISE analysis for a simple inverter.
* Simple RC + Inverter - rcInvPTDNoise.sp
* rrd Jan 03, 2007
* Simulates PSD(t,f) of a simple inverter
* sweep time points
.param f0 = 5.0e8
.sn tones=f0 nharms=4 trinit=10n
.PTDNOISE v(out1) TIME=lin 3 0 2n TDELTA=.1n dec 5 1e5 1e10
+ listfreq=(1e6,1e8)
+ listcount=1
+ listsources=ON
.opt post
.probe ptdnoise onoise
.print ptdnoise onoise
.probe sn v(out1)
vd vdd 0 3.0
.global vdd
vgate in0 0 COS(1.5 1.4 'f0' 0 0 0)
rin in0 in1 50
rout out1 0 .1g
.MODEL N NMOS
+Level= 49 Tnom=27.0 version =3.1 TLEVC= 1
*
***
.MODEL P PMOS
+Level= 49 Tnom=27.0 version =3.1 TLEVC= 1
.end
References
[1] J. Roychowdhury, D. Long, and P. Feldmann, “Cyclostationary Noise
Analysis of Large RF Circuits with Multitone Excitations,” IEEE Journal of
Solid-State Circuits, volume 33, pages 324–336, March 1998.
[2] A. Demir, A. Sangiovanni-Vincentelli, “Analysis and Simulation of Noise in
Nonlinear Electronic Circuits and Systems”, Kluwer Academic, 1998.
Full Optimization
Transistor Behavioral
Subcircuit Subcircuit
Signal Mode
Circuit Representation
Controlled Sources
Controlled sources model both analog and digital circuits, at the behavioral
level. This reduces simulation times for mixed signals and models system-level
operations. Controlled sources also model gate-switching action for the
behavioral modeling of digital circuits. For analog behavioral modeling, you can
program the controlled sources as mathematical functions. These functions
can be either linear or non-linear, depending on other nodal voltages and
branch currents.
Libraries
The Discrete Device Library contains standard industry IC components. You
can use this library to model board-level designs that contain any of the
following:
■ Transistors
■
Diodes
■
Opamps
■
Comparators
■
Converters
■
IC pins
■
Printed circuit board traces
■
Coaxial cables
You can also model drivers and receivers, to analyze transmission line effects,
power line noise, and signal line noise.
Behavioral D-Latch
This example uses one input NAND gate and NPWL/PPWL functions, to model a
D flip-flop.
QB
CLK
A Q
DATA CLKN
CLKN
RX
CLK
D – LATCH
Figure 40 D-Latch
Example
This example is located in the following directory:
$installdir/demo/hspice/behave/dlatch.sp
The file contains the following examples:
■
Waveforms
■
Subcircuit definitions for Behavioral N-Channel MOSFET
■
Behavioral P-Channel MOSFET
D-Latch
Clck
Clock R1
Q W2 Q
D Clock
D Q
W1
D-Latch QB
Clock R2
Clckn Q W3
Clock
D Q
Q3
vdd
OUT
D
V+
IN OUT
Delay
V-
Figure 45 Inverter
Subcircuit Definition
.subckt inv in out v+ v-
cout+ out_l v+ 2p
cout- out_l v- 2p
xmp out_l inx v+ pmos
xmn out_l inx v- nmos
e inx v- delay in v- td=1n
din v- in dx
.model dx d cjo=2pf
chi in v+ .5pf
.ends inv
■
RN is calculated as Vout/I(mn), where mn is the pulldown transistor.
■
RP is calculated as (VCC-Vout)/I(mp), where mp is the pullup transfer
function.
The actual calculation uses a more accurate method to obtain the series
resistance of the transistor, as in Figure 46.
RS RS = 1/LV17(mn)
(vd-vs) = LX3(mn)
Vsx Ids = LX4(mn)
5.0 INV.VCB.TOB
OUT
4.0
Volt [Lin]
3.0
2.0
1.0
9.9e-1
9.0e-1 INV.VCB.TOB
1.0e-1 RB
1.0e-1
Volt [Lin]
RB
110.4
10.4
1.4
110.4X
10.0X
1.4X
110.4K
10.0K
1.0K
500.0 0 1.0 2.0 3.0 4.0 5.0
Volts [Lin]
VCC
in out
in out
Gd
Cin Rin Et 1K Rout Cout
In this example, HSPICE uses the LEVEL 3 MOSFET model to simulate the
CMOS inverter.
1. To obtain the input and output resistances, HSPICE performs a .TF transfer
function analysis (.TF V(out) Vin).
2. To obtain the transfer function table of the inverter, HSPICE performs the DC
analysis and sweeps the input voltage (.DC Vin 0 5 .1).
3. HSPICE uses this table, in the PWL element, to represent the transfer
function of the inverter.
4. A voltage-controlled PWL capacitance adjusts the rise and fall time of the
inverter, in the equivalent circuit, across the output resistance.
5. The delay element obtains the propagation delay across the output RC
circuit.
6. HSPICE uses the inverter in a ring oscillator, to adjust the input capacitance.
7. HSPICE uses optimization analysis for all adjustments in this example. The
data file and the results are shown.
Example
This example is located in the following directory:
$installdir/demo/hspice/behave/invb_op.sp
Ri Ci
Vin Vout
Egain
+ - +
- out1 -
•
+
Figure 51 Integrator
Example
This example is located in the following directory:
$installdir/demo/hspice/behave/integ.sp
The integ.sp file also contains the following sections:
■
Control and options
■
Subcircuit definition
■
Circuit
The following sections discuss these topics:
■
Behavioral Differentiator
■
Behavioral Amplitude Modulator
■
Behavioral Data Sampler
Behavioral Differentiator
HSPICE uses an ideal op-amp to model a differentiator and a VCVS to adjust
the magnitude and polarity of the output. The following equation calculates the
differentiator response:
Cd
Rd R
Vin Vout
Egain
+ - + C
- out1 -
•
+
Figure 53 Differentiator
Example
This example is located in the following directory:
$installdir/demo/hspice/behave/diff.sp
in-
rin- I(g) = F(Vin+ - Vin-)
e = V(out1)
eo = V(out2)
V(out) = F ( I(h) )
Example
This example is located in the following directory:
$installdir/demo/hspice/behave/op_amp.sp
The op_amp.sp file also contains the following sections:
■
Main Circuit
■
RC Circuit With Pole At 9 MHz
■
Output Limiter to 15 V
Vout
Vout
a
Vohigh
Vin +- + Ecomp
-
-2u 1u
b Volow Vab
Rf
Rb Cb
Open loop characteristic of
comparator Ecomp
Two reference voltages correspond to the volow and vohigh voltages of Ecomp:
Volow Rb Vohigh Rb
Vreflow = ---------------------------- Vrefhigh = ------------------------------
Rb + Rf Rb + Rf
When Vin exceeds Vrefhigh, the Vout output changes to Volow. For Vin values
less than Vreflow, the output changes to Vohigh.
An example is located in the following directory:
$installdir/demo/hspice/behave/compar.sp
1.0 COHPAE.TRO
Volt [Lin] VIN
0 VOUT
-1.0
0 500.0 1.00 1.90 2.00
Time [Lin]
-2.0 COHPAE.TRO
Volt [Lin]
VOUT
VOUT
.end
LC Oscillator
The initial capacitor charge is 5 V. The value of the capacitance is the function
of voltage at node 10. The capacitance value becomes four times higher at the
t2 time. The following equation calculates the frequency of this LC circuit:
1
freq = -------------------------------
6.28 L C
At the t2 time, the frequency must be halved. The amplitude of oscillation
depends on the condition of the circuit when the capacitance value changes.
The stored energy is:
2 2
E = 0.5 C V + 0.5 L I
2 2
E = 0.5 C Vm I = 0 E = 0.5 L Im V = 0
At the t2 time, when V=0, if C changes to A C, then:
2 2 2
0.5 L Im = 0.5 Vm = 0.5 A C Vm
Qm = A Vm
The second condition that HSPICE considers is when V=Vin, if C changes to A
C, then:
Qm = Qm
C Vm = A C Vm
Vm
Vm = --------
A
Therefore, HSPICE modifies the voltage amplitude between Vm/sqrt(A) and
Vm/A, depending on the circuit condition when the circuit switches. This
example tests the CTYPE=0 and 1 results. The result for CTYPE=1 must be
correct because capacitance is a function of voltage at node 10, not a function
of the voltage across the capacitor itself.
Example
This example is based on demonstration netlist calg2.sp which is available in
the $installdir/demo/hspice/behave directory.
* in this example the ctype 0 and 1 is tested. the result for
* ctype=1 must be correct because capacitance is function of
* voltage at node 10, not voltage across itself.
*
.option post
.ic v(1)=5 v(2)=5
c1 1 0 c='1e-9*v(10)' ctype=1
l1 1 0 1m
*
c2 2 0 c='1e-9*v(10)' ctype=0
l2 2 0 1m
*
v10 10 0 pwl(0sec,1v t1,1v t2,4v)
r10 10 0 1
COLOR.TOP
4.0 VCL
Volt [Lin]
2.0
-2.0
-4.0
10.0 COLOR.TOP
Q1
5.0
Volt [Lin]
-5.0
COLOR.TOP
4.0
VC2
Volt [Lin]
2.0
-2.0
-4.0
40.0
COLOR.TOP
Q2
30.0
Volt [Lin]
20.0
10.0
-10.0
0 10.0 20.0 30.0 40.0 50.0 60.0
Time [Lin]
HR
R U1
Q1
H4
Q2
Q3
Q4
Y D1
NY
V2
YN
D2
Example
An example is located in the following directory:
$installdir/demo/hspice/behave/pdb.sp
OutB Rloop
Signal Out In
The PLL can be implemented using behavioral elements (Figure 67) or using
bipolar transistors (Figure 68 on page 296 and Figure 69 on page 297).
The netlist for the behavioral PLL is in the pll_bvp.sp file and the netlist for
the full bipolar PLL is in the pll.sp file. The netlist for the full bipolar PLL
contains the loop filter and the output circuit. Both these netlist files are
available in the directory: $installdir/demo/hspice/behave.
The PLL transfer function shows a linear region of voltage vs. (periodic) time
which is defined as the “lock” range.
The results of transient simulations (Figure 68) show minimal difference
between implementations. However, run time statistics show that the behavioral
model reduces the simulation time, to one-third that of the full circuit.
If you use this PLL in a larger system simulation (for example, an AM tracking
system), include the behavioral model. This model substantially reduces the
simulation run time and still accurately represents the subcircuit.
VCC
1K
625
Out
In 300
In2 VEE
.5mA
300
In2B
OutB
625
InB
1K
References
[1] Chua & Lin. Computer Aided Analysis of Electronic Circuits. Englewood
Cliffs: Prentice-Hall, 1975, page 117. See also “SPICE2 Application Notes
for Dependent Sources,” by Bert Epler, IEEE Circuits & Devices Magazine,
September 1987.
Networks
When you apply Kirchhoff’s laws to circuits that contain energy storage
elements, the result is simultaneous differential equations in the time domain. A
simulator must solve these equations, to analyze the circuit’s behavior. Solving
any equation that is higher than the first order can be difficult and classical
methods cannot easily solve some driving functions.
In both cases, to simplify the solution, you can use Laplace transforms. These
transforms convert time domain equations, containing integral and differential
terms, into algebraic equations in the frequency domain.
HSPICE ships numerous examples for your use; see Filters Examples in
HSPICE User Guide: Basic Simulation and Analysis for paths to the demo files.
The following sections discuss these topics:
■
Transient Modeling
■
Using G- and E-elements
■ Laplace and Pole-Zero Modeling
■
Modeling Switched Capacitor Filters
■
References
Transient Modeling
The Laplace transform method provides an easy way to relate a circuit’s
behavior in time and frequency-domains. This facilitates simultaneous work in
those domains.
The algorithm that the HSPICE simulator uses for Laplace and pole/zero
transient modeling, offers better performance than the Fast Fourier Transform
(FFT) algorithm. To invoke Laplace and pole/zero transient modeling, use a
LAPLACE or POLE function call in a source element statement.
Laplace transfer functions are especially useful in top-down system design,
when you use ideal transfer functions instead of detailed circuit designs. In
HSPICE, you can also mix Laplace transfer functions with transistors and
passive components. Using this capability, you can model a system as the sum
of the contributing ideal transfer functions. You can then progressively replace
these functions with detailed circuit models, as they become available.
Conventional uses of Laplace transfer functions include control systems and
behavioral models that contain non-linear elements.
Laplace transforms reduce the time needed to design and simulate large
interconnect systems such as clock distribution networks. You can use the
asymptotic waveform evaluation (AWE) and other methods, to create a Laplace
transfer function model. The AWE model can use only a few poles to represent
the large circuit. You can input these poles through a Laplace transform model,
to closely approximate the delay and overshoot characteristics of many
networks, within a fraction of the original simulation time.
You can use pole/zero analysis to help determine the stability of the design.
You can use the POLE function in HSPICE when the poles and zeros of the
circuit are specified, or you can use the .PZ statement (see .PZ in HSPICE
Reference Manual: Commands and Control Options) to derive the poles and
zeros from the transfer function.
Frequency response is an important analog circuit property. It is normally the
ratio of two complex polynomials (functions of complex frequencies), with
positive real coefficients. The form of frequency response can be either the
locations of poles and zeros, or a frequency table.
The usual way to design complex circuits is to interconnect smaller functional
blocks of known frequency responses, either in the pole/zero or the frequency
table form. For example, to design a band-reject filter, you can interconnect a
low-pass filter, a high-pass filter, and an adder. Study the function of the
complex circuit in terms of its component blocks, before you design the actual
circuit. After you test the functionality of the component blocks, you can use
these blocks as a reference in optimization techniques, to determine the value
of the complex element.
y t = x ht – d
–
y k = x m h k – m , k = 0, 1, 2, ...
m=0
where you can obtain h(t) from H(f), using the inverse Fourier integral:
h t = H f e j2ft df
–
where N is the number of equally-spaced time points and is the time interval
or time resolution.
For the frequency response table form (FREQ) of the LAPLACE function,
HSPICE uses a performance-enhanced algorithm, to convert H(f) to h(t). This
algorithm requires N to be a power of 2. The following equation determines the
fn frequency point:
n
f n = ------------ , n = 0, 1, 2, ..., N-1
N
where n > N/2 represents the negative frequencies. The following equation
determines the Nyquist critical frequency:
1
f c = f N/2 = -----------
2
Because the negative frequency responses are the image of the positive
responses, you need to specify only N/2 frequency points, to evaluate N time
points of h(t). The larger the value of fc, the more accurate the transient
analysis results. However, for large fc values, the becomes smaller and the
computation time increases.
The maximum frequency of interest depends on the functionality of the linear
network. For example, in a low-pass filter, you can set fc to the frequency at
which the response drops by 60 dB (a factor of 1000).
H max
H f c = ---------------
1000
After you select or calculate fc, the following equation can determine :
1
= -----------
2 fc
The following equation calculates the frequency resolution:
1
f = f 1 = ------------
N
which is inversely proportional to the maximum time (N.), over which HSPICE
evaluates h(t). Therefore, the transient analysis accuracy also depends on the
frequency resolution, or the number of points (N).
You can specify the frequency resolution (DELF) and the maximum frequency
(MAXF) in the G- or E-element statement. To calculate N, HSPICE uses 2
MAXF/DELF. Next, HSPICE modifies N as a power of 2. The effective DELF is 2
MAXF/N, to reflect the changes in N.
Low-Pass
Input Output
S
High-Pass
Example
This example is located in the following directory:
$installdir/demo/hspice/filters/BandstopL.sp
The BandstopL.sp file also contains a sample band-reject filter circuit.
1.0H BOWSTOP.0
VPIOUT
800.0H
600.0H
400.0H
200.0H
Volt [Lin]
0
180.0 BOWSTOP.0
VPIOUT
100.0
-100.0
1.0 BOWSTOP.0
VCIN
800.0H
VCOUT
600.0H
400.0H
200.0H
Volt [Lin]
-200.0H
-400.0H
-600.0H
-800.0H
-1.0
0 2.0H 4.0H 6.0H 8.0H 10.0H 12.0H
Time [Lin]
3.546F -
1 1
+ Out
In 1
1.392F 0.2024F
The third-order Butterworth transfer function that describes the above circuit is:
1.0
H s = ----------------------------------------------------------------------------------------------------------------------------------------------------
1.0 s + 1 s + 0.5 + j2 0.1379 s + 0.5 – j2 0.1379
The following example is the input listing for the above filter. Parameters set the
pole locations for the G-element. Also, this listing specifies only one of the
complex poles. The program derives the conjugate pole. The output of the
circuit is the out node and the output of the functional element is outg.
Example
An example of a third-order low-pass Butterworth filter is located in the
following directory:
$installdir/demo/hspice/filters/Low_Pass.sp
The Low_Pass.sp file also contains a sample circuit description.
0 LOW_POSE.TOB
PDBOUT
-20.0
PDBOUT
-40.0
-60.0
-80.0
Volt [Lin]
-100.0
-120.0 LOW_POSE.TOB
PDBOUT
-130.0
PDBOUT
-100.0
1.20 LOW_POSE.TOB
VCOUT
1.0 VCOUT
800.0H
Volt [Lin]
600.0H
400.0H
200.0H
-200.0H
0 50.0 100.0 150.0 200.0
Time [Lin]
Notes
■
V(ctrl): control voltage input.
■
V(expected): node. Represents an ideal 30-degree shifted wave for the
input.
■
V(test): output of the G Element.
****
.tran 0.1n 300n
.OPTION post ingold=2 accurate
Vctrl ctrl gnd sin (0 1 10e6)
Gtest gnd test freq ctrl gnd
+ 1.0e00 0 30
+ 1.0e01 0 30
+ 1.0e02 0 30
+ 1.0e03 0 30
+ 1.0e04 0 30
+ 1.0e05 0 30
+ 1.0e06 0 30
+ 1.0e07 0 30
+ 1.0e08 0 30
+ 1.0e09 0 30
+ 1.0e10 0 30
+ MAXF=1.0e9 DELF=10e6
Rtest test gnd 1
Iexpected gnd 3 sin (0 1 10e6 0 0 30)
Vmes 3 expected 0v
Rexpected expected gnd 1
.end
1.50
1.00
0.50 Test
0 30.tro
0 ctrl
expected
-0.50
-1.00
-1.50
0 60.00 0.12 0.18 0.24 0.30
Time [S]
■
s is the complex frequency, j2f.
■
Y(s) is the Laplace transform of the output signal.
■
X(s) is the Laplace transform of the input signal.
Note: To obtain the impulse response H(s), HSPICE performs an
AC analysis, where AC=1 represents the input source. The
Laplace transform of an impulse is 1. For an element with an
infinite response at DC (such as a unit step function H(s)=1/
s), HSPICE calculations use the value of the EPSMIN option
(the smallest number possible on the platform) as the transfer
function.
The general form of the transfer function H(s) in the frequency domain is:
k0 + k1 s + + kn sn
Hs = --------------------------------------------------
-
d0 + d1 s + + dm sm
The order of the numerator for the transfer function cannot be greater than the
order of the denominator. The exception is differentiators, for which the transfer
function H(s) = ks. You can use parameter values for all k and d coefficients of
the transfer function, in the circuit descriptions.
(t) impulse 1
u(t) step 1
---
s
t ramp 1
----
2
s
e-at exponential 1-
----------
s+a
sin t sine w -
----------------
2 2
s +w
cos t cosine s
-----------------
2 2
s +w
sin(t+ )
sine s sin + cos -
---------------------------------------------
2 2
s +
Kf t KF s
f1 t + f2 t – f3 t + F1 s + F2 s – F3 s +
d sF s – f 0–
ft
dt
2
s F s – sf 0 – d f 0–
2
d ft
2 dt
dt
n n n–1 n–2d
d ft s Fs – s f0 – s f0
n dt
dt
t –1
Fs f 0
– f t dt ----------- + --------------
s s
f t – a u t – a a 0 e
– as
Fs
(u is the step function)
e
– at
ft Fs + a
f at a 0 1 s
--- F ---
a a
tf t d
– (F s )
ds
n n
t ft – 1 d F s
n
n
ds
t -
f-------
t s F u du (u is the step function)
f t – t1 e
–t1 s
Fs
n1 R1= 1000 n2
i1
R2 = 250
vg = 2 sin 3t i2 i3 C = 1F vo
L = 50 mH
n0
Use transforms fromTable 4 on page 312 to convert the inductor, capacitor, and
resistors. L{f(t)} represents the Laplace transform of f(t):
d
L L f t = L sF s – f 0 = 50 10 s – 0 = 0.05s
–3
dt
1 t 1 Fs f 0
–1 6
L ---- f t dt = ---- ----------- + -------------- = ----------
1 1
--- + 0 = --------
10
C 0 C s s 10
–6 s s
L R1 f t = R1 F s = R1 = 1000 W
L R2 f t = R2 F s = R2 = 250 W
To convert the voltage source to the s-domain, use the sin t transform from
Table 3 on page 310:
3 - 6
L 2 sin 3 t = 2 ---------------
2 2
= -------------
2
-
s +3 s +9
Figure 78 displays the s-domain equivalent circuit.
n1 1000 n2
i1
250
6 6
v g = ---------------- 10 vo
2 i2 i3 ----------
s +9 s
0.05s
n0
1000 s + 5000 v g
v o = ----------------------------------------------------
2
-
6
s + 6000s + 25 10
The voltage-gain transfer function is:
6
vo 1000 s + 5000 5 10 + 1000s -
H s = ----- = ----------------------------------------------------
2
- = ----------------------------------------------------
6 6 2
vg s + 6000s + 25 10 25 10 + 6000s + s
For the Laplace function call, use the kn and dm coefficients for the transfer
function, in the form:
n
k0 + k1 s + + kn s
H s = --------------------------------------------------
m
-
d0 + d1 s + + dm s
The coefficients from the above voltage-gain transfer function are:
k0 = 5 x 106 k1 = 1000
d0 = 25 x 106d1 = 6000 d2 = 1
Using these coefficients, the following is a Laplace modeling function call for
the voltage-gain transfer function of the circuit in Figure 77 on page 313:
dV in
E-element: v out = k
dt
dV in
G-element: i out = k
dt
For a differentiator, the voltage gain transfer function is:
V out
H s = ---------- = ks
V in
In the general form of the transfer function:
k0 + k1 s + + kn sn
H s = --------------------------------------------------m-
d0 + d1 s + + dm s
If you set k1 = k and d0 = 1 and the remaining coefficients are zero, then the
equation becomes:
ks
H s = ----- = ks
1
Using the k1 = k and d0 = 1 coefficients in the Laplace modeling, the circuit
descriptions for the differentiator are:
Edif out GND LAPLACE in GND 0 k / 1
Gdif out GND LAPLACE in GND 0 k / 1
E Element: v out = k V in dt
G Element: i out = k V in dt
n
k0 + k1 s + + kn s
H s = --------------------------------------------------m-
d0 + d1 s + + dm s
As in the previous example, if you set k0 = k and d1 = 1, then the equation
becomes:
k+0++0 k
H s = --------------------------------- = --
0+s++0 s
n = 0, m = 2,
a =1.0 b = 1.0 p1 = 1.0 fp1 = 0 p2 = 0.5 fp2 = 0.15
You can substitute these coefficients in the POLE function-call, for a voltage-
gain transfer function:
Exxx n+ n- POLE in+ in- a z1,fz1...zn,fzn /
b p1,fp1...pm,fpm
RC Line Modeling
Most RC lines can use very simple models, with only a single dominant pole.
You can use AWE methods to find the dominant pole, computed based on the
total series resistance and capacitance or determined using the Elmore delay.
The Elmore delay uses the (d1-k1) value as the time constant, for a single-pole
approximation to the complete H(s), where H(s) is the transfer function of the
RC network for a specified output. The inverse Laplace transform of h(t) is H(s):
DE = 0 t h t dt
Actually, the Elmore delay is the first moment of the impulse response and so
corresponds to a first-order AWE result.
v1 +
- 0.6pF 0.8pF 0.7pF 0.8pF
+
e1 -
Example
This example is based on demonstration netlist rcline.sp which is available
in the directory: $installdir/demo/hspice/filters.
****
.Tran 0.02ns 3ns
.OPTION Post Accurate List Probe
v1 1 0 PWL 0ns 0 0.1ns 0 0.3ns 5 1.3ns 5 1.5ns 0
r1 1 2 200
c1 2 0 0.6pF
r2 2 3 80
c2 3 0 0.8pF
r3 3 4 160
c3 4 0 0.7pF
r4 4 5 200
c4 5 0 0.8pF
e1 6 0 LAPLACE 1 0 1 / 1 1.16n
.Probe v(1) v(5) v(6)
.Print v(1) v(5) v(6)
.End
5.0 PC.TRO
v(1
4.750
input, v(1) v(5
4.50
v(6
4.250
4.0
3.750
3.50
3.250
full RC line
3.0
2.750
Volt [Lin]
2.50 single-pole
approximation
2.250
2.0
1.750
1.50
1.250
1.0
750.0m
500.0m
250.0m
0
0 500.0p 1.0n 1.50n 2.0n 2.5n 3.0n
Time [Lin]
In Figure 80, the single-pole approximation has less delay: 1 ns, compared to
1.1 ns for the full RC line model, at 2.5 V. The single-pole approximation also
has a lower peak value than the RC line model. All other things being equal, a
circuit with a shorter time constant results in less filtering and allows a higher
maximum voltage value. The single-pole approximation produces a lower
amplitude (and less delay) than the RC line because the single pole neglects
the other three poles in the actual circuit. However, a single-pole approximation
still provides very good results for many problems.
+ 400
v1 1pF 1pF 1pF
-
+ + +
e1 e2 e3
- - -
The sample file located in the following directory is a low-loss line circuit file:
$installdir/demo/hspice/filters/lowloss.sp
Figure 82 on page 325 shows the transient response of a low-loss line. It also
shows E-element Laplace models using one, two, and four poles. The single-
pole model shows none of the ringing of the higher-order models. Also, all E
models must adjust the gain of their response for the finite load resistance, so
the models are not independent of the load impedance. The 0.94-gain
multiplier in the models take care of the 25-ohm source and the 400-ohm load-
voltage divider. These approximations are good delay estimations.
4.0
single-pole
model, v(8)
3.50
Volt [Lin]
3.0
2.50
2.0
1.50
1.0
500.0m
0
0 1.0n 2.0n 3.0n 4.0n 5.0n 6.0n 7.0n 8.0n
Time [Lin]
Zk = 100
delay = 4.0 ns/meter
length = 0.1
(1) 25 (2) (5)
400
25 (3) (8)
Y model (6)
+ 400
v1 +
- e1
-
Figure 84 shows the voltage and current definitions for a Y-parameter model.
I1 I2
+ Y11 Y12 +
Vin Vout
- Y21 Y22 -
The following equations describe the general network in Figure 84, which you
can translate into G-elements:
I 1 = Y 11 V in + Y 12 V out
I 2 = Y 21 V in + Y 22 V out
Figure 85 shows a schematic for a set of two-port Y-parameters. The circuit
consists mostly of G-elements.
Vin I1 I2 Vout
I1 = y11Vin + y12Vout
I2 = y21Vin + y22Vout GND
where p is the product of the propagation constant times the line length.
A Pade approximation contains polynomials in both the numerator and the
denominator. A Pade approximation can model both poles and zeros, and coth
and csch functions also contain both poles and zeros. So, a Pade
approximation provides a better low-order model than a series approximation
does.
The following equation calculates the Pade expansion of coth(p) and csch(p),
with a second-order numerator and a third-order denominator:
1 + 2--- p 2 1 – -----1- 2
p
5 20
coth p ------------------------------- csch p -------------------------------
p + ----- 1- 3
p p + ----- 7- 3
p
15 60
6.9602 Icpade.tr0
Y-parameter v(8
approximation, v(8)
6.50 v(6
6.0 U-element v(5
transmission line, v(1
5.50
5.0
4.50
4.0
3.50
Volt [Lin]
single-pole
approximation, v(6)
3.0
2.50
input, v(1)
2.0
1.50
1.0
500.0m
1owpass9a.1
800.0m v(out
600.0m
400.0m
Volt [Lin]
200.0m
0
-200.0m
-400.0m
-600.0m
-800.0m
ninth.tr0
800.0m v(outp
600.0m
400.0m
Volt [Lin]
200.0m
0
-200.0m
-400.0m
-600.0m
-800.0m
0 2.0m 4.0m 6.0m 8.0m 10.0m 12.0m 14.0m 16.0m 18.0m20.0m
Time [Lin]
-6.4792 lowpass9a
vp(out
-100.0
-200.0
Volt deg [Lin]
-300.0
-400.0
-500.0
-600.0
-700.0
-800.0
-6.4792 ninth.ac0
v(outp
-100.0
Volt deg [Lin]
-200.0
-300.0
-400.0
-500.0
-600.0
-700.0
-800.0
100.0 1.0k 10.0k 100.0k
Hertz [Log]
This example provides the transient response of the filter for 1 kHz and 2 kHz
sinusoidal input signals.
Cd S6
Csh S5
Ce
-
In S1 Cs S4
+ Out
OP1
S2 S3
C2 S10
C4 S9
S1 C1 S4 Ca Cb
- S5 C3 S7
In -
+
OP1 + Out
S2 S3 OP2
S6 S8
C11
C2 S11
S10
Ca C4 Cb
S1 S2 C1 S5
- S6 C3 S8 S12
In -
+
OP1 + Out
S3 S4 OP2
S7 S9
C11
1.50 00CAPE.TR0
V(OUT
3.0
Volt [Lin]
200.0H
-200.0H
-1.H
0 890.0H 1.280H 1.320.0H 2.580.0H 9.200H
Time [Lin]
300.0 00CAPE.TR0
V(OUT
200.0
Volt [Lin]
100.0
-100.0
-200.0
0 890.0H 1.280H 1.320.0H 2.580.0H 9.200H
Time [Lin]
References
[1] Williams, Arthur B., and Taylor, Fred J. Electronic Filter Design Handbook.
New York: McGraw-Hill, 1988, pp. 6-20 to 6-23.
[2] Nillson, James W. Electric Circuits, 4th Edition. Reading, Massachusetts:
Addison-Wesley, 1993.
[3] Edminister, Joseph A. Electric Circuits. New York: McGraw-Hill, 1965.
[4] Ghausi, Kelly, and M.S. “On the Effective Dominant Pole of the Distributed
RC Networks”, Jour. Franklin Inst., June 1965, pp. 417- 429.
[5] Elmore, W.C. and Sands, M. Electronics, National Nuclear Energy Series,
New York: McGraw-Hill, 1949.
[6] Pillage, L.T. and Rohrer, R.A. “Asymptotic Waveform Evaluation for Timing
Analysis”, IEEE Trans. CAD, Apr. 1990, pp. 352 - 366.
[7] Kuo, F. F. Network Analysis and Synthesis. John Wiley and Sons, 1966.
[8] Gregorian, Roubik & Temes, Gabor C. Analog MOS Integrated Circuits. J.
Wiley, 1986, page 354.
337
Index
D
338
Index
G
G
I
G Elements 267, 315–320
impulse response h(t) 302
AND gate 267
Laplace transform 301 input files demonstration 13
generating output 6 input files, demo examples 13
ground_floating_ node configuration option 9 integer_node configuration option 9
inverse Laplace transform 321
inverter lookup table 274
H
H Elements 267
Harmonic Balance (HB) 17
J
equations 30 jitter
errors 37 random, with clock source 120
output 34 jitter measurements, transient noise 235
warnings 37 jitter, random, clock source 120
.HB
for HBLIN 185 K
HB analysis
keywords
IP3 amplifier 22
FREQ 302
power amplifier 18
HB_GIBBS option 43
HBAC 133, 136 L
errors 144, 150, 249 Laplace
example 136 band-reject filter 303
output 141, 199 function 300, 302, 309, 313–317
output data files 143 low-pass filter 305
syntax 141 transfer function 300, 309
warnings 144, 150, 249 transform 299, 312
.HBLIN 182, 186 function call 301
limitations 184 inverse 321
339
Index
M
340
Index
R
341
Index
U
342