Energy management in a cloud ‐ based cyber ‐ physical system

these


| Cyber-physical systems
Cyber-physical systems (CPSs) have gradually emerged as an innovative technological advancement with an extensive scope of application domains. Over the years, these systems have transformed from a conventional simple type of system to a heterogeneous and more complex system incorporating computational and communication abilities that enables various embedded devices to monitor, communicate, sense and control the physical world. CPS can be referred to as a new generational digital system that merges the interactions between the physical world and the virtual world or cyber world. The physical world is the core component that is connected to various sensors and the data observed from these sensors is sent to the cyber world. The cyber world, in turn, collects these data for processing [1]. Lately, the applications of CPS can be found in different areas of our everyday life-supporting services that include health care and medicine [2,3], process control [4], agriculture [5], smart cars and intelligent transport [6,7], smart grid and smart cities [8,9], environmental monitoring [10] and social networks [11] and many others.
Although CPS has been in existence since the 1970s, it only started gaining much attention in late 2005 when it was introduced at a meeting of the General National Science Foundation in the United States by Helen Gill. Lately, CPS has become an emerging research path that involves the integration of various aspects in science and engineering. The concept of CPS is primarily formed on the base foundation of hardware and hybrid software systems, sensor networks, embedded systems and other systems. CPS senses its environment with the aid of its sensors and through its network and then communicates with various devices deployed in the network. To make quick and smart decisions, the computing devices process the data and transfer instructions through the same network to the actuators to realise the control. CPSs are complex systems that possess cyber capabilities embedded into different physical components and all are combined to produce a vast network of control systems [12].
Because CPS cuts across various disciplines in the academic sphere, there exists different definitions of CPS according to how it is perceived in these different scientific communities. For example, Lee in [13] defines CPS as 'a new generational digital system consisting two vital functional components, first, the advanced connectivity that ensures realtime data acquisition from the physical world and information feedback from the cyberspace and second, the intelligent data management, analytical and computational capability that constructs the cyberspace'.
CPS has received widespread attention globally and from the international front. The United States, for example, employs CPS in its industrial strategy called 'advanced manufacturing' to generate more economic activities across the country. Germany has also included CPS in its 'Industry 4.0' strategy and so has China in its 'Made in China 2025' strategy to boost industrial and economic development in their countries.
CPS possesses the properties of autonomy, dynamic reconfiguration, security, diversity, reliability and real-time [14]. Despite these intrinsic properties of CPS, energy management in CPS has been a very critical issue due to the limited amount of energy available amongst the nodes in a network which in turn affects the dependability and availability of the system. This study, however, tends to investigate the energy consumption amongst nodes in the network and to also offer a possible way of optimising its energy usage to manage and balance the energy across the system.

