Sometimes you just know that SPICE is fibbing

Thread Starter

Ian0

Joined Aug 7, 2020
13,097
Screenshot from 2026-03-05 20-11-26.png60dB gain at 10THz is pretty impressive for a Soviet-era triode bought for £2 on Ebay.
My first thought was that my design is brilliant, and my second thought was that the inter-electrode capacitances were missing, and neither was true.
SPICE:
.SUBCKT 6N1P_EV 1 2 3 ; Plate Grid Cathode
+ PARAMS: CCG=3.2P  CGP=1.5P CCP=1.5P
+ MU=33 KG1=2603.17 KP=305.48 KVB=57.09 VCT=0.3363 EX=1.792
+ VGOFF=-0.6 IGA=0.00107 IGB=1.614 IGC=44.8 IGEX=1.54
* Vp_MAX=700 Ip_MAX=70 Vg_step=2 Vg_start=12 Vg_count=16
* Rp=4000 Vg_ac=55 P_max=2.2 Vg_qui=-48 Vp_qui=300
* X_MIN=98 Y_MIN=15 X_SIZE=639 Y_SIZE=634 FSZ_X=1296 FSZ_Y=736 XYGrid=false
* showLoadLine=n showIp=y isDHT=n isPP=n isAsymPP=n showDissipLimit=y
* showIg1=y gridLevel2=y isInputSnapped=n
* XYProjections=n harmonicPlot=n dissipPlot=n
*----------------------------------------------------------------------------------
E1 7 0 VALUE={V(1,3)/KP*LOG(1+EXP(KP*(1/MU+(VCT+V(2,3))/SQRT(KVB+V(1,3)*V(1,3)))))}
RE1 7 0 1G  ; TO AVOID FLOATING NODES
G1 1 3 VALUE={(PWR(V(7),EX)+PWRS(V(7),EX))/KG1}
RCP 1 3 1G   ; TO AVOID FLOATING NODES
C1 2 3 {CCG} ; CATHODE-GRID
C2 2 1 {CGP} ; GRID=PLATE
C3 1 3 {CCP} ; CATHODE-PLATE
RE2 2 0 1G
EGC 8 0 VALUE={V(2,3)-VGOFF} ; POSITIVE GRID THRESHOLD
GG 2 3 VALUE={(IGA+IGB/(IGC+V(1,3)))*(MU/KG1)*(PWR(V(8),IGEX)+PWRS(V(8),IGEX))}
.ENDS
I suspect that the model just fits the I/V curves, and doesn't model such things as transit time, but I would have thought that that sort of thing was for higher frequencies than audio.
Any ideas?
But wait a minute - I can see light coming from it - an orange glow - that's about 500THz!
 

boostbuck

Joined Oct 5, 2017
1,032
Spice: Simulator Program with Integrated Circuit Emphasis

Poor thing is not fibbing, it's just struggling with the horse-drawn tech its been shown.
 

Thread Starter

Ian0

Joined Aug 7, 2020
13,097
Spice: Simulator Program with Integrated Circuit Emphasis

Poor thing is not fibbing, it's just struggling with the horse-drawn tech its been shown.
Old technology? You mean, like resistors (Ohm, 1827), Capacitors (von Kliest, 1746) or Tranformers (Faraday, 1831) 70 years before de Forest invented the triode!
But seriously, doesn't anyone know why it can't cope?
 

WBahn

Joined Mar 31, 2012
32,702
Old technology? You mean, like resistors (Ohm, 1827), Capacitors (von Kliest, 1746) or Tranformers (Faraday, 1831) 70 years before de Forest invented the triode!
But seriously, doesn't anyone know why it can't cope?
I don't know what you mean by it not being able to cope? It's not the simulator that can't cope with something, it's that the model it is being given lacks fidelity to what is being modeled in the region of operation you are looking at.

I don't know enough about modeling vacuum tubes to know what factors limit ultimate high frequency performance, but I suspect that there is much more involved than just the inter-electrode capacitances.
 

crutschow

Joined Mar 14, 2008
38,314
Spice was designed to model semiconductors with many parameters for that, which may not be sufficient to accurately model a 120 year old device, such as the transit time of the electrons between the electrodes.
So it depends upon how accurately the valve can be modeled using standard Spice parameters.
A simplified model will obviously give simplified results.
 

WBahn

Joined Mar 31, 2012
32,702
Spice was designed to model semiconductors with many parameters for that, which may not be sufficient to accurately model a 120 year old device, such as the transit time of the electrons between the electrodes.
So it depends upon how accurately the valve can be modeled using standard Spice parameters.
A simplified model will obviously give simplified results.
The set of things that can be modeled extremely well within the constraints of SPICE is amazingly diverse -- and not restricted to electrical things at all. This isn't too surprising, though, when you consider that physical electrical circuits have been used to model mechanical and other systems for a century or so. Electrical circuits, particularly linear circuits, obey certain differential equations. But the form of those equations is not unique to electrical circuits, so if the system you are interested in can be described by similar equations, the corresponding circuit will behave the same as the system of interest, just using different variables.

