# Enhanced Memetic Algorithm-Based Extreme Learning Machine Model for Smart Grid Stability Prediction

Authors: Manohar Mishra; Janmenjoy Nayak; Bignaraj Naik; Bhaskar Patnaik
Journal: International Transactions on Electrical Energy Systems
 (2022)

---

## Abstract

The smart grid is considered a conventional application domain of cyber-physical system (CPS) tools in the electrical utility industry. The physical system dynamics of SG with the assistance of CPS are generally controlled by connected sensors and controllers via a communication link. These CPSs, which rely heavily on an expansive communication network and intelligent computing algorithms, are susceptible to cyber-physical attacks and are also sensitive to various technical, economical, and social factors compromising their stability. Assessment and prediction of the stability of CPSs are very vital in this context. In this work, a novel optimized (memetic algorithm-based) extreme learning machine model for smart grid-CPS stability prediction has been proposed. Here, the teaching-learning-based optimization and simulated annealing techniques are used to design the memetic algorithm. The experimental result regarding the proposed model is then compared with other contemporary machine learning and deep learning models.


---

## Body

## 1. Introduction

Use of the state-of-the-art technologies in the field of communication and computational ability has helped evolve most industries as smarter in terms of improved efficiency, productivity, quality of service, etc. However, the power system delivery grid (electric grid) has largely remained nonmodernized as compared to other sectors. The reasons can be attributed to the fact that grids have been built and developed over the years primarily as mechanical systems without attention to the possible future need for refurbishment or technological overhauling. With burgeoning demand for power, there has been a large-scale expansion of grid infrastructure, and manual monitoring of the grid has been increasingly difficult and challenging [1]. Thus, a certain level of computation-based automation in monitoring and controlling has been witnessed over the decade or so. However, it hardly suffices considering the new challenges in the form of changing grid dynamics and the need for enhanced grid performance in terms of efficiency, reliability, and resiliency. Although the conventional electrical power system (EPS) remains saddled with the aforementioned deficiencies, the changing scenarios ushered in due to fast depleting conventional energy sources and resulting technological developments in the field of renewable energy sources (RESs) have brought out newer challenges. Penetration of renewable energy resources at low voltage and distribution level of the EPS convert the grid topology from a centralized system to a distributed generation system. Although DGs help to supplement the energy requirements, they also pose many technological challenges, primarily as the power flow gets bidirectional leading to relay miscoordination. On the other hand, the availability of RESs also has given a fillip to the concept of microgrid technology, which not only helps cater to the local load demand but also adds much to the system stability. Needless to say, microgrids being one of the key smart grid components are going to be embedded prominently. However, the implementation of the same, as mentioned earlier, poses many challenges. The issues and challenges associated with implementing these cutting-edge technologies are enumerated in [2]. The complexities involved in the successful realization of a smart grid are very daunting, but the benefits accrued are also of immense importance. In a smart grid scenario, the monitoring and control of the EPS rest heavily on an expansive communication network to gather information generated by numerous sensors placed at various locations in the EPS. A huge amount of data thus collected needs to be processed and subjected to computational algorithms which can provide the appropriate and accurate decision in the shortest possible time. In short, we are veering towards an EPS which is heavily reliant on intelligent computational techniques with fast communication networks serving as the backbone. To be precise, the present-day EPS is smartening up as cyber-physical systems (CPSs). CPS is a strong linkage between cyber technologies and the physical system in order to deal with the operational and controlling complexities in a smart grid that are otherwise manually impossible to execute. NIST cyber-physical system website defines CPS as follows [3]:“Cyber-physical systems (CPSs) comprise interacting digital, analog, physical, and human components engineered for function through integrated physics and logic.”A more generalized definition is given in [4] as follows:“CPS can be characterized as physical and engineered systems whose operations are monitored, controlled, coordinated, and integrated by a computing and communicating core.”In the industrial smart grid perspective, the concept of CPS embodies physical systems such as the network of power infrastructure strongly interfaced with control, intelligence, processing, and information. The CPS enables the smart grid to deliver its expected functional features, which are as follows [5]:(i)
Minimizing the need for deployment of additional power plants through effective power management(ii)
Adaptive and self-healing protection mechanism in order to ensure high reliability and resiliency of the EPS(iii)
Facilitate plug-in of DGs to the grid to meet the localized power demand(iv)
Exhibit flexibility in the distribution process to supply the right amount of power to the various types of loads connected to the grid.(v)
Predict the short-term and long-term power demand(vi)
Help reduce pollution through environment-friendly renewable energy sources(vii)
Help minimize the price of electricityThe above functionalities of an industrial smart grid that ultimately ensures the stability of the network are possible by using intelligent computing algorithms that comprise the backbone of the cyber technology in a CPS. Applications of these intelligent computational algorithms, such as advanced optimization techniques, expert systems, fuzzy logic, neural network, and deep neural network are used to design schemes meant for control, power management, power system protection, power trading, predisaster, and postdisaster management in order to have enhanced power system resiliency and all other such aspects of the smart grid concept that help to add to its stability.In this work, an optimized extreme learning machine (ELM) is suggested to predict the stability of the industrial smart grid (SG). The performance of the proposed model is then compared with other contemporary machine learning (ML) and deep learning (DL) models.The steps involved in this work can be presented as follows:(1)
Initially, the SG data have been retrieved from the UCI-ML repository [6] and processed through a preprocessing step such as normalization and label encoding.(2)
A novel memetic algorithm-based optimized extreme learning machine (ELM) is proposed for the training and testing of the data. Here, the TLBO and SA techniques are used to design the memetic algorithm.(3)
This extracted SG dataset is then processed through the proposed optimized ELM model for training and testing purposes.(4)
The performance of the proposed ML model is then compared with other contemporary ML and DL approaches using a few key indexes, such as accuracy, precision, recall, and F-score.In short, our key contributions toward the prediction of the SG stability can be summarized as follows:(a)
A novel memetic algorithm-based ELM model has been proposed to predict the stability status of SG.(b)
The collected SG data are then trained and tested through the proposed ML model.(c)
An accuracy of 99.75% is attained through the suggested model. Comparative analysis with other contemporary ML and DL techniques indicates the superiority of the proposed model.The organization of the remaining parts of this article is presented as follows: Section2 reviews the current literature associated with the application of intelligent computational techniques in various aspects of SG functionalities. Section 3 presents the proposed memetic algorithm-based ELM architecture in detail. The experimentation and result analysis has been carried out in Section 4. Section 5 highlights the concluding remark with the future direction.


