Coax Traps are LC traps using the inherent capacitive properties of coaxial cable, wrapped around a form to create an inductive coil. The resonant frequency of an LC trap is defined by the following formula:

    \[ \nu = \frac{1}{2\pi\sqrt{LC}} \]

where \nu is the frequency in Hertz, L is the inductance in Henries and C is the capacitance in Farads. We like to work in \text{MHz}, \mu\text{H} and p\text{F}, so lets take care of that right now.

    \[ \nu = \frac{10^{3}}{2\pi\sqrt{LC}} \]

Inductance L is given by the following:

    \[ L=\frac{N^2 D^2}{18D + 40l}  \]

Where N is the number of turns, D is the diameter of the coil in inches, and l is the length of the coil in inches.

Capacitance, C, can be found by using the following:

    \[ C=C_l \cdot l_{\text{coax}} \]

Where C_l is the capacitance of the coax per unit of length and l_{\text{coax}} is the length of the coax. The unit type of C is based upon it’s input. For example, if C_l is in pF/\text{inch}, l_{\text{coax}} should also be in \text{inches} and C will be returned in pF.

Ok… That’s nice. So what do we do with that information? Well, let’s start with what we know and what we want to find out. Our inputs should be the frequency of the trap \nu, the diameter of the form we’re wrapping around D_{\text{form}}, the diameter of the coax we’ve chosen D_{\text{coax}} and the capacitance of the coax C_{\text{coax}}. The rest must be found. Unfortunately, none of our formulae are directly solvable with just these pieces of data, so we’re going to need to do some manipulation. Let’s start with the simple ones.

    \[ D=D_{\text{form}} + \frac{1}{2}D_{\text{coax}} + \frac{1}{2}D_{\text{coax}} \]

simplified as

    \[ D=D_{\text{form}} + D_{\text{coax}} \]

In other words, the diameter of the coil is equal to the diameter of the form plus the diameter of the coax. We measure our diameter from the center of the coax on one side of the form to the center of the coax on the other side. On to the length of the coil.

    \[ l=N \cdot D_{\text{coax}} \]

The length of the coil is equal to the number of revolutions time the diameter of the coax, since each revolution of the coil is one coax next to another.

    \[ l_{\text{coax}}=N \cdot \pi D \]

The length of the coax is equal to \pi D (formula for the circumference of a circle) times the number of revolutions in the coil. Although, in practice, the coax length winds up being about an inch longer because of the two tails protruding through the form. So…

    \[ l_{\text{coax}}=N \cdot \pi D + 1 \]

Now lets clear the unknown variables from the formula for Inductance:

    \[ L=\frac{N^2 D^2}{18D + 40l}  \]

    \[ l=N \cdot D_{\text{coax}} \]

    \[ L=\frac{N^2 D^2}{18D + 40N \cdot D_{\text{coax}}}  \]

and Capacitance

    \[ C=C_l \cdot l_{\text{coax}} \]

    \[ l_{\text{coax}}=N \cdot \pi D + 1 \]

    \[ C=C_l \cdot (\pi D N + 1) \]

Things are starting to shape up here. What we really need to know now is the number of turns in our coil. I’m not going to lie… this part sucks. We might need to use all of our cunning. Our objective is to generate a formula that expresses N in terms of \nu, D, D_{\text{coax}} and C_l. It would also be nice if we could do this using an algorithm that could be programmed into a calculator.

Let’s go!

Substitute L and C in our resonance equation.

    \[ \nu = \frac{10^3}{2\pi\sqrt{LC}} \]

    \[ \nu = \frac{10^3}{2\pi\sqrt{\frac{N^2 D^2}{18D + 40N \cdot D_{\text{coax}}} \cdot C_l \cdot (\pi D N + 1)}} \]

