I'm trying to calculate the energy consumption over a period of 1.3 seconds in joules (J).
I have a sample every 100 ms (0.1 second) with the current and voltage (in volts) (in practice, the samples have a much higher granularity, but for the sake of simplicity ;)).
Time (s) | Current (mA) | Voltage (V) |
---|---|---|
0.0 | 30200 | 3.55 |
0.1 | 30000 | 3.6 |
0.2 | 30200 | 3.65 |
0.3 | 30100 | 3.55 |
0.4 | 30000 | 3.6 |
0.5 | 30100 | 3.55 |
0.6 | 30200 | 3.6 |
0.7 | 30100 | 3.65 |
0.8 | 30000 | 3.55 |
0.9 | 30000 | 3.6 |
1.0 | 30200 | 3.6 |
1.2 | 30000 | 3.55 |
1.3 | 30100 | 3.6 |
How can I calculate the consumed energy consumption in joules over this period of 1.3 seconds?
My idea was to:
- Convert mA to ampere by diving each mA value by 1000: e.g., 30.2, 30, 30.2, 30.1, 30, etc.
- Taking the mean of the current and voltage, 30.09 A and 3.59 V respectively..
- Multiplying these to get the power: 30.09 A * 3.59 V = ~108 W
- Since watt is also joules per second we multiply it by 1.3 to get the total consumed energy of this period in joules: 1.3 s * 108 W = 140.4 J.
Is this correct? Does it make sense? Are there better, more accurate ways to measure the energy consumption in joules over a period?