My friend and colleague Derk Reefman has spent a lot of effort on improving the modeling of especially pentodes and beam pentodes. His improved models include secondary emission, modeling of beam pentodes, and improved screen and anode current modeling. Next to that he wrote an intelligent parameter extraction program (ExtractModel) that can be used to extract the model parameters from measured data. The program uses elaborate algorithms to find the best initial parameter values to obtain the best and also physical model fits. The program directly interfaces with the data files generated by the uTracer, and happily Derk was kind enough to share the model and the parameter extraction program with us.


1. Introduction

Spice modelling of vacuum tubes has already a long history. An important prerequisite is (obviously) the availability of accurate spice models of the vacuum tubes. In the past, many spice models have been generated based on I-V curves as published in the databooks published by the tube manufacturers. There are important limitations to this approach, most notably that it is sometimes difficult to get an accurate reading from the old graphs, and, perhaps most important, the fact that only limited datasets are available for a tube. This last short coming has been removed completely with the advent of the uTracer. The uTracer can provide accurate representations of the tube characteristics. The variation in characteristics between tubes is substantially larger than measurement errors in the uTracer itself.

Many power tubes show substantial secundary emission effects. Those effects never received a lot of attention, because in the tube datasheets these effects where always largely ignored – after all, secundary emission was not considered something to be proud of. Still, for many designs in audio amplification, secundary emission effects can have a sizeable impact, especially for high outputs where the Ia-Va trajectory of the power tubes transverses the area where secundary emission is dominant. This and the sheer unlimited availability of tube data with the advent of the uTracer was the reason to start with the development of accurate simulation models for penthodes and beam tetrodes, and modelling secundary emission in those, and has resulted in a program ExtractModel that takes the outputfile of the uTracer, and provides a Spice simulation model as output. ExtractModel features:


This document explains the installation and use of ExtractModel. The modelling of a triode, a pentode without secondary emission, and a pentode with secondary emission are shown as examples. The examples can be downloaded and include the data files so that you can test ExtractModel without the need for any measurements. Readers interested in the physics behind the extended model are referred to the document describing the theory.


2. Set-Up and running ExtractModel

Downloading and Installation

The first step in installing ExtractModel is to install Gnuplot. Gnuplot is a command-line driven graphic utility which is widely used by scientists and students to represent graphical data and formulas. Because Gnuplot is available for many different platforms it makes it easy to port ExtractModel e.g. to Linux. It can be downloaded and installed from the gnuplot homepage. Gnuplot is evoked by the ExtractModel program, and the only thing you have to know about it is the location where it is installed on your computer. In most cases this will be in C:\Program Files(x86)\gnuplot\bin\wgnuplot.exe. Check if the gnuplot executable is located in this directory.

The next step is to download the ExtractModel program. By clicking on the link below, a .zip file can be downloaded which, besides the ExtractModel executable, contains the examples discussed in the next sections, as well as a number of literature references in as far as they are in the public domain. Simply download the compressed file and unzip. The examples in the download include the data files so that you can directly explore ExtractModel without having to do any measurements.

The download contains the latest version of ExtractModel version 3.0 (February-2016).

Running ExtractModel

On one hand the user interface of ExtractModel is quite Spartan. On the other hand it is a delight to have just a single executable which doesn’t need any installation, DLLs, OCXs or whatever to run! In that sense it is a tribute to my website name: DOS4EVER! ExtractModel is executed from the command line, and it is best to have the executable located in the folder in which the data files are located. If you download and unzip the program and go to the examples you will find that the executable is copied in every separate example folder. The program is not that large, and this is by far the easiest way of operation. So if you have your own measurements, simply create a new folder and locate the data files, executable, and the initialization file in that folder and evoke a command line window. In Windows 7 a command prompts window can be opened by locating the cursor in the directory in which you want to open the command prompt window and while pressing shift, right-click the mouse, and select “Open command window here” (Fig. 2.1).

Figure 2.1 In Windows 7 the command window can be opened by clicking the right mouse button while pressing shift.

To run ExtractModel it not only needs the data files(s), but also a file which tells ExtractModel where it can find Gnuplot, the names of the data files, which model to fit and some other input necessary to fit the model. This file is called the initialization file, and it has the extension .ini. When the file has the default name model.ini, it doesn’t need to be specified, and the program can simply be run by typing: “ExtractModel”. When the initialization file has a different name the program can be run by typing “ExtractModel <name>.ini

The initialization file

As mentioned, ExtractModel needs an initialization file with the extension .ini which provides the program with the necessary input to do the model fitting. Below is a generic description of the contents of the initialization file, followed by a line-by-line description:

