Sub topic 6
Phase difference: leading and lagging
This chapter assumes you can write a sinusoid as v(t) = Vm sin(ωt + φ) and know how period, frequency, and angular frequency relate. It also assumes you are comfortable with degrees and radians. Here we compare two sinusoids of the same frequency and decide which one is ahead.
What phase difference means
Take two signals with the same angular frequency ω:
- v₁(t) = V₁ sin(ωt + φ₁)
- v₂(t) = V₂ sin(ωt + φ₂)
The phase difference is θ = φ₁ − φ₂. It does not depend on time, because the ωt terms cancel. The two waveforms keep the same offset on every cycle.
Phase difference only makes sense when the frequencies are equal. If the frequencies differ, the offset between the waves changes continuously.
Leading and lagging
Signal 1 leads signal 2 when θ = φ₁ − φ₂ is positive. Its peaks and zero crossings occur earlier in time. Signal 1 lags signal 2 when θ is negative. Its features occur later.
A positive phase angle shifts the waveform to the left on a time axis. So the signal with the larger phase angle reaches each point of its cycle first.
A worked example
Let v(t) = 10 sin(ωt + 20°) and i(t) = 4 sin(ωt − 40°).
- Subtract the phase angles: θ = 20° − (−40°) = 60°.
- The result is positive, so the voltage leads the current by 60°.
- Equivalently, the current lags the voltage by 60°.
The amplitudes 10 and 4 play no part in the comparison. Only the phase angles matter.
Converting a phase difference to time
A phase difference of θ degrees is a fraction θ/360 of one period T = 1/f. The time offset is therefore
Δt = (θ / 360) · (1 / f)
At 60 Hz, a 60° difference is (60/360)(1/60) ≈ 2.78 ms.
import math
def phase_to_time(theta_deg, f):
"""Time offset in seconds for a phase difference in degrees."""
return theta_deg / 360.0 / f
def describe(phi1_deg, phi2_deg, f):
theta = phi1_deg - phi2_deg
# Wrap into the range (-180, 180]
theta = (theta + 180.0) % 360.0 - 180.0
if theta == -180.0:
theta = 180.0
if theta > 0:
word = "signal 1 leads signal 2"
elif theta < 0:
word = "signal 1 lags signal 2"
else:
word = "signals are in phase"
dt = abs(phase_to_time(theta, f))
return f"{word} by {abs(theta):.1f} deg ({dt * 1000:.2f} ms at {f:g} Hz)"
print(describe(20, -40, 60))The function wraps the angle into the range −180° to 180°. A difference of 300° is the same as −60°, so it is reported as a 60° lag.
Sine versus cosine
Because cos(x) = sin(x + 90°), a cosine leads a sine of the same argument by 90°. Before comparing, put both signals in the same form, either both sine or both cosine. The following identities help:
| Rewrite | Result |
|---|---|
| cos(ωt) | sin(ωt + 90°) |
| −sin(ωt) | sin(ωt + 180°) |
| −cos(ωt) | sin(ωt − 90°) |
A negative amplitude is the usual source of mistakes. Write 5 sin(ωt − 30°) with a positive amplitude if you want to read the phase directly. For example, −5 sin(ωt + 30°) = 5 sin(ωt + 210°), which is the same as 5 sin(ωt − 150°).
Special cases
- In phase: θ = 0°. Peaks and zero crossings coincide.
- Quadrature: θ = ±90°. One signal peaks when the other crosses zero.
- Antiphase: θ = ±180°. One signal is the negative of the other.
In a resistor, voltage and current are in phase. In an ideal inductor the current lags the voltage by 90°. In an ideal capacitor the current leads the voltage by 90°. Later chapters derive these results.
Common errors
- Subtracting in the wrong order. Decide which signal you are describing, then compute φ(that signal) − φ(other).
- Reading "lag" from a plot by looking at which peak is further left. The peak further left is the leading one.
- Mixing degrees and radians in one expression, such as ωt in radians plus φ in degrees.
- Comparing signals of different frequencies.
Exercise
v(t) = 170 sin(2π·50·t + 45°) and i(t) = 8 cos(2π·50·t − 30°). Which one leads, by how many degrees, and by how many milliseconds?
Show answer
Convert the current to sine form: i(t) = 8 sin(2π·50·t − 30° + 90°) = 8 sin(2π·50·t + 60°). The phase difference is φᵢ − φᵥ = 60° − 45° = 15°, so the current leads the voltage by 15°. The time offset is (15/360)(1/50) = 0.833 ms.
Exercise
A signal is 5 sin(ωt) and another is −5 sin(ωt). What is the phase difference between them?
Show answer
Write −5 sin(ωt) as 5 sin(ωt + 180°). The signals differ by 180°, so they are in antiphase. Which one is said to lead is ambiguous at 180°, since a lead of 180° and a lag of 180° are the same shift.