AI-Empowered Recommender System for Renewable Energy Harvesting in Smart Grid System

The electric grid has already been transitioned towards a more flexible, intelligent, and interactive grid system, i.e., Smart Grid (SG) for load management, energy prediction, higher penetration of renewable energy generation, future planning, and operations. However, there is a huge gap between energy demand and supply due to the rise of different electric products and electric vehicles. Renewable Energy Harvesting (REH) plays a critical role in managing this demand response gap, where energy is generated from various renewable energy resources such as Solar PhotoVoltaic (SPV) and wind energy. Several research works exist in this regard. However, they have not yet been exploited fully. So, this paper proposed AI-RSREH approach, i.e., the AI-empowered Recommender System for REH in residential houses. The main goal of the proposed AI-RSREH approach is to predict energy generation based on SPV accurately, and this study aims to minimize the gap between the actual generation of energy and the predicted energy generation along with a recommender system for SPV installation. An exploratory residential house-wise data analytics is conducted for the demand response gap. AI-RSREH uses a stacked Long-Short Term Memory (LSTM) model to predict energy generation with a recommender system based on the energy generation prediction result. The obtained results show the efficacy of the proposed approach compared to the existing methods with respect to parameters such as SPV installation in residential houses and prediction accuracy.


I. INTRODUCTION
With the increasing electricity demand, Smart Grid (SG) has become an essential technology that allows easier integration and higher penetration of renewable energy to reduce the demand response gap. It is an upgraded version of the traditional grid infrastructure that supports two-way communication of energy and data (collected from end-customer, i.e., consumers/prosumers) to reduce demand response gap [1], [2]. In SG, Demand Response Management (DRM) system is an essential component to balance energy supply and The associate editor coordinating the review of this manuscript and approving it for publication was Fabrizio Messina . demand. DRM monitors customers' energy consumption to maximize energy efficiency and reduce expenses [1]. The DRM has significantly evolved Renewable Energy Harvesting (REH) using various Renewable Energy Sources (RES) like wind energy and solar energy to reduce the demand response gap in the residential sector [3]. As per the report of the International Renewable Energy Agency (IRENA), the residential sector of India utilizes 24% of total energy consumption, annually and it is projected to grow more than eight times by 2050 [4].
Solar energy is the most widely used RES for REH and a range of other uses. On average, the world receives 84 terawatts of solar energy every day, which is thousands of times more than its need [5], [6]. A rooftop Solar Photo-Voltaic (SPV) power system is commonly utilized in the residential sector. An SPV power station is a PhotoVoltaic (PV) system with energy-producing solar panels erected on the roof of a home, building, or others. This REH system includes varieties of electrical accessories and components such as modules, cables, and mounting systems. REH systems on residential buildings typically have capacities ranging from 5 to 20 kilowatts, depending on the needs of the customer and the area of the rooftop. Rooftop solar energy accounts for 2.1 Gigawatts (GW) in India, with the residential sector accounting for 30%. FIGURE 1a shows the worldwide energy market growth that will upsurge at a compound annual growth rate (CAGR) of 12.9% from 2.2 billion USD in 2020 to 7.4 billion USD in 2030 [7]. FIGURE 1b illustrates that the market of REH using solar energy is growing at a CAGR of 20.41%, which is a huge contribution in energy generation [8].
Several research works exist for REH using solar energy, for example, Irtija et al. [9] proposed an approach, which enables the customer to interact directly with the energy market to change their energy consumption per the announced price and its availability. In [10], the recommended scheme facilitates a selection of non-essential energy loads that need to be shed at peak times to reduce the energy bill of the customers. To get the most out of SPV, reliable predictions of energy generation must be made prior to its installation. Many researchers are working on the prediction of reliable SPV generation throughout the globe [11]. Many factors are affecting the SPV energy generation; for example, Al-Dahidi et al. [12] have identified that the cell module temperature can easily reach 70 • C on hot days, causing energy production to decrease drastically below nominal values that are one of the major challenges in REH [12].
Artificial Intelligence (AI) has become one of the hyperactive technology in many research areas and it comprises various underlying technologies like Deep Learning (DL) and Natural Language Processing (NLP). DL has mostly referred to stacking multiple layers of Neural Networks (NN) and relying on random optimization to perform a task. A range of layers enhance the learning ability and performance of tasks; particularly, the Long-Short Term Memory (LSTM) has received tremendous attention in the domain of time-series data learning, which Hochreiter and Schmidhuber introduce originally [13]- [16].
The author Thukral et al. [11] used multilayered feedforward NN to predict the solar radiation in Jaipur city. This model predicted the solar radiation values with 0.0253 mean square error after 12000 iterations [11]. The author Chow et al. [22] employed 1128 high-quality data to train and test the presented model to predict the real-time energy generation [22]. The author Senapati et al. [23] used a Multivariable Grey Model (GMC) for energy generation prediction using solar energy. Although much research work exists, very few approaches confronted the SPV energy generation for individual customers. It has been considered trivial because of the volatile nature of energy consumption at the customer end. Hence, the SPV energy load prediction and recommender system for the same remain open [24], [25].
Motivated from the aforementioned discussion, this paper proposes an AI-empowered Recommender System for REH (AI-RSREH) to accurately predict the SPV energy generation in residential houses. Here, AI-RSREH uses the LSTM model for SPV energy generation prediction in the DRM system. Then, based on the prediction result, it proposes a recommender system to install SPVs in the various building of a particular locality to close the demand response gap.

