Good tutorial how to create new model in ltspice

Thread Starter

richardm1955

Joined Jan 11, 2019
7
Hi everyone,
I have been looking for some tutorial or book where I can find information how to create my own LTSpice model. I would like to understand what symbol in the model mean. For example, there is below code for BAT64 diode:
* Infineon Technologies Discrete & RF Semiconductors *
* SPICE2G6 Model: Schottky Diode BAT64 series (Chip model) *
* Filename: D357_v7.txt * *
.SUBCKT D357 1 2
D1 1 2 D1
R1 1 2 440e6
.MODEL D1 D(IS=4.7n N=1.022 RS=1.6 XTI=2 EG=0.69
+ CJO=5.7p M=0.445 VJ=0.436 FC=0.5 TT=10.0p BV=42 IBV=10.0u)
.ENDS D357
I mean all symbols inside of MODEL D1 brackets: IS, N, RS, etc...

Thank you in advance for any help.
Regards,
Richard
 

Papabravo

Joined Feb 24, 2006
21,165
The syntax of the spice line is relatively straightforward.
  1. The lines beginning with an asterisks '*" are comments and are ignored by the spice engine.
  2. .SUBCKT and .ENDS define the beginning and end of a sub-circuit definition. D357 is the unique name of the subcircuit, and it is by this name that the sub-circuit may be invoked from a higher level. The 1 and the 2 are the identifiers for the externa connections of the subcircuit.
  3. D1 12 D1 looks confusing. The D1 at the beginning of the line is a reference designator for the subcircuit. It connects to noes 1 & 2 the external connections of the subcircuit and is defined by .MODEL D1, which is the second D! on that line.
  4. R1 1 2 440e6 is a resistor with reference designator R1, connected between the external nodes 1 & 2 and having a value of 440 MΩ, which is bigger than any resistor you can buy.
  5. .MODEL D1 D(...................) defines a model named D1 and it is a type of diode indicated by the D(......).
  6. What is in the parentheses is a list of parameters that are particular to the definition of a diode. Here is a page from the LTspice Help file.
D. Diode
Is saturation current A 1e-141e-7
Rs Ohmic resistance Ω 0.0 10.
N Emission coefficient - 1.0 1.0
Tt Transit-time sec 0.0 2n
Cjo Zero-bias junction cap. F 0.0 2p
Vj Junction potential V 1.0 0.6
M Grading coefficient - 0.5 0.5
Eg Activation energy eV 1.11 1.11 Si
0.69 Sbd
0.67 Ge
Xti Sat.-current temp. exp - 3.0 3.0 jn
2.0 Sbd
Kf Flicker noise coeff. - 0.0
Af Flicker noise exponent 1. 1.0
Fc Coeff. for forward-bias depletion capacitance formula- 0.5
BV Reverse breakdown voltage V Infin.40.
nbv Reverse breakdown emission coefficient - 1.0 2.0
Ibv Current at breakdown voltage A 1e-10
Ibvl Low-level reverse breakdown knee current A 0.0
nbvl Low-level reverse breakdown emission coefficient - 1.0
Tnom Parameter measurement temp. °C 27 50
Isr Recombination current parameter A 0.0
Nr Isr emission coeff. - 2.0
Ikf High-injection knee current A Infin.
Tikf Linear Ikf temp coeff. /°C 0.0
Trs1 linear Rs temp coeff. /°C 0.0
Trs2 Quadratic Rs temp coeff. /°C20.0
Tbv1 Breakdown voltage temp coeff. /°C 0.0
Tbv2 Quadratic breakdown voltage temp coeff. /°C20.0
PerimDefault perimeter m 0.0
Isw Sidewall Is A 0.0
ns Sidewall emission coefficient - 1.0
Rsw Sidewall series resistance Ω 0.0
Cjsw Sidewall Cjo F 0.0
Vjsw Sidewall Vj V Vj
mjsw Sidewall mj - 0.33
Fcs Sidewall Fc - Fc
Vp Soft reverse recovery parameter - 0.0 0.65
 

Thread Starter

richardm1955

