etheory

How to go from measurement to Spice models
« on: February 27, 2013, 09:42:42 PM »
To those with more electronics experience than me, does the following exist?

I take a set of measurements, say using a curve tracer, or whatever else I can use to measure whatever curves I require of a device (say it's a BJT).

I feed the data into a program and it spits out a representative Spice model.

I am absolutely sure this is possible, at least technically.
I am also aware that a model is just that, a model, and it's still an approximation to a physical transistor.
However, logic tells me it should be a BETTER approximation than some random model of that part off of the internet, however.

I've spent a little bit of time doing some research on how easy this might be, but are there any existing tools to do this that you have used? Either hardware or software? That can produce spice model parameters directly?

Or if not, are there any mathematicians/computer scientists in the building who could point me to a paper I could implement for myself?

cheers.


ruffrecords

Re: How to go from measurement to Spice models
« Reply #1 on: February 28, 2013, 05:21:36 AM »
Not sure about BJTs but there is a program called Curve Captor that can be used in exactly the way you envisage but for vacuum tubes. Maybe you can tweak it for your own use. It is open source. the hard maths of converting a series of plots into a polynomial and deriving a spice model from that has already been done. You may just need to tweak aspects of it to make it suitable for BJTs.

http://curvecaptor.sourceforge.net/

Cheers

Ian
www.customtubeconsoles.com
https://mark3vtm.blogspot.co.uk/
www.eztubemixer.blogspot.co.uk


'The only people not making mistakes are the people doing nothing'

etheory

Re: How to go from measurement to Spice models
« Reply #2 on: February 28, 2013, 07:49:33 AM »
Fantastic, thank you.

As for the maths, that was the bit I was looking forward to ;-)

I might be able to tweak it a bit. I'll let you know how I get on.

Thanks again.

ruffrecords

Re: How to go from measurement to Spice models
« Reply #3 on: March 02, 2013, 04:16:24 PM »
Maybe you can improve on the maths. I had a look at the source code and IMHO it is very poorly documented - particularly the C module that constains the key maths functions.

Cheers

Ian
www.customtubeconsoles.com
https://mark3vtm.blogspot.co.uk/
www.eztubemixer.blogspot.co.uk


'The only people not making mistakes are the people doing nothing'

etheory

Re: How to go from measurement to Spice models
« Reply #4 on: March 04, 2013, 07:19:45 PM »
Hmmm, some portions of the code for that are unneccessary, and other parts are rather elegant.
I still don't understand what people have against the C standard library and external libraries like imath, which would reduce the re-implementation of basic datatypes in this code significantly.

The fundamental algorithms, however, are fairly standard, and rather complete (there is a lot of different options there, it's quite thorough).
Basically, and obviously, it's just using a minimisation technique to adjust different model parameters incrementally to fit the given input data.
The "clever" part is trying all of the various models and then automatically returning the one that best fits the input data. To be honest, that's extremely clever.

Anyway, this is a long-term project I'll have bubbling away in the background, but if I make any progress, I'll be sure to let you know.
Even though I'm more interested in transistor models, whatever I come up with would still benefit something like this.

cheers


 

Related Topics

  Subject / Started by Replies Last post
14 Replies
3990 Views
Last post July 28, 2004, 09:26:28 PM
by mcs
0 Replies
1397 Views
Last post June 08, 2006, 07:52:23 PM
by Ptownkid
2 Replies
2209 Views
Last post July 13, 2006, 08:30:29 PM
by Quince
7 Replies
3366 Views
Last post August 22, 2007, 07:03:45 PM
by aletheian-alex