Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Circuit circus

Status
Not open for further replies.

Ratchit

Well-Known Member
No wonder one of the late, great analog gurus did not think Spice was the end all of simulation. You know, the one who eschewed seat belts. Look at this article which compares the models put out by two major semiconductor manfacturers. https://www.google.com/url?sa=t&rct...0eQZpzh2vZ8bB8_OD10hu3g&bvm=bv.53537100,d.aWc .

Then you can read articles that denigrate the models commonly used. https://www.ele.uri.edu/Courses/ele443/tutorials/q2n3904.model/

So I compared three simulators using a two transistor amplifier, and got differences in voltage and currents at the component terminals. The results were not grossly different, but I wonder why those folks cannot agree on what a particular model should be, even if they cannot make a transistor that copies it very well.

Ratch
 
Build the circuit with real parts. Try a hand full of transistors and you will find more vairations. Try transistors from two manafactors. The circuit you chose is very dependent on transistor peramenitors.
 
Rachit,

Any idea on when those links were created?

Fairchilds 2001 datasheet has the 2N3904's spice model as ...

NPN (Is=6.734f Xti=3 Eg=1.11 Vaf=74.03 Bf=416.4 Ne=1.259 Ise=6.734 Ikf=66.78m Xtb=1.5 Br=.7371 Nc=2
Isc=0 Ikr=0 Rc=1 Cjc=3.638p Mjc=.3085 Vjc=.75 Fc=.5 Cje=4.493p Mje=.2593 Vje=.75 Tr=239.5n Tf=301.2p
Itf=.4 Vtf=4 Xtf=2 Rb=10)

It's like anything else in life, you use those models at your own discretion.

How does it replicate against the test circuit shown on the datasheet?
 
Rachit,

Any idea on when those links were created?

Fairchilds 2001 datasheet has the 2N3904's spice model as ...

NPN (Is=6.734f Xti=3 Eg=1.11 Vaf=74.03 Bf=416.4 Ne=1.259 Ise=6.734 Ikf=66.78m Xtb=1.5 Br=.7371 Nc=2
Isc=0 Ikr=0 Rc=1 Cjc=3.638p Mjc=.3085 Vjc=.75 Fc=.5 Cje=4.493p Mje=.2593 Vje=.75 Tr=239.5n Tf=301.2p
Itf=.4 Vtf=4 Xtf=2 Rb=10)

It's like anything else in life, you use those models at your own discretion.

How does it replicate against the test circuit shown on the datasheet?

JoeJester,

I don't know what you mean by replicate. But, does it seem right that the 2N3904 would have a typical beta value (BF) of 416.4 (notice the decimal for this wildly varying parameter)? And, does any transistor have a saturation current (Is) of 6.734 femtoamps? It appears to be a good idea to look at the netlists of any simulator to see what they are using for their models.

Ratch
 
The solution is easy. Modify the model as you see fit. Test it for every possible condition to ensure accurate simulation with whatever simulation programs. Market it, sell it, and guarantee it.

I can tell you I looked at the circuit in your second link ... and I have three different 2N3904 models, the one from Fairchild, one called "spice bjt", and one called "hybrid-p". Each produces different results when using the circuit in your second undated link.

I visited radio shack yesterday by happenstance. They had a bag of 15 transistors, that had included a 2N3904. On the reverse it listed the hfe at 200 while another bag of a single 2N3904 had an hfe of 100. The maximum hfe according to the datasheet is 300.

Here are the three netlists I have for the 2N3904. I use TINA simulation software and have for over a decade.

.MODEL Q_2N3904-FairChild NPN(IS=6.734F XTI=3 EG=1.11 VAF=74.03 BF=416.4 NE=1.259 ISE=6.734 IKF=66.78M XTB=1.5 BR=.7371 NC=2 ISC=0 IKR=0 RC=1 CJC=3.638P MJC=.3085 VJC=.75 FC=.5 CJE=4.493P MJE=.2593 VJE=.75 TR=239.5N TF=301.2P ITF=.4 VTF=4 XTF=2 RB=10)
.END MODEL

