The transfer function of a notch filter is a mathematical equation, typically expressed in the Laplace domain as H(s), that defines the exact ratio of output voltage to input voltage across all frequencies, specifically characterized by a sharp drop (zero) at a target center frequency. In a physical circuit, this function dictates the attenuation depth (how much of the signal is killed), the bandwidth (how wide the rejected 'notch' is), and the phase shift introduced to the surrounding frequencies. Hobbyists and students commonly confuse a notch filter's sharp, narrow band-stop behavior with a broad low-pass filter, or they mistakenly assume the ideal mathematical model perfectly predicts the real-world response, ignoring the hard limits imposed by op-amp gain-bandwidth product (GBW) and component tolerances.

The Core Math: Deriving the Transfer Function of a Notch Filter

To design a filter on the bench, you first need to understand the s-domain model. For a standard active notch (band-stop) filter, the transfer function H(s) is expressed as:

Standard Notch Transfer Function:
H(s) = (s2 + ω02) / [s2 + (ω0/Q)s + ω02]

Here is what those variables actually mean when you are selecting components:

  • s: The complex frequency variable (jω). When you want to see the filter's behavior at a specific AC frequency, you substitute s with j2πf.
  • ω0: The center (notch) frequency in radians per second. This is where the numerator becomes zero, theoretically driving the output to absolute zero volts.
  • Q (Quality Factor): This defines the sharpness of the notch. A high Q (e.g., Q > 10) creates a very narrow, surgical cut. A low Q creates a wide, shallow dip. In the denominator, the term (ω0/Q) represents the damping; less damping means a sharper notch.

When you evaluate this function at the center frequency (where s = jω0), the numerator becomes (-ω02 + ω02) = 0. This mathematical zero is the 'notch'. However, as we will see in the real-world section, physical components prevent this from ever being a perfect zero.

Worked Numeric Example: Designing a 60 Hz Hum Rejector

Let's design a discrete Twin-T active notch filter to eliminate 60 Hz AC mains hum from a sensitive audio preamplifier. We need to translate the transfer function into physical resistors and capacitors.

For a standard Twin-T network, the center frequency formula is f0 = 1 / (2πRC). Let's target exactly 60 Hz.

  1. Pick the Capacitor (C): Capacitors have fewer standard values than resistors, so we start here. Let's choose a high-quality film capacitor (avoid ceramics for audio due to piezoelectric noise and voltage coefficient). We pick 100 nF (0.1 μF).
  2. Calculate the Ideal Resistor (R): R = 1 / (2 × π × 60 × 100 × 10-9) = 26,525 Ω.
  3. Select the Real Resistor: You cannot buy a 26,525 Ω resistor off the shelf. Looking at the E96 (1% tolerance) series, the closest standard value is 26.7 kΩ.
  4. Recalculate Actual f0: Plugging 26.7 kΩ back into the formula yields an actual center frequency of 59.61 Hz.

At 1 kHz (well outside the notch), the transfer function magnitude approaches 1 (0 dB gain). But at our 59.61 Hz target, the ideal math says the output is 0V (-∞ dB). In a real SPICE simulation using 1% resistors and 5% film capacitors, the mismatch prevents perfect cancellation, yielding a real-world attenuation of roughly -40 dB instead of infinite rejection. That is still enough to reduce a 100 mV hum spike down to an inaudible 1 mV.

Where You Meet This in Practice

You will encounter the need to manipulate a notch filter transfer function in several specific hardware domains:

  • Biopotential Amplifiers (ECG/EEG): The human body acts as an antenna for 50/60 Hz mains noise. An active notch filter is placed right before the ADC to strip out this interference without destroying the low-frequency biological signals (which can be as low as 0.5 Hz).
  • Audio Engineering and PA Systems: Parametric EQs use state-variable notch filters to hunt down and eliminate acoustic feedback (microphone squeal) at specific resonant room frequencies, typically between 1 kHz and 4 kHz.
  • Motor Drive Signal Conditioning: When reading current shunt sensors on a BLDC motor, the PWM switching frequency (often 16 kHz to 20 kHz) creates massive noise. A high-Q notch filter tuned to the PWM frequency cleans the feedback signal for the microcontroller's PID loop.

