LTspice Help
LTspice Help
LTspice Help
Table of contents
2 / 201
LTspiceHelp
Point ................................................................................................... 71
.BACKANNO -- Annotate the Subcircuit Pin Names on Port Currents .......... 72
.DC -- Perform a DC Source Sweep Analysis ............................................ 72
.END -- End of Netlist ........................................................................... 72
.ENDS -- End of Subcircuit Definition ...................................................... 73
.FOUR -- Compute a Fourier Component ................................................ 73
.FUNC -- User Defined Functions ............................................................ 73
.FERRET -- Download a File Given the URL ............................................. 74
.GLOBAL -- Declare Global Nodes .......................................................... 74
.IC -- Set Initial Conditions .................................................................... 75
.INCLUDE -- Include Another File ........................................................... 75
.LIB -- Include a Library ........................................................................ 76
.LOADBIAS -- Load a Previously Solved DC Solution ................................ 78
.MACHINE -- Arbitrary State Machine ..................................................... 78
.MEASURE -- Evaluate User-Defined Electrical Quantities .......................... 80
.MODEL -- Define a SPICE Model ........................................................... 83
.NET -- Compute Network Parameters in a .AC Analysis .......................... 84
.NODESET -- Supply Hints for Initial DC Solution ..................................... 85
.NOISE -- Perform a Noise Analysis ....................................................... 85
.OP -- Find the DC Operating Point ....................................................... 86
.OPTIONS -- Set Simulator Options ........................................................ 86
.PARAM -- User-Defined Parameters ...................................................... 89
.SAVE -- Limit the Quantity of Saved Data ............................................... 92
.SAVEBIAS -- Save Operating Point to Disk ............................................. 93
.STEP -- Parameter Sweeps ................................................................... 93
.SUBCKT -- Define a Subcircuit .............................................................. 94
.TEMP -- Temperature Sweeps ............................................................... 95
.TEXT -- User-Defined Strings ................................................................ 95
.TF -- Find the DC Small-Signal Transfer Function .................................... 96
.TRAN -- Do a Nonlinear Transient Analysis ........................................... 97
.WAVE -- Write Selected Nodes to a .Wav File .......................................... 97
Transient Analysis Options ........................................................................ 98
UIC .................................................................................................... 98
startup ................................................................................................ 99
steady ................................................................................................. 99
nodiscard .......................................................................................... 100
step .................................................................................................. 100
Circuit Elements ..................................................................................... 101
A. Special Functions ........................................................................... 102
B. Arbitrary Behavioral Voltage or Current Sources ................................ 105
C. Capacitor ...................................................................................... 109
D. Diode ........................................................................................... 111
E. Voltage Dependent Voltage Source .................................................. 114
F. Current Dependent Current Source .................................................. 115
G. Voltage Dependent Current Source .................................................. 116
H. Current Dependent Voltage Source .................................................. 117
I. Current Source ............................................................................... 117
J. JFET ............................................................................................. 121
K. Mutual Inductance ......................................................................... 123
L. Inductor ....................................................................................... 123
3 / 201
LTspiceHelp
4 / 201
LTspiceHelp
LTspice XVII
®
LTspice XVII
Copyright © 1998-2021 Analog Devices Corporation
All rights reserved.
www.analog.com
In memory of
Peanut, Spider and Toad.
Introduction
Introduction
5 / 201
LTspiceHelp
Software Installation
Software Installation
6 / 201
LTspiceHelp
http://LTspice.linear.com/software/LTspice64.exe
License Agreement/Disclaimer
Modes of Operation
Modes of Operation
7 / 201
LTspiceHelp
Example Circuits
Efficiency Report
Example Circuits
Example Circuits
%HOMEPATH%\Documents\LTspiceXVII\examples\Educational
In the directory
%HOMEPATH%\Documents\LTspiceXVII\examples\jigs
8 / 201
LTspiceHelp
This is the main use of the LTspice XVII simulator. Within the
restrictions found in the license, you are free to use LTspice
XVII as your general-purpose schematic capture/SPICE program
even for circuits which do not use Linear Technology products.
Many companies standardize on LTspice as their EDA tool.
9 / 201
LTspiceHelp
10 / 201
LTspiceHelp
Efficiency Report
Efficiency Report
11 / 201
LTspiceHelp
12 / 201
LTspiceHelp
13 / 201
LTspiceHelp
Schematic Capture
Schematic Capture
Schematic Colors
Placing Components
14 / 201
LTspiceHelp
Editing Components
Hierarchy
The program ships with over 2,000 symbols. These symbols cover
most of LTC's power ICs, opamps, comparators, and many
general-purpose devices for circuit design. You can also draw
your own symbols for devices you wish to import into the
program.
15 / 201
LTspiceHelp
Draw Wire: Click the left mouse button to start a wire. Each
16 / 201
LTspiceHelp
17 / 201
LTspiceHelp
18 / 201
LTspiceHelp
Schematic Colors
Schematic Colors
19 / 201
LTspiceHelp
object in the sample schematic and use the red, green and blue
sliders to adjust the colors to your preferences.
Placing Components
1. You can type in the first few letters of the symbol name
20 / 201
LTspiceHelp
21 / 201
LTspiceHelp
Keyboard Shortcuts
22 / 201
LTspiceHelp
Editing Components
Editing Components
1. Expert Mode: This is the mode you use most of the time.
Simply point at the text you want to edit, like a
component value, right click, and type in the text you
want. When you point at the text, the mouse cursor will
turn into a text caret if you can edit it.
Expert Mode
23 / 201
LTspiceHelp
Assisted Mode
24 / 201
LTspiceHelp
25 / 201
LTspiceHelp
26 / 201
LTspiceHelp
.lib <SpiceModel>
<name> node1 node2 [...] <Value2>
.lib <ModelFile>
<name> node1 node2 [...] <SpiceModel> <Value> <Value2>
<SpiceLine> <SpiceLine2>
27 / 201
LTspiceHelp
Adding Attributes
Attribute Visibility
28 / 201
LTspiceHelp
29 / 201
LTspiceHelp
30 / 201
LTspiceHelp
Adding Attributes
Adding Attributes
You can define default attributes for a symbol using the menu
command Edit=>Attributes=>Edit Attributes. The most important
attribute is called the "Prefix". This determines the basic
type of symbol. If the symbol is intended to represent a SPICE
primitive, the symbol should have the appropriate prefix, R
for resistor, C or capacitor, M for MOSFET, etc. See the
LTspice reference for a complete set of SPICE primitives
available. The prefix should be 'X' if you want to use the
symbol to represent a subcircuit defined in a library.
31 / 201
LTspiceHelp
Prefix: X
SpiceModel: <name of file including the spicemodel>
Value: <What ever you want visible on the schematic>
Value2: <The value as you want in the netlist>
Attribute Visibility
Attribute Visibility
32 / 201
LTspiceHelp
33 / 201
LTspiceHelp
34 / 201
LTspiceHelp
Hierarchy
Hierarchy
35 / 201
LTspiceHelp
Rules of Hierarchy
Rules of Hierarchy
Rules of Hierarchy
36 / 201
LTspiceHelp
37 / 201
LTspiceHelp
Waveform Viewer
Waveform Viewer
38 / 201
LTspiceHelp
plotted.
Zooming
Waveform Arithmetic
User-Defined Functions
Axis Control
Plot Panes
Color Control
Attached Cursors
The undo and redo commands allow you to review the different
trace selections no matter which method of selection is used.
39 / 201
LTspiceHelp
40 / 201
LTspiceHelp
41 / 201
LTspiceHelp
42 / 201
LTspiceHelp
43 / 201
LTspiceHelp
44 / 201
LTspiceHelp
45 / 201
LTspiceHelp
Zooming
Zooming
46 / 201
LTspiceHelp
Note that the size of the zoom box is displayed on the status
bar at the bottom so that you can quickly measure differences
without setting up attached cursors.
There are toolbar buttons and menu commands for zooming out,
panning, and returning to the autoranged zoom. The undo and
redo commands allow you to review the different zooms used.
Another zoom mode is to hold down the control key while moving
the mouse or turning the mouse wheel. The software will zoom
and pan a bitmap of the current plot to give an indication of
what the plot would like like when fully rendered. This mode
is intended for huge waveform files that take seconds to
redraw.
47 / 201
LTspiceHelp
Waveform Arithmetic
Waveform Arithmetic
48 / 201
LTspiceHelp
49 / 201
LTspiceHelp
50 / 201
LTspiceHelp
pwrs(x,y) sgn(x)*abs(x)**y
rand(x) Random number between 0 and 1
depending on the integer value of x.
random(x) Similar to rand(), but smoothly
transitions between values.
round(x) Nearest integer to x
sgn(x) Sign of x
sin(x) Sine of x
sinh(x) Hyperbolic sine of x
sqrt(x) Square root of x
table(x,a,b,c,d,...) Interpolate a value for x based on a
look up table given as a set of pairs
of points.
tan(x) Tangent of x.
tanh(x) Hyperbolic tangent of x
u(x) Unit step, i.e., 1 if x > 0., else 0.
uramp(x) x if x > 0., else 0.
white(x) Random number between -.5 and .5
smoothly transitions between values
even more smoothly than random().
For complex data, the functions atan2(,), sgn(), u(),
buf(), inv() uramp(), int(), floor(), ceil(), rand(),
min(,), limit(,), if(,,), and table(...) are not available.
The functions Re(x) and Im(x) are available for complex
data and return a complex number with the real part equal
to the real or imaginary part of the argument respectively
and the imaginary part equal to zero. The functions Ph(x)
and Mag(x) are also available for complex data and return a
complex number with the real part equal to the phase angle
or magnitude of the argument respectively and the imaginary
part equal to zero. The function conj(x) is also available
for complex data and returns the complex conjugate of x.
51 / 201
LTspiceHelp
+ Addition
- Subtraction
* Multiplication
/ Division
52 / 201
LTspiceHelp
53 / 201
LTspiceHelp
54 / 201
LTspiceHelp
55 / 201
LTspiceHelp
User-Defined Functions
User-Defined Functions
The menu command Plot Settings=>Edit Plot Defs File allows you
to enter your own function definitions and parameter
definitions for use in the waveform viewer. These functions
are kept in the file %HOMEPATH%
\Documents\LTspiceXVII\plot.defs.
Then the syntax is the same as the .param and .func statements
used for parameterized circuits. E.g., the line
56 / 201
LTspiceHelp
Axis Control
Axis Control
When you move the mouse cursor beyond the data plotting
region, the cursor turns into a ruler. This indicates that you
are pointing at that axis' attributes. When you left click you
can enter a dialog to manually enter that axis' range and the
nature of the plot. For example, for real data, if you move
the mouse to the bottom of the screen and left click, you can
enter a dialog to change the horizontal quantity plotted. This
lets you make parametric plots.
For complex data, you can choose to plot either phase, group
delay, or nothing against the right vertical axis. You can
change the representation of complex data from Bode to Nyquist
or Cartesian by moving the mouse to the left vertical axis of
complex data.
Plot Panes
Plot Panes
57 / 201
LTspiceHelp
Color Control
Color Control
58 / 201
LTspiceHelp
Attached Cursors
Attached Cursors
59 / 201
LTspiceHelp
60 / 201
LTspiceHelp
61 / 201
LTspiceHelp
62 / 201
LTspiceHelp
63 / 201
LTspiceHelp
Each analysis type; .tran, .ac, .noise, etc.; has its own
entry in the plot settings file. It isn't possible to load the
settings from one analysis type to another. But you can use
the plot settings file from another simulation of the same
analysis type.
The conversion process can take a long time and use up to one
quarter of your physical memory. In fact, it can take more
time to convert the file to Fast Access format then was
required for the initial simulation. The exact time the
conversion requires will depend on such factors as the state
of the hard disk fragmentation and the amount of physical
memory you have. During conversion, you may find your machine
is not very responsive to your mouse and keyboard. It is
64 / 201
LTspiceHelp
Where <file> is the name of the .raw file you wish to convert
to Fast Access format.
This format is only supported for real data, not the complex
data from a .AC analysis.
LTspice®
LTspice® XVII
65 / 201
LTspiceHelp
Introduction
Dot Commands
Circuit Elements
Introduction
Circuit Description
66 / 201
LTspiceHelp
You can also open, simulate, and edit a text netlist generated
either by hand or externally generated. Files with the
extensions ".net", ".cir", or ".sp" are recognized by LTspice
as netlists.
The first two lines are comments. Any line starting with a "*"
is a comment and is ignored. The line starting with "R1"
declares that there is a 1K resistor connected between nodes
n1 and n2. Note that the semicolon, ";", can be used to start
a comment in the middle of a line. The line starting with "C1"
declares that there is a 100pF capacitor between nodes n2 and
ground. The node "0" is the global circuit common ground.
67 / 201
LTspiceHelp
of circuit element.
Leading Type of line
Character
* Comment
A Special function device
B Arbitrary behavioral source
C Capacitor
D Diode
E Voltage dependent voltage source
F Current dependent current source
G Voltage dependent current source
H Current dependent voltage source
I Independent current source
J JFET transistor
K Mutual inductance
L Inductor
M MOSFET transistor
O Lossy transmission line
Q Bipolar transistor
R Resistor
S Voltage controlled switch
T Lossless transmission line
U Uniform RC-line
V Independent voltage source
W Current controlled switch
X Subcircuit Invocation
Z MESFET or IGBT transistor
. A simulation directive, For example: .options
reltol=1e-4
+ A continuation of the previous line. The "+" is
removed and the remainder of the line is
considered part of the prior line.
Numbers can be expressed not only in scientific notation;
68 / 201
LTspiceHelp
Dot Commands
69 / 201
LTspiceHelp
70 / 201
LTspiceHelp
.AC -- Perform an Small Signal AC Analysis Linearized About the DC Operating Point
71 / 201
LTspiceHelp
Syntax: .backanno
This directive marks the end of the textual netlist. All lines
after this one are ignored. Do not place this as text on the
schematic, as the netlist extractor supplies it at the end.
72 / 201
LTspiceHelp
73 / 201
LTspiceHelp
Note that global circuit common is node "0" and that a .global
statement is not required. Also, node names that of the form
"$G_" are also global nodes without being declared in a
.global statement.
74 / 201
LTspiceHelp
.inc http://www.company.com/models/library.lib
.inc library.lib
Note that if the url you specify doesn't exist, most web
servers don't return an error, but return a html web page to
be displayed in your web browser that explains the error.
75 / 201
LTspiceHelp
.lib http://www.company.com/models/library.mod
.lib library.mod
Note that if the URL you specify doesn't exist, most web
servers don't return an error, but return a html web page to
be displayed in your web browser that explains the error.
LTspice can't always read these pages as error conditions so
you may get some cryptic error message when the simulation
tries to proceed with the included html language error page
included in the simulation as valid SPICE syntax.
Encrypted Libraries
76 / 201
LTspiceHelp
77 / 201
LTspiceHelp
78 / 201
LTspiceHelp
as the value of <old state> matches any state. Such rules are
checked first.
* divide by 2 example
V1 1 0 pulse(0 1 0 1u 1u .5m 1m)
V2 c 0 pulse(0 1 0 1u 1u 5m 10m)
R1 2 0 1K
R2 3 0 1K
R3 4 0 1K
.machine
.state S0a 0
.state S0b 0
.state S1a 1
.state S1b 1
.rule S0a S0b V(1) < .5
.rule S0b S1a V(1) > .5
.rule S1a S1b V(1) < .5
.rule S1b S0a V(1) > .5
.rule * S0a V(c) > .5
.output (2) V(1) < .5
.output (3) V(1) > .5
.output (4) state
.endmachine
.tran 30m
.end
79 / 201
LTspiceHelp
Print the value of V(out) the third time the condition V(x)
=3*V(y) is met. This will be labeled res3.
Print the value of V(out) the last time the condition V(x)
=3*V(y) is met when approached as V(x) increasing wrt
3*V(y). This will be labeled res4.
80 / 201
LTspiceHelp
81 / 201
LTspiceHelp
.MEAS AC tmp max mag(V(out)); find the peak response and call
it "tmp"
The AVG, RMS, and INTEG operations are different for .NOISE
analysis than the analysis types since the noise is more
meaningfully integrated in quadrature over frequency. Hence
AVG and RMS both give the RMS noise voltage and INTEG gives
the integrated total noise. Hence, if you add the SPICE
directives
82 / 201
LTspiceHelp
ii) Right click in the .log file and, execute context menu
command Plot .step'ed .meas data.
83 / 201
LTspiceHelp
84 / 201
LTspiceHelp
85 / 201
LTspiceHelp
86 / 201
LTspiceHelp
87 / 201
LTspiceHelp
88 / 201
LTspiceHelp
*
* This is the circuit definition
.params x=y y=z z=1k*tan(pi/4+.1)
X1 a b 0 divider top=x bot=z
V1 a 0 pulse(0 1 0 .5μ .5μ 0 1μ)
.tran 3μ
.end
89 / 201
LTspiceHelp
90 / 201
LTspiceHelp
91 / 201
LTspiceHelp
The directive .save I(Q2) will save the base, collector and
emitter currents of bipolar transistor Q2. To save a single
terminal current, specify Ic(Q2).
92 / 201
LTspiceHelp
93 / 201
LTspiceHelp
*
* This is the circuit definition
X1 a b 0 divider
V1 a 0 pulse(0 1 0 .5μ .5μ 0 1μ)
* this is the definition of the subcircuit
.subckt divider n1 n2 n3r1 n1 n2 1k
r2 n2 n3 1k
94 / 201
LTspiceHelp
.ends
.tran 3
.end
Note that unique names based on the subcircuit name and the
subcircuit definition element names are made for the circuit
elements inserted by subcircuit expansion.
The syntax
is equivalent to
95 / 201
LTspiceHelp
*
V1 1 0 PULSE(0 1 0 1u 1u .5m 1m)
R1 |node| 1 |"1" + "K"|
C1 |node| 0 |foobar|
X1 2 div 0 NIX
.text node="2"
.text foo=".1" bar="u"
.text foobar = foo + bar
.tran 3m
.text top="100k"
.text bot="100k"
.subckt nix a b c
.text bot="1Meg"
R1 a b |top| ; uses global scope definition of top
R2 b c |bot| ; uses locally scope definition of bot
.ends nix
.end
*
v1 1 0 pulse(0 1 0 1u 1u .5m 1m)
r1 2 1 1k
c1 2 0 .1u
r:1:1 2 div 100k
r:1:2 div 0 1meg
.tran 3m
.end
96 / 201
LTspiceHelp
Examples:
LTspice can write .wav audio files. These files can then be
listened to or be used as the input of another simulation.
97 / 201
LTspiceHelp
.TRAN Modifiers
UIC
UIC
98 / 201
LTspiceHelp
startup
startup
steady
steady
Stop the simulation when steady state has been reached. This
is required for an efficiency calculation report. Steady state
detection is written into the SMPS macromodels. Typically they
are written to look for zero error amp output current averaged
over a clock cycle. The algorithm takes the error amp's output
compliance range into consideration. The fraction of peak
current that is considered zero current is specified with the
sstol option.
99 / 201
LTspiceHelp
nodiscard
nodiscard
step
step
4. change the step load to the next value in the list or quit
if there is none.
100 / 201
LTspiceHelp
Circuit Elements
Component Syntax
Special functions Axx n1 n2 n3 n4 n5 n6 n7 n8
+ <model> [extra parameters]
Arbitrary behavioral Bxx n+ n- <V=... or I=...>
source
Capacitor Cxx n+ n- <capacitance>
+ [ic=<val.>] [Rser=<val.>]
+ [Lser=<val.>] [Rpar=<val.>]
+ [Cpar=<val.>] [m=<val.>]
Diode Dxx A K <model> [area]
Voltage dependent voltage Exx n+ n- nc+ nc- <gain>
Current dependent current Fxx n+ n- <Vnam> <gain>
Voltage dependent current Gxx n+ n- nc+ nc- <transcond.>
Current dependent voltage Hxx n+ n- <Vnam> <transres.>
Independent current source Ixx n+ n- <current>
JFET transistor Jxx D G S <model> [area] [off]
+[IC=<Vds,Vgs>] [temp=<T>]
Mutual inductance Kxx L1 L2 L3... <coeff.>
Inductance Lxx n+ n- <inductance>
+ [ic=<val.>] [Rser=<val.>]
+ [Rpar=<val.>]
+ [Cpar=<val.>] [m=<val.>]
MOSFET transistor Mxx D G S B <model> [L=<len>]
+ [W=<width>] [AD=<area>]
+ [AS=<area>] [PD=<perim>]
+ [PS=<perim>] [NRD=<value>]
+ [NRS=<value>] [off]
+ [IC=<Vds, Vgs, Vbs>
+ [temp=<T>]
Lossy transmission line Oxx L+ L- R+ R- <model>
Bipolar transistor Qxx C B E [S] <model> [area]
+ [off] [IC=Vbe,Vce][temp=<T>]
Resistor Rxx n1 n2 <value>
Voltage controlled switch Sxx n1 n2 nc+ nc- <model>
+ [on,off]
101 / 201
LTspiceHelp
A. Special Functions
A. Special Functions
Syntax: Annn n001 n002 n003 n004 n005 n006 n007 n008 <model>
[instance parameters]
INV, BUF, AND, OR, and XOR are generic idealized behavioral
gates. All gates are netlisted with eight terminals. These
gates require no external power. Current is sourced or sunk
from the complementary outputs, terminals 6 and 7, and
returned through device common, terminal 8. Terminals 1
through 5 are inputs. Unused inputs and outputs are to be
connected to terminal 8. The digital device compiler
recognizes that as a flag that that terminal is not used and
removes it from the simulation. This leads to the potentially
confusing situation where AND gates act differently when an
input is grounded or at zero volts. If ground is the gate's
common, then the grounded input is not at a logic false
condition, but simply not part of the simulation. The reason
that these gates are implemented like that is that this allows
one device to act as 2-, 3-, 4- or 5- input gates with true,
inverted, or complementary output with no simulation speed
penalty for unused terminals. That is, the AND device acts as
12 different types of AND gates. The gates default to 0V/1V
logic with a logic threshold of .5V, no propagation delay, and
a 1Ohm output impedance. Output characteristics are set with
these instance parameters:
102 / 201
LTspiceHelp
103 / 201
LTspiceHelp
Syntax: Annn n001 n002 n003 n004 n005 n006 n007 n008 OTA
[instance parameters]
104 / 201
LTspiceHelp
105 / 201
LTspiceHelp
+ [laplace=<expression> [window=<time>]
+ [nfft=<number>] [mtol=<number>]]
106 / 201
LTspiceHelp
107 / 201
LTspiceHelp
** Raise left hand side to power of right hand side. Only the r
part is returned, e.g., -1**1.5 gives zero not i.
Note that LTspice uses the caret character, ^, for Boolean XOR
and "**" for exponentiation. Also, LTspice distinguishes
between exponentiation, x**y, and the function pwr(x,y). Some
3rd party simulators have an incorrect implementation of
behavioral exponentiation, evaluating -3**3 incorrectly to 27
instead of -27, presumably in the interest of avoiding the
problem of exponentiating a negative number to a non-integer
power. LTspice handles this issue by returning the real part
of the result of the exponentiation. E.g., -2**1.5 evaluates
to zero which is the real part of the correct answer of
2.82842712474619i. This means that when you import a 3rd party
108 / 201
LTspiceHelp
model that was targeted at a 3rd party simulator, you may need
to translate the syntax such as x^y to x**y or even pwr(x,y).
C. Capacitor
C. Capacitor
109 / 201
LTspiceHelp
110 / 201
LTspiceHelp
Cnnn n1 n2 Q=100p*x
Cnnn n1 n2 Q=x*if(x<0,100p,300p)
D. Diode
D. Diode
Examples:
D1 SW OUT MyIdealDiode
D2 SW OUT dio2
111 / 201
LTspiceHelp
112 / 201
LTspiceHelp
bias depletion
capacitance formula
BV Reverse breakdown V Infin. 40.
voltage
nbv Reverse breakdown - 1.0 2.0
emission coefficient
Ibv Current at breakdown A 1e-10
voltage
Ibvl Low-level reverse A 0.0
breakdown knee
current
nbvl Low-level reverse - 1.0
breakdown emission
coefficient
Tnom Parameter measurement °C 27 50
temp.
Isr Recombination current A 0.0
parameter
Nr Isr emission coeff. - 2.0
Ikf High-injection knee A Infin.
current
Tikf Linear Ikf temp /°C 0.0
coeff.
Trs1 linear Rs temp coeff. /°C 0.0
Trs2 Quadratic Rs temp /°C2 0.0
coeff.
Tbv1 Breakdown voltage /°C 0.0
temp coeff.
Tbv2 Quadratic breakdown /°C2 0.0
voltage temp coeff.
Perim Default perimeter m 0.0
Isw Sidewall Is A 0.0
ns Sidewall emission - 1.0
coefficient
Rsw Sidewall series Ω 0.0
resistance
Cjsw Sidewall Cjo F 0.0
Vjsw Sidewall Vj V Vj
113 / 201
LTspiceHelp
Symbol Names: E, E2
114 / 201
LTspiceHelp
Symbol Name: F
115 / 201
LTspiceHelp
Symbol Names: G, G2
116 / 201
LTspiceHelp
Symbol Name: H
I. Current Source
I. Current Source
117 / 201
LTspiceHelp
118 / 201
LTspiceHelp
Ioffset+Iamp*sin(p*Phi/180)
For times after Td, but before Ncycles have completed, the
current is given by
Ioffset+Iamp*exp(-(time-Td)*Theta)*sin(2*p*Freq*(time-Td)
+p*Phi/180)
I1+(I2-I1)*(1-exp(-(time-Td1)/Tau1))
I1+(I2-I1)*(1-exp(-(time-Td1)/Tau1))-(I2-I1)*(1-exp(-(time-
Td2)/Tau2))
119 / 201
LTspiceHelp
Ioff+Iamp*sin((2.*p*Fcar*time)+MDI*sin(2.*p*Fsig*time)).
For times before t1, the current is i1. For times between t1
and t2, the current varies linearly between i1 and i2. There
can be any number of time, current points given. For times
after the last time, the current is the last current.
120 / 201
LTspiceHelp
J. JFET
J. JFET Transistor
Examples:
J1 0 in out MyJFETmodel
.model MyJFETmodel NJF(Lambda=.001)
J2 0 in out MyPJFETmodel
.model MyPJFETmodel PJF(Lambda=.001)
The JFET model is derived from the FET model of Shichman and
Hodges extended to include Gate junction recombination current
and impact ionization. The DC characteristics are defined by
the parameters VTO and BETA, which determine the variation of
drain current with gate voltage; LAMBDA, which determines the
output conductance; and Is, the saturation current of the two
gate junctions. Two ohmic resistances, Rd and Rs, are
included. Charge storage is modeled by nonlinear depletion
layer capacitances for both gate junctions; which vary as the
-1/2 power of junction voltage and are defined by the
parameters Cgs, Cgd, and PB. A fitting parameter B has been
added. See A. E. Parker and D. J. Skellern, An Improved FET
Model for Computer Simulators, IEEE Trans CAD, vol. 9, no. 5,
pp. 551-553, May 1990.
Name Description Units Default Example
Vto Threshold voltage V -2.0 -2.0
Beta Transconductance A/V2 1e-4 1e-3
parameter
Lambda Channel-length 1/V 0.0 1e-4
modulation parameter
Rd Drain ohmic Ω 0.0 100
resistance
Rs Source ohmic Ω 0.0 100
resistance
121 / 201
LTspiceHelp
122 / 201
LTspiceHelp
K. Mutual Inductance
K. Mutual Inductance
The line
K1 L1 L2 L3 L4 1.
K1 L1 L2 1.
K2 L2 L3 1.
K3 L3 L4 1.
K4 L1 L3 1.
K5 L2 L4 1.
K6 L1 L4 1.
L. Inductor
L. Inductor
123 / 201
LTspiceHelp
124 / 201
LTspiceHelp
*
L1 N001 0 Flux=1m*tanh(5*x)
I1 0 N001 PWL(0 0 1 1)
.tran 1
.end
and
125 / 201
LTspiceHelp
126 / 201
LTspiceHelp
*
L1 N001 0 Hc=16. Bs=.44 Br=.10 A=0.0000251
+ Lm=0.0198 Lg=0.0006858 N=1000
I1 0 N001 PWL(0 0 1 1)
.tran .5
.options maxstep=10u
.end
M. MOSFET
M. MOSFET
Monolithic MOSFET:
127 / 201
LTspiceHelp
M1 Nd Ng Ns 0 MyMOSFET
.model MyMOSFET NMOS(KP=.001)
M1 Nd Ng Ns Nb MypMOSFET
.model MypMOSFET PMOS(KP=.001)
Example:
M1 Nd Ng Ns Si4410DY
.model Si4410DY VDMOS(Rd=3m Rs=3m Vto=2.6 Kp=60
+ Cgdmax=1.9n Cgdmin=50p Cgs=3.1n Cjo=1n
+ Is=5.5p Rb=5.7m)
Monolithic MOSFETS are four terminal devices. Nd, Ng, NS, and
Nb are the drain, gate, source, and bulk; i.e., substrate;
nodes. L and W are the channel length and width, in meters. AD
and AS are the areas of the drain and source diffusions, in
square meters. Note that the suffix u specifies μm and p
square μm. If any of L, W, AD, or AS are not specified,
default values are used. PD and PS are the perimeters of the
drain and source junctions, in meters. NRD and NRS designate
the equivalent number of squares of the drain and source
diffusions; these values multiply the sheet resistance RSH
specified on the .MODEL control line. PD and PS default to
zero while NRD and NRS to one. OFF indicates an initial
condition on the device for DC analysis. The initial condition
specification using IC=VDS, VGS, VBS is for use with the UIC
option on the .TRAN control line, when a transient analysis is
desired starting from other than the quiescent operating
point. The optional TEMP value is the temperature at which
this device is to operate, and overrides the temperature
specification on the .OPTION control line. The temperature
specification is ONLY valid for level 1, 2, 3, and 6 MOSFETs,
not for level 4, 5 or 8 BSIM devices.
level model
128 / 201
LTspiceHelp
------------------------------------------------------
1 Shichman-Hodges
129 / 201
LTspiceHelp
130 / 201
LTspiceHelp
131 / 201
LTspiceHelp
saturation current
per square-meter of
junction area
Jssw Bulk junction A/m 0. 1n
saturation current
per meter of sidewall
Tox Oxide thickness m 1e-7 1e-7
Nsub Substrate doping 1/cm3 0. 4e15
132 / 201
LTspiceHelp
133 / 201
LTspiceHelp
134 / 201
LTspiceHelp
135 / 201
LTspiceHelp
Rd Drain ohmic Ω 0. 1.
resistance
Rs Source ohmic Ω 0. 1.
resistance
Rg Gate ohmic Ω 0. 2.
resistance
Rds Drain-source shunt Ω Infin. 10Meg
resistance
Rb Body diode ohmic Ω 0. .5
resistance
Cjo Zero-bias body diode F 0. 1n
junction capacitance
Cgs Gate-source F 0. 500p
capacitance
Cgdmin Minimum non-linear F 0. 300p
G-D capacitance
Cgdmax Maximum non-linear F 0. 1000p
G-D capacitance
A Non-linear Cgd - 1. .5
capacitance
parameter
Is Body diode A 1e-14 1e-15
saturation current
N Bulk diode emission - 1.
coefficient
Vj Body diode junction V 1. 0.87
potential
M Body diode grading - 0.5 0.5
coefficient
Fc Body diode - 0.5
coefficient for
forward-bias
depletion
capacitance formula
oneway Behavioral modeling - - -
flag to indicate
current can only
flow in one
direction in the
channel
tt Body diode transit sec 0. 10n
time
136 / 201
LTspiceHelp
137 / 201
LTspiceHelp
2 Ksubthres
Trs1 Rs linear tempco °C-1 0. 5m
Example:
O1 in 0 out 0 MyLossyTline
.model MyLossyTline LTRA(len=1 R=10 L=1u C=10n)
138 / 201
LTspiceHelp
139 / 201
LTspiceHelp
Q. Bipolar Transistor
Q. Bipolar Transistor
Example:
140 / 201
LTspiceHelp
141 / 201
LTspiceHelp
142 / 201
LTspiceHelp
143 / 201
LTspiceHelp
144 / 201
LTspiceHelp
145 / 201
LTspiceHelp
VBIC Parameters
146 / 201
LTspiceHelp
147 / 201
LTspiceHelp
148 / 201
LTspiceHelp
149 / 201
LTspiceHelp
IBCI/IBEIP
Eais Activation energy for IBCIP V 1.12
Eane Activation energy for IBEN V 1.12
Eanc Activation energy for V 1.12
IBCN/IBENP
Eans Activation energy for IBCNP V 1.12
Xis Temperature exponent of IS 3.
Xii Temperature exponent of 3.
IBEI,IBCI,IBEIP,IBCIP
Xin Temperature exponent of 3.
IBEN,IBCN,IBENP,IBCNP
Tnf Temperature exponent of NF 0.
Tavc Temperature exponent of 0.
AVC2
rth Thermal resistance K/W 0.
Cth Thermal capacitance Ws/K 0.
Vrt Punch-through voltage of V 0.
internal B-C junction
Art Smoothing parameter for 0.1
reach-through
Ccso Fixed C-S capacitance F 0.
qbm Select SGP qb formulation 0.
nkf High current beta rolloff 0.5
Xikf Temperature exponent of IKF 0.
Xrcx Temperature exponent of RCX 0.
Xrbx Temperature exponent of RBX 0.
Xrbp Temperature exponent of RBP 0.
Isrr Separate IS for fwd and rev 1.
Xisr Temperature exponent of ISR 0.
dear Delta activation energy for 0.
ISRR
Eap Excitation energy for ISP 1.12
Vbbe B-E breakdown voltage V 0.
nbbe B-E breakdown emission 1.
coefficient
150 / 201
LTspiceHelp
R. Resistor
R. Resistor
151 / 201
LTspiceHelp
Symbol Names: SW
Example:
S1 out 0 in 0 MySwitch
.model MySwitch SW(Ron=.1 Roff=1Meg Vt=0 Vh=-.5 Lser=10n
Vser=.6)
The voltage between nodes nc+ and nc- controls the switch's
impedance between nodes n1 and n2. A model card is required to
define the behavior of the switch. See the schematic file .
\examples\Educational\Vswitch.asc to see an example of a model
card placed directly on a schematic as a SPICE directive.
Voltage Controlled Switch Model Parameters
Name Description Units Default
Vt Threshold voltage V 0.0
Vh Hysteresis voltage V 0.0
Ron On resistance Ω 1.0
Roff Off resistance Ω 1/Gmin
Lser Series inductance H 0.0
Vser Series voltage V 0.0
Ilimit Current limit A Infin.
The switch has three distinct modes of voltage control,
depending on the value of the hysteresis voltage, Vh. If Vh is
zero, the switch is always completely on or off depending upon
whether the input voltage is above the threshold. If Vh is
positive, the switch shows hysteresis, as if it was controlled
by a Schmitt trigger with trip points at Vt - Vh and Vt + Vh.
Note that Vh is half the voltage between trip points which is
different than the common laboratory nomenclature. If Vh is
negative, the switch will smoothly transition between the on
and off impedances. The transition occurs between the control
voltages of Vt - Vh and Vt + Vh. The smooth transition follows
a low order polynomial fit to the logarithm of the switch's
conduction.
152 / 201
LTspiceHelp
where
A = log(Roff / Ron) / p
B = log(1 / (Roff * Ron)) / 2
L+ and L- are the nodes at one port. R+ and R- are the nodes
for the other port. Zo is the characteristic impedance. The
length of the line is given by the propagation delay Td.
U. Uniform RC-line
U. Uniform RC-line
153 / 201
LTspiceHelp
V. Voltage Source
V. Voltage Source
154 / 201
LTspiceHelp
155 / 201
LTspiceHelp
Vamp Amplitude V
Freq Frequency Hz
Td Delay sec
Theta Damping factor 1/sec
Phi Phase of sine wave degrees
Ncycles Number of cycles(Omit cycles
for free-running sine
function)
For times less than Td, the output voltage is given by
Voffset+Vamp*sin(p*Phi/180)
For times after Td, but before Ncycles have completed, the
voltage is given by
Voffset+Vamp*exp(-(time-Td)*Theta)*sin(2*p*Freq*(time-Td)
+p*Phi/180)
V1+(V2-V1)*(1-exp(-(time-Td1)/Tau1))
V1+(V2-V1)*(1-exp(-(time-Td1)/Tau1))-(V2-V1)*(1-exp(-(time-
Td2)/Tau2))
156 / 201
LTspiceHelp
Voff+Vamp*sin((2.*p*Fcar*time)+MDI*sin(2.*p*Fsig*time))
For times before t1, the voltage is v1. For times between t1
and t2, the voltage varies linearly between v1 and v2. There
can be any number of time, voltage points given. For times
after the last time, the voltage is the last voltage.
Example:
157 / 201
LTspiceHelp
X. Subcircuit
X. Subcircuit
*
* This calls the circuit
X1 in out 0 divider top=9K bot=1K
V1 in 0 pulse(0 1 0 .5m .5m 0 1m)
*
* This is the subcircuit definition
.subckt divider A B C
R1 A B {top}
R2 B C {bot}
.ends divider
*
.tran 3m
.end
158 / 201
LTspiceHelp
159 / 201
LTspiceHelp
160 / 201
LTspiceHelp
Integration Methods
Integration Methods
161 / 201
LTspiceHelp
162 / 201
LTspiceHelp
Control Panel
Save Defaults
SPICE
Drafting Options
Netlist Options
Waveforms
Operation
Hacks
Internet Options
163 / 201
LTspiceHelp
Compression
Compression
164 / 201
LTspiceHelp
.options plotwinsize=0
Save Defaults
Save Defaults
These settings are used when you don't explicitly state which
nodes should be saved in a simulation. Useful settings are
"Save Device Currents", "Save Subcircuit Node Voltages", and
"Save Subcircuit Device Currents". Device voltages and
internal device voltages are only of internal program
development use.
165 / 201
LTspiceHelp
Save Device Currents: Check this so that you can plot device
and terminal currents. You will also need it to be able to
plot dissipation.
Don't save Ib(), Ie(), Is(), Ig(): This saves only the
collector(drain) currents of transistors in the interest of
reducing the size of the output .data file. This is useful
for IC design, but it using it means that there isn't
enough data available to compute transistor dissipation.
166 / 201
LTspiceHelp
Save Device Currents: Check this so that you can plot device
and terminal currents. You will also need it to be able to
plot dissipation.
SPICE
SPICE
167 / 201
LTspiceHelp
168 / 201
LTspiceHelp
Drafting Options
Drafting Options
169 / 201
LTspiceHelp
Cut angled wires during drags: During the Drag command, a non-
orthogonal wire will be broken into two connected wires if
you click along the middle of the wire
Draft with thick lines: Increases the all line widths. Useful
for generating images for publication.
Netlist Options
Netlist Options
170 / 201
LTspiceHelp
171 / 201
LTspiceHelp
172 / 201
LTspiceHelp
Waveforms
Waveforms
173 / 201
LTspiceHelp
Use "XOR" type cross hair cursor: The XOR cursor is a cross
hair that is visible no matter what screen color is behind
the cursor. For example, if the background is black, the
cursor is white and visa versa. But note that it actually
isn't an XOR function, because the cursor is still highly
visible even against a grey background where the XOR'ed
value has all inverted bits but the color is not
distinguishably different. Using the "XOR" cursor is highly
desirable, but not all video hardware and drivers get this
right. Hence LTspice supports an opaque cursor that is in
high contrast to the waveform window background but not
necessarily in high contrast to the plot data. This less
desirable cursor is the installation default since some
hardware can't do the "XOR" cursor properly.
Operation
Operation
174 / 201
LTspiceHelp
175 / 201
LTspiceHelp
RAM for Fast Access Conversion: This allows you to tune memory
usage when you convert waveform data to fastaccess files
format.
Hacks
Hacks
176 / 201
LTspiceHelp
Internet Options
Internet Options
177 / 201
LTspiceHelp
178 / 201
LTspiceHelp
F.A.Q.
Installation Problems
Program Updates
Simulating Transformers
Third-party Models
Inductor Models
MOSFET Models
Efficiency Calculation
Custom Symbols
Memory Problems
Model Compatibility
SPICE Netlist
Paper Manual
Tutorials
Users' Group
179 / 201
LTspiceHelp
SPICE Differentiation
SPICE Differentiation
180 / 201
LTspiceHelp
Installation Problems
Installation Problems
181 / 201
LTspiceHelp
Program Updates
Program Updates
After you have updated your file to the latest version, the
file Changelog.txt in your root installation directory,
usually at C:\Program Files\LTC\LTspiceXVII\Changelog.txt, has
a detailed program revision list.
Can I go back to the old version after I execute the Sync
Release command?
No. All symbols, models, and programs are updated with the
current version. The component databases, standard.*, will be
merged with the new ones automatically. If you added new
inductors or capacitors, your devices will be preserved and
merged with the new ones from the update.
182 / 201
LTspiceHelp
Simulating Transformers
Simulating Transformers
183 / 201
LTspiceHelp
Sure:
iii) Short all but the most inductive winding and measure the
leakage inductance with the DC LCR meter. Adjust the
coupling coefficient to match this, or for the case of
two windings:
K = sqrt(1-Lleak/sqrt(L1*L2))
Lleak = sqrt(L1*L2)*(1-K*K)
v) Enjoy.
What about non-linear Transformers?
Third-party Models
Third-party Models
184 / 201
LTspiceHelp
3. Now either
or
or
3. Either
185 / 201
LTspiceHelp
or
4. Then either
or
186 / 201
LTspiceHelp
Inductor Models
Inductor Models
You first (i) draw at least two inductors and then (ii) define
the K coefficient between the two inductors. See mutual
inductance section.
How do I control the inductor parasitic resistance?
MOSFET Models
MOSFET Models
187 / 201
LTspiceHelp
Yes, you can add your own model in the file %HOMEPATH%
\Documents\LTspiceXVII\lib\cmp\standard.mos. This file is only
for devices defined with a .model statement, not as
subcircuits. If you want to use a subcircuit, follow the
following steps:
Yes, you can distribute the software freely whether you are a
Linear Technology customer or not. See the license section for
more details.
Is it a shareware, freeware or demo?
188 / 201
LTspiceHelp
Efficiency Calculation
Custom Symbols
Custom Symbols
189 / 201
LTspiceHelp
Not very easily. The switching regulator models that ship with
LTspice XVII use a new hardware description language and new
intrinsic SPICE devices designed to encapsulate the behavior
of LTC's switching regulator products. Even if you succeed in
making a model with standard SPICE primitives, the simulation
will run orders of magnitude slower. Note that some people
have made such switching regulator models with standard SPICE
devices. LTspice can run these models and will usually
outperform the simulator for which they were targeted.
Memory Problems
Memory Problems
If you can run Windows, you can run LTspice XVII. We have
spent a great deal of effort in minimizing the memory
requirement of this program. There are no memory leaks. But
waveform data requires memory and that is where people run
into trouble. An x64 OS will be the best choice in this
regard.
Where is the waveform stored during simulation?
All the waveform data are stored on disk. Only the plotted
traces are loaded into RAM. Turning off the marching waveforms
can reduce the memory requirement. Note that for most analysis
types, there is no particular file size limit. You can
generate and view .raw files that are very many Gigabytes in
size.
What if I don't have enough disk space for long simulation?
190 / 201
LTspiceHelp
Model Compatibility
Model Compatibility
SPICE Netlist
SPICE Netlist
Just open the text file first and then run it. LTspice XVII
will recognize the file as a netlist if it has file extension
of ".cir"
191 / 201
LTspiceHelp
Yes. Make the waveform window the active window and use menu
command File=>Export.
But I want the data in equally spaced timesteps. Is there
192 / 201
LTspiceHelp
anyway to do that?
Yes. Do the the FFT of the desired data. Before the FFT, the
data is interpolated to equally spaced time steps. Now do the
FFT on the FFT'ed data. That will recover the equally spaced
time-step data and export that.
But if I do the FFT twice, won't I lose accuracy?
Then enter the number of bins you want to use. LTspice uses a
proprietary FFT algorithm that works for an arbitrary number
of bins.
How is it possible that LTspice's FFT is bit-accurate to
double precision and works for an arbitrary number of bins?
193 / 201
LTspiceHelp
194 / 201
LTspiceHelp
.param t0=.2m
.tran 0 {t0+10/freq} {t0}
195 / 201
LTspiceHelp
.param Freq=15K
Armed with the above technique, one might feel ready to go and
conquer SMPS design with Bode analysis of the feedback loop. I
understand the temptation. It'd be rewarding if one could
traverse the feedback loop identifying the components that
gave rise to the poles and zeros, strategize which zeros to
move to cancel which poles, and synthesize component values
for the compensation network components to achieve a stable
feedback loop. But that's pretty much exactly what you can't
do with this technique or any other frequency domain technique
for a current mode SMPS. Let me explain why.
%HOMEPATH%
\Documents\LTspiceXVII\examples\Educational\FRA\Eg3.asc
196 / 201
LTspiceHelp
197 / 201
LTspiceHelp
The last advice I can offer answers how one can be sure that a
SMPS is stable and operating in current mode. The answer is to
start with the schematic on the front page of the datasheet.
The critical information there are the inductance value,
output filter capacitance, and external compensation component
values. Some datasheets give equations for computing these
values, but I just start with those values and adjust using
time domain simulation to evaluate the response. After all,
the whole point of frequency domain analysis is to improve the
time domain response. With current-mode switchers, it usually
more direct to jump right to time-domain simulation to check
overshoot since stability has already been achieved.
No. But there are reports that LTspice XVII does run on Linux
under WINE.
OK, I've never used WINE, how do I install this?
198 / 201
LTspiceHelp
WINE is doing the best it can with the fonts it finds. It will
do better if you tell it how to find the font files from your
Windows system.
The PWL additional point editor doesn't look right under WINE?
Try using the native Windows .dll from your licensed Windows
system. The command line to then invoke LTspice from WINE is
wine -dll commctrl,comctl32=n XVIIx64.exe.
How does the performance running under Linux compare to
running under Windows?
Every Linux user you ask will tell you that LTspice runs
better under Linux than Windows.
Wow, cool! Does it really?
No.
Paper Manuals
These help pages are the manual. They are set up such that you
can print them in one complete set, but please think of the
environment before doing so.
Then what about a book?
199 / 201
LTspiceHelp
Tutorials
200 / 201
LTspiceHelp
201 / 201