Existing approaches employ power measurement
tools (Faviola Rodrigues et al., 2018; Horcas et al.,
2019; Li et al., 2016; Mitchell et al., 2018), simulation
(Yang et al., 2018) and analytical modeling (Yang et
al., 2018). Although these tool-based technique is
simple, it is system-specific and relies on probing that
may not always be accessible. Using simulation
requires understanding of computational behavior of
the system and can also take a long time to run.
Our research aims to develop green CPSs by
making them energy aware. To do this, we propose
an analytical modelling approach to quantifying
energy consumption of software artifacts in the CPS.
Unlike previous analytical approach by Yang et. al,
our approach shows explicit modelling using two
basic core elements, namely number of MAC
operations and frequencies of data access. The paper
describes the energy quantification approach through
energy consumption modelling of DL in distributed
CPS due to the popular deployment of DL in many
modern CPSs. The approach is general and can be
applied to any CPS. The paper illustrates the
application of our approach for energy management
in scaling and designing smart farming CPS that
monitors crop health.
In summary, the paper has the following
contributions: (1) a foundation for energy modeling
of software components using primitive basic
elements relying on data computation and movement,
(2) energy quantification of DL, specifically
convolution and artificial neural nets, and (3)
application of the DL energy models in designing and
scaling smart farming CPS for crop health monitoring.
The rest of the paper is organized as follows.
Section 2 discusses related work and Section 3
presents the proposed approach. Section 4 gives
details of the approach on specific computing units,
particularly, the execution of the trained deep
learning model. Our illustration of energy modeling
approach on smart farming, including experimental
design and setup, is given in Section 5, followed by
experimental results in Section 6. The paper
concludes in Section 7.
2 RELATED WORK
Most research on energy-related issues in CPSs
includes energy management (Ortiz et al., 2020; Zhu
et al., 2021), improving infrastructures such as cloud
and data centers (Ortiz et al., 2020), energy harvesting
(Zeng et al., 2020), and energy efficient solutions.
The latter includes scheduling optimization (Fu et al.,
2019; Liang et al., 2018; Zhu et al., 2021), energy
optimization strategies (Horcas et al., 2019; Hossain
et al., 2020) and energy efficient protocols (Haseeb et
al., 2020). While useful, all of these approaches,
however, either does not estimate energy
consumption (Zeng et al., 2020; Zhu et al., 2021) or
does that of physical components (Fu et al., 2019;
Hossain et al., 2020; Liang et al., 2018). Unlike these
studies, we consider energy consumption of software
or computing units.
Research in estimating energy consumption of
software components uses various techniques. Most
rely on power measurement tools e.g., hardware
sensors (Mitchell et al., 2018; Zhu et al., 2021),
WattsUp? Pro (Horcas et al., 2019), Intel’s Running
Average Power Limit (RAPL) interface and/or
nvidia-smi (Li et al., 2016), and the Streamline
Performance Analyser (Faviola Rodrigues et al.,
2018). These tools are used to measure actual energy
consumption, then report energy usage or build
energy model. However, these tool-based approach
can be hardware specific and can only measure
energy at the device level. They are unable to measure
specific software computation.
Another technique uses simulation to estimate
energy consumption of software units (Yang et al.,
2018). It estimates energy consumption of deep
learning based on two factors: number of Multiply-
and-Accumulate (MAC) operations and data
movement in the hierarchy. The number of MACs
and data accesses are obtained through simulation. In
general, although the approach gives accurate results,
it requires long runtime for large software
component. Moreover, it requires a knowledge of and
is specific to certain hardware system.
To overcome the above limitations, few studies
employ analytical approach (Mo & Xu, 2020; Yang
et al., 2018; Z. Yang et al., 2021). Work in (Mo & Xu,
2020; Z. Yang et al., 2021) presents a mathematical
model to estimate software computing units based on
numbers of CPU cycles, CPU frequency, and
floating-point operations. They do not consider
energy consumed by data movement within memory
hierarchy which is rather significant to the overall
consumption. Work in (Yang et al., 2018) presents a
tool for estimating software component using
analytical modeling approach. However, there is no
details on the analytical models employed. Our work
is most similar to (Yang et al., 2018) in applying basic
elements of MACs and data movement. Specifically,
both (Yang et al., 2018) and our approach present
energy modeling of energy consumption during deep
learning execution (i.e., testing of deep learning
model). However, this work differs from ours in that
it does not show how the core elements (i.e., the