Hello,
I am quite new to Kicad and ngpsice, although used spice in the 1980’s
I am trying to simulate a simple vacuum tube preamp but get an error “Fatal error: tube: transmission line z0 must be given” Is this some kind of bug or do I miss something?
TUBE LIBRARY
- This library was developed by Norman Koren.
- For details, refer to the article, "Improved Vacuum-Tube Models
- for SPICE simulations," Glass Audio, Vol. 8, No. 5, 1996,
- available from Audio Amateur Corporation, 305 Union St.,
- PO Box 176, Peterborough, NH 03458 USA. Phone 603-924-9464.
- All the usual legal disclaimers apply. The author has made
- every effort to provide correct information, but assumes no
- liabilities for errors, misuse of the models,
- or inevitable changes made by users.
- The author welcomes your comments, stories, and questions
- (if they don’t require too much effort to answer). For really
- BIG stuff, he will consider consulting for a fee.
- Please contact Norman Koren by Email at kormar@cts.com.
- Some models are commented out because the evaluation version of
- Pspice has a maximum of twenty.
.func LIMIT(x,a,b) {min(max(x, a), b)}
.func PWR(x,a) {abs(x) ** a}
.func PWRS(x,a) {sgn(x) * PWR(x,a)}
.func stp(x) {u(x)}
- Comment out one of the two models below (OLD or NEW). Use OLD temporarily for article.
- .SUBCKT 12AX7 1 2 3 ; P G C; OLD MODEL
-
- PARAMS: MU=93 EX=1.5 KG1=1360 KP=10000 KVB=0 RGI=2000
-
- CCG=2.3P CGP=2.4P CCP=.9P ; ADD .7PF TO ADJACENT PINS; .5 TO OTHERS.
.SUBCKT 12AX7 1 2 3 ; P G C; NEW MODEL
- CCG=2.3P CGP=2.4P CCP=.9P ; ADD .7PF TO ADJACENT PINS; .5 TO OTHERS.
- PARAMS: MU=100 EX=1.4 KG1=1060 KP=600 KVB=300 RGI=2000
- CCG=2.3P CGP=2.4P CCP=.9P ; ADD .7PF TO ADJACENT PINS; .5 TO OTHERS.
E1 7 0 VALUE=
+{V(1,3)/KPLOG(1+EXP(KP(1/MU+V(2,3)/SQRT(KVB+V(1,3)*V(1,3)))))}
RE1 7 0 1G
G1 1 3 VALUE={(PWR(V(7),EX)+PWRS(V(7),EX))/KG1}
RCP 1 3 1G ; TO AVOID FLOATING NODES IN MU-FOLLOWER
C1 2 3 {CCG} ; CATHODE-GRID
C2 2 1 {CGP} ; GRID=PLATE
C3 1 3 {CCP} ; CATHODE-PLATE
D3 5 3 DX ; FOR GRID CURRENT
R1 2 5 {RGI} ; FOR GRID CURRENT
.MODEL DX D(IS=1N RS=1 CJO=10PF TT=1N)
.ENDS
.title KiCad schematic
.include “C:\Tubemods\Tube12ax7.lib”
V1 In 0 dc 0 ac 0 sin(0 1 1k)
R3 NC_01 0 1000
R4 out Net-R4-Pad2 100k
XU1 out Net-C1-Pad1 NC_02 12AX7
R1 In 0 100k
V2 Net-R4-Pad2 0 dc 300 ac 0
R2 Net-C1-Pad1 In 10k
C1 Net-C1-Pad1 0 470p
.tran 1u 10m
.end