Abstract
Today, the Internet of Things (IoT) has an important role for deploying power and energy management in the smart grids as emerging trend for managing power stability and consumption. In the IoT, smart grids has important role for managing power communication systems with safe data transformation using artificial intelligent approaches such as Machine Learning (ML), evolutionary computation and meta-heuristic algorithms. One of important issues to manage renewable energy consumption is intelligent aggregation of information based on smart metering and detecting the user behaviors for power and electricity consumption in the IoT. To achieve optimal performance for detecting this information, a context-aware prediction system is needed that can apply a resource management effectively for the renewable energy consumption for smart grids in the IoT. Also, prediction results from machine learning methods can be useful to manage optimal solutions for power generation activities, power transformation, smart metering at home and load balancing in smart grid networks. This paper aims to design a new periodical detecting, managing, allocating and analyzing useful information regarding potential renewable power and energy consumptions using a context-aware prediction approach and optimization-based machine learning method to overcome the problem. In the proposed architecture, a decision tree algorithm is provided to predict the grouped information based on important and high-ranked existing features. For evaluating the proposed architecture, some other well-known machine learning methods are compared to the evaluation results. Consequently, after analyzing various components by solving different smart grids datasets, the proposed architecture’s capacity and supremacy are well determined among its traditional approaches.
Introduction
The Internet of Things (IoT) is emerging topic to navigate intelligent connectivity with smart things such as smart devices, sensors, actuators in hyper data transformation era. For managing power communication systems based on artificial intelligence approaches, smart grids are applied to provide intelligent connectivity between smart devices, power generation units, electric warehouses, smart metering equipment and industrial electronics [11]. There are several main problem statements in the power communication systems such as renewable power estimation, fault-tolerant in smart grids, management of smart grid stability and energy redundancy estimation [1]. On the other hand, many research studies have investigated other smart renewable energy and power generation approaches like wind generation electricity systems, solar and cellular package case studies and pressure-based power generation systems in roads [5,7]. For assessing the main performance of existing smart generation models and optimized power communication systems, research studies have applied machine learning and deep learning methodologies for prediction of critical factors. Up to now, the most prominent technical goal, predicting the stability of a smart grid for main aspects of energy consumption is a critical challenge for the renewable power transmission and smart grids incorporated with artificial intelligence technology like machine learning [22]. In the other word, enhancing the accuracy and main focus on important features of energy consumption [13,19], finding intelligent solutions for decreasing home structured energy consumption and focusing on renewable energy resources in power management is the main challenges of smart grids in the IoT environments [9]. Based on the above-mentioned issues, the main problem statement of this research is related to predict existing energy management patterns for optimized power communication systems in smart grid stability. The prediction results can be useful for handling optimal solutions on power generation activities, power transformation, smart metering at home and load balancing in smart grid networks.
The main achievement of this research is to provide a new machine learning-based prediction architecture for enhancing energy power management, and examine the existing technical aspects in smart grids. Also, intelligent machine learning analytics algorithms are applied on a real-dataset and results are analyzed in terms of accuracy, precision, recall, error and execution time. The existing main contributions of this research are shown as follows:
∙ Presenting new machine learning architecture for smart grid stability based on a real-time dataset.
∙ Providing the proposed machine learning-based prediction architecture to evaluate the stability of the smart grid systems.
∙ Discussing on performance evaluation metrics including highly-rate accuracy with compare to other state-of-the-art models.
According to the above-mentioned main contributions, the organization of this research is illustrated as follows: In Section 2, some relevant new published case studies are compared with together and discussed on existing technical aspects, main advantages and weaknesses. Section 3 shows a new machine learning-based prediction architecture with renewable management approach in smart grids. Section 4 illustrates main experimental results, technical analysis and discussion on a real dataset with compare to other state-of-the-art case studies. Finally, Section 5 presents conclusion and future work for this research.
Related work
In this section, some new relevant case studies for renewable energy management in smart grids are discussed and compared with together. Also, existing advantages and weaknesses of each case study is explained.
For introducing some new relevant activities on prediction of renewable energy management strategies, some review and survey papers [15,23] have discussed on existing aspects of machine learning methods to enhance detection of energy and power consumption in smart grids and power communication systems [20]. For example, Luo et al. [12] presented a new deep refinement learning model with a feature selection-based particle swarm optimization (PSO) algorithm for enhancing prediction of load balancing problem statement in power generation systems. Recently, Suryadevara et al. [17] provided a new machine learning approach without feature selection method for evaluation of energy consumption factor in the IoT environments.
On the other side, Khan et al. [8] provided some evaluation results based on machine learning approaches for prediction of energy price and energy consumption in the end user systems and electricity ware houses. In the other work, Tiwari et al. [18] presented a Support vector machine (SVM) algorithm to predict energy consumption for smart grid stability systems. The applied dataset was divided into two sections train and test data. The main weakness of this work is the authors did not apply a feature selection strategy for choosing appropriate features and attributes for the training method. Also, one simple SVM algorithm was just evaluated for the prediction of energy management in smart grids.
Authors in [21] developed a fault diagnosis system using a new correlation method for Convolutional Neural Networks (CNN). The proposed method can detect existing faults and examine the type of occurred fault in the power system using the proposed machine learning algorithm.
In other research, Chen et al. [4] presented a new AdaBoost algorithm for improving energy management approach in smart grid stability. Authors just applied data segmentation for existing samples. The main weakness of this research is that authors ignored a real-time case study for feature extraction and selection for renewable energy management.
On the other research. Breviglieri et al. [3] presented a multi-node star architecture for data gathering from smart grids. They applied a simple deep learning without any feature selection strategy for the training procedure of energy consumption data from smart grid stability. So, there is no specific novelty for predicting existing features of smart grid stability and selecting important attributes of energy efficiency from smart grid equipment.
According to the above relevant case studies, there is no a technical machine learning architecture with a run-time detection approach for energy management strategies in smart grids. According to some above weaknesses and some technical gaps, this research presents a new machine learning-based prediction architecture with a run-time energy efficiency method to increase the accuracy of existing renewable energy management attributes from smart grid stability in the IoT environments.
Research methodology
In smart grids, energy consumption with respect to price level has a critical issue. For this reason, there is a direct way to address all challenges of smart grid stability in the IoT systems based on the existing literature review that evaluate important and effective features of renewable energy management in the smart grids.
In this research, a new machine learning-based prediction architecture to detect main important aspects of renewable energy management in the smart grid dataset is proposed. The procedure of the proposed architecture to analyze the power utilization, and predict the stability of the smart grid dataset is depicted.
The electricity analysis is related to a real-time dataset that should be normalized using some normalization methods. During this process, a prediction method is applied to find optimal features to achieve optimum results for predicting renewable energy management in smart grids. Then, the dataset is then split into training and testing data. Also, the dataset is performed to train with some relevant supervised methods and evaluated by the proposed architecture. The performance of the proposed machine learning algorithms is then evaluated with several metrics. As shown in Fig. 1, there is a prediction-based energy management architecture for smart grids. In this architecture, existing data will be collected online using smart electric repository and transferred to system repository. Smart sensors have effective and responsible role for transferring this data in the IoT environment. After processing all data in system repository, information will be forwarded to prediction unit. In prediction unit, pre-processing procedure should be applied for data cleaning, normalization and data matching. There are some noises and crashed data in the dataset that should be removed and corrected based on value and domain of each attribute. In this stage, existing classification approaches will be applied for training and test methods. After getting prediction results, validation procedure is preformed to decision making process for specifying stability of the smart grid system. Finally, the prediction system can finalize decision and send information to cloud server for storing data.

