Editing SPICE Models

Thread Starter

Ian0

Joined Aug 7, 2020
9,670
I've downloaded @Bordodynov 's transistor model library for my Germanium amplifier project, but I need a greater variety of power transistors. I found the link on a 2017 post by @Richard0 entitled "Does anyone have SPICE models for Germanium transistors.
If I have the datasheet, how would I edit a SPICE model?
The 2N242 looks like a good starting point, and I can find transistors on Ebay which have similar power and gain, but are rather faster. (GT901, GT905, GT806 etc)
The TF and TR parameters appear to vary with fT. Could I just scale them appropriately and get a serviceable model?
I also needed a small signal NPN HF transistor model so I copied GT322 and renamed it GT311 after changing PNP to NPN - I'm assuming it is close enough given the tolerances of germanium transistor parameters. The value of BF (which I understand is equivalent to beta (Hfe) on the GT308 seems rather optimistic at 800.
 

Bordodynov

Joined May 20, 2015
3,177
BF is not Beta (current gain). Beta<BF. I made these models myself and selected the parameters of the germanium models so that the gain behavior of the transistors would correspond to that of the real transistor. Unfortunately, I don't have enough reference parameters to create the models.
 

Papabravo

Joined Feb 24, 2006
21,159
Several papers are extant on the internet on the subject of creating models from datasheets. I believe the consensus is that there is not enough information on a traditional datasheet to accurately model most semiconductor devices. The best you can hope for is an approximate behavioral model that is consistent with the datasheet. The reason for this is that a complete model requires measurement of actual devices produced by the particular manufacturer's process. This information is seldom if ever provided on datasheets. For example, one can find over a dozen different models for the TIP31 power transistor. Sadly, none of them produce, consistent simulation results. I have to wonder at the provenance of these various models and their total lack of consistency. Who produced them, and why?

You will be well served to regard any simulation results with a jaundiced eye, until you can compare those results with actual implementations.

The following paper on understanding model parameters may be of interest.

I don't know if Alex @Bordodynov has similar thoughts or not
 

Attachments

Thread Starter

Ian0

Joined Aug 7, 2020
9,670
Thanks both of you. I'd not really succeeded in finding an explanation of the SPICE transistor parameters. I understand how wide parameter-spread is for germanium, so I've not got my hopes too high! I'm hoping to get as close as "Worth Trying" or "Not Worth Trying". I'm not a great fan of SPICE much preferring to build something and try it, I regard it as a tool for weeding out the non-starters!
 

Bordodynov

Joined May 20, 2015
3,177
See the first model approximation:
.model P217G pnp bf=150 br=4 eg=0.72 cje=500p cjc=900p tf=1u tr=2.u is=50u ikf=2. nk=0.75 vaf=50 mje=0.5 mjc=0.5 rb=5 rbm=2.5 irb=10m re=50m rc=35m ise=10u ne=1.6 isc=300u nc=1.3 BVcbo=61 nBVcbo=4 BVbe=16 Ibvbe=1m mfg=GERMANIUM_USSR
.model GT901B pnp bf=700 br=4 eg=0.72 cje=10n cjc=800p tf=3n tr=1.u is=150u ikf=3. nk=0.5 vaf=50 mje=0.5 mjc=0.333 rb=3 rbm=0.1 irb=10m re=50m rc=35m ise=90u isc=350u ne=1.8 nc=1.3 BVcbo=75 nBVcbo=4 BVbe=0.6 Ibvbe=1m mfg=GERMANIUM_USSR
.model GT905A pnp bf=800 br=4 eg=0.72 cje=10n cjc=800p tf=3n tr=1.u is=150u ikf=3. nk=0.6 vaf=50 mje=0.5 mjc=0.333 rb=3 rbm=0.1 irb=10m re=50m rc=35m ise=15u isc=350u ne=1.4 nc=1.3 BVcbo=75 nBVcbo=4 BVbe=0.6 Ibvbe=1m mfg=GERMANIUM_USSR
 

Thread Starter

Ian0

Joined Aug 7, 2020
9,670
Thank you - that is very generous.
Still a bit puzzled by BF. Am I correct in thinking that parameters like IKF and NK interact with BF to achieve a closer match the Ic vs. hFE curve?
 

ericgibbs

Joined Jan 29, 2010
18,766
hi Ian,
I would suggest you open the LTS standard.bjt file using a text editor.
Copy and Paste back into the same file a transistors listing close to the type of interest.
Rename the Pasted version to say MyBJT.
If you paste your version at the top of the file listing, it will appear at the top when Selecting a new type.

Open a regular asc file and use MyBJT as your test transistor.

You can then modify BF etc , values using a text editor, run sims to see the effect of your BF changes.

You may have to restart LTS when changing some features.

E.

BTW: An Ideal diode MyDiode is also a 'handy' for some work, ie: no forward voltage drop, etc..
.model IdealD1 D(Ron=1 Roff=1Meg Vfwd=0.001Vrev=100 Ilimit=1 RevIlimit=1)

BJT example; [ was BC547]
.MODEL MyBJT NPN(IS=1.533E-14 ISE=7.932E-16 ISC=8.305E-14 XTI=3 BF=178.7 BR=8.628 IKF=0.1216 IKR=0.1121 XTB=1.5 VAF=69.7 VAR=44.7 VJE=0.4209 VJC=0.2 RE=0.6395 RC=0.6508 RB=1 RBM=1 IRB=1E-06 CJE=1.61E-11 CJC=4.388p XCJC=0.6193 FC=0.7762 NF=1.002 NR=1.004 NE=1.436 NC=1.207 MJE=0.3071 MJC=0.2793 TF=4.995E-10 TR=1m2 ITF=0.7021 VTF=3.523 XTF=139 EG=1.11 VCEO=50 ICRATING=100m MFG=PHILIPS)
 
Last edited:

Thread Starter

Ian0

Joined Aug 7, 2020
9,670
I've had a look with the text editor, and found a few explanations of the parameters on the internet - some rather better than others!
 

ericgibbs

Joined Jan 29, 2010
18,766
hi Ian,
Another way which is more dynamic.
In the MyBJT listing of the transistor change BF= ... to BF={MyBF} [ use a text editor in standard.bjt]
Then in your asc file use the .param statement.
E
 

Attachments

ericgibbs

Joined Jan 29, 2010
18,766
hi,
If you are interested in the meaning of the BJT params, look here.
http://ltwiki.org/index.php?title=Q_Bipolar_transistor

E

Added:
A quick tip if you are not already aware
When using F3 to draw connecting wires between components on your asc drawing.

Press F3 place your cursor at one end of a group components that require connecting, draw a continuous line thru the components, LTS will remove the line drawn thru a component, leaving the components connected.
 
Last edited:
Top