.MODEL 2N3904-spice-bjt NPN( IS=9.99F NF=1 NR=1 RE=2.51 RC=1 RB=10 VAF=40 VAR=20 ISE=4.03P ISC=4.03P ISS=0 NE=1.78 NC=1.78 NS=1 BF=679 BR=5 IKF=13.8M IKR=13.8M CJC=3.6P CJE=3.99P CJS=0 VJC=878M VJE=16.1 VJS=750M MJC=307M MJE=2.01 MJS=0 TF=531P TR=69N EG=1.11 KF=0 AF=1 )
.end model

.MODEL 2N3904_hybrid-p NPN(BF=100 BR=1 IS=1F RB=10 RC=0 CJC=7.834P VJC=750M MJC=330M TR=294.4N CJE=9.469P VJE=750M MJE=330M TF=509.7P EG=1.11 VAF=100 XTB=2M KF=0 AF=1 )
.END model

You can confirm the ON state specifications per the datasheet, and see the error each model produces, for you own knowledge ... which was not done by that undated second link. I don't know what model they used other than it was listed as a 2N3904.

Feel free to post your model after your modifications.
 
Joe Jester,

"The solution is easy. Modify the model as you see fit. Test it for every possible condition to ensure accurate simulation with whatever simulation programs. Market it, sell it, and guarantee it.
"

No, that solution is not easy. If I have to modify the model, then what will I end up with? A 2N3904, or something that does not exist? I would not live long enough to test it for every condition. How does marketing, selling, and guaranteeing anything define what kind of transistor I want to evaluate?

"I visited radio shack yesterday by happenstance. They had a bag of 15 transistors, that had included a 2N3904. On the reverse it listed the hfe at 200 while another bag of a single 2N3904 had an hfe of 100. The maximum hfe according to the datasheet is 300."

Radio Shack does not manufacture transistors. They repackage and sell them. I would take anything Radio Shack says with a grain of salt.

"Here are the three netlists I have for the 2N3904. I use TINA simulation software and have for over a decade."

They show widely differences in parameters, which is what I said previously. For instance, the lowest max beta BF parameter varies amoung the models from 100 to almost 700. Is that a 2N3904? And yet, it is used in a simulation program that many folks think is the truth.

"You can confirm the ON state specifications per the datasheet, and see the error each model produces, for you own knowledge ... which was not done by that undated second link. I don't know what model they used other than it was listed as a 2N3904."

As I noted in my first post, I was evaluating the transistor as an amplifier, not a switch. The folks in the second link were concerned that the SPICE simulation did not match their hand calculations. So, if you want to know what model they used, you have to look up what SPICE uses.

If the Semiconductor Industry Association (SIA) https://en.wikipedia.org/wiki/Semiconductor_Industry_Association can define what the minimum parameters a BJT has to meet to be called a 2NXXXX, why can't they agree to publish a standard model for each transistor? What good does it do to even have models in simulation programs if they are not correct?

Ratch
 
Ratchit,

Spice programs use the Gummel-Pool analysis for transistors. Spice f3 uses Gummel-Pool. When some parameters are absent, the analysis reverts to Ebers-Moll.

I can tell you that my software, does not replicate those two examples on that webpage. In fact, looking at the currents in the old example, the beta calculates to 149.86 or 149.89 depending on whether you use (Ie/Ib)-1 or (Ic/Ib), not the 416.4 bF shown in the model. The new example calculates to 204.36 or 204.35. If you look at wiki's article on Gummel-Pool model, you'll find the default values for all the parameters used in the calculation. The Spice f3 manual has all the spice parameters available and their default values.

I take everything I read on the internet with a large grain of salt and smaller grains for all other readings, although at another forum, there have been multiple mistakes from a college text, which could be either the author, the editor, or the typist. Who do you think will get the blame in that scenario?

No, that solution is not easy. If I have to modify the model, then what will I end up with? A 2N3904, or something that does not exist? I would not live long enough to test it for every condition. How does marketing, selling, and guaranteeing anything define what kind of transistor I want to evaluate?

The webpage that you recommended reading suggested the same thing ... modifying the 2N3904 to something that does not exist. Some may use empirical data and modify the model for agreement. In those cases, it is useful, as long as another user of that model knows it's either created or modified by someone, like some of the models you'll find for LTspice at the user's group. Of course, the reputation of an author is at stake at the group. The marketing, selling, and guaranteeing is for you to profit from your hard work of modifying, if you wanted to pursue it.

