Renewables

# Using complex numbers to simplify things(!)

Why using complex numbers when dealing with electrical circuit analysis can be useful.

Dates: 2018-07-23

Back when studying for my bachelor in physics, I remember faintly connecting wires to voltmeters and making sure that an experiment could run without overheating the wires. But that’s a long time ago. So as I’m getting into the field of renewable energy, I started reading this wonderful book called “Electric Power Systems - a conceptual introduction” (as recommended by a colleague at work). When my dad saw that I was reading up on the complex notation used in electrical engineering, he asked me whether I had ever seen the derivation that allows for these complex numbers. When I replied no, he got all giddy looking for a piece of paper to write down Euler’s formula1.

### What does Euler’s formula say?

If j is the imaginary unit and x a real number, the exponential function says:

$e^{jx} = \cos x + j \sin(x)$

(in electrical engineering the imaginary unit is typically called j to not confuse it with current, i)

### Ohm’s law for impedance

An electric circuit really always consists of just tree types of elements in addition to a power supply: resistors, capacitors and inductors. In (super) short, resistors dissipate electrical power as heat whereas capacitors and inductors store that energy. Furthermore, capacitors resist changes in voltage, while inductors resist changes in current.

If a circuit contains only a resistor of resistance R, we can use Ohm’s law to calculate the voltage drop V across each resistor given the current I:

$V = RI$

A similar formula can be created for the impedance which contains not only the resistance but also the reactance from capacitors and/or inductors. The trick to do so is to switch to complex numbers!

### Complex description of AC circuits

In AC circuits, the voltage alternates as a function of time and can be roughly represented as a cosine (or sine) wave function of frequency $\omega$ (1). Typically, the current will have the same frequency but perhaps offset by a phase shift $\phi$. Thus, we can write the time-dependent voltages (v(t)) and currents (i(t)) as:

$v(t)=V\cdot \cos (\omega t)$ (1)
$i(t)=I\cdot \cos (\omega t + \phi)$ (2)

where V and I are the real amplitudes. Imagine that we defined a complex voltage, $\mathbf{V}$
such that the real part of $\mathbf{V}$ would give the same cosine function:

$Re(\mathbf{v}(t))=V\cdot \cos (\omega t)$

And likewise for $\mathbf{i}(t)$:

$Re(\mathbf{i}(t))=I\cdot \cos (\omega t + \phi)$

This could be done by defining $\mathbf{i}(t)$ and $\mathbf{i}(t)$ as:

$\mathbf{v}(t) = V\cdot e^{j0}e^{j\omega t} = \mathbf{V}\cdot e^{j\omega t}$ (3)
$\mathbf{i}(t) = I\cdot e^{j\phi}e^{j\omega t} = \mathbf{I}\cdot e^{j\omega t}$ (4)

where I have also gone ahead and defined the following two complex amplitudes:

$\mathbf{V}=Ve^{j0}$
$\mathbf{I}=Ie^{j\phi}$.

### The case for inductors

The fact that inductors resist changes in current, can be written in differential form as:

$v(t)=L\cdot \frac{di(t)}{dt}$

where L is the inductance measured in henry. Using eqs. 1 and 2 above, this can be written as:

$V\cdot \cos(\omega t) = L\cdot \frac{d(I\cdot \cos(\omega t +\phi))}{dt}$
$\Rightarrow V\cdot \cos(\omega t) = -\omega LI\cdot \sin(\omega t +\phi)$ (5)

By now using Eulers formula, we can see that both sides of this equation can be written as the real parts of a complex number:

$Re(e^{j\omega t}) = Re(\cos (\omega t) + j \sin (\omega t)) = \cos (\omega t)$

and likewise,

$Re(j\cdot e^{j(\omega t + \phi)}) = Re(j\cdot\cos (\omega t + \phi) + j\cdot j \sin (\omega t + \phi)) = -\sin (\omega t+\phi)$

since $j\cdot j = -1$.

Now comes the fun part! We can choose to write eq. 5 with complex numbers:

$V \cdot Re(e^{j\omega t}) = \omega LI \cdot Re(j\cdot e^{j(\omega t + \phi)})$
$\Rightarrow Ve^{j\omega t} = j\omega LI e^{j(\omega t + \phi)}$

Here we can use exponential rules to extract the time-dependent factor on the right side and add a phase angle factor on the left side, such that we recognize the complex expressions for voltage and current above (eqs. 3 and 4):

$V\cdot e^{j0}e^{j\omega t} = j\omega LI\cdot e^{j\phi}e^{\omega t}$ (6)

By now inserting the expressions for complex voltage and current (eqs. 3 and 4), this equation simplifies to:

$\mathbf{v}(t)=j\omega L\cdot\mathbf{i}(t)$

Why is this smart? We can take out the time component on both sides of eq. 6, ending up with:

$\mathbf{V}=j\omega L\cdot\mathbf{I}$

That way one does not need to worry about the ever-changing voltage and current in an a.c. circuit but simply work with the time-independent complex amplitudes. This is an exact analogue of Ohm’s law where $j\omega L$ plays the role of (real) resistance, and we call it complex impedance, Z.

1. My dad is an electronics engineer, but now works as high school teacher.