{'fraction_non_alphanumeric': 0.020542052054205204, 'fraction_numerical': 0.008173800817380082, 'mean_word_length': 4.960897435897436, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Energy prediction of pv panels for demand and response system using ANN (deep learning)

Renewable sources of energy are the future due to the environmental problems caused by non-renewable sources to produce energy. The biggest issue with renewable energy sources is that the power produced by devices such as PV solar panels depend on many uncertain factors. These factors include Solar irradiation, wind speed, temperature, hours of sunlight per day, and surface temperature of solar panels. Industries and authorities can use this predicted power through ML to control power consumption. Power forecast has multiple applications that promote the usage of green energy in the future. This paper will also help to determine the dependence of PV power production on various weather/environmental factors. For this paper, we have used regressions and ANN models to predict power. In the end, the results of power prediction using regression as well as the ANN model are compared with the actual power output. Overall, ANN performs excellently compared to the other machine learning models because of its advanced feature selection techniques.


Introduction
The motivation to write this research comes from the aim of contributing towards a sustainable world. A sustainable world is not possible without producing green energy. This research aims to solve the problem of uncertainty of the power being produced through solar PV panels. Providing accurate predictions of solar power generation will help industries and power authorities maintain an uninterruptible power supply by demand and response system. This study will result in more power being produced by renewable sources than non-renewable, thus saving the environment from global warming and climate change.
In the future, the use of solar energy will grow in enormous numbers because it is environmentally friendly, especially in regions like Pakistan, where there is great potential for producing PV power. In Pakistan, most areas have extended hours of sunlight availability throughout the year, especially in the country's southern region [3]. It is not wrong to say that solar energy is the most abundant energy source that is available to our planet, and it is something that will not vanish soon. 100,000 TW of electrical energy can be produced through sunlight every hour, which is such a huge amount that it can give power to the entire population of humans on earth for a year [2]. This statistic shows that humans should take advantage of that and produce green energy that can meet our requirements and not damage the earth's environment. Solar panels are easy to install because no complex setup or massive construction is needed. Overall, these cells are also easy to manufacture for industries, which shows that there is great potential for developing nations like Pakistan to fulfill their energy needs using an economical energy source such as sunlight [5]. The most significant disadvantage of using solar power is that it requires many areas to install PV panels to produce a megawatt of electricity. Currently, Pakistan's energy needs are 92 GWs, and Pakistan has the potential to produce 2.9 TW of solar electricity, which shows that solar alone can meet all of the country's energy requirements, and still, much energy will be left to export [2].
The system is also clearly suited to off-grid generating and consequently to places with little infrastructure. The public accepts and generally approves solar technology; it is subject to less geopolitical, environmental, and aesthetic concerns than nuclear, wind, or hydro. However, substantial desert installations may arouse objections [6].
Photovoltaics are challenging to integrate into power systems since solar energy is mainly reliant on location and weather, shifting wildly. This uncertainty results in system disturbances, voltage spikes, configuration issues, ineffective utility management, and economic loss. Forecast models can be helpful, but time stamps, forecast horizons, input correlation analysis, data pre-and post-processing, weather categorization, capacity planning, risk assessment, and performance assessments must all be taken into account [1].
One of the significant issues the industry is presently facing is incorporating these unique types of power plants into the electrical system. Because renewable energy is becoming a more significant part of the power market, machine learning algorithms must forecast foreseeable electricity production to a desired level of accuracy. These projections also apply to power plant owners, the energy trading market, and grid operators. Information on future energy production growth in the grid decreases all market players' technical and economic risks [4].
The fundamental objective of this work is to evaluate the use of ML and deep learning techniques to predict solar irradiance. The paper will also go through the intricacies of the forecasting methodologies with illustrations. Each approach's merits and flaws are also discussed. The predicted data and actual data comparisons based on our simulations are explored. Furthermore, intriguing future research paths are suggested.

Method
The methodology used in this research will be using an ML model, a regression model, and a deep learning model, ANN. Using the data from the world bank about environmental factors of Pakistan, we trained a regression model, as well as training of the artificial neural network was also done. Four solar panels were installed in Islamabad to take real-time data and compare it with forecasted data to get an idea of the accuracy of our predicted data.

Data
The world bank data set for weather conditions was acquired as they had weather data for the capital of Pakistan, "ISLAMABAD," for 4 years, starting from 2014 to 2017, with a resolution of 10 minutes. Data was factorized into 11 features which included the following: Wind speed (m/s) at 10 m height wind speed of gust Maximum wind speed in the integration interval wind from direction st dev The wind direction in degrees north counted clockwise (standard deviation) wind from direction The wind direction in degrees north counted clockwise barometric pressure Ambient air pressure in hPa sensor cleaning 1 (yes) / 0 (no) Using the features given above, following parameters were chosen to predict power from these 4 solar PV panels.

Research Procedure
Firstly, 2014 to 2016 is used to train regression and ANN models. After that, data testing is carried out on the data from 2017. Testing data was kept separate from the training to ensure that testing of the model was done correctly. The GPU used to do the training of models was Google Collab. Both ANN and regression models were trained on Google Collab The formula used to calculate power from the forecasted factors is: Where E is energy, A is Total Area of the panel, r is the yield of the solar panel, H is the global solar irradiation, and PR is the performance ratio. Using this formula, predicted power is calculated.
After model training and testing, current and voltage sensors were installed at the output of the combined power of the four PV panels. The output of the actual power production was acquired for the whole day of June 12, 2022, and it was compared with the power predicted for June 12, 2022. June was chosen as the month of the forecast because it is the hottest month in Pakistan providing intense sunlight for long hours throughout the day, helping to generate PV power. Secondly, the output of actual power production was again taken for December 12, 2022, and compared with the predicted power output for December 12, 2022.
To calculate the accuracy of the model, we have employed the absolute percentage formula, which is: In this formula, Vf is the forecasted power that we predicted from ANN and regression models. Va is the actual power produced by the 4 solar panels. The results of actual power and predicted power using ANN, as well as regression, are shown below:  The most significant percentage error can be seen on June 15, when ANN predicted almost 30 percentage less power than the actual power output.

Conclusion
In conclusion, we can state that ANN is a far superior model when it comes to the prediction of PV power as compared to the regression model. Power prediction overall has been entirely satisfactory and near the actual power, which is a significant achievement for this research. The prediction also has vast applications for demand and response systems.
With the power generation for the next day already known, power consumption can be managed accordingly to avoid a blackout. This prediction is also helpful for investors in solar energy stations as they can precisely predict the future electricity generation and make decisions of break even and profitability based on that up to some level of credibility. My suggestion for future work is to use a combination of ML models to predict PV power in Pakistan because the average of different models used might provide better accuracy than a single model. Increased accuracy is essential for future renewable energy in Pakistan and worldwide. Another suggestion is that the application of demand response should be made using forecasts to adjust loads accordingly and avoid blackouts.