APP下载

Smart Energy Management System Using Machine Learning

2024-03-12AliSherazAkramSagheerAbbasMuhammadAdnanKhanAtifaAtharTaherGhazalandHussamAlHamadi

Computers Materials&Continua 2024年1期

Ali Sheraz Akram ,Sagheer Abbas ,Muhammad Adnan Khan ,Atifa Athar ,Taher M.Ghazal and Hussam Al Hamadi

1School of Computer Science,National College of Business Administration&Economics,Lahore,54000,Pakistan

2Riphah School of Computing&Innovation,Faculty of Computing,Riphah International University,Lahore Campus,Lahore,54000,Pakistan

3Pattern Recognition and Machine Learning Lab,Department of Software,Gachon University,Seongnam,Gyeonggido,13120,Korea

4Department of Computer Science,COMSATS University Islamabad,Lahore Campus,Lahore,54000,Pakistan

5School of Information Technology,Skyline University College,Sharjah,1797,United Arab Emirates

6Network and Communication Technology Lab,Center for Cyber Security,Faculty of Information Science and Technology,Universiti Kebangsaan Malaysia,Bangi,Selangor,43600,Malaysia

7College of Engineering and IT,University of Dubai,Dubai,United Arab Emirates

ABSTRACT Energy management is an inspiring domain in developing of renewable energy sources.However,the growth of decentralized energy production is revealing an increased complexity for power grid managers,inferring more quality and reliability to regulate electricity flows and less imbalance between electricity production and demand.The major objective of an energy management system is to achieve optimum energy procurement and utilization throughout the organization,minimize energy costs without affecting production,and minimize environmental effects.Modern energy management is an essential and complex subject because of the excessive consumption in residential buildings,which necessitates energy optimization and increased user comfort.To address the issue of energy management,many researchers have developed various frameworks;while the objective of each framework was to sustain a balance between user comfort and energy consumption,this problem hasn’t been fully solved because of how difficult it is to solve it.An inclusive and Intelligent Energy Management System (IEMS) aims to provide overall energy efficiency regarding increased power generation,increase flexibility,increase renewable generation systems,improve energy consumption,reduce carbon dioxide emissions,improve stability,and reduce energy costs.Machine Learning(ML)is an emerging approach that may be beneficial to predict energy efficiency in a better way with the assistance of the Internet of Energy(IoE)network.The IoE network is playing a vital role in the energy sector for collecting effective data and usage,resulting in smart resource management.In this research work,an IEMS is proposed for Smart Cities(SC)using the ML technique to better resolve the energy management problem.The proposed system minimized the energy consumption with its intelligent nature and provided better outcomes than the previous approaches in terms of 92.11%accuracy,and 7.89%miss-rate.

KEYWORDS Intelligent energy management system;smart cities;machine learning

1 Introduction

Rapid energy use is one of the most severe challenges in the current situation.Energy is precious since it is generated by burning nonrenewable materials that require millions of years to develop.While technological improvements in the contemporary world have made our lives easier,they have also increased energy usage.Almost everything takes energy to function,which swiftly depletes scarce resources.The depletion of energy resources is also growing quickly due to ever-growing modernization.As a result,it is an urgent call from nature to resolve this worldwide problem.

Energy management is optimizing energy consumption for the most excellent possible results while also conserving it[1].It also involves energy production planning and energy storage for future use.It is necessary to deal with rising prices and regulatory obligations.When fossil fuels generate energy,greenhouse gases,mostly Carbon Dioxide(CO2),are emitted into the atmosphere.This adds to the unfavorable phenomena of global warming.As a result,effective energy management is also an essential part of carbon control[2].

Ensure that optimal energy practices are followed in industries to save money,increase productivity,and provide a safe and healthy work atmosphere.In commercial buildings,Energy Management(EM) implies efforts to decrease electrical energy consumption expenses while maintaining work quality [3].In logistics,EM includes selecting the appropriate mode of transportation,routes,load optimizations,and the use of fuel-efficient vehicles.The energy procurement includes the sale and purchase of energy units.An organization’s energy expenses may arise due to poor approach and transactional judgments.So,EM helps to make proactive and intelligent purchasing decisions in this industry.