C:\Program Files (x86)\gnuplot\bin\wgnuplot.exe !location of gnuplot executable
3			!number of .utd files
data1			!as many .utd files as the number above indicates
data2			!as many .utd files as the number above indicates
data3			!as many .utd files as the number above indicates
P			!D(Diode),T(Triode), X(Pentode/triode mode), P(Pentode), B(beam tetrode)
Derk			!Model used – either Koren, Derk or DerkE
2.	!Pmax in fit	!fitting only data points below P=Pmax curve
0	!Vg Offset	!Offset to grid voltage

  1. This line describes where the gnuplot executable is located.
  2. The number of .utd datafiles. For pentodes and beam tetrodes, multiple files with sweeps using different values for Vs are required. The maximum number of files is set to 15. For triodes the number of files can be larger than 1 if multiple tubes have been measured, and the fit needs to represent an average of the different tubes. As tubes can differ easily by 10% in current for identical voltages, this is a nice way to get a representation of the `average tube’.
  3. The names of the data files. The extension “.utd” must be left out. If fitting a pentode / beam tetrode, the last file can be the file as measured in `triode mode’, i.e. in a Vs=Va sweep.
  4. The type of tube. Currently the choice of tubes is
    1. D – for a diode
    2. T – for a triode
    3. X – for a pentode, but measured with the “I(Va=Vs, Vg) with Vh constant” sweep. This signals ExtractModel to sum the anode and screen currents, and fit a triode model
    4. Y - for a hepthode, measured with the 'I(Va=Vs, Vg) with Vh constant' sweep (and for a specific Vg3). The use of this tube designator signals ExtractModel to create a parameter file Triode_g3.par that is used as input for starting parameters in the heptode model fitting.
    5. P – for a pentode. For historical (programming) reasons, this is the model used if secundary emission is not playing any role. It can be used with both the Derk and DerkE models.
    6. V - for a variable mu pentode. For historical (programming) reasons, this is the model used if secundary emission is not playing any role. It can be used with both the Derk and DerkE models.
    7. B – for a beam tetrode. For historical (programming) reasons, this is the model that turns secundary emission effects on. It can be used with both the Derk and DerkE models.
    8. H - for a Hepthode.
  5. Model used for fitting. Known model names are ‘Koren’, ‘Derk’ (see Sec. 4) and ‘DerkE’ (see Sec. 5). For diodes and triodes, the only available model is ‘Koren’ – whenever a different name is given, it is still fitted according to the Koren model. For Beam tetrodes, the only available models are ‘Derk’ and ‘DerkE.’
  6. The maximum anode dissipation Pmax used in fitting the data; only data for which Ia*Va < Pmax is used to fit the data to.
  7. The uTracer can only generate grid voltages between -49 and 0 volts. VgOffset is any constant voltage that is added to that by an external source to create grid voltages below -49 V.


Figure 2.2 The measurements need to be stored by saving the Measurement Matrix.

The data files

To fit the models ExtractModel obviously needs one or more data files generated by the uTracer. For a simple triode only one data file is needed. For a more complex pentode several data files are needed to accurately model the tube with physical parameters. The examples below clearly show which data files are needed. In summary:

In all cases the measurement data needs to be stored by saving the Measurement Matrix! This can be done by clicking “Store Data,” and then clicking “Save Measurement Matrix” in the form that appears (Fig. 2.2). These files automatically have the extension .utd (uTracer data). Any file name can be used, but it is advised to use meaningful names along the guidelines provided in the examples.

Selection of the model

As mentioned before, several tube models have been implemented in ExtractModel. For triodes the only model available is “Koren” which is perfect for all practical purposes. For Pentodes (both pentodes with a suppressor grid as well as beam pentodes) the situation is a bit more complicated. The Koren model is not well suitable for beam pentodes, does not accurately model the screen current (and thus the anode current) and doesn’t take secondary emission into account. In the “Derk” and DerkE” models these effects have been modelled on a physical base (Click Here).

The “Derk” model is normally used for standard pentodes with a suppressor grid. The “DerkE” model is normally used for beam pentodes. However, some standard pentodes show characteristics which resemble beam pentodes and are therefore better modelled with “DerkE”. Besides the fact that there are two models, the user has the option to select a “P” or “B” type. Admittedly confusing this doesn’t refer to Pentode or Beam pentode, but to a model without secondary emission (“P”) or with (“B”). Sorry, this is a bit confusing, but that’s the way it is!

Figure 2.3 The different pentode models and the effects their use.

The table in Fig. 2.3 gives an overview of the available models and types, and the effects that are modelled. One might ask, “why not take the most complex model directly?” In general that is not a good idea. If for example a tube hardly exhibits any secondary emission, ExtractModel will have a hard time fitting the parameters which describe the secondary emission. The problem is that although this may result in quite an acceptable fit of the model on the measurement data, it might give unpredictable results for other combinations of terminal voltages. The golden rule therefore is: use an as simple as possible model! ExtractModel is so clever that is will give a warning when a model is used with secondary emission for a tube without it! It will nevertheless always use the model specified. The flowchart shown in Fig. 2.4 shows a sensible strategy to select the most appropriate model.

Figure 2.4 This simple flowchart may help to select a suitable model for a pentode.

