Sub topic 6
Phase response of a first-order filter
The previous chapters found the magnitude of a first-order filter's transfer function. This chapter covers its angle. You will derive the phase of RC and RL filters, see why every first-order filter has the same phase shape, and turn phase into a time delay you can check on an oscilloscope.
This chapter assumes you can work with the transfer function H(jω) of an RC low-pass filter and know its cutoff frequency fc = 1/(2πRC). It also assumes you can take the magnitude and angle of a complex number.
What phase response means
A sinusoidal input passes through a linear circuit and comes out as a sinusoid of the same frequency. Only its amplitude and its timing change. The magnitude |H(jω)| gives the amplitude ratio. The angle ∠H(jω) gives the timing shift:
- A negative angle means the output lags the input, so it peaks later.
- A positive angle means the output leads the input, so it peaks earlier.
The phase response is the plot of ∠H(jω) against frequency. By convention, Bode plots use a logarithmic frequency axis and degrees on the phase axis.
Deriving the phase of the RC low-pass filter
With the output across the capacitor, the voltage divider gives:
H(jω) = (1/jωC) / (R + 1/jωC) = 1 / (1 + jωRC) = 1 / (1 + j f/fc)
The angle of a quotient is the angle of the numerator minus the angle of the denominator. The numerator is 1, which has angle 0. The denominator 1 + j(f/fc) has a real part of 1 and an imaginary part of f/fc, so its angle is arctan(f/fc). Therefore:
φ_LP(f) = −arctan(f/fc)
Three values describe the whole curve:
- At f ≪ fc, φ ≈ 0°. The capacitor looks like an open circuit and the output follows the input.
- At f = fc, φ = −45° exactly, because arctan(1) = 45°.
- At f ≫ fc, φ approaches −90°. The capacitor dominates, and its voltage lags its current by 90°.
The phase never goes beyond −90°. This is a property of a single reactive element, so a first-order filter cannot shift further.
Why the phase behaves this way
The series circuit carries one current I. The resistor voltage VR = IR is in phase with I. The capacitor voltage VC lags I by 90°. These two phasors are perpendicular, and they add to the input voltage. The triangle they form explains the numbers:
- The angle between Vin and VC is arctan(R/XC), where XC = 1/(ωC).
- Since R/XC = ωRC = f/fc, VC lags V_in by arctan(f/fc).
- At fc, R = X_C, so the triangle is isosceles and the angle is 45°.
The same triangle shows that |VR|² + |VC|² = |V_in|², so the two outputs are always 90° apart.
The high-pass filter and the lead
With the output across the resistor in the RC circuit:
H_HP(jω) = jωRC / (1 + jωRC) = j(f/fc) / (1 + j f/fc)
The numerator now contributes +90°, because it is purely imaginary and positive. The denominator contributes −arctan(f/fc) as before:
φ_HP(f) = 90° − arctan(f/fc) = arctan(fc/f)
The high-pass phase leads, and it runs from +90° at low frequency to 0° at high frequency. At fc it is +45°. Since HHP = jωRC · HLP, the two phases differ by exactly 90° at every frequency.
RL filters follow the same curves
For an RL circuit with the output across the resistor, H = R/(R + jωL) = 1/(1 + jωL/R). This is a low-pass filter with fc = R/(2πL). With the output across the inductor, H = jωL/(R + jωL), which is a high-pass filter with the same fc.
Replace RC with L/R in the algebra and the formulas for φLP and φHP do not change. The following table gives the phase of each filter at the three reference points:
| Filter (output across) | f = fc/10 | f = fc | f = 10 fc |
|---|---|---|---|
| RC low-pass (C) or RL low-pass (R) | −5.71° | −45° | −84.29° |
| RC high-pass (R) or RL high-pass (L) | +84.29° | +45° | +5.71° |
The table covers all four circuits. The phase depends only on f/fc, not on which components set fc.
From phase to time delay
Phase is an angle of one cycle, and a cycle lasts 1/f seconds. A phase lag of φ degrees is therefore a phase delay in time:
t_d = |φ| / (360 · f)
For the RC filter with R = 1.59 kΩ and C = 100 nF, fc is about 1001 Hz and RC = 159 µs. The phase delay at three frequencies is:
| Frequency | Phase | Phase delay |
|---|---|---|
| fc/10 (about 100 Hz) | −5.71° | about 158 µs |
| fc (about 1 kHz) | −45° | about 125 µs |
| 10 fc (about 10 kHz) | −84.29° | about 23 µs |
At low frequency the delay approaches RC, the time constant. This is the link between the frequency domain and the time domain that a later chapter develops. Above fc the delay shrinks, even though the phase angle grows.
A related quantity is the group delay, τg = −dφ/dω. For the first-order low-pass filter, τg = RC / (1 + (f/fc)²). It equals RC at DC and falls to RC/2 at fc. Group delay describes how the envelope of a signal made of several nearby frequencies is delayed. Phase delay describes how a single sinusoid is delayed.
Computing phase with a script
Use np.angle on the complex transfer function rather than coding arctan by hand. It handles the signs and quadrants for you, and it also works for the loaded and cascaded circuits in later chapters.
import numpy as np
R = 1.59e3 # ohms
C = 100e-9 # farads
fc = 1 / (2 * np.pi * R * C)
f = fc * np.array([0.01, 0.1, 1, 10, 100])
w = 2 * np.pi * f
H_lp = 1 / (1 + 1j * w * R * C) # output across C
H_hp = (1j * w * R * C) / (1 + 1j * w * R * C) # output across R
phi_lp = np.degrees(np.angle(H_lp))
phi_hp = np.degrees(np.angle(H_hp))
delay_us = -phi_lp / (360 * f) * 1e6 # phase delay of the low-pass
print(f"fc = {fc:.1f} Hz")
print(" f (Hz) LP (deg) HP (deg) LP delay (us)")
for fi, a, b, d in zip(f, phi_lp, phi_hp, delay_us):
print(f"{fi:9.1f} {a:9.2f} {b:9.2f} {d:13.1f}")
# The HP phase leads the LP phase by exactly 90 degrees at every frequency.
assert np.allclose(phi_hp - phi_lp, 90)The printed LP column should start near −0.57° and pass through −45.00° in the third row. The assertion passes silently. To measure phase in a simulation, run the .ac sweep from the netlist in the Verification chapter and plot ph(v(out)).
Measuring phase on an oscilloscope
Display the input and output together and find the time offset Δt between corresponding zero crossings. Then:
φ = −360 · f · Δt, with a minus sign when the output crosses later.
At 1 kHz, an RC low-pass filter with fc = 1 kHz shows Δt = 125 µs, which gives −45°. Measure the offset on the steeper zero crossings, not the peaks, because the zero crossings are sharper.
Common errors
- Using f where ω is required. The argument of arctan is ωRC, which equals f/fc. Writing arctan(fRC) is wrong by a factor of 2π.
- Mixing radians and degrees.
np.angleandnp.arctanreturn radians. Convert withnp.degreesbefore comparing with a table. - Assigning −45° to the high-pass filter at fc. Its phase at fc is +45°, because the output leads.
- Forgetting that a source resistance or a load changes fc. The −45° point moves to the new cutoff frequency, not to the one computed from the unloaded values. The chapter on loading covers this.
- Mistaking phase delay for step-response delay. See the callout above.
Exercise
An RC low-pass filter uses R = 10 kΩ and C = 10 nF. Find fc, then the phase and the phase delay at 5 kHz.
Show answer
fc = 1/(2π · 10 kΩ · 10 nF) = 1/(2π · 1×10⁻⁴ s) ≈ 1591.5 Hz. The ratio f/fc = 5000/1591.5 ≈ 3.142, so φ = −arctan(3.142) ≈ −72.3°. The phase delay is 72.3/(360 · 5000) ≈ 40 µs.
Exercise
An oscilloscope shows the output of a first-order low-pass filter lagging the input by 50 µs when the input frequency is 2 kHz. What is the phase, and what is fc?
Show answer
φ = −360 · 2000 · 50×10⁻⁶ = −36°. Since φ = −arctan(f/fc), f/fc = tan 36° ≈ 0.7265, so fc = 2000/0.7265 ≈ 2753 Hz.