LTspice folder/file structure and SPICE model type
This article explains in detail the folder / file structure of LTspice and the types of SPICE models as the basic knowledge of SPICE models.
The SPICE model is simply an electronic part on LTspice. If you want to use the SPICE model provided by the parts manufacturer or your own SPICE model, it is better to learn the basic knowledge of the SPICE model to be introduced.
LTspice folder/file structure
Before going into the SPICE model, let's first understand the folder and file structure of the latest version of LTspice XVII.
- C:\Users\USER\Documents\LTspiceXVII
- \examples: Stores example schematic file
- \lib
- \cmp: Store data file
- \standard.res: Resistor
- \standard.cap: Capacitor
- \standard.ind: Inductor
- \standard.bead: Ferrite bead
- \standard.dio: Diode
- \standard.bjt: Bipolar transistor
- \standard.jft: J-FET
- \standard.mos: MOS-FET
- \sub: Store sub file and lib file
- \*.sub: Sub file
- \*.lib: Lib file
- \sym: Store schematic symbol file
- \*.asy: Schematic symbol file
- \cmp: Store data file
Especially the cmp folder, sub folder, sym folder and the files under it that make up the lib folder are important for understanding the SPICE model.
SPICE model type
SPICE models can be roughly divided into two types: device models(parameter models) and sub-circuit models(equivalent circuit models).
- Device model(parameter model): Netlist notation starts with ".model"
- Sub-circuit models(Equivalent circuit models): Netlist notation starts with ".subckt"
Device model(parameter model)
The device model is a SPICE model in which netlist notation starts with ".model" and is represented only by model parameters.
As the electrical characteristics are expressed only by the model parameters, there is a limit to the accuracy compared to the sub-circuit model.
In LTspice, eight types of data files that are device models are stored in the cmp folder as follows.
- Passive component parts
- standard.res: Resistor
- standard.cap: Capacitor
- standard.ind: Inductor
- standard.bead: Ferrite bead
- Active component parts
- standard.dio: Diode
- standard.bjt: Bipolar transistor
- standard.jft: J-FET
- standard.mos: MOS-FET
Also, the data files are associated with schematic symbol files(*.asy) in the sym folder so that these device models can be used in the schematic.
For how to add a device model(.model), please see the following article.
Sub-circuit models(Equivalent circuit models)
The sub-circuit model is a SPICE model in which netlist notation starts with ".subckt" and is expressed by combining equivalent circuits.
In LTspice, sub files and lib files of subcircuit model are stored in the sub folder.Other than that, the file of the subcircuit model has multiple extensions.
- *.sub: Most common file format of sub-circuit model
- *.lib: Composed of multiple SPICE model files(including device models)
- *.mod: Equivalent to lib file
- *.cir: Equivalent to lib file
- *.txt: It is necessary to change the extension to ".lib" because it can not be used as it is
The sub-circuit models provided by each part manufacturer are mostly ".lib" extensions, but may be provided with multiple extensions as described above.
However, the usage is basically the same, and it can be used as a SPICE model by storing it in a sub folder.
In addition, sub files and lib files are associated with schematic symbol files(*.asy) in the sym folder so that these subcircuit models can be used in the schematic.
For how to add a subcircuit model(.subckt), please see the following article.
Files with the extension "* .lib" may be device models as well as subcircuit models.
Therefore, it is necessary to open the lib file with Notepad etc. and determine the device model or subcircuit model from the netlist notation.
There are various circuit simulators other than LTspice, and extensions for each circuit simulator exist as follows.
- PSPICE extension: *.net *.olb
- TSPICE extension: *.sp
- Spectre extension: *.scs
etc.
Note that files with these extensions can not be used with LTspice.