
Home  Forums  Rules  Articles  diyAudio Store  Blogs  Gallery  Wiki  Register  Donations  FAQ  Calendar  Search  Today's Posts  Mark Forums Read  Search 
Tubes / Valves All about our sweet vacuum tubes :) Threads about Musical Instrument Amps of all kinds should be in the Instruments & Amps forum 
Please consider donating to help us continue to serve you.
Ads on/off / Custom Title / More PMs / More album space / Advanced printing & mass image saving 

Thread Tools  Search this Thread 
12th October 2013, 10:29 PM  #21  
diyAudio Member

Quote:
Here's how the curves sort out when the data is ranged to all data points, or limited to Vak ranges:
An externally hosted image should be here but it no longer works. Please upload images instead of linking to them to prevent this.


13th October 2013, 12:27 PM  #22 
diyAudio Member

Here is my improved version of the 4P1L triode model including A2 grid current:
4P1L model improved  Bartola Valves Cheers, Ale
__________________
"A mistake is always forgivable, rarely excusable and always unacceptable. " (Robert Fripp) http://www.bartola.co.uk/valves/ 
14th October 2013, 01:47 PM  #23 
diyAudio Member

Here are the params for the 832, Vg2=250:
All Data Points: MU=6.27 KP=44.84 EX=1.55 KVB=36.1 KG1=5476 For Vak>= 50: MU=6.86 KP=28.01 EX=1.55 KVB=24.7 KG1=4795 For Vak>=100: MU=6.90 KP=27.40 EX=1.55 KVB=38.1 KG1=4614 All of the above are dependent upon the number of points, where you choose to select them from, and how you describe the error term being minimized. This was a pretty quick rendering of the datasheet into Excel, so ymmv. 
15th October 2013, 10:45 AM  #24 
diyAudio Member
Join Date: Sep 2013

