Inductance Calculation

Until now, we have dealt with single layer solenoid coils. However,
Maxwell's elliptic integral formula [11a]
for circular loops can be applied just as easily to coils consisting
of multiple layers of windings. It's just a matter of calculating the
mutual inductance between every pair of turns and taking the sum.
However, while this may be easy to code it can result in a program
which takes a very long time to run. For a coil with * N*
turns, there are

The naïve approach to code a program to calculate the mutual inductance between all pairs of turns in a coil is to use two nested loops as in the following pseudo-program:

```
' Calculate mutual inductance between
' every pair of turns in the coil
' turns are designated 'i' and 'j' respectively
M=0
for i=1 to N
for j=1 to N
<<Code to calculate mutual inductance between turns i and j >>
M=M+MutualInductance(i,j)
next
next
```

Now, since the mutual inductance between turn * i* and turn

```
' Calculate mutual inductance between
' every pair of turns in the coil
' turns are designated 'i' and 'j' respectively
M=0
for i=1 to N-1
for j=i+1 to N
<<Code to calculate mutual inductance between turns i and j >>
M=M+MutualInductance(i,j)
next
next
M=M*2
```

This reduces the number of iterations to slightly less than half the
number of iterations from the previous example. The exact number of
iterations in the second example is equal to (**N**^{2}−* N*)/2.
In the last program line, the value of the sum of mutual inductances

```
' Calculate mutual inductance between
' every pair of turns in the coil
' turns are designated 'i' and 'j' respectively
M=0
for i=1 to N-1
for j=i+1 to N
<< Code to calculate mutual inductance between turns i and j >>
M=M+MutualInductance(i,j)
next
next
M=M*2
for i=1 to N
<< Code to calculate self inductance of each turn >>
M=M+SelfInductance(i)
next
```

The total number of iterations is now (**N**^{2}+* N*)/2,
which is still significantly smaller than in the first example. By
comparison, for the single layer solenoid which was treated in the
previous section, we were able to reduce the number of iterations to
just

The general case is for a multi-layer coil with an arbitrary number
of turns on each layer; i.e., each layer may have a different number
of turns. This diagram shows an example cross section of a seven
layer winding where the innermost layer has four turns, with each
successive layer increasing by one turn up until layer 4, and then
decreasing by one turn thereafter, giving a hexagonal cross section.
Wire diameter is * d*. The radius of the innermost layer
is

The Open Office BASIC code is as follows:

```
Function LayeredCoil (d,r0,kx,ky,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10) as double
' Calculate inductance of multi-layer coil
' with arbitrary number of turns on each layer.
' d= wire diameter, r0=radius of inner winding, kx=axial pitch
' ky=radial pitch, n1..n10=number of turns on each respective layer
' dimensions in cm, inductance in microHenries
Dim xoffset(10),yoffset(10),Nturns(10)
Nturns(1)=n1
Nturns(2)=n2
Nturns(3)=n3
Nturns(4)=n4
Nturns(5)=n5
Nturns(6)=n6
Nturns(7)=n7
Nturns(8)=n8
Nturns(9)=n9
Nturns(10)=n10
MaxN=Nturns(1)
'find the layer with the maximum number of turns and set MaxN to that number
for i=2 to 10
if MaxN<Nturns(i) then MaxN=Nturns(i)
next
N=0 'total number of turns
g=exp(-0.25)*d/2
L=0
'calculate the x and y offsets for each layer, total turns, and self-L
for i=1 to 10
N=N+Nturns(i)
xoffset(i)=(MaxN-Nturns(i))/2*kx
yoffset(i)=r0+ky*(i-1)
'self inductance of each turn in current layer
L=L+Nturns(i)*Mut(yoffset(i),yoffset(i),g)
next
'Change Nturns array to running total of turns
for i=2 to 10
Nturns(i)=Nturns(i)+Nturns(i-1)
next
'Calc mutual inductance for every pair of turns i and j
M=0 'Initialize sum to zero
iLayer=1
ix=xoffset(iLayer)
iy=yoffset(iLayer)
for i=1 to N-1
'check and update the layer for turn i
if Nturns(iLayer)<i then
iLayer=iLayer+1
ix=xoffset(iLayer)
iy=yoffset(iLayer)
end if
jLayer=iLayer
jx=ix+kx
jy=yoffset(jLayer)
for j=i+1 to N
'check and update the layer for turn j
if Nturns(jLayer)<j then
jLayer=jLayer+1
jx=xoffset(jLayer)
jy=yoffset(jLayer)
end if
M=M+Mut(iy,jy,ix-jx)
jx=jx+kx 'step conductor j for next iteration
next
ix=ix+kx 'step conductor i for next iteration
next
LayeredCoil=L+M+M
end Function
```