Main prediction-based machine learning architecture in smart grids.
Figure 2 shows a main procedure for prediction of the proposed machine learning approach. First, the applied dataset is input to the prediction environment. Then, data pre-processing is initialized for extracting existing features in the smart grid stability. Because, there are several micro services and smart devices to collect data from the IoT environments, smart grid dataset has a set of different ranges for existing features. So, a data cleaning for all main features of the applied dataset is provided. Before starting training and test methods, we should aware to check homogenous condition for all domains of our data. In this step, a normalization method is applied for normalizing all data domains for receiving optimal performance of prediction with machine learning. After checking data is cleaned, we have divided 80% of the data for training and 20% for testing and validation stages. In this stage, training procedure is started for all features in the dataset. After training phase, the applied test dataset is uploaded and testing phase is considered. After testing procedure, we can analyze existing simulation results based on machine learning algorithms and discuss on prediction factors as well.

Main framework of the proposed machine learning procedure for smart grid stability.
This section shows existing simulation results and a technical discussion for each prediction factors according to the proposed decision tree-based prediction architecture. Also, the main structure of the applied dataset is shown in this section as well. For showing high effectiveness of the proposed method, some other powerful machine learning algorithms are compared with the same dataset.
Data description
Based on the different aspects and evaluation factors of Smart Grid stability, some important run-time information is gathered according to the proposed architecture and existing smart devices and smart grids equipment in the IoT. Then, the smart grid stability dataset [2] was used for the evaluation and experimental results of the proposed prediction architecture. We have gathered 10,000 specific instances [16] of this dataset according to 14 technical attributes in the UCI collections.1
Based on the following information, we have evaluated important evaluation factors to compare the performance of the proposed architecture in smart grids. For illustrating four main factors of prediction values, True positive (TP) is related to stable status that correctly shows in the system, True Negative (TN) is related to un-stable status that correctly ignored in the system, False positive (FP) is related to stable status that incorrectly influence on the system and False Negative (FN) is related to un-stable status that incorrectly shows in the system.
Accuracy can be defined to illustrate main achievement of the prediction result for main current correction approach in Eq. (1) [14]:
Precision is defined as Eq. (2) [20]:
Recall can show total number of stable instances with respect to existing true case studies in Eq. (3) [10]:
The Root Mean Squared Error (RMSE) and Mean Absolute Error (MAE) are existing criteria include the existing error for prediction of energy consumption in Eq. (4) and (5) [10].
In the above equations,
Simulation results
According to the main factors of simulation result, we have investigated prediction factors for the proposed method and compare it with other machine learning algorithms such as regression, Bayes Net, Naïve Bayes, KStar, IBK, and MLP algorithms.
First, Fig. 3 shows a snapshot illustration for the classification of two set available final results for smart grids. The up-left corner is related to stable conditions for energy efficient methods that shows with red density. On the other hand, the main various ratio of unstable condition is shown at down-right corner between limited domain 0.014 and 0.11 with blue color.

