Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Operational amplifiers

An operational amplifier (op amp) is a circuit component that takes a small difference in voltage between two inputs and amplifies it to produce a larger output voltage. Think of it like a volume knob for electrical signals; it makes weak signals stronger. Op amps are everywhere in electronics and are commonly used to combine signals together, filter out unwanted frequencies, or perform mathematical operations like adding, subtracting, multiplying signals, and finding rates of change.

The most important thing to understand about op amps is that they are not passive circuit elements like resistors, capacitors, and inductors. Instead, they are active components that require an external power supply to operate.

We will develop two models for op amps: a realistic model and an ideal model.

Here is what the two models look like in circuit diagrams.

Left: Realistic op amp model with five terminals. Right: Ideal op amp model with three terminals.

Figure 1:Left: Realistic op amp model with five terminals. Right: Ideal op amp model with three terminals.

We will now explore each model in more detail.

Realisitic op amp model

Here is an enlarged view of what’s inside a realistic op amp model.

Realistic op amp model showing internal components.

Figure 2:Realistic op amp model showing internal components.

Based on the circuit diagram, we can write the following constitutive equations:

R^v+v=Riniin(input circuit)vout=K(v+v)Routiout(output circuit)vSvoutvS+(power limits)\boxed{\begin{aligned} \vphantom{\hat R}v_+ - v_- &= R_\textsf{in} i_\textsf{in} && \textsf{(input circuit)} \\ v_\textsf{out} &= K(v_+ - v_-) - R_\textsf{out} i_\textsf{out} && \textsf{(output circuit)} \\ v_{S-} &\leq v_\textsf{out} \leq v_{S+} && \textsf{(power limits)} \end{aligned}}

Ideal op amp model

In the idealized op amp model, we make the following assumptions:

  1. The input resistance is infinite (RinR_\textsf{in} \to \infty), so no input current: iin=0i_\textsf{in} = 0.

  2. The output resistance is zero (Rout0R_\textsf{out} \to 0), so the output voltage is exactly equal to the voltage of the internal source: vout=K(v+v)v_\textsf{out} = K(v_+ - v_-).

  3. The amplification factor is infinite (KK \to \infty), so the voltage difference between the inputs is zero when there is a finite output voltage: v+=vv_+ = v_-.

  4. The output voltage can take any value (no power limits).

This leads us to the following constitutive equations for the ideal op amp:

R^iin=0(no input current)v+=v(equal input voltages)\boxed{\begin{aligned} \vphantom{\hat R}i_\textsf{in} &= 0 && \textsf{(no input current)} \\ v_+ &= v_- && \textsf{(equal input voltages)} \end{aligned}}

Interestingly, these equations do not explicitly involve the output voltage voutv_\textsf{out} or output current iouti_\textsf{out}. Instead, these quantities are determined by the rest of the circuit in which the op amp is embedded. This is because the ideal op amp is assumed to be able to provide whatever output voltage and current are necessary to satisfy the two equations above, regardless of the load connected to the output.

The ideal op amp model is only valid when the op amp is used within its normal operating range. We will see examples below where op amps do not behave ideally.

Example: comparator circuit

A comparator circuit is a simple application of an op amp that compares two input voltages and outputs a high or low voltage depending on which input is larger. Here is a circuit diagram of a comparator:

Comparator circuit using an op amp.

Figure 5:Comparator circuit using an op amp.

We will analyze this circuit using the realistic op amp model. The constitutive equations for the op amp are given in (1):

vin=v+v+v=Riniinvout=K(v+v)Routiout\begin{aligned} v_\textsf{in} &= v_+ \\ v_+ - v_- &= R_\textsf{in} i_\textsf{in} \\ v_\textsf{out} &= K(v_+ - v_-) - R_\textsf{out} i_\textsf{out} \end{aligned}

Assuming the output node is floating (no load connected), we have iout=0i_\textsf{out} = 0. The resistance RgR_g connects the inverting input (vv_-) to ground, so we have v=Rgiinv_- = R_g i_\textsf{in}. Our equations become:

vinRgiin=Riniinvout=K(vinRgiin)\begin{aligned} v_\textsf{in} - R_g i_\textsf{in} &= R_\textsf{in} i_\textsf{in} \\ v_\textsf{out} &= K(v_\textsf{in} - R_g i_\textsf{in}) \end{aligned}

Solving for iini_\textsf{in} in the first equation and substituting into the second equation gives:

iin=vinRin+Rgvout=K(vinRgvinRin+Rg)=K(RinRin+Rg)vinKvin\begin{aligned} i_\textsf{in} &= \frac{v_\textsf{in}}{R_\textsf{in} + R_g} \\ v_\textsf{out} &= K\left(v_\textsf{in} - R_g \frac{v_\textsf{in}}{R_\textsf{in} + R_g}\right) = K\left(\frac{R_\textsf{in}}{R_\textsf{in} + R_g}\right) v_\textsf{in} \approx K v_\textsf{in} \end{aligned}

In the last step, we used the fact that RinR_\textsf{in} is very large. Thus, the output voltage is approximately proportional to the input voltage, scaled by the large factor KK. Since the op amp can only output voltages within the range of its power supply, the output voltage will saturate at vS+v_{S+} when vin>0v_\textsf{in} > 0 and at vSv_{S-} when vin<0v_\textsf{in} < 0. Therefore, the output voltage behaves like a step function:

vout{vS+if vin>0vSif vin<0\boxed{v_\textsf{out} \approx \begin{cases} v_{S+} & \text{if } v_\textsf{in} > 0 \\ v_{S-} & \text{if } v_\textsf{in} < 0 \end{cases}}

Comparators are an example of an op amp circuit where saturation is an essential feature of the circuit’s operation. Therefore, analyzing such a circuit requires the use of the realistic op amp model.

If we had used the ideal model instead, we would get a contradiction: the equation v+=vv_+ = v_- implies that v=vinv_- = v_\textsf{in}, but the resistor RgR_g connecting vv_- to ground would force a current iin=vinRg0i_\textsf{in} = \frac{v_\textsf{in}}{R_g} \neq 0 to flow into the op amp input, violating the ideal op amp equation iin=0i_\textsf{in} = 0.

Example: voltage follower

Op amps are most commonly used in a configuration with feedback, where the output voltage is connected to one of the inputs. One common feedback configuration is the voltage follower, where the output voltage is connected directly to the inverting input. Here is a circuit diagram of a voltage follower:

Voltage follower circuit using an op amp with negative feedback (correct).

Figure 6:Voltage follower circuit using an op amp with negative feedback (correct).

We will analyze this circuit first using the realistic op amp model, and then using the ideal op amp model. Using the realistic model, we have the following equations:

vin=v+v+v=Riniinvout=K(v+v)Routiout\begin{aligned} v_\textsf{in} &= v_+ \\ v_+ - v_- &= R_\textsf{in} i_\textsf{in} \\ v_\textsf{out} &= K(v_+ - v_-) - R_\textsf{out} i_\textsf{out} \end{aligned}

Assuming voutv_\textsf{out} is floating, we have iout=iini_\textsf{out} = -i_\textsf{in}. The feedback connection implies that v=voutv_- = v_\textsf{out}. Substituting these into the equations and eliminating v+v_+ and vv_- gives:

vinvout=Riniinvout=K(vinvout)+Routiin\begin{aligned} v_\textsf{in} - v_\textsf{out} &= R_\textsf{in} i_\textsf{in} \\ v_\textsf{out} &= K(v_\textsf{in} - v_\textsf{out}) + R_\textsf{out} i_\textsf{in} \end{aligned}

Eliminating iini_\textsf{in} from these equations by solving the first equation for iini_\textsf{in} and substituting into the second equation and solving for voutv_\textsf{out} gives:

vout=K+RoutRin1+K+RoutRinvinvinv_\textsf{out} = \frac{K + \frac{R_\textsf{out}}{R_\textsf{in}}}{1 + K + \frac{R_\textsf{out}}{R_\textsf{in}}} v_\textsf{in} \approx v_\textsf{in}

The approximation in the last step comes from the fact that K1K \gg 1 and RinRoutR_\textsf{in} \gg R_\textsf{out}. Thus, the output voltage closely follows the input voltage, which is why this configuration is called a voltage follower.

If we had used the ideal op amp model instead, we would have:

vin=v+v+=vv=vout\begin{aligned} v_\textsf{in} &= v_+ \\ v_+ &= v_- \\ v_- &= v_\textsf{out} \end{aligned}

Combining these equations gives vout=vinv_\textsf{out} = v_\textsf{in} directly, confirming that the voltage follower works as expected in the ideal op amp model.

Example: incorrect voltage follower

The previous example used negative feedback, where the output voltage is connected to the inverting input. What happens if we connect the output voltage to the non-inverting input instead? Here is a circuit diagram of this incorrect voltage follower:

Voltage follower circuit using an op amp with positive feedback (incorrect).

Figure 7:Voltage follower circuit using an op amp with positive feedback (incorrect).

At first glance, one might think that this circuit would also function as a voltage follower. In fact, if we analyze it using the realistic op amp model and eliminate v+v_+ and vv_- as before, we get something similar to (10) but with a sign change:

vinvout=Riniinvout=K(voutvin)Routiin\begin{aligned} v_\textsf{in} - v_\textsf{out} &= R_\textsf{in} i_\textsf{in} \\ v_\textsf{out} &= K(v_\textsf{out} - v_\textsf{in}) - R_\textsf{out} i_\textsf{in} \end{aligned}

Eliminating iini_\textsf{in} as before, we get:

vout=KRoutRinK1RoutRinvinvinv_\textsf{out} = \frac{K - \frac{R_\textsf{out}}{R_\textsf{in}}}{K-1 - \frac{R_\textsf{out}}{R_\textsf{in}}} v_\textsf{in} \approx v_\textsf{in}

Had we used the ideal op amp model instead, we would have obtained the same equations as in (11) and come to the same conclusion that vout=vinv_\textsf{out} = v_\textsf{in}.

However, this analysis is misleading! The problem with this circuit is that it uses positive feedback, where the output voltage is connected to the non-inverting input. This configuration is inherently unstable. We can see this by considering small perturbations around the operating point.

Why are op amps useful?

Looking at the voltage follower, one might think: “Why not just connect the input voltage directly to the output? What’s the point of using an op amp?” The op amp effectively isolates the source from the load, allowing the voltage to be transferred without loss.

To see why this works, suppose we have an ideal voltage source that provides 10 V10 \text{ V} but we would like to power a load ZLZ_L that requires 5 V5 \text{ V}. We can obtain the desired voltage by building a voltage divider with two identical resistors. Here is the circuit diagram:

Left: Voltage divider circuit. Right: Voltage divider circuit with buffer (voltage follower).

Figure 8:Left: Voltage divider circuit. Right: Voltage divider circuit with buffer (voltage follower).

In Figure 8 (left), vA=5 Vv_A = 5 \text{ V} before we connect the load. But once the load is connected, vAv_A changes. In fact, the circuit is now a voltage divider with RR on the top and RR in parallel with ZLZ_L on the bottom. The voltage at point AA is given by:

vA=10 V(RZL)R+(RZL)=10 VRZLR+ZLR+RZLR+ZL=10 VZLR+2ZL\begin{aligned} v_A &= 10 \text{ V} \cdot \frac{(R \parallel Z_L)}{R + (R \parallel Z_L)} \\ &= 10 \text{ V} \cdot \frac{\frac{R Z_L}{R + Z_L}}{R + \frac{R Z_L}{R + Z_L}} \\ &= 10 \text{ V} \cdot \frac{Z_L}{R + 2Z_L} \end{aligned}

So the smaller the load impedance ZLZ_L, the more current is drawn from the voltage divider, and the more vAv_A drops.

If instead we add a voltage follower (also called a buffer) between the voltage divider and the load, as shown in Figure 8 (right), then the voltage at point AA remains at 5 V5 \text{ V} even after connecting the load. This is because no current can enter the op amp through the input terminals. Therefore, the voltage divider remains unaffected by the load, and vAv_A stays at 5 V5 \text{ V}. Even if the load impedance is very small, it will draw its current from the op amp’s voltage source, not from the voltage divider. Thus, the voltage at point AA does not change; the load always sees 5 V5 \text{ V}. It’s called a buffer because it buffers (isolates) the load from the source.


Test your knowledge

Solution to Exercise 1 #

In the buffered circuit the op amp is in negative feedback, so it adjusts voutv_\textsf{out} to drive the input error to (approximately) zero, making v+vv_+\approx v_- while remaining in its linear range; in the comparator there is no negative feedback, so even a tiny input difference drives the output into saturation, and the ideal “v+=vv_+=v_-” condition no longer applies.

Solution to Exercise 2 #

The load current is supplied by the op amp’s output stage, which draws power from the supply pins (vS+v_{S+} and vSv_{S-}), not from the input terminals or the voltage divider.