The following are some of the advantages of EM:

• Reduced costs

• The possibility of energy shortages is being reduced

• Emissions of greenhouse gases are being reduced

• Energy prices have been maintained

Appropriate EM will ensure that energy and electronic appliances are affordable in present times and the future.So,the goal of this procedure is to achieve complete environmental protection as well as economic savings.Energy optimization is the exact opposite of energy waste.The term“going green”simply means using less energy when lighting a candle,doing the laundry,or heating your house.As the more energy is consumed,the more carbon dioxide is released into the environment,and too much carbon is contributed to global warming.Energy optimization reduces carbon emissions,saves money,and improves the earth for future generations.

The global economy primarily relies on oil and gas;thus,as these resources become scarcer,their price rises.This leads to global financial imbalances as well as energy poverty in society.Building modifications can also be performed to minimize energy use and expenses.Some examples of this are making small changes,such as switching to Light Emitting Diode(LED)bulbs and energy-efficient appliances and more significant ones,like upgrading the home’s insulation and weatherization.

Power plants generate“waste”heat that can be used to deliver heating,cooling,and hot water for adjacent buildings.Using a smart grid will improve the efficiency of energy production,distribution,and usage all at once.The major energy-carrier countries are working hard to decrease energy waste and optimize energy.Consequently,they have been able to significantly lower the expenses associated with energy-saving while also stopping environmental destruction.

The most critical challenge for every residential building is effectively managing energy while also increasing resident comfort.This is because energy usage rises significantly with time and becomes increasingly exclusive,and users cannot negotiate their convenience.Energy consumption reduction and user comfort maximization must be balanced to achieve both aims.A control system is required in any residential structure to guarantee user comfort while reducing energy consumption[4].

Electricity generation and demand must be in balance in power systems.Most generating units are dispatched by grid operators depending on operational costs or market bid prices.More resources are frequently necessary to boost generation capacity to satisfy higher demand during peak periods.Adding resources to satisfy peak demand is costly,so distribution system designers and utility engineers frequently look to the Partial Load Ratio(PLR)as a viable alternative.PLR,on the other hand,is primarily important for utilities and is only widely used in a market-driven EM framework.In these situations,Demand Response(DR)[5,6]allows customers to play a considerable role in grid functioning by lowering or changing their power during peak hours concerning time-based pricing or other financial inducements.Innovations,such as EM with smart meters,which can track energy consumption in a household on an hourly basis,are gaining popularity.In this concept,a user gets charged differently for energy usage depending on the day.

The smart house with a Home Energy Management(HEM)system[7]now has a technologically advanced infrastructure due to recent advancements in Information and Communications Technology(ICT).The resources are now available in constructing smart homes to advance low-power,costeffective,and high-performance in energy related industries.Consequently,a service platform may be installed in a smart home to effectively manage the DR.This kind of solution allows consumers to make their own decisions on how to operate their home gadgets [8].This improves the system’s coherence,usability,and scalability.

Smart city solutions leverage communication and networking technology to address urbanization concerns and the expanding population.Internet of Thing(IoT)is a vital facilitator for smart cities in which essential elements are sensors,actuators,communication and network devices.The sensor devices identify and monitor city operations in different settings in real-time.Designing a completely optimal framework is difficult due to the unified nature of smart cities and many technologies.Furthermore,smart city solutions must be energy-efficient from the perceptions of both people and the environment.

While improving performance with continuous network operations,IoT devices must be selfsufficient without impacting Quality of Service(QoS).As a result,IoT devices’energy efficiency and life duration are critical to next-generation smart city systems.Smart cities may benefit from a variety of advanced IoT technologies.The energy demand for IoT applications is increasing while the quantity and requirements of IoT devices continue to expand.As a result,smart city clarifications must be able to properly use energy while also dealing with the issues that come with it.EM is seen as a crucial approach for realizing complex energy systems in smart cities.

