# Triode common-cathode amplifier calculator

This tool demonstrates a step by step calculation of the amplification factor of the basic triode voltage amplifier and plots the amplitude and phase vs. frequency.
To calculate the amplification factor, standard values for the parameters "S", "mu" and "Ri" are often used. This is not entirely correct since these values depend on the DC bias. The calculation below shows how to properly determine these values and next, how to calculate the amplificiation as function of frequency.

## The circuit

The basic triode voltage amplifier, a 'common-cathode amplifier' is shown below: ## Calculator

### Step 1: Enter component values for the resistors and capacitors

 Vin DC value:  [V] Vsupply value:  [V] Rk value:  [Ω] Rload value:  [Ω] Rin value:  [Ω] Ra value:  [Ω] Ck value:  [F] Cout value:  [F]

### Step 2: Triode mathematical model

This calculator uses the triode equation of Norman Koren to calculate the anode current as function of grid-cathode voltage and anode-cathode voltage. Read more about this in the support info section about triode curves fitting and why the classic Child-Langmuir equation was not used here.
Note that the 'anode' is sometimes called the 'plate'; British vs. American english.

 KP value  [] mu value:  [] KVB value:  [V^2] X value:  [] KG1 value:  [V/A] Cga value  [F] Cgk value:  [F] Cak value:  [F]

 Norman Koren 12AT7 Pspice model (=ECC81) Norman Koren 12AU7 Pspice model (=ECC82) Norman Koren 12AX7 Pspice model (=ECC83) Electro Harmonix 12AX7 (=ECC83) fitted to datasheet JJ ECC83S fitted to datasheet

### Step 3: Calculate DC bias solution

For more information on how to calculate this refer to support info section.

 Anode current I bias:  [A] Anode voltage:  [V] Cathode voltage:  [V] Anode-Cathodevoltage Vak:  [V] Grid-Cathode voltage Vgk:  [V]

### Step 4: Calculation of the small signal parameters

For more information on how to calculate this refer to support info section.

 transconductanceS:  [A/V] Internal Resistance Ri:  [ohms] voltage amplification mu small signal:  []

### Step 5: Calculation of the frequency response

For more information on how to calculate this refer to support info section.
 Curve color: Red Green Blue Violet Black

# Supporting information for the triode calculator

This section provides background information on the calculations that are performed in the Triode calculator above
All calculations incl. a Newton Raphson approximation for the bias solution and matrix inversion of complex numbers to calculate the small signal ac transfer function are available as javascript. The graphs are drawn in the HTML5 canvas, the javascript function library is available as well.

### Step 1: Enter component values

This step should be straight forward. Allowed postfixes: a or A: atto, f or F: femto, p or P: pico, n or N: nano, u or U: micro, m: milli, k or K: kilo, M: mega, g or G: giga, t or T: tera.

### Step 2: Triode equations

To calculate the behaviour of the amplifier circuit, we should have a mathematical description for the triode.
In the past, several models have been proposed and used to calculate the anode current from the grid and anode voltage with respect to the cathode voltage. In this triode calculator, the triode formula of Norman Koren is used because it makes a better fit to real tube I/V curves than the classical Child-Langmuir equation and it's derivatives like the one proposed by Marshall Leach for use with (P)Spice. The plot below gives an impression of the fitting quality using the formulas of Koren and Leach.

There are of course several types of triodes and even within 1 type there is some variation. However, we can use one mathematical model in which we can tweak some parameters to fit the curves of any triode. These parameters are therefore the 'fingerprint' of a certain triode.

The triode equation of Norman Koren can be written as follows: In the equations above, the "limit to zero" algorithm for E1 is implemented slightly different than in the original (P)Spice code of Norman Koren. In this way we prevent "NaN" errors in javascripting for negative E1 values.
Furthermore, the 'ln' function is used here instead of the 'log' function; log can be confusing since in some programming languages / scripting interpreters the log function calculates the 10log of the input variable. Norman Koren wrote the equation for (P)Spice in which log(x) calculates ln(x).

#### Curve fitting

To find the right parameters Kp, mu, Kvb, X and Kg1 for a certain tube type, we can plot real tube data from datasheets against the calculated values from the triode model. A LabView program was written to extract triode VI curve data from pdf datasheets / images. This was performed for 2 different versions of the ECC83 (=12AX7); the JJ ECC83S and the Electro Harmonix 12AX7.

The figure below shows the result of a best fit to the triode curves of a JJ ECC83S (taken from original pdf JJ) using the equations from Norman Koren and Marshall Leach: back to the calculator

### Step 3: Calculation of the DC bias solution

Now that all the circuit components are defined, we can calculate the amount of anode current at rest, the 'DC bias'. This can not be calculated straight forward from the triode formula as the anode and cathode voltages depend on the anode current and vice versa. Therefore an iterative method is used that resembles the Newton-Raphson method. Once the anode current is determined, the voltage drops across Ra and Rk are also known and so are the anode and cathode voltage.
Note that the grid current is not taken into account. In most situations, Vin at rest (bias solution) equals 0V or lower and Rg has a value of 1Mohm or lower. In those cases the grid current is negligible: If Vin is 0V or lower, the grid current is very low and will not influence the grid voltage. In some power amp designs, grid current can be drawn during part of the ac cycle. As long as this is not the case at rest (dc bias), it does not matter in this calculation; not for the dc bias calculation and not for the small signal solution (see below).
back to the calculator