## 2. Literature Survey

A smart grid vastly relies on the accumulation of a huge amount of data procured from numerous sensors placed at different strategic locations of the EPS, fast and robust internet-based communication channels, and of course a fast-acting intelligent computation algorithm. It is imperative that handling and managing such huge data, protecting the communication channel from cyber infringements, and engaging a fast-acting computational technique for accurate prediction of the set objective are vital for realizing a smart grid. Smart grid deployment thus involves huge complexity. Advanced intelligent systems, with techniques such as ML, DL, reinforcement learning (RL), deep reinforcement learning (DRL), and SG realization are becoming feasible [7].In the above context, the authors in [8] enumerate how the use of big data analysis in conjunction with intelligent models helps to resolve the issue of processing these huge data in an SG. Various applications of big data in the SG perspective are listed in [9]. Threat to the communication network in the form of covert data integrity assault (CDIA) can be detrimental to the reliability and safety of smart grid functionalities. These smartly designed CDIAs can easily outwit the conventional bad-data detector employed in SG control hubs. The authors in [10] have proposed an unsupervised ML-based model to identify CDIAs in SG communication grids using an unlabeled dataset. The ML algorithm employed is called isolation forest. The security system against CDIAs generally is a three-tier structure. ‘Protection,’ ‘intrusion detection system (IDS)’, and ‘alleviation,’ are the first, second, and third tier, respectively. Through shielded communications and data safeguarding measures, the first tier ensures protection of the communication channel against the majority of CDIAs. In the event of the protection tier getting violated, the IDS as the second tier of defense detects the intrusion and generates precautionary signals for the operators to take up preventive measures against the CDIA. The recent literature enumerates many ML-based IDSs [11–17]. The authors in [11, 12] have depicted the application of ML algorithms in identifying unscrupulous user activities in smart grid communication channels. The authors in [13] have demonstrated the utility of several ML algorithms in the detection of CDIAs at the physical layer of a smart grid. The authors in [14] have employed a support vector machine (SVM) classifier in the above context. The authors in [15] have proposed another ML-based model to detect time synchronization assault (TSA). The authors in [16] proposed the Euclidean-distance-based ML model to predict the CDIAs. The authors in [17] have suggested a genetic algorithm (GA) combined with SVM, for future selection and classification purposes, respectively, in order to detect CDIAs. Most of the CDIA recognition techniques using machine learning as stated in the collected works have considered supervised learning on labeled data only. The third defense tier, known as alleviation, serves as a kind of restoration system, which helps restore the reliable system operations once the CPS-assault recognition message is established at the SG control hub. Many optimizations and intelligent techniques too are engaged in this tier for the intended purpose.From a smart grid stability perspective, it is very essential that zone-specific accurate load forecasting must be carried out in order to meet the dynamic energy demands. Various ML techniques can be used for such purposes. Based on historical data on weather, load variation pattern, and energy generation, these ML algorithms make an accurate prediction of load demand in specific regions [18, 19]. In [19],a deep neural network (DNN) model is employed for generation and load demand forecasting, where DNN has proven better than the contemporary regression model. In [20], the authors have offered a big data framework for distributed processing to predict energy load demand. Here, the MLib-ML library is used for assessing the performance of different regression models. The stability of SGs, which enables smart cities, is challenged by the dynamic energy consumption due to the household appliances in these smart cities. IoT technologies along with ICTs present many energy management techniques to address the issue. The authors in [21] suggested a consumption prediction technique based on a probabilistic data-driven prognostic technique developed on a Bayesian network (BN) framework. Elsisi and Tran proposed a unified Internet of thing (IoT) architecture to manage the issue of cyberattacks using a DNN model having a rectified linear unit [22]. This stated system can supervise the automated guided vehicles reliably and securely. Elsisi et al. suggested an effective online fault diagnosis system against cyberattacks and data uncertainties using an IoT enabled DL model [23].The cost of power also plays an important role in ensuring the stability of the distributed power systems. The authors in [24] have proposed a decentralized SG control model to ensure demand-side management in the grid by analyzing the electricity price versus grid frequency deviation. The authors have also implemented an optimized data matching ML technique and the transparent open box learning model to realize dynamic SG stability.Against the backdrop of the above discussion on various factors of smart grid instability and the possible intelligent methods to mitigate them, it is also essential that there should be an efficient scheme for the estimation and prediction of SG stability in place. The authors in [25] have proposed an ML-based smart grid stability forecasting scheme. The proposed method employs three different genetic algorithms in the future selection stage and four different ML classifiers including the GBM algorithm. The authors in [5] proposed a few DL-based models such as recurrent neural network (RNN), long short-term memory (LSTM), and gated recurrent unit (GRU) for prediction of SG stability.It can be inferred very well from the above survey that there is no single comprehensive solution to tackle the challenges of stability in an SG. Also, there is a need for further research in the area of stability prediction as evident from the scarcity of the literature in this regard. In the present study, it is envisaged to design the novel memetic algorithm-based ELM model for smart grid stability prediction. The proposed approach shows better results than the traditional ELM technique and other advanced ML and DL techniques.


