2
\$\begingroup\$

I've been trying to get the transfer function for the circuit in the image below, but I seem to be doing something wrong, since the simulation on Circuitlab gives me a different Bode plot and I can't find the error on my own. enter image description here

Here, the equations from the nodal analysis (belong to nodes A, B, C, respectively). Va=Vb=Vc=0 due to virtual ground.

enter image description here

The result I'm getting for the transfer function is: enter image description here

which looks a little weird to me because of the large numbers, and which translates to this Bode plot:

enter image description here

Simulation on Circuitlab, on the other hand, outputs the following: enter image description here

From this transfer funtion I should get and plot the step response, which I get calculating the inverse Laplace from H(s)/s, but since the transfer function doesn't seem to be ok I'm not getting these right either.

I'd be very thankful if anyone could point me in the right direction.

\$\endgroup\$
6
  • \$\begingroup\$ It would be a good idea to divide through by 3584879 and then round the numbers to something reasonable. Also arrange the denominator in descending powers of s. \$\endgroup\$
    – Chu
    Commented Feb 12, 2019 at 14:42
  • \$\begingroup\$ ... also one graph is plotted in Hz and the other is in rad/sec. The graphs may be very similar - it's difficult to tell because of the different formats etc. \$\endgroup\$
    – Chu
    Commented Feb 12, 2019 at 14:48
  • \$\begingroup\$ @Chu I'll try to get somehing nicer by dividing everything by 3584879; thanks for the suggestion. As to the plots, in the one in rad/s I should've plotted with w/2pi to get it right, thanks for pointing it out since I passed it through, but that wouldn't change the overall 'shape' of the plot. The poles and zeros would give the same plot, only differing in the exact numbers in the plot where the slope changes take place. Do the nodal analysis equations look right to you? \$\endgroup\$
    – 89f3a1c
    Commented Feb 12, 2019 at 15:07
  • \$\begingroup\$ I haven't checked the equations. Do the plots again and see how they compare - then check equations if there's still a discrepancy. \$\endgroup\$
    – Chu
    Commented Feb 12, 2019 at 15:10
  • \$\begingroup\$ @Chu I just redid the plot dividing w by 2pi, and they are still differing. The correct plot only moved in the x axis. \$\endgroup\$
    – 89f3a1c
    Commented Feb 12, 2019 at 15:18

3 Answers 3

0
\$\begingroup\$

For my opinion, it is not necessary to go down to KCL and KVL equations. Instead you should make use of basic available gain functions.

  • Between E and output node Vo there is a damped integrator (inverting lowpass)

  • Between node Vo and E there is a non-inverting active block with an inverting feedback loop (local opamp with R2, R3 and C3); the resistor R1 has no influence on the gain (ideal opamp); its only purpose is stability improvement because we have two opamps in one feedback loop.

  • A closer look into this block reveals that it is nothing else than a non-inverting integrator stage (integrating capacitor C3 multiplied by the driving inverting gain factor, which - in this case - is "-1")

  • These building blocks are arranged in one common feedback loop. Thus, we have one version of the classical two-integrator loop (one damped inverting integrator and one non-inverting integrator).

  • Following this approach, we have a system of two equations with two unknowns:

First equation: Vo=Vi * F1 + VE * F2 with F1=f(R5, C1, C2) and F2=f(R4, R5, C1)

(Comment: Both functions F1 and F2 are simple inverting gain functions)

2nd equation: VE=Vo * (1/sT) with T=R6C3

Unknowns: VE and Vo/Vi

(using this approach, I have found the transfer function - by hand calculation - within 8 minutes).

