SPICE

Thread Starter

chesart1

Joined Jan 23, 2006
269
Hi,

I'm looking for a book on SPICE that explains concepts and provides examples. Any suggestions would be appreciated.

Thanks in advance,
John
 

Thread Starter

chesart1

Joined Jan 23, 2006
269
Hi JoeJester,

Thank you for the sites. I am learning SwitcherCad III and LTSPICE.

I also have a electronics textbook that has problems at the end of each chapter. Some of the design problems are suppose to be completed using SPICE. Your references will be very useful.

John
 

n9352527

Joined Oct 14, 2005
1,198
Beginners books that I found useful in learning how to use SPICE are:
SPICE by Roberts and Sedra
SPICE: A Guide to Circuit Simulation and Analysis using PSpice by Tuinenga

If you want to delve further in how SPICE works, then Kielkowski book is excellent:
Inside SPICE by Kielkowski

Further reference for internal working of SPICE, especially modelling is the HSPICE manual given by Joe above.
 

JoeJester

Joined Apr 26, 2005
4,390
I don't have access to hSpice, but I would be interested in getting the model parameters for a 2N3904 BJT.

I ran a test using the the different 2N3904 models.

Fairchild, National, and the OrCad models are essentially the same, except the National datasheet has the Ise improperly labeled.

The Motorola model is alot more extensive than the others.

The TINA 2N3904 models consist of a spice model and a hybrid parameter model.

I've only simulated this on the one program [Tina] because I haven't taken the time to learn how to update OrCad's [PSpice] library or Electronics Workbench version 5.1 library.

The genesis of this comparison was the University of Rhode Island's treatise on a new 2N3904 model.

The two attachments are:

A pdf file with the schematics and resultant Ic/Ib graph. Ib as listed is 6 times the value for one circuit.

The second file is a PSpice cir of the circuit I used. The extension was renamed to .txt so it could be loaded here. You can extract the different 2N3904 models, if anyone wishes to do a comparison in another program.
 

n9352527

Joined Oct 14, 2005
1,198
I've attached the 2N3904 model from HSPICE on this post. I hope Synopsis doesn't flip-out and ask this forum to retract it. As you probably know already, simulation results only as good as the models used. The old adage rubbish in, rubbish out is particularly suitable here.

Note that Gummel-Poon does have its limitations, such as constant resistances of Rc and Re without dependency on voltages and currents. This would have little consequences if the device is simulated/biased under typical conditions (i.e. typical datasheet ranges of Ic/Ib) under which those parameters were extracted and fitted. Once the device is operated outside that region, however, the behaviour of the simulated device might not follow the actual device. Saturation, high currents (Ic, Ib, high FG, etc.), or very low currents are particularly problematic. You could see, apart from one model in your simulation, the Ic is linear against Ib which is not the case in real life because Beta varies with Vbe, Vce and Ic (refer to the attached document on Ikf, Ic/Ib v Vbe and Re extractions).

It is just impossible to have a single GP BJT model that is accurate across all operating regions. We usually have different models depending on the biasing conditions/operating regions and select them appropriately during simulation (model binning).

I have other propietary compatible NPN (3904) BJT models for various operating regions (different binnings) where the standard models deviate too much from the actual device. Sadly those are protected and copyrighted under the terms of my particular project and I am not allowed to share them.

One quick hint, when you are simulating saturated devices or devices with high current, play a little bit with Re, Rb and Rc values. Just remember that the model wouldn't be valid for normal operating region anymore.

If you are interested in extraction of GP bipolar model, you could refer to this excellent article from Agilent. It uses IC-CAP for empirical verifications, but the results do apply for all GP BJT models on other flavour of SPICEs.
 

JoeJester

Joined Apr 26, 2005
4,390
What suprises me is the differences between the programs. I would assume [I know a very bad thing to do] that similiar parameters manipulated by the same formulae would produce the same result. I've done the same circuit, in OrCad, Tina, and Electronic Workbench [version 5.1], and OrCad disagreed with the other two ...

N93 ... I agree GIGO applies. It's going to be interesting to see how TINA treats the hSpice model, on the same circuit as the others. I'll be sure and post an updated graph later tonight.
 

n9352527

Joined Oct 14, 2005
1,198
Different SPICEs do have the same formulaes regarding the device models and to some further extent the same methods on solving the linear equations matrices (e.g. Gaussian LU factorisation). However, this is where the similarity ends. There are mathematical techniques that are different across them.

Most devices are not linear, so SPICE has to linearise them to calculate the operating points. These are typically done using many Newton-Raphson iterations, but could be done differently on various SPICEs. Some emphasise on convergence instead of accuracy and implement different linearisation techniques and vice versa. So we have a compromise here. Convergence tolerance could also affects the accuracy. Linearisation error would result in erroneous operating condition.

Another difference is on how SPICE compute the steps, where numerical integration is necessary. Some of them use trapezoidal, others use different techniques. Again, compromising the accuracy.

Both of the above differences could contribute to a large percentage of error. Iterations and numerical integrations are error prone, they accumulate small errors into a large one.

I would guess that OrCAD and HSPICE would be quite close in results for the same BJT model. They did spend a lot of effort on the sim engine development and fine tuning the mathematical techniques. This is the main difference between a high end packages and general ones. It is not just model parameters (which could be transferred across easily), but the quality of sim engine also have effects on accuracy.

We did a comparison a few years back between OrCAD (it was still PSpice back then) against HSPICE (before Synopsis bought Avant!) mostly for MOS circuits with L3 and found that HSPICE did edge out PSpice on accuracy, convergence, model support and optional model configurations. PSpice was also late in supporting BSIM3, which was a factor back then. HSPICE interfaces, however could only be described as rudimentary.

I would be interested in seeing the results from your comparisons. Maybe a simple transfer characteristics on different SPICEs or beta against Ic for constant Vce showing the knee?
 

Dave

Joined Nov 17, 2003
6,969
Originally posted by n9352527@Feb 17 2006, 10:14 AM
SPICE by Roberts and Sedra
Sedra also co-wrote Microelectronic Circuits (currently in 5th Edition) with Smith. This book is a superb general microelectonics book, but each section focuses on SPICE examples to cement the concepts - worthwhile looking at. If you buy the book it comes with OrCAD's family release which includes many SPICE utilities.

There are several online references you could look for - I found an OrCAD users guide for SPICE, a 14MB 610 page pdf!

Dave
 

Dave

Joined Nov 17, 2003
6,969
Originally posted by haditya@Feb 21 2006, 01:23 PM
an empty (my) mind is a devils workshop
wat about having a spice tutorial on AAC?
[post=14243]Quoted post[/post]​
Sounds a good idea, you are best making the suggestion in the AAC - Feedback and Suggestions forum where the site admin and writers are more likely to see it. Put a link from this topic as a lead in.

Dave
 
Top