A. RESEARCH CONTRIBUTIONS
Following are the research contributions of this paper.
• An exploratory residential house-wise data analytics is conducted to compare energy demand and supply.
• Proposed an AI-based SPV energy generation prediction approach using the LSTM model.
• Design a recommender system to install SPVs to minimize the demand response gap and reduce the burden on the grid.
• Performance evaluation of the proposed AI-RSREH approach is done over prediction accuracy by comparing it with existing approaches.

B. ORGANIZATION OF THE PAPER
The rest of the paper is organized as follows. Section II briefs the existing AI-driven REH works for energy generation prediction and recommender systems in residential houses. Then, Section III discusses the system model of the proposed AI-RSREH approach with problem formulation. Then, Section IV describes the workflow of AI-RSREH and conveys an explorative data analytics to project the issues of REH along with the recommender system. Section V shows the experimental results of AI-RSREH based on data analytics and the LSTM model, and the paper is finally concluded in Section VI.

II. BACKGROUND
This section highlights the AI-driven state-of-the-art REH approaches with their advantages and disadvantages. Then, a comparative analysis of the existing REH research work with the proposed approach is also presented in this section. Irtija et al. [9] introduced a contract-theoretic DRM framework based on labor economics concepts to support the stable and efficient functioning of SG system for profit maximization problem with the prosumers' profit optimization. Next, Kumari et al. [15] introduced a DL-based data analytics approach that predicts energy consumption with high precision and accuracy. Although, a dynamic pricing mechanism is needed to benefit utility companies to increase their revenues.
Al-Dahidi et al. [26] suggested an optimized approach for SPV energy prediction using Artificial Neural Networks (ANN). An ensemble of optimized and diverse ANN is VOLUME 10, 2022  presented for predicting SPV output 24-hours ahead of time while also assessing the related uncertainty that influences energy generation predictions. The factors impacting the efficiency of a photovoltaic system were proposed by Venkateswari and Sreejith [27]. The parameters that determine the efficiency of an SPV system are examined in depth in this research.
Thukral et al. [28] suggested a multilayered feedforward NN model estimate solar radiation in SPV radiation prediction. Their technique is proved to accurately predict sun radiation for both trained and unseen data through performance analysis. Although, forecasting accuracy is required to improve by developing a data logger that can record weather data more frequently. Then, Milano et al. [22] provides a map and analysis of the major ethical issues raised by recommender systems. It fills a gap in the literature by emphasizing the importance of considering the interests of a recommender system for SPV installation. Based on the taxonomy and conclusions of this analysis, the next step includes articulation of a complete framework for resolving the ethical concerns faced by recommender systems [29]- [31]. Table 1 presents a comparative analysis of the proposed AI-RSREH approach with the pre-existing REH approaches along with a recommender system.