### STEP 4: Calculation of the small signal parameters

To calculate the amplification factor of the circuit, we have to know the so called small signal parameters.
In general, this means that the ac circuit behaviour is determined in the calculated DC bias point assuming that we use only very small ac signals. In that case, the circuit behaviour can be approximated by a linear response. This is also valid for electron tubes although they are of course famous for their non-linear behaviour. Note that it does not make sense to talk about "the" amplification factor for bigger ac signals: for small signals the amplification factor only depends on the frequency of interest, at higher signal amplitudes it is also a function of the actual signal amplitude, the presence of other signals (at other frequencies). Furthermore, you will get higher harmonics, intermodulation distortion etc.; Things quickly become very complex for bigger signal amplitudes.

The small signal parameters we have to calculate are:
 S [mA/V] : dIa/dVgk the change in anode current as a result of a small change of the grid-cathode voltage Vgk, keeping the anode-cathode voltage Vak constant Ri [Ohms] : dVak/dIa internal resistance of the current source between anode and cathode. It equals 1/Da where Da is the change in anode current as a result of a small change of Vak, keeping Vgk constant mu (small signal solution) the voltage amplification factor. It equals S * Ri.

In the Child-Langmuir approach, the mu parameter of the small signal solution is equal to the mu parameter of the tube model i.e. it does not depend on the DC bias. In the more complex equation of Norman Koren, this is not the case anymore. In all models, the values of S and Ri depend on the DC bias.

#### Small signal amplification factor and output impedance

To calculate these, we can use some formulas that are derived below. Note that these formulas assume that (parasitic) capacitances either have infinite impedance i.e. they are ignored or they have zero impedance: the cathode resistor is bypassed with a infinitely big capacitor.
In step 5 we calculate the exact amplification factor for every frequency and take the value of all the (parasitic) capacitances into account. Deriving formulas for these calculations becomes tricky as explained below so we do not use the formulas that are derived here but we will use a different method: matrix inversion. Just skip this part and jump to the step5 support section on matrix inversion for more info on that.

#### Small signal amplification factor and output impedance, bypassed cathode

The ac signal scheme of a the amplifier with bypassed cathode resistor (Rk // Ck) can be presented in these 2 forms: the current source model (Norton) and voltage source model (Thevenin ). The parasitic capacitances Cgk and Cak and the output load are ignored at first: Amplification factor from input Vg to Vout : The output impedance equals: Ra // Ri (Ra parallel to Ri)

#### Small signal amplification factor and output impedance, unbypassed cathode

Below are the circuit and ac small signal model in the unbypassed case. Cgk, Cak and output load are ignored again. To calculate the amplification factor, we first calculate Vi. Next, Ia and finally the amplification factor Vout/Vg. Output impedance: to calculate the output impedance, imagine that we apply a load "Rload" from output to ground that has a value that equals the output impedance of the circuit above. In that case, the output signal is exactly half of the unloaded output signal. If we can calculate what value this Rload has, we know the output impedance.

For ac signals, Rload is parallel to Ra so the combined impedance equals: the amplification factor with Rload applied: Resuming:
In the bypassed model, the output impedance equals Ra parallel to Ri.
In the unbypassed model the output impedance equals Ra parallel to Ri+(1+mu)Rk.

back to the calculator

### STEP 5: Calculation of the frequency response

From S, Ri and mu we calculated the bypassed and unbypassed gain of the unloaded amplifier.
To calculate the frequency response of the complete circuit including the load, a few more factors are relevant:
• low cut due to Ck//Rk
• low cut due to Cout in series with Rload
• high cut due to the parasitic capacitances
• #### Low cut due to Ck//Rk

The amplification factor from grid to anode (Aga) of the common cathode amplifier in the bypassed cathode case is bigger compared to Aga in the unbypassed cathode case.
This is only true for frequencies where the impedance of the cathode capacitor Zck=1/(2*pi*frequency*Ck) is so low that it can be ignored. For very low frequencies, Rk dominates Zck and the amplification factor equals the unbypassed Aga. As the frequency increases, Zck will decrease. At some point, the magnitude of Zck will equal Rk. This is where the amplification factor will start to increase. This will continu with increasing frequency until the amplification factor reaches the Aga value as calculated for the bypassed cathode case: This is the simple picture: To be fully correct, this frequency dependence can not be calculated that easily. To calculate it, you should assume that the anode voltage is either unloaded or loaded through Cout and Rload. However, this also depends on frequency - see below.

#### Low cut due to Cout in series with Rload

In most situations, the output of the amplifier will be ac coupled: from the anode, there is a capacitor Cout in series with the load Rload. This will create a low cut filter effect (high pass filter).  In this case, the value of Vsource equals either the unloaded or the loaded amplification factor of the amplifier * Vg.
Note that to be fully correct, it is not that easy to calculate this frequency dependence; You should assume that Rk is either bypassed with Ck or not - see above. These 2 effects are 'entangled', they cannot be calculated separately unless Rload is very high compared to the output impedance of the amplifier. In practice, this problem is often simply ignored. A more complex but also more correct method would be as follows:
First, we calculate the amplification from Vg to Va starting from the formula that was derived above: But we replace Ra with Ra//(ZCout+Rload) or in other words: Ra parallel to the series impedance of Cout and Rload. Furthermore, we replace Rk with Rk//ZCk which is the parallel impedance of Rk and Ck. This yields the amplification vs frequency from Vg to Va: where and This extended formula gives us the amplification from Vg to Va as function of frequency. Next we calculate Vout from Va where we assume Va is a voltage source with 0 ohms impedance: This is already a much better approach to the calculation of the amplification factor vs frequency but we are not there yet:

#### parasitic capacitances

The physical construction of the conductive parts inside the triode lead to some parasitic capacitances:

Cga: the capacitance between the grid and the anode. Although this capacitance is typically about 1 picofarad, the effective capacitance is much bigger: one side of the capacitor is at the Vg potential, the other is at the anode which is Vg*Aga where Aga is the amplification factor from grid to anode. The total potential across the capacitor is therefore Vg(1-Aga) and therefore it 'acts' as a capacitor that is (1-Aga)*Cak. This is called the Miller effect. Note that the amplification factor Aga is negative.
example: Cak = 1.6pF, Aga = -60*
Effective Miller capacitance = (1--60)*1.6pF = 61*1.6pF.

Cgk: the capacitance between the grid and the cathode.
In the bypassed case, the ac potential between the capacitor plates is Vg as the cathode is at ground potential. Therefore, there is no Miller effect here, the effective capacitance equals Cgk
In the unbypassed case, the effect of Cgk decreases because Vk follows Vg more or less so there is less potential across Cgk compared to the situation with a bypassed cathode. If Agk = the amplification factor from grid to cathode, the effective capacitance is: Cgk*(1-Agk).

Cag: capacitance between anode and cathode. This capacitance is usually not too relevant since 1) it is very small, the grid is shielding the anode from the cathode and 2) it is parallel to Ri which is in the order of tens of kohms. Typically, this Ri is dominant over the Cak impedance for the frequencies of interest.

