# Why can the energy of local computing be written as $f^2$,not $v^2$

I saw this formula in this book: Wireless Information and Power Transfer: Theory and Practice

And in the formula 14.8, it said: $$\f_{i,n}\$$ is the CPU frequency for the nth CPU cycle required for user i

I want to ask why can the energy be written as the square of frequency, $$\f^2\$$? the wiki said the energy should be $$\CV^2\$$, where $$\C\$$ is capacitance and $$\V\$$ is voltage. It didn't say that energy is equal to the square of frequency then times effective capacitance coefficient. Does anyone know about it?

• why does the energy have relation with frequency?there is nothing about power May 22, 2019 at 10:48
• I think the "low CPU voltage" implies that voltage is always selected as low as possible for a given frequency. To reach higher frequencies, capacitances must be charged more quickly and we need to increase voltage accordingly. So we have P = C V(f)^2 f. May 22, 2019 at 10:57
• I feel that f^2 could actually be f/f here: C[i] is the number of CPU cycles required per bit; and I would assume that every CPU cycle consumes the same amount of energy, so with higer f you have more cycles per time unit, and hence more energy consumed per time unit, but with higer f you also need proportionally less time to perform all the CPU cycles. May 22, 2019 at 11:11
• so because voltage is always selected as low as possible for a given frequency,so P = C V(f)^2 f can be written as P=C* f^2 *f?why? May 22, 2019 at 11:13
• Possible duplicate of Power consumption and frequency May 22, 2019 at 11:46

We can divide the losses in FET logic (all processors are made in FET logic) in to categories:

• static losses, i.e. leakage currents,
• switching losses.

The reason is simple: Because they use FETs, the transistors don't need any current to flow through their gate to control the output. Therefore, the transistors use no current at all – aside from leakage.

When switching, however, the charge in the gate capacitor of a FET has to be changed – which means a current needs to flow. Since resistances are non-zero, with P=V·I and Ohm's law, it follows that P = I²·R.

To switch faster, i.e. to have a higher clock frequency, you need to have a higher current flowing in (simple: a gate capacitor exposed to a higher voltage charges faster, like every other capacitor; current is amount of charge per time) or out the gate capacitors every clock cycle. Therefore, I is (at least!) proportional to f, I = µ·f.

Therefore, P = I²·R = µ²·f²·R.

µ and R are material/structural constants of your semiconductor technology (this is a bit simplifying, but it doesn't really matter whether losses are purely ohmic or also have higher potences of the voltages involved here).

Therefore, P is proportional to the square of frequency, at the very least.

That's why the Pentium IV generation of processors, designed to clock incredibly fast, was extremely power-hungry.

• what is $\mu$ here?i know R is ohms May 22, 2019 at 13:04
• an arbitrary proportionality constant. It depends. May 22, 2019 at 13:08
• Normally, I would agree with your answer. However, in the book cited they explicitly count CPU cycles, and assume that a certain task consumes a certain number of CPU cycles, not a certain amount of time. That's why we're not talking about power but about energy consumed by a certain task, i.e. power * time. If P ~ f * f, then with T ~ 1/f: E ~ f^2/f = f, so the formula given for the energy should include f at maximum, but not f^2. May 22, 2019 at 14:01
• Your answer did, however, make me realize that by "low CPU voltage" the book actually means "dynamically just enough voltage for the current f[CPU]". (Only) with that assumption, P ~ f^2 holds, and thus E ~ f. May 22, 2019 at 14:10

I agree with your comment, that energy should not be related to frequency, only power should.

I think that the formula in the book is wrong, and f^2 should actually be f here: C[i] is the number of CPU cycles required per bit; so with higer f you have more cycles per time unit, and hence more energy consumed per time unit (=higher power), but with higer f you also need proportionally less time to perform all the CPU cycles.

Inspired by @Marcus Müller's answer, I re-interpreted the cited book and concluded that "low CPU voltage" likely means the idealized assumption that the CPU voltage is dynamically adjusted linearily with frequency.

If one follows that assumption, the power required is indeed proportional to f^2, as Marcus Müller explained.

Notice how in formula 14.7 the time the computation needs is calculated using 1/f. If the power needed is proportional to f^2, 14.7 says the time needed is proportional to 1/f, and hence the energy (=power * time) needed is proportional to f, E ~ f, but not proportional to f^2.

• Would the downvoters care to share their reasons? - And please do look into the book the OP referenced to check the assumptions made in the equations. May 22, 2019 at 11:47
• you mean this cpu will consume 1Joul per unit time actually?so we just write $f^2$ instead of $v^2$? May 22, 2019 at 12:09