III. SYSTEM MODEL AND PROBLEM FORMULATION
The major challenge of REH in residential houses is the volatility and diversity of energy generation prediction. This section presents the system model of AI-RSREH approach and corresponding problem formulation.
A. SYSTEM MODEL FIGURE 2 depicts the AI-RSREH's system model for the prediction of energy generation and recommender system to improve energy generation. AI-RSREH comprehend of four layers: (i) Energy Generation Layer, (ii) Data Collection and Preprocessing Layer, (iii) Prediction Layer, and (iv) Analysis Layer. Following is the description of each layer.

1) ENERGY GENERATION LAYER
In REH, SG encompasses the dynamic behavior and distributed generation of renewable energy, helping both customers and utility companies to access RES and reap their benefits [32], [33]. In this layer, an SPV contains an inverter, one or more solar panels, other mechanical and electrical components, which use solar radiation to generate energy. Here, each panel produces a small quantity of energy on its own, but when linked together as a solar array, they generate a larger amount of energy, i.e., energy harvesting. Power generated by an SPV array is Direct Current (DC). However, various electric appliances, such as phones or laptops, use DC energy, but they are designed to use alternating current (AC). Thus, solar energy generated from SPV must be converted from DC to AC (before it can be used) through an inverter. Therefore, inverters are converted into AC and supplied to all the home appliances such as washing machines, laptops, bulbs, etc. The energy generation and consumption data are generated through Smart Meter (SM) installed at the residential house and sent to the data collection and preprocessing layer, discussed in-depth in the next section.

2) DATA COLLECTION AND PREPROCESSING LAYER
In this layer, energy consumption data is collected from SM and preprocessed initially. To make the SG truly smart, various components are utilized, for example, SM-sensors to track consumption, peak hours, humidity, and climate, among other things. Every house has SM installed to link to the SG using a wireless/wired communication channel. It transmits data collected by all SM to the state's electric department. Here, we have opted for wireless communication because a wired system is more expensive, and the management of the wired system is also a challenging task. Instead, the collected energy data is sent to the energy department via a wireless system.
The collected energy consumption data is preprocessed and analyzed to employ DRM as a tactic to minimize or shift energy usage from peak hours of the day, when demand is highest, to non-peak periods. Energy generation data contains duplicate values, missing values, and noise, or it may be scaled and modified, or it may be gathered from multiple sources [34]. For data preprocessing, we have employed the linear interpolation method to handle missing values. It is a modest method for estimating unknown values that lie between the two known values. The major goals to apply linear interpolation for data preprocessing are to remove errors, improve reliability, remove redundancy, efficient use of memory resources, and make optimal analysis.

3) PREDICTION LAYER
The AI-empowered prediction layer takes the relevant collected data from the data cleaning and preprocessing layer to produce meaningful prediction analytics. The results are oriented to boost the REH in SG, which has proven its growth for the sustainable development of society in recent times. The high-quality pre-processed energy generation data (EG) is needed to predict future energy generation trends using SPV. The prediction facilitates meaningful analytics and helps utility companies to plan future strategies (such as installation for more PVs in a particular area) for the sustainable development of society. Therefore, we use one of the coveted techniques, i.e., the LSTM model, a powerful AI-empowered time-series prediction technique to predict the future energy (E). E is passed into the LSTM model to obtain predicted result E pred . VOLUME 10, 2022

4) ANALYSIS LAYER
After predicting SPV-based energy generation using the LSTM model, analytics is performed on the prediction results for a recommender system to recommend SPV installation in a particular residential area. Thus, it helps the utility companies reduce their energy supply load and promotes the REH for more and more energy generation. We have applied a hybrid filtering mechanism for the recommender system to avoid cold start problems in the initial stage. Then, the system employs the content-based filtering strategy, and then in the later stages, it uses the collaborative filtering strategy [35]. The prediction of energy data from the prediction layer is compared with the actual energy generation data and customer (i.e., consumer/prosumer) demand. The difference between customer demand and energy generated gives the gap of demand response. So, the proposed AI-RSREH approach's recommender system uses the hybrid filtering strategy for stronger recommendations for SPV installation to reduce demand response gap.

