  Energy measurement of computer devices, which are widely used in the Internet
of Things (IoT), is an important yet challenging task. Most of these IoT
devices lack ready-to-use hardware or software for power measurement. A
cost-effective solution is to use low-end consumer-grade power meters. However,
these low-end power meters cannot provide accurate instantaneous power
measurements. In this paper, we propose an easy-to-use approach to derive an
instantaneous software-based energy estimation model with only low-end power
meters based on data-driven analysis through machine learning. Our solution is
demonstrated with a Jetson Nano board and Ruideng UM25C USB power meter.
Various machine learning methods combined with our smart data collection method
and physical measurement are explored. Benchmarks were used to evaluate the
derived software-power model for the Jetson Nano board and Raspberry Pi. The
results show that 92% accuracy can be achieved compared to the long-duration
measurement. A kernel module that can collect running traces of utilization and
frequencies needed is developed, together with the power model derived, for
power prediction for programs running in real environment.