| Cloud computing
The advancement in computer and digital technologies has brought about a model that enables ubiquitous, cost-effective, scalable and adaptable resource allocation while guaranteeing easy access and usability to customers known as Cloud computing. The concept of Cloud computing was first introduced in August 2006 at the Search Engine Conference (SEC) by the CEO of Google, Eric Schmidt, and since then it has blossomed and gained much attention amongst engineers and computer scientists in the Information Technology industry. Among most industry stakeholders, cloud computing is defined as a new segment of computation in which numerous quantities of scalable IT-enabled processes are provided to subscribed customers with the aid of Internet technologies [15]. The main benefit of Cloud computing is that it is a convenient system with the ability to create an on-demand facility to gain admission into networks coupled with several integrated computational resources that can be promptly delivered with the least managerial effort or little or no interaction from service providers.
Cloud computing services are served, operated and managed by Cloud providers who deliver these services via an appropriate network with the aid of virtualisation, data centres and large computing and storing capacities [16]. That means from the Cloud, users can successfully obtain swift and large information processing capabilities at a reduced-price rate. The Cloud data control centre is the most vital and principal constituent of Cloud computing. It is responsible for routing and congestion control algorithm. They are also required to accommodate a huge number of servers for the processing and management of big data. Data centres, being large scale computing infrastructures, have massive energy budget issues due to the fact that they normally contain large number of servers that amass a fair amount of space and consume a massive measure of power which immensely affects the energy consumption of the system.
The merger of CPS and Cloud computing brought about the emergence of what we can term as Cloud-based Cyber-Physical Systems (CCPSs). CCPS is seen as a current trend in the global space and has so far been implemented in various projects involving CPS and Cloud computing. Among these major projects, those that employ CCPS as a backbone architecture are intelligent transport systems and smart grids. The evolution of CCPS has also enabled the total utilisation of cloud computing inherently and provided access to unlimited resources for physical systems. CCPS offers several opportunities and additional possibilities for CPS to extend its capabilities in terms of application by taking advantage of Cloud resources in various ways and allowing an overall new system design.
Because CPS is modelled and organised around a large number of actuators and sensors, it adopts a wireless sensor networking style to cater richer network connectivity and to fuse real and cyberspaces. Therefore, a CPS is composed of multiple wireless sensor networks (WSNs) for heterogeneous information flow and smart decisions. WSNs in a CPS primarily consist of numerous low-powered embedded devices employed in the physical world to communicate, sense, process and store data [17]. WSN is, however, considered as a vital part of a CCPS since it assists in bridging virtual computing and real data through actuators and sensors.
Here, we investigate how energy can be sufficiently managed in a CCPS. The contributions and highlights of this study are as follows: i. Ensure an energy-efficient communication network by proposing an energy consumption model to optimise the energy consumed amongst network nodes in the WSN of a CCPS. ii. Investigate how data can be successfully transmitted in a WSN while saving energy and extending the lifetime of the network. iii. Evaluate the energy consumption of data control centres in a bid to create a much-needed energy management strategy for these data control centres in a CCPS. iv. Determine how resource utilization can be managed at different workloads of a Cloud data centre to improve its energy efficiency.
The remainder of this study is, however, organized as follows: Related works are highlighted in Section 2, while energy management in the communication and sensing environment is detailed in Section 3. The energy management in the Cloud data centre is discussed in Section 4, the experiments conducted are explained in Section 5, results and discussions are documented in Section 6, and the study is concluded in Section 7.

| RELATED WORKS
Recent technology advancements and the confluence of wireless communication technologies on CPS has led to the progression of various works that aim to tackle energy issues in CCPS. As an emerging area of research, models that guarantee energy efficiency in various concerns of CCPS have been designed and proposed. This section reviews specific vital works in literature that manages energy in a CCPS as well as the management of energy in the data centres of a CCPS.
(1) Energy management techniques in CCPS. Scheduling, sensing and data transmission techniques are used as measures in [18][19][20][21][22] to minimise energy consumption in CCPS. In [18], a task execution framework that minimised computational energy in resourced constrained mobile devices is proposed. The authors minimised the transmission energy by optimally scheduling data transmission for favourable sensors across a stochastic wireless channel for Cloud execution. In [19], a dynamic duty scheduling technique is proposed to tackle the energy consumption in on-field WSNs and to also improve its cost-effectiveness. Perera et al. in [20] developed a context-aware and activity aware platform that is capable of autonomously selecting communication channels to transfer data to Cloud via context information. To manage the energy efficiency of local computing for wireless powered devices, a framework that consists of sets of policies for controlling CPU cycles is proposed in [21]. The proposed framework minimises the energy consumed during local computing and maximises the energy savings for offload computing. In [22], a global energy saving for multiple workflow algorithm is employed to minimise the energy consumption in a cyberphysical Cloud system. The results from the study show that the algorithm seem to perform better when compared with the other existing methods. The authors in [23,24] employed different aware strategies to address the energy challenges in CCPSs. In [23], a Quality of Service (QoS) aware virtual machine (VM) scheduling method is adopted to manage resources to improve the energy efficiency in the system, while in [24], global context-aware sensing and collection are employed for efficient energy management. Also, in the study by Xu et al. in [25], fog and edge computing paradigms are merged with Cloud computing to provide dynamic resource for CPS for energy management.
(2) Energy management in data centres of CCPS. Data centres fuse cyber dynamics with physical dynamics and improving energy efficiency in this component is very important to ensure a complete management of energy in a CCPS. The study in [26] introduces a model to represent the data centre as two coupled networks to evaluate three control strategies based on their computational performance and energy efficiency. The work shows that more energy can be saved with the coordination and control of physical and computational resources of data centres. In [27,28], the total cost of electricity based on the QoS requirements' constraints and diversity in electricity prices are considered. The authors suggested a load balancing technique for the minimisation of energy cost in data control centres. Yu et al. in [29] explore the issues relating to management of energy in Cloud data centres for smart grids. An interactive online algorithm is designed to reduce the time average expected energy cost. In [30], distributed computing amongst an array of data centres is employed to control and reduce the consumption of energy in a smart grid computational system. An investigation into the issue of long-term energy cost in a data centre considering battery life and diverse service delay guarantees for delay-tolerant requests was document in the authors' work in [31].

