Lesson 14 of 15

RC High-Pass Filter

The RC High-Pass Filter

Swapping R and C swaps the behavior — now C is in series and R shunts to ground:

Vin ---[C]---+--- Vout
             |
            [R]
             |
            GND

At low frequencies: C has high impedance → blocks signal → Vout ≈ 0

At high frequencies: C has low impedance → passes signal → Vout ≈ Vin

Voltage Gain (Magnitude)

|H(f)| = (2πfRC) / sqrt(1 + (2πfRC)²)

Or writing ωRC = 2πfRC:

|H| = ωRC / sqrt(1 + (ωRC)²)

Complementary to Low-Pass

Notice: |H_low|² + |H_high|² = 1

The low-pass and high-pass filters are complementary — they share the same cutoff frequency f_c = 1/(2πRC) and together account for all signal power.

| f | |H_high| | Meaning | |---|---------|---------| | 0 | 0.0000 | DC fully blocked | | f_c | 0.7071 | −3 dB (same as low-pass cutoff) | | 10·f_c | 0.9950 | mostly passed | | ∞ | 1.0000 | high freq passes fully |

Applications

  • Coupling capacitors: block DC bias between amplifier stages
  • Bass cut in audio equalizers
  • Differentiator (at low frequencies, output ∝ dVin/dt)
  • AC coupling oscilloscope inputs

Your Task

Implement double rc_highpass(double f, double r, double c) that returns the voltage gain magnitude |H(f)|.

TCC compiler loading...
Loading...
Click "Run" to execute your code.