Bio-Inspired Approaches for Smart Energy Management: State of the Art and Challenges

: Sustainable energy development consists of design, planning, and control optimization problems that are typically complex and computationally challenging for traditional optimization approaches. However, with developments in artiﬁcial intelligence, bio-inspired algorithms mimicking the concepts of biological evolution in nature and collective behaviors in societies of agents have recently become popular and shown potential success for these issues. Therefore, we investigate the latest research on bio-inspired approaches for smart energy management systems in smart homes, smart buildings, and smart grids in this paper. In particular, we give an overview of the well-known and emerging bio-inspired algorithms, including evolutionary-based and swarm-based optimization methods. Then, state-of-the-art studies using bio-inspired techniques for smart energy management systems are presented. Lastly, open challenges and future directions are also addressed to improve research in this ﬁeld.


Introduction
Nowadays, electric power plays a significant part in human life, supporting vital infrastructures and utilities [1,2]. The significant electricity generated globally still comes from fossil fuels. However, fossil fuel supplies are getting scarce. Furthermore, fossil fuels are burning in the electricity production process, and they release large amounts of carbon emissions, which causes global warming and climate change. This awareness has encouraged interest in sustainable energy development using renewable and clean energy sources [3]. Examples of renewable energy sources (RES) include solar, wind, biomass, and hydro. These alternatives improve power supply, increase ongoing energy production, decrease dependence on fossil fuel, and reduce carbon emissions.
Recently, the conventional power grid has been changed to the smart grid, which is a power grid combined with information and communication technologies (ICT) [2][3][4][5]. Widely accepted definitions of smart grid technologies include intelligent control of intermittent production, two-way connectivity between suppliers and users, and the usage of advanced ICT [5]. It allows for dynamic optimization and continuous coordination of grid operation and energy resources. Smart grid technology is seen as a significant enabler in transforming more sustainable electricity networks since it boosts the adoption of RES into power grids. On the demand-side, smart homes and smart buildings are critical to smart grids' function and performance by boosting control optimization of infrastructures and resources, bio-inspired techniques utilization, optimization objectives, and highlights of the articles, followed by a detailed discussion of all studies. This systematic review hopes to clarify the gaps and exhibit the research direction to improve the bio-inspired EMS area.

Paper Organization
The remainder of this survey is arranged as follows. Bio-inspired techniques are briefly presented in Section 2, which includes evolutionary computation and swarm intelligence. A comprehensive survey on smart energy management using biologically inspired approaches is given in Section 3.
Research opportunities and open challenges on smart energy management using bio-inspired approaches are discussed in Section 4. Conclusions are finally given in Section 5.

Overview of Bio-Inspired Algorithms
Bio-inspired computing has become the focus of numerous research in computer science, mathematics, and biology in recent years. Bio-inspired algorithms are emerging methods based on the concepts and inspiration of nature's biological evolution for creating novel and robust techniques. There are two well-known types of algorithms in bio-inspired computing as follows: • Evolutionary computing (EC): It represents techniques that mimic evolutionary concepts to solve optimization problems in an automated manner. Genetic Algorithm (GA) [15], which is a well-known EC meta-heuristic technique, emulate evolutionary principles (fittest selection) and genetic inheritance schemes between successive generations (crossover, mutation) to allow search operators to explore the search space of the optimization problem effectively. • Swarm intelligence (SI): It makes efficient use of the collective behaviors from different species (e.g., ants, bees, and flocks of birds), forming a group of agents with basic principles of interactions. These functional principles result in effective decentralized search algorithms with balanced exploring and exploiting abilities. Common characteristics of the techniques are nature inspiration, sociality, and iteration. They are different in the way of exploring and exploiting of the agents in the search space. In this branch of bio-inspired computing, well-known techniques consists of Particle Swarm Optimization (PSO) [16] and Ant Colony Optimization (ACO) [17], along with other modern heuristics, e.g., Artificial Bee Colony (ABC) [18], Bat Algorithm (BA) [19], Cuckoo Search (CS) [20], Grey Wolf Optimization (GWO) [21], Firefly Algorithm (FA) [22], Social Spider Algorithm (SSA) [23], and Kestrel-based Search Algorithm (KSA) [24,25].
In the following, the principles of the widely used and emerging bio-inspired algorithms are briefly introduced. For comprehensive reviews of bio-inspired optimization algorithms, interested readers are referred to [9][10][11].

Evolutionary Computation (EC)
GA is the most common technique among EC algorithms. It is a random searching algorithm to solve complex problems by mimicking biological evolution, which adopts the notion of survival of the fittest as its evolution principle [15,26]. The GA is based on a set of individuals (chromosomes) that are potential solutions for the optimization problem. The initial population is determined by a random initialization method. At each iteration step (generation), the chromosomes are evaluated and given the fitness values. Based on the probability proportional to the relative fitness, the chromosomes are selected to join in a crossover process, and then a mutation process. A comparison between new chromosomes (offsprings) and previous ones is performed to choose better chromosomes for the next generation. The selection, crossover, mutation, and generation procedures are repeated to an acceptable solution, or convergence is reached. GA is powerful in searching for a global optimum since the crossover and mutation processes can preserve the population diversity and expand the searching space. Nowadays, GA algorithms are ubiquitous and have been effectively applied to various areas, e.g., optimization, machine learning, bioinformatics, automatic programming, and social systems [26].
Other popular EC algorithms are Evolutionary Strategy (ES) [27] and Differential Evolution (DE) [28,29]. To produce better and better solutions iteratively, ES uses mutation, recombination, and selection applied to a population of individuals, which contains candidate solutions. Unlike GA and ES, in which the perturbation arises following arbitrary variance, DE utilizes weighted variances among solutions to perturb the individuals. Therefore, the robustness of optimization and faster convergence can be achieved.

