# General solution for the impedance of a finite ladder network with different series and parallel impedances

I am trying to find the equivalent impedance of a network that has a structure like this:

I have attempted to use MATLAB with the Symbolic Toolbox to find a solution for the equivalent impedance with 'N' cells connected. For up to a network of 10 cells, the solution looks like this (starting from 1 cell up to 10 cells).

$$\begin{array}{c} Z_1 +Z_2 \\ Z_1 +\frac{Z_2 \,{\left(Z_1 +Z_2 \right)}}{Z_1 +2\,Z_2 }\\ \frac{{Z_1 }^3 +5\,{Z_1 }^2 \,Z_2 +6\,Z_1 \,{Z_2 }^2 +{Z_2 }^3 }{{Z_1 }^2 +4\,Z_1 \,Z_2 +3\,{Z_2 }^2 }\\ \frac{{Z_1 }^4 +7\,{Z_1 }^3 \,Z_2 +15\,{Z_1 }^2 \,{Z_2 }^2 +10\,Z_1 \,{Z_2 }^3 +{Z_2 }^4 }{{Z_1 }^3 +6\,{Z_1 }^2 \,Z_2 +10\,Z_1 \,{Z_2 }^2 +4\,{Z_2 }^3 }\\ \frac{{Z_1 }^5 +9\,{Z_1 }^4 \,Z_2 +28\,{Z_1 }^3 \,{Z_2 }^2 +35\,{Z_1 }^2 \,{Z_2 }^3 +15\,Z_1 \,{Z_2 }^4 +{Z_2 }^5 }{{Z_1 }^4 +8\,{Z_1 }^3 \,Z_2 +21\,{Z_1 }^2 \,{Z_2 }^2 +20\,Z_1 \,{Z_2 }^3 +5\,{Z_2 }^4 }\\ \frac{{Z_1 }^6 +11\,{Z_1 }^5 \,Z_2 +45\,{Z_1 }^4 \,{Z_2 }^2 +84\,{Z_1 }^3 \,{Z_2 }^3 +70\,{Z_1 }^2 \,{Z_2 }^4 +21\,Z_1 \,{Z_2 }^5 +{Z_2 }^6 }{{Z_1 }^5 +10\,{Z_1 }^4 \,Z_2 +36\,{Z_1 }^3 \,{Z_2 }^2 +56\,{Z_1 }^2 \,{Z_2 }^3 +35\,Z_1 \,{Z_2 }^4 +6\,{Z_2 }^5 }\\ \frac{{Z_1 }^7 +13\,{Z_1 }^6 \,Z_2 +66\,{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1 }^2 \,{Z_2 }^6 +120\,Z_1 \,{Z_2 }^7 +9\,{Z_2 }^8 }\\ \frac{{Z_1 }^{10} +19\,{Z_1 }^9 \,Z_2 +153\,{Z_1 }^8 \,{Z_2 }^2 +680\,{Z_1 }^7 \,{Z_2 }^3 +1820\,{Z_1 }^6 \,{Z_2 }^4 +3003\,{Z_1 }^5 \,{Z_2 }^5 +3003\,{Z_1 }^4 \,{Z_2 }^6 +1716\,{Z_1 }^3 \,{Z_2 }^7 +495\,{Z_1 }^2 \,{Z_2 }^8 +55\,Z_1 \,{Z_2 }^9 +{Z_2 }^{10} }{{Z_1 }^9 +18\,{Z_1 }^8 \,Z_2 +136\,{Z_1 }^7 \,{Z_2 }^2 +560\,{Z_1 }^6 \,{Z_2 }^3 +1365\,{Z_1 }^5 \,{Z_2 }^4 +2002\,{Z_1 }^4 \,{Z_2 }^5 +1716\,{Z_1 }^3 \,{Z_2 }^6 +792\,{Z_1 }^2 \,{Z_2 }^7 +165\,Z_1 \,{Z_2 }^8 +10\,{Z_2 }^9 } \end{array}$$

Is it possible to generalize the solution in some way? I am unable to see a pattern here. I also have no information on which impedance is larger or smaller, so I am unable to solve it using series-parallel equivalence.

• You will want to read chapter 7, Generating Functions, in the 2nd edition of Concrete Mathematics by Graham, Knuth, & Patashnik. Or just look up some tutorials on the topic. Commented Aug 4 at 22:47
• Thank you. I will take a look at it.
– MNA
Commented Aug 4 at 23:40

Do as Tim says and use a cascadable matrix formulation, such as ABCD.

$$\Z = {\bf T}^n (Z_1 + Z_2)\$$

diagonalize T (it's only 2x2):

$$\T = P^{-1} Q P\$$

where $$\Q\$$ is diagonal, then

$$\Z = {T}^n (Z_1 + Z_2) = P^{-1} Q^n P (Z_1+Z_2)\$$

and now $$\Q^n\$$ is trivial to calculate.

• Letting $$\alpha=\frac{Z_2}{Z_1}$$, then I got: $$Z=\frac{Z_1}{2}\left(1+\sqrt{4\alpha+1}+2\sqrt{4\alpha+1}\left(\left(\frac{1+2\alpha+\sqrt{4\alpha+1}}{1+2\alpha-\sqrt{4\alpha+1}}\right)^n-1\right)^{-1}\right)$$ Commented Aug 5 at 19:03
• Thank you for your effort.
– MNA
Commented Aug 6 at 14:28

I would suggest studying transmission (ABCD) parameters:
https://en.wikipedia.org/wiki/Two-port_network#ABCD-parameters
The solution is basically $$\Z = {\bf T}^n (Z_1 + Z_2)\$$. Working out the flattened/"simplified" formulas, however, is another matter.

You may also find a continued fraction form is better, or may be able to identify the polynomial family the flattened expressions appear in.

• Continued fractions are the most evil branch of mathematics Commented Aug 5 at 13:00
• Strange, I find it one of the most beautiful structures Commented Aug 5 at 13:08
• Math can be both evil and beautiful at the same time... Commented Aug 5 at 16:43

Is it possible to generalize the solution in some way?

Yes. Implement specialized symbolic code that will generate the expression tree for this particular network, of any length. It'd be simplest to prototype it in Mathematica, using its expressive pattern-matching capabilities. Then the Mathematica code can be manually lowered to use lower-level abstractions more akin to what's available in less-expressive programming languages. Then convert that to Python or C++ or whatever your target language is.

The expression tree can then be evaluated for resultant impedance at any frequency using usual depth-first tree-walking techniques. Common subexpressions can be factored out if the same tree is to be evaluated repeatedly, to save some time.

Given Mathematica's strength in aiding the prototyping of such code, I suggest that it's a much more apt tool than Matlab's Symbolic Toolbox.

If you would like to look at some worked Fortran code to solve such networks of arbitrary finite length, here's one: https://docs.neu.edu.tr/library/6033863937.pdf

• Thank you for sharing! I will take a look at it.
– MNA
Commented Aug 6 at 14:28