Smart cities’energy management can be separated into two broad classifications: energy-saving measures and energy-harvesting activities.Fig.1 depicts this classification and a sample of possible research topics [9].Lightweight protocols,scheduling optimization,energy consumption prediction models,a cloud-based method,low-power transceivers,and cognitive management systems are just some of the energy-efficient alternatives for IoT-enabled smart cities.Energy harvesting enables IoT devices to power their operations through RF and ambient energy sources.This technology’s goal is to extend the life of IoT devices.Design of energy harvesting receiver,energy arrival rate,minimum engagement,scheduling,and multi-path routing of reliable energy sources are among the research topics covered by both types of energy harvesting.Individually academia and industry are concentrating on energy management in smart cities.

Machine Learning(ML)[10,11]is gaining prominence in the present era for delivering solutions to various challenges in different sectors.ML enables computers to learn from data without human interaction and to make decisions.ML is an effective method for uncovering secret knowledge by learning from data recursively rather than being directly programmed.It also allows computers or software to examine,forecast,and sort massive data volumes and derive valuable information.The learning process starts with data,guidelines,and assumptions to make enhanced decisions in the future.ML techniques have been revealed to be operational in solving various global issues,particularly in areas where huge volumes of data are involved.ML approaches are used to study household energy usage patterns on a daily and monthly/yearly basis in order to identify the times of day and months/years when they consume the most energy.

This research work is designed on the multiple sections:introduction,literature review,limitations of previous work,proposed model for energy management,simulation results,and the conclusion,respectively.

2 Literature Review

Researchers have proposed various optimization techniques and parameter modifications to minimize energy usage.Several researchers have employed ML’s incredible capability in energy management.In[12],researchers have proposed using ML algorithms to evaluate home energy usage patterns on a daily and seasonal basis to identify the times of day and seasons when they consume the most energy.Using clustering algorithms,they divided homes into several behavioral classes.It was possible to effectively target houses with energy-saving initiatives and produce more accurate energysaving estimates by segmenting homes.They also considered the season impact,seeing that certain houses behave very differently in various seasons.The houses were then divided into groups depending on their energy use.Individuals can save money by increasing their energy use during off-peak lower tariff hours.This method allows for identifying a subset of inefficient energy users who may be targeted more often with energy efficiency initiatives.

In [13],the authors have proposed designing a public-sector intelligent ML-based EM system that can be deployed as part of the smart city idea.The information was gathered from two different sources: the Energy Management Information System (EMIS) central database of public sector buildings and the IoT system of public buildings.Deep Neural Network(DNN),Rapidly Exploring Random Tree (RRT),and Random Forest (RF) were three ML approaches used to model energy usage.The results indicated that the RF model was the most effective on validation data,with a SMAPE of 13.5875 percent,indicating the potential of ML approaches in EM in the public sector.They also discussed technology needs to design a public management system for planning rebuilding measures in public buildings,reducing energy usage and costs,and integrating these intelligent public buildings with smart cities.Such a digital EM revolution can improve energy efficiency service quality and provide a healthier atmosphere.

Reference[14]presented“HEM System”,a self-learning and adaptable advanced Reinforcement Learning(RL)based Neural Fitted Q-learning approach.The suggested technique provides a HEM decision-making system that is fast,adaptable,and energy efficient.With a centralized decisionmaking approach,this system,made up of domestic appliances associated with a grid of organized networks of devices by Wi-Fi,can detect peak load situations and automatically switch to redirect or lower demand for power demand during peak periods,thereby lowering power usage.A typical Cold Regions Hydrological (CRH) model was employed to evaluate the suggested strategy.Based on the investigation results,the proposed strategy appears to be a quick and realistic approach for dropping demand and preserving energy through top hours.It also aids in the lessening of domestic carbon footprints.City blocks with considerable residential buildings may meaningfully reduce total energy usage by lowering or adjusting their energy demand during peak periods if the suggested model is implemented.With the reduced peak demand,this model would undoubtedly assist local power distribution firms to improve their resources and keep tariffs reasonable.The lack of preprocessing layer and decision-making were the limitations of this research work.