Ant Colony Optimization (ACO)
ACO is based on the social behaviors of some ant species which can discover the shortest route only depositing pheromones on their moving paths [17,30]. A feasible solution is represented by an ant. The probability of ant k traveling from node i to j is computed as follows: where τ ij is the amount of deposited pheromones on (i, j), η ij is the visibility heuristic value which equals to the inverse of the distance L ij , α and β are weighting parameters, and N k i represents the neighbor nodes that can be visited. The greater is the solution, the more pheromone is laid. The pheromone update process is formulated by: where ∆τ k ij is the amount of added pheromones by ant k on (i, j) and ρ ∈ (0, 1] represents the evaporation rate. ∆τ k ij is measured as follows: where Q is a fixed value, s k is the solution constructed by ant k, and f (s k ) is its cost function, which can be the path length (L k ). A sufficient iteration numbers must be perform before the termination condition is satisfied. As a result, all ants move on the optimal path with the most concentrated pheromone. ACO has followed by various enhancements and applied in many applications [17,31,32].

Particle Swarm Optimization (PSO)
PSO is a population-based heuristic approach that mimics the collective behaviors of flocks of birds and originally develops to tackle continuous optimization problems [16]. Every particle location is a possible solution for the problem. In particular, a particle i consists of a vector x i for location and vector v i for velocity. Every particle heads in the direction of its previous best location (xBest) and the global best location (gBest) in the population at every iteration as follows: x t+1 where ω is inertia value, c 1 represents the individual coefficient of acceleration, and c 2 represents the global coefficient of acceleration, and r 1 and r 2 are weighting local best model and global best model (r 1 , r 2 ∈ [0, 1]). The neighborhood of a particle in the global best model includes the particles in the population exchanging information together. In the local best model, the neighborhood of a particle is determined by a fixed number of particles. The best global model typically converges more quickly, while the best global model is more likely to be trapped in local optima [33]. The PSO applications and its variants can be found in [34].

Artificial Bee Colony (ABC)
ABC is inspired by the honey-gathering behaviors of honey bees [18]. They have different behaviors depending on their respective labor division and realize the information communication and sharing of bee swarms to achieve an optimum solution. We have three kinds of bees: scouts, onlooker bees, and employed bees. Employed bees hunt for food sources (solutions) in their memories and provide their knowledge to the onlooker bees, which pick food sources with high quality (determined by nectar amount or fitness value) among the identified ones. If the onlooker bees cannot provide a better food source, the employed bees become scouts and arbitrarily look for new food sources. A probability of the food source x i being selected is as follows: where Fit(x i ) is a fitness value corresponding to nectar quantity, and N is employed bee numbers. The neighbor food source is found by the following: where φ ij ∈ [−1, 1] represents a random value and k represents a random solution index selected from N (k = i). After the number of iterations, if a solution cannot be enhanced, it is then discarded. A scout finds a different food source to supplant the abandoned one by: where x j min and x j max represent the low and high bound values, respectively. ABC and its derivatives have applied to several applications, including combination optimization, task scheduling, resource allocation, and engineering optimization [35].

Firefly Algorithm (FA)
FA gets inspiration from the flashing rhythms and typical behaviors of fireflies [22]. Some continuous optimization problems have been solved by FA [36]. FA follows the three conceptual rules: (1) Fireflies are gender neutrality. Thus, fireflies fly toward brighter ones. (2) The attractiveness is inverse to the distance among them, and corresponds to its brightness. If there is no brighter firefly than the one in question, they will randomly fly. (3) The brightness is estimated by the fitness value. They are formulated as follows. The distance of fireflies i and j is Cartesian distance: where x i and x j are locations of two fireflies, respectively. The attractiveness β is proportional to the brightness: where γ is the light absorption value and β 0 represents the attractive parameter at r = 0. Given a random parameter α, a firefly i moves to another brighter one j as follows:

Social Spider Algorithm (SSA)
SSA is a relatively novel swarm intelligence technique compared to PSO, ACO, and many other algorithms. It is inspired by the foraging strategy employed by special species of spiders living in a group called social spiders [23]. The SSA designing is based on the information-sharing model that describes individuals in a group as free agents with the ability to perform a searching activity on an individual base, but each also seeks the opportunity to join others to accomplish a common goal [23]. The implementation mechanism of SSA initializes the artificial spiders across a hyper-dimensional search space (social web) where every location on it is a possible solution. Through iterative evaluation of a spider's location using a fitness function, the artificial spiders are manipulated to find an optimum solution. Each spider keeps in-memory information on its location and parameters that drive the optimization process: spider current location, following vibration at a previous iteration, last movement, degree of in-activeness, and dimension mask [23]. On the social web, any vibration detected is attributed to a source, and vibration has intensity. Vibration is generated during a spider goes from a location to another. At the time t, the vibration intensity I generated is estimated by: where f (P s ) is the fitness value of spider P, C is a confidently small value and P a and P b represent the source and destination of vibration, respectively. As vibration travels from one point to another, it palliates over distance. The distance between a vibration source and P a and its destination P b is defined by 1-norm (Manhattan distance) as: Then, the vibration palliation obtained by a spider is estimated by: where r a governs the palliation ratio, and σ represents the standard deviation average including all spider locations. The above equations manipulate a set of spiders with the number of steps toward obtaining optimal results to a given optimization problem. SSA can solve some real-world issues such as transmission expansion planning [37], railroad operation plan [38], and economic load dispatch [39]. An improvement of SSA can be found in [40], which considers the vibration triggered by trapped prey on the web.

Kestrel-Based Search Algorithm (KSA)
KSA is a emerging SI technique influenced by the hunting behavior of kestrel birds such as random encircling, the use of the eye to detect the position of prey, the velocity of kestrel to move and capture its prey, and the trail evaporation from a prey [24,25]. The KSA uses the concept of the half-life of radioactive substances. Initially, the KSA generates a set of random kestrels and then finds an optimal parameter in a search space. The kestrel's position is given by: where x k i+1 is the current better position, x k i is the last position based on random encircling formulation, β 0 e −γr 2 represents how attractive a light reflection is from a trail which varies within [0, 1], β 0 is initial attractiveness value, r is Minkowski distance, x j represent a better position of the kestrel, and f k i is the bobbing frequency to detect its prey within sight measurement. When kestrels get to a better position, the bobbing frequency is applied to exploit the frequently changing conditions at time t. The random encircling is defined as follows: where represents kestrel's previous position, x(t + 1) represents kestrel's position, and r 1 , r 2 ∈ [0, 1] are random numbers. z controls the active mode with flight mode parameter z hi and perched mode parameter z low as follows: where itr represents the current iteration and Max − itr represents the total number of iterations. Based on the best position of the leading kestrel, the other kestrels update their position. Finally, the kestrel's velocity is updated by: where v k t is initial velocity, v k t+1 is current best velocity, and x k t is current best position. Prey deposit trails, which used by kestrels to search for food sources. Kestrels do not follow a depleted source of food and prefer to explore new areas of fresh food sources. The diminishment of the trail indicates the unstable nature of trail substances. Conceptually, given N unstable nodes, d N d t = −γN is a radioactive substance decay rate with time t. It can be abridged by γ t = γ 0 e −ϕt , where γ 0 is initial value. Decay constant ϕt is re-measured by ϕ = ln0.5/−t 0.5 with half-life −t 0.5 . If ϕt is larger than 1, the trail is preferred to be fresh; otherwise, the trail is preferred to be old. KSA can resolve some optimization problems, e.g., feature selection in a classification problem [24] and energy optimization in wireless sensor networks [25].

Smart Energy Management Systems Based on Bio-Inspired Algorithms
In recent years, research on EMS has gained more attention due to the global demand for efficient energy and the reduction of harmful substances into the immediate environment [1,3,6,7,14]. "Smart" has been used to depict intelligence and EMS's ability to make intelligent decisions on scheduling energy loads and minimizing energy consumption within a specified time horizon. EMS are computer-aided tools capable of monitoring, supervising, optimizing, and managing users, distribution, transmission, and generator facilities. Its primary purpose is to create an efficient and cost-effective balancing between supply and demand within operational constraints and uncertainties of renewable energy resources, energy costs, and customer patterns [3]. Besides, IoT and machine learning are becoming increasingly prevalent and useful for the efficient operation of the EMS [3,7].
Two widely implemented EMS are HEMS [1,6,14], BEMS [7,8]. Generally, the purpose of EMS is to minimize energy consumption through device scheduling within specified time horizons. In this regard, both HEMS and BEMS have the same objective-energy consumption minimization. However, the design and implementation of these systems are different, which poses challenges to EMS's efficient implementation. The rising demand for electricity and the scarcity of primary energy sources have resulted in reliance on RES. One of the latest solutions for this problem is a smart grid. The smart grid and advanced ICT can combine distributed and renewable energy sources, reducing the impacts of the vast number of electric vehicles (EV) and peaking power stations.
In the smart grid, Demand-side Management (DSM) and Demand Response (DR) are two essential elements of an EMS [3]. The DSM component is a series of load control decisions, including planning, executing, and monitoring predefined operations influencing consumer patterns in energy usage. DSM can systematically transfer and disperse usable energy to reduce emissions and peaking loads using the DR program and allow users to select their preferences in the source of energy. The DR program is responsible for providing dynamic pricing schemes, which include incentive-based schemes and time-based pricing schemes, e.g., Time-of-Use (ToU), Real-time Pricing (RTP), Critical Peak Pricing (CPP), and Inclining Block Rate (IBR) [6,13]. Optimization and scheduling of energy usage can be achieved when the EMS controller obtains the DR data and price tariff for energy from the service providers. This optimization and scheduling problem can be implemented in conjunction with hard and soft constraints. The hard constraints ensure computed solutions' feasibility, e.g., every appliance must be scheduled to work within its permitted period. The soft constraints are not vital but desirable, e.g., the appliances can be planned to work as soon as possible at the beginning of its allowable duration of service [14].
The smart EMS, based on bio-inspired approaches, is illustrated in Figure 1, which includes energy sources, optimization objectives, algorithms, and applications. In general, energy supplies are categorized into traditional and renewable energy sources, contributing significantly to reliable energy generation. As energy is produced from these sources, factors such as peak-to-average ratio, energy demand, electricity cost, emission cost, operation cost, and user comfort must be considered as it influences which energy source or combination of energy sources could be factored into the energy generation mix. The control of these factors is achieved with EMS controllers that provide a scheduling mechanism based on the received information and then signals the EMS to respond accordingly by optimizing the factors within a time horizon. In this regard, the smart EMS should intelligently manage information from the EMS controller, and one of the approaches to achieve this is using algorithms such as bio-inspired approaches. The strength of bio-inspired search approaches is their ability to avoid searching unpromising local search space to produce a global optimized search result. By so doing, the performance of smart EMS is enhanced. This search strategy makes it flexible when applied to energy management applications used in our homes, buildings, energy grids, and the Internet of Energy. Bio-inspired techniques are more powerful than exact methods to resolve optimization problems since they effectively search in the feasible region to find an optimal solution [10,11,41]. The following subsections present the concepts, architectures, optimization objectives, and bio-inspired approaches in the smart EMS.

