TExcelTAD
Home › Fourier Analysis & Signals › Complex Exponentials and Phasors

Complex Exponentials and Phasors

The complex exponential eiωte^{i\omega t} is the hero of this course. It is a point moving around the unit circle at angular speed ω\omega; its real part is cos⁡ωt\cos\omega t and its imaginary part sin⁡ωt\sin\omega t. Linear time-invariant systems can only scale and delay such a signal, never change its frequency, which is why every signal is decomposed into them.

A rotating point

eiωt=cos⁡(ωt)+isin⁡(ωt),ω=2πfe^{i\omega t} = \cos(\omega t) + i \sin(\omega t), \qquad \omega = 2\pi f

Negative frequencies are not mysterious: e−iωte^{-i\omega t} rotates clockwise. A real cosine is the average of a counter-clockwise and a clockwise rotation, cos⁡ωt=12(eiωt+e−iωt)\cos\omega t = \frac{1}{2}(e^{i\omega t} + e^{-i\omega t}).

python · try it yourself
import numpy as np

f = 2                                      # 2 rotations per second
t = np.arange(0, 0.5, 0.0625)              # 8 instants over one rotation
z = np.exp(2j * np.pi * f * t)
print("angle (deg):", (np.round(np.degrees(np.angle(z)), 1) + 0.0).tolist())
print("real part:  ", (np.round(z.real, 3) + 0.0).tolist())
print("|z|:        ", np.round(np.abs(z), 12).tolist())
avg = (np.exp(2j * np.pi * f * t) + np.exp(-2j * np.pi * f * t)) / 2
print("average of +f and -f is real:", np.allclose(avg.imag, 0), np.allclose(avg.real, np.cos(2 * np.pi * f * t)))
angle (deg): [0.0, 45.0, 90.0, 135.0, 180.0, -135.0, -90.0, -45.0]
real part:   [1.0, 0.707, 0.0, -0.707, -1.0, -0.707, 0.0, 0.707]
|z|:         [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0]
average of +f and -f is real: True True

Phasors

A sinusoid Acos⁡(ωt+φ)A\cos(\omega t + \varphi) is the real part of AeiφeiωtA e^{i\varphi} e^{i\omega t}. The fixed complex number AeiφA e^{i\varphi}, the phasor, records amplitude and phase; the factor eiωte^{i\omega t} is common to every signal of that frequency. Adding sinusoids of the same frequency becomes adding complex numbers:

python · try it yourself
import numpy as np

# 3 cos(wt + 0.5) + 4 cos(wt - 1.2): add the phasors
p = 3 * np.exp(0.5j) + 4 * np.exp(-1.2j)
A, phi = abs(p), np.angle(p)
print(f"sum = {A:.4f} cos(wt + ({phi:.4f}))")

w = 2 * np.pi * 5
t = np.linspace(0, 1, 1000)
lhs = 3 * np.cos(w * t + 0.5) + 4 * np.cos(w * t - 1.2)
rhs = A * np.cos(w * t + phi)
print("max difference:", float(np.max(np.abs(lhs - rhs))) < 1e-12)
sum = 4.6806 cos(wt + (-0.5112))
max difference: True

Why exponentials are special

Delaying eiωte^{i\omega t} by t0t_0 multiplies it by a constant: eiω(t−t0)=e−iωt0eiωte^{i\omega(t - t_0)} = e^{-i\omega t_0} e^{i\omega t}. Differentiating multiplies it by iωi\omega. So for any system built from delays, sums and derivatives, the output to eiωte^{i\omega t} is H(ω)eiωtH(\omega) e^{i\omega t}: the same exponential, scaled by a complex number. In linear-algebra terms, complex exponentials are eigenfunctions of every LTI system (Frequency Response).

python · try it yourself
import numpy as np

w = 3.0
t = np.linspace(0, 2, 2001)
x = np.exp(1j * w * t)
dx = np.gradient(x, t)                     # numerical derivative
ratio = dx[100:-100] / x[100:-100]         # skip the less accurate edges
print("derivative / signal is constant:", np.allclose(ratio, ratio[0], atol=1e-4))
print("that constant is about", complex(round(ratio[0].real, 4) + 0.0, round(ratio[0].imag, 4)), " i*w =", 1j * w)
derivative / signal is constant: True
that constant is about 3j  i*w = 3j

In software

  • AC circuit analysis uses phasors: impedances RR, iωLi\omega L, 1/(iωC)1/(i\omega C) combine like resistors.
  • Software radios (SDR) deliver complex "I/Q" samples: the real and imaginary parts of the signal's phasor relative to the tuned frequency.

Exercises

Exercise 1: Phasor of a sine

What is the phasor of 5sin⁡(ωt)5\sin(\omega t)?

Answer

5e−iπ/2=−5i5 e^{-i\pi/2} = -5i.

Solution

sin⁡(ωt)=cos⁡(ωt−π/2)\sin(\omega t) = \cos(\omega t - \pi/2), so A=5A = 5 and φ=−π/2\varphi = -\pi/2, giving 5e−iπ/2=−5i5e^{-i\pi/2} = -5i.

Exercise 2: Delay as a phase

A 50 Hz signal is delayed by 5 ms. By how many radians does its phase change?

Answer

−π/2-\pi/2 (a quarter period).

Solution

The phase factor is e−iωt0e^{-i\omega t_0} with ωt0=2π⋅50⋅0.005=π/2\omega t_0 = 2\pi \cdot 50 \cdot 0.005 = \pi/2. 5 ms is a quarter of the 20 ms period.

Exercise 3: Adding three phasors (code)

Write cos⁡(ωt)+cos⁡(ωt+2π/3)+cos⁡(ωt+4π/3)\cos(\omega t) + \cos(\omega t + 2\pi/3) + \cos(\omega t + 4\pi/3) as a single sinusoid.

Answer

It is identically 0.

Solution
python · try it yourself
import numpy as np
p = sum(np.exp(1j * k * 2 * np.pi / 3) for k in range(3))
print(round(abs(p), 12))
0.0

The three phasors are the cube roots of unity and cancel. This is why a balanced three-phase power system needs no return current in the neutral wire.

Test yourself

The real part of eiωte^{i\omega t} is…

  1. sin⁡ωt\sin\omega t
  2. cos⁡ωt\cos\omega t
  3. eωte^{\omega t}
  4. 1

Delaying eiωte^{i\omega t} by t0t_0 multiplies it by…

  1. t0t_0
  2. e−iωt0e^{-i\omega t_0}
  3. eωt0e^{\omega t_0}
  4. iωi\omega

Why are complex exponentials eigenfunctions of LTI systems?

  1. they are real
  2. delays and derivatives only multiply them by a constant
  3. they have finite energy
  4. they are periodic with period 1