\$\endgroup\$
7
  • \$\begingroup\$ I see the damped integrator, but I get confused when the stages between 'classic opamp circuits' are not independent, because I don't really understand how to analyze the circuit in that case. For example, in this case if there would be no C2 and R6, the relation between Ve and Vo would be straightforward; but this way I just don't get it. That's why I got to nodal analysis (+ it's supposed to be the safest, since it should work with any circuit). Nevertheless, reading your answer I think I understand the first equation, although I'm not sure I'd be able to reproduce it in other circuits. \$\endgroup\$
    – 89f3a1c
    Commented Feb 12, 2019 at 18:10
  • \$\begingroup\$ Just to be sure, F1 would be -Z2/Z1 where Z2=the paralle of R5 and C1, and Z1=C2 (which would be 1/sC2). And F2 would be -Z2/Z1, where Z2 is the parallel between R5 and C1, and Z1=R4. Right? \$\endgroup\$
    – 89f3a1c
    Commented Feb 12, 2019 at 18:11
  • \$\begingroup\$ I do understand the -1 gain of the non inverting opamp. But I don't quite get the classical two-integrator loop part, and therefore the 2nd equation. I tried to look it up, and didn't find anything which would help me understand; would you mind pointing some source to help me understand that part please? \$\endgroup\$
    – 89f3a1c
    Commented Feb 12, 2019 at 18:11
  • \$\begingroup\$ Yes, your assumptions for F1 and F2 are OK (but, you should not use the term Z1 for 1/sC2 as well as for R4). Regarding your last comment: A buffer with unity gain in the feedback loop of any amplifier does not change trhe closed-loop gain at all, right? In the present case, we have an inverting buffer (gain "-1") because we want to realize negative feedback (as always necessary) at the "+" terminal of the opamp (because we need a non-inv. integrator). Hence, R6 together with the most left opamp (having C3 and a "-1" gain stage in the feedback loop) form a non-inv. integrator (1/sR6C3). \$\endgroup\$
    – LvW
    Commented Feb 13, 2019 at 8:56
  • \$\begingroup\$ The rest is simple math: You have two equations: Vo=f(Vi,VE) and VE=f(Vo). You simply can introduce the 2nd equation into the first one - and the result is Vo=f(Vi), which allows you to isolate the wanted transfer function Vo/Vi. \$\endgroup\$
    – LvW
    Commented Feb 13, 2019 at 9:00
4
\$\begingroup\$

Nodal analysis is based on Kirchoff's Current Laws (KCL), meaning that the sum of all currents will need to sum up to exactly \$0\$.

The issue in your equations is related to the fact that outputs of opamps are voltage sources, and they will also inject a current in a node. So, for example in node D you would get instead

$$0 = (v_A - v_D)\cdot sC_3 + (v_B - v_D)\frac{1}{R_2} + i_{oa1}$$

As is, this circuit becomes unsolvable as we just inserted another unknown. In order to make the circuit solvable again, the added unknown current will need to be fixed by another (linearly independent) equation, in our case this is the virtual short-circuiting of the inputs;

$$v_B = 0$$

This problem has 6 unknowns (A through E and \$v_0\$), so you will need 6 KCL equations. There are 3 opamp outputs, so you would (when not simplifying the system of equations) ultimately have 3 extra virtual short-circuit equations and output current unknowns totaling to 9 equations and unknowns.

\$\endgroup\$
2
  • \$\begingroup\$ I'm aware that there are voltage sources at the output of opamps. But if I write only equations for the nodes which are not at opamps outputs, I avoid getting those unknown currents involved, and the equations system should still be solvable, since I would have 6 unknowns, as you said, and 6 equations: 3 for nodes A, B, C, 3 for the virtual short-circuiting of the opamps inputs. Nevertheless, I added equations on nodes D, E, F, but the transfer function is still the same as posted in the original question. Is this correct or am I still missing something? \$\endgroup\$
    – 89f3a1c
    Commented Feb 12, 2019 at 15:56
  • \$\begingroup\$ Fair enough. Have you considered the limited bandwidth of the opamps? \$\endgroup\$
    – Sven B
    Commented Feb 13, 2019 at 8:30
0
\$\begingroup\$

Try plotting DB(MAG(V(OUT)/V(IN))) instead of DB(MAG(V(OUT))), because you want to get the transfer function from Output to Input. Here's the schematic I used:

schematic

simulate this circuit – Schematic created using CircuitLab

Yielding this

\$\endgroup\$
4
  • \$\begingroup\$ Thanks for posting the correct transfer function! I totally missed the input signal, although I know it should be included :/ \$\endgroup\$
    – 89f3a1c
    Commented Feb 12, 2019 at 18:15
  • \$\begingroup\$ Don't worry, at least you did not forget to power up the cirucuit! \$\endgroup\$
    – Alberto
    Commented Feb 13, 2019 at 9:51
  • \$\begingroup\$ Where is the "correct transfer function"? I only can see the magnitude response as a BODE plot - but not the function . \$\endgroup\$
    – LvW
    Commented Feb 13, 2019 at 10:52
  • \$\begingroup\$ @LvW the transfer function calculation was already discussed and his main problem with the circuit simulator was the bode plot of it \$\endgroup\$
    – Alberto
    Commented Feb 13, 2019 at 16:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.