The first criterion is, “does the tube show significan secondary emission effects?” These will show up in the form of kinks, jumps etc. and are not to be confused with oscillations. The next question is, “Is the tube a beam pentode?” For real beam tetrodes - lacking a 3rd grid and having focussing electrodes instead - this usually is mentioned in the datasheet. Typically these will be power tubes. For small signal tubes, it is often not mentioned in the datasheet whether a penthode is a pure pentode, or a beam-like pentode (real beam tetrodes in small signal applications are rare). Visual inspection often gives a clue, as pentodes with a circular anode are all `real' pentodes. Pentodes that have 2 small stripes of metal as anode can behave as a beam pentode. However, it still depends on how the (screen and suppressor) grids are aligned with respect to each other. If all the grids are aligned, chances are high it is a beam pentode. In short, if you are sure it is a beam pentode chose model “DerkE” and if it is not, or you are not sure, first try model “Derk.” If “Derk” does not provide a good fit the last resort is to try model “DerkE.”


3. Fitting a triode

For fitting a triode, we first have to create the file Model.ini, which contains the input that ExtractModel will use. Below is an example input file, which is based on the assumption, that in the directory where ExtractModel is called, a file ECC81.utd exists that contains Ia-Va curves for various values of the grid bias (Vg):

C:\Program Files (x86)\gnuplot\bin\wgnuplot.exe
1      ! we only have 1 file
ECC81  ! the name of the file (without extension)
T      ! We fit a triode
Koren  ! We use the Koren model
2      ! Only data resulting in Pa < 2W are used in the fit
0      ! Vg Offset

To execute ExtractModel, open a command window (cmd under Windows, xterm under Linux) and execute ExtractModel.

Figure 3.1 Output of ExtractModel for the ECC81 example

In the cmd window we see a lot of output: the version of ExtractModel, confirmation of the contents of the inputfile; the parameter values based on the first estimation; the sum of squares (R2) before refinement; the iteration number and the final sum of squares. The last bit of information is the parameter values after the refinement, and the fact that a Spice triode subcircuit has been written to file ECC81.cir. This file name has been constructed from the input file name, with the addition of the .cir extension.

Next to that, a Gnuplot window pops up that shows the measured data points, and the curve based on the refined parameters. Under Windows, there is a second pop-up with a Pause button - press OK and it will disappear. The purpose of this pop-up is to show the fit results for any other data files (we will explore this later).

The directory will now contain the following files:

C:\Users\nlv13348\Dropbox\Spice\ExtractModel\ECC81>dir
 Volume in drive C has no label.
 Volume Serial Number is FA5B-D21C

 Directory of C:\Users\nlv13348\Dropbox\Spice\ExtractModel\ECC81

01/05/2014  07:40 AM              .
01/05/2014  07:40 AM              ..
01/05/2014  07:38 AM               773 ECC81.cir
01/05/2014  07:38 AM             4,960 ECC81.dat
01/05/2014  07:38 AM             4,813 ECC81.fit
01/05/2014  07:38 AM               304 ECC81.plt
11/15/2013  03:13 PM            16,067 ECC81.utd
11/17/2013  11:19 AM               176 Model.ini
01/05/2014  07:38 AM               110 Model.Par
01/05/2014  07:38 AM               110 Triode.par
               8 File(s)         27,313 bytes
               2 Dir(s)  92,434,653,184 bytes free

C:\Users\nlv13348\Dropbox\Spice\ExtractModel\ECC81>

The most important file created is the ECC81.cir file, which is the Spice circuit description:

****************************************************
.SUBCKT ECC81 1 2 3; A G C;
*      Extract V1.030
*  Model created:  5-Jan-2014
X1 1 2 3 TriodeK MU= 63.24 EX=1.338 KG1= 306.7 KP= 208.5 KVB= 2363. RGI=2000
+ CCG=0.0P  CGP=0.0P CCP=0.0P  ;
.ENDS

****************************************************
.SUBCKT TriodeK 1 2 3; A G C
E1 7 0 VALUE=
+{V(1,3)/KP*LOG(1+EXP(KP*(1/MU+V(2,3)/SQRT(KVB+V(1,3)*V(1,3)))))}
RE1 7 0 1G
G1 1 3 VALUE={0.5*(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 TriodeK

This file contains the generic description of a triode (a lot of this description is copied from the original article from Koren as .SUBCKT Triode). The definitions of the capacitances is for the user; please edit these yourself based on values that are reported in the handbooks (see Frank’s Electron Tube Pages for an almost exhaustive collections of datasheets).

ECC81.plt is the Gnuplot command file that generates the plot. This file can always be loaded by Gnuplot, independent of ExtractModel, at a later moment. The two files ECC81.dat and ECC81.fit contain the original data (as presented in ECC81.utd and the model curve, respectively, that are used by the command file ECC81.plt.

Finally, there are two .par files, which in this case are identical, and contain the values of the parameters.

4a. Fitting a pentode

In order to fit a pentode. several files need to be collected:

  1. A data file created with a “I(Va=Vs,Vg) with Vh constant” measurement.
  2. Several data files created with a “I(Va,Vg) with Vs and Vh constant” measurement.

In order to fit a pentode, first the parameters describing the pentode wired as a triode need to be determined - this is also why we need a data file for a Vs =Va sweep. To do this, we create an initialization file which we call Triode.ini for ExtractModel that looks as follows:

C:\Program Files (x86)\gnuplot\bin\wgnuplot.exe
1           ! only one file
PF86_triode ! with the pentode measured with screen connected to anode
X           ! to sum Ia and Is to fit the triode model
Derk        ! Derk is used
2.0         ! Pmax in fit
0           ! Vg Offset

Note that we use `Derk' for the model definition - there is no model `Derk' for a Triode, but we want to see how ExtractModel handles this. The contents of the directory are now:

C:\Users\nlv13348\Dropbox\Spice\ExtractModel\PF86>dir
 Volume in drive C has no label.
 Volume Serial Number is FA5B-D21C

 Directory of C:\Users\nlv13348\Dropbox\Spice\ExtractModel\PF86

01/05/2014  09:06 AM              .
01/05/2014  09:06 AM              ..
01/22/2013  08:28 PM            18,888 pf86_200.utd
01/22/2013  08:28 PM            18,888 pf86_250.utd
01/22/2013  08:28 PM            18,888 pf86_300.utd
01/22/2013  08:03 PM            22,019 pf86_triode.utd
01/05/2014  09:04 AM               248 Triode.ini
               7 File(s)         79,406 bytes
               2 Dir(s)  92,425,502,720 bytes free

C:\Users\nlv13348\Dropbox\Spice\ExtractModel\PF86>

where the files pf86_xxx.utd are the files from the “I(Va,Vg) with Vs and Vh constant” measurments, and pf86_triode the file from the “I(Va=Vs,Vg) with Vh constant” measurement. We now run ExtractModel, with Triode.ini as argument (we could have called the initialization file anything - if we would have called it Model.ini ExtractModel could have been run without argument).

Figure 4.1 Output of ExtractModel for the EF86 example with the Triode.ini initialization file.

The output is very similar to the output produced for the ECC81 from the previous section, note the remark *** Triodes can only be fitted using Koren model - setting model to Koren.

Now the pentode model has to be created. For this a new initialization file which we call Pentode.ini needs to be created with the following contents:

C:\Program Files (x86)\gnuplot\bin\wgnuplot.exe
4            ! 4 data files now
pf86_200     ! three files with I as a function of Va for different Vg 
pf86_250     ! each file for a different screen voltage
pf86_300     !
PF86_triode  ! the pentode measured as triode again
P            ! fit a pentode
Derk         ! model Derk
2.           ! Pmax in fit
0            ! Vg Offset

Note that we use 'P' for the model (pentode without secundary emission) and `Derk' for the model describing the pentode. We could have used the `DerkE' model as well - but it will not give as good a fit as the `Derk' model. Also note that the Vs = Va dataset is last in the row of datasets - it will result in an error when it is not last. We now run ExtractModel with Pentode.ini as argument.

Figure 4.2 Output of ExtractModel for the EF86 example with the Pentode.ini initialization file.

In the output we can identify that ExtractModel first does a refinement of all parameters except the Koren parameters - ExtractModel reads the Koren parameters from the Triode.par file that was generated in the first run of ExtractModel. ExtractModel also reports that two spice files are generated: a file pf86_200.cir which contains the spice model for a pentode, and a file PF86_triode.cir which contains the spice circuit for the PF86 strapped as a triode (i.e., the screen is connected to the anode). There is also the Gnuplot pop-up - pressing OK will now display the screen currents and fit for the first dataset. Repeatedly pressing `OK' will display the anode and screen currents of next dataset etc., until we have the last dataset, which is the Vs = Va dataset.

The directory now contains the following output files:

C:\Users\nlv13348\Dropbox\Spice\ExtractModel\PF86>dir
 Volume in drive C has no label.
 Volume Serial Number is FA5B-D21C

 Directory of C:\Users\nlv13348\Dropbox\Spice\ExtractModel\PF86

01/05/2014  09:26 AM              .
01/05/2014  09:26 AM              ..
01/05/2014  10:10 AM               234 Model.Par
01/05/2014  09:26 AM               278 Pentode.ini
01/05/2014  10:10 AM             1,254 pf86_200.cir
01/05/2014  10:10 AM             5,952 pf86_200.dat
01/05/2014  10:10 AM             5,680 pf86_200.fit
01/05/2014  10:10 AM               367 pf86_200.plt
01/05/2014  10:10 AM            16,626 pf86_200.sft
01/05/2014  10:10 AM               385 pf86_200.spl
01/22/2013  08:28 PM            18,888 pf86_200.utd
01/05/2014  10:10 AM             5,952 pf86_250.dat
01/05/2014  10:10 AM             5,680 pf86_250.fit
01/05/2014  10:10 AM               367 pf86_250.plt
01/05/2014  10:10 AM            16,626 pf86_250.sft
01/05/2014  10:10 AM               385 pf86_250.spl
01/22/2013  08:28 PM            18,888 pf86_250.utd
01/05/2014  10:10 AM             5,952 pf86_300.dat
01/05/2014  10:10 AM             5,680 pf86_300.fit
01/05/2014  10:10 AM               367 pf86_300.plt
01/05/2014  10:10 AM            16,626 pf86_300.sft
01/05/2014  10:10 AM               385 pf86_300.spl
01/22/2013  08:28 PM            18,888 pf86_300.utd
01/05/2014  10:10 AM               763 PF86_triode.cir
01/05/2014  10:10 AM             6,944 PF86_triode.dat
01/05/2014  10:10 AM             6,507 PF86_triode.fit
01/05/2014  10:10 AM               436 PF86_triode.plt
01/05/2014  10:10 AM            19,045 PF86_triode.sft
01/05/2014  10:10 AM               456 PF86_triode.spl
01/22/2013  08:03 PM            22,019 pf86_triode.utd
01/05/2014  09:04 AM               248 Triode.ini
01/05/2014  09:12 AM               110 Triode.par
              32 File(s)        202,463 bytes
               2 Dir(s)  92,413,743,104 bytes free

Files with the .plt extension are the plot files that can be load in Gnuplot and will show the anode measured and fitted current. Files with the .spl extension will do the same for the screen current. Files with the .dat and .fit extension are the data files used by the .plt files, and files with the .sft extension are used by the .spl files.

The pf86_200.cir file is the file with the Spice model describing the pentode:

****************************************************
.SUBCKT pf86_200 1 2 3 4 ; A G2 G1 C;
*      Extract V1.030
* Model created:  5-Jan-2014
X1 1 2 3 4 PentodeD  MU= 40.9 EX=1.322 kG1= 668.7 KP= 354.6 kVB =  2001.1 kG2= 3941.2
+ Ookg1mOokG2=.12E-02 Aokg1=.94E-07 alkg1palskg2=.12E-02 be=   .28 als=  4.23 RGI=2000
+ CCG1=0.0P  CCG2 = 0.0p CPG1 = 0.0p CG1G1 = 0.0p CCP=0.0P  ;
.ENDS
 
****************************************************
.SUBCKT PentodeD 1 2 3 4; A G2 G1 C
RE1  7 0  1MEG    ; DUMMY SO NODE 7 HAS 2 CONNECTIONS
E1 7 0 VALUE=
+{V(2,4)/KP*LOG(1+EXP(KP*(1/MU+V(3,4)/SQRT(KVB+V(2,4)*V(2,4)))))}
E2   8 0 VALUE = {Ookg1mOokG2 + Aokg1*V(1,4) - alkg1palskg2/(1 + be*V(1,4))}
G1   1 4  VALUE = {0.5*(PWR(V(7),EX)+PWRS(V(7),EX))*V(8)}
G2   2 4 VALUE = {0.5*(PWR(V(7),EX)+PWRS(V(7),EX))/KG2 * (1+ als/(1+be*V(1,4)))}
RCP  1 4  1G      ; FOR CONVERGENCE	A  - C
C1   3 4  {CCG1}   ; CATHODE-GRID 1	C  - G1
C4   2 4  {CCG2}   ; CATHODE-GRID 2	C  - G2
C5   2 3  {CG1G2}   ; GRID 1 -GRID 2	G1  - G2
C2   1 3  {CPG1}  ; GRID 1-PLATE	G1 - A
C3   1 4  {CCP}   ; CATHODE-PLATE	A  - C
R1   3 5  {RGI}   ; FOR GRID CURRENT	G1 - 5
D3   5 4  DX      ; FOR GRID CURRENT	5  - C
.MODEL DX D(IS=1N RS=1 CJO=10PF TT=1N)
.ENDS PentodeD

Note that the circuit is called pf86_200, which is the name of the first data file appearing in the list of datasets.

4b. Fitting a variable mu pentode

Fitting a variable mu pentode requires a rather different approach compared to what is outlined for a standard pentode and or a pentode with secondary emission. The sequence of fitting a triode strapped tube, followed by the pentode fit, is similar, however. We first describe the triode-strapped fit. Care should be taken in the dataset that it covers both the high and low-mu regions - ie, one should have a large range of Vg1 voltages. A rather standard .ini file is shown below
C:\Program Files (x86)\gnuplot\bin\wgnuplot.exe
1
EF85_triode
X
Derk
10.	!Pmax in fit
0	!Vg Offset
which leads to the result depicted below:

Figure 4.3 Output of ExtractModel for an EF85 triode fit producing wrong results - even though the fit superficially looks OK..

While superficially this seems a rather good fit, there are a few serious problems. The fitted mu value ran into the limit built-in in, for which reason ExtractModel issues a warning message:
 *** WARNING ***
The fitted value for Mu reached its maximum and is probably unphysically high.
If the measurement is on a variable mu pentode, try to reduce Icmax to only capture the lo-mu
part of the characteristic.
Also - on a closer look- there are structural misfits. The reason for these observations is that the Koren triode model cannot fit a variable-mu triode, and, hence, results in unphysical results. The remedy to this is to limit the maximum cathode current for the fit. In this case Icmax=2 is included, leading to the following result:

Figure 4.4 Output of ExtractModel for an EF85 triode fit producing correct results - even though the fit looks rather bad.

While on first sight this fit looks rather bad, the fit for the low anode currents is actually very good and corresponds to the low-mu part of the tube. Note, that this time the fitted mu value is realistic and ExtractModel no longer issues a warning. With this triode file the process will continue similar to the fitting process for a regular pentode, with that difference that instead of 3-4 different Vg1 values per screen voltage, now significantly more are needed to fully cover both the high and low mu part of the pentode. As a rule of thumb, at least 8 different Vg1 values are required. A typical .ini file is provided below:
C:\Program Files (x86)\gnuplot\bin\wgnuplot.exe
5
EF85_75
EF85_150
EF85_200
EF85_250
EF85_triode
V
Derk
5.	!Pmax in fit
0	!Vg Offset
The results of this fit are depicted below.

Figure 4.5 Output of ExtractModel for an EF85 pentode fit - here the triode data fit is shown.

Note that the mu-values are realistic, and that the fit of the triode data (based on the pentode fit) is now substantially better as before. It is also clear that as the variable-mu pentode model is computationally rather complex, fitting is slow - in this case 1.5 minute was needed for the fit to complete. Extractmodel is not designed for speed...

5. Fitting a pentode with secondary emission

In this section, a model will be fitted to the EL500 tube (which is identical to the PL504). Fitting a pentode with secondary emission is similar to fitting a regular pentode model; the first step is to fit a triode model as described in the previous section. The required initialization file for that is:

C:\Program Files (x86)\gnuplot\bin\wgnuplot.exe
1            ! only one file
EL500_triode ! with the pentode measured with screen connected to anode
X            ! to sum Ia and Is to fit the triode model
DerkE        ! Derk is used
700.         ! Pmax in fit
-25          ! Vg Offset

Note the fact that now the entry for VgOffset equals -25 because the measurements have been done while adding this offset to the first grid in order to keep anode currents below 200mA. For PaMax a value of 700 is used, basically saying that no limitation for anode dissipation is used. After running ExtractModel with this initialization file, a new initialization file Pentode.ini needs to be made and is shown below:
C:\Program Files (x86)\gnuplot\bin\wgnuplot.exe
4            ! 4 data files now
EL500_300    ! three files with I as a function of Va for different Vg 
EL500_250    ! each file for a different screen voltage
EL500_200    !
EL500_triode ! the pentode measured as triode again
B            ! fit a pentode with secondary emission
DerkE        ! model DerkE
700.         ! Pmax in fit
-25          ! Vg Offset

Note the use of the 'B' designator for using a pentode model with secundary emission, and the fact that the used model is `DerkE'. Alternatively, the `Derk' model could have been used, with a worse fit.

