• 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.

Circuitmaker Spice question

Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.
Does anyone know what the 580 is in the B1 equation?


*Vacuum Tube Triode (Audio freq.) pkg:VT-9 (A:1,2,3)(B:6,7,8)
.SUBCKT X12AX7 1 3 4
B1 2 4 I=((URAMP((V(2,4)/85)+V(3,4)))^1.5)/580
C1 3 4 1.6E-12
C2 3 1 1.7E-12
C3 1 4 0.46E-12
R1 3 5 50E+3
D1 1 2 DX
D2 4 2 DX2
D3 5 4 DX
.MODEL DX D(IS=1.0E-12 RS=1.0)
.MODEL DX2 D(IS=1.0E-9 RS=1.0)
.ENDS X12AX7
 
I first thought that too till I tried the theory on the other models

*Vacuum Tube Triode (Audio freq.)
.SUBCKT X6SN7 1 3 4
B1 2 4 I=((URAMP((V(2,4)/20)+V(3,4)))^1.5)/1086
C1 3 4 2.6E-12
C2 3 1 4.0E-12
C3 1 4 0.7E-12
R1 3 5 10E+3
D1 1 2 DX
D2 4 2 DX2
D3 5 4 DX
.MODEL DX D(IS=1.0E-12 RS=1.0)
.MODEL DX2 D(IS=1.0E-9 RS=1.0)
.ENDS X6SN7

*Vacuum Tube Triode (Audio freq.) pkg:VT-9 (A:1,2,3)(B:6,7,8)
.SUBCKT X12AU7 1 3 4
B1 2 4 I=((URAMP((V(2,4)/18)+V(3,4)))^1.5)/1151
C1 3 4 1.6E-12
C2 3 1 1.5E-12
C3 1 4 0.5E-12
R1 3 5 10E+3
D1 1 2 DX
D2 4 2 DX2
D3 5 4 DX
.MODEL DX D(IS=1.0E-12 RS=1.0)
.MODEL DX2 D(IS=1.0E-9 RS=1.0)
.ENDS X12AU7
 
"From the SPICE docs:
uramp(x) = x if x > 0, else uramp(x) = 0 "

Ah!, Thanks Andy.

So they don't want any positronic tubes I guess. No negative plate current allowed.

So the mystery number is left to be 1/G

G = Ip/( (Vp/Mu + Vg)^1.5 ) = ( .6666 gm/ (Ip^.3333) )^1.5

Just plug in some tube data numbers into the G formula and you have it.

Don
 
I've been hacking these models for a while. Here's one with comments:

*Vacuum Tube Tetrode (Audio freq.)
.SUBCKT X38HK7P A S G K
*
* Calculate contribution to cathode current
*
*the number at the right end determines sharpness of knee
Bat at 0 V=0.636*ATAN(V(A,K)/12)
*the URAMP(V(S,K)/# mostly determines peak plate current, grid line spacing nearly constant
*the number at the right end determines slope of grid lines (plate resistance)
Bgs gs 0 V=URAMP(V(S,K)/3.27+V(G,K)+V(A,K)/90)
*the exponent sets the linearity of grid line spacing, and big impact on peak plate currrent
Bgs2 gs2 0 V=V(gs)^1.58
Bcath cc 0 V=V(gs2)*V(at)
*
* Calculate anode current, grid line spacing adjust and peak plate current
*
Ba A K I=2.65E-3*V(cc)
*
* Calculate screen current
*
Bscrn sc 0 V=V(gs2)*(1.1-V(at))
Bs S K I=0.9E-3*V(sc)
*
* Grid current (approximation - does not model low va/vs)
*
Bg G K I=(URAMP(V(G,K)+1)^1.5)*50E-6
*
* Capacitances
*
Cg1 G K 17p
Cak A K 6.5p

Cg1a G A 0.6p

.ENDS X38HK7P


But your code looks a bit different. But I think it might be plate resistance. Set up a test circuit that creates curves in Circuitmaker, and vary one variable at a time, and see what it does. Below is "pentodecurv.ckt"

"URAMP" looks to be something that stops at zero. So you never get current going from cathodes to plates (aka electrons going from plates to cathodes).

CircuitMaker Text
5.6
Probes: 5
v1#branch
AC Analysis
0 130 22 65280
v1#branch
Operating Point
0 130 22 65280
v1#branch
Transient Analysis
0 130 22 65280
v1#branch
Fourier Analysis
0 130 22 65280
v1#branch
DC Sweep
0 132 24 65280
41 35 62 4 97 108 86 46 82 16 73 113 113 59 105 107
0 5 0 1e+09 0.001 2
33
13 10 13 12 18 10 20 20 12 20
10 13 13 10 20 13 46 20 14 20
18 17 14 16 20 20 20 20 10 13
20 18 11
0 0 30 100 10
176 75 1020 719
7 5.000 V
7 5.000 V
3 GND
0 0
24 100 0 1 0
20 Package,Description,
30 C:\PROGRAM FILES\CM60S\BOM.DAT
0 7
2 4 0.500000 0.500000
344 171 1188 493
144179218 0
0
0
0
0
0
0
18
2 +V
167 715 42 0 1 3
0 3
0
0 0 53744 0
4 200V
-14 -23 14 -15
3 V10
12 -12 33 -4
0
0
13 %D %1 0 DC %V
0
0
0
3

0 1 1 0
86 0 0 0 1 0 0 0
1 V
5130 0 0
2
5.89301e-315 0
0
7 Ground~
168 540 162 0 1 3
0 2
0
0 0 53360 0
0
4 GND4
-14 -26 14 -18
0
4 GND;
0
0
0
0
3

0 1 1 0
0 0 0 0 1 0 0 0
3 GND
391 0 0
2
5.89301e-315 0
0
9 V Source~
197 661 71 0 2 5
0 3 5
0
0 0 16752 0
2 0V
15 -2 29 6
2 V9
15 -12 29 -4
0
0
11 %D %1 %2 %V
0
0
0
5

0 1 2 1 2 0
86 0 0 0 1 0 0 0
2 Vs
3124 0 0
2
5.89301e-315 0
0
9 V Source~
197 550 51 0 2 5
0 7 6
0
0 0 16752 0
2 0V
15 -2 29 6
2 V8
15 -12 29 -4
0
0
11 %D %1 %2 %V
0
0
0
5

0 1 2 1 2 0
86 0 0 0 1 0 0 0
2 Vs
3421 0 0
2
5.89301e-315 0
0
8 Tetrode~
219 551 117 0 4 9
0 6 5 4 2
0
0 0 336 0
4 7695
26 -30 54 -22
2 V7
47 -26 61 -18
0
0
17 %D %1 %2 %3 %4 %S
0
0
0
9

0 1 2 3 4 1 2 3 4 0
88 0 0 0 0 0 0 0
1 V
8157 0 0
2
5.89301e-315 0
0
7 Ground~
168 95 269 0 1 3
0 2
0
0 0 53360 0
0
4 GND3
-14 -26 14 -18
0
4 GND;
0
0
0
0
3

0 1 1 0
0 0 0 0 1 0 0 0
3 GND
5572 0 0
2
39204.7 0
0
8 Tetrode~
219 107 232 0 4 9
0 8 8 4 2
0
0 0 336 0
4 7695
26 -30 54 -22
2 V6
47 -26 61 -18
0
0
17 %D %1 %2 %3 %4 %S
0
0
0
9

0 1 2 3 4 1 2 3 4 0
88 0 0 0 0 0 0 0
1 V
8901 0 0
2
39204.7 1
0
9 V Source~
197 200 33 0 2 5
0 7 8
0
0 0 16752 0
2 0V
15 -2 29 6
2 V5
15 -12 29 -4
0
0
11 %D %1 %2 %V
0
0
0
5

0 1 2 1 2 0
86 0 0 0 1 0 0 0
2 Vs
7361 0 0
2
39204.7 2
0
9 V Source~
197 351 102 0 2 5
0 10 9
0
0 0 16752 0
2 0V
15 -2 29 6
2 V4
15 -12 29 -4
0
0
11 %D %1 %2 %V
0
0
0
5

0 1 2 1 2 0
86 0 0 0 1 0 0 0
2 Vs
4747 0 0
2
39204.7 3
0
2 +V
167 447 177 0 1 3
0 10
0
0 0 53744 0
4 130V
-14 -23 14 -15
2 V3
15 -12 29 -4
0
0
13 %D %1 0 DC %V
0
0
0
3

0 1 1 0
86 0 0 0 1 0 0 0
1 V
972 0 0
2
39204.7 4
0
8 Tetrode~
219 141 119 0 4 9
0 11 9 4 2
0
0 0 336 0
4 7695
26 -30 54 -22
2 V2
47 -26 61 -18
0
0
17 %D %1 %2 %3 %4 %S
0
0
0
9

0 1 2 3 4 1 2 3 4 0
88 0 0 0 0 0 0 0
1 V
3472 0 0
2
39204.7 5
0
7 Ground~
168 62 126 0 1 3
0 2
0
0 0 53360 0
0
4 GND2
-14 -26 14 -18
0
4 GND;
0
0
0
0
3

0 1 1 0
0 0 0 0 1 0 0 0
3 GND
9998 0 0
2
39204.7 6
0
5 SAVE-
218 130 22 0 10 11
0 0 0 0 0 0 0 0 0 0
1
0
0 0 57552 0
1 A
3 -26 10 -18
0
0
0
14 *DC 6.65 153 0
0
0
0
1

0 0
0 0 0 0 1 0 0 0
4 SAVE
3536 0 0
2
39204.7 7
0
7 Ground~
168 239 141 0 1 3
0 2
0
0 0 53360 0
0
0
0
4 GND;
0
0
0
0
3

0 1 1 0
0 0 0 0 1 0 0 0
3 GND
4597 0 0
2
39204.7 8
0
9 V Source~
197 130 40 0 2 5
0 7 11
0
0 0 16752 0
2 0V
15 -2 29 6
2 V1
15 -12 29 -4
0
0
11 %D %1 %2 %V
0
0
0
5

0 1 2 1 2 0
86 0 0 0 1 0 0 0
2 Vs
3835 0 0
2
39204.7 9
0
9 V Source~
197 239 95 0 2 5
0 7 2
0
0 0 17008 0
4 300V
9 -2 37 6
3 VDS
12 -12 33 -4
0
0
11 %D %1 %2 %V
0
0
0
5

0 1 2 1 2 0
86 0 0 0 1 0 0 0
2 Vs
3670 0 0
2
39204.7 10
0
9 V Source~
197 64 72 0 2 5
0 4 2
0
0 0 17008 0
3 10V
12 -2 33 6
3 VGS
12 -12 33 -4
0
0
11 %D %1 %2 %V
0
0
0
5

0 1 2 1 2 0
86 0 0 0 1 0 0 0
2 Vs
5616 0 0
2
39204.7 11
0
7 Ground~
168 128 167 0 1 3
0 2
0
0 0 53360 0
0
4 GND1
-14 -26 14 -18
0
4 GND;
0
0
0
0
3

0 1 1 0
0 0 0 0 1 0 0 0
3 GND
9323 0 0
2
39204.7 12
0
19
1 1 3 0 0 8320 0 1 3 0 0 3
715 51
715 50
661 50
3 0 4 0 0 16512 0 5 0 0 8 7
525 120
460 120
460 51
283 51
283 297
74 297
74 235
4 1 2 0 0 4096 0 5 2 0 0 2
540 140
540 156
2 2 5 0 0 4224 0 5 3 0 0 3
577 114
661 114
661 92
2 1 6 0 0 8320 0 4 5 0 0 3
550 72
551 72
551 91
1 0 7 0 0 4224 0 4 0 0 19 2
550 30
239 30
4 1 2 0 0 0 0 7 6 0 0 3
96 255
95 255
95 263
0 3 4 0 0 0 0 0 7 14 0 6
102 122
86 122
86 177
74 177
74 235
81 235
1 0 8 0 0 8192 0 7 0 0 10 3
107 206
107 191
200 191
2 2 8 0 0 4224 0 8 7 0 0 3
200 54
200 229
133 229
2 2 9 0 0 12416 0 11 9 0 0 5
167 116
184 116
184 198
351 198
351 123
1 0 7 0 0 0 0 8 0 0 19 2
200 12
200 12
1 1 10 0 0 8320 0 9 10 0 0 4
351 81
418 81
418 186
447 186
3 1 4 0 0 0 0 11 17 0 0 4
115 122
102 122
102 51
64 51
4 1 2 0 0 8192 0 11 18 0 0 3
130 142
128 142
128 161
2 1 11 0 0 4224 0 15 11 0 0 4
130 61
130 79
141 79
141 93
2 1 2 0 0 8320 0 17 12 0 0 3
64 93
62 93
62 120
2 1 2 0 0 0 0 16 14 0 0 2
239 116
239 135
1 1 7 0 0 0 0 15 16 0 0 4
130 19
130 12
239 12
239 74
0
0
4 0 0
0
0
3 VDS
0 200 1
3 VGS
0 -20 -5
3 0 1 4
0 5e-05 2.5e-08 2.5e-08
0
0
0 0 0
0 0 0
0
0
0 0 0 0
0
0 0 0 0 0
0 0 0 0
0
0 0 0
0
0 0 0
5 -1 10 10 10 0 10 10 0
2992 2259520 100 229 0 0
77 66 617 396
0 97 640 568
617 66
77 66
617 66
617 396
0 0
0 0 0 0 0 0
12401 0
4 50 200
0
0 0 0 0 0 0
0 0 0 0
0 0 0 0
0 0
0 0
0 0
0 0
0 0
0 0 0 0 0 0
0 0
0 0 0
0
0 0 0 0 0 0
0 0 0 0
0 0 0 0
0 0
0 0
0 0
0 0
0 0
0 0 0 0 0 0
0 0
0 0 0
0
0 0 0 0 0 0
0 0 0 0
0 0 0 0
0 0
0 0
0 0
0 0
0 0
0 0 0 0 0 0
0 0
0 0 0
0
0 0 0 0 0 0
0 0 0 0
0 0 0 0
0 0
0 0
0 0
0 0
0 0
0 0 0 0 0 0
0 0
0 0 0
0
0 0 0 0 0 0
0 0 0 0
0 0 0 0
0 0
0 0
0 0
0 0
0 0
0 0 0 0 0 0
0 0
0 0 0
0
0 0 0 0 0 0
0 0 0 0
0 0 0 0
0 0
0 0
0 0
0 0
0 0
0 0 0 0 0 0
0 0
0 0 0
0
 
Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.