Smart Home
Recent developments in ICT include the use of the IoT, smart meters, smart sensor technologies, smart appliances, and home energy storage systems have been developed. The rising use of these technological interventions has provided the technological framework and infrastructure for a smart home. In particular, it enables the communication between users and appliances and enhances the automation, monitoring, and remote control of home appliances. The increased energy demand and the advent of smart grids have created new perspectives and dimensions for smart HEMS.
The smart HEMS is a DR platform that monitors and schedules different home appliances in real-time by considering consumer needs through a smart home human-machine interface to save electricity cost, enhance the energy efficiency, and preserve the user comfort [1,6]. Figure 2 presents the overall paradigm of a typical smart HEMS. It includes a smart meter, HEMS controller, smart appliances, energy distribution, and advanced communication systems. The HEMS controller provides monitoring and control functions for the homeowner based on the local communication network (e.g., LAN, WLAN, Wi-Fi, ZigBee, and Bluetooth). Real-time data on smart appliances' energy usage can also be obtained by the HEMS controller to perform optimal demand dispatch. The smart meter functions as an interactive communication channel between smart homes and power providers. In general, it receives a DR signal as input data to the HEMS controller. Then appliance scheduling is executed for DR. Meanwhile, the application of EV as a replacement for conventional vehicles with a combustion engine is becoming increasingly of interest. An EV not only operates as a load but also can be utilized to provide emergency energy to other household loads [42]. In residential areas, distributed renewable generations usually include solar panels. Residential electricity supplies can be incorporated entirely into HEMS, enabling smart homes not merely to rely on the transmission systems' bulk electricity. Therefore, energy storage systems (ESS) are vital in improving energy quality and conservation and ensuring electricity system stability. The purpose of HEMS is to control energy usage better. To do this, the HEMS tracks household use and schedules the function of the appliance. It can be accomplished by scheduling strategies to determine the best timing of the operation of smart appliances. Some common objectives considered for appliance scheduling are described as follows [1,2,6]: • Electricity cost usually includes any financial expense related to energy management. Cost is the simplest criterion to calculate since numerical values for these different components are readily accessible.

•
Peak-to-average ratio (PAR) represents a rate of peaking energy consumption to average energy consumption. When this rate is near one, the services are heavily used since the load profile is relatively flat. When this rate is low, there is a significant idle system capacity resulting in higher operating costs.
• User comfort is a set of criteria, such as temperature, humidity, lighting, and air quality, making people more comfortable and increasing their productivity. There are three main types of comfort: air quality, thermal comfort, and visual comfort. Furthermore, the user comfort level can be measured based on the delay rate for the appliances' service.