Joined Jan 11, 2019
7
Thank you for all your links. I know there are a lot of information about general LTSpice simulation program but I asked about specific topic how to understand code in component models and those sources did not say too much about it.
 

Thread Starter

richardm1955

Joined Jan 11, 2019
7
The syntax of the spice line is relatively straightforward.
  1. The lines beginning with an asterisks '*" are comments and are ignored by the spice engine.
  2. .SUBCKT and .ENDS define the beginning and end of a sub-circuit definition. D357 is the unique name of the subcircuit, and it is by this name that the sub-circuit may be invoked from a higher level. The 1 and the 2 are the identifiers for the externa connections of the subcircuit.
  3. D1 12 D1 looks confusing. The D1 at the beginning of the line is a reference designator for the subcircuit. It connects to noes 1 & 2 the external connections of the subcircuit and is defined by .MODEL D1, which is the second D! on that line.
  4. R1 1 2 440e6 is a resistor with reference designator R1, connected between the external nodes 1 & 2 and having a value of 440 MΩ, which is bigger than any resistor you can buy.
  5. .MODEL D1 D(...................) defines a model named D1 and it is a type of diode indicated by the D(......).
  6. What is in the parentheses is a list of parameters that are particular to the definition of a diode. Here is a page from the LTspice Help file.
D. Diode
Issaturation currentA1e-141e-7
RsOhmic resistanceΩ0.010.
NEmission coefficient-1.01.0
TtTransit-timesec0.02n
CjoZero-bias junction cap.F0.02p
VjJunction potentialV1.00.6
MGrading coefficient-0.50.5
EgActivation energyeV1.111.11 Si
0.69 Sbd
0.67 Ge
XtiSat.-current temp. exp-3.03.0 jn
2.0 Sbd
KfFlicker noise coeff.-0.0
AfFlicker noise exponent1.1.0
FcCoeff. for forward-bias depletion capacitance formula-0.5
BVReverse breakdown voltageVInfin.40.
nbvReverse breakdown emission coefficient-1.02.0
IbvCurrent at breakdown voltageA1e-10
IbvlLow-level reverse breakdown knee currentA0.0
nbvlLow-level reverse breakdown emission coefficient-1.0
TnomParameter measurement temp.°C2750
IsrRecombination current parameterA0.0
NrIsr emission coeff.-2.0
IkfHigh-injection knee currentAInfin.
TikfLinear Ikf temp coeff./°C0.0
Trs1linear Rs temp coeff./°C0.0
Trs2Quadratic Rs temp coeff./°C20.0
Tbv1Breakdown voltage temp coeff./°C0.0
Tbv2Quadratic breakdown voltage temp coeff./°C20.0
PerimDefault perimeterm0.0
IswSidewall IsA0.0
nsSidewall emission coefficient-1.0
RswSidewall series resistanceΩ0.0
CjswSidewall CjoF0.0
VjswSidewall VjVVj
mjswSidewall mj-0.33
FcsSidewall Fc-Fc
VpSoft reverse recovery parameter-0.00.65
Thanks for it very much but I need more information about all those parameters work in the specific model. I need to create equations based on those parameters to calculate.
 

Papabravo

Joined Feb 24, 2006
21,165
Thank you for this but this link does not work for me. I can not open it.
That's because you don't open the link you just click on it and it does the google search for you - automatically
To do it manually, enter "DeviceParametersInSPICE filetype:pdf" in the search bar.

The smiley faces replaces the characters ":" and "p"
 

dcomer

Joined Aug 21, 2015
3
Hi everyone,
I have been looking for some tutorial or book where I can find information how to create my own LTSpice model. I would like to understand what symbol in the model mean. For example, there is below code for BAT64 diode:
* Infineon Technologies Discrete & RF Semiconductors *
* SPICE2G6 Model: Schottky Diode BAT64 series (Chip model) *
* Filename: D357_v7.txt * *
.SUBCKT D357 1 2
D1 1 2 D1
R1 1 2 440e6
.MODEL D1 D(IS=4.7n N=1.022 RS=1.6 XTI=2 EG=0.69
+ CJO=5.7p M=0.445 VJ=0.436 FC=0.5 TT=10.0p BV=42 IBV=10.0u)
.ENDS D357
I mean all symbols inside of MODEL D1 brackets: IS, N, RS, etc...

