
Home  Forums  Rules  Articles  The diyAudio Store  Gallery  Blogs  Register  Donations  FAQ  Calendar  Search  Today's Posts  Mark Forums Read  Search 
Tubes / Valves All about our sweet vacuum tubes :) Threads about Musical Instrument Amps of all kinds should be in the Instruments & Amps forum 

Please consider donating to help us continue to serve you.
Ads on/off / Custom Title / More PMs / More album space / Advanced printing & mass image saving 

Thread Tools  Search this Thread 
13th August 2006, 02:46 AM  #1 
diyAudio Member
Join Date: Mar 2006
Location: nsw

Alternate spice models
If I want to sim a valve I don't have a model for, can I use another with similar gm and rp, or two in parallel with a similar combined gm and rp? are there other parameters that need to be considered.
I don't need absolute perfection, and I don't expect this to give accurate HF rolloff information or overload behaviour. In an unrelated matter, does anyone know whether a 6J7 is a 'pentodised' 6J5, or is it just similar? 
13th August 2006, 04:45 PM  #2 
diyAudio Member
Join Date: May 2005
Location: Stittsville, Ontario, Canada

approximate spice models
You can certainly do what you suggest, ie use the model of a similar tube, if you dont have the model for the exact tube you want, or if you dont have sufficient data to create a model for the precise tube you want.
But there is an alternative alternative. Most spec sheets give at least mu and gm (or rp, or all 3 ), at some particular operating point, ie current I at gid voltage Vg and plate volatge Vp. Given that basic information, and given the approximate equation for a triode of I = K * (mu*Vg+Vp)^x, then with a bit of calculus and algebra values for K and x can be calculated to give the desired values of gm and mu at the operating point I, Vg,Vp. The formulas for x and K are x = gm*(mu*Vg+Vp)/(mu*I) and K = I * (mu*Vg+Vp)^(x) if gm is not given, but rp is, then calculate gm as gm = mu/rp if mu is not given, then just use x = 1.5, that should be close enough. here is the resulting spice model. You mention 6J5 in your post, so I use that as an example. Note that this is a simplified model, mu is perfectly constant, all the plate curves are perfectly parallel, so it is not completely realistic. ******************** * * approximate model * given mu and gm at a dc operating point I, Vp, Vg * then parameters can be calculated for a fit at that point. * this is useful for tubes for which there is a short form data sheet, * but no plate curves. * * assuming I = K*(mu*Vg +Vp)^x, * * then x = gm*(mu*Vg+Vp)/(mu*I) * * and K = I * (mu*Vg+Vp)^(x) * * default parameters are for 6J5 with mu = 20 and gm = 2600e6 * at Vg = 8, Vp = 250, I = 9e3 * * .SUBCKT Tube A G K + PARAMS: Mu=20 K= 2.59255e5 x = 1.3 + Cak=3.6p Cag=3.4p Cgk=3.4p Bp A K I={K} * ({Mu}*V(G,K)+V(A,K))**{x} C1 A G {Cag} C2 A K {Cak} C3 G K {Cgk} .ENDS Tube When I run this model, and a model derived from published plate curves, I find very close agreement for grid voltages in the range of 5 to 10 volts and currents of 5 to 15 mA. Even outside that range the fit is not too bad.
__________________
Robert McLean 
14th August 2006, 01:42 AM  #3 
diyAudio Member
Join Date: Apr 2005
Location: NJ

If it's a triode you need to simulate, there's "curve captor", a program that takes input from a gif file of a published characteristics curve (you do have to plot by hand many points, but the program takes it from there) and makes a variety of spice models for you. See http://sourceforge.net/projects/curvecaptor/ and this thread Vacuum tube modeling software  beta testers wanted
But maybe I did it already, see http://home.netcom.com/~wb2jia/tubes/spice3.txt http://home.netcom.com/~wb2jia/tubes/spice4.txt http://home.netcom.com/~wb2jia/tubes/spice2.txt http://home.netcom.com/~wb2jia/tubes/spice.txt I've been using circuitmaker, a 3f4 spice simulator. 
14th August 2006, 02:15 AM  #4 
diyAudio Member
Join Date: Mar 2006
Location: nsw

Thanks for the explainations Robert McLean, you seem to know your stuff. You've helped me to get a hold on the simplicity of some triode modelling. I'm new to the model files but your example makes it look fairly straightforward (on a fundamental level, that is)
wa2ise, I'm curious to see you've already compiled some examples. I'd like to learn the language (one day) but I feel I'd get more done if I just used preexisting models. Can I use your text files as they are, in Circuitmaker 2k? just reextension them as lib? or do I need to extract the model of interest? I am initially interested in a 6J7 model and a triode strapped 46. I am inclined to use a 45 model for that, do you think I could? Also it's good to know I could make models for anything I haven't thought of yet. 
14th August 2006, 11:02 AM  #5 
diyAudio Member
Join Date: Mar 2006
Location: nsw

I think I'll give the tracer a try.
I have had a problem getting your models to work with my version of CM, wa2ise. Well, I've only tried the 45 as yet. It's probably just my inexperience Spice gave me an error to do with the last (8 parameter) line  parameter value out of range or wrong type. I tried changing the pin assignments to ensure I didn't get them wrong (all 6 combos) but the message is the same for all. BTW, I'm assuming the simmed circuit has to treat the 45 as indirectly heated and I can use the standard triode symbol. 
15th August 2006, 01:37 AM  #6 
diyAudio Member
Join Date: Apr 2005
Location: NJ

My simulator is a spice 3f4 type, you may have a PSpice version, and there's more than 2 flavors. The code for one doesn't work for the others. I don't know the languages all that well, I just "hack" the code until the simulated curvetracer yields curves that look like those published. That is done by changing some of the numbers in a preexisting working model.

Thread Tools  Search this Thread 


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
new spice models available  Joel  Tubes / Valves  32  10th July 2013 06:30 PM 
Spice models  stinius  Solid State  0  18th November 2008 10:07 PM 
Spice models  Grahamm  Tubes / Valves  7  19th December 2006 02:36 PM 
Spice models  JoeBob  Solid State  18  25th April 2002 03:34 PM 
New To Site?  Need Help? 