Ideal vs. Real-World: What the Transfer Function Doesn't Tell You

The Laplace equation assumes perfect, infinite-gain operational amplifiers and flawless passive components. On the workbench, three parasitic realities will degrade your notch depth:

Watch your Op-Amp GBW: The Gain-Bandwidth Product of your op-amp must be at least 100 times higher than your notch frequency to maintain the required open-loop gain for deep attenuation. If you use an LM358 (GBW ≈ 1 MHz) for a 20 kHz notch filter, the op-amp runs out of gain, the Q-factor collapses, and your -40 dB notch degrades to a useless -12 dB dip. For audio-band notches, use an OPA1612 or TL072.

Component Tolerances and Drift: As shown in the 60 Hz example, a 1% mismatch in the Twin-T resistors limits your maximum attenuation to about -40 dB. If you use 5% carbon film resistors, your notch depth might shrink to -20 dB. Furthermore, temperature coefficients (tempco) mean a 50 ppm/°C resistor will shift your ω0 as the board heats up, causing the notch to 'miss' the target frequency.

Dielectric Absorption: Using cheap Y5V or X7R ceramic capacitors introduces dielectric absorption (memory effect), which smears the phase response and rounds out the sharp bottom of the notch. Always use C0G/NP0 ceramics or polypropylene film capacitors for precision filter networks.

Decision Path: Choosing Your Notch Filter Topology and IC

Building a discrete notch filter with 4 op-amps and 12 matched resistors is a great learning exercise, but a poor engineering choice for a production or reliable bench tool. Use this decision matrix to select the right approach.

If your application requires...Then choose this topology/IC...Why?
Ultra-low frequency (< 1 kHz) with high Q and no large capacitors LTC1062 (Clock-tuned switched-capacitor) Eliminates the need for massive, leaky electrolytic capacitors; frequency is set by a precise external clock.
Audio band (20 Hz - 20 kHz) with tunable frequency and Q Texas Instruments UAF42 (State-variable) Integrates laser-trimmed matched resistors and caps on-die. Solves the tolerance problem entirely.
High frequency / RF (> 100 kHz) SMPS noise rejection Passive LC or SAW Filter (e.g., TDK B39xxx series) Active op-amp filters run out of bandwidth and introduce their own noise floor at RF frequencies.

The Default Recommendation: For 90% of DIY, bench, and sensor-conditioning projects operating between 10 Hz and 100 kHz, the Texas Instruments UAF42 is the definitive pick. By integrating the state-variable topology and laser-trimming the internal components to 0.1% tolerance, it guarantees the deep notch depth that the ideal transfer function promises, saving you hours of hand-matching discrete 1% resistors.

Frequently Asked Questions

What is the difference between a notch filter and a band-stop filter?

Technically, a notch filter is a specific type of band-stop filter. 'Band-stop' is the broad category for any filter that rejects a range of frequencies. A 'notch' filter specifically implies a very high Q-factor (narrow bandwidth), designed to surgically remove a single specific frequency (like 60 Hz hum) while leaving the adjacent frequencies completely untouched.

Can I just use a digital notch filter in my ESP32 or microcontroller instead?

You can implement an IIR (Infinite Impulse Response) notch filter in software, which gives you perfect, drift-free component matching. However, you still need an analog anti-aliasing low-pass filter before your ADC to prevent high-frequency noise from folding back into your digital band. If the analog hum is so large that it saturates your ADC's input range before conversion, a digital filter cannot save you; you must use an analog hardware notch filter before the ADC.

Why does my simulated notch filter show -120 dB attenuation, but my breadboard only shows -25 dB?

SPICE simulators use ideal, perfectly matched components unless you explicitly add tolerance and parasitic models. On a breadboard, stray capacitance between the jumper wires (often 2pF to 5pF) and the 1% to 5% tolerance of your physical resistors unbalance the bridge network. To achieve deeper rejection on the bench, you must add a multi-turn trimmer potentiometer to the Q-enhancement feedback loop to manually null out the component mismatches.