• No results found

7. Model Utilisation and Accuracy Validation

7.3. Calculating Energy Usage

7.3.1. Extrapolating Recorded Data

Until now, the values recorded by the logger have all been values for voltage, power and current (and subsequently directly transferrable). As discussed in previous sections, power is an instantaneous value – the rate at which energy is being consumed. Calculating the energy that is being consumed by the logger requires a time element. For Example, the following

data in Table 22 represents the data logger waking from sleep, reading 2 DAI cards and 2 SGA cards in succession. This is an example of the information recorded by the logger as described above. The problem which requires a solution is how to extrapolate the data between the recorded points.

Table 22 contains an example range of data which would be captured by the logger. The recorded values have been converted into power usage. Displayed below in Figure 33 is the same information displayed as a bar graph.

Figure 33- Power Usage against Time (Bar Graph)

At its most simple level, the Energy used by the data logger is the area under the curve or the definite integral of the function 𝑓(π‘₯). Figure 33 shows the power usage of the logger across the following processes, for the first 0.2 seconds the logger is in sleep mode, due to the scale of Figure 33 these values cannot feasibly be displayed, i.e. 0.03 mW does not show on a linear scale of 3.5 W, however if a logarithmic scale is used, as in Figure 34, the energy usage in sleep mode can be displayed, showing how much more β€˜significant’ the power usage of the three columns is. It could be determined from this that the energy usage in sleep mode is negligible, but this is inaccurate. What such a graph fails to show is the extended period for which the logger is in sleep mode. The second two columns of the graph are the energy usage from the sweep of two DAI cards, and the third column as both SGA card scans. From the graph in Figure 33 it is possible to reverse engineer the

functionality which has taken place, and for this reason linear graph will be used going forwards. The reason this reverse engineering can take place is simply that the time resolution of the graph is detailed enough to break down into meaningful chunks.

0 500 1000 1500 2000 2500 3000 3500 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 Pow e r Usag e (m W) Time (s)

Power Usage (mW)

Figure 34 - Power Usage against time (Log scale)

For comparison of the power usage of different operation data modes, a bar graph is the correct way to display the data because the values are of the same scale factor.

In reality, the scatter graph shown in Figure 35 is the likely to be the most useful method for displaying the data as well as being the most suitable way of post processing the data.

0.01 0.1 1 10 100 1000 10000 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0

Figure 35 - Power Usage against Time (Scatter)

The proposed method for extrapolation and approximation of the data is the trapezium rule. To achieve this, the area beneath the function is divided into several vertical strips, and the area of each strip is estimated by assuming that it has the shape of a trapezium [76]. The individual areas are then summed together to get a value for the total area.

In this case, assuming that the strips are trapeziums is unnecessary, the function displayed in Figure 33 is not a continuous function (and therefore cannot necessarily be integrated mathematically). To test the accuracy of this method, the data given above will be tested by calculating the β€˜actual’ estimated energy usage and comparing this to reverse engineered estimation from the graphs. Whilst not the most complex data set it should give a good impression of the accuracy.

Method 1 – Actual Energy Usage

The actual energy consumed can be calculated simply enough:

0 500 1000 1500 2000 2500 3000 3500 0.0 0.2 0.4 0.6 0.8 1.0 1.2 Pow e r Usag e (m W) Time (s)

Power Usage (mW)

2 DAI card scans and 2 SGA card scans with the remainder of the single second in sleep mode gives the following

π‘‡π‘œπ‘‘π‘Žπ‘™ πΈπ‘›π‘’π‘Ÿπ‘”π‘¦ π‘ˆπ‘ π‘Žπ‘”π‘’ = (2944.76Γ—0.2) + (1261.76Γ—0.1) + (0.0033Γ—0.7)

This gives a total energy usage of 715.13 mWs

Method 2 – Trapezium Rule Estimation of Energy Usage

The dataset contained within Table 22 must be split down into sections, with a strip width of 0.1 seconds. The equation for area of a trapezium is

Equation 19 - Area of a Trapezium

π‘Ž + 𝑏 2 Γ—β„Ž

Where π‘Ž and 𝑏 are the two side lengths and β„Ž is the height. Table 23 is a replication of the data in Table 22, the additional column calculates the area of the trapezium to the left of the time given in the first column, this results in no value in the first row.

The sum of all of the areas is 715.1511 mWs. The result accurate to 0.003%.

The shorter the time base the higher the accuracy will be; this is shown below by examining the same data but using a larger time base. Table 24 calculates the area of the trapeziums using a time base of 0.2 seconds (in place of 0.1 seconds from Table 23)

Table 24 - Area of Trapeziums (0.2s Timebase)

The sum of all of the areas is 841.3238 mWs. The result is an overestimation of 17.646% The main reason for this is shown in Figure 36, with the trapeziums re-drawn, the area beneath the graph is clearly larger than the previous graph.

Figure 36 - Power Usage against Time (0.2s Time Base)

An extreme example of this is to change the time base to 0.5s, the peak captured in the previous readings is completely missed, this results in a reading of 0.0033 mWs. An

underestimation of 99.99954%. This highlights the importance of selecting the correct time base. If the energy usage is not being recorded at a high enough resolution it will not produce meaningful data.

The ideal resolution for the logger is to record as frequently as the fastest operation, as in this setup, no data is lost, however this may not always be practicable.