Sub topic 12
Integrator Gain and Phase versus Frequency
This chapter assumes you know the ideal inverting integrator from the previous chapter, where Vout = -(1/RC) ∫Vin dt + Vout(0). It also assumes you can handle complex impedance, meaning a capacitor's impedance is 1/(jωC). Here you look at the same circuit in the frequency domain. A sine wave in gives a sine wave out, and the two quantities that change are its amplitude and its phase.
From time domain to frequency domain
The ideal integrator has a resistor R from the input to the inverting node and a capacitor C from that node to the output. The virtual short holds the inverting node at 0 V. Replace R and C with impedances:
- The input branch has impedance Z_in = R.
- The feedback branch has impedance Z_f = 1/(jωC).
The inverting amplifier gain is -Zf / Zin, so:
H(jω) = -(1/(jωC)) / R = -1 / (jωRC)
Because 1/j = -j, this simplifies to:
H(jω) = j / (ωRC)
This one expression gives both the magnitude and the phase of the response.
Magnitude: a -20 dB/decade line
The magnitude is |H| = 1 / (ωRC) = 1 / (2πfRC).
Two facts follow from this formula:
- Gain is inversely proportional to frequency. Multiplying the frequency by 10 divides the gain by 10, which is a change of -20 dB. That is the -20 dB/decade slope.
- The gain equals 1 (0 dB) at ω₀ = 1/RC, which is f₀ = 1/(2πRC). This is the unity-gain frequency. It is not a "corner" in the usual sense, because the ideal integrator has no flat region.
For R = 10 kΩ and C = 100 nF, RC = 1 ms, so f₀ = 1/(2π × 0.001) ≈ 159.2 Hz.
| Frequency | Gain (V/V) | Gain (dB) |
|---|---|---|
| 10 Hz | 15.92 | +24.04 |
| 100 Hz | 1.592 | +4.04 |
| 159.2 Hz | 1.000 | 0.00 |
| 1 kHz | 0.1592 | -15.96 |
| 10 kHz | 0.01592 | -35.96 |
Every row is 20 dB below the row a decade earlier. The exception is the 159.2 Hz row, which is the unity-gain point and sits between the 100 Hz and 1 kHz rows.
Because the gain keeps rising as frequency falls, the ideal integrator has infinite gain at DC. A later chapter shows why that causes trouble in practice.
Phase: -90° relative to the inverting gain
Look at the phase of H(jω) = j/(ωRC). The factor j is a 90° rotation, so the phase is +90° for all frequencies. You will see this stated in two ways, and they describe the same circuit:
- Absolute phase: the output leads the input by 90° (equivalently, lags by 270°).
- Relative to the inverting gain: an inverting amplifier has a gain of -1, which is 180°. The integrator adds a further -90° to that, which gives 180° - 90° = +90°.
The second view is useful because it matches how you derived the circuit. It starts as an inverting amplifier and the capacitor contributes an extra -90° of lag. The phase is the same at every frequency, as long as the op amp stays ideal.
You can confirm this in the time domain. For Vin = A sin(ωt):
Vout = -(1/RC) ∫ A sin(ωt) dt = (A / (ωRC)) cos(ωt) = (A / (ωRC)) sin(ωt + 90°)
The amplitude is A/(ωRC), matching the magnitude formula, and the output is a cosine, which is a sine shifted by +90°.
Checking the numbers with code
Compute the response numerically so you can compare it with your hand calculation.
import cmath
import math
R = 10e3 # ohms
C = 100e-9 # farads, so RC = 1 ms
print(" f (Hz) gain (dB) phase (deg)")
for f in [10, 100, 159.155, 1000, 10000]:
s = 1j * 2 * math.pi * f
H = -1 / (s * R * C) # ideal inverting integrator
gain_db = 20 * math.log10(abs(H))
phase_deg = math.degrees(cmath.phase(H))
print(f"{f:9.3f} {gain_db:10.2f} {phase_deg:12.1f}")The gain column should match the table above, with about 0 dB at 159.155 Hz. The phase column should read +90.0 on every row.
You can also ask a SPICE simulator for the same result with an AC sweep. This netlist reuses the VCVS op amp model from the summing example.
* Ideal inverting integrator, AC sweep
Vin in 0 DC 0 AC 1
R1 in inv 10k
C1 inv out 100n
E1 out 0 0 inv 100k
.ac dec 10 1 100k
.endAt 159 Hz the plotted magnitude of V(out) should be near 1 V. The phase shown by the simulator will be close to +90° at mid frequencies, and the plot may show 270° lag depending on the plotting convention.
Reading the result: what the integrator does to a signal
The frequency response tells you how the circuit treats different parts of a signal:
- Low frequencies are boosted. Slow signals and DC components get the largest gain. This is why small offsets cause trouble.
- High frequencies are attenuated. Fast noise is reduced, so an integrator acts as a low-pass filter above f₀. Unlike a normal low-pass, it has no flat region below f₀.
- Square waves become triangles. A square wave is a sum of odd harmonics. Each harmonic is divided by its own frequency and shifted by 90°, and that rebuilds a triangle wave. The same idea explains why a constant input gives a linear ramp: a constant is the zero-frequency case.
Choosing R and C from a gain target
To pick component values, start from the gain you want at a chosen frequency.
Suppose you want a gain of 0.5 at 1 kHz. Then RC = 1/(2π × 1000 × 0.5) ≈ 318 µs. With C = 10 nF, R = 318 µs / 10 nF ≈ 31.8 kΩ. A standard 31.6 kΩ resistor is the closest 1% value, and it shifts the gain by under 1%.
Use a short script when you do this repeatedly.
import math
def rc_for_gain(gain, freq_hz):
"""Return RC (seconds) so |H| = gain at freq_hz."""
return 1 / (2 * math.pi * freq_hz * gain)
rc = rc_for_gain(0.5, 1000.0)
c = 10e-9
print(round(rc * 1e6, 1), "microseconds") # about 318.3
print(round(rc / c / 1e3, 1), "kilohms") # about 31.8Keep two limits in mind as you choose values:
- Very large R makes the circuit sensitive to the op amp's input bias current. Very small R loads the source.
- Capacitor leakage and dielectric absorption become visible in long integration times. Film capacitors (polyester or polypropylene) behave better than ceramic types with a high dielectric constant.
Common errors
- Mixing up Hz and rad/s. The unity-gain frequency is f₀ = 1/(2πRC) in Hz but ω₀ = 1/RC in rad/s. Forgetting the 2π shifts every answer by a factor of about 6.3.
- Sign and phase confusion. The phase is +90° absolute, or -90° relative to the inverting gain. Always say which reference you are using.
- Expecting a flat passband. The ideal integrator has no flat region. A gain of "RC" does not exist, since the gain depends on frequency at every point.
- Ignoring the op amp's limits. The ideal response assumes an infinite gain-bandwidth product. A real op amp stops following the -20 dB/decade line at high frequency and at very low frequency.
- Applying the frequency result to large steps. The phasor result holds for small sine signals in a linear circuit. A large input can still drive the output into its supply limits, and then the output clips and the formula no longer applies.
Summary of the key relationships
| Quantity | Formula | Example (R = 10 kΩ, C = 100 nF) |
|---|---|---|
| Transfer function | H(jω) = -1 / (jωRC) | -1 / (j · 0.001 · ω) |
| Magnitude | 1 / (ωRC) | 1.592 at 100 Hz |
| Slope | -20 dB/decade | 20 dB lower each decade |
| Unity-gain frequency | f₀ = 1 / (2πRC) | 159.2 Hz |
| Phase | +90° absolute, -90° relative to the inverting gain | constant |
Exercise
An ideal inverting integrator uses R = 20 kΩ and C = 47 nF. (a) Find the unity-gain frequency f₀ in Hz. (b) Find the gain magnitude at 1.693 kHz, in V/V and in dB. (c) A 0.5 V peak sine wave at 1.693 kHz drives the input. State the peak output amplitude and its phase relative to the input.
Show answer
(a) RC = 20 000 × 47e-9 = 0.94 ms, so f₀ = 1/(2π × 0.00094) ≈ 169.3 Hz. (b) 1.693 kHz is ten times f₀, so the gain is 1/10 = 0.1 V/V, which is -20 dB. (c) The peak output is 0.5 × 0.1 = 0.05 V. The output leads the input by 90° (absolute phase +90°), which is -90° relative to the inverting gain of -1.