Figure 5.1 Output of ExtractModel for the EL500 example with the Pentode.ini initialization file.

The output is very similar to the output for the pentode model, the main difference being that there are more parameters that are displayed. Gnuplot will also show the same Pause pop-up; pressing 'OK' will have Gnuplot show the screen current or the next dataset. The output file types are identical as for a pentode.

6. Fitting a heptode

For a heptode, a number of datafiles need to be available for various Vg1 and Vg3 voltages. In this example, we will fit a heptode. Below is an example of a good set of data files required.

03/16/2014  01:56 PM            15,912 ECH81T.utd
03/08/2014  10:36 AM            16,666 ECH81_100_g3_10.0.utd
03/08/2014  10:38 AM            16,666 ECH81_100_g3_15.0.utd
03/08/2014  10:26 AM            16,666 ECH81_150_g3_10.0.utd
03/08/2014  10:21 AM            16,666 ECH81_150_g3_15.0.utd
03/08/2014  10:04 AM            16,666 ECH81_triode_g1_2.0.utd
03/08/2014  09:39 AM            20,807 ECH81_triode_g3_10.0.utd
03/08/2014  09:44 AM            20,807 ECH81_triode_g3_15.0.utd
              12 File(s)        211,661 bytes
               0 Dir(s)  90,205,777,920 bytes free