•
Emission is typically expressed in grams of carbon dioxide equivalent per kWh of electricity usage. It refers to greenhouse gas emissions related to energy consumption, depending on the grid emission intensity. Table 1 shows an overview of the typical studies used bio-inspired algorithms in HEMS. Among them, GA and PSO are the most prominent. The GA is applied to numerous HEMS models as follows. Zhao et al. [43] combined RTP with IBR pricing schemes in their HEMS model, and then adopt GA to optimize the operation start timestamps of appliances to decrease both the energy cost and PAR. An improvement of this model was proposed in [44] by integrating RES in the system. In [45], a system including GA, system identification, and model predictive control achieved significant energy and cost savings while ensuring reasonable user comfort levels. Javaid et al. [46] aimed to reduce energy expense and consumer discomfort while considering peaking energy usage via appliance scheduling. They presented a hybridization of GA and binary PSO (BPSO) called the GAPSO method. This proposed hybrid method obtained substantial reductions in energy cost with minimum user discomfort in comparison with GA, BPSO, and dynamic programming (DP). Rahim et al. [47] integrated HEMS with RES and ESS, requiring modifications in heuristic algorithms. For energy pricing, the authors presented a hybrid model based on TOU and IBR. Simulations revealed that GA worked more effectively than BPSO and ACO with regard to reducing energy cost and PAR and increasing user comfort. In [48], a GA-based evolutionary accretive comfort method was introduced to produce an optimum power allocation schedule, which results in comfort maximization within a predefined consumer budget. Hussain et al. [49] presented a multi-objective GA (MOGA) along Pareto optimality to optimize the size of a dispatchable generator that guarantees a reliable energy supply during large load shedding hours. To obtain optimum trade-offs between energy cost, thermal comfort, and peak demand reductions, Hu et al. [50] presented a DR control model for inverter air conditioners with a day-ahead tariff. In the model, GA was implemented to search ideal schedule settings for controllers.
Several studies utilized the PSO in their HEMS models. For example, in [51], a HEMS appliance scheduling model was developed based on the day-ahead pricing scheme and photovoltaic production with the objectives of energy, user discomfort, and emissions minimization. The drawbacks of PSO are the problems of locally optimal trapping and premature convergence. A cooperative multi-swarm PSO method was developed to overcome PSO's drawbacks and to schedule different appliances. A PSO variant in [52], called a weighted-sum PSO, was implemented to find the optimal function of DR for load shifting. Their HEMS model also includes the dispatch strategy for ESS, solar panel, and energy grid systems. The major objectives include the minimization of energy cost, customer discomfort, and peak load. Faia et al. [53] presented a PSO-based energy management paradigm. The scheduling method with the objective of operation expense minimization takes variables, including photovoltaic production, available storage capacity, and dynamic loads into consideration. Cao et al. [54] developed PSO and its variants for a purpose-built heat pump control tool. Among them, the crossover sub-swarm PSO obtained a mean savings of 25.61% while ensuring an acceptable degree of user comfort. Dinh et al. [55] proposed a novel HEMS paradigm, including RES and ESS, taking the energy consumption and selling model into consideration. Energy cost and PAR objectives were included in the fitness function. The hybrid of PSO and BPSO was developed to tackle the optimization problem, i.e., BPSO and PSO update the binary variables and continuous variables, respectively. Simulations showed that the hybrid method reduced the electricity cost and PAR by roughly 10% compared with that of BPSO. HEMS with the incorporation of RES and ESS is considered in [56]. Simulations showed that the integrated model reduced by approximately 20% both electricity expense and PAR. Furthermore, the hybrid of GA and PSO methods surpassed other bio-inspired algorithms by decreasing both electricity expense and PAR by approximately 25%. Ullah et al. [57] proposed a simulation model for a GA and PSO-based energy management framework. The sensors collect the data, and then the Kalman filter eliminates the noise from the collected data. In the study, the case study was conducted in South Korea, and the heating situation was regarded since the temperature was already below the country's comfort index. Other bio-inspired algorithms are also applied in HEMS models. Essiet et al. [60] introduced an improvement of enhanced DE technique in which the two-archive method boosts the performance of mutation and crossover operators. It was implemented to align the load scheduling and participation of RES in HEMS to optimize energy consumption while reducing PAR and improving user comfort. Silva et al. [61] proposed a mutation operation integrated ACO scheduling approach with a predefined consumption threshold to reduce electricity bills and delay. Then, the proposed approach reduced total cost by 5.44% compared with baseline ACO-based HEMS. Bui et al. [63] proposed a dynamic and distributed ABC-based appliance scheduling method to minimize energy usage. By taking the IoT advantages, the appliances are connected and collaborated as a fully decentralized HEMS. In [59], FA was deployed in HEMS to resolve the scheduling problem that aimed at reducing energy usage and expense, peak load demand, and improving customer comfort under the RTP signals. In [62], GWO was used for a multi-objective energy scheduling problem in the HEMS with IBR and RTP tariffs to minimize the energy expense, PAR, and customer discomfort. The proposed approach was compared to GA and yielded better results under the same user consumption profiles. Similarly, in [64], GWO-based HEMS outperformed PSO-based HEMS in terms of minimizing the electricity expense, PAR, and maximum peak load consumption. Aslam et al. [58] suggested a CS-based appliance scheduling scheme to reduce energy cost and PAR within a reasonable delay under RTP signals. CS performance was seen to be superior to GA since CS spent more time on global exploration than local exploration, and the number of parameters required to be tuned from CS was less than GA.