| ENERGY MANAGEMENT IN COMMUNICATION AND SENSING ENVIRONMENT
Guaranteeing an energy-efficient communications network in a CCPS is very pertinent to the service life of each node in the network. Energy storage technology also plays an integral part in managing energy in the sensing and communication environment as it helps in providing data privacy, flexibility, interoperability and real-time energy management. Through the Cloud, the availability of energy storage devices on demand anytime and anywhere can be a difficulty with the absence of an energy storage technology. Various factors, including the network characteristics and design, battery power and resource limit, are, no doubt vital, to the life cycle of the whole network.
In that regard, it is highly favourable to adopt a WSN concept since its design objective is to efficiently use limited energy while meeting certain quality requirements like efficiency and reliability. There, however exist some factors leading to high energy consumption in the communication and sensing module of the network such as back off time and errors brought about by channel noise which eventually leads to packet loss at the receiving end [32]. To decrease the energy consumption of the network, we propose an energy consumption reduction model that focuses on the total energy consumption in sending data and the sending power of the network as conceived in Figure 1.
The WSN is composed of various nodes powered by batteries which affect the energy status of the network hence ensuring data sent by nodes to be delivered to the gateway (GW) through a multi-hop manner.
Due to the fair amount of node energy consumed during the transmission of data, data cannot be delivered in a prompt manner. In other words,to reduce the energy consumption as much as possible so as to significantly improve the network performance, the energy consumption amongst the network nodes in the network is optimised.
The sending power of the WSN P S is given as Where f(δ s ) is function of δ s and δ s is taken to be the fixed frame error rate, μ denotes the channel's attenuation coefficient, P n denotes the noise power and ω is taken as the noise factor at the receiver. The sending power is determined by the δ s at the receiver end and the signal-to-noise ratio (SNR) χ . χ =(P acc /2BN 0 ) where P acc is the receiving power, B denotes the bandwidth for the signal and N 0 is the power spectral density of additive white Gaussian noise.
As the sending power tends to increase, the frame error rate reduces; hence, the frame error rate can be improved.
by simply reducing the sending power which in turn reduces the loss of energy during sending.
The sending power can, however, be rewritten in terms of the SNR as F refers to the power gain factor, F = A g AFD, where A g is antenna gain, AF denotes the path attenuation factor and D denotes the disturbance and noise on the data link. The energy consumption in the transmitter and receiver circuits P trr can be indicated as P t is expressed as the circuit's power consumption at the transmitting end and P r , on the other hand, is expressed as the circuit's power consumption at the receiving end. P trr can however be rewritten as where P fs denotes the energy consumed at the frequency synthesiser circuit, P mi is the energy consumed by the mixer, P dac denotes the energy consumed by the digital-to-analogue converter, P adc is the analogue-to-digital converter, P d is the energy consumption of the decoder, P fr denotes the energy consumed at the filter and P na denotes the energy consumed at the noise amplifier. Therefore, the total energy consumption E T used to transmit a single amount of D bit of data can be expressed as where P a represents the energy consumed at the power amplifier, σ denotes the signal amplifier's amplification efficiency and T t represents the duration of time required to complete data transmission.
During the transmission of data, the data is transmitted in a unit frame; hence, the frame error rate plays a huge role in the network's energy consumption. With a higher misdetection rate, the probability that the data package is resent under an error control protocol of stop-and-wait Automatic Repeat Request (ARQ) increases thereby leading to retransmission of data after a predefined timeout which incurs more energy loss in the network. This means that a balance in the error rate has to be achieved so as to decrease the energy consumption in transmitting data. With the assumption that under the stopand-wait ARQ protocol and each time data of n frames is sent, the frame error rate of δ s , 0 < δ s < 1, will result to (n.δ s ) amount of frames to be retransmitted and so on. Therefore, the total amount of frames required for transmitting one time of data is expressed as where k refers to the amount of resending. The total energy consumption E T required to send n frames of data is then expressed as where L denotes the length of each time frame. With respect to E T and P S sent by the WSN, the target optimization function h can be shown as follows where α and β are the weighting coefficients in obtaining the least energy consumption by finding solution to the target optimization function. Particle swarm optimization (PSO) algorithm is adopted to resolve the optimization problem.