As a first step, the parameters required to estimate the space current need to be generated. This is done by fitting a triode model to the total space current (as also done in pentode model fitting). A sample input file (triodeX.ini in the example set) is listed below:

C:\Program Files (x86)\gnuplot\bin\wgnuplot.exe
1
ECH_triode_g3_10.0
X
Koren
2.2	!Pmax in fit
0	!Vg Offset


Figure 6.1 Output of ExtractModel for the ECH81 example with the triodeX.ini initialization file.

In Fig. 6.1, the output is shown. The fit for high currents is not perfect: the tube shows saturation for high cathode currents, and therefore the max anode dissipation has been set at 2.2W (see the .ini file). The output of this run is now a Triode.par file, that will be used later on to generate starting values.

As a next step, an estimate needs to be generated to the parameters of the virtual penthode. This is done by fitting a triode model to the anode current as function of Vg3. A sample .ini (in the sample input this is triodeY.ini) file is listed below:

C:\Program Files (x86)\gnuplot\bin\wgnuplot.exe
1
ECH81_triode_g1_2.0
Y
Koren
2.2	!Pmax in fit
0	!Vg Offset


Figure 6.2 Output of ExtractModel for the ECH81 example with the triodeY.ini initialization file.

Note that as tube type, `Y' is given. This signals ExtractModel to generate a parameter file Triode_g3.par that will be used later in the full heptode fitting. In Fig. 6.2, the output generated by running ExtractModel with the triodeY.ini file, is shown. The fit for high currents is not perfect; this is due to the fact that the current source for this triode (g3 and g4 strapped together) is modulated by g2 - which by nature of the tube is connected to g4.

By now two .par files should have been generated:

03/22/2014  03:23 PM               110 Triode.par
03/22/2014  03:24 PM               110 Triode_g3.par
Once this is completed, the full heptode model can be generated. A sample .ini file is:
C:\Program Files (x86)\gnuplot\bin\wgnuplot.exe
7
ECH81_100_g3_10.0
ECH81_150_g3_10.0
ECH81_100_g3_15.0
ECH81_150_g3_15.0
ECH81_triode_g1_2.0
ECH81_triode_g3_10.0
ECH81_triode_g3_15.0
H
Derk
1	!Pmax in fit
0	!Vg Offset
Icmax = 20

Note, that here the optional instruction Icmax = 20 is given. This instructs ExtractModel to ignore data with a cathode current larger than 20 mA in the fit.

Figure 6.3 Output of ExtractModel for the ECH81 example with the heptode.ini initialization file.

A screen shot is provided in Fig.6.3. As with pentodes, pressing `OK' will show the fit of subsequent currents Ia and Ig2g4. The full screen output is provided below. Experience has shown that the exact values listed, are very dependent on the machine used. It is also instructive to try to run ExtractModel with different values of the maximum anode power and/or cathode current. If these values are set at a too high level, ExtractModel gets trapped in an optimization minimum that is incorrect.

C:\Users\nlv13348\Dropbox\Spice\ExtractModel\ECH81_example>..\ExtractModel.exe heptode.ini
Initialization file is:heptode.ini

***************************
      Extract V1.912
      Mar 29, 2014
***************************

Data will be read from file ECH81_100_g3_10.0(.utd)
Data will be read from file ECH81_150_g3_10.0(.utd)
Data will be read from file ECH81_100_g3_15.0(.utd)
Data will be read from file ECH81_150_g3_15.0(.utd)
Data will be read from file ECH81_triode_g1_2.0(.utd)
Data will be read from file ECH81_triode_g3_10.0(.utd)
Data will be read from file ECH81_triode_g3_15.0(.utd)
Tube model is hexode/heptode.
Using Derk model
Fitting model to max power data <       1.000000 W.
Vg offset equals   0.000000E+00
Fitting model to Max. cathode current  20.0 mA.

*****************************************************
File ECH81_100_g3_10.0 is a Vg3=Cst file.
File ECH81_150_g3_10.0 is a Vg3=Cst file.
File ECH81_100_g3_15.0 is a Vg3=Cst file.
File ECH81_150_g3_15.0 is a Vg3=Cst file.
File ECH81_triode_g1_2.0 is a Vg1=Cst file.
File ECH81_triode_g3_10.0 is a Vg3=Cst file.
File ECH81_triode_g3_15.0 is a Vg3=Cst file.

File ECH81_100_g3_10.0 is a Vs=Cst sweep.
File ECH81_150_g3_10.0 is a Vs=Cst sweep.
File ECH81_100_g3_15.0 is a Vs=Cst sweep.
File ECH81_150_g3_15.0 is a Vs=Cst sweep.
File ECH81_triode_g1_2.0 is a Vs=Va sweep.
File ECH81_triode_g3_10.0 is a Vs=Va sweep.
File ECH81_triode_g3_15.0 is a Vs=Va sweep.

Total number of datapoints in the fit equals:  845.
This is 68.70% of the total number  1230 of datapoints.
Initial estimates:

mu'    =       4.759179
ex'    =       1.646312
kG1'   =     141.945900
kp'    =     137.741900
kVB'   =     329.029100
mu3    =     100.000000
alpha_s=       1.018130
beta   =   5.000000E-02
A      =   7.201945E-04
kG2    =     689.291600
kVB    =    7069.028000
kp     =      40.724440
kG1    =     450.762100
mu     =      39.924630
ex     =       1.861017

