Electronic – Getting the wrong KCL equations in op-amp circuit

circuit analysiscurrentkirchhoffs-lawsmathoperational-amplifier

I have the following op-amp circuit:


simulate this circuit ā€“ Schematic created using CircuitLab

When I use and apply KCL, we can write the following set of equations:


In the system of equations, \$\text{K}_6\$ gives the KCL of the incoming and outgoing current from the sources to the ground.

Question: there is a mistake in my KCL equations, but where is it? Because I get the wrong answers.

Best Answer

Jan, I won't bother with much (because you can pound out equations as well as the next one) except to say that I wrote the following:

var('r1 r2 r3 r4 r5 r6 io1 io2 vm1 vp2 vm2 vo2 vn i4')
e1 = Eq( 0/r1 + 0/r2 + 0/r3, vp2/r1 + vp2/r2 + vo2/r3 + i4 )   # opa1 (-) input is virtual ground
e2 = Eq( vp2/r1 + vp2/r2, io1 )                                # opa1 output is op2 (+) input
e3 = Eq( vm2/r4 + vm2/r5, vo2/r5 )                             # opa2 (-) nodal
e4 = Eq( vo2/r3 + vo2/r5 + vo2/r6, io2 + vm2/r5 + vn/r6 )      # opa2 output nodal
e5 = Eq( vm2, vp2 )                                            # opa2 (-) = opa2 (+)
ans = solve( [e1, e2, e3, e4, e5], [vm2, vp2, vo2, io1, io2] )

So, for example, I find the impedance seen by \$V_n\$ as:

$$R=\frac{V_n}{I_4}+\frac{R_4+R_5}{\left[\frac{R_4}{R_1\mid\mid R_2}+\frac{R_4+R_5}{R_3}\right]}$$

KCL just works so far as I can tell. I guess I'm not sure what the question might be?