B. PROBLEM FORMULATION
The SPV-based generated energy is distributed to multiple prosumers or consumers via the SG. However, due to the increased use of various electric appliances and electric vehicles, there is a mismatch between demand and energy response. So to fill this gap, we use REH through SPV to generate energy. Here, consider {h 1 , h 2 , . . . , h l } ∈ h be the set of h hours, for which {α 1 , α 2 , . . . , α m } ∈ α are the proportionate hourly energy generation using multiple SPV {pv 1 , pv 2 , . . . , pv n } ∈ pv. Here, l stands for the 24 th −hour, m shows the maximum amount of energy generated by SPV in an hour, and pv n denotes the SPVs used for a specific hour. The proposed AI-RSREH approach aims to predict the energy generation of SPV accurately; this paper attempts to minimize the gap (ω) between the actual energy generated (A E ) and the predicted value (P E ). SPV power generation prediction and SPV installation is the major subject of this paper.
There are many factors(F A ) such as months and season of the year(S Y ), time of the day(T D ), temperature(T ), shading(S), wind speed(W S ), global solar irradiation(S I ), age of SPV(A) that affect SPV energy generation. For the study of the proposed prediction model, the energy generation of SPV has been monitored locally at each hour h interval. The hourly ω is calculated as follows.
where, A h E is the hourly actual energy generation and P h E is the hourly predicted energy generation prediction. Likewise, the monthly energy generation ω monthly is calculated as follows.
where, r is the number of days within a month and r lies between 28 to 31. This approach can minimize ω by using the LSTM model ∈ E LSTM P . Hence, the objective of the proposed AI-RSREH approach is as follows.
Subject to the following constraints.
Constraint C1 shows that number of SPVs to generate energy for a specific hour h cannot be null for a particular residential house. So then, constraints C2 and C3 represent that actual and predicted hourly energy should be more than zero.

IV. WORKFLOW OF THE PROPOSED APPROACH
The complete working of the proposed AI-RSREH approach is divided into two stages, where the first stage comprises energy generation prediction and the second stage contains the recommender system for the SPV installation to reduce the demand-response gap. FIGURE 3 depicts the workflow of the proposed AI-RSREH approach, which encompasses AI model, i.e., specific LSTM model for energy generation prediction.

A. ENERGY GENERATION PREDICTION
The LSTM is a form of Recurrent Neural Network (RNN) that uses the previous phase's output as an input for the next step [36]. The nodes in LSTM are recurrent, but they also have an internal state that allows them to store and retrieve data as needed. The node uses both the input and the internal state information to calculate the output. Apart from that, the node has gates that allow information to flow for calculation, and their behavior is determined by the inputs. LSTM gates can be denoted as i for the input gate (which determines that input data should be passed in the present time-stamp or not), then f for the forget gate ( discards irrelevant data from the previous time-stamp), and o for the output gate (controls the flow of information within the network). Furthermore, W denotes the weight matrices, whereas σ is the sigmoid activation function. At time t, the input is represented by I , the biases are denoted as ψ, the output is represented as O, and the cell memory is represented as CM [37]. The in-depth calculation of output at time t is as follows: Furthermore, the energy generation prediction process is again divided into two parts, i.e., (i) training of the LSTM model, and (ii) testing the model. Data collection (D C ), data preprocessing (D PP ), and data processing (D P ) are all sub-components of the proposed AI-RSREH approach. First and foremost, data is collected hourly from the SPV array in various weather circumstances. Then, the LSTM model is trained to estimate SPV power generation accurately. Here, D C contains some noise, so this paper applied data cleaning methodology on D C and obtained D PP to get accurate results of prediction. Here, we employed the ''linear interpolation'' method for data pre-processing. It is a modest method for estimating unknown values that lie between two known values. Next, missing values are substituted by linearly spaced values between the two nearest defined energy generation data points [38].
After the noise filtration, energy generation data is processed to get some insights from the data. The processed data D P is passed to the LSTM model for training for SPV generation prediction. A stacked LSTM model is created by stacking multiple hidden LSTM layers, one on top of the other [39]. Algorithm 1 illustrates the steps for the energy generation prediction using the proposed stacked LSTM model. LSTMs is one of the types of RNN, which can determine long-term dependencies. Here, LSTM nodes form a directed graph, which follows a temporal sequence. It does not have to remember things for lengthy periods. So, it becomes easy to train LSTMs. In AI-RSREH, LSTM model contains forget gate -sigmoid function (sigma), input gate -tanh function (tanh) + sigmoid function (sigma), and output gate -sigmoid function (sigma).
In AI-RSREH, 70% of D C is used to train the proposed LSTM model and the remaining 30% is used to test the model. To check the model's accuracy, errors or disparities between the model outcome and the actual value are calculated using a variety of methods to discover errors, including: • Root Mean Square Error (RMSE) -It is the square root of the mean of the squared discrepancies (among actual and predicted outcomes), which is as follows [40]. (9) where, N is the number of energy generation data, x i and y i are the actual energy generation data and predicted energy data.
• Mean Absolute percentage Error (MAPE) -MAPE performs the similar function as Mean Absolute VOLUME 10, 2022 Error (MAE) does, but it displays a ''percentage'' difference in results, which is as follows [41].
where, M is the number of energy generation data, A E and P E are the actual and predicted energy generation data.