According to the author’s research in [15],focusing on private clients for Energy Efficient (EE)programs can present an adaptable strategy for reducing wasteful homegrown energy use and replacing low-efficient cooling coolers with smart meter information and daily temperature information.This research lacked decision-making in order to determine the baseload,a tale technique was proposed.In this research work[16],a period repetition highlights a mix-based family trademark identification approach based on data from smart meters.For starters,discrete wavelet change is used to separate a few recurrences area highlights from more traditional time-space measurable highlights.Second,the random calculation in the backwoods is used to select a subset of essential highlights and eliminate unnecessary information from the first list of aptitudes.Third,a support vector machine classifier is used to gather the family unit’s assets.Lastly,contextual investigation based on the Irish data reveals that the planned method performs superior later the repetition space highlights have been combined[17].

Energy management is one of the most challenging concerns in smart cities because of energy systems’intricacy and critical function.Therefore,this issue requires significant attention and work.Modeling and simulation are typical techniques for evaluating smart solutions’technological and policy consequences and planning the best strategies to transition from present cities to smarter ones[18].

The energy strains of cities are both complex and abundant.As a result,smart cities should upgrade existing systems and deploy new solutions in a coordinated and optimum manner,using the synergies among these energy solutions.Renewable energy’s inconstancy,rising demand,and the prerequisite for energy-efficient transportation systems,among other factors,are significant energy concerns that should be tackled rather than separately.Buildings are the single largest consumer of energy.Calculating the energy consumed throughout the year,in terms of heating,hot water,lighting,and other factors,determines a building’s energy efficiency.As energy becomes a critical economic challenge owing to excessive energy consumption and unsustainable energy supply,having an energyefficient structure becomes increasingly vital.This implies that even homes must assess how well they use energy.Buildings that are energy efficient allow people to save money while also reducing greenhouse gas emissions.Because buildings are the major energy users,exclusively public buildings,e.g.,educational,hospitals,government,and other entities with a high consumption frequency,energy management in the public sector is an essential problem in the perspective of smart cities[19].

Smart home energy management frequently necessitates evaluating IoT data from associated smart devices to enhance efficiency and make rapid and accurate decisions.Establishing efficient smart cities requires EM in smart homes [20].Digital Soil Mapping (DSM),PLR,and carbon emission reduction are all part of EM.In an industrialized country,residential and industrial loads in metropolitan areas require substantial electrical energy.According to the study,residential and industrial facilities comprise about 39%–40% of overall energy usage in Canada.The demand for power in these homes is exceedingly variable and fluctuates throughout the day,as evidenced by numerous load surveys.As a result,developing appropriate solutions for managing smart home energy demand and reducing energy use through peak hours will make smart cities more energy efficient.

Various computational intelligence techniques,including machine learning [21,22],and neural networks[23],have emerged as robust solutions for addressing challenges in the field of smart cities[24,25] and dynamic service coordination [26].These approaches offer efficient energy management solutions by optimizing processes such as trajectory planning for electric vehicles[27].Additionally,researchers have explored the integration of environmental sustainability considerations [28] and adaptive control strategies for systems with uncertain dynamics [29].Feature extraction fusion and multi-modal fusion techniques[30,31]contribute to a more comprehensive understanding of energy consumption patterns.The utilization of these advanced techniques by different researchers across various domains underscores their versatility and applicability in various energy related research scenarios.

3 Limitations of Previous Work

