Sub topic 6
A Step-by-Step Method for Analyzing Op Amp Circuits
This chapter assumes you know Ohm's law, KCL, node-voltage analysis of resistor circuits, and the ideal op amp assumptions from earlier chapters. Those assumptions are infinite open-loop gain, infinite input resistance, and zero output resistance. You will turn them into a repeatable procedure. It works on circuits you have not seen before, not only on the standard textbook amplifiers.
The method at a glance
The procedure has six steps. Each one has a reason, and skipping a step is the usual source of wrong answers.
- Confirm that the circuit has negative feedback.
- Write the two ideal constraints at the input terminals.
- Label the node voltages, and treat the output node as a source.
- Write KCL at the nodes connected to the inputs.
- Solve for the output voltage.
- Check that the answer is physically possible.
Step 1: confirm negative feedback
The virtual short only exists when feedback is negative. Look for a path from the output back to the inverting (−) input through resistors, capacitors, or other passive parts. Then run a quick test. Suppose the inverting input voltage rises a little above the non-inverting input. The output then moves down, because the difference v⁺ − v⁻ became negative. That downward movement travels through the feedback path and pulls the inverting input back down. The correction opposes the disturbance, so the feedback is negative.
If the only feedback path goes to the non-inverting input, the correction reinforces the disturbance. The circuit has positive feedback and the output is driven to a rail. Do not use the virtual short there. A circuit with feedback to both inputs is negative overall only if the path to the inverting input is the stronger one. Most introductory circuits avoid this case.
Step 2: write the ideal constraints
With negative feedback and an ideal op amp, write two statements:
- Input currents are zero: i⁺ = 0 and i⁻ = 0.
- The inputs are at the same voltage: v⁺ = v⁻.
The second statement does not mean the two terminals are wired together. No current flows between them, so only the voltage is shared. This is why it is called a virtual short.
If the non-inverting input is connected to a divider or a source, find v⁺ first. Because i⁺ = 0, the divider is not loaded by the op amp, and ordinary divider formulas apply. Then set v⁻ equal to that value.
Step 3: label nodes and treat the output as a source
Give a voltage name to every node that is not fixed by a source or ground. The op amp output behaves like an ideal voltage source whose value is unknown. It can supply whatever current the circuit needs.
For this reason, do not write KCL at the output node. The op amp output current is an unknown that the model does not constrain, so that equation only tells you the output current. It adds an unknown and no information about the voltages. Write KCL at the input nodes instead. The input currents are known to be zero there, so the equations contain only resistor currents.
Step 4 and 5: write KCL and solve
At the inverting input node, the currents through the resistors connected to it must sum to zero, because no current enters the op amp terminal. Substitute v⁻ = v⁺ and solve for Vout.
Worked example: a non-inverting amplifier with a divider at the input
The input source is 2 V. A divider of R1 = 10 kΩ (source to the + input) and R2 = 10 kΩ (+ input to ground) feeds the non-inverting input. Feedback is Rf = 30 kΩ from the output to the − input, and Rg = 10 kΩ goes from the − input to ground.
- Feedback goes to the − input, so it is negative.
- Because i⁺ = 0, the divider is unloaded: v⁺ = 2 V × 10k/(10k + 10k) = 1 V. Therefore v⁻ = 1 V.
- The unknown is Vout.
- KCL at the − node: the current leaving through Rg to ground is (1 − 0)/10 kΩ = 0.1 mA. It must come from Rf, so (Vout − 1)/30 kΩ = 0.1 mA.
- Vout − 1 = 3, so Vout = 4 V.
The result matches Vout = v⁺(1 + Rf/Rg) = 1 V × 4. The overall gain from the 2 V source is 2.
Check with a numerical solver
You can confirm the result by replacing the ideal op amp with a voltage-controlled voltage source of gain A and solving the node equations. This uses the same approach as the SPICE example earlier in the tutorial, written in Python.
import numpy as np
def solve_noninverting(vin, r1, r2, rf, rg, gain):
"""Node voltages [v_plus, v_minus, v_out] with the op amp modeled
as v_out = gain * (v_plus - v_minus)."""
g1, g2, gf, gg = 1 / r1, 1 / r2, 1 / rf, 1 / rg
a = np.array([
[g1 + g2, 0.0, 0.0], # KCL at the + node
[0.0, gg + gf, -gf], # KCL at the - node
[-gain, gain, 1.0], # op amp: vout - A*(v+ - v-) = 0
])
b = np.array([vin * g1, 0.0, 0.0])
return np.linalg.solve(a, b)
for gain in (1e5, 1e9):
vp, vm, vo = solve_noninverting(2.0, 10e3, 10e3, 30e3, 10e3, gain)
print(f"A={gain:.0e}: v+={vp:.5f} v-={vm:.5f} vout={vo:.5f}")The output is:
A=1e+05: v+=1.00000 v-=0.99998 vout=3.99984
A=1e+09: v+=1.00000 v-=1.00000 vout=4.00000As A grows, v⁻ approaches v⁺ and Vout approaches 4 V. The hand result is the limit of the real model as A goes to infinity.
Step 6: check the answer
An ideal analysis can return a number that the real circuit cannot produce. Run two checks.
Supply rails. The output cannot exceed the supply voltages. Suppose a gain of −10 amplifier (Rin = 1 kΩ, Rf = 10 kΩ) has a 2 V input and ±15 V supplies. The ideal result is −20 V, which is impossible. The output sits near −15 V (somewhat inside the rail on a real device), and the virtual short no longer holds. With Vout = −15 V, the inverting node is at (2 × 10 + (−15) × 1)/11 ≈ 0.45 V, while v⁺ = 0 V. The input difference is about −0.45 V, which is large, and it is consistent with an output stuck at the negative rail. Once you detect this, redo the calculation with Vout fixed at the rail, as above.
Output current. The op amp can only supply a limited current, often a few tens of milliamps. Compute the current through the feedback resistor plus any load, and compare it with the device rating.
Common errors
| Error | Why it is wrong | Fix |
|---|---|---|
| Writing KCL at the output node | The output current is unconstrained, so the equation adds an unknown | Write KCL only at input nodes |
| Assuming current flows into an input | The ideal input resistance is infinite, so i⁺ = i⁻ = 0 | Drop the input terminals from KCL |
| Applying v⁺ = v⁻ with no feedback or positive feedback | The virtual short needs negative feedback | Check step 1 first |
| Swapping the + and − inputs | The sign of the gain flips and feedback may become positive | Trace the feedback path to the − terminal |
| Ignoring saturation | The linear model only holds between the rails | Always run step 6 |
| Loading the + input divider with the op amp | The ideal input draws no current | Use the unloaded divider formula |
When the method needs more care
Several inputs or a feedback network with more than one node call for more KCL equations, but the procedure does not change. Write one equation per unknown node, treating the output as a source and the virtual short as a known relation. Superposition also works, because the ideal op amp circuit is linear as long as the output stays within the rails. Set all sources but one to zero, find the output, and add the results.
Exercise
A non-inverting input is held at 3 V by a source. The op amp has negative feedback through Rf = 20 kΩ from the output to the − input, and Rg = 5 kΩ from the − input to ground. Find Vout using the six steps, and state whether ±12 V supplies are enough.
Show answer
Feedback goes to the − input, so it is negative. Then v⁻ = v⁺ = 3 V. The current through Rg to ground is 3 V / 5 kΩ = 0.6 mA, and it comes through Rf: (Vout − 3)/20 kΩ = 0.6 mA, so Vout − 3 = 12 and Vout = 15 V. This equals 3 × (1 + 20/5) = 15 V. It exceeds +12 V, so the output saturates near the positive rail and the virtual short fails. With 12 V supplies, the real output stays near 12 V or slightly less.
Exercise
In an inverting amplifier with Rin = 2 kΩ, Rf = 8 kΩ, and the + input grounded, the source is Vin = −0.5 V. Using KCL at the − node, find Vout and the current delivered into Rf.
Show answer
v⁻ = v⁺ = 0 V. The current from the source into the − node is (−0.5 − 0)/2 kΩ = −0.25 mA. That current continues through Rf, so (0 − Vout)/8 kΩ = −0.25 mA, which gives Vout = +2 V. The gain is −Rf/Rin = −4, and −4 × (−0.5 V) = +2 V. The current through Rf flows from the output side toward the − node as −0.25 mA in the direction from the − node to the output. Equivalently, 0.25 mA flows from the op amp output through Rf into the − node.