Before refinement R2 =    4.691630E-03
Iter:  1,
After refinement R2 =    2.661657E-03
Before refinement R2 =    2.661657E-03
Iter:  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12,
After refinement R2 =    5.719963E-05
Spice subcircuit written to file ECH81_100_g3_10.0.cir
Please add capacitances yourself!

mu'    =       9.046410
ex'    =   2.591895E-01
kG1'   =       2.570824
kp'    =     164.910100
kVB'   =    2163.044000
mu3    =      39.240860
alpha_s=       2.977865
beta   =   1.110370E-01
A      =   3.701994E-11
kG2    =     971.876300
kVB    =    2518.835000
kp     =      43.778870
kG1    =     231.550800
mu     =      42.761890
ex     =       1.507489

Elapsed time:  45.0s

Running this will result in a file ECH81_100_g3_10.0.cir, which is the LTSpice file for the heptode model. As in the previous examples, this name is derived from the first datafile entry in the .ini file. Happy simulating in Spice!

7. Fitting a Pentode with grid 3 modulation

Like with a heptode, a number of datafiles needs to be available for various Vg1 and Vg3 voltages. In this example, we will fit a pentode with grid 3 modulation.

Below is an example of a good set of data files require:

04/20/2014  08:56 AM            25,857 EF80_200_g1_2.0.utd
04/20/2014  08:45 AM            25,857 EF80_200_g1_3.0.utd
05/04/2014  06:54 AM            12,648 EF80_200_g3_0.0.utd
04/20/2014  08:47 AM            25,857 EF80_250_g1_3.0.utd
05/04/2014  06:54 AM            12,648 EF80_250_g3_0.0.utd
05/04/2014  06:54 AM            12,648 EF80_300_g3_0.0.utd
05/04/2014  06:54 AM            12,750 EF80_triode_g3_0.0.utd
              12 File(s)        211,661 bytes
               0 Dir(s)  90,205,777,920 bytes free

ExtractModel takes a Penthode.par file as input. This file can be generated by fitting the penthode with a regular DerkE penthode model. This results in a file Model.par (see section on penthode fitting). This file can be copied to a file with the name Penthode.ini.

Once this is completed, the full penthode model can be generated. A sample .ini (in this example called pg3.ini) file is:

C:\Program Files (x86)\gnuplot\bin\wgnuplot.exe
7
EF80_200_g3_0.0
EF80_250_g3_0.0
EF80_300_g3_0.0
EF80_200_g1_2.0
EF80_200_g1_3.0
EF80_250_g1_3.0
EF80_triode_g3_0.0
F
DerkE
1.      !Pmax in fit
0       !Vg Offset
Icmax = 20

In the above, file naming is not free, as in heptode fitting. A file ending on _g1_3.0 indicates that this is a file where g1 has been constant at -3V, and g3 has been connected to the uTracer. Note, that here the optional instruction Icmax = 20 is given. This instructs ExtractModel to ignore data with a cathode current larger than 20 mA in the fit.

Figure 7.1 Output of ExtractModel for the EF80 with $g_3$ modulation example with the {\tt pg3.ini} initialization file.

