The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
Aug 18th, 2024, 2:24am
Pages: 1
Send Topic Print
creating a circuit simulator (Read 6094 times)
vivkr
Community Fellow
*****
Offline



Posts: 780

creating a circuit simulator
Apr 14th, 2009, 3:45am
 
Hi,

I would like to get a few links/references to material which describes the theory and practice of writing a circuit simulator, e.g. SPICE. Note: I have already done some Google searches but would like some more comprehensive material.

Thanks,

Vivek
Back to top
 
 
View Profile   IP Logged
Geoffrey_Coram
Senior Fellow
******
Offline



Posts: 1999
Massachusetts, USA
Re: creating a circuit simulator
Reply #1 - Apr 14th, 2009, 11:11am
 
I don't think there are many people who have done this from scratch.  Maybe you can find the old Spice2 documentation from Berkeley?  There's an awful lot of different pieces that go into a simulator; is there something specific you're looking for?
Back to top
 
 

If at first you do succeed, STOP, raise your standards, and stop wasting your time.
View Profile WWW   IP Logged
vivkr
Community Fellow
*****
Offline



Posts: 780

Re: creating a circuit simulator
Reply #2 - Apr 14th, 2009, 11:36pm
 
Dear Geoffrey,

Thanks for the response. I am not looking for anything specific but indeed for all those awful lot of things that go in. This is purely out of interest since I am not obliged to know all this as a designer.

I would like to know what all goes into a simulator, and code a very simple one on my own in C (or another language, I am not fussy about that) if possible to see if I have assimilated all the concepts. This way, I get to understand the underlying theory as well as the practical aspects.

I found some very basic theory regarding the numerical aspects from the Berkeley website but there was not much here except 8-9 slides explaining how DC simulation works from a mathematical point of view. There are also links to some books but I think that these also cover more the theory of numerical computation which is treated much more comprehensively in books like "Numerical Recipes in C" which I found online.

So if there is some place where I could get all those awful lot of details, then that would be great.

Best regards,

Vivek
Back to top
 
 
View Profile   IP Logged
Andrew Beckett
Senior Fellow
******
Offline

Life, don't talk to
me about Life...

Posts: 1742
Bracknell, UK
Re: creating a circuit simulator
Reply #3 - Apr 15th, 2009, 2:47am
 
There's also:

Steady-State Methods for Simulating Analog and Microwave Circuits (The Springer International Series in Engineering and Computer Science)
by Kenneth S. Kundert (Author), Jacob K. White (Author), Alberto L. Sangiovanni-Vincentelli (Author)

ISBN 978-0792390695

Regards,

Andrew.
Back to top
 
 
View Profile WWW   IP Logged
Geoffrey_Coram
Senior Fellow
******
Offline



Posts: 1999
Massachusetts, USA
Re: creating a circuit simulator
Reply #4 - Apr 15th, 2009, 9:48am
 
and of course "The Designer's Guide to Spice and Spectre"
Back to top
 
 

If at first you do succeed, STOP, raise your standards, and stop wasting your time.
View Profile WWW   IP Logged
vivkr
Community Fellow
*****
Offline



Posts: 780

Re: creating a circuit simulator
Reply #5 - Apr 15th, 2009, 11:55pm
 
Geoffrey_Coram wrote on Apr 15th, 2009, 9:48am:
and of course "The Designer's Guide to Spice and Spectre"


Thanks for all the tips. However, I think this book you mention is more on how to use the simulator rather than how to create one. I have a copy of it and read it once long ago (very useful). The other texts recommended by Andrew might be of more interest. I also found references to those elsewhere.

I was hoping to get hold of some sort of class notes for a course on the subject. It seems though that UCB notes are only accessible to UCB students (quite the opposite of MIT OCW). Anyway, I will look further.

Thanks,

Vivek
Back to top
 
 
View Profile   IP Logged
Geoffrey_Coram
Senior Fellow
******
Offline



Posts: 1999
Massachusetts, USA
Re: creating a circuit simulator
Reply #6 - Apr 16th, 2009, 4:35am
 
Jacob White is at MIT, so I would think you could find some of his course notes (I think it was 6.336), which talks about numerical integration methods and modified nodal analysis.

http://ocw.mit.edu/OcwWeb/Electrical-Engineering-and-Computer-Science/6-336JFall...

I don't know that there is any course on the device models -- there's a lot that goes into setting up the terminals, model parameters, Jacobian stamp, op-point reporting, noise, etc.
I don't think anyone's ever given a course on that.
Back to top
 
 

If at first you do succeed, STOP, raise your standards, and stop wasting your time.
View Profile WWW   IP Logged
rf-design
Senior Member
****
Offline

Reiner Franke

Posts: 165
Germany
Re: creating a circuit simulator
Reply #7 - Apr 20th, 2009, 3:17am
 
The most inspiring book at the beginning of the 80's was this:

L. O. Chua and P. M. Lin, Computer-aided Analysis of Electronic Circuits, Prentice-Hall, 1975

So it gives deep understanding of the solution techniques starting from graph theory going forward to the nodal, modified nodal, hybrid analysis than over to integration methods. It have also very interesting chapters for special solution methods. So homotopy and shooting is already 1975 a textbook documented  technique!

I think there is still space for improvements for circuit simulation.

The point is that in circuit simulation there is not enough money to found solution for the most depemanding problem of mapping sparse matrix methods and sparse integration with multi-timesteps to parallel machines.

To be honest It takes me some years to understand most of the clues of today circuit simulation techniques. Now I also understand what is missing, or what could be improved. But to write your own is a long way. I guess decades for a focused person. That is needed to understand the hole code base with all the math background where you then could add a smaller code feature.
Back to top
 
 
View Profile   IP Logged
analogue_guy
Community Member
***
Offline



Posts: 38

Re: creating a circuit simulator
Reply #8 - Apr 20th, 2009, 11:22am
 
Check this out :

http://qucs.sourceforge.net

in the documentation you can find some theory also ...

Regards

--AG
Back to top
 
 
View Profile   IP Logged
vivkr
Community Fellow
*****
Offline



Posts: 780

Re: creating a circuit simulator
Reply #9 - Apr 21st, 2009, 1:25am
 
Thanks all for the responses:

Geoffrey: I agree that there is a lot of stuff like netlist handling, stamping etc. There used to be a course at the university where I went dealing with all that stuff but at that time, I was not interested in simulation and so never took it. There are also no online notes.

Reiner: Indeed, there must be a lot that can be optimized and improved, and something that one could spend a lifetime on. However, I do not even imagine trying something like this. For me, it is of interest to get the basic knowledge of various practical aspects which go into making a basic simulator. The only aspect which seems to be well covered in books is the theory of numerical computation. The rest of the practical aspects are not even mentioned anywhere, but I want to look at this book by Leon Chua (thanks for the tip).

AG: Thanks for the links. I will go through this and hopefully this is something.

Best regards,

Vivek
Back to top
 
 
View Profile   IP Logged
Pages: 1
Send Topic Print
Copyright 2002-2024 Designer’s Guide Consulting, Inc. Designer’s Guide® is a registered trademark of Designer’s Guide Consulting, Inc. All rights reserved. Send comments or questions to editor@designers-guide.org. Consider submitting a paper or model.