Smart Building
Buildings have recently been a significant concern for environmental issues as they absorb about 40% of global electricity supply and account for 30-40% of emissions [8]. To overcome this, the concept of smart buildings has emerged. Smart buildings bring to the buildings the energy advances which concentrate on automated resource allocation, user comfort, and efficient energy consumption [7]. Thereby, they can be sufficiently adaptable to shift load to cheaper price periods, reduce energy cost, and maximize the use of local RES and ESS [65]. To support that, the idea of BEMS is now being used. BEMS can monitor and control building energy demand to optimize total energy usage, taking into account the consumers' convenience and comfort.
BEMS manages all the electricity generators, energy storage, loads, and communication networks, as shown in Figure 3. Significant loads considered in BEMS consist of electric lights, and charging loads, and HVAC. Hence, the ultimate goal of sustainable development in smart buildings is to enhance energy efficiency by minimizing energy losses and environmental impacts. In particular, renewable energy generators can be built into buildings and district infrastructure to boost the sustainable community [47,66]. The discussed BEMS is also known as a nearly or net-zero energy building (nZEB) [8]. Research on the buildings' energy efficiency involves the following dimensions: determining the appropriate type of sensors and control systems such as IoT; using suitable consumer modeling methods to identify consumer behaviors; conducting simulations; utilizing power usage and consumer comfort optimization; and implementing control methods to energy usage systems.  Table 2 presents an overview of the typical works using bio-inspired approaches in BEMS. In particular, Lu et al. [67] compared two approaches to optimizing renewable energy systems, i.e., GA with a single objective and Non-dominated Genetic Sorting Algorithm (NSGA-II) with multiple objectives. They considered three objectives, namely the overall expenditures, emissions, and the index of grid interaction. With more information, the NSGA-II makes better decisions in optimization in comparison with GA. In [68,69], Shaikh et al. proposed a multi-agent system together with stochastic optimization utilizing the MOGA for BEMS. The proposed control system offered considerable efficiency in energy utilization and indoor pleasure (i.e., thermal comfort, lighting, and air quality). Delgarm et al. [70] adopted a multi-objective PSO (MOPSO) for energy efficiency with respect to the use of electricity for ventilation, heating, and illumination. Reynolds et al. [65] implemented an ANN model for forecasting the heating power demand and zone temperature, then combined ANN and GA model to decrease the energy cost by 25% over a test week. Ali et al. [71] introduced an optimization technique for user comfort and energy cost with GA and fuzzy controllers in a residential building. The optimized parameters were temperature, lighting, and air quality representing the consumer comfort index. The same optimization models were studied in [72][73][74]. Particularly, instead of using GA to solve the optimization problem, Wahid et al. [73] used ABC with Knowledge Base, which considered the historically optimized parameters. Via simulations, it was shown that the ABC-KB-based model consumed less energy and maximized user comfort index than the GA and PSO-based models. In addition, BA, which is a SI approach inspired by the properties of bats in echolocation, was used in [72], and an ensemble of GA and PSO was used in [74]. Beyond the scale of buildings, Bucking et al. [66] suggested an approach to co-optimize buildings and community energy networks to minimize energy utilization and stabilize the loads. The dEA algorithm was introduced to help communities achieve net-zero energy and alleviate peaks applying a district energy system at the same time. For the interconnection between the smart grid and smart buildings, Hurtado et al. [75] introduced a dual agent-based control system that used PSO for optimization strategy in BEMS. It was concluded that the PSO had a tremendous capacity for electricity efficiency, user comfort maximization, and voltage grid support.

Smart Grid
A smart grid is a future energy solution, which combines energy transmission and distribution processes with state-of-the-art sensor technologies, control techniques, and networking capabilities [5]. It allows the delivery of electricity more efficient and user-friendly. Figure 4 illustrates the smart grid's general architecture. Recently, utilities have implemented various algorithms in a decentralized manner to coordinate different elements in various locations in their electrical networks. With the support of high-speed and bi-directional communication protocols, IoT devices such as smart meters communicate with each other to perform the analysis or make decisions in independent or collaborative manners. Additionally, the development of distributed intelligent methodologies such as monitoring, detecting faults, maintaining, and integrating RES into EMS has enhanced overall system performance and reliability. Microgrid, a great solution for integrating RES under the smart grid environment, has drawn the interest in the research community [4,12]. A microgrid is a local energy distribution with a self-control mechanism that manages distributed energy sources and loads in a coordinated manner. There are two modes of a microgrid: connected to the grid or isolated. It uses several types of RES, such as wind, photovoltaics, and microturbines, as the electricity generators [4]. Therefore, it can enhance the grid's reliability and address the electricity crisis.