This looks ok. We have only one unknown variable here: N. I can already tell that we’re not going to be able to isolate it. This is going to be a polynomial… and I don’t think it’s quadratic. Let’s shuffle things around a bit.

    \[ \nu = \frac{10^3}{2\pi\sqrt{\frac{\pi D^3 C_l N^3 + D^2 C_l N^2}{18D + 40N \cdot D_{\text{coax}}}}} \]

    \[ \sqrt{\frac{\pi D^3 C_l N^3 + D^2 C_l N^2}{18D + 40N \cdot D_{\text{coax}}}} = \frac{10^3}{2 \pi \nu} \]

    \[ \frac{\pi D^3 C_l N^3 + D^2 C_l N^2}{18D + 40N \cdot D_{\text{coax}}} = (\frac{10^3}{2 \pi \nu})^2 \]

    \[ \frac{\pi D^3 C_l N^3 + D^2 C_l N^2}{18D + 40N \cdot D_{\text{coax}}} = \frac{10^6}{4 \pi^2 \nu^2} \]

    \[ 4 \pi^3 D^3 \nu^2 C_l N^3 + 4 \pi^2 D^2 \nu^2 C_l N^2 = 18D \cdot 10^6 + 40\cdot D_{\text{coax}} \cdot 10^6 N \]

    \[ 4 \pi^3 D^3 \nu^2 C_l N^3 + 4 \pi^2 D^2 \nu^2 C_l N^2 - 40\cdot D_{\text{coax}} \cdot 10^6 N - 18D \cdot 10^6 = 0 \]

And that, my friends, is a cubic equation. We can solve this, but we’re going to need some help. Let’s start with the basic form of a cubic equation.

    \[ ax^3+bx^2+cx+d=0 \]

Just like quadratic equations, there is a formula to solve it. Only this one is exponentially more complicated (pun intended.)

    \begin{multline*} \nonumber x=\sqrt[3]{(\frac{-b^3}{27a^3}+\frac{bc}{6a^2}-\frac{d}{2a})+\sqrt{(\frac{-b^3}{27a^3}+\frac{bc}{6a^2}-\frac{d}{2a})^2+(\frac{c}{3a}-\frac{b^2}{9a^2})^3}} + \\ \sqrt[3]{(\frac{-b^3}{27a^3}+\frac{bc}{6a^2}-\frac{d}{2a})-\sqrt{(\frac{-b^3}{27a^3}+\frac{bc}{6a^2}-\frac{d}{2a})^2+(\frac{c}{3a}-\frac{b^2}{9a^2})^3}} - \frac{b}{3a} \end{multline*}

Pressing on… let’s assign values for a, b, c and d according to our formula and replacing N with x. (N shows up again later in this algorithm, but it’s not the same N!)

    \[ a=4 \pi^3 \nu^2 D^3 C_l \]

    \[ b=4 \pi^2 D^2 \nu^2 C_l \]

    \[ c=-40\cdot D_{\text{coax}} \cdot 10^6 \]

    \[ d=-18D \cdot 10^6 \]

Now, we could just plug those numbers in to our cubic formula and find value, but as it turns out, there’s a better way. It’s described here. I’ll plug our values for a,b,c,d in where appropriate.

    \[ f=\frac{\frac{3c}{a}-\frac{b^2}{a^2}}{3}  =\frac{\frac{-120\cdot D_{\text{coax}} \cdot 10^6}{4 \pi^3 \nu^2 D^3 C_l}-\frac{(4 \pi^2 D^2 \nu^2 C_l)^2}{(4 \pi^3 \nu^2 D^3 C_l)^2}}{3}  =\frac{- D_{\text{coax}} \cdot 10^7}{ \pi^3 \nu^2 D^3 C_l}-\frac{1}{3 \pi^2 D^2} \]

    \[ g=\frac{\frac{2b^3}{a^3}-\frac{9bc}{a^2}+\frac{27d}{a}}{27}  =\frac    {\frac {2(4 \pi^2 D^2 \nu^2 C_l)^3}           {(4 \pi^3 \nu^2 D^3 C_l)^3}    -    \frac {9(4 \pi^2 D^2 \nu^2 C_l)            (-40\cdot D_{\text{coax}} \cdot 10^6)}          {(4 \pi^3 \nu^2 D^3 C_l)^2}    +    \frac {27(-18D \cdot 10^6)}          {4 \pi^3 \nu^2 D^3 C_l}   }{27} =   \frac {2}           {27\pi^3 D^3}    +    \frac {D_{\text{coax}} \cdot 10^7}          {3\pi^4 \nu^2 D^4 C_l}    -    \frac {45 \cdot 10^5}          {\pi^3 \nu^2 D^2 C_l} \]

    \[ h=\frac{g^2}{4}+\frac{f^3}{27} \]

