Electrical engineering

Op-amps and filters

The ideal op-amp, inverting and non-inverting gain, RC low- and high-pass, cutoff frequency.

Basics

The ideal op-amp

The ideal model has infinite differential gain, zero input current, and an output that does what feedback asks. With negative feedback the two inputs are driven equal (virtual short). Real chips have finite gain, offset, slew rate, and bandwidth. They cannot exceed the supply rails and want decoupling capacitors. Oscillation appears when layout and load eat phase margin.

Inverting and non-inverting

Non-inverting gain is 1 + R_f/R_g with high input impedance. Inverting gain is −R_f/R_in; the virtual ground makes the input impedance R_in. A voltage follower is a gain-1 buffer. Gain is a resistor ratio, so precision tracks resistor tolerance and the chip’s open-loop gain. High bias-current chips want matched resistances on the two inputs.

RC filters

Series R and shunt C make a low-pass: high frequencies see C as a short. Swap them for a high-pass. A first-order filter slopes 20 dB per decade and the phase heads toward 90° around cutoff. Cascade for higher order, but without buffers each stage loads the next. Audio, sensors, and anti-aliasing share this skeleton.

Active-filter sketch

RC around an op-amp can make second-order shapes and gain without an inductor. Sallen–Key is the textbook example. High Q peaks near cutoff and sits closer to oscillation. Digital filters run after sampling, so an analogue low-pass in front fights aliasing. Temperature drift of parts will move a precise audio crossover.

Formulas

Non-inverting gain

G = 1 + R_f / R_g

V_out/V_in. Same polarity.

Symbols

  • R_f feedback resistor
  • R_g ground-leg resistor

Inverting gain

G = − R_f / R_in

Virtual ground. Input impedance ≈ R_in.

Symbols

  • R_in input resistor

RC cutoff frequency

f_c = 1 / (2π R C)

Where |H| is 1/√2 (first order).

Symbols

  • R resistance
  • C capacitance

First-order low-pass |H|

|H(jω)| = 1 / √(1 + (ω/ω_c)²)

ω_c = 2π f_c. High-pass flips ω/ω_c.

Symbols

  • ω_c cutoff angular frequency

Key table

Virtual short only with negative feedback and large open-loop gain; not a comparator
Slope per decade 1st order ±20 dB/dec, 2nd ±40 dB/dec
Unity-gain bandwidth many chips keep a roughly constant gain–bandwidth product

In this field