# Solving for v_out in a non-ideal difference op amp I'm having trouble figuring out how to set up the KCL equations for this op amp. Everything I've tried seems to lead to a dead end. I've tried setting up three KCL equations at nodes v_n(-), v_p(+), and V_out, and using just node -v_d and v_out. Anyone have any ideas?

This is what I've tried using $-v_d$ as a node: $\frac{-v_d - v_2}{R} + \frac{-v_d - v_{out}}{R}+\frac{-v_d}{R_i}=0$ and $\frac{v_d-v_1}{R}+\frac{v_d}{R}+\frac{v_d}{R_i} = 0$ and $\frac{V_{out}+v_d}{R}+\frac{V_{out}-Av_d}{R_o} = 0$ but this seems to be trivial as the first and second equation reduce to something that doesn't involve other parts of the circuit.

• Show us your equations, and we'll point out where you've gone wrong. – Scott Seidman Dec 21 '16 at 13:43
• @ScottSeidman Edited to include what I've done. – Oliver G Dec 21 '16 at 13:56
• $v_d$ is not ground referenced. This makes things tough. I suggest representing this without that variable. $v_d$ is then simply the current through $R_i$ times $R_i$ – Scott Seidman Dec 21 '16 at 14:01
• .. then $v_-$ is just $v_+$ plus the voltage across $R_i$ – Scott Seidman Dec 21 '16 at 14:03
• @ScottSeidman So you're saying: $\frac{v_{-} - v_2}{R} + \frac{v_{-} - v_{out}}{R}+\frac{v_{-}-v_{+}}{R_i}=0$ and $\frac{v_{+}-v_1}{R}+\frac{v_{+}}{R}+\frac{v_{+}-v_{-}}{R_i} = 0$ and $\frac{V_{out}-v_{-}}{R}+\frac{v_{out}-A(v_{+}-v_{-})}{R_o} = 0$, where $v_d = v_{+} - v_{-}$? – Oliver G Dec 21 '16 at 14:16

Non-inverting input: $$\frac{\text{Vp}-\text{V1}}{R}+\frac{\text{Vp}}{R}+\frac{\text{Vp}-\text{Vn}}{\text{Ri}}=0$$ Inverting input: $$\frac{\text{Vn}-\text{V2}}{R}+\frac{\text{Vn}-\text{Vout}}{R}+\frac{\text{Vn}-\text{Vp}}{\text{Ri}}=0$$ And the output: $$\frac{\text{Vout}-A (\text{Vp}-\text{Vn})}{\text{Ro}}+\frac{\text{Vout}-\text{Vn}}{R}+\frac{\text{Vout}}{\text{RL}}=0$$ Using a computer algebra program to solve this system yields $$\text{Vout} = \frac{\text{RL} (2 A R \text{Ri} (\text{V1}-\text{V2})+\text{Ro} (R (\text{V1}+\text{V2})+2 \text{Ri} \text{V2}))}{R (2 \text{Ri} ((A+2) \text{RL}+2 \text{Ro})+3 \text{RL} \text{Ro})+4 R^2 (\text{RL}+\text{Ro})+2 \text{Ri} \text{RL} \text{Ro}}$$
This reduces to Vout = $V1-V2$ for $Ro = 0$ and $Ri = \infty$