Hi all,
I need some guidance regarding different models of Valves which are readily available from this and other Web sites. As an example, I have added 3 12AX7 models below. I am trying to get them to run in a very simple triode circuit by pasting them directly into a schematic as Spice directives. ... and then to understand why they are different, in syntax structure and in operation.
I have changed the Triode symbol Attributes to .... Attribute is Value, Prefix is X, InstName is U1 and SpiceModel is 12AX7 ... other fields are blank.
The first .SUBCKT below runs okay, but I do not understand the syntax eg BGG GG 0 etc.. I'm okay with the maths.
I cannot find this info anywhere in the LTspice Help, or in my many searches of the Web. Maybe I'm searching the wrong terminology .... any advice please??
Why does the first .SUBCKT model run, but the second one does not. I get an Error message "Undefined subcircuit triodenh"??
Also, why is the syntax vastly different? eg +PARAMS etc??
Thanks, Ian
.SUBCKT 12AX7 A G K
BGG GG 0 V=V(G,K)+0.59836683
BM1 M1 0 V=(0.0017172334*(URAMP(V(A,K))+1e-10))**-0.2685074
BM2 M2 0 V=(0.84817287*(URAMP(V(GG)+URAMP(V(A,K))/88.413802)+1e-10))**1.7685074
BP P 0 V=0.001130216*(URAMP(V(GG)+URAMP(V(A,K))/104.24031)+1e-10)**1.5
BIK IK 0 V=U(V(GG))*V(P)+(1-U(V(GG)))*0.00071211506*V(M1)*V(M2)
BIG IG 0 V=0.000565108*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.00058141055*URAMP(V(A,K))**1.5)))+1e-10*V(A,K)
BIGK G K I=V(IG)
* CAPS
CGA G A 1.7p
CGK G K 1.6p
CAK A K 0.5p
.ENDS
*Ayumi Generic tube.lib.txt file
.SUBCKT 12AX7 A G K
XV1 A G K TRIODENH
+PARAMS: LIP= 1.5 LIF= 0.000016 RAF= 0.076498 RAS= 1 CDO=-0.53056
+ RAP= 0.18 ERP= 1.5
+ MU0= 87.302 MUR=-0.013621 EMC= 0.00000111
+ GCO=-0.2 GCF= 0.00001
+ CGA=3.90E-12 CGK=2.40E-12 CAK=7.00E-13
.ENDS
*Duncan Munroe Generic ENHtube.lib file
.SUBCKT 12AX7 1 2 3 ; A G C
E1 7 0 VALUE={V(1,3)/KP*LOG(1+EXP(KP*(1/MU+(V(2,3)+VCT)/SQRT(KVB+V(1,3)*V(1,3)))))}
RE1 7 0 1G
G1 1 3 VALUE={(PWR(V(7,0),EX)+PWRS(V(7,0),EX))/KG1}
RCP 1 3 1G ; TO AVOID FLOATING NODES IN MU-FOLLOWER
C1 2 3 {CCG} ; CATHODE-GRID
C2 2 1 {CPG1} ; GRID-PLATE
C3 1 3 {CCP} ; CATHODE-PLATE
D3 5 3 DX ; FOR GRID CURRENT
R1 2 5 {RGI} ; FOR GRID CURRENT
.ENDS TRIODE
*duncan Munro ???????