# A machine's energy consumption per product

I need to find the energy consumed per product.

Let's say we have product cycle of 10 seconds. The machine reports the average wattage of each second.

00:01    450 watts
00:02    400 watts
00:03    350 watts
00:04    600 watts
00:05    725 watts
00:06    400 watts
00:07    550 watts
00:08    200 watts
00:09    420 watts
00:10    450 watts
Total 4545 watts


Is it fair to say that each reported wattage is the same as Joules? Like this:

00:01    450 W    450 j
00:02    400 W    400 j
00:03    350 W    350 j
...


What do I report back as the total consumed energy per product? Is it the total 4545 J or ?

Okay I get it, I need to sum up the joules not the watts.

• "Total 4545 watts" No, you can't sum it, the result is Ws, not W. Jun 7, 2022 at 11:31
• And there's a name for Ws...
– user16324
Jun 7, 2022 at 12:41

Power is defined formally as the rate of change of energy. So the answer quoting the inverse as Energy is the integral of power is correct. This energy calculated has units of Joules when P is in Watts and t in seconds. This is equivalent to the watt-second (non preferred unit).

Assuming constant power over the integrating period, the equation simplifies to E=Pt. Then multiple little periods can be added E = P1t1 + P1t2 + ....

BUT you have t1=t2=...=1s. So effectively in your case, but not generally E = P1 + P2 + ...

So it is not correct to quote the sum as 4545 W it should be J or Ws. The sum is already energy it just doesn't looking like it because you didn't need to multiply by time as it was 1.

The values calculated will be very approximate. This is due to the issue to the rapid rate of change of power relative to the sampling interval. The only way to avoid this is faster sampling rate or much longer recording period (assuming power characteristic do not change with time - ie warm up)

If you want watt-hours divide by 3600, kW-hrs divide by 3.6e+6.

• Thank you for pointing out the Ws is a non preferred unit. This was what really was confusing me with Ws and W, Joules and watts is much easier to understand.
– Math
Jun 7, 2022 at 12:34

Energy consumption can be calculated by integrating power over time:

$$E = \int P \ dt$$

So, what you are doing is basically correct: The total consumption after a period of time (e.g. 10 seconds) is the sum of power-duration product of each of those 10 samples.

However, remember that this is not an accurate reporting method since $$\dt\$$ is one second (which is relatively long) in your application. Because the power draw should remain constant during that 1 second. For example, if the power consumption is 450W at 0:01 then it should have been 450W at 0:00 to say that the energy consumption is 450 Ws = 0.125 Wh for the first 1-sec period. Likewise, you are assuming the power consumption is 400W constantly between 0:01 and 0:02.

I don't know what level of accuracy you expect, though. But if you want more accurate results then the sampling duration should be as low as possible For electricity meters for example, $$\dt\$$ is usually less than or equal to 1 millisecond.

is it the total 4545 watts or ?

The unit of energy is watt-hours (Wh) or kilowatt-hours (kWh).

• the reported wattage is the average over 1 second. My realworld case is 65 seconds with a total of 46100W, where the average wattage pr second is 709W. The reason I ask this is because to me 46kW over 65s seems like a lot, so i wanted to make sure this is the right way to go about it. It doesn't have to be too accurate.
– Math
Jun 7, 2022 at 11:33
• @Math 46kW over 65s seems like a lot this is wrong by definition. Because powers don't add up, energies do. So yeah, summing power-duration products is the right way to report consumption. If accuracy is not important then average powers are still useful. Jun 7, 2022 at 11:35
• So the right way would be to convert the watts to kWh each second and then add them up to the total kWh. This for me would be 0,0128 kWh or 12,8 Wh.
– Math
Jun 7, 2022 at 11:41

W = watt = power

J = joule = work = energy

Wh = just another way to display work.

w = P * t

That's the only formula you need here. So energy (work, in joule) is power (in watts) multiplied by time (in seconds).

You basically already did that. Just add up the energy you already calculated and you get the energy (in joule) needed per product.

If you need the energy in Wh or kWh, than divide by 3600 to get Wh or by 3.6 to get kWh.

• Okay, so if I do this formula for each of my second intervals, and then add together the joules to get the total, right?
– Math
Jun 7, 2022 at 11:59
• @Math absolutely right. What you're doing here is basically an integral by hand. Jun 8, 2022 at 4:46