Problem 32 : Proving a circuit impedance formula
It was roughly the start of 2015 with about a year left for JEE (Entrance Exams for IITs). Calculus and Analysis formed a big part of the syllabus. We were often asked to remember some strange infinite series that were, at times, quite useful for limits or approximating integral but never made complete sense to me. In my attempts to better understand this, I joined a couple of forums such as Mathematics Stack Exchange and Brilliant.org. I had even subscribed to weekly recurrence and series newsletter from the Mathematics Stack Exchange and I often saw a lot of series and continued fractions. There was a lot of reference to complex analysis (something we eventually covered at IIT in our first year). Now that I look back, things are starting to make sense especially now that my work at MIT has led me to stumble upon similar things again in a different light. More specifically, this post relies on Gauss’s formula of continued fractions.
This problem involves derivation of a generalized impedance formula (see below for explanation) \(A (j\omega)^{-n}\) where \(j = \sqrt{-1}\) and \(\omega\) represents the angular frequency of the response. The derivation is detailed in this paper. As always, I will focus on delivering a “feel” of the method rather than going through all the steps. Let’s jump right in…
A Game of Sticks
Let’s say we have a stick of length \(x\) and another stick of length \(y\) where \(x > y\). If I were to ask you to measure the longer stick \(x\) using the shorter one \(y\) there is one specific mathematical operation that immediately comes to mind i.e. division. Specifically, I would measure roughly \(x/y\) times to see how many integer number of \(y\) sticks can be composed to form the \(x\) stick.
Now let us say we can remove the measured portion from \(x\) stick which leads to a reduced stick \(z = x - y\left \lfloor {x/y} \right \rfloor\) which would necessarily have it’s length lower than \(y\). This makes \(y\) the longer stick now! This puts us at a recursive spot where can mesure \(y\) using \(z\) stick. In fact, we could keep going like this until we are done “measuring” \(x\), the stick we started with.
Wait, but how does all of this relate to continued fractions? Well, it’ll be clear in a moment. Let’s write out the math for what we just did.
\[\begin{equation} x/y = \left \lfloor {x/y} \right \rfloor + z/y \end{equation}\] \[\begin{equation} y/z = \left \lfloor {y/z} \right \rfloor + w/z \end{equation}\]and so on… eventually leading to the following result that \(y/x\) can be expressed as…
\[\begin{equation} y/x = \frac{1}{\left \lfloor {x/y} \right \rfloor + z/y} = \frac{1}{\left \lfloor {x/y} \right \rfloor + \frac{1}{\left \lfloor {y/z} \right \rfloor + \dots }} \end{equation}\]where \(z = x -y\left \lfloor {x/y} \right \rfloor\), \(w = y -z\left \lfloor {y/z} \right \rfloor\) and so on… In fact, letting \(\left \lfloor {x/y} \right \rfloor = a_1\), \(\left \lfloor {y/z} \right \rfloor = a_2 \dots\), we can write this more compactly as,
\[\begin{equation} y/x = \frac{1}{a_1 + z/y} = \frac{1}{a_1 + \frac{1}{a_2 + \dots }} \end{equation}\]which is nothing but the continued fraction representation of \(y/x\) and is bound to end at some point as the smaller stick lengths approach 0 given \(y > z > w > \dots \geq 0\) and \(y/x\) is (hopefully) rational.
This concept of sticks that does makes sense for real numbers could probably be extended to complex numbers. In fact, it could even be extended to functions of complex numbers. If one were to do such an extension what would it look like? Well.. let’s try!
Let us define a sequence of functions of a complex number \(Z\), \(\{f_0, f_1, f_2 \dots f_{i-1}, f_i, f_{i+1}, \dots \}\) and try to draw an analogy to between \(f_{i-1},f_i, f_{i+1} \dots\) and the sequence \(x,y,z \dots\). Now let us say in our stick example the stick \(y\) is just a little shorter that \(x\) so that \(\rfloor{x/y}\lfloor = a_1 = 1\) then,
\(\begin{equation} y/x = \frac{1}{1+\frac{\Delta}{y}} \end{equation}\) where \(z = \Delta = x - y\).
Using our direct analogy replacing \(x = f_{i-1}, y = f_{i}\) the equation becomes,
\(\begin{equation} \frac{f_{i}}{f_{i-1}} = \frac{1}{1+\frac{\Delta}{f_i}} \end{equation}\) where \(\Delta = f_{i-1} - f_i\). Now the question is what should this \(\Delta\) we know for a fact that since \(f_i\)’s are functions \(\Delta\) should also be a function. Also, to have any hope at making a recurrence relationship for the next term in the sequence i.e. \(f_{i+1}\), \(\Delta\) should depend on \(f_{i+1}\). It cannot be directly proportional to \(f_{i+1}\) since it’ll lead to a trivial constant relationship that \(\frac{f_1}{f_0} = K\) for some constant \(K\).
The Genius of Gauss ft. Euler’s Hypergeometric Series
This is where my limitations exist. I’m not a genius like Gauss or Euler so I could never have figured this out. You probably need to spend enough time in the mess to see the patterns emerge but magically if one considers \(\Delta = k_i Z f_{i+1}\) (to me this is like the “next” simplest thing to do after assuming \(\Delta \propto f_{i+1}\)) gives an interesting continued fraction recurrence relationship given by,
\[\begin{equation} \frac{f_{i}}{f_{i-1}} = \frac{1}{1+\frac{k_i Z f_{i+1}}{f_i}} \end{equation}\]Using the above equation recursively gives various formulae for a range of what are known as Hypergeomtric functions (think of these as a summation over powers of the complex number \(\sum_n a_n Z^n\) a.k.a. power series with coefficients \(a_n\) that do not blow up and are function of \(n\)). As a useful example consider the following series,
\[(1+Z)^{-n} = = \sum_{k=0}^{\infty} \binom{-n}{k}Z^k = \sum_{k=0}^{\infty} \frac{-n(-n-1)\dots(-n-k+1)}{k!}Z^k\]Let us define \(F(a,b,c;Z) = \sum_{k=0}^{\infty} \frac{(a)_k(b)_k}{(c)_k}Z^k\) where \((a)_k = a(a+1)\dots(a+k-1)\) is the Pochhammer symbol (a fancy way of saying \((a)_k = a(a+1)(a+2)\dots(a+k-1)\) for \(k \geq 1\) and \((a)_0 = 1\).)
You can try showing that the series \((1+Z)^{-n}\) is in fact a hypergeometric series which exactly matches \(F(1,n,1;Z)\) but more importantly we’ll see how this specific series follows our recurrence relationship. Here, I’ll follow the wiki derivation which specifically assigns the values of \(f_i\) as follows,
\(f_0 = F(a,b,c;Z)\) (Base)
\(f_1 = F(a+1,b,c+1;Z)\) (First and third arguments incremented by 1)
\(f_2 = F(a+1,b+1,c+2;Z)\) (Second and Third argument incremented by 1)
\(f_3 = F(a+2,b+1,c+3;Z)\) (First and third arguments incremented by 1)
and so on… follows the recurrence of the form \(f_{i}/f_{i-1} = 1/(1+k_i Z f_{i+1}/f_i)\) where \(k_{2m+1} = \frac{(a-c-m)(b+m)}{(c+2m-1)(c+2m)}\) and \(k_{2m} = \frac{(b-c-m)(a+m)}{(c+2m)(c+2m-1)}\) for \(m = 0,1,2 \dots\).
gives a result that will be useful in the end,
\[\begin{equation} \frac{F(a,b,c;Z)}{F(a+1,b,c+1;Z)} = \left(1+\frac{k_1 Z}{1+\frac{k_2 Z}{1+\frac{k_3 Z}{1+\dots}}}\right) \end{equation}\]The Problem
The mathematical statement of the problem is as follows, we want to show that the following continued fraction,
\[\begin{equation} Z(\omega) = r_0 + \frac{1}{c_0 z + \frac{1}{r_1 + \frac{1}{c_1 z + \dots}}} \end{equation}\]converges to \(Z(\omega) = (j\omega)^{-n}\) for \(z = \sqrt{-1}\omega = j\omega\) and certain values of the \(r_k\) and \(c_k\) values given by,
\(r_k = 2h^n \frac{\Gamma(1-n)}{\Gamma(n)}\frac{\Gamma(k+n)}{\Gamma(k+1-n)} - h^n \delta_{k0}\) and \(c_k = (2k+1)h^{1-n}\frac{\Gamma(n)}{\Gamma(1-n)}\frac{\Gamma(k+1-n)}{\Gamma(k+1+n)}\)
For those familiar with series-parallel combinations in equivalent circuit analysis it’ll be clear that this continued fraction representation is a way to write the equivalent impedance of the following circuit,
Wait, what is impedance and why do we care?
Simply put, impedance may be seen as a way to characterize electrical (and other coupled) properties of a system by applying a sinusoidal perturbations in a specific input variable (such as voltage) to record the response in an output variable (such as current). This perturbation can be applied for a range of frequencies to then calculate the ratio of the output to input variable. This ratio is analogous to resistance in the linear Ohm’s Law and when applied to the frequency domain is called impedance. A major difference being that since we have sinusoidally varying inputs/outputs these are best represented as an amplitude (\(A\)) and phase angle (\(\phi\))combination as per the Euler Formula (\(Z(\omega) = A.e^{j\omega t + \phi}\) or \(A \lange \phi\) in Electrical Engineering notation).
Such an impedance (typically denoted as Z) which may be represented as a complex number (recall the Euler formula) is often represented by the locus of points i.e. a parameteric curve in the Real part of Z vs -Negative Imaginary part of Z [Why is this negative?] plane where the parameter is frequency (\(\omega\)).
Labyrinths
Generally adopting the same picture, the impedance of systems when calculated as the ratio of the applied driving force (voltage) to resulting flux (current) can give very interesting Nyquist plots. Look at some below and here.
Many of these systems which I’ll refer to as “Labyrinths” are morphologically complex, for example look at this picture of a super-capacitor (something that is known to store and release low amounts of charge at super-high speeds) material that has several interal surfaces which might even have different “sizes” and “approachability” where not every part of the Labyrinth stores charge at the same time.
Essentially, such a Labyrinth exhibits what many call a “distribution of timescales” that leads to different parts of the system being “felt” in the Nyquist Impedance Diagram when the system is interrogated at different frequencies “\(\omega\)” (inverse of the timescale).
To think more clearly, imagine an array of small charge storage entities with different levels of “accessbility”, some buried deep inside the Labyrinth while other closer to the location where you are measuring the currents/fluxes. Each of these entities has a timescale associated with it, but more importantly there could be several such entities, so many that one could even think of an infinite number of these tiny entities connected in some fashion. One way of connecting these entities using simple series/parallel connections could in fact result in a form similar to the continued fractions of complex-valued functions envisioned by Gauss.
Additional Comment:
The distribution of times as such often appears in processes that involve transfer of mass or charge and more often than not such a phenomena is governed by second order differential equations many of which do have power-series solutions in terms of hypergeometric functions.
Connecting the dots …
Okay, we have a continued fraction that we want to show converges to \(Z(\omega) = (j\omega)^{-n}\).
The first thing that comes to do is to see how we could possibly use Gauss’s continued fraction formula. In the absence of a better derivation, I’ll follow the way it is setup in the paper specifically use the observation that for \(z = j\omega\), \(Z(\omega) = \frac{1}{z^n}\). Or equivalently,
\[Z(\omega) = \lim_{h \rightarrow 0} \left(h + \frac{1}{z}\right)^n = \lim_{h \rightarrow 0} h^n \left(1 + \frac{1}{z h}\right)^n\]Letting \(X = \frac{1}{hz}\) be some new variable, we can write the above expression as,
\[Z(\omega) = \lim_{h \rightarrow 0} h^n \left(1 + X\right)^n\]The RHS of the above equation can now be written as a continued fraction using the hypergeometric series formulae by Gauss i.e. the continued fraction expression for \((1+X)^n\) that corresponds to \(1/F(1,n,1;X)\) allowing us to write the final expression as,
\[Z(\omega) = \lim_{h \rightarrow 0} h^n (1+X)^n\] \[\lim_{h \rightarrow 0} h^n \left(1 + \frac{k_1 Z}{1+\frac{k_2 Z}{1+\frac{k_3 Z}{1+\dots}}}\right) = r_0 + \frac{1}{c_0 z + \frac{1}{r_1 + \frac{1}{c_1 z + \dots}}}\]where \(r_k\) and \(c_k\) are obtained by comparing terms in the LHS and RHS of writing \(Z(\omega)\).
P.S. - For evaluation of the \(k_i\) the above formula a careful limit of \(a = c \to 0\) needs to be taken in the general expression of \(k_{2m}\)’s and \(k_{2m+1}\)’s derived in the earlier section.