Sub topic 1
The ideal op amp model
Prerequisites
This chapter assumes you already know the following:
- Ohm's law and Kirchhoff's current and voltage laws (KCL and KVL).
- Voltage dividers and series/parallel resistance.
- Basic capacitor behavior, including i = C dv/dt.
- What an amplifier with gain is.
- Simple algebra, and the idea of an integral.
You do not need to know how the op amp is built inside. This chapter treats it as a black box with a few terminals and a few rules.
What an op amp is
An operational amplifier (op amp) is a high-gain voltage amplifier with two inputs and one output. It amplifies the voltage difference between its inputs. It is called "operational" because early versions were used to perform mathematical operations such as adding and integrating in analog computers. Those are the same operations this tutorial builds toward: summing, differencing, and integrating.
The terminals you need to know are:
- The non-inverting input, marked +. Its voltage is V+.
- The inverting input, marked −. Its voltage is V−.
- The output, with voltage Vout.
- Two power supply pins, for example +15 V and −15 V. Schematics often leave them out, but they set the limits of the output (see "Where the ideal model stops working").
The op amp's behavior is described by one equation:
Vout = A × (V+ − V−)
A is the open-loop gain, the gain of the op amp by itself with no feedback connected. For a general-purpose part, A is typically 100,000 (100 dB) or more at DC.
The ideal model
Real op amps are complicated. The ideal model replaces them with four assumptions. Each one removes a source of algebra so you can focus on the circuit around the op amp.
| Assumption | Ideal value | Real parts (typical) | Consequence for analysis |
|---|---|---|---|
| Open-loop gain A | Infinite | 10^5 to 10^6 at DC | V+ − V− must be essentially zero when the output is in range |
| Input resistance | Infinite | Megaohms to teraohms | No current flows into either input |
| Output resistance | Zero | A few ohms to tens of ohms | The output acts as a perfect voltage source, so load does not change Vout |
| Bandwidth | Infinite | Gain falls off above a few Hz to tens of Hz (open loop) | Gain does not depend on frequency |
Some lists also add zero input offset voltage, zero input bias current, and infinite slew rate. These are all "no imperfections" assumptions. This tutorial returns to some of them when the integrator needs a practical fix.
Two of these assumptions do almost all of the work in later chapters:
- Infinite gain. If A is infinite and Vout is a finite number, then (V+ − V−) = Vout / A = 0. The two inputs sit at the same voltage. This only holds when feedback keeps the output within its limits. The next two chapters develop that idea.
- Infinite input resistance. The input terminals draw zero current. Any current arriving at the inverting input through a resistor must leave through another resistor. KCL at that node then becomes a short equation.
A quick check of the gain assumption
The assumption is reasonable because real gains are huge. Suppose an output is 5 V and A = 100,000. Then the input difference is:
V+ − V− = Vout / A = 5 V / 100,000 = 50 µV
Fifty microvolts is negligible next to input signals of millivolts or volts. Setting it to zero introduces a small error, and the ideal model accepts that error.
Open loop versus closed loop
The ideal model by itself does not tell you the circuit's gain. It only gives you the rules (zero input current and, with feedback, equal input voltages). The circuit's behavior comes from how the external components connect the output back to an input.
- Open loop: no connection from the output to either input. Because A is enormous, a difference of even a few millivolts between the inputs drives the output to one of its limits. The op amp acts as a comparator, not a linear amplifier.
- Closed loop: a path, usually a resistor network, connects the output to the inverting input. This is negative feedback. The gain of the whole circuit then depends mostly on the resistor ratios, not on A.
This chapter only sets up the model. The next chapter explains why closed-loop operation produces the equal-input-voltage rule.
What the ideal rules let you do
With the ideal model, a circuit analysis follows a short routine. This routine is used in every later chapter.
- Confirm that the circuit has negative feedback (a path from Vout to the inverting input).
- Set V+ = V− (the virtual short, covered later).
- Set the current into each input terminal to zero.
- Write KCL at the inverting input node and solve for Vout.
You do not need to analyze the inside of the op amp. The following example shows how the rules reduce a circuit to one equation, using a preview of the inverting amplifier.
Worked preview
Take an op amp with its + input grounded. A source Vin connects through R1 to the − input, and a resistor Rf connects Vout back to the − input. Assume the feedback keeps the op amp in its linear range.
- V+ = 0 V because it is grounded.
- With the ideal rule, V− = V+ = 0 V.
- The current through R1 is I1 = (Vin − 0) / R1.
- No current enters the op amp input, so the same current flows through Rf: Vout = 0 − I1 × Rf.
Therefore:
Vout = −(Rf / R1) × Vin
For R1 = 10 kΩ, Rf = 20 kΩ, and Vin = 0.5 V, the output is −1 V. The circuit's gain is set by two resistor values. A, the op amp's own gain, never appears in the result. That independence is the reason op amp circuits are useful: resistors are stable and cheap, and the op amp's gain can vary by a factor of two between parts without changing the answer.
Checking the model with a simulation
You can see how close a real, finite-gain op amp comes to the ideal answer by modeling the op amp as a voltage-controlled voltage source (VCVS) in SPICE. The E1 element below produces out = 100000 × (0 − inv), which is a gain of 100 k with its + input at ground.
* Inverting amplifier with a finite-gain op amp model
Vin in 0 DC 0.5
R1 in inv 10k
Rf inv out 20k
E1 out 0 0 inv 100k
.op
.endThe operating point shows V(out) very close to −1 V. It is slightly smaller in magnitude than 1 V because the gain is finite. With the exact finite-gain algebra, the closed-loop gain is −(Rf/R1) / (1 + (1 + Rf/R1)/A). For these values it is −2 / (1 + 3/100000), which is about −1.99994. The ideal model is off by roughly 0.003%.
You can reproduce the same comparison in Python.
def inverting_gain_finite(r1, rf, a):
"""Closed-loop gain of an inverting amplifier with open-loop gain a."""
ideal = -rf / r1
return ideal / (1 + (1 + rf / r1) / a)
for a in (100, 1e3, 1e5, 1e7):
g = inverting_gain_finite(10e3, 20e3, a)
print(f"A = {a:>10.0f} gain = {g:.6f}")Gain approaches −2 as A grows. At A = 100, the error is about 3%. At A = 100,000 it is about 0.003%.
Where the ideal model stops working
The ideal model is an approximation. It fails in predictable ways, and recognizing them keeps you from trusting a result that cannot happen.
- Output limits. The output cannot go beyond the supply rails. A part powered from ±15 V might reach only ±13 V, and a rail-to-rail part gets within millivolts of the supply. If the equation says Vout = 20 V on a ±15 V supply, the real output sits near the rail, the op amp is saturated, and the equal-inputs rule no longer applies. The chapter "Output limits and saturation" covers this in detail.
- Finite bandwidth. Open-loop gain falls with frequency. The product of closed-loop gain and bandwidth is roughly constant, so a high-gain stage has less bandwidth.
- Input offset voltage and bias current. A real op amp behaves as if a small DC voltage (often microvolts to millivolts) sits in series with one input, and a small current (picoamps to microamps) flows into the inputs. These matter for the integrator, where a tiny DC error is accumulated over time.
- Finite slew rate. The output cannot change faster than a fixed number of volts per microsecond, which distorts large, fast signals.
- Missing feedback. If the feedback connects to the non-inverting input instead of the inverting input, the feedback is positive. The output then goes to a rail and the equal-inputs rule is false.
Summary of the model
- An op amp amplifies V+ − V− by a very large gain A.
- Ideal assumptions: infinite A, infinite input resistance, zero output resistance, infinite bandwidth.
- Consequences: no input current, and (with negative feedback and an output in range) V+ = V−.
- Closed-loop gain depends on external resistor ratios, not on A.
- The model breaks at the supply rails, at high frequency, and where DC errors accumulate.
Exercise
An op amp has open-loop gain A = 200,000 and its output is 8 V in a closed-loop circuit that is not saturated. What is the voltage difference V+ − V− at the inputs? Is treating it as zero reasonable?
Show answer
V+ − V− = Vout / A = 8 V / 200,000 = 40 µV. Treating it as zero is reasonable, because 40 µV is tiny compared with typical signal levels of millivolts or volts.
Exercise
In the inverting configuration from the worked preview, R1 = 4.7 kΩ and Rf = 47 kΩ, with Vin = 0.3 V. Assume an ideal op amp and ±12 V supplies. What is Vout? Is the op amp in its linear range?
Show answer
The gain is −Rf/R1 = −47k/4.7k = −10, so Vout = −10 × 0.3 V = −3 V. This is well inside ±12 V, so the op amp stays in its linear range and the ideal result is valid.
Exercise
Using the same circuit (gain −10, ±12 V supplies, ideal op amp otherwise), what happens if Vin is raised to 2 V? What does the ideal equation predict, and what actually happens?
Show answer
The ideal equation predicts Vout = −20 V. The supplies only allow about ±12 V (a little less in practice), so the output saturates near −12 V. In saturation V+ no longer equals V−, so the ideal rule does not hold.