Oh No! Another Pentode Model
In another thread I posted the results of a new pentode model for the GU50 tube, and said that I would start a new topic to discuss this model in detail. I'll warn everyone right up front that this new model has a lot of parameters that need to be calculated. However, the model has been designed in such a way that there is minimum interaction between the parameters, so that they can be calculated in small independent sets.
Over the past year I've been working on a spreadsheet to do loadline analysis of output tubes, and have been using the Koren model which works very well for triodes, but I've had trouble getting an accurate fit especially near the knee of the plate current curves. Recently, I've been tinkering with an alternative pentode model. When I started on this, I wasn't aware of Ayumi's pentode model. I had a look at it (using Google to translate from Japanese) and, while I didn't read the entire article in detail, I was impressed with methodology for determining the parameters. However, I was still a bit disappointed with the way the model fit around the knee of the plate current curve. So, I decided to continue with my project. Although the Koren model is empirical, it appears that it's theoretically based with some empirical additions. This is generally a good way to do it, because we can be reasonably confident that if we try to extrapolate the model beyond the original fitting data, the curves won't likely veer out of control. Unfortunately, there sometimes comes a point where the theoretical model is just too approximate, and piling empirical additions onto it makes it more and more unwieldy. I decided to start with clean slate and use a completely empirical model based on very simple math functions. Examining the plate current curves for a pentode, we can approximate the curve with two straight lines: the first, to the left of the knee with a steep slope (see Line A in Figure 1), and the second, to the right of the knee, with an almost horizontal slope (see Line B in Figure 1). In the transition region, a function must be provided to blend smoothly from one to the other. For the time being, I'll ignore the effects of changing screen and control grid voltages. I'll assume the values of Ec and Es to be fixed at the maximum voltage for the published data. That means that we only have to fit a single variable function. I'll use the data for the GU50 as an example, and assume Ec=0 and Es=250V. I'll refer to these reference voltages as EcRef and EsRef respectively. For the part of the curve below the knee voltage, a simple straight line will suffice (Line A, Figure 1), and has the form: Ip=g0*Ep+b0 where g0 is the slope and b0 is the Ip axis intercept. Since Ip must be zero when Ep is zero, b0 must be zero, and can be eliminated from the formula. So the plate current function for the left side of the curve is simply: Ip=g0*Ep g0 is simply the transconductance below the knee, and can be found directly from the plate current curves by picking a point on the curve just before the knee and dividing the current by the corresponding voltage. For the GU50 example, the curve starts to bend after Ip goes above 0.160 A (For Ec=0). The plate voltage at this point is about 24 volts, so the slope is 0.16/24. Hence: g0=0.00667 For the right side of the curve (Line B, Figure 1), I looked at several different functions, in order of increasing complexity:  A simple straight line (2 parameters)  A parabola (3 parameters)  A square root function (4 parameters)  A hyperbola (4 parameters) The choice of which function to use is a compromise between ease of calculation, and how well it fits. A simple straight line may work well in many cases where the plate curves are very straight, and it is very easy to calculate with nothing more than a ruler to measure slope and intercept, but in the general case there's often too much curvature to the Ip/Ep characteristic. So, I looked at the next simplest function, a parabola. This requires only one more parameter than the straight line, and there are many online curve fitting calculators that will do the work of determining the 3 coefficients. This gives a better fit than the straight line in most cases. However, it isn't very good when attempting to use the model beyond the range of the fitted data, because the parabolic curve naturally starts to drop off at high values. The hyperbola and square root function don't suffer from this problem, making them fairly safe for use beyond the range of fitting data. I eventually chose a hyperbolic function with an additional linear term of this form: Ip=kp1/(kp2*Ep)+kp3*Ep+kp4 This involves a bit more work to calculate the parameters. Currently, I'm using a solver macro in my spreadsheet to do the fitting work, but I hope to develop a method for calculating them directly. For the GU50 example, the solver came up with these values: kp1=6.3279e1 kp2=325.61 kp3=2.6731e5 kp4=4.1832e1 In the knee region a method is needed to transition from the nearly vertical line on the left to the nearly horizontal curve on the right. This can be handled with a math function that exhibits an Sshaped curve. There are numerous examples. The arctan function is one of them, and it is the first one that I tried. However, it wasn't satisfactory. So, I moved on to an exponential form: y=1/(1+exp((kt1x)*kt2) where parameter kt1 determines the position of the centre of the transition region, and kt2 determines the width of the transition region. For the GU50 example, the centre of the transition region (kt2) will be somewhere above 24 volts, so I chose a value of 30 for kt1 and then tried different values of kt2 to see the effect of widening or narrowing the transition region. (The smaller the value of kt2, the wider the transition region.) The best value turned out to be less than one. I let the solver fine tune these values, and it came up with: kt1=35.41 kt2=0.177 Combining the three functions into one, we get: Ip=g0*Ep+(kp1/(kp2+Ep)+kp3*Ep+kp4g0*Ep)/(1+exp((kt1Ep)*kt2)) Using the above calculated parameters, we get the plate current curve show in Figure 2. The blue data points are as measured off of the manufacturers data sheet, and the red curve is the fitting function. It's pretty good, but not perfect near the knee. At this point I decided to let the solver fine tune all of the values simultaneously, and it came up with the following optimized values: g0=0.006963 kp1=7.0253 kp2=14.76 kp3=4.8470e5 kp4=3.1618e1 kt1=24.05 kt2=4.35 Surprisingly, the solver changed some of the values quite radically, but this gave a very good fit that wouldn't have been possible by manually manipulating the numbers. Now, you're probably thinking it's a lot of parameters (seven) for a function that still doesn't account for screen voltage and control grid voltage. True enough, but that's the cost of getting a good fit. The following chart shows how the fitted curve (red line) compares with the published data (blue points). The fit is almost exact. (See Figure 3) Next we have to account for control and screen grids. We can see that when the control grid is made more negative, the Ip curve moves closer to the Ep axis, but stays the same shape. It seems reasonable then that the plate current function can simply be multiplied by a scale factor which is a simple function of Ec. I found a parabolic fit works very well for this. It's simply a matter of picking a fixed value for Ep, say (600 volts for the GU50 example), and then measure the curves to find Ip for different values of Ec. These current values are divided by the value of Ip when Ec=EcRef. This normalizes the values so that the scale factor function will return a value of 1 when Ec=EcRef. The resulting data points are then plugged into a curve fitter to get the coefficients for what I will call the control grid reduction function: Frc = kc1*Ec^2+kc2*Ec+kc3 We're now up to ten parameters, but the good news is that these last three parameters will have no interactions with the first seven parameters, making their calculation reasonably painless. The curve fitting calculator gave the following values: kc1=3.3616e4 kc2=3.6311e2 kc3=1.0061 The complete set of curves for Es=250V is shown in Figure 4. To account for screen voltage, we do the same thing we did for the control grid. This time, we hold Ep constant (700V) and Ec constant (0V), and then measure the different values of Ip as we vary Es. Again this is normalized by dividing the Ip values by the value of Ip at Es=EsRef, and then is fitted to a parabolic curve using a curve fitter. This give the screen reduction function: Frs = ks1*Es^2+ks2*Es+ks3 We're now up to 13 parameters, but again, these last three will have no interaction with the first 10 parameters so they can be calculated independently. The curve fitter gave the following values: ks1=0 ks2=4.6688e3 ks3=0.16667 In this particular example the best fit happens to be a straight line, and so ks1 is zero. However, we can't assume that a straight line fit will work in every case. We're almost done, but not quite. When the both control and screen grids are made more negative, the resulting plate current decreases more than the combined Frc and Frs functions will account for. This is shown on the screen curves of Figure 5. Notice how the fitted curves (red lines) sit too high in the mid region. Therefore one last function must be included to account for the interaction between screen and control grid. I tried a few functions experimentally and found the following to work reasonably well: Fsc = 1/(1(kcs*(EcEcRef)*(1Es/EsRef))) where EcRef and EsRef are the reference values of control and screen grid voltages mentioned earlier, and kcs is a value between 0 and 1 that is manually adjusted for best fit. For the GU50 example I manually adjusted kcs for the best fit. The optimum value is: kcs=0.09 The improvement is shown in Figure 6. The model is now: Ip=[g0*Ep+(kp1/(kp2+Ep)+kp3*Ep+kp4g0*Ep)/(1+exp((kt1Ep)*kt2))]*Frc*Frs*Fsc If this model is to be used in a situation where plate voltage can go negative, then it should be enclosed inside of a Max() function to force Ip to zero for negative Ep values. Hence the final model is: Ip=Max(0,[g0*Ep+(kp1/(kp2+Ep)+kp3*Ep+kp4g0*Ep)/(1+exp((kt1Ep)*kt2))]*Frc*Frs*Fsc) And there it is. It requires the calculation of a total of 14 parameters, though the calculations are very simple for the most part. I don't include EcRef or EsRef in the total because they are simply reference points on the published data and it's trivial to pick them. Summarizing the parameters for the GU50, we have: EcRef= 0 EsRef= 250 g0= 0.006963 kp1= 7.0253 kp2= 14.76 kp3= 4.8470e5 kp4= 3.1618e1 kt1= 24.05 kt2= 4.35 kc1= 3.3616e4 kc2= 3.6311e2 kc3= 1.0061 ks1= 0 ks2= 4.6688e3 ks3= 0.16667 kcs= 0.09 At this point the plate current model does not account for nonzero suppressor voltage. To account for this, would require info not normally available in the published data. But if there is any interest in this, I could take a look at it. I have not developed any model for control grid current or screen grid current. I'll probably take a crack at them eventually. In the meantime, an existing model (Koren or Ayumi) will have to be used for these. Since I've been using this plate current function only on a spreadsheet for doing loadlines, I don't have it coded into a Spice model yet. However, it should be straightforward to take the above formulas and create the Spice model. Hopefully I haven't made any errors in transcribing the above formulas. Last edited by Robert Weaver; 15th October 2013 at 10:26 PM. Reason: Fixed typos in Frs, Frc Ip formulas 
15th October 2013, 10:58 AM  #25 
diyAudio Member
Join Date: Sep 2013

