Last time I left you with some puzzles. One was to use the laws of electrical circuits to work out what this one does:
If we do this puzzle, and keep our eyes open, we’ll see an analogy between electrical circuits and classical mechanics! And this is the first of a huge set of analogies. The same math shows up in many different subjects, whenever we study complex systems made of interacting parts. So, it should become part of any general theory of networks.
This simple circuit is very famous: it’s called a series RLC circuit, because it has a resistor of resistance an inductor of inductance and a capacitor of capacitance all hooked up ‘in series’, meaning one after another. But understand this circuit, it’s good to start with an even simpler one, where we leave out the voltage source:
This has three edges, so reading from top to bottom there are 3 voltages and 3 currents one for each edge. The white and black dots are called ‘nodes’, and the white ones are called ‘terminals’: current can flow in or out of those.
The voltages and currents obey a bunch of equations:
• Kirchhoff’s current law says the current flowing into each node that’s not a terminal equals the current flowing out:
• Kirchhoff’s voltage law says there are potentials , one for each node, such that:
In this particular problem, Kirchhoff’s voltage law doesn’t say much, since we can always find potentials obeying this, given the voltages. But in other problems it can be important. And even here it suggests that the sum will be important; this is the ‘total voltage across the circuit’.
Next, we get one equation for each circuit element:
• The law for a resistor says:
The law for a inductor says:
The law for a capacitor says:
These are all our equations. What should we do with them? Since it makes sense to call all these currents simply and solve for each voltage in terms of this. Here’s what we get:
So, if we know the current flowing through the circuit we can work out the voltage across each circuit element!
Well, not quite: in the case of the capacitor we only know it up to a constant, since there’s a constant of integration. This may seem like a minor objection, but it’s worth taking seriously. The point is that the charge on the capacitor’s plate is proportional to the voltage across the capacitor:
When electrons move on or off the plate, this charge changes, and we get a current:
So, we can work out the time derivative of from the current , but to work out itself we need the charge
Treat these as definitions if you like, but they’re physical facts too! And they let us rewrite our trio of equations:
in terms of the charge, as follows:
Then if we add these three equations, we get
So, if we define the total voltage by
And this is great!
Why? Because this equation is famous! If you’re a mathematician, you know it as the most general second-order linear ordinary differential equation with constant coefficients. But if you’re a physicist, you know it as the damped driven oscillator.
The analogy between electronics and mechanics
Here’s an example of a damped driven oscillator:
We’ve got an object hanging from a spring with some friction, and an external force pulling it down. Here the external force is gravity, so it’s constant in time, but we can imagine fancier situations where it’s not. So in a general damped driven oscillator:
• the object has mass (and the spring is massless),
• the spring constant is (this says how strong the spring force is),
• the damping coefficient is (this says how much friction there is),
• the external force is (in general a function of time).
Then Newton’s law says
And apart from the use of different letters, this is exactly like the equation for our circuit! Remember, that was
So, we get a wonderful analogy relating electronics and mechanics! It goes like this:
|inverse capacitance:||spring constant:|
If you understand mechanics, you can use this to get intuition about electronics… or vice versa. I’m more comfortable with mechanics, so when I see this circuit:
I imagine a current of electrons whizzing along, ‘forced’ by the voltage across the circuit, getting slowed by the ‘friction’ of the resistor, wanting to continue their motion thanks to the inertia or ‘mass’ of the inductor, and getting stuck on the plate of the capacitor, where their mutual repulsion pushes back against the flow of current—just like a spring fights back when you pull on it! This lets me know how the circuit will behave: I can use my mechanical intuition.
The only mildly annoying thing is that the inverse of the capacitance is like the spring constant But this makes perfect sense. A capacitor is like a spring: you ‘pull’ on it with voltage and it ‘stretches’ by building up electric charge on its plate. If its capacitance is high, it’s like a easily stretchable spring. But this means the corresponding spring constant is low.
Besides letting us transfer intuition and techniques, the other great thing about analogies is that they suggest ways of extending themselves. For example, we’ve seen that current is the time derivative of charge. But if we hadn’t, we could still have guessed it, because current is like velocity, which is the time derivative of something important.
Similarly, force is analogous to voltage. But force is the time derivative of momentum! We don’t have momentum on our chart. Our chart is also missing the thing whose time derivative is voltage. This thing is called flux linkage, and sometimes denotes So we should add this, and momentum, to our chart:
|inverse capacitance:||spring constant:|
But before I get carried away talking about analogies, let’s try to solve the equation for our circuit:
This instantly tells us the voltage as a function of time if we know the charge as a function of time. So, ‘solving’ it means figuring out if we know You may not care about —it’s the charge of the electrons stuck on the capacitor—but you should certainly care about the current and figuring out will get you that.
Besides, we’ll learn something good from solving this equation.
We could solve it using either the Laplace transform or the Fourier transform. They’re very similar. For some reason electrical engineers prefer the Laplace transform—does anyone know why? But I think the Fourier transform is conceptually preferable, slightly, so I’ll use that.
The idea is to write any function of time as a linear combination of oscillating functions with different frequencies More precisely, we write our function as an integral
Here the function is called the Fourier transform of , and it’s given by
There is a lot one could say about this, but all I need right now is that differentiating a function has the effect of multiplying its Fourier transform by To see this, we simply take the Fourier transform of :
where in the second step we integrate by parts. So,
The Fourier transform is linear, too, so we can start with our differential equation:
and take the Fourier transform of each term, getting
We can now solve for the charge in a completely painless way:
Well, we actually solved for in terms of But if we’re good at taking Fourier transforms, this is good enough. And it has a deep inner meaning.
To see its inner meaning, note that the Fourier transform of an oscillating function is a delta function at the frequency This says that this oscillating function is purely of frequency like a laser beam of one pure color, or a sound of one pure pitch.
Actually there’s a little fudge factor due to how I defined the Fourier transform: if
But it’s no big deal. (You can define your Fourier transform so the doesn’t show up here, but it’s bound to show up somewhere.)
Also, you may wonder how the complex numbers got into the game. What would it mean to say the voltage is The answer is: don’t worry, everything in sight is linear, so we can take the real or imaginary part of any equation and get one that makes physical sense.
Anyway, what does our relation
mean? It means that if we put an oscillating voltage of frequency across our circuit, like this:
then we’ll get an oscillating charge at the same frequency, like this:
To see this, just use the fact that the Fourier transform of is essentially a delta function at and juggle the equations appropriately!
But the magnitude and phase of this oscillating charge depends on the function
For example, will be big when is near a pole of this function! We can use this to study the resonant frequency of our circuit.
The same idea works for many more complicated circuits, and other things too. The function up there is an example of a transfer function: it describes the response of a linear, time-invariant system to an input of a given frequency. Here the ‘input’ is the voltage and the ‘response’ is the charge.
Taking this idea to its logical conclusion, we can see inductors and capacitors as being resistors with a frequency-dependent, complex-valued resistance! This generalized resistance is called ‘impedance. Let’s see how it works.
Suppose we have an electrical circuit. Consider any edge of this circuit:
• If our edge is labelled by a resistor of resistance :
Taking Fourier transforms, we get
so nothing interesting here: our resistor acts like a resistor of resistance no matter what the frequency of the voltage and current are!
• If our edge is labelled by an inductor of inductance :
Taking Fourier transforms, we get
This is interesting: our inductor acts like a resistor of resistance when the frequency of the current and voltage is So, we say the ‘impedance’ of the inductor is
• If our edge is labelled by a capacitor of capacitance :
Taking Fourier transforms, we get
So, our capacitor acts like a resistor of resistance when the frequency of the current and voltage is We say the ‘impedance’ of the capacitor is
It doesn’t make sense to talk about the impedance of a voltage source or current source, since these circuit elements don’t give a linear relation between voltage and current. But whenever an element is linear and its properties don’t change with time, the Fourier transformed voltage will be some function of frequency times the Fourier transformed current. And in this case, we call that function the impedance of the element. The symbol for impedance is so we have
The big picture
In case you’re getting lost in the details, here are the big lessons for today:
• There’s a detailed analogy between electronics and mechanics, which we’ll later extend to many other systems.
• The study of linear time-independent elements can be reduced to the study of resistors if we generalize resistance to impedance by letting it be a complex-valued function instead of a real number.
One thing we’re doing is preparing for a general study of linear time-independent open systems. We’ll use linear algebra, but the field—the number system in our linear algebra—will consist of complex-valued functions, rather than real numbers.
Let’s not forget our original problem:
This is closely related to the problem we just solved. All the equations we derived still hold! But if you do the math, or use some intuition, you’ll see the voltage source ensures that the voltage we’ve been calling is a constant. So, the current flowing around the wire obeys the same equation we got before:
where The only difference is that now is constant.
Puzzle. Solve this equation for
There are lots of ways to do this. You could use a Fourier transform, which would give a satisfying sense of completion to this blog article. Or, you could do it some other way.