# Energy Vs. Power

First of three parts: How much energy a system uses depends on how long it’s in a particular state, how much power is dissipated and how a chip is actually used.

By Ann Steffora Mutschler
The terms power and energy are used almost interchangeably these days, but understanding and clearly articulating how to optimize embedded designs for maximum energy and power efficiency can make a big difference in a design.

At a physics level, energy = power x time, whereas power is the rate of energy in a given time window. When the focus is specifically power, it is the rate at which energy is released—so much per second. Typically that is associated with things like supplying current into a chip and pulling heat out of a chip.

“You may not be able to instantaneously or over a short period of time be able to sustain more than a certain amount of power dissipation,” said Chris Rowen, CTO of Tensilica. “It’s related most often to the thermal envelope within which you are operating.”

Energy, on the other hand, is the total consumed over the course of some job. Most importantly here, he reminded, batteries don’t store power, batteries store energy. There is a finite supply of energy in a battery and often in mobile devices, and the first consideration is with energy. For example, you want someone to be able to get their job done, which might be to go all day with their phone with the amount of charge that they have in their battery. You may not care quite so much about exactly what rate that energy is used up, but you do care about completing the task at hand.

The difference between energy and power is obvious when there may be two approaches to doing some kind of computation. Power may be dissipated at a high rate, the work performed very quickly and then shut down. Alternatively, that computation may be stretched out over a longer period of time, dissipating less power at any instant, but consuming energy over a longer period.

“You have to actually look at the product of the two or the area under the curve and say how much power times how much time, that’s what gave me energy. This shows up particularly when people are looking at the interaction of hardware and software because software has a lot of control over algorithms. The algorithms often will determine how much energy is required to get something done,” Rowen explained.

If the engineering team has a good understanding of what the power dissipation is, with one set of instructions that might be executed versus another, they might able to determine that for a particular processor in a specific circumstance they are better off dissipating more power by running an algorithm that takes less time and consumes less energy. Or they may determine for a different algorithm that they are best off choosing the lowest energy instructions even though it may take a lot more instructions to get the job done but may result in less total energy.

“There are a wide range of non-obvious tradeoffs that people might make to look at the interaction between what algorithms, what software they might run and what the characteristics of hardware are. In some cases the hardware, which has higher power dissipation has lower energy,” Rowen added.

When it comes to battery life in mobile devices, energy efficiency is on the top of everyone’s list.

“Ultimately we want to do the most operations per electron that shoots through the power grid and that’s what is really going to give us longer run times for standby, active, whatever it is,” observed Cary Chin, director of technical marketing for Synopsys’ low power solutions. “Power efficiency is important, as well, because in an environment where if you assume that energy usage or power is relatively constant, then power and energy are kind of equivalent. It’s a technicality, but when you look at complex devices the level of power is certainly not constant. It starts to change a lot. This is the time about which we should really start to make the distinction because the assumption of constant power is no longer true in these devices. And as we go forward the assumption that when my phone is on, it’s just on, is no longer going to be true. In fact, it will never be all on, there will always be pieces that are off.”

That concept of on and off being relative is an important element in design. Another consideration is how much energy a design uses to get a particular task done.

“Customers think a lot about how much power the design is using and they are thinking about instantaneous power consumption,” said Jon McDonald, technical marketing engineer in Mentor Graphics’ design creation synthesis group. “But to really look at what they are trying to do, they are not trying to optimize the power generally. They really are trying to optimize the energy the system is consuming to get the job done.”

In talking with an engineering team recently, McDonald learned they have good estimates for how much power the system uses in any given state but they don’t have a good idea of how much energy is used by that system as it is processing the work that it needs to do because they don’t know how long it stays in any given state. For example, he said that when a system is processing data, if there is a lot of contention on the bus and the system ends up staying in a given state for 20% or 30% longer because it’s waiting for resources, all of a sudden it is using 20% or 30% more energy. The power it used didn’t change. The power in that state is still the same. But the power in that state doesn’t mean anything until you know how long it’s been in that state.

“You need a good understanding of not just the power that the system is consuming but the timing, the performance of the system, how long it takes in any given state to do the job that it’s trying to do,” McDonald said.

Coming next month: Optimizing for power and energy efficiency and the differences between them.