Generation
Transmission   Table 3 presents an overview of the typical studies using bio-inspired approaches in the smart grid. Several works focused on strategies of deploying and sizing distributed generation and energy storage systems to reduce energy loss, which can happen through electricity transmission from the central power stations to the consumer. For example, in the existing distributed generators, Kalkhambkar et al. [76] implemented GWO to find optimal placement for energy storage to minimize electricity deficit through peak shaving. In [77,78], with the target of total investment cost minimization, PSO was used to optimally scale isolated-hybrid diesel/solar/wind/battery power systems. It was implemented in the parallel method to speed up the optimization process. In [79], PSO was also applied but to optimize the scale and location of ESS to enhance the dependability of the radial distribution hybridization system. SSA was utilized in [37] to tackle the transmission expansion planning issue, which identifies a collection of additional power lines to expand the electric grid capacity. In [39], a variant of SSA was developed to address an economic load dispatch issue, which determines the optimum scheduling of electricity generator, taking into account fuel consumption and power unit generator restrictions. Improved ABC also resolved this problem in [80].
In the smart grid, load scheduling is also one of the most crucial problems. Elsied et al. [81] presented an advanced real-time EMS which used GA to minimize the electrical expense and pollution whereas maximizing the capacity of usable RES generators in a microgrid. Neves et al. [82] discussed a GA-based controllable loads optimization for an isolated microgrid controller concerning the dispatch expenses, renewable assets, and emissions. Dai et al. [42] proposed a combination of a multi-agent system and PSO, called the multi-agent PSO algorithm, to size solar panel, battery, and find the charging/discharging pattern of battery. Radosavljevic et al. [83] employed PSO to reduce the total expense of energy and operation through optimally changing EMS control variables and following various operational constraints. Li et al. [84] implemented an EMS based on a regrouping PSO technique for commercial microgrids with high RES penetration. The system's goal is to minimize fuel consumption and operational cost through day-ahead scheduling, considering energy demands and the prediction of produced electricity by generators. Shi et al. [85] used PSO for load scheduling for minimizing energy expenditure. They selected several examples of changing the renewable electricity usage ratio and consumer comfort level and then implemented them in a smart community. In [86], an integrated energy system including solar panel, combined heat and power, and the ESS battery was designed to obtain a minimum operating expense, considering the battery life loss. An improved DE algorithm was used to test the system in three battery states. Safamehr et al. [87] used ABC-quasi-static techniques to decrease the electrical expenditure and peak demand for reshaping load profiles. Simulation findings showed that this technique decreased energy expenditure by 8.33% and peak demand by 11.11%. Finally, considering the fluctuations of demand prediction, wind turbine generator, solar panel generator, and energy price, Mohammadi et al. [88] investigated an adaptive FA algorithm for the optimal operational control of a microgrid with RES. Table 3. Overview of the typical studies used bio-inspired algorithms in smart grid.

Reference & Year Techniques Objectives Highlights
[87] 2015 ABC Energy cost, peak demand The paper presented a cost-effective and reliable microgrid. ABC and quasi-static methods were used to minimize electricity costs and peak demand by 8.33% and 11.11%, respectively.
[76] 2016 GWO Energy loss GWO was used to find optimal placement of ESS in a smart grid with the presence of RES.
[39] 2016 SSA Fuel cost A variant of SSA was developed to discover the optimal scheduling of energy generation in an economic load dispatch problem.

Challenges and Research Opportunities
This section discusses the limitations of the previous studies, which could serve as potential research directions for bio-inspired approaches to smart energy management.

Emerging and Hybrid Bio-Inspired Approaches
We observe that the number of studies on bio-inspired approaches to sustainability and smart energy management issues has grown significantly. However, none of the particular approaches could be ideally suited to all kinds of issues. The problem needs to be formulated in a manner that is fitting for the algorithm. Moreover, real-world problems usually take more than one objective into account. They are typically conflicting, so it is crucial to find suitable trade-offs among them. Furthermore, the problem gets more complicated when it includes both binary and continuous variables. We think that bio-inspired algorithms with parallel and multi-objective processing will be exciting research directions. The hybridization of them can also be a potential research direction.
Several new bio-inspired approaches have been published recently. For example, Social Spider Prey Algorithm [40] is an emerging nature-inspired algorithm that takes the vibration created by trapped prey on the web of the spiders into consideration. This algorithm helps to identify the feasible solution on a hyper-plane in a multi-objective optimization problem. Whale Optimization Algorithm [89], motivated by the behaviors of Humpback whale, has been used to achieve the optimal size of distributed generators [90]. Ant Lion Optimization [91], which is designed based on the special hunting behavior of ant lions, has also been used to identify the optimum size of distributed generation [92] and find energy scheduling in microgrid [93]. Earliglow Algorithm, which takes advantage of both Jaya and strawberry algorithms, is applied in HEMS with significant achievements [94]. Dragonfly Algorithm, which is motivated by the behavior of hunting and migration of dragonflies, is used in HEMS with objectives of energy cost, PAR, and delay minimization [95]. Other different issues in energy management systems are also solved by many other new bio-inspired algorithms, such as Wind-Driven Optimization [96], Grasshopper Optimization Algorithm [97], Bacterial Foraging Algorithm [97,98], Flower Pollination Algorithm [98], Glowworm Swarm Optimization [99], Artificial Fish Swarm Algorithm [100], and Kestrel-based Search Algorithm [24,25].
The bio-inspired algorithms could be hybridized to reduce time complexity or space complexity and further improve the solutions. For instance, an ensemble of GA and PSO is proposed to minimize power utilization and enhance user comfort [74]. A hybridization of Bird Swarm and Cuckoo Search techniques is presented to resolve a multi-objective scheduling problem in HEMS [101]. A combination of the Bat Algorithm and Flower Pollination Algorithm is used for scheduling shifting appliances [102]. A meta-heuristic integration of the enhanced DE and Harmony Search Algorithm has been proven to be effective regarding energy cost and PAR reduction in HEMS [103]. A Wind-Driven Bacterial Foraging algorithm, which combines a wind-driven algorithm and a bacterial foraging algorithm, has been implemented to systematically schedule IoT-based appliances in the smart home to eliminate PAR, decrease energy expenditure, and increase consumer comfort [104]. Some other studies have also applied hybrid bio-inspired approaches to solve different issues in EMS [105][106][107][108][109]. The hybrid algorithms can enhance the convergence and computational time of energy optimization and scheduling problems. However, more consideration should be given to the types of problems (i.e., single or multiple objectives), kinds of optimization (i.e., local or global), efficiency, or reliability when selecting an algorithm to solve these optimization problems.