This was true for the original SPICE, but was greatly expanded and simplified with the introduction of analog behavioral models in the 80s and 90s.

At the same time, the ability of the underlying SPICE engine to adequately model basic IC devices, particularly transistors, became a major limiting factor in being able to use it for its intended purposes, namely designing ICs, forcing fabs to develop extremely sophisticated and complex device models. IBM's NFET model for their 130 nm process was a subcircuit with over three hundred components in it. It was outrageously slow, but also outrageously accurate. I've been out of the game for some time, but I wouldn't be surprised if most IC process models, even for capacitors and resistors (which frequently have nonlinear behaviors that can't be ignored), aren't based on analog behavioral models these days.
 

Thread Starter

Ian0

Joined Aug 7, 2020
13,097
I don't quite remember where the 6N1P model came from. Either it was on SPICE when I downloaded it, or I found it on the internet. If you need it, it's in the first post.
 

Attachments

WBahn

Joined Mar 31, 2012
32,702
I did a quick search for 6N1P device models using Copilot and it offered up this site:

Triode SPICE Models

This is the model it has:

Code:
*-----------------------------------------------------------------------
* Filename:        6N1P.inc  V1  25/10/97
* Simulator:        PSpice
* Device type:        Triode
* Device model:        Svetlana 6N1P
*
* Author:        Duncan Munro
* Date:            25/10/97
* Copyright:        (C)1997-2000 Duncan Amplification
*
* Please note that this model is provided "as is" and
* no warranty is provided in respect of its suitability
* for any application.
*
* This model is provided for educational and non-profit use.
*
* Email queries to postmaster@duncanamps.com
*
* Pins   A  Anode
*        G  Grid
*        K  Cathode
*
*-----------------------------------------------------------------------

.SUBCKT 6N1P A G K

************************************************************************
*
* Anode model
*
* Models reduction in mu at large negative grid voltages
* Models change in Ra with negative grid voltages
* Models limit in Ia with high +Vg and low Va
*
* PARAMETERS
*
*    LIP Conduction limit exponent
*    LIF Conduction limit factor
*    RAF Anode resistance factor for neg grid voltages
*    RAP Anode resistance factor for positive grid voltages
*    MU0 Mu between grid and anode at Vg=0
*    MUR Mu reduction factor for large negative grid voltages
*    EMC Emission coefficient
*    GCF Grid current scale factor
*
************************************************************************

.PARAM LIP 1
.PARAM LIF 1E-3
.PARAM RAF 9E-3
.PARAM RAP 4E-3
.PARAM MU0 38
.PARAM MUR 19E-3
.PARAM EMC 9.6E-6
.PARAM GCF 213E-6
Elim  LI 0  VALUE {PWR(LIMIT{V(A,K),0,1E6},{LIP})*{LIF}}
Erpf  RP 0  VALUE {1+LIMIT{V(G,K),0,-1E6}*{RAF}+LIMIT{V(G,K),0,1E6}*{RAP}}
Egr   GR 0  VALUE {LIMIT{V(G,K),0,1E6}+LIMIT{V(G,K)*(1+V(G,K)*{MUR}),0,-1E6}}
Eem   EM 0  VALUE {LIMIT{V(A,K)*V(RP)+V(GR)*{MU0},0,1E6}}
Eep   EP 0  VALUE {PWR(V(EM),1.5)*{EMC}}
Eel   EL 0  VALUE {LIMIT{V(EP),0,V(LI)}}
Eld   LD 0  VALUE {LIMIT{V(EP)-V(LI),0,1E6}}
Ga    A  K  VALUE {V(EL)}

************************************************************************
*
* Grid current model
*
* Models grid current, along with rise in grid current at low Va
*
************************************************************************
Egf   GF 0  VALUE {PWR(LIMIT{V(G,K),0,1E6},1.5)*{GCF}}
Gg    G  K  VALUE {(V(GF)+V(LD))}

*
* Capacitances
*
Cgk    G    K    2.4p
Cga    A    G    3.9p
Cak    A    K    0.7p

.ENDS
I have no idea if it is a particularly good model or over what region of operation it is valid.

It looks like it probably models quite a bit more nuanced behavior than the one you are using. You might give it a try and see if the results seem more reasonable.
 

Thread Starter

Ian0

Joined Aug 7, 2020
13,097
I see what is wrong now. I have the voltage source for testing the open loop gain in the wrong place.
 

WBahn

Joined Mar 31, 2012
32,702
Glad you found the issue.

Would still be interested to see what the differences you get between the two models and which one you feel is the better of the two.
 

Thread Starter

Ian0

Joined Aug 7, 2020
13,097
I was trying to implement "Middlebrook's method" (which I previously knew as @ericgibbs method, because that's who told me about it) to get a Bode plot so I could tell if I had enough phase margin.
I just want to know before I build it whether it's going to be an amplifier or whether it's going to be an oscillator!
SPICE still tells me that the THD is below 1 part per million, so I'll ignore that.
This is how it should be:
Screenshot from 2026-03-06 21-40-06.png
 
Top