Using both models as seen on that page did not make a difference in that circuit when compared to the Fairchild model. Do you know the author of that webpage? Have you done the calculations as displayed on that webpage? I wouldn't consider an error of 20.8 percent as a good agreement.

From the Spice f3 manual concerning bjt's ...
The dc model is defined by the parameters IS, BF, NF, ISE, IKF, and NE which determine the forward
current gain characteristics, IS, BR, NR, ISC, IKR, and NC which determine the reverse current gain
characteristics, and VAF and VAR which determine the output conductance for forward and reverse
regions. Three ohmic resistances RB, RC, and RE are included, where RB can be high current dependent.
Base charge storage is modeled by forward and reverse transit times, TF and TR, the forward transit time
TF being bias dependent if desired, and nonlinear depletion layer capacitances which are determined by
CJE, VJE, and MJE for the B-E junction , CJC, VJC, and MJC for the B-C junction and CJS, VJS, and
MJS for the C-S (Collector-Substrate) junction. The temperature dependence of the saturation current, IS,
is determined by the energy-gap, EG, and the saturation current temperature exponent, XTI. Additionally
base current temperature dependence is modeled by the beta temperature exponent XTB in the new model.
The values specified are assumed to have been measured at the temperature TNOM, which can be specified
on the .OPTIONS control line or overridden by a specification on the .MODEL line.

What good does it do to even have models in simulation programs if they are not correct?

Did you create a design, simulate it, and build it, only to find large discrepancies between the simulation and actual? If you didn't design it, where did you get the schematic?

The last simulation I built was in good agreement with the breadboarded circuit. What simulation software do you use?
 
Last edited:
Joe Jester,

"Spice programs use the Gummel-Pool analysis for transistors. Spice f3 uses Gummel-Pool. When some parameters are absent, the analysis reverts to Ebers-Moll."

Yes, those are good analysis models. But, I am not remarking about the way simulation programs do what they do. I am observing that the component models they use vary widely.

"I take everything I read on the internet with a large grain of salt and smaller grains for all other readings, although at another forum, there have been multiple mistakes from a college text, which could be either the author, the editor, or the typist. Who do you think will get the blame in that scenario?"

Of course. The author is responsible for proof reading with respect to mistakes in content.

"The webpage that you recommended reading suggested the same thing ... modifying the 2N3904 to something that does not exist. Some may use empirical data and modify the model for agreement. In those cases, it is useful, as long as another user of that model knows it's either created or modified by someone, like some of the models you'll find for LTspice at the user's group. Of course, the reputation of an author is at stake at the group. The marketing, selling, and guaranteeing is for you to profit from your hard work of modifying, if you wanted to pursue it."

I believe only the manufacturer should be changing the component model parameters. If the user does it, the results might be correct, but they are still bogus. One can get the correct results for the wrong reason. The manufacturers should put out a standard model, and be shamed into revising it if it can be shown to be nonsense.

"Using both models as seen on that page did not make a difference in that circuit when compared to the Fairchild model. Do you know the author of that webpage? Have you done the calculations as displayed on that webpage? I wouldn't consider an error of 20.8 percent as a good agreement."

They knew that component model was bogus, but they should not have tried to "fix" it. I have no idea who posted that page. No, I assumed their hand calculations were correct.

"From the Spice f3 manual concerning bjt's ..."

All those parameter explanations are interesting, but it does not negate the premise that they should be standardized for each semiconductor type.

"Did you create a design, simulate it, and build it, only to find large discrepancies between the simulation and actual? If you didn't design it, where did you get the schematic?

The last simulation I built was in good agreement with the breadboarded circuit. What simulation software do you use? "

I said in my first post that those differences were not large. As for those other questions, what difference does it make? I can expect to get differences if the component parameters are different. I have not yet tested what would happen if I used the same model for each simulator.

Ratch
 
No, I assumed their hand calculations were correct.

So did I ... until I did the calculations. I didn't do the calculations because I suspected them, but to gain an understanding.

I can expect to get differences if the component parameters are different. I have not yet tested what would happen if I used the same model for each simulator.

