How to go from measurement to Spice models

GroupDIY Audio Forum

Help Support GroupDIY Audio Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.

etheory

Well-known member
Joined
Mar 21, 2011
Messages
604
Location
Sydney, Australia
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.
 
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
 
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.
 
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
 
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
 
Back
Top