Inductance Calculation

Two of the most fundamental inductance formulae are those of Lorenz and Maxwell. Both of these formulae are expressed in terms of elliptic integrals, and both can and have been used as the basis for other inductance formulae. We will start with Lorenz.

In many cases when trying to analyze a real physical system, it's often found to be far too complex to yield a simple mathematical model. We then attempt to change the model into something that will behave similarly but will be much easier to model. In the case of a single layer solenoid coil, we find that if we replace the actual winding with an infinitesimally thin conducting tape with negligible gap between turns, similar to the illustration, then the magnetic field that is produced is virtually the same as that due to the actual winding. Lorenz [22][1] studied an even more simplified model (just a thin walled conducting tube) where the current flowed circularly around the solenoid, but did not have any axial current component. He gave an exact formula for calculating the inductance of this solenoidal current sheet. His formula is exact in this case, and is a very good approximation for coils wound with round wire, as long as they have many turns and the windings are closely spaced.

Lorenz's formula is:

(1) |

where * K*(

And where: * r* is the radius,

This formula is typical of those from the late 19th century. The
inductance unit—the * henry*—was not yet in common
use. In order to use the formula with modern SI units, the term
outside of the square brackets should include the factor

(1a) |

which now works in units of * meters* and

**µ**_{0} = 4* π* × 10

While we are defining the modulus * k*, we will also
define the complementary modulus

(The notation used here treats the elliptic integrals as standard
functions, in that the argument is shown in parentheses immediately
following the function name. It's very common, especially in older
texts, simply to write * K*
and

The formula as written does not look overly complicated, except
that we haven't discussed the calculation of the elliptic integrals
yet, and this is where things can get a bit messy. In the past, this
formula has been considered impractical to calculate due to * K*
and

In 1909, Nagaoka [3] rearranged Lorenz's formula like so:

(2) |

Note that in some of the early literature, uppercase * N* is
total turns while lowercase

Formula (2) can be written as:

(3) |

where **k**_{L} is now known as Nagaoka's
coefficient, and as is evident from above, is given by the last half
of formula (2):

If we put the above formula in terms of the ratio of diameter to length,
2* r*/

(4) |

the modulus * k* and complementary modulus

The result of all this is that **k**_{L}
can now be calculated once and for all in terms of the coil shape
factor * u*. Nagaoka [3]
did this and tabulated the results. Thus, when calculating the
inductance of a coil, a person only needed to calculate the diameter
to length ratio

My first attempt at coding a BASIC program to calculate elliptic integrals began by referring to Dwight [4](Art. 773.1-774.2) who gives several series formulae for elliptic integrals. Using some care, and proper optimization, these can provide accurate and fast results. I've described this in some detail in [5] and won't repeat it here, as I have since found a better method which will be described below. Incidentally, Dwight's book is typical of mathematical references written before the days of computers. It provides formulae in closed analytical form or as series expansions, but not in an algorithmic form which may sometimes be more useful for computer application. Judging from many of the technical papers on inductance calculations written since computers have become ubiquitous, one can see that many have fallen into the trap of assuming there is no better method of calculation. However, in 1921, Louis V. King [6] proposed a very efficient technique using the arithmetic-geometric mean method. Grover applied his method in a 1928 paper [7]. Since then, the method appears to have been overlooked by many, but has resurfaced a few times, most recently in papers by Miller, 1987 [8] and de Queiroz, 2003 [9]. It was in the latter paper where I first encountered the method. However, neither Miller nor de Queiroz appear to have been aware of King's work. This is hardly surprising considering how long ago it was published. However there are useful details in King's paper which make for very efficient computer implementation.

To describe the arithmetic-geometric mean method, first we need to explain what an arithmetic-geometric mean is. Everyone knows that the arithmetic mean of two numbers—the average—is simply the numbers added together and then divided by two. The geometric mean is found by multiplying the two numbers together and then taking the square root.

If we start with two numbers **a**_{0} and **b**_{0},
then we can calculate the arithmetic-geometric mean by repetitively
calculating both the arithmetic mean **a**_{1},
and the geometric mean **b**_{1}, and
repeating this operation until the resulting numbers converge to the
same value. In mathematical terms:

**a**_{n} = (**a**_{n}_{−1}
+ **b**_{n}_{−1})/2

**b**_{n} = √(**a**_{n}_{−1}
× **b**_{n}_{−1})

Hence, **a**_{n} is the arithmetic
mean of previous values **a**_{n}_{−}_{1}
and **b**_{n}_{−1}, while
**b**_{n} is the geometric mean of
previous values **a**_{n}_{−1}
and **b**_{n}_{−1}. After
very few iterations, **a**_{n} and **b**_{n}
will converge to the same value, which is defined as the
arithmetic-geometric mean (AGM). We will define the limiting values
of **a**_{n} and **b**_{n}
simply as * a* and

If we start with:

**a**_{0} = 1

and

**b**_{0} = * kʹ* (the
complementary modulus)

then the resulting AGM value * a* is related to the
elliptic integral

(5) |

The elliptic integral * E*(

**c**_{0} = * k* (the
modulus)

**c**_{n} = (**a**_{n}_{−1}
− **b**_{n}_{−1})/2

Then take the sum

(6) |

Then from King [6]:

Therefore

(7) |

and also

(8) |

Formula (8) may seem trivial since we already have * K* and

Following is the source code for a Javascript function to calculate Nagaoka's coefficient using formula (4) and the elliptic integral formulae (5), (7) and (8):

```
function Nagaoka(u) {
// returns Nagaoka's coefficient,
// aka: field non-uniformity coefficient
// where u=diameter/length
if (u == 0) return (1);
else if (u > 100000) return (2/(Math.PI*u)*(Math.log(8/Math.PI+4*u)-0.5));
else {
uu = u * u;
m = uu / (1 + uu);
m2 = 4 * Math.sqrt(1 + uu);
a = 1;
b = Math.sqrt(1 - m);
c = a - b;
ci = 1;
cs = c * c / 2 + m;
do {
ao = (a + b) / 2;
b = Math.sqrt(a * b);
a = ao;
co = c;
c = (a - b);
cs += ci * c * c;
ci *= 2;
} while (c < co);
cs /= 2;
K = Math.PI / (a + a);
KmE = K * cs;
E = K * (1 - cs);
return (1 / (3 * Math.PI) * (m2 / uu * (KmE) + m2 * E - 4 * u));
}
}
```

The same function coded in Open Office BASIC follows:

```
Function Nagaoka(ByVal u as Double) As Double
' returns Nagaoka's coefficient,
' aka: field non-uniformity coefficient
' where u=diameter/length
if u=0 then
Nagaoka=1
elseif u>100000 then
Nagaoka=2/(pi()*u)*(Log(8/pi()+4*u)-0.5)
else
uu=u*u
m=uu/(1+uu)
m2=4*sqr(1+uu)
a=1
b=sqr(1-m)
c=a-b
ci=1
cs=c*c/2+m
do
ao=(a+b)/2
b=sqr(a*b)
a=ao
co=c
c=a-b
cs=cs+ci*c*c
ci=2*ci
loop while c<co
cs=(cs)/2
K=pi()/(a+a)
KmE=K*cs
E=K*(1-cs)
Nagaoka=1/(3*pi())*(m2/uu*KmE+m2*E-4*u)
end if
end Function
```

The BASIC version can be pasted into Open Office's macro editor, and can then be used just like any other spreadsheet function. The only thing to be aware of is that when Open Office encounters a name in a formula, it first checks built-in functions, then named cells, and finally macros. So, if you have a cell containing the same text as the name of the macro, it will be fail to find the macro.

In these routines, the ratio of diameter to length is represented by the
variable * u*. The square of the modulus is

The loop convergence test deserves some comment. If we were
evaluating a typical infinite series where each term gets
progressively smaller at a rate which accelerates with each
iteration, we could set the convergence test almost arbitrarily, to
see when the term is smaller than some insignificant value such as
10^{−50}. However, in the case of the AGM, we don't have
this situation. The two values * a* and

For
very long coils, the value of **u*** *is small, the
modulus **k*** *is small, and both * K* and

For extremely short coils, the value of * u* is very
large, and this can also create problems due to the subtraction of
two nearly equal values when calculating the complementary modulus

**k**_{L} = 2/(* πu*)×(Ln(8/

This formula is asymptotically correct for increasing values of * u*.
The point where the round-off error of the exact formula exceeds the
approximation error of the approximate expression is in the vicinity
of

Both the BASIC and Javascript versions of the function were tested and
compared with Nagaoka's six decimal place table. The results agree
within ±1 in the last decimal place (ie., 1 part per million) for
* u *< 10. For

Now that we have coded a function for Nagaoka's coefficient, we have an accurate and convenient formula for inductance:

(9) |

Where,

**µ**_{0}
= 4* π* × 10

Radius and length

This page first went online in 2010. It included no discussion of the accuracy of the computer routines.
In 2012, to remedy this, I appended a rather longwinded and rambling accuracy discussion to the end of the page.
In the process of revamping the complete website in 2022, this page has been re-edited, and the
discussion of accuracy has been merged in with the main body of the text.

In 2019, the base units used in the SI system were redefined. Planck’s
constant, and the elementary charge were set as exact defined
quantities. As a result, **µ**_{0} (which was
previously defined as exactly 4**π**×10^{-7} H/m) is now
an experimentally determined constant with the value
1.25663706212×10^{−6} H/m which varies from the previous value
by one in the 10th significant digit. Hence, we can no longer say
that **µ**_{0} is exactly 4**π**×10^{-7}
H/m. However, for the degree of accuracy that is needed for normal
engineering calculations, 4**π**×10^{-7} is accurate
enough and easier to remember than 1.25663706212×10^{−6} H/m.

Back to:

Numerical Methods Introduction

Radio Theory

Home

This page last updated: November 28, 2022

Copyright 2010, 2022 Robert Weaver

Numerical Methods Introduction

Radio Theory

Home

This page last updated: November 28, 2022

Copyright 2010, 2022 Robert Weaver