Spice simulation

MJL21193 said:
Not really true. Some models have problems, but you don't end up with useless results. There have been many warnings about the ONsemi models (BD139/140 among them).

Simulation gives distortion figures that are very close to the real thing. In fact, I find the simulation errs on the side of caution, and the real circuit may well have lower distortion than predicted.

For example: my predicted distortion for this amp (Andrew, you were involved) was <.010%. The results were better than that.

Nice to design on paper, but using a simulation would be the next logical step, certainly before building it.

:yes::yes::yes:
 
lumanauw said:
This is with the BD139-BD140 model from ONsemi. This looks too good. Also, why is the input point (IN) becomes distorted with this model usage?

I'm confused. Which is the model closer to reality?

If you have set an output impedance to the signal source, it is completely correct that the IN becomes distorted by the unlinear load from the bjt.
If you do not have set an output impedance to the signal source, uninstall your simulation software and look for another program...

Mike
 
AndrewT said:
Hi,
the predictions are only as good as the models (data) input into the equations.
Different models will give different results.
Wrong models will give useless results.

Trying to get distortion results from these simulators is stretching the manufacturers' standard models to or beyond their limits.

That's why the experienced among us say design, build, test.


I don't completely agree, but I see your point. BJT models generally seem safer than some of the MOSFET models. It is also very important when comparing performance from two manufacturers' models to make sure the operating points come out right and equivalent. Some manufacturers don't get the Ic-Vbe characteristic right (I really can't understand why), but that alone can throw things off, yet can be corrected to give some useful results with some judicious tweaking.

I would say, experienced among us design, simulate, build, test, listen, iterate.

Cheers,
Bob
 
lumanauw said:
Hi, Everybody,

I'm learning simulation. I try to simulate this simple pushpull cct. The signal generator is 10khz, 1V. The FFT is with 10khz fundamental frequency.

I got very different FFT result with BD139-BFD140 model from 2 manufacturers (with exactly the same CCT). Which is the right one?

This is the CCT being simmed.

I'm glad to hear that you're "taking the plunge" into simulation, David. I think that you will will find it to be quite useful, as well as a viable tool, and a great toy, for learning and experimenting.

So... which simulation software will you be using, until you're persuaded to try LTspice? ;-)

Yes, the Fairchild models are the better ones, for BD139 & BD140. I found that out the hard way, wasting perhaps a whole day, before finding Post #8 in the following thread:

http://www.diyaudio.com/forums/showthread.php?s=&postid=1009747&highlight=#post1009747

Regarding elevated THD of ideal voltage source used as input: One way I can have an elevated THD (above .00001%) for such a source is by forgetting to turn off the data-compression feature, in LTspice, in one of the rare cases where I don't have a spice directive on my schematic, to automatically turn it off.

From my experience with LTspice, it seems that THD calculations can also generally be significantly-affected by the "MAX TIMESTEP" setting for spice's internal "solver". I usually set an initial Max Timestep to something like {1/(1000*freq)}, and then increase the "1000" factor until THD no longer changes significantly.

The Max Timestep also affects ALL of the calculations and modeling that are done, similarly. So it should be set to something less than some fraction of the highest frequency you expect the simulator to be able to resolve, in order to get reliable results.

Regarding your simulator "jamming" when using the Zobel network: If you don't have at least a small value set for the ESRs of the capacitors in your circuit, it can make it more difficult for spice to converge on a solution. The same thing goes for the DCR of inductors. I don't see how the cap ESR could be a problem, with a Zobel, since there's already a series resistance, there. But perhaps there's something else in your circuit that is causing a similar type of problem. I suppose it could even be a Max Timestep that is not small-enough. Along the same lines, if you use a pulse input, make the rise and fall times at least slightly more than zero. Does it do the same thing with the Fairchild models for the BD139 & BD140?

After a short learning curve, I hope that you find using the simulator very rewarding, David.
 
Hi, Gootee,

Yes, I'm still at the very early page of learning. There are many tricks that I don't know about. I'm using DXP2004 simulator.

With arbitrary manufacturer's model, I can see that SIM could be usefull in knowing the "delta" (change) of the result when a parameter/ or design is changed (Like RDF said). The "absolute" result depends on the accuracy of the model, but the "delta", where the result trend goes to , when something is changed, can be seen immediately using SIM.
 
Administrator
Joined 2004
Paid Member
Hi Tom,
We also need to get some magazines, like EDN et al, to write articles that could help convince the manufacturers that having spice models (and good spice models, at that) might _INCREASE SALES_ of their components.
Contacting EDN is an excellent idea. Since great expense was expended making the simulators available to the world, some effort in producing models seems reasonable.

This actually sounds like an interesting series of articles for EDN to run, and they are hitting their target audience.

-Chris
 
lumanauw said:
Are you saying the Fairchild model is the right one?
This is the Fairchild model : http://www.fairchildsemi.com/models/PSPICE/Discrete/Bipolar_Transistor.html
This is the OnSemi model : http://www.onsemi.com/PowerSolutions/supportDoc.do?type=models
Look for BD139-BD140 models.


I comment on both the OnSemi and Fairchild BD139/140 here:
http://www.diyaudio.com/forums/showthread.php?postid=1290867#post1290867

At least one of the OnSemi models seems to be completely defective. The Fairchilds are much better, I use them often, but they are far from perfect. The more models I look at, the more problems that I find.

Pete B.
 
teodorom said:
Pete,
how can you say that Fairchild models are far better than the OnSemi ones ? The plot of Hfe versus Ic is disgusting for both !


LOL, yeah I guess I was trying to be generous, LOL!
I'm having trouble finding any good models!

As bad as they are, many are usable, with caution, say in the linear region at least for rough work anyway. Some are completely defective.

I agree, it is a serious problem, they need an independent verify phase before they release models. Very basic QC.

Pete B.