6V6GT parameters
The GU50 model in the previous post worked out quite well. I've also been working on a 6V6GT model which is a bit more difficult because of the rather severe kinks in the plate curves just above the knee voltage. Here are the parameters that I've come up with.
6V6GT Parameters EsRef= 250 EcRef= 0 g0= 2.9777E03 kt2= 2.2108E01 kt1= 2.2138E+01 kp1= 2.6959E+01 kp2= 3.0208E+02 kp3= 6.1546E05 kp4= 1.7709E01 kc1= 8.8589E04 kc2= 5.9183E02 kc3= 1.0066E+00 ks1= 5.8261E06 ks2= 2.5991E03 ks3= 1.3870E02 kcs= 0.2000 The attachments show how it fits. As you can see, at low plate voltages and very negative grid voltages, the model diverges significantly from the actual data. However, I believe that the important regions of operation which would follow a load line from upper left to lower right are still fairly accurate. 
15th October 2013, 01:04 PM  #26 
diyAudio Moderator Emeritus
Join Date: Jan 2011
Location: In Transient

Awesome work! A lot to digest here, it seems to be a purely empirical approach but if it works, who am I to argue I would like to bring your attention to a paper by the good professors at University Hamburg, I still like the idea of a "physicallymotivated" model, i.e., one that relies largely on the underlying physical properties of the vacuum tube a la ChildLangmuir Law. In their paper, the basic technique IIRC, is based on surfacefitting the plate and the transfer characteristic curves while adhering to the physical model.
Obviously, for a pentode, it will much harder to do, since there is the screen voltage/current to content with as well. Anyway, please take a look at the paper and see if it makes any sense to incorporate the physical aspect into the curve/surface fitting routine. Last edited by jazbo8; 15th October 2013 at 01:14 PM. 
15th October 2013, 04:50 PM  #27 
diyAudio Member
Join Date: Jul 2003
Location: Wayne, West Virginia