| Particle swarm optimization algorithm
PSO is a global search algorithm that is composed of a set of particles characterised by random velocities and positions. It is a type of swarm intelligence optimization algorithm that iteratively optimises a problem. Each particle in PSO possesses a velocity that depicts the movement in the search space and it automatically and dynamically modifies this based on its previous behaviour. Therefore, particles tend to move towards better points within the search space and thus they search the solution space by adjusting their position and velocity [34]. There are several other swarm intelligence algorithms in existence, but PSO has been shown to deliver better results in 96 -ORUMWENSE AND ABO-AL-EZ terms of its performance and complexity in large scale environments. It has also proven to reduce computational time when compared with other algorithms such as ant colony optimization algorithms. In [35], PSO was found to be faster and simpler than most algorithms in terms of both processing and implementation and it requires a few parameters to adjust and improve the convergence speed. As shown in Figure 2, the PSO Algorithm searches the space of an objective function by adjusting the trajectories of individual particles. At every iteration, each of the particles updates its best position based on two different points while moving randomly. The first is considered as the best solution found by itself and it is represented as Q i , while the second is considered the current global best solution found by the whole swarm as it is represented as G*.
Let u i and v i denote the position vector and velocity for the ith particle, respectively. The new velocity vector can be updated using the following v tþ1 where c 1 and c 2 are the acceleration constants or learning parameters which can be taken as c 1 ≈ c 2 ≈ 2, while α and β are random vectors with values between 0 and 1. To ensure a quick convergence of PSO and to stabilise the motion of the particles, an inertia function Ω is added to Equation (10) to give v tþ1 where Ω ∈ (0,1) [33] and the position vector can be updated using the following.
Using the analysis above, the process for finding the best solution is given in the figure in the algorithm above.

| ENERGY MANAGEMENT IN DATA CLOUD CENTRE
The Cloud is an essential part of the whole system since the data generated by the sensing nodes and devices in the network is apparently stored and processed in the Cloud. With a Cloud enabled system, services can be extensively delivered, and when a fairly large amount of data is produced, the Cloud can provide a storage space for this huge amount of data [36]. The management of energy in a Cloud platform permits users to easily access the energy management system via public or private Clouds through a Web browser interface or application programming interfaces [37]. The main goal of the Cloud supplier is to also minimise the energy consumed in the system since it helps in storing the data generated.
The primary step to manage the energy in a data control centre is to ascertain the amount of energy consumed in the data centre. The workload (cloudlets) of the Cloud will run when the energy consumption (E cc ) is lower than the energy consumption's threshold value. Since the energy consumption of heterogeneous Cloud workload is dependent on resources for execution, the processor usage and energy consumption information are taken into consideration.
In developing an energy model, it is assumed that the resource usage has a relationship with the energy consumption as analysed in [38,39]. So therefore, we can express the energy consumption of the Cloud data control centre as: where ∑ m i¼1 E h denotes the estimated energy consumed across the entire server m of a user h at a time duration interval (t).
In a bid to decrease the power consumed at the data control centre with X number of VMs and N number of servers, we formulate the problem as: and also where ∑ m i¼1 P h denotes the estimated total power consumed by the entire server m of a user h at a time duration (t) under these constraints:- where R vmj,i (t) denotes the use of resources on a jth VM on an ith server at a time duration (t). S (i,r) also denotes the ith server's capability of a resource r. Similarly, (E cc (t)) for resources usage at a time duration (t) can however be represented by the following equation: where E dcc denotes the energy consumed at the computational elements of data control centre, E cpu denotes the CPU device's energy consumption, E mem denotes the storage device energy consumption, E dkd refers to the disk device energy consumption, E nts represents the network material's energy consumption like the network connectors and network cards while E op denotes the energy consumed by the other smaller parts like the motherboards, current conversion loss, transceivers, iops and so on.
Since the resource utilization is time-dependent and a function of time, hence, resource utilization RU i,t can be formulated as where ∑ w i¼1 E cct;i is considered as the total sum of the energy consumed at a time duration t and w is regarded as the number of cloudlets running at time t, while ru t is regarded as the utilised resource at a given time t. Therefore, the energy consumption E cc (t) of utilised resource ru t at a given time t can be formulated as where E max refers to the maximum energy consumption of an ith server at peak load and E min refers to the minimum energy consumption in active/idle mode. The energy efficiency E E of the Cloud data control centre can then be computed as where N WL represents the number of cloudlets executed in the data control centre. The computing capacity η of the Cloud data control centre can be described as the ratio of the actual usage time of resource to the expected usage time of resource. We can therefore calculate the computing capacity η as where t au is the actual usage time of resource and t eu is the expected usage time of resource.

