Sub topic 8
The Non-Inverting Amplifier
This chapter derives the gain of the non-inverting amplifier from the two ideal constraints. It also checks the result against finite open-loop gain and output saturation. It assumes you know KCL, voltage dividers, and the two ideal-op-amp rules from the previous chapters: the virtual short (v+ = v−) and zero current into either input.
The circuit
The input signal goes directly to the non-inverting (+) terminal. A resistor Rf connects the output to the inverting (−) terminal. A second resistor Rg connects the inverting terminal to ground. Rf and Rg form a voltage divider that feeds a fraction of the output back to the − input. That connection is negative feedback.
Derivation with the ideal constraints
Follow the analysis procedure from the earlier chapter.
- Apply the virtual short. Negative feedback holds v− equal to v+. The + terminal is tied to Vin, so v− = Vin.
- Apply zero input current. No current enters the − terminal. All the current through Rg therefore also flows through Rf.
- Write KCL at the − node. The current through Rg to ground is Vin / Rg. The current through Rf from the output is (Vout − Vin) / Rf. These are equal:
(Vout − Vin) / Rf = Vin / Rg
- Solve for Vout.
Vout = Vin (1 + Rf / Rg)
So the closed-loop gain is
G = Vout / Vin = 1 + Rf / Rg
The same answer follows from the divider view. The feedback network gives v− = Vout · Rg / (Rf + Rg). Setting v− = Vin and solving for Vout gives the same gain.
Properties that follow from the result
- The gain is positive and at least 1. Rf and Rg are positive, so 1 + Rf / Rg ≥ 1. The output is in phase with the input. A gain below 1 is impossible with this circuit.
- The input resistance is ideally infinite. Vin connects only to the + terminal, which draws no current. A source with a large internal resistance therefore causes no voltage drop. The gain from the source's open-circuit voltage is unchanged.
- The output resistance is ideally zero. The output is a controlled voltage source. Changing the load does not change Vout, as long as the op amp stays within its output limits.
- Compare with the inverting amplifier. The inverting circuit has an input resistance of about Rin, because the input resistor connects to a virtual-ground node. The non-inverting circuit does not have this loading.
| Property | Inverting amplifier | Non-inverting amplifier |
|---|---|---|
| Ideal gain | −Rf / Rin | 1 + Rf / Rg |
| Sign of gain | Negative | Positive |
| Smallest magnitude of gain | Any positive value | 1 |
| Ideal input resistance | Rin | Infinite |
| Inverting-node voltage | 0 V (virtual ground) | Vin |
Special cases
Two limits of the formula give the voltage follower, which a later chapter covers in detail.
- If Rg → ∞ (open circuit), then Rf / Rg → 0 and the gain is 1.
- If Rf = 0 (a wire), the gain is also 1.
With both changes, the circuit becomes a unity-gain buffer with high input resistance and low output resistance.
Worked example
Design a gain of 10 with Rg = 1 kΩ.
- Set 1 + Rf / Rg = 10, so Rf / Rg = 9.
- Rf = 9 × 1 kΩ = 9 kΩ.
For Vin = 0.5 V, Vout = 0.5 × 10 = 5 V. Check by KCL: v− = 0.5 V, so the current in Rg is 0.5 V / 1 kΩ = 0.5 mA. The same current flows through Rf, which drops 0.5 mA × 9 kΩ = 4.5 V. Then Vout = 0.5 + 4.5 = 5 V. ✓.
Output saturation
The derivation assumes the op amp is in its linear region. The output cannot exceed the supply rails. With ±15 V supplies, the output is limited to about ±15 V. Real devices stop somewhat short of the rails, and rail-to-rail types stop closer. When Vin · G would exceed the limit, the output clips and the virtual short no longer holds. The v+ and v− terminals then differ.
def noninverting_output(vin, rf, rg, v_neg=-15.0, v_pos=15.0):
"""Output of an ideal non-inverting amplifier with rail clipping."""
linear = vin * (1 + rf / rg)
return max(v_neg, min(v_pos, linear))
for vin in (0.5, 1.0, 2.0, -2.0):
print(vin, noninverting_output(vin, 9e3, 1e3))
# 0.5 5.0
# 1.0 10.0
# 2.0 15.0
# -2.0 -15.0Gain 10 with a 2 V input would ask for 20 V, so the model returns the 15 V rail instead. When you analyze a circuit, always check that the computed Vout lies inside the supply range. If it does not, the linear result is invalid.
Effect of finite open-loop gain
A real op amp has a large but finite open-loop gain A. Let β = Rg / (Rf + Rg) be the fraction of the output fed back to the − input. Then:
Vout = A (Vin − β Vout)
Solving for the closed-loop gain:
Vout / Vin = A / (1 + Aβ)
Since 1/β = 1 + Rf / Rg is the ideal gain, this can be written as
Gactual = Gideal / (1 + G_ideal / A)
The fractional error is about G_ideal / A. For a gain of 10 and A = 100,000, the error is about 0.01%, so the actual gain is 9.999. The error grows with the ideal gain. A gain of 1000 with the same A gives an error near 1%. The code below uses the same formula.
def noninverting_gain(rf, rg, a=None):
"""Closed-loop gain Vout/Vin of the non-inverting amplifier."""
ideal = 1 + rf / rg
if a is None:
return ideal
return ideal / (1 + ideal / a)
print(noninverting_gain(9e3, 1e3)) # 10.0
print(noninverting_gain(9e3, 1e3, a=1e5)) # about 9.999
print(noninverting_gain(999e3, 1e3, a=1e5)) # about 990.1Checking the result in SPICE
Model the ideal op amp as a voltage-controlled voltage source with a very large gain. The source E1 sets V(out) = 1e6 × (V(in) − V(inn)).
Non-inverting amplifier with an ideal op amp modeled as a VCVS
Vin in 0 DC 1
Rg inn 0 1k
Rf out inn 9k
E1 out 0 in inn 1e6
.op
.endThe operating point reports V(out) of about 9.99990 V, matching the finite-gain formula for A = 10⁶. Replacing the 1e6 with a smaller value, such as 1e3, shows the gain error becoming visible.
Common errors
- Using the inverting formula. The gain is 1 + Rf / Rg, not Rf / Rg. The extra 1 is the contribution of Vin passing straight through.
- Placing the divider at the wrong terminal. Feedback to the + input gives positive feedback. The circuit then latches at a rail and the virtual short does not apply.
- Assuming Vin is across Rg only when Vin is a source with series resistance. The + terminal draws no current, so a series source resistance does not drop any voltage at the input. The gain is unchanged. In real devices, bias current flowing through that resistance creates a small offset, which a later chapter covers.
- Forgetting the supply limits. Check every computed output against the rails before trusting it.
Summary of the procedure
- Set v− = v+ = Vin.
- Write KCL at the − node with zero input current.
- Solve for Vout and confirm that it lies within the supply range.
Exercise
A non-inverting amplifier has Rf = 47 kΩ and Rg = 10 kΩ. Find the ideal gain, and find Vout for Vin = 0.5 V. Then find the Rf needed to get a gain of 5 with Rg = 2.2 kΩ.
Show answer
The gain is 1 + 47 / 10 = 5.7. Vout = 0.5 × 5.7 = 2.85 V. For a gain of 5, Rf / Rg = 4, so Rf = 4 × 2.2 kΩ = 8.8 kΩ.
Exercise
A non-inverting amplifier with Rf = 9 kΩ and Rg = 1 kΩ uses an op amp with open-loop gain A = 1000 and ±12 V supplies. Find the actual gain and the percentage error, then say what happens for Vin = 1.5 V.
Show answer
The ideal gain is 10. The actual gain is 10 / (1 + 10 / 1000) = 10 / 1.01 ≈ 9.90. The error is about 1%. For Vin = 1.5 V the linear output would be about 14.85 V, which exceeds the 12 V rail, so the output saturates near +12 V and the linear analysis does not apply.