**1. Introduction**

The building sector consumes about one-fifth of the total energy worldwide. The world energy demand for buildings is projected to increase from 81 quadrillion Btu in 2010 to approximately 131 quadrillion Btu by 2040 [1–3]. Buildings in the United States (US), including commercial and residential, accounted for about 28% of total US end-use energy consumption in 2019 [4]. Fossil fuels, the primary energy source, accounted for about

**Citation:** Mohana, M.; Saidi, A.S.; Alelyani, S.; Alshayeb, M.J.; Basha, S.; Anqi, A.E. Small-Scale Solar Photovoltaic Power Prediction for Residential Load in Saudi Arabia Using Machine Learning. *Energies* **2021**, *14*, 6759. https://doi.org/ 10.3390/en14206759

Academic Editor: Antonino Laudani

Received: 24 August 2021 Accepted: 13 October 2021 Published: 17 October 2021

**Publisher's Note:** MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

**Copyright:** © 2021 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https:// creativecommons.org/licenses/by/ 4.0/).

80% of US energy production in the last decade [5]. The combustion of fossil fuels to generate electricity was reported to be the largest single source of carbon dioxide (CO2) emissions in the US in 2013. It has accounted for about 37% of total CO2 emissions and 31% of total greenhouse gas emissions in the country [6]. Renewable energy sources are one of the critical sources of reductions in CO2 emissions. The 2030 challenge requires the global architecture and building communities to design carbon-neutral buildings by 2030 [7]. Moreover, in Saudi Arabia, within five years (2011–2016), the electricity consumption increased from 219.66 terawatts to 287.44 terawatts, i.e., 30% [2,3,8]. In the field of renewable energy technologies, photovoltaic (PV) devices have been extensively adopted in the last decade. The global installed PV capacity increased from 1 gigawatt (GW) in 2000 to 177 GW in 2014, and reached about 633 GW in 2019 [8]. In the US, the installed PV capacity increased from around 2 GW in 2010 to over 88 GW in 2020 [9]. The US market continued this rapid expansion in 2014, with an estimated 6.2 GW added to the grid, raising the total capacity to approximately 19 GW [5]. The demand for PV technology is anticipated to grow over the next few years. A number of countries have set a percentage target for a renewable energy source of the total electricity supply at the national or state levels. In 2015, 38 out of 50 states in the US introduced renewable portfolio standards (RPSs), which require electric utility and other retail electric providers to supply a predetermined minimum percentage of customer demand with eligible renewable electricity sources, thereby creating specific standards for solar energy [10].

In Saudi Arabia, several programs focus on increasing the use of renewable energy. In its National Transformation Program, Saudi Arabia recently set an ambitious target to migrate from oil dependency and divert oil and gas exploration to various higher-value uses [11,12]. As part of its Vision 2030, the country is required to produce 40% of its energy from renewable sources [13]. Due to the availability of solar radiation throughout the year, Saudi Arabia is one of the prime locations for harnessing solar energy [14]. The accuracy of predicting the amount of energy produced by the solar PV system is imperative for appraising the capacity of the PV system, calculating incentives, and obtaining a more accurate forecasting of the investment's feasibility. Several studies in the literature have suggested simulation, modeling, and prediction-based methods for estimating the amount of energy produced by PV systems [15–19].

In this paper, the power generation data were extracted from the polycrystalline PV system at King Khalid University (KKU) in Abha city (one of the coldest cities in Saudi Arabia, with heavy rains and fog). They are correlated with the solar irradiance and other parameters, measured for the same period by the weather station, to develop a model using artificial intelligence (AI) techniques, namely, least absolute shrinkage and selection operator (LASSO), random forest (RF), linear regression (LR), polynomial regression (PR), extreme gradient boosting (XGBoost), support vector machine (SVM), and deep learning (DL), to predict the amount of energy produced by the PV system. The contribution of this work was to study the most compelling features that can be used to predict the solar panel's generated power for the building sector using the backward feature elimination method, which shows an accurate prediction of power with fewer features. The method of backward feature elimination helps to indicate that fewer features can achieve similar results.