According to our algorithm, there are three ways this can go, depending upon the value of h, and possibly f and g. How we proceed will depend upon whether h>0, h<=0 or the special case when h=0, g=0 and f=0. Since we aren’t working with real values, we don’t know which of these cases are in scope. It’s possible that they all are. I know from experience that h>0 and h<0 are possible. My end goal is to build a calculator, so I think the safest bet is to include all of these cases in the program.

Let’s start with h>0. In this case, only one root is real. The other two roots are imaginary and useless to us.

    \[ R=-\frac{g}{2} + \sqrt{h} \]

    \[ S=\sqrt[3]{R} = \sqrt[3]{-\frac{g}{2} + \sqrt{h}} \]

    \[ T=-\frac{g}{2} - \sqrt{h} \]

    \[ U=\sqrt[3]{T} = \sqrt[3]{-\frac{g}{2} - \sqrt{h}} \]

    \[ x=S+U-\frac{b}{3a}   = \sqrt[3]{-\frac{g}{2} + \sqrt{h}} +     \sqrt[3]{-\frac{g}{2} - \sqrt{h}} -     \frac{1}{3 \pi D} \]

Now let’s look at h<=0, (but both f \ne 0 and g \ne 0.) In this case, there are three real roots, so we are going to wind up with three formulae. Some may and probably will be negative. We can discard those, although we need to solve them first to be sure. If I were a real math wiz, or just less lazy, I might be able to eliminate one or more of these solutions based upon the range and domain of each equation, but I’m CompSci, so I’ll just potentially waste some processor cycles. If this were an algorithm that were being run in a loop, I make reconsider this for efficiency’s sake.

    \[ i=\sqrt{\frac{g^2}{4}-h} \]

    \[ j=\sqrt[3]{i} = \sqrt[6]{\frac{g^2}{4}-h} \]

    \[ k=\arccos\frac{-g}{2i} = \arccos\frac{-g}{2\sqrt{\frac{g^2}{4}-h}} \]

    \[ x_1=2j \cos\frac{k}{3} -\frac{b}{3a}     = 2\sqrt[6]{\frac{g^2}{4}-h}       \cos\frac{\arccos\frac{-g}{2\sqrt{\frac{g^2}{4}-h}}}{3} -       \frac{1}{3 \pi D}  \]

    \[ L=-j=-\sqrt[6]{\frac{g^2}{4}-h} \]

    \[ M=\cos\frac{k}{3}    =\cos\frac{1}{3}\arccos\frac{-g}{2\sqrt{\frac{g^2}{4}-h}} \]

    \[ N=\sqrt{3}\sin\frac{k}{3}  =\sqrt{3}\sin\frac{1}{3}\arccos\frac{-g}{2\sqrt{\frac{g^2}{4}-h}} \]

    \[ P=\frac{-b}{3a}=\frac{1}{3 \pi D} \]

    \[ x_2=L\cdot(M+N)+P=-\sqrt[6]{\frac{g^2}{4}-h}\cdot(\cos\frac{1}{3}\arccos\frac{-g}{2\sqrt{\frac{g^2}{4}-h}}+\sqrt{3}\sin\frac{1}{3}\arccos\frac{-g}{2\sqrt{\frac{g^2}{4}-h}})+\frac{1}{3 \pi D} \]

    \[ x_3=L\cdot(M+N)+P=-\sqrt[6]{\frac{g^2}{4}-h}\cdot(\cos\frac{1}{3}\arccos\frac{-g}{2\sqrt{\frac{g^2}{4}-h}}-\sqrt{3}\sin\frac{1}{3}\arccos\frac{-g}{2\sqrt{\frac{g^2}{4}-h}})+\frac{1}{3 \pi D} \]

And finally, the special case where h<=0, f=0 and g=0.

    \[ x=-\sqrt[3]{\frac{d}{a}}=\sqrt[3]{\frac{-18D \cdot 10^6}{4 \pi^3 \nu^2 D^3 C_l}} \]

And that’s it! Given values for resonant frequency, coax capacitance, coax diameter, and coil form diameter, we can calculate the number of turns necessary… not that you’d ever want to solve it by hand.