Electronic – Calculating transfer function for complicated circuit

filtertransfer function

I have a circuit with many components for which I need to find the transfer function. More precisely, the circuit I am looking at looks something like that:enter image description here

Please don't go into the trouble of computing this transfer function, I just want the general methodology that one would follow as I will later use a code which will do all the tedious mathematics for me. That being said, my professor keeps telling me that I need to use the formula \$H = \lvert \frac{Z_2}{Z_1 +Z_2}\rvert\$ which is quite easy to use when I have a simple RC filter but when all of these components are included, I am lost.

Should I just start from the end and just keep adding impedances? For instance, say:

$$Z_a = ((Z_{C_5} + R_4) || Z_{C_4}) + Z_{L_2} $$

Then:

$$Z_b = (Z_a||Z_{C_3}) + R_3 + R_2 $$

Similarly:

$$Z_c = (Z_b||Z_{C_2}) + Z_{L_1}$$

And finally:

$$Z_d = (Z_c||Z_{C_1}) + R_1$$

Hence:

$$H = \frac{Z_c||Z_{C_2}}{Z_c||Z_{C_2} + R_1}$$

Where \$Z_{C_n} = \frac{1}{j\omega C_n}\$ and \$Z_{L_n}=j\omega L_n\$

Would something like that, in theory, give me the appropriate transfer function? If yes, then it's easy enough to code this. However, as I lack experience with these type of systems, I am not sure whether my method is appropriate. Any feedback or edits to the question to make it clearer are always much appreciated.

Best Answer

This circuit is a 7th-order system and if you apply the impedance divider as recommended, then you'll end up in a total algebraic paralysis unless you want to use a computer for doing it. If you want to derive by hand and express it in a readable polynomial format, the best is to apply the fast analytical circuits techniques or FACTs, they are unbeatable in passive circuits like the one you shown. I have published a book on the subject and an introductory seminar in 2016.

The principle is quite simple, you have to determine the time constants of the circuit in two conditions: with a zeroed excitation you obtain the poles of the circuit and when the response is nulled you determine the zeroes of the transfer function. By inspection for instance, I can see there are no zeroes in your circuit, only poles.

As an example, I have derived a 6th-order transfer function and the circuit was that one below:

enter image description here

There are no zeroes either in this one. So after zeroing the excitation (the voltage source is replaced by a short circuit), you temporarily remove each energy-storing element and determine the resistance \$R\$ "seen" from its terminals. That resistance is then combined to form the time constants you need: \$\tau=RC\$ and \$\tau=\frac{L}{R}\$. This is what is shown below:

enter image description here

What is cool is that you inspect the circuit and don't write a single line of algebra which avoids mistakes. The good thing is that you can come back to these little sketches later if you spot a mistake: just fix the guilty sketch without restarting from scratch. It saved me many times : )

As you go up in the terms, it becomes a bit more complicated but the principle remains the same: a sketch from which you can infer the time constants while the elements are either shorted or open-circuited:

enter image description here

Once done, you can use the method you want to determine the transfer function with a brute-force approach as a reference function. I personally favor Thévenin but you could use any other one. With Mathcad, there is no need to develop the expressions which is good:

enter image description here

Then, you can plot the response obtained from this approach and compare it with that given by the FACTs. As you can see, the format is already in an ordered form where all coefficients are individually determined:

enter image description here

If you carefully determined the time constants, then the error between the brute-force approach and the FACTs should be in the solver noise, in the pico range:

enter image description here

I obviously won't encourage you to go straight to solving a 6th or 7th-order circuit with the FACTs. But the method is truly an extraordinary tool and once you've acquired the skill, you won't go back to the classical method. Start with simple first-order circuits and increase complexity until you master the method. Then, you can jump on more complicated circuit as yours. Good luck!