Transfer Function from Nodal Analysis

Discussion in 'General Electronics Chat' started by seanlikeskites, Nov 26, 2012.

  1. seanlikeskites

    Thread Starter New Member

    Jan 13, 2010
    10
    0
    Hello there.

    I am trying to determine the transfer function of the circuit attached (caps-eq.pdf). I have done a nodal analysis and got equations for current at each node. I have tried solving these equations by hand and just got lost in algebra. I have also tried getting Matlab to solve them but it just seems to crash.

    I am wondering whether there is an easier way to find the transfer function of this circuit or perhaps if anyone can notice anywhere I am going wrong with my nodal analysis.

    The equations I have found are:

    <br />
\frac{X-Z}{R3} + \frac{X-VIn}{R1} = 0<br />
<br />
\vspace{10cm}<br />
<br />
Y = X<br />
<br />
\vspace{10cm}<br />
<br />
\frac{Y-VOut}{R2} + \frac{Y-Z}{R4} = 0<br />
<br />
\vspace{10cm}<br />
<br />
\frac{Z-X}{R3} + \frac{Z-Y}{R4} + \frac{Z}{R12} + \frac{Z-H}{R11} = 0<br />
<br />
\vspace{10cm}<br />
<br />
A = Z<br />
<br />
\vspace{10cm}<br />
<br />
\frac{A-H}{R10} + \frac{A-B}{R5} + (A-B)sC1 = 0<br />
<br />
\vspace{10cm}<br />
<br />
C = F<br />
<br />
\vspace{10cm}<br />
<br />
\frac{B-A}{R5} + (B-A)sC1 + \frac{B-C}{R6} + (B-F)sC4 = 0<br />
<br />
\vspace{10cm}<br />
<br />
\frac{C-B}{R6} + \frac{C-D}{R7} + (C-D)sC2 = 0<br />
<br />
\vspace{10cm}<br />
<br />
E = G<br />
<br />
\vspace{10cm}<br />
<br />
\frac{D-C}{R7} + (D-C)sC2 + (D-G)sC5 + \frac{D-E}{R8} =0<br />
<br />
\vspace{10cm}<br />
<br />
\frac{E-D}{R8} + \frac{E-H}{R9} + (E-H)sC3 = 0<br />
<br />
\vspace{10cm}<br />
<br />
(F-B)sC4 + \frac{F}{R13} = 0<br />
<br />
\vspace{10cm}<br />
<br />
(G-D)sC5 + \frac{G}{R14} = 0<br />
<br />
\vspace{10cm}<br />
<br />
\frac{H-Z}{R11} + \frac{H-A}{R10} = 0<br />
<br />

    Any help would be much appreciated.

    Thanks

    Sean
     
  2. Jony130

    AAC Fanatic!

    Feb 17, 2009
    3,963
    1,098
  3. seanlikeskites

    Thread Starter New Member

    Jan 13, 2010
    10
    0
    Thanks, I'll take a look at those links and see what I can gleam.

    Yes the circuit is a parametric equaliser.

    R3 and R4 would be a potentiometer controlling gain.
    R13 and R14 control the centre frequency.
    I believe R10 and R11 should set the Q.
     
  4. The Electrician

    AAC Fanatic!

    Oct 9, 2007
    2,286
    331
    A complete transfer function given in symbolic form will be very, VERY large!!

    If you want to investigate the effect of various resistors, for example, it would be better to leave only that one (or perhaps, two or three) in symbolic form, and use numeric values for the others. I mentioned this technique in one of the threads Jony130 linked. If you do this, the resulting transfer function will still be small enough to gain insight by visual examination.

    Do you have numerical values for the passive components? Do you want the opamps to be treated as ideal? It might be interesting to see the effect of opamp non-idealities on the high frequency behavior of the circuit.
     
  5. seanlikeskites

    Thread Starter New Member

    Jan 13, 2010
    10
    0
    I did realise pretty soon after posting how big the full symbolic transfer function would have been.

    I did try in Matlab using actual component values rather than just the symbols. I never seemed to get the same results I have measured using simulation though. I have attached a schematic with the component values I used. Basically I have just substituted those values into the equations I posted above.

    Obviously I have derived 15 equations for the circuit but only defined 13 nodes. Using all 15 equations Matlab says there is no solution (which I guess might make sense, not entirely sure why though). I have had trouble in working out how to reduce these equations into the 12 that are needed.

    I should probably note that I haven't had time to read the treads that were linked thoroughly yet. So if the answers to my problems are there that would be fantastic. I probably won't have time to properly look at this until the weekend.

    Cheers

    Sean
     
  6. The Electrician

    AAC Fanatic!

    Oct 9, 2007
    2,286
    331
    Here are some images showing how to set up the admittance matrix. I used Mathematica for this, and the images are the Mathematica output.

    The first image shows the matrix and the component values from your pdf file that were used to derive the transfer function. I didn't keep R10 and R15, or R11 and R16 separate.

    I numbered the nodes with this correspondence to the node designators in your first pdf:

    1=Vin
    2=X
    3=Z
    4=Y
    5=A
    6=B
    7=C
    8=D
    9=E
    10=F
    11=G
    12=H
    13=Vout

    The second image shows the response of the circuit, first with the values of R3 and R4 you gave, and then with them swapped.

    The third image shows the response with the ratio of R3 to R4 varied, but with their sum remaining constant (what you would get if R3 and R4 were a pot, varied).

    The fourth image shows the driving point impedance at node 3. You will notice in the second and third images that the base line varies as you go from full cut to full boost. This is because the impedance of your resonator doesn't get any higher than about 200k ohms at frequencies away from the resonance frequency.
     
  7. seanlikeskites

    Thread Starter New Member

    Jan 13, 2010
    10
    0
    Wow, thanks a lot.

    So from what I can tell from looking at this is that you have done an equation for current at each node. Apart from at the outputs of Opamps where you put an equation saying that the two inputs of that Opamp have equal voltage.

    I have just been fiddling with it in Matlab and I am getting the same results as you. What I have seen though is that if R3 or R4 are set to zero (pot at either end of its excursion) the matrix inverse is undefined. Is that just a problem with this method of analysis?

    In simpler circuits I have analysed, say with just a simple inductor, capacitor and resistor in series between the pot wiper and ground. Having R3 or R4 equal to zero didn't cause this problem. Any ideas?
     
  8. The Electrician

    AAC Fanatic!

    Oct 9, 2007
    2,286
    331
    When there is a term like 1/R3 or 1/R4 or 1 divided by anything that becomes zero in an admittance matrix, you're going to have a problem! :eek:

    When you didn't have a problem, you must not have been inverting an admittance matrix.

    You could just let the resistor value become .001 instead of zero.

    You could let the particular resistor, say R4, stay a symbolic rather than a numeric, and invert the matrix that way, then take the limit of the transfer function as R4 approaches zero; see the attachment.
     
    Last edited: Nov 28, 2012
  9. The Electrician

    AAC Fanatic!

    Oct 9, 2007
    2,286
    331
    I looked more carefully at this problem, and it's not necessary to take limits. Just leave R3 and R4 symbolic, invert the Y matrix, and then assign numeric values to R3 and R4 in the derived transfer function. Letting R3 or R4 become zero doesn't cause any problem then. See the attachment.
     
  10. seanlikeskites

    Thread Starter New Member

    Jan 13, 2010
    10
    0
    Yeah, that would be why. In the simpler circuit I did the inversion with a symbolic matrix and then substituted the values into the symbolic transfer function.

    Cheers
     
Loading...