Table 1 shows several limitations in previous research,including the lack of a preprocessed communication mechanism between nodes [20],limited computational capacity,and less accuracy[20,32].

Table 1: Gap analysis of previous published works

The proposed technique is playing a vital role in providing a processed communication mechanism between nodes using an Internet of Energy(IoE)network,improving computational capacity through a preprocessing layer to mitigate noisy data,achieving higher accuracy,higher execution capacity,and more robust decision-making using the ML techniques.

4 Proposed Model for Energy Management

As the world’s consumption grows,a vital requisite for better energy management systems is vital.Global warming and air pollution pose thoughtful dangers to future generations,particularly children and the elderly.This is because the volume of emission fumes has increased as the energy demand has increased.An IEMS aims in order to provide overall energy efficiency regarding increase in power generation,increase flexibility,increase renewable generation systems,improve energy consumption,reduce carbon dioxide emissions,improving stability,and reduce energy costs.In this research work,an intelligent energy management system using ML approach is proposed for smart cities in order to overcome the described issue in an intelligent and better way.

Fig.2 indicates the flowchart of the proposed system that the energy management data sensed from IoE is received from the data centre.These values are sent to the preprocessing layer,training layer,and performance layer,and then after the performance layer,the output is sent to cloud data storage.In the validation phase,the learned data is imported from the cloud to predict whether the energy management is found.Fig.3 is the comprehensive and step-by-step description of Fig.2.

Figure 2:IoE based intelligent energy management system

Fig.3 demonstrates that the proposed energy management system is dependent on the Training and Validation phases while communicating through the cloud.The training phase further involves the Sensory,Preprocessing and Application layers.The sensory layer senses input parameters’values and permits these values into a database.Then,the preprocessing layer handles the missing values by means of moving average and normalization to mitigate the noisy values.The preprocessed data is divided into 70 percent training data and 30 percent testing data sets.The training data is then delivered to the training layer,while the testing dataset is saved to the cloud data storage.A classification procedure is used in the training layer to predict energy management using the ML technique(Support Vector Machine(SVM)).

Figure 3:Proposed intelligent energy management system for the smart cities using ML

The equation of line

This is a two-dimensional vector-based equation.However,Eq.(2)as the hyper lane equation,for any number of dimensions.The vector directionand defined as

As we know that

For ζ dimensional vectors,the dot product is equivalent to the equation above.

Let

If sign(B)>0 then appropriately classified and if sign(B)<0 then imperfectly classified Calculate Bion a training dataset,

From Eqs.(5)and(6)we get

After substitute the Lagrangian function,we get

Subject toμi≥0,i=1....

The Lagrangian multipliers method is used with the Karush-Kuhn-Tucker (KKT) conditions because the constraints are inequalities.The complementary status of KKT states that

When a point is closest to a hyperplane,it is said to be a support vector.In light of the Eq.(10)

The hyperplane will classify as class +1 (already energy managed),and the point below the hyperplane will classify as -1 (energy management required).SVM algorithm’s primary goal is to find an optimal hyperplane for dispersing the data,referred to as the optimal hyperplane.

After the prediction layer,the output will be directed to the performance layer to foresee the Energy Management base on accuracy and miss rate whether the learning criteria are met.In the case of‘NO’the prediction layer will be updated,and so on but in the case of‘Yes’the output will be stored on cloud database.

In the Validation phase,the learned data stored on to the cloud will be imported from the cloud for prediction purposes using ML approach(SVM)whether the Energy management is found or not.If‘No’the procedure is discarded and if‘Yes’the message will show that energy management found.

5 Simulation Results

Energy management in smart cities is being investigated with the help of ML technique(SVM).The proposed method has been functional to a dataset of 757 records.The dataset is divided into training samples(70 percent,or 529 samples)and validation samples(30 percent,or 228 samples)for the foregoing purposes of training and validation.

