Optimal Load Forecasting Model for Peer-to-Peer Energy Trading in Smart Grids

: Peer-to-Peer (P2P) electricity trading is a significant research area that offers maximum fulfilment for both prosumer and consumer. It also decreases the quantity of line loss incurred in Smart Grid (SG). But, uncer-tainities in demand and supply of the electricity might lead to instability in P2P market for both prosumer and consumer. In recent times, numer-ous Machine Learning (ML)-enabled load predictive techniques have been developed, while most of the existing studies did not consider its implicit features, optimal parameter selection, and prediction stability. In order to overcome fulfill this research gap, the current research paper presents a new Multi-Objective Grasshopper Optimisation Algorithm (MOGOA) with Deep Extreme Learning Machine (DELM)-based short-term load predictive technique i.e., MOGOA-DELM model for P2P Energy Trading (ET) in SGs. model achieved the highest accuracy of 85.80% and the results established the superiority of the proposed model in predicting the testing data.


Introduction
The drastic increase in the dispersion of Renewable Energy Sources (RES) like roof-top Photovoltaic (PV) panel, small-sized wind turbine and enhanced networking components, transformed the classical energy consumer to a prosumer who exploits and sells the produced energy [1]. Owing to stochastic characteristics of DER, it is challenging to forecast and meet the energy demands. As a result, when a prosumer has excess electricity than his/her consumption level, the energy can either be stored in batteries and/or be traded to another consumer or to the grid. This direct Energy Trading (ET) process between prosumer and the consumer is called Peer-to-Peer (P2P) ET which generally occurs in local electricity distribution systems. In P2P ET, the peer is normally an individual entity or a set of entities who trade the energy straightaway or with other peers without any intermediaries like local energy suppliers. In unidirectional traditional ET technique, energy is generally transmitted from large scale generators to consumers through long distance electricity transmission networks, whereas the cash flow occurs in reverse direction.
On the contrary, a P2P ET market allows multi-directional trading in local P2P markets. Several trials have been conducted so far from which it is realized that the ET depends on 'P2P economy'. These trials mostly found that the electricity consumers were offered discounted pricing so that they can prefer the intended energy supplier. The responsibility of P2P energy transaction, at the stage of distribution network, has been examined in the last decade. In literature [2], a P2Penabled networking model was presented to save the energy bill for every micro-grid and enhance the applicability of local DER. An ensemble of demand-side organisation models was integrated together with P2P ET to minimise the cost incurred in SG. In addition, the researchers [3] introduced a distributed demand-side management model in collaboration with public ET to reduce the home energy bill in community microgrid. In the study conducted earlier [4], a priceenabled demand response energy distribution technique was developed. In addition, a part of multi-agent energy management technique has also been developed in the recent times.
The release of Advanced Metering Infrastructures (AMI), networking technology, and electronic domains in SG together help in recording, monitoring and analyzing the effect of manipulating characteristics on electric load prediction process. Earlier, traditional and computational intelligence techniques were used to forecast electricity load demands. There exists a few Machine Learning (ML) models to forecast the energy load demands. However, there is a need exists for appropriate method that can resolve the issues mentioned above i.e., imprecise prediction outcomes and high financial loss. When the prediction results observe 1% error, it increases the cost incurred upon total utility up to 10 million. So, the electricity utilization company designed a rapid, reliable, and easy short-term electric load forecasting technique. In addition, a precise predictive process was found to be advantageous in the detection of significant faults and achievement of consistent grid operations.
In recent years, several load predictive techniques have been presented with the application of decision-making process in SG. In literature [5], a new generalised method was presented to model the offline data. This method comprises of distinct seasonal cycles that use Autoregressive and Moving Average (ARMA) components. An Ensemble Subsampled Support Vector Regression (ESSVR) was developed in the literature [6] to forecast and estimate the load requirements. Besides, a Deep Belief Network (DBN) Restricted Boltzmann Machine (RBM) was applied for load prediction. It mitigated the predictive error to a reasonable computation time. Hong et al. predicted the electricity load demands using an hybridisation technique in which Seasonal Recurrent Support Vector Regression (SRSVR) technique was applied along with Chaotic Artificial Bee Colony Algorithm (CABCA). The experimental results were evaluated through comparative analysis against ARIMA technique. Although the previous works offered a reasonable analysis of electric load prediction, there is still a need to devise effective load forecasting models.
The current research paper presents a new Multi-Objective Grasshopper Optimisation Algorithm (MOGOA) with Deep Extreme Learning Machine (DELM)-based short-term load predictive technique called MOGOA-DELM model P2P ET in SGs. The proposed MOGOA-DELM model involves four distinct stages of operations such as data cleaning, Feature Selection (FS), prediction, and parameter optimization. Further, the study also exploited the MOGOA-based FS technique to select the optimum subset of features. Besides, DELM-based predictive model is employed in forecasting the load demands. The utilization of MOGOA for FS as well as the optimal choice of DELM parameters enhanced the predictive outcome. A detailed experimentation analysis was carried out on UK smart meter dataset to validate the effectiveness of the proposed MOGOA-DELM model.