## 3. Proposed TLBO-SA-ELM Approach

The performance of the ML model is generally enhanced by integrating the optimization algorithm [26–29]. In this work, a memetic algorithm based on TLBO and SA is proposed to increase the performance of the ELM classifier. Afterward, the proposed optimized ELM is trained and tested using the SG dataset.A single metaheuristic algorithm cannot solve all optimization problems and is usually less effective for high-dimensional SG datasets. Therefore, there always remains a possibility to design an improved search approach and develop novel optimization techniques which can be used to solve gene selection problems in the SG dataset. This is our major inspiration behind the scheming of this proposed memetic algorithm. The proposed SG stability predictive algorithm is designed using three basic soft computing models such as TLBO, SA, and ELM.In this work, an ELM-based model [30] with optimized parameters is developed for efficient prediction of smart grid status from smart grid operational features. The proposed problem can be visualized as an optimization problem where the objective is to select the best pi=fi,αi,nhi in P=p1,p2,…,pn (population with ‘n’anumber of hyperparameter sets). Here, pi is the ith randomly generated hyperparameter value set which is drawn from an allowed range of values as follows: fi∈list1,2,3,4,5,6,7,8, nhi∈range1,200, and αi∈range0.1,1.0. Here, fi, nhi, and αi are ith activation function, a selected number of the hidden layer, and learning rate. The activation function fi is chosen as ‘1,’ ‘2,’ ‘3,’ ‘4,’ ‘5,’ ‘6,’ ‘7,’ and ‘8’ for sine, tanh, tribas, sigmoid, hand/lim, soft/lim, Gaussian, and multiquadric, respectively. The performance of ELM on the prediction of smart grid status is dependent on these parameters f, nh, and α. Here, the studied problem can be visualized as an optimization problem to get optimal Pi∗=fi,nhi,αi in P, which is the optimal parameter set of ELM for solving the identification of the various states of the smart grid. On the given operational SG properties, D=opi,stii=1m, P=Pii=1n, and modelELMDTrain,Pi, where the objective is to find optimal Pi∗ which optimizes the following objective function:(1)Pi∗=argmaxPi∈Pfiti=scorest,st^=ELMDTrain,Pi=argmaxPi∈Pfiti=scorest,st^=1m∑i=1mIst^i,sti.The datasetD=opi,stii=1m is the collection of smart grid operational properties opi with thirteen features and one class label sti representing the status of the grid condition, i.e., either ‘stable’ or ‘unstable.’ The proposed ELM model has been trained with these instances. In ELM, the prediction of the class label is made using Equation (2), where Houtput (Equation (3)) is the output matrix, β (Equation (4)) is the weight matrix representing the weights between hidden layer neurons and out neurons, and Equation (5) is the prediction matrix.(2)st^=Houtput×β,(3)Houtput=fb1+op1×w1…fbL+op1×wL………fb1+opN×w1…fbL+opN×wLN×L,(4)β=β1,β2,…,βLL×1T,(5)st^=st^1,st^2,…,st^NN×1T.In this work, the hyperparameters ofELM are optimized with the memetic version of teaching-learning based optimization (TLBO) [31]. Here, the TLBO is integrated with simulated annealing [32] in order to avoid a locally optimal solution.In this work, the domains of the considered hyperparameters are as follows: activation function (f), alpha (α), and several hidden neurons (nh). Here, f is the mathematical equation that is responsible to determine whether the neuron input is significant for prediction. α is the controlling parameter for the adjustment of weights and H is the number of hidden neurons that highly impact the performance and network stability. This work is focused on the process of finding optimal parameters (Pi) ELM by using TLBO with SA. The objective function is used to evaluate the parameter combinations (Pi) and output a fitness (accuracy) fitPi=ELMDTrain,Pi which indicates how well the set of hyperparameters performs for the considered problem. For the present problem, we have considered ‘accuracy’ as the evaluation matrix, and it is the objective to maximize the objective function presented in Equation (2). The architecture of the proposed algorithm is presented graphically in Figure 1.Figure 1
Proposed system architecture.The proposed scheme for hyperparameter optimization starts with random generation of the population of the hyperparameter setP=Pii=1n, where Pi=fi,nhi,αi representing ith instance of the ELM parameter set. The fitness of each Pi in P is evaluated (in Algorithm 1, i.e., fitPi=ELMDTrain,Pi by setting the Pi in ELM and testing on the data DTrain. Then, the fittest Pi in P is PTeacher. The teaching factor tf=rand1+rand1 and the population meanPMean are computed in order to use them for the generation of a new population. For each Pi, the Pinew is generated as Pinew=Pi+r×PTeacher−tf×PMean, where r is a random number. The updating of P is performed by comparing each of Pi in P with the corresponding Pinew in Pnew. Then, the resultant population is improvised by choosing two solutions Pi and Pj randomly from P and altering them as mentioned in the following equation:(6)Pinew=Pi+rand1×Pj−PiiffitPi<fitPjPinew=Pj+rand1×Pi−PjOtherwise.After improvisation ofP, the best solution Pbest in P is selected based on the highest fitness. Then, the simulated annealing (Algorithm 2) has been applied on Pbest to generate a new solution from Pbest in order to avoid local optimal solutions. The proposed approach of applying simulated annealing with TLBO not only accepts the best solution but also considers the nearer solution to the best solution with some probability. The major steps of applying simulated annealing on Pbest are as follows: (i) random generation of a solution Pbest′ from Pbest and NPbest, where it is the neighborhood operation; (ii) computation of the fitness fitbest and fitbest′ of Pbest and Pbest′, respectively, by calling the procedure ELMDTrain,Pbest and ELMDTrain,Pbest′, respectively; (iii) replacement of Pbest with Pbest′ if fitbest′>fitbest, or if rand1<p, where p=eθ/T; (iv) decrement of the temperature: T=0.93×T and checking the maximum trial. If maximum trial is reached, then extract the Pbest.Algorithm 1:fitPi⟵ELMX,Pi.
LetD=opi,stii=1m be the smart grid operational data, where opi=opi,1,opi,2,…,opi,N is the ith instance of the smart grid operational feature value and sti is the status of the grid.(1)
Randomly generate biasbi, i=0 to L, and weight wi, i=0 toL.(2)
Calculate the hidden layer output functionHoutput by using the selected activation function f⋅. Houtput=fb1+op1×w1...fbL+op1×wL.........fb1+opN×w1...fbL+opN×wLN×L.(3)
Compute the output weight matrixβ^=Houtputμ×st, which maximizes the objective function Houtput×β^−st=minβHoutput×β−st. Here, Houtputμ is the Moore–Penrose generalized inverse of the Houtput. Houtputμ=Houtput×Houtput−1×HoutputT.Perform the prediction by usingβ^ on the data st^=α×Houtput×β^, α is the learning rate. st^ik=1ifsti=k−1ifsti≠k, k=1,2,…,cPredict the final class label asst^ic=argmaxk=1,2,…,cst^ikReturn score of the predictionfitPi=scorest,st^Algorithm 2:Pbest=SAPbest,NPbest,DTrain.
(1)
Randomly generate a solutionPbest′ from Pbest and NPbest (neighbor structure of Pbest)(2)
Compute the fitnessfitbest and fitbest′ of Pbest and Pbest′, respectively, by calling the procedure ELMDTrain,Pbest and ELMDTrain,Pbest′, respectively(3)
Iffitbest′>fitbest, then assign Pbest=Pbest′Else calculatep=eθ/T. If rand1<p, then assign Pbest=Pbest′(4)
Decrease the temperature,T=0.93×T(5)
If the maximum trial is reached, then returnPbest(6)
Else go to step 1.After getting the updatePbest from Algorithm 2 (simulated annealing process), the population P has been updated by replacing old Pbest with new Pbest (returned from the procedure SA). If a maximum generation is reached or no further improvement on the performance, then we stop and assign P∗=Pbest. Finally, Algorithm 3 returns the best hyperparameter set P∗ from the entire final population P. Then, this is set on ELM as fitP∗=ELMDTrain,P∗ and fitP∗=ELMDTrain,P∗ to get the generalized performance on training data DTrain and test data DTest, respectively. The complete process of getting an optimal hyperparameterP∗ can be realized in Algorithm 3.Algorithm 3:P∗←ELM−TLBO−SADTrain,P.
LetD=opi,stii=1m be the smart grid operational data, where opi=opi,1,opi,2,…,opi,N is the ith instance of the smart grid operational feature value and sti is the status of the grid.(1)
Randomly generate the populationP=Pii=1n, where Pi=fi,nhi,αi representing ith is an instance of the ELM parameter set.(2)
Evaluate the fitness of eachPi in P. fitPi=ELMDTrain,Pi.(3)
Select fittestPi in P as PTeacher.(4)
Compute teaching factortf=rand1+rand1 and population meanPMean.(5)
GeneratePinew fromPi in P: Pinew=Pi+r×PTeacher−tf×PMean, where r is a random number.(6)
Perform the updatingP by comparison of each Pi in P with the corresponding Pinew in Pnew.(7)
For each pair of randomly chosenPi and Pj in P, improvise them by using the following equation: Pinew=Pi+rand1×Pj−PiiffitPi<fitPjPinew=Pj+rand1×Pi−PjOtherwise.(8)
Find the best solutionPbest in P based on the highest fitness.(9)
Generate a new solution fromPbest by using a simulated annealing process Pbest=SAPbest,NPbest,DTrain.(10)
Update the population by replacing oldPbest with new Pbest (returned from the procedure SA).(11)
If a maximum generation is reached, then assignP∗=Pbest.Else, go to step 2.(12)
ReturnP∗.


## 4. Results and Discussion

In this section, the proposed SG stability prediction method is evaluated through proper experimental analysis.


### 4.1. Experimental Platform

The experimental setup for the proposed work comprises an online graphical processing unit (GPU) enabled by Google called “Google Colab,” a supercomputer having a Windows 10 Operating system with a core I7 processor and aPython 3.9 programming tool.


### 4.2. Dataset Description

The SG data used in this experiment have been extracted from the UCI-ML repository [6]. This dataset comprised 10000 samples with fourteen features. The attributes are divided into 12 primary predictive features and 2 dependent variables. The predictive features provide information about the reaction time (tau[x]) of smart grid participants {range: 0.5–10s}, nominal power px consumed (negative)/produced (positive), and coefficient related to elasticity price gx. The dependent attributes can be described as follows: the first attribute indicates: the maximal real part of the characteristic equation root (if positive - the system is linearly unstable) and the second dependent attribute states the stability label (class level) of the system (categorical: stable/unstable).


### 4.3. Performance Evaluation Matrices

In this work, the classification result corresponding to the proposed TLBO-SA-ELM is interpreted through the following performance evaluation matrices.Confusion matrix (CM): it represents the actual value with respect to the predicted values corresponding to the class level.CM is a table that visualizes and compares the result obtained from a classifier by presenting the actual values and predicted values (number of samples) with respect to the class levels in terms of correct and incorrect prediction. A sample of the confusion matrix is presented in Figure2.Figure 2
An example of the confusion matrix.From the above confusion matrix, the following six matrices are calculated as presented from the following equations.Accuracy (A): it signifies the correctness of the classifier. It is mathematically represented as follows:(7)A=TS+TUTS+TU+FS+FU,(8)PrecisionP:P=TSTS+FU,(9)RecallR:R=TSTS+FS,(10)Fβ_Score:F=1+β2×R∗Pβ2R+P.F1_Score (F1): in the calculation of F1_Score, equal weight is given for both precision and recall. Therefore, in equation (10), a beta (β) value of 1 can be considered for the calculation of F1_measure. So it can be represented as follows :(11)F1=2×R∗PR+P.F2_Score (F1): in the calculation of F1_Score, less weight is given for precision compared to the recall value. Therefore, in equation (10), a beta (β) value of 2 can be considered for the calculation of F1_measure. So, it can be represented as follows:(12)F2=54×R∗PR+P.


### 4.4. Performance Evaluation of the Proposed TLBO-SA-ELM Model

The collected SG data are divided into 8 : 2 ratios for training and testing, respectively. The testing result in terms of the confusion matrix is presented in Figure3.Figure 3
Confusion matrix for (a) traditional ELM and (b) proposed TLBO-SA-ELM.
(a)(b)Figure3 shows the confusion matrix for ELM and the proposed model for the classification of the SG stability dataset. The proposed TLBO-SA-ELM model detects 703 data as truly stable and 1292 as truly unstable, whereas traditional ELM detects 669 data as truly stable and 1223 as truly unstable. Only 5 data are misclassified through the proposed model. From these confusion matrixes, different measuring indices such as precision, recall, accuracy, and Fβ-Score are calculated and tabulated in Table I. It can be seen from the table that the proposed model can classify the stability of the SG data with 99.75% accuracy. The other indices such as precision, recall, F1, F2 scores, and area under the curve (AUC) are noted to be 1.0, 0.996144, 0.998068, 0.6197, and 0.998072, respectively. It can be seen from the table that the proposed model outperforms traditional ELM with respect to all the measuring indices.The proposed approach is a hybrid model where the parameter of the ELM is optimized through a memetic algorithm comprised TLBO and SA. In order to check the effectiveness of the proposed memetic algorithm, a few other optimization algorithms such as genetic algorithm (GA), particle swarm optimization (PSO), and TLBO are hybridized with the ELM algorithm, and the corresponding result is interpreted in Figure4. Figure 4 shows the plot of fitness (accuracy) versus the number of generations. It is seen from the figure that the proposed memetic algorithm-based ELM converses quickly (within 14 generations) compared to other approaches.Figure 4
Fitness changes in various generations.


#### 4.4.1. Comparative Analysis

In order to validate the performance of the proposed algorithm applied to the SG stability dataset, the corresponding experimental results are compared with the output of several other contemporary ML models. In this regard, the results corresponding to a decision tree (DT), naïve bias (NB), linear regression (LR), random forest (RF), and extreme gradient boosting (XGBoost) are depicted in Table1. A similar ratio (8 : 2) of the training and testing dataset is considered during these experimentations.Table 1
Performance metrics of prediction models.
Prediction ModelsPerformance MetricsPrecisionRecallF1 ScoreF2 ScoreROC-AUCAccuracyDT0.74881.00.88710.7023150.6174.88NB0.64851.00.7867750.5850750.564.85LR0.64851.00.7867750.5850750.564.85RF0.9462270.9090200.9272510.57950.90685790.75XGBoost0.9104370.9953730.9510120.59440.90735993.35ELM0.9729510.9429450.9577130.59860.94729094.6Proposed model1.00.9961440.9980680.61970.99608699.75It can be analyzed from the table that NB and LR show the worst performance (accuracy: 64.85) compared to XGBoost having an accuracy of 93.35%. It can also be analyzed that the performance of XGBoost is observed to be less than the proposed model with a very high margin (accuracy > 6.4%). Finally, it can be concluded that the proposed approach performs better than all other ML models with respect to each performance indices. In addition to this, the performance of the proposed approach is compared with the result of different deep learning models (such as RNN, GRU, LSTM, and MLSTM) applied to a similar dataset [5]. This comparative result analysis is presented in Table 2. It can be analyzed from the table that MLSTM performs better than RNN, GRU, and LSTM; however, the proposed algorithm (TLBO-SA-ELM) outperforms in all aspect. Figure 5 shows the overall comparative results graphically.Table 2
Performance comparison with existing approaches.
ModelAccuracyRecurrent neural network (RNN) [5]96.60Gated recurrent unit (GRU) [5]97.30Long short term memory (LSTM) [5]97.13Multidimensional long short term memory (M-LSTM) [5]99.07Proposed model (ELM-TLBO-SA)99.75Figure 5
Overall comparison of studied models.


## 4.1. Experimental Platform

The experimental setup for the proposed work comprises an online graphical processing unit (GPU) enabled by Google called “Google Colab,” a supercomputer having a Windows 10 Operating system with a core I7 processor and aPython 3.9 programming tool.


## 4.2. Dataset Description

The SG data used in this experiment have been extracted from the UCI-ML repository [6]. This dataset comprised 10000 samples with fourteen features. The attributes are divided into 12 primary predictive features and 2 dependent variables. The predictive features provide information about the reaction time (tau[x]) of smart grid participants {range: 0.5–10s}, nominal power px consumed (negative)/produced (positive), and coefficient related to elasticity price gx. The dependent attributes can be described as follows: the first attribute indicates: the maximal real part of the characteristic equation root (if positive - the system is linearly unstable) and the second dependent attribute states the stability label (class level) of the system (categorical: stable/unstable).


## 4.3. Performance Evaluation Matrices

In this work, the classification result corresponding to the proposed TLBO-SA-ELM is interpreted through the following performance evaluation matrices.Confusion matrix (CM): it represents the actual value with respect to the predicted values corresponding to the class level.CM is a table that visualizes and compares the result obtained from a classifier by presenting the actual values and predicted values (number of samples) with respect to the class levels in terms of correct and incorrect prediction. A sample of the confusion matrix is presented in Figure2.Figure 2
An example of the confusion matrix.From the above confusion matrix, the following six matrices are calculated as presented from the following equations.Accuracy (A): it signifies the correctness of the classifier. It is mathematically represented as follows:(7)A=TS+TUTS+TU+FS+FU,(8)PrecisionP:P=TSTS+FU,(9)RecallR:R=TSTS+FS,(10)Fβ_Score:F=1+β2×R∗Pβ2R+P.F1_Score (F1): in the calculation of F1_Score, equal weight is given for both precision and recall. Therefore, in equation (10), a beta (β) value of 1 can be considered for the calculation of F1_measure. So it can be represented as follows :(11)F1=2×R∗PR+P.F2_Score (F1): in the calculation of F1_Score, less weight is given for precision compared to the recall value. Therefore, in equation (10), a beta (β) value of 2 can be considered for the calculation of F1_measure. So, it can be represented as follows:(12)F2=54×R∗PR+P.


## 4.4. Performance Evaluation of the Proposed TLBO-SA-ELM Model

The collected SG data are divided into 8 : 2 ratios for training and testing, respectively. The testing result in terms of the confusion matrix is presented in Figure3.Figure 3
Confusion matrix for (a) traditional ELM and (b) proposed TLBO-SA-ELM.
(a)(b)Figure3 shows the confusion matrix for ELM and the proposed model for the classification of the SG stability dataset. The proposed TLBO-SA-ELM model detects 703 data as truly stable and 1292 as truly unstable, whereas traditional ELM detects 669 data as truly stable and 1223 as truly unstable. Only 5 data are misclassified through the proposed model. From these confusion matrixes, different measuring indices such as precision, recall, accuracy, and Fβ-Score are calculated and tabulated in Table I. It can be seen from the table that the proposed model can classify the stability of the SG data with 99.75% accuracy. The other indices such as precision, recall, F1, F2 scores, and area under the curve (AUC) are noted to be 1.0, 0.996144, 0.998068, 0.6197, and 0.998072, respectively. It can be seen from the table that the proposed model outperforms traditional ELM with respect to all the measuring indices.The proposed approach is a hybrid model where the parameter of the ELM is optimized through a memetic algorithm comprised TLBO and SA. In order to check the effectiveness of the proposed memetic algorithm, a few other optimization algorithms such as genetic algorithm (GA), particle swarm optimization (PSO), and TLBO are hybridized with the ELM algorithm, and the corresponding result is interpreted in Figure4. Figure 4 shows the plot of fitness (accuracy) versus the number of generations. It is seen from the figure that the proposed memetic algorithm-based ELM converses quickly (within 14 generations) compared to other approaches.Figure 4
Fitness changes in various generations.


### 4.4.1. Comparative Analysis

In order to validate the performance of the proposed algorithm applied to the SG stability dataset, the corresponding experimental results are compared with the output of several other contemporary ML models. In this regard, the results corresponding to a decision tree (DT), naïve bias (NB), linear regression (LR), random forest (RF), and extreme gradient boosting (XGBoost) are depicted in Table1. A similar ratio (8 : 2) of the training and testing dataset is considered during these experimentations.Table 1
Performance metrics of prediction models.
Prediction ModelsPerformance MetricsPrecisionRecallF1 ScoreF2 ScoreROC-AUCAccuracyDT0.74881.00.88710.7023150.6174.88NB0.64851.00.7867750.5850750.564.85LR0.64851.00.7867750.5850750.564.85RF0.9462270.9090200.9272510.57950.90685790.75XGBoost0.9104370.9953730.9510120.59440.90735993.35ELM0.9729510.9429450.9577130.59860.94729094.6Proposed model1.00.9961440.9980680.61970.99608699.75It can be analyzed from the table that NB and LR show the worst performance (accuracy: 64.85) compared to XGBoost having an accuracy of 93.35%. It can also be analyzed that the performance of XGBoost is observed to be less than the proposed model with a very high margin (accuracy > 6.4%). Finally, it can be concluded that the proposed approach performs better than all other ML models with respect to each performance indices. In addition to this, the performance of the proposed approach is compared with the result of different deep learning models (such as RNN, GRU, LSTM, and MLSTM) applied to a similar dataset [5]. This comparative result analysis is presented in Table 2. It can be analyzed from the table that MLSTM performs better than RNN, GRU, and LSTM; however, the proposed algorithm (TLBO-SA-ELM) outperforms in all aspect. Figure 5 shows the overall comparative results graphically.Table 2
Performance comparison with existing approaches.
ModelAccuracyRecurrent neural network (RNN) [5]96.60Gated recurrent unit (GRU) [5]97.30Long short term memory (LSTM) [5]97.13Multidimensional long short term memory (M-LSTM) [5]99.07Proposed model (ELM-TLBO-SA)99.75Figure 5
Overall comparison of studied models.


## 4.4.1. Comparative Analysis

In order to validate the performance of the proposed algorithm applied to the SG stability dataset, the corresponding experimental results are compared with the output of several other contemporary ML models. In this regard, the results corresponding to a decision tree (DT), naïve bias (NB), linear regression (LR), random forest (RF), and extreme gradient boosting (XGBoost) are depicted in Table1. A similar ratio (8 : 2) of the training and testing dataset is considered during these experimentations.Table 1
Performance metrics of prediction models.
Prediction ModelsPerformance MetricsPrecisionRecallF1 ScoreF2 ScoreROC-AUCAccuracyDT0.74881.00.88710.7023150.6174.88NB0.64851.00.7867750.5850750.564.85LR0.64851.00.7867750.5850750.564.85RF0.9462270.9090200.9272510.57950.90685790.75XGBoost0.9104370.9953730.9510120.59440.90735993.35ELM0.9729510.9429450.9577130.59860.94729094.6Proposed model1.00.9961440.9980680.61970.99608699.75It can be analyzed from the table that NB and LR show the worst performance (accuracy: 64.85) compared to XGBoost having an accuracy of 93.35%. It can also be analyzed that the performance of XGBoost is observed to be less than the proposed model with a very high margin (accuracy > 6.4%). Finally, it can be concluded that the proposed approach performs better than all other ML models with respect to each performance indices. In addition to this, the performance of the proposed approach is compared with the result of different deep learning models (such as RNN, GRU, LSTM, and MLSTM) applied to a similar dataset [5]. This comparative result analysis is presented in Table 2. It can be analyzed from the table that MLSTM performs better than RNN, GRU, and LSTM; however, the proposed algorithm (TLBO-SA-ELM) outperforms in all aspect. Figure 5 shows the overall comparative results graphically.Table 2
Performance comparison with existing approaches.
ModelAccuracyRecurrent neural network (RNN) [5]96.60Gated recurrent unit (GRU) [5]97.30Long short term memory (LSTM) [5]97.13Multidimensional long short term memory (M-LSTM) [5]99.07Proposed model (ELM-TLBO-SA)99.75Figure 5
Overall comparison of studied models.


## 5. Conclusion

Smart grids are identified with the cyber-physical system used for intelligent management of power generation and dissipation ensuring quality power supply at the most economical price. However, the threat to CPS and several issues including a threat to CPSs severely affects the stability of a smart grid. Machine learning techniques play a vital role in predicting the stability of the smart grid. In this work, a novel memetic algorithm-based ELM model is introduced to predict the stability of the SG. The proposed optimized ELM algorithm is tested on the SG dataset extracted from the UCI-ML repository. The proposed model achieved 99.75% accuracy and 100% precision in classifying the stability status of the smart grid. To justify the effectiveness of the proposed model, a detailed comparative analysis is carried out with other contemporary machine learning models (such as decision tree, linear regression, random forest, naïve bias, XGBoost, and ELM) and previously published work based on deep learning (such as LSTM, GRU, RNN, and MLSTM). 99.8072% of ROC is achieved through the proposed algorithm which outperformed the other comparative models. The effectiveness of the proposed memetic algorithm based on TLBO and SA is additionally compared with several other optimization techniques (such as particle swam optimization, genetic algorithm, and TLBO) hybridized with ELM. The future scope of the work may deal with the analysis of dynamic power requirements, reliability, and resiliency of SG.



---

*Source: 8038753-2022-08-31.xml*