I would wonder about the simulation software algorithm.

Even my simulation of the three models ... the Fairchild, the old one from that webpage, and the "modified" one from that web page produced the same results and we know a couple of parameters are different on the "modified" model.

I do have the formulas used in the simulation, but I haven't did a spreadsheet on them all yet to confirm they "should" get similar results.
 
Joe Jester,

"Spice programs use the Gummel-Pool analysis for transistors. Spice f3 uses Gummel-Pool. When some parameters are absent, the analysis reverts to Ebers-Moll."

Yes, those are good analysis models. But, I am not remarking about the way simulation programs do what they do. I am observing that the component models they use vary widely.

"I take everything I read on the internet with a large grain of salt and smaller grains for all other readings, although at another forum, there have been multiple mistakes from a college text, which could be either the author, the editor, or the typist. Who do you think will get the blame in that scenario?"

Of course. The author is responsible for proof reading with respect to mistakes in content.

"The webpage that you recommended reading suggested the same thing ... modifying the 2N3904 to something that does not exist. Some may use empirical data and modify the model for agreement. In those cases, it is useful, as long as another user of that model knows it's either created or modified by someone, like some of the models you'll find for LTspice at the user's group. Of course, the reputation of an author is at stake at the group. The marketing, selling, and guaranteeing is for you to profit from your hard work of modifying, if you wanted to pursue it."

I believe only the manufacturer should be changing the component model parameters. If the user does it, the results might be correct, but they are still bogus. One can get the correct results for the wrong reason. The manufacturers should put out a standard model, and be shamed into revising it if it can be shown to be nonsense.

"Using both models as seen on that page did not make a difference in that circuit when compared to the Fairchild model. Do you know the author of that webpage? Have you done the calculations as displayed on that webpage? I wouldn't consider an error of 20.8 percent as a good agreement."

They knew that component model was bogus, but they should not have tried to "fix" it. I have no idea who posted that page. No, I assumed their hand calculations were correct.

"From the Spice f3 manual concerning bjt's ..."

All those parameter explanations are interesting, but it does not negate the premise that they should be standardized for each semiconductor type.

"Did you create a design, simulate it, and build it, only to find large discrepancies between the simulation and actual? If you didn't design it, where did you get the schematic?

The last simulation I built was in good agreement with the breadboarded circuit. What simulation software do you use? "

I said in my first post that those differences were not large. As for those other questions, what difference does it make? I can expect to get differences if the component parameters are different. I have not yet tested what would happen if I used the same model for each simulator.

Ratch

Thanks Ratch

Now you are talking and helping and guiding.
Love it when you do this. We have lots to learn from you still....if not others, me at the very least. A most brilliant read for me. You are indeed gifted. Thank you.

Regards,
tvtech
 
Last edited:
Joe Jester,

I compared the outputs of LTSpice and VisualSpice. I used the same model from LTSpice for both simulators, and was pleased at how closely they matched each other. That does not mean that the model which LTSpice used was any better than the one VisualSpice used, but once the models were equalized, the results were the same. I expect the same for other simulators, and I will check them when I get some time to do so. I still advocate for standardization of semiconductor models.

Ratch
 
Last edited:
I expect a significant variation in the BJT models is the value of the gain used. It may typically be a nominal value but for margin analysis you would likely want the minimum value. Of course a good design would minimize the effects of these gain variations in the circuit operation.
 
Ratch,

Here's another modeling scheme ...
from: IEEE TRANSACTIONS ON ELECTRON DEVICES, VOL. 47, NO. 2, FEBRUARY 2000
A new bipolar transistor model called VBIC has recently been developed and is likely to replace the Gummel–Poon model as the new industry standard bipolar transistor model. This paper focuses on the comparison of the VBIC and Gummel–Poon models under the dc operations. The extraction and optimization procedure coded in S+ statistical language and required for VBIC simulation is also developed and presented.

Who knows if it will become the defacto standard in the coming years.

I agree with crutschow's comments about a well designed circuit. They typically simulate faster than others I've seen posted on the net.
 
Last edited:
Joe Jester,

New models are welcome, but will it play with LTSpice and other simulators? Doesn't sound like it. I, for one, am not going to spend big bucks to run VBIC. Anyway, the future is just a promise, but we have to live with what we have today.
Ratch
 