B. RECOMMENDER SYSTEM
Once prediction results are obtained from the first stage, a recommender system for the SPV installation is proposed in the second stage. It uses the prediction results of the LSTM model to determine the size of SPV that should be used in a given location to reduce the demand response gap [42]. The recommender algorithm 2 calculates the value of the SPV that should be installed by calculating the mean of the energy generation of residential houses for a particular area. Electric utility companies benefit from the recommender system since it helps them reduce their energy generation load and supply. For example, considering a residential area area−A has lower SPV energy generation due to various factors such as low sunlight, weather condition. Still, near about residential area, area − B has a higher SPV energy generation. SPV energy generation in area−B can be boosted using the recommender system by utility companies, and the generated energy can be distributed to area − A.

V. PERFORMANCE EVALUATION
This section includes the experimental results, analytics, and discussions that are obtained from the implementation of AI-RSREH.

A. EXPERIMENTAL SET UP
The proposed AI-RSREH approach is implemented on a Windows operating system (OS) configured as Intel(R) Core(TM) i7 9 th generation CPU @ 2.60GHz, 8GB RAM using functional programming language, i.e., python.

B. DATASET DESCRIPTION
The experiment has been carried out using the energy data [43] provided by pecan street. Initially, energy generation data is collected and pre-processed by employing SciKit-learn (sklearn) library. Next, price data is taken from PJM Data Miner as of 9 th November 2021 [44]. Then, highlevel python language is used to interact with DL libraries to predict the energy generation. The proposed LSTM model is rigorously hyper-parameter tuned, and the recommender system is validated. The proposed approach incorporates RMSE

