diyAudio

diyAudio (http://www.diyaudio.com/forums/)
-   Tubes / Valves (http://www.diyaudio.com/forums/tubes-valves/)
-   -   Vacuum tube modeling software - beta testers wanted (http://www.diyaudio.com/forums/tubes-valves/56327-vacuum-tube-modeling-software-beta-testers-wanted.html)

andrei 29th April 2005 07:29 AM

Vacuum tube modeling software - beta testers wanted
 
2 Attachment(s)
Hi,

I am looking for a few people to beta-test the vacuum tube modeling software I wrote (for my own use), to iron out bugs before I do a public code release. Basically, it can build Spice-compatible models and do simple bias point/signal analysis calculations from the traced tube data (either from datasheet curves or obtained elsewhere). See attached screenshots for examples...

It is developed on Unix platform, but as it is written in Tcl/C should be portable to Windows (any takers?). Documentation is non-existant at the moment.

If interested, email me at frolov@cita.utoronto.ca. Replies might be slow (sorry...).

andrei 29th April 2005 07:30 AM

2 Attachment(s)
And the curve tracer tool...

planet10 29th April 2005 09:17 AM

Re: Vacuum tube modeling software - beta testers wanted
 
Quote:

Originally posted by andrei
It is developed on Unix platform, but as it is written in Tcl/C should be portable to Windows (any takers?). Documentation is non-existant at the moment.
What UNIX does it need to run in? (i'm running OS X (freeBSD)

dave

pedroskova 29th April 2005 10:27 AM

Good idea. I need a 5687 spice model right now, but don't have the intellect to produce it.:whazzat:

cogsncogs 29th April 2005 11:56 AM

andrei

Very much interested! P-spice by any chance or 3f...?

Wayne :smash: :cool:

andrei 29th April 2005 02:53 PM

2 Attachment(s)
It requires Tcl/Tk for GUI, m4 for macro processing, standard C compiler (tested with gcc and icc), and FFTW libraries for distortion analysis (www.fftw.org). All of these are available on many Unix clones...

Models are macro-based and can be easily adopted to your favourite flavour of Spice. You do not need Spice installed to run Curvecaptor - it has simple waveform analysis build in (at much better precision, too :)).

For the impatient: I am attaching the Spice libraries for a few of my favourite tubes build from datasheets I traced. (If you electricute yourself using these - don't complain.)

Radames 29th April 2005 06:15 PM

Tube models
 
Hi Andrei,

Looks like a great job! I wouldn't know how to port it into PC, otherwise I would be happy to test.

I did my own software using Matlab to model tubes and calculate SET input and output stages in real time while dragging the loadline all over the graph. I used the regular Koren's model, I found however, that in some cases the model collapses and the best parameters give out real and imaginary components when plugged into the equation to model the curves. It doesn't happen with all triodes, but some. Using only the real part of the answer give a good approximation, but some anomalies happen at the bottom of the curves (not of much importance as I would never operate tubes there).

You used an 8 parameter model. I wondered if you modified Koren's model to solve similar anomalies of the model with some tubes. If that's the case, could you comment on the additional parameters and pass along the model?

Thanks,

Rada

PS: I found that Engauge Digitizer (from SourceForge) does a great job fo digitizing the curves in a semi-automated fashion.

PSII: Feel free to e-mail at verdee@cshl.org if you consider this deviates from the objective of the original post.

planet10 29th April 2005 06:32 PM

Quote:

Originally posted by andrei
It requires Tcl/Tk for GUI, m4 for macro processing, standard C compiler (tested with gcc and icc), and FFTW libraries for distortion analysis (www.fftw.org). All of these are available on many Unix clones...
Andrei sent me files for curvetracer... now i just need to figure how to compile (OS X) & ensure that my X11 has the right libraries....

dave

andrei 30th April 2005 04:58 AM

Yes, original 5-parameter Koren model
Code:

Ip = K * [Vp * log(1.0 + exp(Kp + Kp*mu*Vg/sqrt(1000.0*Kv + Vp*Vp)))/Kp]^gamma
sometimes runs into trouble because of the square root term. Actually, most improvement to fits in Koren model comes from the Kp parameter, which can model remote cutoff in triodes quite well. Dropping the square root gives the simpler 4-parameter model,
Code:

Ip = K * [Vp * log(1.0 + exp(Kp + Kp*mu*Vg/Vp))/Kp]^gamma
which is almost as good as the original, but more robust. Just adding more parameters will not necessary make the model better. I spent a fair amount of time trying various functional forms and trying to find degrees of freedom which will help to fit "difficult" tubes. The model that performs best overall adds four parameters to 4-parameter Koren model above
Code:

Ip = K * [Vp * log(1.0 + Kc + exp(Kp + Kp*(mu+nu*Vg/1000.0)*Vg/sqrt(Kv*Kv+(Vp-Vc)*(Vp-Vc))))/Kp]^gamma
Depending on a tube, the fit might be improved by a factor of two, or hardly at all.

4-parameter Koren model is probably good enough for calculating working point and signal amplitudes. The reason for more complex models is to try to get the distortion analysis right. Simple models give unrealistically small distortion figures.

In Curvecaptor, you can choose the model from a menu and see the differences in fits.

wa2ise 1st May 2005 07:13 AM

Tried the models in tubelib.zip and they mostly work well. My spice program Circuitmaker barfed on "exp" and the m and k after a string of numbers. It did work when I replaced "exp" with 2.818^" (am I correct that I want "e to the X" here? as I saw "ln" which I think means "log to e" instead of "log of 10".) Oh, my spice program didn't barf on "ln". Also had to repplace "m" with "e-3" and "k" with "e3".

That's one thing I've hated about software writing is the stupid compilers barfing on syntax. And different compilers want differing syntaxes and I can never remember which wants what. :bawling:

Quote:

it can build Spice-compatible models
If you or someone else can make a version that can run on a windows PC I'd love to get a copy. (Yes I realize some hate windoze but that's what I got here. I'm a "luser", ie, just a program user and not a software pro.) :D


All times are GMT. The time now is 09:14 AM.


vBulletin Optimisation provided by vB Optimise (Pro) - vBulletin Mods & Addons Copyright © 2014 DragonByte Technologies Ltd.
Copyright 1999-2014 diyAudio


Content Relevant URLs by vBSEO 3.3.2