• WARNING: Tube/Valve amplifiers use potentially LETHAL HIGH VOLTAGES.
    Building, troubleshooting and testing of these amplifiers should only be
    performed by someone who is thoroughly familiar with
    the safety precautions around high voltages.

Vacuum Tube SPICE Models

mogliaa -- I have to admit, although I've been both working & playing with vacuum tubes since 1959, what you are doing in the way of "curve-tracing" to backsolve for tube parameters simply AMAZES me!

I tried modeling simple triodes (12AX7) and pentodes (6L6) some of the very first SPICE programs (MicroSIM, etc.) with absolutely lousey results...but that was literally years ago (early 1980's). Hence, I'm well aware of thermionic theory, but am totally new to what you seem to accomplish with these "new" programs. I am awed!

So, are you commercially involved using vacuum tubes, or is it a hobby for you (as it is with me)?
 
I echo Old Tele man's comments. I'm a degreed electrical engineer and have been designing tube circuits (as a hobby) for some time. I've tried my hand at tweaking tube SPICE models with miserable results and am amazed at how quickly some of the posters in this forum can produce good models for almost any tube.

I've been following this thread closely and have had good results with models based on the Ayumi method so I would like to build my tube library around that method. I've found models for most of the tubes I design with regularly but I'm missing a few. Does anyone have Ayumi models for the following triodes:

ECC99
6N1P
6H30

Thanks in advance if you can help.
 
mogliaa -- I have to admit, although I've been both working & playing with vacuum tubes since 1959, what you are doing in the way of "curve-tracing" to backsolve for tube parameters simply AMAZES me!

I tried modeling simple triodes (12AX7) and pentodes (6L6) some of the very first SPICE programs (MicroSIM, etc.) with absolutely lousey results...but that was literally years ago (early 1980's). Hence, I'm well aware of thermionic theory, but am totally new to what you seem to accomplish with these "new" programs. I am awed!

So, are you commercially involved using vacuum tubes, or is it a hobby for you (as it is with me)?
Hi there,
After a long time of tracing valves with an analogue tracer, I do now have the pleasure of having a uTracer. It's very handy for tracing triodes and pentodes. Although due to its limitations I still use my old tracer and camera when grid voltages are lower than -40V, tracing with Schade anode to grid feedback or other tests which the uTracer is limited. The tracer is very handy in measuring screen currents and deriving the transconductance, mu and resistance parameters. Here is where the analogue tracer falls short.

I've some experience in creating triode models, but not pentodes am afraid given the challenges well covered in this thread.
Cheers,
Ale
 
Ex-Moderator
Joined 2011
ECC99 SPICE Model

Does anyone have Ayumi models for the following triodes:

ECC99
6N1P
6H30

First up:

Code:
*
* Generic triode model: ECC99_AN
* Copyright 2003--2008 by Ayumi Nakabayashi, All rights reserved.
* Version 3.10, Generated on Sun Jan 12 18:46:10 2014
*                Plate
*                | Grid
*                | | Cathode
*                | | |
.SUBCKT ECC99_AN A G K
BGG   GG   0 V=V(G,K)+0.042958289
BM1   M1   0 V=(0.02038404*(URAMP(V(A,K))+1e-10))**-0.86570009
BM2   M2   0 V=(0.63406177*(URAMP(V(GG)+URAMP(V(A,K))/17.952193)+1e-10))**2.3657001
BP    P    0 V=0.005978906*(URAMP(V(GG)+URAMP(V(A,K))/28.313003)+1e-10)**1.5
BIK   IK   0 V=U(V(GG))*V(P)+(1-U(V(GG)))*0.0037149974*V(M1)*V(M2)
BIG   IG   0 V=0.002989453*URAMP(V(G,K))**1.5*(URAMP(V(G,K))/(URAMP(V(A,K))+URAMP(V(G,K)))*1.2+0.4)
BIAK  A    K I=URAMP(V(IK,IG)-URAMP(V(IK,IG)-(0.0033089913*URAMP(V(A,K))**1.5)))+1e-10*V(A,K)
BIGK  G    K I=V(IG)
* CAPS
CGA   G    A 5.8p
CGK   G    K 5.1p
CAK   A    K 0.8p
.ENDS
 
Ex-Moderator
Joined 2011
6N1P SPICE Model

Code:
*
* Generic triode model: 6N1P_AN
* Copyright 2003--2008 by Ayumi Nakabayashi, All rights reserved.
* Version 3.10, Generated on Sun Jan 12 18:59:00 2014
*               Plate
*               | Grid
*               | | Cathode
*               | | |
.SUBCKT 6N1P_AN A G K
BGG   GG   0 V=V(G,K)+-0.42063507
BM1   M1   0 V=(0.007566675*(URAMP(V(A,K))+1e-10))**-0.43818786
BM2   M2   0 V=(0.77391879*(URAMP(V(GG)+URAMP(V(A,K))/29.878541)+1e-10))**1.9381879
BP    P    0 V=0.0022884667*(URAMP(V(GG)+URAMP(V(A,K))/38.606817)+1e-10)**1.5
BIK   IK   0 V=U(V(GG))*V(P)+(1-U(V(GG)))*0.0013346379*V(M1)*V(M2)
BIG   IG   0 V=0.0011442333*URAMP(V(G,K))**1.5*(URAMP(V(G,K))/(URAMP(V(A,K))+URAMP(V(G,K)))*1.2+0.4)
BIAK  A    K I=URAMP(V(IK,IG)-URAMP(V(IK,IG)-(0.001233721*URAMP(V(A,K))**1.5)))+1e-10*V(A,K)
BIGK  G    K I=V(IG)
* CAPS
CGA   G    A 1.6p
CGK   G    K 3.2p
CAK   A    K 1.5p
.ENDS
 
Ex-Moderator
Joined 2011
6H30 SPICE Model

Found this at Stefano Perugini's site:

Code:
.SUBCKT 6H30_SP A G K
+PARAMS: MU=14.82339 EX=1.386938 KG1=255.6717 KP=99.30537 KVB=1042.421
+ LG=0.2U VBIG=-0.1 EG=1.414474 KG=0.000769 KRG=5 KVG=0.027177
+ CCG=6.3P CGP=6.5P CCP=2.4P CCH=8P

E1 7 0 VALUE = {V(A,K)/KP*LOG(1+EXPKP*(1/MU+V(G,K)/SQRT(KVB+V(A,K)*V(A,K)))))}
RE1 7 0 1G
G1 A K VALUE = {(PWR(V(7),EX)+PWRS(V(7),EX))/KG1}
RCP A K 1G ;
C1 G K {CCG} ;
C2 G A {CGP} ;
C3 A K {CCP} ;
C4 K 0 {CCH} ;
E10 10 0 VALUE = {IF(V(A)-V(K) > 0, V(A)- (K), 0)}
E11 11 0 VALUE = {IF(V(G)-V(K) > VBIG, V(G)-V(K)-VBIG, 0)}
E12 12 0 VALUE = {(KG*(V(11)**EG)*(((KRG-1)/(KVG*V(10)+1))+1))+LG}
G2 G K VALUE = {IF(V(12) > LG, V(12), LG)}
.ENDS
 
Do you think this Ayumi`s model is not good?



* Generic triode model: 6H30
* Copyright 2003--2008 by Ayumi Nakabayashi, All rights reserved.
* Version 3.10, Generated on Tue Aug 10 23:01:40 2010
* Plate
* | Grid
* | | Cathode
* | | |
.SUBCKT 6H30 A G K
.PARAM X1=1 X2=0.0016665882 X3=-0.038461562
.PARAM X4=0.97499998 X5=15.000715 X6=1.5384616
.PARAM X7=0.0038313265 X8=15.385349 X9=0.003327778
.PARAM Y1=0.0019156633 Y2=0.0022952053
BK IK 0 V=U(V(G,K)+X1)*X7*URAMP(V(G,K)+X1+URAMP(V(A,K))/X8)^1.5+(1-U(V(G,K)+X1))*X9*(X2*URAMP(V(A,K)))^X3*(X4*URAMP(V(G,K)+X1+URAMP(V(A,K))/X5))^X6BA A K I=URAMP((Y2*URAMP(V(A,K))^1.5)-URAMP((Y2*URAMP(V(A,K))^1.5)-V(IK)+Y1*URAMP(V(G,K))^1.5*(URAMP(V(G,K))/(URAMP(V(A,K))+URAMP(V(G,K)))*1.2+.4)))+1E-10*V(A,K)BG G K I=Y1*URAMP(V(G,K))^1.5*(URAMP(V(G,K))/(URAMP(V(A,K))+URAMP(V(G,K)))*1.2+.4)
* CAPS
CGA G A 5p
CGK G K 6.3p
CAK A K 2.4p
.ENDS

edit: shall change ^ with ** of course
 
Last edited:
mogliaa -- I have to admit, although I've been both working & playing with vacuum tubes since 1959, what you are doing in the way of "curve-tracing" to backsolve for tube parameters simply AMAZES me!

You have me beat by 3 years. My first tube project was the Knight-Kit A.M. transmitter and the "Ocean Hopper".

I have a first edition of Spangenberg -- and another engineering fellow who "de-accessioned" it had made a number of corrections to the equations. Many of these texts are available on the web -- there are more than a few "a ha" moments as the physics is explained.
 
My parents gave me an electric guitar on my 15th birthday, but NO amplifier (makes mistakes LESS noticable, ha,ha!).

So, when I asked about an amplifier, my dad, a retired USN Electronics Technician Chief (ETC), handed me an old RCA Tube Manual and said: "...make one..." and I did! A single channel, four tube (2×12AX7, 2×6L6GC), 45W push-pull amp driving a single 12" speaker from a defunct Lowery organ. Chassis was one of my mom's aluminum baking pans turned upside down; two knobs: volume and tone. Worked great once I figured out *why* one output tube was glowing cherry red (leaky coupling capacitor). After I actually "learned" how to play something recognizable (to my parents) they got me a REAL combo amp (with tremolo!) for Christmas.

Spent almost 8 years in USN as Aviation Electronics Technician First Class (AT1/AC) aircrewman flying in EC-121 "Warning Star" aircraft where ALL the electronics used vacuum tubes (APS20E, APS45, ALR8, ARC27, etc.). The ONLY transistor device was the AIC10, Aircraft Interface Communication amplifier, which had a couple transistors.

Went back to shool after USN on GI Bill and completed my degree (I, too, am degreed EE), but went into digital instrumentation systems, spending 10 years with USArmy Civil Service, then 28 years with Hughes/GMHE/Raytheon. Now retired...but STILL playing with vacuum tubes. And, yes, my library collection includes Spangenberg, Terman, Seeley, Chaffee, and RDH2, RDH3 and RDH4...as well as many digital copies.

I'd like to hear more about these curve-tracing programs / devices.
 
Last edited:
jazbo8,

Thanks for the models. The ECC99 and 6N1P models work as expected with LTspice but the 6H30 is returning syntax errors.

RajkoM,

The AN model also returns a syntax error (even after replacing all of the ^ characters with **). LTspice doesn't seem to like the references to "BK" and "X6BA." Does anyone know of a quick fix for either or both of these models?

Thanks.
 
RajkoM,

The AN model also returns a syntax error (even after replacing all of the ^ characters with **). LTspice doesn't seem to like the references to "BK" and "X6BA." Does anyone know of a quick fix for either or both of these models?

Thanks.
There's a word wrap problem with RajkoM's post. Fixed here:
Code:
* Generic triode model: 6H30
* Copyright 2003--2008 by Ayumi Nakabayashi, All rights reserved.
* Version 3.10, Generated on Tue Aug 10 23:01:40 2010
*            Plate
*            | Grid
*            | | Cathode
*            | | |
.SUBCKT 6H30 A G K
.PARAM X1=1 X2=0.0016665882 X3=-0.038461562
.PARAM X4=0.97499998 X5=15.000715 X6=1.5384616
.PARAM X7=0.0038313265 X8=15.385349 X9=0.003327778
.PARAM Y1=0.0019156633 Y2=0.0022952053
BK IK 0 V=U(V(G,K)+X1)*X7*URAMP(V(G,K)+X1+URAMP(V(A,K))/X8)**1.5+(1-U(V(G,K)+X1))*X9*(X2*URAMP(V(A,K)))**X3*(X4*URAMP(V (G,K)+X1+URAMP(V(A,K))/X5))**X6
BA A K I=URAMP((Y2*URAMP(V(A,K))**1.5)-URAMP((Y2*URAMP(V(A,K))**1.5)-V(IK)+Y1*URAMP(V(G,K))**1.5*(URAMP(V(G,K))/(URAMP(V(A,K))+URAMP(V(G,K)))*1.2+.4)))+1E-10*V(A,K)
BG G K I=Y1*URAMP(V(G,K))**1.5*(URAMP(V(G,K))/(URAMP(V(A,K))+URAMP(V(G,K)))*1.2+.4)
* CAPS
CGA G A 5p
CGK G K 6.3p
CAK A K 2.4p
.ENDS
 
Last edited:
Found a few typos in the other one.
Code:
.SUBCKT 6H30_SP A G K
+PARAMS: MU=14.82339 EX=1.386938 KG1=255.6717 KP=99.30537 KVB=1042.421
+ LG=0.2U VBIG=-0.1 EG=1.414474 KG=0.000769 KRG=5 KVG=0.027177
+ CCG=6.3P CGP=6.5P CCP=2.4P CCH=8P
E1 7 0 VALUE = {V(A,K) / KP * LOG(1 + EXP(KP * (1/MU + V(G,K) / SQRT(KVB + V(A,K) * V(A,K)))))}
RE1 7 0 1G
G1 A K VALUE = {(PWR(V(7), EX) + PWRS(V(7), EX)) / KG1}
RCP A K 1G ;
C1 G K {CCG} ;
C2 G A {CGP} ;
C3 A K {CCP} ;
C4 K 0 {CCH} ;
E10 10 0 VALUE = {IF(V(A) - V(K) > 0, V(A) - V(K), 0)}
E11 11 0 VALUE = {IF(V(G) - V(K) > VBIG, V(G) - V(K) - VBIG, 0)}
E12 12 0 VALUE = {(KG * (V(11) ** EG) *
+ (((KRG - 1) / (KVG * V(10) + 1)) + 1)) + LG}
G2 G K VALUE = {IF(V(12) > LG, V(12), LG)}
.ENDS
 
Found a few typos in the other one.

Thanks -- this one now works as well.

I need to spend some time studying these models. I found a Zip file containing a number of tubes and noticed that most tubes had both an .inc and a .mod version. It's not real clear what the difference is, or if there even is a real difference between the two forms. Can anyone help here?
 
Ex-Moderator
Joined 2011
Thanks -- this one now works as well.

I need to spend some time studying these models. I found a Zip file containing a number of tubes and noticed that most tubes had both an .inc and a .mod version. It's not real clear what the difference is, or if there even is a real difference between the two forms. Can anyone help here?

I think you are referring to the Ayumi pctube library, if so, *.inc is for PSpice, *.mod is for SIMetrix. As mentioned, to use the *.inc models in LTSpice, you need to replace all the "^" with "**".
 
I tried my hand at doing some models using Ayumi's method and came up with one for a 6HA5. Here are two, one in 3f4 and one in PSpice just in case someone needs one or wants to see/spot the differences in syntax. Changed ^ to ** so both will work in LTSpice. Made a csv file from the data points I traced in Curve Captor.

Funny thing though, the curves looked correct in R but had move certain parameters 3 decimal points down i.e. e-03 to look correct LTSpice and Micro-Cap. When I used a csv file from Ayumi's library in Curve Captor the curves looked correct in Curve Captor, but then would have to move the decimal point the opposite direction i.e. e+03 in LTSpice etc. Weird.

I like how the curves of the 6HA5 look in the high Vg-Vp region (they don't curve under), but not too happy about the 0Vg curve.

6HA 3f4 Spice model:
Code:
*
* Generic triode model: 6HA5
* Copyright 2003--2008 by Ayumi Nakabayashi, All rights reserved.
* Version 3.10, Generated on Sun Jan 12 19:20:35 2014
*               Plate
*               | Grid
*               | | Cathode
*               | | |
.SUBCKT 6HA5_AN A G K
BGG   GG   0 V=V(G,K)+1
BM1   M1   0 V=(0.19157547*(URAMP(V(A,K))+1e-10))**-27.024949
BM2   M2   0 V=(0.052585545*(URAMP(V(GG)+URAMP(V(A,K))/4.9453849)+1e-10))**28.524949
BP    P    0 V=7.6323661e-03*(URAMP(V(GG)+URAMP(V(A,K))/94.044569)+1e-10)**1.5
BIK   IK   0 V=U(V(GG))*V(P)+(1-U(V(GG)))*6.5641e+31*V(M1)*V(M2)
BIG   IG   0 V=3.8161831e-03*URAMP(V(G,K))**1.5*(URAMP(V(G,K))/(URAMP(V(A,K))+URAMP(V(G,K)))*1.2+0.4)
BIAK  A    K I=URAMP(V(IK,IG)-URAMP(V(IK,IG)-(3.9382415e-03*URAMP(V(A,K))**1.5)))+1e-10*V(A,K)
BIGK  G    K I=V(IG)
* CAPS
CGA   G    A 0.56p
CGK   G    K 5p
CAK   A    K 3.1p
.ENDS
 
Last edited:
6HA5 PSpice model:
Code:
*
* Generic triode model: 6HA5
* Copyright 2003--2008 by Ayumi Nakabayashi, All rights reserved.
* Version 3.10, Generated on Sun Jan 12 19:20:35 2014
*               Plate
*               | Grid
*               | | Cathode
*               | | |
.SUBCKT 6HA5_AN A G K
EGG   GG   0 VALUE={V(G,K)+1}
EM1   M1   0 VALUE={(0.19157547*(LIMIT(V(A,K),0,1e16)+1e-10))**-27.024949}
EM2   M2   0 VALUE={(0.052585545*(LIMIT((V(GG)+LIMIT(V(A,K),0,1e16)/4.9453849),0,1e16)+1e-10))**28.524949}
EP    P    0 VALUE={7.6323661e-03*(LIMIT((V(GG)+LIMIT(V(A,K),0,1e16)/94.044569),0,1e16)+1e-10)**1.5}
EIK   IK   0 VALUE={STP(V(GG))*V(P)+(1-STP(V(GG)))*6.5641e+31*V(M1)*V(M2)}
EIG   IG   0 VALUE={3.8161831e-03*LIMIT(V(G,K),0,1e16)**1.5*(LIMIT(V(G,K),0,1e16)/(LIMIT(V(A,K),0,1e16)+LIMIT(V(G,K),0,1e16))*1.2+0.4)}
GIAK  A    K VALUE={LIMIT(V(IK,IG)-LIMIT(V(IK,IG)-(3.9382415e-03*LIMIT(V(A,K),0,1e16)**1.5),0,1e16),0,1e16)+1e-10*V(A,K)}
GIGK  G    K VALUE={V(IG)}
* CAPS
CGA   G    A 0.56p
CGK   G    K 5p
CAK   A    K 3.1p
.ENDS