Literature Review
New Internet of Things (IoT)-enabled Deep Learning (DL) model was presented in the literature [7] to overcome the load forecasting problem with maximum accuracy. In addition, this model qualitatively investigated the manipulation, since it primarily influences the prediction process. But the crucial part is the distribution of massive quantities of data in available communication networks. An Adaptive Hybrid Learning Model (AHLM) was presented for forecasting the intensity levels of solar irradiance. In addition, the study also exploired the hybridisation of Back Propagation (BP), Genetic algorithm (GA), and Neural Network (NN) for learning nonlinear characteristics of the data. The presented AHLM model learnt the nature through offline data and effectively forecasted the solar intensities. The presented technique outperformed both short and long-term prediction horizons. Prediction is crucial for optimal and significant harvesting of solar energy. Therefore, both shrinkage and election operator techniques were presented to forecast the production of solar energy. The proposed model was trained based on the past climatic data to minimise the forecasting errors and the results revealed the supremacy of the parameters involved in training process.
A new hybrid short-term load forecasting technique was designed in the literature [8] using Enhanced Empirical Mode Decomposition, ARIMA, and Wavelet Neural Network (WNN) that was optimized through Fruit-Fly Immune (FFI) method. To determine the superior performance of the presented technique, the electric load data was exploited. The experimental values showcased the effectual outcome of the presented model over available techniques. Another DL-based electricity load forecasting technique was developed in the literature [9]. It extracts the abstracted features using a stacked denoising auto-encoder model. Using the extracted features, Support Vector Regression (SVR) was trained to forecast the load demand. A novel ELM model was presented in the literature [10] based on mixed kernel for upcoming load prediction.
Zeng et al. [11] developed a new model through hybridization of ELM switching delayed Particle Swarm Optimisation (PSO) technique to forecast the short-term load. Both weight and bias parameters were tuned using switching delayed technique. A tanh-based activation function was utilised due to the characteristics of generalisation issue which gets rid of both needless hidden node and over-training issues. The simulation values showcased that the presented technique has outperformed the RBF NN model. In Zhang et al. [12], another hybrid prediction technique was proposed through the integration of Singular Spectrum Analysis (SSA), SVM, and Cuckoo Search (CS) model for load forecasting. The past data was cleaned using SSA and was fed as input to Support Vector Machine (SVM) for prediction. In addition, the tuning of the parameters, involved in SVM, was performed using the chosen CS algorithm.
In Chen et al. [13], a clustering-based hybridization technique was designed to predict the electricity demands of hotels on an hourly basis. The operation building remains non-stationary, owing to the presence of uneven electric temporal characteristics. An online modified predictive technique was presented using SVR and wavelet decomposition technique with fuzzy C-Means (FCM) algorithm. The presented technique enhanced the accuracy over other classical models. In Guo et al. [14], a novel Deep Neural Network (DNN) technique was developed to forecast the short-term load. It was validated against the case study conducted in China upon energy consumption. Another hybridized forecasting technique was designed in the literature [15] by integrating feature extractor and 2-stage predictor. The 2-stage predictor used Ridgelet Neural Network (RNN) and Elman neural network for precise forecasting. Also, an optimisation algorithm was utilised in the selection of control variables in the predictor. A short-term load predictive model, using SVR, was presented in the literature [16] to increase the relative forecast accuracy and effectiveness.

The Proposed MOGOA-DELM Model
The overall working principle involved in the proposed MOGOA-DELM model is shown in Fig. 1. Primarily, smart meter data is preprocessed to remove the unwanted details and improve the quality of data. Next, MOGOA-based feature subset selection process is carried out to choose an optimal set of features. Finally, the DELM model is applied for load prediction in SG environment. Simultaneously, MOGOA-based hyperparameter optimisation process is carried out to decide the parameter values of the DELM model.

Preprocessing
At the beginning, the input data is fed into data cleaning stage. The missing values are filled with the mean values of the past electricity information. The cleaned data is then provided and normalised due to outliers, while the weight matrix is considerably low. At the end of preprocessing, the data quality gets increased to a certain level.