As can be seen in Tables 2 and 3,training and validation were carried out based on accuracy and miss-rate,respectively.It is possible to calculate different metrics such as accuracy,sensitivity,specificity,miss-rate,fall-out,Positive Likelihood Ratio (LR+),Likelihood Negative Ratio (LR-),Precision and Negative predictive value,whereas the True positive rate(TPR)is expressed as sensitivity,True Negative Rate(TNR)as specificity,False Negative Rate(FNR)as miss-rate,False-Positive Rate(FPR) as fallout and Positive Predictive Value (PPV) as precision to compare different aspects of performance.The following parameters are derived through the given formulas:

The proposed model predicts energy management throughout the training phase as shown in Table 2.During training,529 samples are used,with 202,327 from each category (positive and negative).While 198 samples have true positive predictions and no energy management is present,4 records have incorrect predictions of a negative,indicating that energy management is present.In the same way,a total of 327 samples are taken,where negative means energy management is found,from which 296 samples are appropriately foreseen as a negative,which indicates energy management is present,and 31 samples are wrongly foreseen as a positive,which means no energy management is present though energy management occurs there.

Table 2: Proposed energy management system prediction during training

Table 3 displays the proposed model prediction of energy management throughout the validation phase.Total 228 samples are used throughout validation,which is additionally separated into 100,128 positive and negative samples,respectively.It is perceived that 89 samples have true positive which are appropriately foreseen,and no energy management is found but 11 records are wrongly foreseen as a negative which means energy management is found.Likewise,total 128 samples are taken,in which the case of negative means energy management is found,in which 121 samples are appropriately foreseen as a negative means energy management is found and 7 samples are wrongly foreseen as a positive which means no energy management is found,while energy management occurs there.

Table 3: Proposed energy management system prediction during validation

Table 4 displays the proposed model performance in terms of accuracy,sensitivity,specificity,miss rate and precision during training,testing and validation phase.It clearly shows that the proposed model throughout training gives 93.38%,86.46%,98.67%,6.62%,and 98.02%,and during validation 92.11%,92.71%,91.67%,7.89%,and 89%in terms of accuracy,sensitivity,specificity,miss rate,and precision,respectively.

Table 4:Performance evaluation of the proposed model in training,testing and validation using diverse statistical measures

In addition,some more statistical measures of the proposed model during training are falsepositive rate,positive likelihood ratio,likelihood negative ratio,and negative predictive value giving the result 0.0133%,65.007%,0.0671%,and 90.52%,and in validation 0.0833%,11.129%,0.086%,and 94.53%,respectively.

Table 5 signifies a comparison between the previous approaches and the proposed model.The proposed model attained 92.11%accuracy for predicting energy management better than the existing approaches[20,32].

Table 5: Comparison of the previous approaches

6 Conclusion

Energy management between intelligent homes may be a solution to develop renewable energy systems in residential areas and achieve optimal energy consumption in residences.The primary intentions of such energy management systems are to enhance consumer participation,economic efficiency,user satisfaction by choosing between electricity sellers and buyers and lessen electricity acquired from the grid,particularly during peak hours.In this proposed research work,an intelligent energy management system is proposed using ML techniques to predict energy management.It is clearly shown in the simulation results that the proposed system provides better results as compared to the previous[20,32]in terms of 92.11%accuracy,and 7.89%miss-rate.

Acknowledgement:Thanks to our families&colleagues who supported us morally.

Funding Statement:The authors received no specific funding for this study.

Author Contributions:Study conception and design: A.S.Akram,S.Abbas,M.A.Khan;data collection:A.Athar;analysis and interpretation of results:A.S.Akram,M.A.Khan,T.M.Ghazal and H.A.Hamadi;draft manuscript preparation:A.S.Akram,A.Atifa,S.Abbas,T.M.Ghazal.All authors reviewed the results and approved the final version of the manuscript.

Availability of Data and Materials:The data used in this paper can be requested from the corresponding author upon request.

Conflicts of Interest:The authors declare that they have no conflicts of interest to report regarding the present study.