• WARNING: Tube/Valve amplifiers use potentially LETHAL HIGH VOLTAGES.
    Building, troubleshooting and testing of these amplifiers should only be
    performed by someone who is thoroughly familiar with
    the safety precautions around high voltages.

JJ Tesla ECC99 spice model

Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.
This is a PSpice model. If you need a Berkeley model, let me know.

Be careful with the LOG function. In this model it means natural log, which is sometimes written as LN. If your simulator uses LN for natrual log, then replace LOG with LN. If not, you're ok.

If you don't know, plot the curves. If they look right then you're good. If not, change it to LN and it should look right.

*
* Triode Model for ECC99
*
* Alex Cavalli
* 2003
*
* Based on models from Norman Koren
*
* Grid current is modeled with a diode.
*
* 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.
*

.SUBCKT ECC99 1 2 3 ; P G C; NEW MODEL
E1 7 0 VALUE=
+{V(1,3)/500*LOG(1+EXP(500*(1/22+V(2,3)/SQRT(300+V(1,3)*V(1,3)))))}
G1 1 3 VALUE={(PWR(V(7),1.3)+PWRS(V(7),1.3))/362}
RCP 1 3 1G ; TO AVOID FLOATING NODES IN MU-FOLLOWER
C1 2 3 5.8p
C2 2 1 5.1p
C3 1 3 0.91p
D3 5 3 DX ; FOR GRID CURRENT
R1 2 5 2000 ; FOR GRID CURRENT
.MODEL DX D(IS=1N RS=1 CJO=0 TT=1N)
.ENDS
 
Here's the B2Spice model.

Please check it. I haven't figured out how to add the grid current model.


* ecc99
* numbers by Alex Cavalli
* adaptation to B2Spice by stephenwmoore.com
*
.subckt ecc99 p g k
bp p k i=(2/362)*uramp(v(p,k)/500*log(1+exp(500*(1/22+v(g,k)/sqrt(300+v(p,k)*v(p,k))))))^1.3
cgk g k 5.8p
cgp g p 5.1p
cpk p k 0.91p
.ends ecc99
 
Updated. Still doesn't exactly match datasheet curves, but is close. Maybe the original model was developed from real samples instead of the datasheet?

* ecc99
* numbers by Alex Cavalli
* adaptation to B2Spice by stephenwmoore.com
*
.subckt ecc99 p g k
bp p k i=(2/362)*uramp(v(p,k)/500*ln(1+exp(500*(1/22+v(g,k)/sqrt(300+v(p,k)*v(p,k))))))^1.3
cgk g k 5.8p
cgp g p 5.1p
cpk p k 0.91p
.ends ecc99
 
Here's the performance for Vg = -2, -4, -6, -8.

The blue dots are points from the data sheet on JJ's web site.

It works very good!
 

Attachments

  • jj_ecc99.jpg
    jj_ecc99.jpg
    49.8 KB · Views: 938

PRR

Member
Joined 2003
Paid Member
> I haven't figured out how to add the grid current model.

If you can't figure the syntax for B2Spice, just add a silicon diode in series with 2K from Grid to Cathode on your schematic. That is the same as the Koren model, just external to the tube model.

Koren's approximation isn't exact (doesn't try to be). If you need the exact mA grid current at +13V on the grid, you need a much more complicated model.

But in most audio, the grid-cathode voltage is always negative so grid current is always zero. You sure can drive grids positive, but the grid impedance drops from "infinite" to around 1K or 2K. And that is usually more trouble than the added plate current is worth.

In the heat of simulation you sometimes crank-up till grid-cathode voltage is swinging positive. If your grid driver had infinite current and zero Zout, that would not matter. But in most cases the driver has high output impedance (compared to positive-grid resistance), so SPICE will show you impossible things if it does not know about positive grid current.

The diode and resistor won't give the "exact" answer, but it will usually flat-top the wave, alerting you to the fact that you are driving a grid positive and should turn-down the drive. (Or beef-up the driver, and be aware that this grid-model won't give exact answers when running grid current.)
 
Let's see if I got the lesson right:

The model simulates 2k grid impedance only if the grid is going positive.

If I'm assured the simulation never applies a positive on the grid, then I don't need the grid model.

That's easy enough! Thanks.

I'm worried about how I'm using these models recently. I'm tweaking an SRPP to minimize even-order harmonics, especially 5th-9th. Are the models accurate enough to determine this?

For example, I'd like to know if a JJ ECC99 is lower distortion than a 6H30pi (of course, depending on the setup and power supply of the circuit).