The program allows for up to ten layers of windings. It can be easily
modified to accommodate more layers. Each layer may have a different
number of turns. It is assumed that each layer is centred over the
previous layer, and the turns on every layer will have the same pitch
* kx*. The centre to centre spacing between layers is

The shortcomings of Open Office
BASIC make for somewhat clunky programming. Several lines are devoted
to loading an array with the * n1*..

The method of keeping track of
layers could be approached a number of ways. A * for..next*
loop to count layers could be used. However, it was decided that it
would be simpler overall just to count turns and then determine the
applicable layer from the absolute turn number. To make this simpler,
the array

Variables * ix*,

The mutual inductance between
turns is calculated using function * Mut()* which was
described in Part
1B.

This program could be made even more general by adding more arguments to allow the user to specify a different axial offset, radial offset and pitch for each layer individually. However, the program as it is, should be general enough for most situations.

Execution speed, while not
spectacular, is not too bad as long as the total number of turns is
not too great (i.e., 100 or fewer). This is the cost of trying to
keep things general. Performance can be improved considerably for
certain special cases. For example, as discussed in Part
1B, the **N**^{2} iterations was reduced to * N*
iterations in the special case of the single layer solenoid.

For the next case we will consider a multi-layer coil where each
layer has the same number of turns. Hence, the cross section of the
winding is rectangular as shown in this next diagram.
In this case, the variables * d*,

Now, let's consider the pair of turns **A0-B2**
shown in red, and also the pair **D0-E2**
also shown in red. It is readily apparent that the mutual inductance
for pair **A0-B2** will be
the same as the mutual inductance for pair **D0-E2**,
because their respective radii are identical and their respective
axial spacings are also identical.

Before we
go any further, let's define a convention for specifying pair
configurations that are equivalent for calculating mutual inductance.
Since horizontal (axial) spacing will always be multiples of * kx*,
let us define the first parameter