C. EXPERIMENTAL RESULT
In AI-RSREH approach, while training energy generation data, the stacked LSTM comprises three layers; the first layer uses 100 nodes, then the hidden layer uses 200 nodes, and the last layer is a dense layer with one node. The model 24322 VOLUME 10, 2022  gets trained for 20 epochs with batch size 32. However, the proposed AI-RSREH approach is trained with a validation split of 20% using LSTM. FIGURE 4 shows the training and validation loss for the stacked LSTM models over energy generation REH data using SPV. It is evident from the graph that the loss value during training and validation is very less (close to each other) for the proposed AI-RSREH approach. Moreover, it indicates the exceptional prediction capabilities of the proposed approach.
FIGURE 5 represents the prediction result of energy generation based on SPV in REH system. Here, the analysis is shown for ten days on the x-axis, and the amount of energy generated is in kiloWatthour (kWh) on the y-axis. It is evident from the graph itself that actual energy generation (marked in red color) and predicted energy generation (marked in blue) are very much near with each other and achieve the first stage objective of the proposed approach. The prediction of energy generation using the stacked LSTM model has been evaluated on the MAPE (34.89%) and RMSE (0.092) values. Table 2 illustrates a comparative analysis of the energy generation prediction result with baseline approaches Kong et al. [14] and Konstantinou et al. [23] in terms of RMSE and MAPE. The analysis shows that the proposed approach obtained a better prediction result compared to baseline approaches.
The second stage includes a recommender system for SPV installation to reduce the demand response gap. In this stage, we have considered solar panel capacity as 260W and per day unit of energy generation from 1-SPV is obtained as 1.18KWh. Here, the demand response gap is calculated based  on the energy generation prediction done in the stage-1 using LSTM model. FIGURE 6a shows the demand response gap before employing the proposed approach for a particular residential house; this gap is calculated based on the energy generated from SPV and energy consumed by the customer. The graph depicts that the house needs more energy as demand is quite high from energy supply. Hence to mitigate this issue, algorithm 2 is applied for ten residential houses where the demand response gap is obtained high. FIGURE 6b illustrates the DRM gap after employing the proposed approach, where supply increases compared to the demand (due to recommended SPVs installation).
FIGURE 7 illustrates the SPVs recommendation for the 10 residential houses in a particular locality. Here, the installation of recommended SPV will generate more energy than needed. The installation of SPVs in the fraction is impossible, so the extra energy generated can be sold to the grid or in the nearby locality. After installing the recommended number of SPVs, various issues such as power failure, low voltage, and others will be handled automatically and benefit the customer in terms of gaining remuneration for selling energy to the grid.

VI. CONCLUSION
REH has become a critical component of the SG system for DRM. Furthermore, estimating energy generation using SPV can help customers (i.e., consumer/prosumers) manage their energy demands and close the demand-supply gap. Therefore, this paper proposes AI-RSREH, i.e., an AI-empowered approach for REH prediction along with a recommender system. The proposed AI-RSREH approach is divided into two-stage to benefit all the stakeholders; the first stage is all about SPV energy generation prediction using the LSTM model in residential houses. Then, the second stage encompasses a recommender system to enhance energy generation in the residential area where the demand response gap is high. Here, the resulting outcome from stage one, i.e., the LSTM model, became essential for the second stage of analytics. Further, using the energy generation prediction findings, an analysis of the SPV generation for a particular residential area can be performed, and various outputs can be shared among stakeholders like utility companies, endcustomer, etc., to benefit them. As a result, the proposed AI-RSREH approach strives to close the gap between energy demand and response.
In the future, we will extend this research work for sustainable solutions for REH from agricultural residue and management of RES.  IEEE TRANSACTIONS ON NETWORK  SCIENCE AND ENGINEERING, IEEE TRANSACTIONS ON VEHICULAR TECHNOLOGY,  IEEE TRANSACTIONS ON INDUSTRIAL INFORMATICS, IEEE TRANSACTIONS ON  GREEN COMMUNICATIONS AND NETWORKING, IEEE TCSC, IEEE INTERNET OF  THINGS JOURNAL, IEEE Network, ICC, IWCMC committee of various international conferences, including premium ones, such as IEEE CEC, IEEE CIS,  IEEE ICNSC, IEEE SMC, IEEE CASE, and IEEE SMCia. In May 2012, his  article had been evaluated as the Top Cited Article 2007-2011 by Elsevier Publisher, The Netherlands. In September 2012, once again, his article had been indexed in ISI Essential Science Indicator database as the Highly Cited Article and he had also been awarded as the Model Teacher Award by the Taiwan Private Education Association. He is indexed in the list of Who's Who in the World (25th-30th Editions), Who's Who in Asia (2nd Edition), and Who's Who in Science and Engineering (10th and 11th Editions). He is currently appointed as the Editor-in-Chief of the International Journal of Applied Evolutionary Computation. He also serves as a Guest Editor for the Energies and is appointed as an Associate Editor of International Journal of System Dynamics Applications.
RAVI SHARMA is working as a Professor with the Centre for Inter-Disciplinary Research and Innovation, University of Petroleum and Energy Studies, Dehradun, India. He is passionate in the field of business analytics and worked in various MNC's as the leader of various software development groups. He has contributed to various articles in the area of business analytics, prototype building for startup, and artificial intelligence. He is leading academic institutions as a Consultant to uplift research activities in inter-disciplinary domains.