|
发表于 2012-5-2 18:45:05
|
|阅读模式
http://www.simonbramble.co.uk/lt ... pice_tutorial_4.htm
LTSpice is not limited to simulating Linear Technology parts. Third party models can be imported into LTSpice too. There are 2 types of model that can be imported into LTSpice:
.MODEL parts - these are simple components such as transistors and diodes
.SUBCKT parts - these are more complex parts made up of simpler Spice parts (diodes, transistors, resistors etc)
It is important to note that LTSpice looks at the first line of the SPICE model to determine how the model should be handled. If the part is defined with a .MODEL statement, importing the model is handled one way; if the part is defined with a .SUBCKT statement, importing the model is handled in a slightly different way. Thus we could import 2 identical diodes, one defined with a .MODEL statement and one defined with a .SUBCKT statement and they are actually handled differently. LTSpice looks at the model definition, NOT the component to determine how to import the part.
.MODEL parts:
To import a simple third party SPICE model into LTSpice using the .MODEL directive , follow these steps:
Add a generic component to the schematic that represents the symbol of the SPICE model
Download the SPICE model into the same directory as the circuit you are simulating.
Make a note of the filename of the SPICE model, including the file extension.
Add a .include SPICE directive to the schematic that will use the model
Open the SPICE model and note the name of the model - this is the text immediately after the .MODEL directive and before the part designator (in the case below this is the text DI_SBG1030L). The SPICE model can be viewed from within LTSpice.
Press <CTRL> then right click over the generic component and change the 'Value' field to the SPICE model name
Ensure the .include SPICE directive contains the exact filename of the SPICE model
Ensure the name of the generic component exactly matches the SPICE model name
http://www.simonbramble.co.uk/lt ... pice_tutorial_4.htm
.SUBCKT - Begin Subcircuit Definition
General Format :
.SUBCKT |name| {node ...}
.SUBCKT declares that a subcircuit of the netlist will be described
until the .ENDS command. Subcircuits are called in the netlist by
'X'. |name| is the subcircuit's name. {node ...} is an optional
list of nodes local only to the subcircuit and used for connection
on the top level. Subcircuits can be nested (can have 'X' inside),
but cannot be recursive.
Example :
.SUBCKT RES10 1 2 3
R 1 2 10
C1 1 3 1p
C2 2 3 1p
.ENDS
A subcircuit RES10 is described as a resistor with parasitic
capacitors whose body (or tub) can be hooked up to any node.
http://www.5spice.com/Subckts.htm
|
|