MOGOA Based Feature Selection
GOA is presented based on the foraging behaviour of grasshoppers. GOA is mathematically defined based on the formula that decides the location of every grasshopper and is shown in Eq. (1): where X i is the location of i-th grasshopper, S i is the social communication among the representatives in swarm, G i is the gravity force, and A i defines the wind effect. GOA considers social interaction and is defined as given herewith.
where d * ij is the normalised distance between 'i'th as well as 'j'th grasshoppers, s d ij is the purpose of social force and d ij is the singular vector from 'i'th and 'j'th grasshoppers.
The complete values of the distance beween 'i'th and 'j'th representatives are defined herewith.
Therefore, the normalised value can be calculated as follows.
where rem d ij , 2 is the residue after the division of d ij by 2. The distance normalisation enables the distance value to be placed near value of 2 and offers the finest effect with s-function. The unitary vector d ij can be represented by subsequent correlation: Therefore, d ij could be represented as Eq. (6): The peculiar characteristic of GOA is the attenuation of comfortable zone based on rounds. The comfort region represents the sphere over optimal agent. In comfort region, rest of the agents are expelled from the leader and are attracted to the exterior of the comfort region [17]. The comfort region is the sphere of optimal agent. The decreasing coefficient c models the difference in comfort region by modifying the value in a classic manner from 1 to a certain small number. The d-dimensional problem is defined in Eq. (7).
where ub d and lb d are the maximum and minimum limits of d dimesions.
where F and L are the coefficients with recommended values such as 0.5 and 1.5 correspondingly.
Under FS problem, every result is constrained to the binary values of 0 and 1. To employ GOA in FS, a binarised model is presented. Here, a solution can be represented as 1-dimensional vector, where the vector length depends on the feature count in actual dataset. The cells in the vector has either '1' or '0'. Here, value '1' denotes the selection of respective feature; else, the value is kept as '0'. Eq. (9) is implemented to map the continuous values to binary ones.
where Z mn is the distinct method of solution vector X whereas X mn is the continuous position of searching agent m at dimension, n.
FS process could be defined by multiobjective optimisation issue in which two contradictory aims need to be attained, with lesser attributes and higher classifier outcome. Fig. 2 shows the flowchart of GOA model. Here, optimum solution is the solution that is comprised of few chosen features and a better classifier outcome. The predictive outcome of the DELM model is employed as the fitness function to assess the performance of every search agent [18]. To balance the chosen feature count and classifier outcome, the fitness function of GOA can be defined as follows where Err(D) is the rate of error in classifier to the identified subset, ρ and ϕ are constant values used in controlling the classifier results and feature reduction and |F| is the recognised feature subset size, |T| is feature count. ρ in [0,1] and ϕ = (1 − ρ).
Here, MOGOA is applied as a wrapper FS technique by applying DELM classification model as a fitness function. It can be used with DELM classifier to evaluate the efficiency of the selected set of features. The proposed MOGOA-DELM model comprises of two major levels namely, FS and classification. Firstly, the MOGOA-DELM model receives the actual data as input, whereas the MOGOA selects a valuable set of features which is then fed into DELM model.

DELM Based Prediction
In this stage, DELM-based prediction process is carried out for electricity load prediction. Autoencoder (AE) is an Artificial Neural Network (ANN) method which is widely employed in DL concepts. It is a kind of unsupervised NN, where the output and input of the AE are identical in nature. ELM-AE is an updated model which is used in the generation of input signal and AE. Fig. 3 portrays the structure of ELM. ELM-AE model comprises of input, hidden, and output layers. Based on the Hidden Layer (HL) outcome that defines the input signal, ELM-AE model is partitioned into three distinct demonstrations as given below.
• j > n: Compressed Form indicates the features from high-dimension input signal space to a low dimensional feature space. • j = n: Equivalent Dimension Form denotes the features of input signal space dimension which is identical to feature space dimension.
• j < n: Sparse Form defines the features of a low-dimension input signal space to a low dimension feature space.  1, 2, . . ., N), the output of ELM-AE HL is defined in (11), and the numerical connection between the output of hidden as well as output layers is defined in Eq. (12): The ELM-AE model is used to obtain the output weight V which is partitioned into three stages. However, the computation technique of the output weights V of ELM-AE in step 3 is dissimilar from the computation technique of output weight V of ELM. In case of sparse and compressed ELM-AE representations, the output weight V is defined using the Eqs. (13)- (14): If the training sample count exceeds the HL node count, then If the training sample count is lower than the HL node count, then For equivalent dimension ELM-AE representation, the output weight V can be defined as given herewith.
Multilayer Extreme Learning Machine (MLELM) is one of the unsupervised networks which is commonly used to train the variables in all layers. However, there is a variation i.e., MLELM model does not require fine-tuning of the network [19]. It utilises the ELM-AE model to train the variables in all layers and the MLELM HL activation function is found to be linear or non-linear piecewise. When the activation function of MLELM ith HL is g (x), then the variables between MLELM ith HL and MLELM (i − 1) HL undergo training using ELM-AE, and the activation function would be g (x). The mathematical connection between the output of MLELM ith HL and output of MLELM (i − 1) HL is defined herewith.
where H i denotes the outcome of MLELM ith HL. The outcome of the links between the final HL and outcome layer is computed through regularised least squares.
MLELM utilises ELM-AE for parameter training in all the layers whereas the ML-ELM HL activation function is found to be linear or non-linear piecewise, and the mapping of MLELM is either linear or nonlinear. If the mapping is unknown, then the HL can be added while the kernel function can be constructed. Alternatively, the outcome of MLELM HL H k (the matrix size is n k * N) remains the input of KELM, and the kernel function can be designed rather than H k+1 H k+1 T . The integration of MLELM and KELM results in the design of DELM and is defined as follows. (H k ( : , 1) , H k ( : , 1)) · · · K (H k ( : , 1) , H k ( : , N)) . . . . . . . . . ( : , N) , H k ( : , 1))· · ·K (H k ( : , N) , H k ( : , N)) H k ( : , 1)) . . .