The parasitic capacitances Cgk and Cgk act as a high cut (lowpass) filter together with the grid resistor Rg.
The -3dB frequency equals : Note that we have to use the loaded Aga, the amplification factor incl. Rload.
Example: Cak = 1.6 pF, Cgk = 2.4 pF, Aga=-60*, Agk=0.38* Rg=68kohms.
-3dB frequency high cut filter: 1/(2*pi*(1.5pF+97.6pF)*68kohm) = 23.6 kHz.
Note that this calculation is only accurate if the low cut due to Cout and Rload and the transistion from unbypassed to bypassed Rk is happening at much lower frequencies than where the high cut due to to Cga and Cgk is relevant.
Otherwise you cannot use a fixed value for Agk and Aga in the formula above.
This triode calculator therefore uses a rigorously different method to calculate the frequency response: It's based on matrix solving using complex numbers.

#### AC analysis: Matrix solving with complex numbers

This is how it's done:
1) draw the small signal representation of the complete circuit:  2) from the model above we can write the current equations at every node: the sum of all currents of the branches connected to one node should be zero. In this case we start with 3 nodes: Vg Va and Vk. At first we don't take Vout into account, the summed impedance of Rload and Cout is used: Zl. Furthermore, Zk, the parallel impedance of Rk and Ck, is calculated and Zi, the parallel impedance of Ri and Cak is calculated. 3) All currents that contain Vin are put to one side of the equation, other currents to the other side, sorted by voltage Vg, Va and Vk: 4) The terms with Vin are entered in a 3x1 matrix, the other terms in a 3x3 matrix: 5) For the frequency of interest, we calculate the real and imaginary value of every term in the 3x3 matrix.
6) the 3x3 matrix is inverted. This is not a simple inversion of all the numbers in the matrix, see for instance this youtube example how to invert a 3x3 matrix with real numbers. In our case we have complex numbers which means more work. It would be really hard to do this manually and it is very likely that one would make mistakes but the javascript of this calculator can perform it flawlessly and fast, even on a simple smartphone.
7) the inverse 3x3 matrix is multiplied with the 3x1 matrix. This results in a 3x1 matrix, the 3 complex voltage values for the nodes g, a and k.
8) Now that we know the Re and Im value of Va, we can calculate Vout by multiplying Va with the transfer of Rload/(ZCout+Rload). This is a complex value that we represent as an amplitude and a phase for the frequency of interest.
To get an amplitude and phase graph, we have to repeat step 5 to 8 for every frequency.
back to the calculator