The classification plot for stability and un-stability conditions for smart grid stability.

The reaction time of the power network per power produced (positive) balance.
Figure 4 shows a data variety between existing reaction time of the power network with the range 0.5 to 10 and the nominal power generated by p1 (supplier node) with the range of 1.58 to 5.86 in real-power systems. As the above-mentioned technical analysis, we can observe that the main variety of the Stable status with red color in boundary of 0.5 to 5.25 is higher than higher boundary of 10 for existing reaction time of the power network.
The overall performance metrics of the suggested decision tree-based prediction architecture for smart grid stability is compared over other machine learning algorithms is shown in Fig. 5, 6, and 7. The accuracy of the proposed decision tree-based model (J48) is 99.9%, the accuracy of the Bayes Net algorithm is 99.98%, the accuracy of the regression algorithm is 99.98%, the accuracy of the MLP algorithm is 99.44%, the accuracy of the Naive Bayes algorithm is 97.87%, the KStar [6] model is 91.61%, and the accuracy of IBK algorithm is 873%.

The accuracy factor for existing classification algorithms in smart grid stability.
Also, Fig. 6 illustrates main evaluation comparison for precision metric. It is observable that the decision tree-based model (J48), regression and Bayse Net have perfect performance with precision factor 100%. With respect to the simulation results, the precision of the MLP is 99.2%, Naïve Bayes is 96.6%, KStar is 90%, and IBK is 84.1%.
Also, Fig. 7 shows existing comparison results for recall metric. It is observable that the decision tree-based model (J48), regression and Bayse Net have same value for recall factor with 100%. With respect to the simulation results, the recall of the MLP is 99.3%, Naïve Bayes is 97.5%, KStar is 86.4%, and IBK is 80.1%.

The precision factor for existing classification algorithms in smart grid stability.

The recall factor for existing classification algorithms in smart grid stability.

The Root Mean Squared Error (RMSE) for existing algorithm in smart grid stability.
Figure 8 shows RMSE evaluation results for existing machine learning algorithms. Based on some same achievements from recall and precision values between the decision tree-based model (J48), regression and Bayse Net, the main performance evaluation can be computed with RMSE values. The RMSE of the proposed decision tree-based model (J48) is 0.01%, as minimum error, the RSME of the Bayes Net algorithm and regression algorithms are same 0.0141%, the RMSE of the MLP algorithm is 0.065%, the RSME of the Naïve Bayes algorithm is 0.13%, the RSME of the KStar algorithm is 0.26%, and the RSME of the IBK is 0.35%.

The Mean Absolute Error (MAE) for existing algorithm in smart grid stability.
The results are shown in Fig. 9 that the DT-J48 is applied to predict the stable and unstable status using minimum MAE factor with 0.0002 value for power communication networks with high energy efficiency. Also, Bayes Net as second optimum result has minimum MAE factor with 0.0003 value lower than KStar, IBK, MLP and regression algorithms. Minimum degree of the MAE for power communication systems and smart grids has important factor to achieve optimal stability in energy stakeholders and power generation hubs.
According to Table 1, it can be observable that the testing accuracy factor for the decision tree-based prediction approach used in this paper is higher than the MLP, IBK, Kstar, Bayes Net, and Naive Bayes algorithms.
Evaluation of testing accuracy factor and comparison with existing machine learning algorithms
This research offered a new machine learning based stable energy management architecture for intelligent power devices in smart grids. First, the proposed procedure of the optimal prediction approach for power generation services is analyzed, and the process of optimal configuration for a power 4-node star network. Second, according to related power communication networks, the applied smart grid systems are connected to end point service for monitoring energy consumption and price elasticity parameters respectively. Then, the decision tree-based prediction approach is designed and implemented on the real dataset. Finally, assessing the power consumption and some prediction factors have been analyzed. The optimal prediction plan was solved and compared with the other machine learning algorithms. The experimental results showed that the proposed decision tree algorithm has minimum Mean Absolute Error (MAE) and Root Mean Squared Error (RMSE) for prediction of energy consumption and price elasticity coefficient. Also, this approach could increase accuracy, precision and recall factors for train and test procedures with respect to the feasibility and superiority of the decision tree algorithm.
Conflict of interest
None to report.