| EXPERIMENTAL SETUP
To evaluate the energy management of the system, a WSN was set up in an office space to monitor and collect temperature data values. The network is composed of four sensor nodes working independently of each other and a direct reporting system is employed where the sensor nodes are constantly pinging the gateway with current temperature values. As transmission packets are received, a received event is triggered. In our approach, we utilised a web-based service standard operation for communication between the gateway and an open.sen.se server since it is much easier to generate and parse messages compared with employing XML. For the sensor data value to be read, a GET request in HTTP is sent to the source of the sensor. When the received data packet has been decoded, a POST request is also sent from the gateway to an assigned URL containing the updated value, as shown in Figure 3.
A 'Senseboard' is created in the open.sen.se server on a Linux system to deliver the data in an easily visualised manner to the user. This also helps to display the infographic data streams in real time on the Internet. The Senseboard created for this purpose is supported by most browsers, and it is available on the open.sen.se server using the link http://open. sen.se/sensemeters/tab/200454.
The energy consumption optimisation algorithm employed for optimisation in Section 4 is also tested and the energy efficiency of the Cloud data centre is evaluated. MATLAB® simulation tool is utilised to validate its effectiveness and the simulation parameters in Table 1 is utilised. The number of particles used in the PSO algorithm is set at 25, c 1 and c 2 are calculated to be 1.6 and 2.4, respectively, and the maximum number of iterations is also set to 200.