15th October 2013, 04:59 PM  #28 
diyAudio Member

Do I have the parentheses nested properly, I'm getting different results:
Last edited by jackinnj; 15th October 2013 at 05:04 PM. 
15th October 2013, 10:28 PM  #29 
diyAudio Member
Join Date: Sep 2013

My apologies. I made typos when transcribing the Frc and Frs formulas. They should be:
frc=kc1*Ec^2+kc2*Ec+kc3 frs=ks1*Es^2+ks2*Es+ks3 I had inadvertently used Ep instead of Es and Ec. I also made a typo in the Ip function. I accidentally had a multiply symbol instead of addition between Ep and kp2. The correct formula is: Ip=[g0*Ep+(kp1/(kp2+Ep)+kp3*Ep+kp4g0*Ep)/(1+exp((kt1Ep)*kt2))]*Frc*Frs*Fsc Thanks for pointing out the problem. I went back and edited my original post to correct the errors. In your Fsc formula, you have one extra closing parenthesis immediately following EcRef. It should be: Fsc = 1/(1(kcs*(EcEcRef)*(1Es/EsRef))) 
16th October 2013, 11:56 AM  #30  
diyAudio Member
Join Date: Sep 2013

Quote:
Thanks for the link to the Dempwolf Zölzer paper. I haven't seen it before, and will give it a good read through. Last edited by Robert Weaver; 16th October 2013 at 12:03 PM. 

Thread Tools  Search this Thread 


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Vacuum tubes SPICE models, another way  Dominique_free  Software Tools  2  12th November 2013 07:26 PM 
Tube spice models  nhuwar  Tubes / Valves  45  25th November 2011 09:47 AM 
Computer program for tube curves and Spice models  Jim Tonne  Software Tools  9  21st November 2010 11:10 AM 
Got my tube spice models, and tubed CD player page back on the air  wa2ise  Tubes / Valves  2  21st April 2008 12:07 AM 
New To Site?  Need Help? 