Information Technology Reference
In-Depth Information
Table 5.4 Estimated
prediction rates on the
smartphone with basic data
types
Data type
No. bits
No. predictions/sec
Fixed-point representation
char
8
315.35
short int
16
241.54
int
32
185.00
long int
64
141.70
Floating-point representation
float
32
27.04
double
64
20.68
An additional test was carried out aimed to measure battery consumption with the
floating-point and fixed-point representations. For this, the accelerometer sensor was
set to constantly read the triaxial signal at a fixed frequency as described in Sect. 4.3.2
and then copied into a circular buffer. Every 1.28 s an interruption started the activity
recognition process using the last available window sample taking into account the
50% overlap between windows and their 2.56 s length. In this experiment we com-
pared the data types with the same number of bits but with different arithmetic: 32-bit
float and 32-bit integer. For this, we run three times for each data type the HAR smart-
phone application continuously and measured the time of battery discharge from a
fully charged state until aminimum level of 10%was reached.We found that the aver-
age battery time using the 32-bit float model was of 89 h and the time with the 32-bit
integer was of 112 h and they both described a linear discharge trend as it is visualized
in Fig. 5.4 . Their time difference is equivalent to an increase of 25% of the battery
life when the application is running alone. These measurements are dependent on the
hardware and OS used but they are showing a trend on the improvements that can be
reached with this hardware-friendly approach. For obtaining a more reliable measure
Fig. 5.4 Comparison 32-bit
floating-point MC-LK-SVM
and 32-bit fixed-point
MC-HF-SVM with respect
to battery discharge
Battery Consump t ion Com p arison
100
32−bit Fixed−Point
32−bit Floating−Point
90
80
70
60
50
40
30
20
10
0
0
20
40
60
80
100
120
Time (hours)
 
Search WWH ::




Custom Search