I still advocate for standardization of semiconductor models.
Hi Ratch,
I would also agree, standardisation of simulation models is essential if we are to have a high degree of confidence when running LTSpice simulations.

E
 
New models are welcome, but will it play with LTSpice and other simulators?

I doubt it will either. That's not the point. You want good models but you want them to run on an engine that doesn't support them. Hybrid pi analysis was introduced in 1969. Ebers-Moll was introduced in 1954. Both are used in the current crop of Spice.

Here is a good article, from 2011, about the various Spice programs. The comments section is pretty good as well. **broken link removed**

Anyway, the future is just a promise, but we have to live with what we have today.

Very true, some wheels turn slowly. VBIC was introduced only a little over a decade ago. Of course a couple of decades ago, there were fast advancements ... from 8088 to Pentiums (the series) ... ARPANET was decommissioned and the internet exploded on the scene. A lot can happen in a decade. Just about everyone went from 2nd grader to graduate. From BBS systems using 300 baud modems to 1.5 MB/s speed modems and forums, like this.

Anyway, your still free to modify or create the models as you see fit, that emulate your designs to meet your needs. That happens in the LTSpice group at yahoo all the time. Some of the models you can't find are created by the users in the LTSpice group.

from **broken link removed**
A SPICE simulation program however is not a "magic box", is not enough to copy an electronic sheet to obtain automatically the right result. Vendor's model libraries are very reliable but often the designer have to model by himself some device, like a transformer, or have to model electronic phenomena that are not related to physical devices but anyways have a big deal with the global circuit. In addition, SPICE is a finite difference numerical method, so there are simulator parameters that is important to learn about to improve the simulation results and avoid convergence problems. This is why professionalism and experience of designers are so important as the reliability of the libraries models.
 
I would also agree, standardisation of simulation models is essential if we are to have a high degree of confidence when running LTSpice simulations.

Don't you think the parameters listed in the Spice f3 manual constitutes a "standardizing" of a model even if all the parameters are not used? LTSpice isn't the only spice out there. It is a custom written Spice that may run other spice models. It doesn't run all models equally well. It may satisfy your needs and yet not satisfy others, as illustrated in the comments of the article I linked in the previous post.

The LTSpice community seems to correct or create models that are not up to the individuals standard. That is the same I've suggested to Ratchit. Ratchit is free to modify any model to make it better and post it at the Yahoo group so all can benefit.
 
Last edited:
Don't you think the parameters listed in the Spice f3 manual constitutes a "standardizing" of a model even if all the parameters are not used? LTSpice isn't the only spice out there. It is a custom written Spice that may run other spice models. It doesn't run all models equally well. It may satisfy your needs and yet not satisfy others.

If your are considering in isolation the LTS models then of course its pretty obvious they are standardised within LTSpice, but thats not the point thats being made.

I mean standardisation across all simulators, so if a guy runs a circuit simulation in Proteus, Visualspice or LTS etc, he would get the same results.
 
If your are considering in isolation the LTS models then of course its pretty obvious they are standardised within LTSpice, but thats not the point thats being made.

No, the Spice f3 manual covers all Spices. Does that mean all Spice models use all those listed parameters? No it doesn't. That is up to the individual programmer. Have you read that article from 2011 and the comments?

How many of the differing results are because of convergence? What is "good enough"? I'm not familiar enough with all the various Spices, free or paid, to ensure the differences are not because of convergence or the software's analysis mode (EM or Hybrid).

Only in a utopia would every spice produce precisely the same results to the "atto" accuracy. But then, in a utopia, we all be using the same Spice and this discussion wouldn't exist.

In the LTSpice "getting started guide" there is this disclaimer
Simulation with the supplied models is fully supported
All bug reports are appreciated and will be resolved
 
Last edited:
Only in a utopia would every spice produce precisely the same results to the "atto" accuracy. But then, in a utopia, we all be using the same Spice and this discussion wouldn't exist.

Many engineering standards do already exist that are universally accepted and used used throughout the industry, I do not expect any level of 'atto' accuracy in any engineering standard, but I would a high degree of compatibility across simulators.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top