I’ve got a 12AX7 (ECC83) vacuum tube SPICE model (see below) from Duncan’s Amp Pages (http://tdsl.duncanamps.com/dcigna/tubes/spice/12ax7a.inc) that I’ve tweaked slightly to use in KiCAD.

I changed 12AX7A to ECC83. It’s the same design, just different manufacturer model numbers, so that’s not a concern.

What concerns me is I also had to change pwrs(), signed power, to pwr(), unsigned power, to get it to work without throwing an error about an unknown function pwrs(). Since most vacuum tube designs work by varying a negative grid voltage (making it more or less negative, never positive) I’m assuming the “signed” part of “signed power” is important for the model to function correctly.

After searching the 'net, it seems that ngspice has a pwrs() function (or at least I found an old enhancement request asking for it) so I don’t understand the error.

My question is this: Is there a pwrs() function, maybe called something else, in ngspice that I’m not finding? If not, is there some other workaround? Or, is there a better model for a 12AX7/ECC83 that I should be using?

Here’s the original model, followed by my modified version with changes in bold:

```
.SUBCKT 12AX7A P G K
E1 2 0 VALUE={45+V(P,K)+95.43*V(G,K)}
R1 2 0 1.0K
Gp P K VALUE={1.147E-6*(PWR(V(2),1.5)+PWRS(V(2),1.5))/2}
Cgk G K 1.6P
Cgp G P 1.7P
Cpk P K 0.46P
.ENDS 12AX7A
.SUBCKT **ECC83** P G K
E1 2 0 VALUE={45+V(P,K)+95.43*V(G,K)}
R1 2 0 1.0K
Gp P K VALUE={1.147E-6*(PWR(V(2),1.5)+**PWR**(V(2),1.5))/2}
Cgk G K 1.6P
Cgp G P 1.7P
Cpk P K 0.46P
.ENDS **ECC83**
```