A screen shot is provided in Fig. 7.1. As with regular pentodes, pressing `OK' will show the fit of subsequent currents Ia and Ig2. The full screen output is provided below. Experience has shown that the exact values listed, are very dependent on the machine used. It is also instructive to try to run ExtractModel with different values of the maximum anode power and/or cathode current. If these values are set at a too high level, ExtractModel gets trapped in an optimization minimum that is incorrect.

C:\Spice\extractmodel\EF80\EF80_g3>..\..\ExtractModel.exe pg3.ini

***************************
      Extract V1.960
      Apr 16, 2014
***************************

Initialization file is:pg3.ini

Data will be read from file EF80_200_g3_0.0(.utd)
Data will be read from file EF80_250_g3_0.0(.utd)
Data will be read from file EF80_300_g3_0.0(.utd)
Data will be read from file EF80_200_g1_2.0(.utd)
Data will be read from file EF80_200_g1_3.0(.utd)
Data will be read from file EF80_250_g1_3.0(.utd)
Data will be read from file EF80_triode_g3_0.0(.utd)
Tube model is penthode with g3 modelling.
Using DerkE model
Fitting model to max power data <       1.000000 W.
Vg offset equals   0.000000E+00
Fitting model to Max. cathode current  20.0 mA.

*****************************************************
File EF80_200_g3_0.0 is a Vg3=Cst file.
File EF80_250_g3_0.0 is a Vg3=Cst file.
File EF80_300_g3_0.0 is a Vg3=Cst file.
File EF80_200_g1_2.0 is a Vg1=Cst file.
File EF80_200_g1_3.0 is a Vg1=Cst file.
File EF80_250_g1_3.0 is a Vg1=Cst file.
File EF80_triode_g3_0.0 is a Vg3=Cst file.

File EF80_200_g3_0.0 is a Vs=Cst sweep.
File EF80_250_g3_0.0 is a Vs=Cst sweep.
File EF80_300_g3_0.0 is a Vs=Cst sweep.
File EF80_200_g1_2.0 is a Vs=Cst sweep.
File EF80_200_g1_3.0 is a Vs=Cst sweep.
File EF80_250_g1_3.0 is a Vs=Cst sweep.
File EF80_triode_g3_0.0 is a Vs=Va sweep.

Total number of datapoints in the fit equals:  635.
This is 50.48% of the total number  1258 of datapoints.
Initial estimates:

mu'     =      10.000000
ex'     =       1.000000
kG1'    =       4.000000
V0      =   0.000000E+00
mu3     =       1.000000
ex      =       1.180706
alpha_s =       3.105834
beta    =   5.482645E-02
A       =   2.848182E-04
kG2     =     540.605400
kVB     =    4154.896000
kp      =     315.981400
kG1     =     126.095200
mu      =      56.140380

Before refinement R2 =    2.441214E-02
Iter:  1,
After refinement R2 =    2.893008E-03
Before refinement R2 =    2.893008E-03
Iter:  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14, 15, 16, 17, 1
,
After refinement R2 =    2.521043E-04
Spice subcircuit written to file EF80_200_g3_0.0.cir
Please add capacitances yourself!

Elapsed time:  44.0s
Final estimates:

mu'     =       5.537506
ex'     =       1.913082
kG1'    =     520.663500
V0      =      35.594470
mu3     =     158.422600
ex      =       1.433368
alpha_s =       3.449066
beta    =   6.233228E-02
A       =   1.802836E-04
kG2     =    1137.058000
kVB     =   12413.510000
kp      =     952.098300
kG1     =     238.876000
mu      =      48.822110

Standard variances (in %) for each parameter:
mu'     =       1.452745
ex'     =       2.504222
kG1'    =      19.576700
V0      =       1.047317
mu3     =       3.868330
ex      =       4.644901
alpha_s =       2.806048
beta    =       1.443978
A       =      32.830730
kG2     =       7.543881
kVB     =      18.049400
kp      =      21.395110
kG1     =       7.312186
mu      =   6.979983E-01

This example shows also a new feature introduced in V1.96: standard variances in the fitted parameters. These standard variances provide a lower estimate of the actual errors in the parameters, see the Theory document for more details. The run of ExtractModel depicted above has generated the LT Spice circuit file EF80\_200\_g3\_0.0.cir which can now be used. Happy simulating!

8. Model fitting tips

Feedback from users working with ExtractModel has generated some practical tips for a good fit, and listed in the following. ExtractModel already incorporates, or will incorporate, some of the tips below and generate warnings when the data to be fitted is insufficient (sec. 8.1), when the tube displays saturation effects (sec. 8.2), or when the dynamic range is too large for a good fit (sec. 8.3). ExtractModel will leave it to the discretion of the user to continue - but results may not be correct.

8.1 Number of different values for Vg

For a triode fit, different values for Vg are required to get a good estimate of especially the parameter kp. Depending on how accurate the measurements are, at least 5 different values for Vg are required, and at least a few values are needed that give an accurate description of the pinch-off behaviour, which helps in good estimates of kVB. Preferably (see also sec. 8.3) one would have a range of Vg values which, at the maximum anode voltage and highest Vg, result in an anode current of about 150% of the maximum anode current, and at the maximum anode voltage and lowest Vg about 20% of that. Figures 3.1 and 4.1 give an idea for two different triodes.

8.2 Saturation

Saturation of a tube is a phenomenon where the cathode is not capable of delivering the current that theoretically would flow. For triodes, the anode current as function of anode voltage show a positive curvature (the curve becomes ever steeper with increasing anode voltage). Severe saturation will cause the anode current to show negative curvature (i.e., the steepness of current increase as a function of voltage becomes less). It is important to remove curves that display this behavior while fitting. ExtractModel will try to fit the measurements (even though in very severe cases, it gives a warning); and as a result the fitted parameter values may not represent the true behavior.

For pentodes, saturation may occur either due to excessive screen current at low anode voltage, or, similar as with a triode, due to excessive anode current at very high anode voltages. Saturation at low anode voltages can be detected by inspection of the screen current, which, at low anode voltage, should be a concave curve. When this curve becomes convex, saturation plays a role. Especially when secondary emission is included in the model fitting, ExtractModel may easily be fooled by the convex part in the screen current, and mistakenly interprets it as secondary emission (which also causes convex curvature of the screen current!).

As a rule of thumb, one should never have data with cathode currents that largely exceed the maximum values as published in the datasheets. For new tubes of renowned brands, the cathode can typically deliver 150% of the tabulated maximum value. I have observed this not to be true for some Russian NOS tubes, and old, used tubes that already spent a good deal of their life in heavy duty.

8.3 Dynamic range

The previous section already implicitly gave an upper boundary for the current measurements. Curves reaching lower current values are required for covering the full space that is needed for a good parameter fit - however, if currents are very close to zero over the full anode voltage range, this adds no information (and actually detracts ExtractModel). Typically, a good dynamic range is between 5 and 10, meaning that the highest current reached for the Vg,Vg2 combination that gives the lowest overall current, should be no less than about 1/10 to 1/5 of the maximum current over all parameters. Good examples for this are the curves presented throughout this document, where the dynamic range never exceeds 7.



About Derk Reefman

Derk Reefman received his masters’ degree in Chemistry in 1989, and his PhD in physics in 1993, from the university of Leiden. In 1990, he received the `Unilever research prijs’ for the best master’s thesis in chemistry. For his thesis 'NMR properties of High-Tc Superconductors' he was awarded a prize for the best Leiden PhD thesis in the field of physics, chemistry and biology in 1993. He joined Philips research in 1993 and has been active in various aspects of X-ray diffraction. Since 1998, he joined the mixed signal department in Philips research where he led several projects on digital and analogue aspects of high-quality audio, in particular SA-CD and Class-D amplifiers. Late 2003 he switched to the field of power management and power conversion, where his areas of interest included integrated DCDC conversion and high bandwidth DCDC conversion, for application in mobile, battery-operated equipment. From April 2006 to May 2012, he was department head of the group `Micro-Systems and Devices’, focusing on MEMS and ASIC research and development for healthcare, lifestyle and lighting applications. As of June 2012, he heads the Engineering and R&D departments of Philips Magnetic Resonance, Magnets.


You can email Derk Reefman at: derkreefman@gmail.com