K (H k
where v i (i ∈ [1, . . . , k]) and H i−1 defines the output and input weights of ELM-AE, and HL node count in ELM-AE is equal to the hidden node count of DELM, where the parameters between DELM ith HL as well as MLELM (i − 1) HL undergo training using ELM-AE. In addition, the kernel function can be constructed rather than H k+1 H k+1 T ; therefore, the output weights matrix V in DELM is defined in Eq. (18) and the classifier form of KELM can be defined as follows. H k ( : , 1)) . . . H k ( : , N))

Parameter Optimization Using MOGOA
MOGOA is applied in the selection of hyperparameters for DELM model. Here, Gaussian kernel is used with parameter σ > 0. In GOA, variable ω is the major controlling variable. The inner ω minimizes the grasshopper over target objects. The variable balances the exploration and exploitation of the whole swarm over targets. On the other hand, exterior ω is assumed to prevent the excess movement of grasshoppers over targets. All the agents in GOA comprise of a set of three quantitative values that denote the GOA's features. The related feature considers 0 and 1 values respectively. The processes involved in MOGOA-DELM model is given below. The agent count is considered to be ng = 30 whereas the max. iteration count is kept as t max = 100. Three primary positions which indicate the hyperparameters are arbitrarily created from uniform distribution C ∼ U (0, 5), σ ∼ U(0, 2), ε ∼ U(0, 1). The remaining positive values represent that the feature is produced as U (0, 1). The fitness function can be represented as given herewith.
where the fitness is determined for the tested data. For parameter tuning process, MOGOA is used [20]. In addition, all the agents are defined using p-bit binary string. To update the position, the transfer function is commonly utilised to force the agents that lie in the binary space as T (x) = (1/1 + exp (−x)). This denotes the sigmoid transfer function. The processes involved in steps 3-4 are iterated till t max is attained.

Performance Validation
The performance of the MOGOA-DELM model was validated using UK Smart Meter dataset [21], which contains household id, plans used (standard or dynamic time of use), date and time, meter readings (Kwh), and acorn groups. Tabs. 1-3 and Figs. 4-6 show the result of the analysis conducted for MOGOA-DELM model against existing techniques under the application of three datasets such as training, validation, and testing.
Tab. 1 provides a detailed comparison of MOGOA-DELM model against existing methods on training dataset [22,23]

Conclusion
The current research study developed an efficient MOGOA-DELM-based short-term load predictive method for P2P ET in SGs. The proposed MOGOA-DELM model involves four distinct stages of operations namely, data cleaning, FS, prediction, and parameter optimisation. MOGOAbased feature subset selection process was carried out to select the optimal set of features. Besides, the DELM model was applied in load prediction under SG environment. Simultaneously, MOGOA-based hyperparameter optimization process was carried out to decide the parameter values of DELM model. To validate the effectiveness of the proposed MOGOA-DELM model, a detailed experimentation analysis was carried out on UK Smart Meter dataset. The experimental values pointed out the superiority of the presented method in predicting the testing data and the model obtained the highest accuracy of 85.80%. Therefore, it can be treated as an appropriate load forecasting tool for SG environment. In future, the presented MOGOA-DELM model can be implemented in real-time environments and hybrid metaheuristic algorithms can be used to achieve improved outcomes.

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