1.
Introduction
Access to an adequate, secure, and sustainable energy supply is important for economic and social development [1]. It has been established that the rate of industrialization of any country is dependent on the amount of energy available in that country and the extent to which this energy is utilized. According to [2], It is critical to provide enough energy to meet basic human needs while mitigating negative environmental impacts. As global weather conditions change, energy consumption in weather-sensitive industries or sectors is likely to change. The most visible and studied impacts are changes in building space conditioning efficiency as a result of increased space cooling demands [3]. According to [3], climate changes the way consumers react to short-term weather shocks and how people will adjust in the long run by switching to durable goods. The demand for electricity is affected by several factors, which can be referred to as economic variables, calendar effects, and climate variables [4]. Climate change is having a moderately significant impact on weather factors such as precipitation, humidity, temperature, solar radiation, daylight duration, wind speed, and so on, all of which influence electricity demand and consumption [5,6,7,8]. The authors in [9] concluded that it is imperative to comprehend these weather variabilities and their effects on the power system to be able to recommend, plan, and manage the change to renewable energy generation. Moreover, it is important to include these weather variables in electricity demand models to increase the predicting power and accuracy of models as well as give energy managers an insight into the factors influencing electricity demand [4]. Of particular note is the steady temperature rise in Nigeria, attributed to global warming, with data revealing an alarming 3 ℃ per decade rise in mean minimum temperature over the span of four decades [10]. Recent research has focused on the link between climate change and energy usage, with studies by [11] exploring the Agricultural Energy Internet's role in revolutionizing agriculture, highlighting relevant technologies and energy consumption patterns. [12] emphasized the benefits of optimizing collaboration between photovoltaic greenhouses and rural energy systems, showing substantial energy cost savings through load control. In another study, [13] investigate the construction of the Agricultural Energy Internet, its impact on agricultural electrification and carbon emissions reduction, and stress the role of digital twin and virtual power plant technologies.
Several researchers have created energy models to simulate the influence of parameters such as the economy, weather conditions, demographics, population, and calendar data on different facets of electrical energy demand and usage (minimum and peak load, heating and cooling, demand daily and monthly consumption, etc.). [14] developed a high-accuracy ANN model for forecasting energy load for short-term using a Long Short-Term Memory (LSTM) network and tested it using historical data. [15] forecasted electrical energy consumption by developing two ANN models; the first model was a univariate completely connected ANN model with three Electrical Energy Consumption (EEC) input units, and the second model was a partly connected multivariate ANN model that has both EEC and Degree Day (DD) as input units. [16] created a model for predicting electricity use in Saudi Arabia based on past data for weather parameters (relative humidity, solar radiation, average air temperature), economic parameters or indicators (gross domestic product (GDP) per capita) and demography (population). [17] utilized ANN and SVR (SVR) to predict electricity use in Turkey based on a catalog of electricity consumption that spans forty years (1970 to 2011). [18] developed a predicting model comprised of two sub-models using demographic, economic, and weather variables to forecast electricity consumption in Saudi Arabia. [19] examined the effect of weather parameters on monthly electric energy demand in the United Kingdom using three different models: Box and Jenkin's model, ANN, and the socioeconomic model (S-E). [20] developed a model for predicting short-term electricity requirements that incorporates previous data on consumption into a functional vector autoregressive state space model. [4] modeled the impact of temperature on daily maximum electricity need in South Africa using the generalized extreme value distribution and piecewise linear regression model. These models, often categorized as parametric and non-parametric, provide varying degrees of precision in forecasting electricity needs, measured through diverse statistical methods such as MSE, MAPE, MAE, and Sum of Square Error (SSE). Some of these models, specifically the non-parametric models (SVR, ANN, etc.), are data dependent, and as such, the resultant models are designed according to the dataset. It is, therefore, important to have an in-depth understanding of the influence and impact of weather variables on energy demand and consumption to be able to adapt, plan, and forecast the impact of the changing climate on the energy needs of an organization. This study aims to provide a comprehensive understanding of the effect of weather factors on energy demand and consumption to support adapting, planning, and forecasting the effect of climate change on an organization's electricity requirements by modeling the influence of changes in weather variables (such as temperature, relative humidity, solar radiation, sunshine hours, evaporation) on the electricity demand and consumption at a typical agricultural research institute and forecasting the impact of change in these variables on electricity demand [21].
2.
Materials and methods
This study employed the following methodology to analyze and model the impact of weather variables on electrical energy consumption:
ⅰ. A comprehensive database was created, comprising daily data from the years 2011 to 2018 and 2008 to 2018 for monthly data. This database included records of weather variables and energy demand or consumption parameters.
ⅱ. The electrical energy demand (maximum and minimum power, average load etc) was analyzed and correlated to weather variables. These variables included minimum and maximum temperatures, as well as minimum and maximum values of relative humidity, wind speed, solar radiation, and sunshine hours.
ⅲ. To quantify the impact of changes in weather variables on electrical energy demand, several multivariate models were employed. These models included multiple linear regression, support vector regression, and artificial neural networks.
ⅳ. The predictive performance of the models was accessed using statistical methods such as mean absolute error, mean square error, and mean absolute percentage error.
2.1. Location of study
The location of the study was the International Institute of Tropical Agriculture (IITA), situated in Ibadan, Oyo State, Nigeria. IITA's coordinates are approximately Latitude 07°30' N and Longitude 03°55' E, with an altitude of 227 meters above sea level. This region is classified under the Köppen climate classification as having a tropical wet and dry climate, denoted by the abbreviation "Aw". Such climates are typically characterized by distinct wet and dry seasons, with the wet season typically occurring in the summer months and the dry season in the winter months [22]. The Institute is situated on a 1000-hectare land, housing research farms, offices, and residential and commercial buildings. Electricity supply to the IITA campus is sourced from both the public utility, specifically the Ibadan Electricity Distribution Company (IBEDC), and four 1.5 MVA self-generation power plants.
2.2. Weather data
Weather and temperature are key determinants of electricity use. With regards to [23], heating and cooling requirements account for more than 40% of energy usage in both residences and industries and are heavily determined by weather conditions. The weather data was obtained from the IITA weather observation station established in Ibadan, Nigeria. The daily data for the weather (minimum and maximum temp., sunshine hours, minimum and maximum rel. humidity, solar radiation, and wind speed) spanning from the year 2011 to 2018 was obtained, and the monthly data for the weather (minimum and maximum temperature) spanning from 2008 to 2018 was collated for this study.
2.3. Energy data
Energy data for this study were obtained from IITA Power Unit. Energy parameters, namely average power factor, maximum, minimum, and average loads (in WM), generator hours (hrs), public utility consumption, public utility hours (hrs), generator consumption, and total use, were recorded daily for this study.
2.4. Data preprocessing
In the data preprocessing phase, we applied normalization and standardization techniques to the acquired energy and weather datasets. The primary aim of normalization is to prevent variables with larger numeric ranges from overshadowing those with smaller numeric ranges. Additionally, we introduced a new categorical variable known as "day-index" to distinguish between working days (assigned a value of 1) and non-working days (assigned a value of 0). This differentiation was made with the understanding that working days significantly impact the population in the study area, subsequently influencing energy consumption. As highlighted by [24], there exists a direct correlation between population and energy consumption. Empirical observations also supported this, revealing a decrease in population during non-working days. To account for demographic, population, and activity fluctuations in the study area, we introduced two additional variables, "month index" and "year index". These variables played a crucial role in enhancing the performance of the models applied in this study. The dataset was further divided into three segments, with a distribution ratio of sixty percent for training, twenty percent for validation, and twenty percent for testing. This division facilitated rigorous testing and validation, ensuring the robustness and reliability of the models developed.
Table 1 shows the linear correlation coefficient between weather variables and total energy consumption obtained from the daily data from 2011 to 2018. A substantial negative correlation of −0.74 is observed between daily maximum temperature and minimum relative humidity. This indicates that as the maximum temperature increases, the minimum relative humidity decreases. Also, a high positive correlation was observed between the daily maximum temperature and the sunshine hours, as well as between sunshine hours and solar radiation. These findings highlight the interplay between weather variables, shedding light on how changes in one variable can influence another. The influence of changing population and activities becomes evident when observing the strong positive correlation between total consumption and the day index. This correlation is further enhanced when considering the year index and month index, as demonstrated in Table 2 with the correlation coefficient between Average Temperature and Total Consumption increasing to 0.87 for working day and 0.86 for non-working days for the year 2015 which is a similar trend in all other years in this study.
Among the analyzed weather variables, it is evident that average daily temperature exerts the most significant influence on total electricity consumption, whereas wind speed exhibits the least impact on consumption.
2.5. Energy models
2.5.1. MLR model
In this study, the dependent variable was energy utilization; specifically, electricity consumption (kWh), while the independent variables, such as day index, year, and temperature, are listed in Table 3. This regression analysis was used to measure the effect of changes in weather factors on electricity use in the study area.
The model of the MLR can be represented with Eq 1.
This model was executed with the daily energy and weather data obtained from IITA using a Python programming language. The values for the coefficient of the independent variable Z1 to Z8 were obtained for the linear regression model in Eq 2.
2.5.2. SVR model
SVR is adopted to minimize the generalization error bound. Suppose there are given training data {(x1,y1),…….(xt,yt)}⊂X×R where X represents the space of the input patterns. In SVR, a function f(x) with the most deviation ε from the obtained targets yi for all the training data, and a small coefficient w is given in Eq 3.
For minimization of the norm, ‖w2‖=(w,w). A convex optimization problem is expressed in Eq 4:
In cases in which f(x) exists, Eq 4 is feasible and accurately approximates all pairs (xi,yi). Some errors are permissible at times [25]. This model was likewise executed with the daily energy and weather data obtained from IITA using a Python programming language.
2.5.3. ANN model
There are many ANN structures used in machine learning problems, but the Multilayer Perceptron (MLP). MLP is the most commonly used ANN type. The MLP is a fully connected structure ANN framed up with an input layer, one or more hidden layers, and an output layer, as illustrated in Figure 1 [26].
Tables 4–7 show the parameters (input, scaling, structure, selection, and training) for developing the ANN model. This model was executed using the daily energy and weather data obtained from IITA using the Python programming language sklearn (module) library.
3.
Results and discussion
A plot of monthly total electricity consumption and average temperature from 2008 to 2018 is depicted in Figure 2. It is observed that an increase or decrease in average temperature results in the same electricity consumption. The maximum electricity consumption was observed between February and April, which is the hottest period (peak dry season) in the year. The lowest average temperature and the minimum electricity consumption were observed between July and September (peak rainy season) in the year based on the data obtained.
Figure 3 illustrates the linear regression for the dependent variable, daily total electricity consumption (Total_Cons), for the MLR model. The predicted values of the test set data were plotted against the actual to test the loss in the model. A line of best fit is shown.
The values of the MLR model are shown in Table 8. For a perfect model, 1 will be the correlation between the actual value and the predicted value of the dependent variable (Total_Cons).
Figure 4 shows the linear regression for the dependent variable, daily total electricity consumption (Total_Cons), for the support vector machine-regression model. The predicted values of the test set data were plotted versus the actual ones as dots to test the loss in the model. The line shows the best linear fit. Also, the values for the linear regression analysis for the support vector machine-regression model are shown in Table 9.
Figure 5 shows the linear regression for the dependent variable, daily total electricity consumption (Total_Cons) for the ANN model. The predicted values of the test set data were plotted against the actual to test the loss in the model. A line of best fit is shown. The values of the ANN model are shown in Table 10. For a perfect model, the correlation between the actual value and the predicted value of the dependent variable (Total_Cons) will be 1. However, the correlation obtained with ANN is the best and closest to 1 when compared to the MLR and SVR models.
3.1. MLR model result
Figure 6 shows a plot of the forecasted daily electricity use from the MLR model and the real daily electricity use from IITA. The MLR model has an MSE of 4.893, MAE of 1.773, and MAPE of 6.213%, as shown in Table 11.
The performance of the linear regression model was improved by using polynomial transformation (PT) of the input variables to the fourth order, resulting in a better-fitted model with an MSE of 3.33, MAE of 1.376, and a MAPE of 4.886% using the test dataset, as shown in Table 11.
3.2. SVR model result
A plot of the forecasted daily electricity usage from the SVR model and the real daily electricity consumption from IITA is shown in Figure 7. The SVR model has an MSE of 3.057, MAE of 1.355 and MAPE of 4.826%, as shown in Table 11. The SVR model showed an improvement over the MLR model, as observed from the error value.
3.3. ANN model result
Figure 8 shows a plot of the forecasted daily electricity consumption from the ANN model and the actual daily electricity consumption from IITA. The ANN model has an MSE of 2.733, MAE of 1.292, and MAPE of 4.66%, as shown in Table 11.
The fitness of these models was tested using various statistical methods (R-squared, MSE, MAE, and MAPE) as seen in the results, as well as the distribution plot of the predicted test data and the actual test data as seen in Figures 3–5.
4.
Conclusions
This study sheds light on the critical influence of weather variables on electricity consumption, with temperature standing out as the most significant factor, displaying the highest correlation. The monthly total electricity usage pattern in the case study area closely mirrored the mean apparent temperature, emphasizing the direct impact of weather on energy needs. Models were created to predict the anticipated daily electricity use when given the values of the weather variables. ANN model produced the best result concerning error and predictive performance compared to SVR and MLR models. ANN model outperformed the other models (MLR and SVR) by more than 20% across the predictive performance metrics employed in this study. To optimize energy utilization, we advocate for the implementation of building management systems equipped with sensors (such as temperature, humidity, and occupancy sensors) and incorporated with a robust control system to effectively manage the energy consumption in the buildings and take full advantage of the changes in weather variables.
Organizations may consider generating renewable energy from solar as this energy can be used to offset the increase in electricity consumption during the months with high average temperatures as such months also have an equivalent high solar radiation (average temperature has a high positive correlation with solar radiation and sunshine hours). The scope of this study was constrained by the limited size of the case study area and the availability of historical data. This limitation arises from the irregular and unstable power supply in Nigeria, which hinders the collection of comprehensive energy data encompassing a broader geographical expanse. Given the challenging nature of gathering electricity data in a country grappling with erratic power supply, particularly in the Nigerian context, obtaining data representative of more extensive geographical areas, such as cities or states, proves to be a significant challenge. The challenges posed by this prevailing condition underscore the need for future research to encompass broader geographical regions such as cities or states. By doing so, we can have a more comprehensive insight into energy patterns, aiding in robust energy planning and effective climate change response within Nigeria and across the African continent.
Use of AI tools declaration
The authors declare that they have not used Artificial Intelligence (AI) tools in the creation of this article.
Conflict of interest
The authors declare no conflicts of interest.