Thank you in advance for any help.
Regards,
Richard
This may be a bit late; hope you see this if you are still in need.

There a several good books on device modeling for SPICE. Depending on the version of Spice (LTspice/TI spice/NI spice/etc.) your models will have various caveats. However to answer you question about good books, here you go:

1. Giuseppe Masspbrio and Paolo Antognetti, "Semiconductor Device Modeling with SPICE", 2nd ed., ISBN 0-07-002469-3
2. J. Alvin Connelly and Pyung Choi, "Macromodeling with SPICE", ISBN 0-13-544941-3
3. Ron Kielkowski, "Inside SPICE - Overcoming the Obstacles of Circuit Simulation", ISBN 0-07-911525-X
4. Ron Kielkowski, "SPICE Practical Device Modeling", ISBN 0-07-911524-1

These are the books that I have in my library. I used to design IC's for TI and later Signetics/Philips Semiconductors. I modeled process parameters while at TI and have used SPICE since 1983. Not an expert, but definitely a fan.

Good luck,

Dave
 

Thread Starter

richardm1955

Joined Jan 11, 2019
7
Thank you Dave for this. Do you know which one could be the best one? Do you also know where I could get them at the best price? Amazon?
 

Thread Starter

richardm1955

Joined Jan 11, 2019
7
I think the last one would be the best. I have checked in Amazon. It is available there but there is problem to deliver it from the states to Poland because I live in Poland.
 

dcomer

Joined Aug 21, 2015
3
I think the last one would be the best. I have checked in Amazon. It is available there but there is problem to deliver it from the states to Poland because I live in Poland.
Paolo Antognetti's book is the most extensive with Ron Kielkowski's "Practical Device Modeling" a bit more practical. Keep in mind that these books can get intensive into device physics, so, depending on your background they may be more than what you need. You are the best judge of your situation. You may want to investigate YouTube videos or search the Internet for "device modeling course university" or similar, coupled with experimenting with LTSPICE. UC Berkely may have something along these lines as may MIT. I'm not sure. If you have any BJT's or MOSFETs handy, and depending on how deep you want to dive into modeling, there is a "low cost" (about 50 euro) semiconductor analyzer (https://www.peakelec.co.uk/acatalog/dca55-atlas-dca-semiconductor-analyser.html) that, along with a PC, can give you decent curves of low-power BJT, (e.g. 2N2222), diodes, MOSFETs. You could set up a spice run simulating what the DCA55 does and experiment with the SPICE model. Note that these are just off-the-cuff suggestions. I couldn't promise you this would do what you wanted, but this is pretty much what I do for hobbyist tinkering. Just thoughts....
 

Thread Starter

richardm1955

Joined Jan 11, 2019
7
Paolo Antognetti's book is the most extensive with Ron Kielkowski's "Practical Device Modeling" a bit more practical. Keep in mind that these books can get intensive into device physics, so, depending on your background they may be more than what you need. You are the best judge of your situation. You may want to investigate YouTube videos or search the Internet for "device modeling course university" or similar, coupled with experimenting with LTSPICE. UC Berkely may have something along these lines as may MIT. I'm not sure. If you have any BJT's or MOSFETs handy, and depending on how deep you want to dive into modeling, there is a "low cost" (about 50 euro) semiconductor analyzer (https://www.peakelec.co.uk/acatalog/dca55-atlas-dca-semiconductor-analyser.html) that, along with a PC, can give you decent curves of low-power BJT, (e.g. 2N2222), diodes, MOSFETs. You could set up a spice run simulating what the DCA55 does and experiment with the SPICE model. Note that these are just off-the-cuff suggestions. I couldn't promise you this would do what you wanted, but this is pretty much what I do for hobbyist tinkering. Just thoughts....
Thank you so much for taking your precious time writing this for me. I appreciate it very much and as you suggested I will try to look for some youtube tutorials about spice modelling and hopefully I will find something useful.
 
Top