I'm trying to answer the question if I should wire a 12V heater for the ECC99/12BH7 family of pinouts or a 6.3V heater for the 6CG7/6FQ7/6H30pi family of pinouts. It's going on a PCB, so once the boards are made, I've locked myself into using a particular pinout family.

The SRPP is driving a 50k load with at least 1500pF capacitance - most likely a bit more. I want to minimize even-order harmonics, with special attention to 5th-9th. The power supply hasn't been built, so I can use almost any voltage, even a CCS.

Under these assuptions, which pinout family will offer me the best tube for my application?
 
Here is my B2Spice model. I love my B2Spice simulator, but it does have convergence problems and in order to get around those, I've had to adjust the model. Most of this has to do with exponents that get too large. The simulator should handle this, but it doesn't so you have to build these limits into the model.
Code:
*
* ECC99 Dual Triode
*
* Created:    2003
* Author        Alex Cavalli
*
* Based on triode model equations by Norman Koren
*
* Grid current is modeled with a diode and resistor
*
* 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.
*
.subckt ECC99 A G K
be0 3 0 v=500*(1/22+v(g,k)/sqrt(300+v(a,k)*v(a,k)))
be1 7 0 v=v(a,k)/500*ln(1+exp(-uramp(-v(3))+uramp(v(3))-uramp(v(3)-700)))
bg1 a k i=2*((uramp(v(7))-uramp(v(7)-700))^1.3)/362
rcp a k 1g  
c1 g k 5.8p
c2 g a 5.1p
c3 a k 0.91p
d3 5 k dx 
r1 g 5 2000
.model dx d(is=1n rs=1 cjo=0 tt=1n)
.ends
 
Kashmire said:
I'm worried about how I'm using these models recently. I'm tweaking an SRPP to minimize even-order harmonics, especially 5th-9th. Are the models accurate enough to determine this?

For example, I'd like to know if a JJ ECC99 is lower distortion than a 6H30pi (of course, depending on the setup and power supply of the circuit).

Hi,

Forget about that! The models are simply not accurate enough to be much useful in that area. You can try to optimise the curves for just that bias you are intending. But even then …. use them with great care.

Cheers ;)
 
Yes, I agree with Pjotr completely. Distortion figures from tube models must be use very carefully.

There are many instances where I think some good relative comparisons can be had. But, there is so much variability in the tubes themselves, that these are only "datasheet" comparisons.

The main value in distortion simulation is to find trends. That is, which designs are leading to lower distortion figures and in what way. I do believe that the simulations can give good results in this narrow domain. But, you always have to have one eye on what you know the real world is doing.

One caveat to this is that I think this works for the triode models (at least for mine) because these are fairly good in much of the operating region where we run the tubes in practice. But, I am very, very careful with any distortion analysis of pentodes because the model are just not that good.
 
Thanks, runeight.

Yes, I see now, this is not the way to evaluate tube A vs. tube B for odd-order distortion.

Thanks for the comments. I'll use the simulation to make first-order predictions of power supply voltages and bias currents.

That leaves the question:

Should I use the ECC99/12BH7 pinout family or the 6CG7/6FQ7/6H30pi family for lowest odd-order distortion in a SRPP configuration driving a capacitive load?
 

PRR

Member
Joined 2003
Paid Member
> harmonics, especially 5th-9th. Are the models accurate enough to determine this?

No.

A) The equations don't have enough terms to compute high-order effects.

B) The terms are derived from eyeballing published charts, which are often more art than exact.

C) High-order distortion, below clipping, is largely about imperfect tube elements, small burrs on grid wires putting kinks in the electric field, so no two tubes of the same type will have quite the same errors.


> if I should wire a 12V heater for the ECC99/12BH7 family of pinouts or a 6.3V heater for the 6CG7/6FQ7/6H30pi family of pinouts. It's going on a PCB, so once the boards are made, I've locked myself into using a particular pinout family.

Do both. If it was just 6V/12V, I'd say bring all the heater pins out and worry about voltage later. I hear you about the odd pinout on some tubes: if you really need to compare, put in two sockets or buld an adaptor.
 
I added the ECC99 model as in post #2

My problem:
When I run the ECC99 model, I get only like half the THD compared with 6SN7 and other tube models.
Can this model really be correct?
Is the ECC99 tube distortion really that low??
Yes, best to ignore in sumulations until one knows for sure that the model is correct.
Why not breadboard it and measure for real ?
 
Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.