| RESULTS AND DISCUSSION
From the transmitted data values measuring the temperature of an office space displayed in the open.sen.se server graphical interface, Figure 4 shows a portion of the real-time graph of measurements displaying the office temperatures at different times of the day. The experiment was allowed to run for 24 h to obtain temperature values of the office space. There was no difference in data received from the network apart from it becoming more granular.
The number of transmissions in a temperature sensor node achieves its maximum when the sampling interval is set 60 s and it is at minimum when the sampling interval is 600 s. At each time the Senseboard receives data, at least, one transmission is made (due to packet losses, commands are often retransmitted after a delay to guarantee delivery). With that sampling interval in place, the sensor nodes will cease to constantly report similar data values, which means unnecessary data transmission is avoided leading to savings in transmission. Figure 5 shows the transmission savings observed in the experiment. It is evident that with a longer transmission interval, more transmission savings can be gained. This means that a relative amount of savings can be made on transmissions without compromising the quality of data generated from the sensor nodes. This can also go a long way to save the battery life of sensor nodes and extend the lifetime of the WSN.
In a bid to save more energy amongst the sensor nodes in the network, a sleep mechanism is triggered in the network whereby the sensor nodes are configured to go into a cyclic sleep mode. After a successfully completed transmission, the sensor node goes into sleep and its activated again only at a certain time when it needs to sense and transmit data. This seems to be a viable technique rather than replacing sensor node batteries frequently which might not be convenient due to issues relating to space and terrain. Table 2 shows the power consumption measurement carried out at the sensor node at different modes with the peripherals circuit included.
The lifetime of the WSN node battery is very imperative in ensuring energy conservation in the network. The packet size of data transmitted is 4 bytes (2 bytes to encode the sensed temperature data and 2 bytes for the supply voltage). In Figure 6, the lifetime of a sensor node battery at different values of data packet is shown. The figure compares two extreme data packet sizes (4 data packets and 128 data packets which is the payload size of the utilised sensor node). It can be deduced from the figure that although the battery can last for a relatively long period of time,and it can be further extended if fewer data packets are transmitted from the sensor nodes as specific periods.
When data is constantly being forwarded and resent during data transmission, there will be a loss in network energy, affecting the frame error rate. The network energy is, however, dependent on both the sending power during data transmission and the frame error rate. With this synergic relationship,a larger sending power will result in a reduction in the frame error rate and consequently, a reduced frame error rate will lead to more energy savings. A reduced network energy consumption can, however, be achieved by balancing these two entities. The sending power under transmission against the number of iterations with different frame error rates is shown in Figure 7. It is seen that with a constant decrease in the optimum sending power and a steady increment in the number of iterations, there are different performances under a fixed frame error rate. It can as well be seen that with a reduced frame error rate, there is an improvement in the accuracy of the data transmitted. This also means that the optimization algorithm is in accordance with performance requirements.
The performance of the PSO algorithm in optimising the network nodes' energy consumption shown in Figure 8. It is noticed that there is a steady increase in the energy consumption at the beginning with the PSO algorithm incurring lesser energy. It can also be noticed that there is more energy consumed after a certain amount of time in which the employment of the PSO algorithm has been able to be optimised. This means, the PSO algorithm is very instrumental in saving energy in the network and also extending the lifespan of the network.
In the Cloud data control centre, the energy consumption is accessed in a cloud-based environment in which 4500 cloudlets are generated randomly. In Figure 9, the effects of the number of cloudlets on the total energy consumption of the data control centre is shown. When there is an increase in the number of cloudlets, there is also a corresponding increase in the energy consumption. When utilising resources, the minimum energy consumption at a minimal workload is at 6 kWh and the maximum energy consumption with 45,000 cloudlets is at 38 kWh. This means that utilising a certain amount of resources for specific amount of workloads is critical to the energy consumption in the control centre. When this is compared with the result obtained in [22], it can be deduced that there is an improved energy efficiency with this method since it has a higher and stable resource utilisation due to the fact that its energy efficiency is dependent on the number of cloudlets utilised for a specific amount of resource. Figure 10 displays the energy efficiency of the control centre at different cloudlets utilising specific amounts of resources. It can be noticed that a higher energy efficiency can be attained depending on the amount of resources utilised at a particular time. Since the resource usage is time-dependent, certain amounts of resources can be utilised based on the amount of cloudlets at that particular time. This can greatly guarantee an increase in the energy efficiency of the Cloud data control centre.
The computing capacity of the data control centre when utilising resources and without resources is displayed in Figure 11. It can be clearly noticed that as the number of cloudlets increases, there seems to be a corresponding decrease in the value of the computing capacity of the data control centre. With the utilization of resources, it can also be seen that there is still a good level of computing capacity. The minimum value of computing capacity is 1.40 at 4500 cloudlets.

| CONCLUSION
The merger of Cloud and CPS has brought about increased capabilities in CPS data storage and computational abilities. Here, managing the energy efficiency in a CCPS has been the major focus. An important part of the Cloud-CPS is the communication and sensing environment of the system in which a fairly huge amount of energy is utilised for communication purposes in the system's WSN. A mathematical expression model for the energy consumption based on several factors in the network is outlined. With a view to minimise the energy consumption of the network's nodes thereby increasing the network's performance, a PSO algorithm is employed to resolve the optimisation function developed from the model. The algorithm is responsible for delivering a fair and balanced energy consumption amongst network nodes by ensuring that data package are not sent severally during data transmission. In the simulation results, the employment of the algorithm shows significant energy savings in the WSN.
Second, it is also pertinent to examine the energy consumption in the Cloud data control centres of a Cloud-CPS which is considered as the most vital component of Cloud computing. An energy consumption model is also developed with a relation to its resource usage. The main goal of this is to ascertain how resource utilisation can easily be managed based on different workloads of the Cloud data control centre so as to improve its energy efficiency. Simulation results highlight the energy efficiency of the data centre with different resource utilisation at an increasing number of workloads.

P S
Sending power P acc Receiving power P trr Energy consumption of transmitter and receiver P n Noise power P t Power consumption at transmitter P r Power consumption at receiver