We soon run into a problem
though. According to this definition, pair **A1-B3** would also
have a configuration {1,2}, but since the radii of **A1-B3** are
different than those of **A0-B2** it won't have the same mutual
inductance. We need to add an additional parameter. We will define
parameter * y* as the row number on which the innermost
turn of pair is situated. The new format will be {

We can see that there are eight
pairs which have configuration {1,2,0}, eight pairs which have
configuration {1,2,1}, and we can continue onwards and upwards to
count all of the pairs for every possible configuration. Having done
this, we only need to calculate the inductance value once for each
configuration, and then multiply it by the number of times the
configuration occurs. One would hope that there is a systematic way
of specifying all of the configuration patterns and of figuring out
how many there are of each. With a little perseverance and much
coffee consumption, a pattern does emerge. For a coil of * u*
turns per layer and

Now that we know how to loop
through each possible configuration, we also need to know how many
times each configuration actually occurs in the coil. Again a bit of
manual simulation and analysis reveals a pattern. In general,
configuration {* nx*,

```
Function RectangleCoil (d,v,u,r0,kx,ky) as double
'Calculate inductance of multi-layer coil
'd=wire diameter, u=turns/layer, v=number of layers
'r0=radius of innermost layer
'kx=axial pitch, ky=radial pitch
'All dimensions are in cm, inductance result is in microHenries
g=exp(-0.25)*d/2
M=0
nxMin=1
for ny=0 to v-1 'Calculate all mutual inductances
for nx=nxMin to u-1
MF=4 'multiplication factor
if ny=0 or nx=0 then
MF=2
end if
x=nx*kx
Mult=MF*(u-nx)
for y=0 to v-ny-1
r1=r0+(y)*ky
r2=r0+(y+ny)*ky
M=M+Mult*Mut(r1,r2,x)
next
next
nxMin=0
next
for y=0 to v-1 'Calculate all self inductances
r1=r0+y*ky
M=M+u*Mut(r1,r1,g)
next
RectangleCoil=M
end Function
```

The Javascript version is as follows:

```
function rectangleCoil(d,v,u,r0,kx,ky) {
//Calculate inductance of multi-layer coil
//d=wire diameter, u=turns/layer, v=number of layers
//r0=radius of innermost layer
//kx=axial pitch, ky=radial pitch
//All dimensions are in cm, inductance result is in microHenries
g=Math.exp(-0.25)*d/2;
m=0;
nxMin=1;
//Calculate all mutual inductances
for (ny=0; ny<=v-1; ny++){
for (nx=nxMin; nx<=u-1; nx++){
mf=(ny==0 || nx==0) ? 2: 4; //multiplication factor
x=nx*kx;
mult=mf*(nt-nx);
for (y=0; y<=nl-ny-1; y++){
r1=r0+(y)*ky;
r2=r0+(y+ny)*ky;
m=m+mult*mut(r1,r2,x);
}
}
nxMin=0;
}
//Calculate all self inductances
for (y=0; y<=v-1; y++){
r1=r0+y*ky;
m=m+u*mut(r1,r1,g);
}
return(m);
}
```

The number of iterations required to calculate the **self**
inductances is always equal to * v*,
regardless of the number of turns per layer. The number of iterations
required to calculate the pair

(* uv*+

Hence,
the **total**
number of iterations is:

(* uv*+

When
* v*=1,
then the coil is a single layer solenoid, and the number of
iterations works out to be simply

(**N**^{2}+* N*)/2

which
is the same as for the previous function * LayeredCoil()*.
This is the worst case because every turn has a different radius and
therefore every pair of turns is a unique configuration. For the
remaining cases where

* N*(1+√

So,
for multi-layer coils with an approximately square cross section,
function * RectangleCoil()*
offers a significant speed advantage over function

Thus, the main virtue of this program, is that it always performs the minimum required number of iterations, regardless of number of layers and turns per layer, thus making it unnecessary to substitute more efficient programs for special cases.

An Online Calculator for Multi-Layer Coils is now available.

Closewound multi-layer coils can easily be wound on circular forms, each layer sitting directly on top of the previous layer. However, in cases where it is desired to have space between the layers, some means must be provided to separate them. One option is to place a thick sheet of insulating material between each layer. However, this has at least a couple of disadvantages. This material will reduce the Q-factor of the coil, and will increase the self-capacitance of the coil. Also, for coils in power circuits, spacing may be necessary to allow coolant (air or some liquid) to circulate between the windings, and a thick sheet of insulating material will interfere with this. A common alternative approach is to use a polygonal coil form where the wire is wound on insulating pegs or other guides located at the vertices of the polygon. While this may make winding the coil easier, it introduces additional complications.

One thing which may not be immediately obvious is that the spacing of the winding guides will not be the same as the radial pitch. This is illustrated in the following diagram.

Here, the coil form is a 7-sided polygon and has two layers of windings. We
are looking at it in the direction of the axis. Radial spacing guides
are separated by a distance of 0.500 (arbitrary units). However,
notice that the spacing between conductor 1 and conductor 2 is only
0.450. The reduction factor is equal to the cosine of half of the
angle between the spokes of the coil form. Or, more simply, for a
polygonal form with the number of sides equal to **N**_{S},
the spacing reduction factor is equal to **cos**(180/**N**_{S}),
when working in degrees, or **cos**(π/**N**_{S})
when working in radians.

Now, looking at the actual inductance calculation, we refer back to the treatment given at the end of Part 1b regarding polygonal single layer coils. The method given is that of Grover [2], and unfortunately, he doesn't say this method is valid for multi-layer coils. So, our only justification for using this method is that there doesn't appear to be any other method available. At the same time, it's reasonable to expect that it should give better correction than no correction at all.

The
numbers of the last section won't be repeated here. Suffice to say,
the inner and outer radii of the polygonal form are converted to
equivalent radii using the weighted formula of Part
1b, and then the radii of any intermediate layers are
interpolated from those values. An equivalent * ky*
value can then be calculated, and then these equivalent values are
used in the above

There are two degenerate cases of a multi-layer polygonal coil which can be checked. The first is the case of a single layer coil treated in Part 1b using the weighted formula, which already have been verified to an accuracy of within 1% for most coils. The second degenerate case is that of a coil with only one turn per layer, i.e., a spiral coil. Fortunately, there are formulae available [2] (page 176) for flat spirals with polygonal turns. So, these cases can be checked. From comparing numbers with various examples of flat polygonal coils, it appears that the true value of inductance lies between the value calculated using the weighted formula in Part 1b, and the value calculated assuming a round coil enclosing the same area. Therefore, it is suggested that both methods be used to get the maximum and minimum values. A simple average of the two values is likely to be close enough for all practical purposes.

Continue to:

Numerical Methods 1d Back to:

Numerical Methods 1b

Numerical Methods Introduction

Radio Theory

Home

This page last updated: November 29, 2022

Copyright 2010, 2022 Robert Weaver