Coordinated Energy Management Systems
Bio-inspired algorithms could face difficulties in solving load optimization problems under heterogeneous and dynamic environments. Because they are typically applied in a centralized fashion, the computational cost rises along the environment's scale and complexity. Decentralized frameworks can be applied to overcome this issue. For instance, every energy consumer can be an agent in the multi-agent system, exchange information, and perform computation together to achieve the optimal state of energy usage. It could bring more flexibility to the coordinated management system. With the big data from IoT devices/smart meters, the integration of bio-inspired approaches with machine learning techniques should be explored in predicting load demands, automated context exploration, and artificial context perception, moving to EMS self-adapting and self-reconfiguration. RES are the most exciting alternative energy sources due to their prosperous and sustainable features. However, they also come with irregular and unpredictable characters [47,99]. Therefore, the usage of single RES could result in an excessive system. As a result, hybrid renewable energy systems (HRES) have emerged [110]. They combine different RES and/or with ESS and traditional energy sources. They can be operated independently or connected to the main grid. To further improve the performance and reliability of the HRES, comprehensive investigations are needed regarding the real-time and cost-effective RES deployment and appropriate ESS selection. For example, in the large-scale HRES, the sizing problems, the optimal placement of energy resources, and capital/operational cost optimization problems could be challenging. Finally, the plugged-in EV have dual roles, namely as consumers and generators. Hence, it is also essential to include them in EMS.

Internet of Energy and Beyond
The latest computing and networking paradigms offer essential motivation for developing different heuristics for incredibly complicated tasks. Hence, the developments of existing bio-inspired approaches regarding these new paradigms could substantially improve computing efficiency. For example, an Internet-style solution has been introduced for exploiting the bidirectional transmission of energy and data, namely the Internet of Energy (IoE, also known as Energy Internet) [111][112][113][114]. It takes both the characteristics of the smart grid and IoT. IoT is known as a novel communication paradigm that enables a large number of smart objects to communicate with each other and share services and information [7,49,104]. On the other hand, the smart grid can provide two-way connectivity among a power grid and EMS, monitor, and control power generator equipment [3,5]. Some existing works have built fundamental concepts and addressed different aspects of IoE. In [115], the authors foresaw a transition of the conventional energy networks, which have excess capacity to meet peak demands, to a more stable combined system where energy is generated to meet peak demands, storing energy either chemically or thermally, or time-shifting to meet the demand-supply. In [116], the authors proposed an energy router-based microgrid interconnection framework, in which the energy router functions as a gateway for the establishment of electrical transmissions between microgrids and the main grid. With a target of a distributed, scalable, and privacy-protected energy management in IoE, the authors of [112] introduced a distributed computational intelligence paradigm where each energy device as an agent manages its private database and performs local computing without sending private data to others. In [117], the authors presented a decentralized HVAC management scheme where every smart device is linked by the wire connections and collaboratively interacts with others. Likewise, in [63], the authors proposed a decentralized HEMS where smart appliances communicate with each other to perform scheduling optimization based on a distributed ABC algorithm. In [113], a novel IoE communication platform was introduced to enable peer-to-peer (P2P) communications among microgrids. In [118], the authors reviewed the crucial challenges and concerns for the IoT applications in sustainable energy systems. Finally, Blockchain technology could be used to allow various electrical providers to trade energy and carry out energy transfers without requiring a third party [114].
For the foreseeable future, IoE will be progressively utilized in buildings, EV, distributed power systems, and local and commercial sectors. It will require comprehensive intelligent monitoring and control for distributed and intermittent energy generation and storage. In this context, a range of new problems should be addressed, such as the P2P energy trading between prosumers, optimizing EV charging stations' location, dispatching and managing energy optimization, and exchanging information and energy in the smart grids. Therefore, further studies could investigate the bio-inspired approaches to these issues.

Concluding Remarks
This paper provides a comprehensive analysis of recent studies on bio-inspired approaches for smart energy management systems consisting of HEMS, BEMS, and smart grid. In summary, the bio-inspired techniques can be used to minimize energy consumption, stabilize the energy loads, improve user comfort, and reduce emissions. Furthermore, with the aid of the Internet of Energy, the bio-inspired approaches can provide a more efficient control system for distributed and hybrid renewable energy sources and enhance the scope of smart energy management systems for developing even smarter systems.

Conflicts of Interest:
The authors declare no conflict of interest.

Abbreviations
The following abbreviations are used in this manuscript: