Next Article in Journal
Temporal Verification of Relay-Based Railway Traffic Control Systems Using the Integrated Model of Distributed Systems
Next Article in Special Issue
Dynamic Thermal Transport Characteristics of a Real-Time Simulation Model for a 50 MW Solar Power Tower Plant
Previous Article in Journal
Proposal of a System to Identify Failures and Evaluate the Efficiency of Internal Combustion Engines of Thermal Power Plants
Previous Article in Special Issue
Implementation and Validation for Multitasks of a Cost-Effective Scheme Based on ESS and Braking Resistors in PMSG Wind Turbine Systems
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Optimal Design of Hybrid Renewable Energy Systems Considering Weather Forecasting Using Recurrent Neural Networks

by
Alfonso Angel Medina-Santana
and
Leopoldo Eduardo Cárdenas-Barrón
*
Tecnológico de Monterrey, School of Engineering and Sciences, Ave. Eugenio Garza Sada 2501, Monterrey 64849, Mexico
*
Author to whom correspondence should be addressed.
Energies 2022, 15(23), 9045; https://doi.org/10.3390/en15239045
Submission received: 21 October 2022 / Revised: 7 November 2022 / Accepted: 18 November 2022 / Published: 29 November 2022
(This article belongs to the Special Issue Advances in Renewable Energy Research and Applications)

Abstract

:
Lack of electricity in rural communities implies inequality of access to information and opportunities among the world’s population. Hybrid renewable energy systems (HRESs) represent a promising solution to address this situation given their portability and their potential contribution to avoiding carbon emissions. However, the sizing methodologies for these systems deal with some issues, such as the uncertainty of renewable resources. In this work, we propose a sizing methodology that includes long short-term memory (LSTM) cells to predict weather conditions in the long term, multivariate clustering to generate different weather scenarios, and a nonlinear mathematical formulation to find the optimal sizing of an HRES. Numerical experiments are performed using open-source data from a rural community in the Pacific Coast of Mexico as well as open-source programming frameworks to allow their reproducibility. We achieved an improvement of 0.1% in loss of load probability in comparison to the seasonal naive method, which is widely used in the literature for this purpose. Furthermore, the RNN training stage takes 118.42, 2103.35, and 726.71 s for GHI, wind, and temperature, respectively, which are acceptable given the planning nature of the problem. These results indicate that the proposed methodology is useful as a decision-making tool for this planning problem.

1. Introduction

Global warming is a global phenomenon with hard consequences, such as increasing the frequency of damaging disasters, melting of glaciers and polar ice caps, and modification of the water cycle [1]. Among the factors which increase global warming is energy generation based on fossil sources due to the emission of carbon dioxide (CO2) and methane (CH4) in the atmosphere [2]. This represents a huge challenge given that energy demand is projected to grow between 4% and 9% between the years 2019 and 2030 [3].
The use of hybrid renewable energy systems (HRESs) to supply electricity is a convenient solution due to the decrease in cost of renewables and to mitigate carbon emissions [4]. The adoption of these systems and other alternatives is fomented by multiple policies and global agreements [5]. In the case of Mexico, short-term and medium-term goals have been fixed for electricity generation based on clean energies (30% for 2021 and 35% for 2024) [6].
In particular, using HRESs for supplying rural areas with electricity requires special attention [7]. It is worth noting that lack of electricity comes in the vast majority from rural areas [8] and it is in rural areas where natural resources are available, thus HRESs constitute an affordable solution [9]. However, HRES sizing is a complex problem: on the one hand, it is essential to cover a minimum of the electric demand of rural inhabitants so that the entire system should not be undersized; on the other hand, it is not desirable to oversize the system since it increases the capital costs, making a rural project infeasible [10].
Many studies have addressed HRES design as an optimization problem [11]. There exist in the literature classical and modern techniques [12]. Classical methodologies entail using linear programming (LP) [13] problems, mixed-integer linear programming (MILP) problems [14], analytical [15], and numerical [16] methods. Metaheuristics involve the use of a single [17] or a hybrid [18] algorithm. Finally, HOMER and ViPOR are widely used software for HRES design [19,20]. For instance, [21] compares a baseline PV/battery system hybridized with combustion-based prime movers. The effects of startup thresholds and the type of prime mover on the cost of energy (COE), waste heat, and lifecycle carbon emissions are studied. Formulating HRES design as an optimization problem requires selecting among the available models of component behavior available for each technology [22,23].
The models of components that make up HRES can also be found in the literature of the energy management system problem, which is related to the sizing problem we are addressing in this work but whose differences should be noticed. The home energy management problem is addressed in [24] by integrating PV and ESS and using genetic algorithms (GAs) to determine the optimal scheduling of appliances considering user preferences and home-to-grid energy exchange. In Ref. [25], an optimization method to schedule three types of household appliances was proposed, taking into account dynamic behavior of customers electricity prices, and weather conditions. Some modern technologies, such as electric vehicles (EVs), used as storage units are incorporated in [26], which presents a linear programming formulation. Literature reviews are presented in [27,28] to compare energy management in campus microgrids. In Ref. [29], real-time pricing, time of use, and critical peak have been studied. In general, modifying the demand is aimed at using two approaches: demand side management and demand response [30]. The former is commonly used by utilities to improve a system’s reliability, whereas the latter is focused on encouraging end users to reduce electricity bills. However, it should be noticed that, in general, load scheduling aims to change the demand given that the configuration of a microgrid has already been set, constituting an operational problem, whereas the sizing problem deals with the allocation of space, budget, and other resources when buying or designing the HRES, constituting a planning problem.
One of the particular issues of HRES design is taking into account renewable resources uncertainty, which leads to different approaches. For instance, chance-constrained programming is employed in [31]. In Ref. [32] day-ahead energy management is addressed, considering uncertainties in energy generation and demand and using robust optimization. In contrast, [33] includes in the robust energy management a quadratic pricing model instead of the widely used linear cost function for energy purchase from the grid. Some other works have employed stochastic programming to deal with renewables uncertainty, as detailed in [34]. Modeling uncertainty with SP approaches has proven useful; however, when using SP in general, assumptions with respect to the distribution where the uncertain parameters come from are required. These assumptions are avoided in this work by using RNN. For instance, the current work does not need to assume a probability density function (PDF) for weather parameters.
Some works have addressed this using past data as forecast corresponding to the Seasonal Naive approach. For instance, in Refs. [35,36] the Water-Energy nexus is considered in the design of an off-grid system for low-income communities. However, there exist other more complex methodologies to estimate weather conditions for planning purposes.
Most weather forecasting works have addressed only this task for the short term [37]. Among these works, deep learning methodologies have proved to be useful [38]. However, long-term weather forecasting in a suitable manner is required for the purpose of microgrids design [39].
Only a few works have used Artificial Neural Networks (ANN) to predict weather conditions along with an optimization model. For instance, in Ref. [40], weather parameters along with power demand are predicted hourly for a whole year employing ANN. In that work, a heuristic based on tabu search is proposed for the optimization procedure of the Life-Cycle cost of the Independent Hybrid Power System (IHPS). A novel framework is proposed by [41] which includes a new heuristic as a combination of chaotic search, harmony search, and simulated annealing to find the optimal sizing of a stand-alone hybrid renewable energy system. Again, weather and load forecasting is incorporated using ANN to improve the accuracy of the size-optimized design. In Ref. [42], the Biogeography-Based Optimization (BBO) algorithm is proposed with ANN as an optimization algorithm and solar-wind forecasting model, respectively. Furthermore, the authors of that work analyze the advantages of using forecasts instead of past data to improve the optimization of the Small Autonomous Hybrid Power System. Harmony-search and a combination of harmony-search and chaotic-search is proposed in [43]. This work analyses an HRES which aims to fulfill the water demand of households including weather forecasting using iterative neural networks.
To the best of our knowledge, none of the works in the literature have employed RNN for this purpose, which has been proven to overcome traditional forecasting techniques in global competitions ([44,45]). For that reason, in this work, we propose a full methodology to find the optimal sizing of an HRES using RNN to predict long-term weather conditions. Furthermore, we employ multivariate time series clustering to build scenarios that are fed to the model. Additionally, we propose a nonlinear model formulation compatible with the two previous steps that takes into account renewable and nonrenewable sources. Finally, this model also incorporates the triple bottom of sustainability which includes the economic, environmental, and social dimensions.
The rest of the paper is structured as follows. Section 2 presents the background for the three techniques: RNN for long-term time series forecasting, multivariate clustering, and nonlinear optimization. Section 3 summarizes the data for the case study. Section 4 explains the full methodology for optimal HRES sizing proposed in this work. Section 5 shows and discusses the results for every step explained in Section 4. Finally, Section 6 provides the conclusions and future work.

2. Background Framework

The mathematical models for the Recurrent Neural Network (RNN) models, clustering, benchmark metrics and optimization models, which are the tools that made up the proposed methodology, are proposed in this section.

2.1. Recurrent Neural Networks

Sequence-to-sequence RNN architectures are made up of an encoder and a decoder, as depicted in Figure 1. This deep learning architecture has been widely studied for time series forecasting tasks, as described in [45].
Long Short Term Memory (LSTM) cells are an improved version of the vanilla recurrent neural network unit since they deal better with vanishing gradients and are proven more powerful in conveying historical information throughout the sequences using three gates: input, output, and forget gate. Furthermore, they transmit two states: the hidden state, and the cell state. The LSTM formulation is stated as follows:
i t = σ ( W i · h t 1 + V i · x t + P i · C t 1 + b i )
o t = σ ( W 0 · h t 1 + V 0 · x t + P 0 · C t + b 0 )
f t = σ ( W f · h t 1 + V f · x t + P f · C t 1 + b f )
C ˜ t = t a n h ( W c · h t 1 + V c · x t + b c )
C t = i t C ˜ t + f t C t 1
h t = o t t a n h ( C t )
z t = h t
where the subindex t indicates the timestep. i, o, and f correspond to the input, output, and forget gate. W denotes the weight matrices of the three gates and the cell state whereas V denotes the weight matrices of the current inputs. C corresponds to the cell state. x, b, and σ are the input values, the biases, and the activation function, respectively. Finally, ⊙ corresponds to the element-wise multiplication.
The accumulated error (E) for the back-propagation process is computed using only the forescasts generated by the decoder as expressed in (2):
E = t = 1 H A t F t
where A is the observed value and F is the forecast.

2.2. Benchmark Methods

The evaluation of our forecasts is based on the following well-known metrics: Mean Absolute Scaled Error (MASE), Mean Absolute Error (MAE), Root Mean Squared Error (RMSE), Weight Average Percentage Error (WAPE), Absolute Percentage Bias (APB).
M A S E = t = 1 H | A t F t | H t = m + 1 H | A t A t m | n m
M A E = t = 1 H | A t F t | H
R M S E = t = 1 H ( A t F t ) 2 H
W A P E = t = 1 H | A t F t | t = 1 H | A t |
A P B = t = 1 H ( A t F t ) t = 1 H A t × 100
where A is the observed value, F is the forecasted value, n is the train set length, H is the forecasting horizon, and m is the seasonal period.

2.3. Hierarchical Agglomerative Clustering

This algorithm does not require us to specify the number of clusters in advance. At the beginning, each datum is treated as a singleton cluster and then the algorithm agglomerates pairs of them. The algorithm ends when there is only one single cluster.
This method requires selecting the metric employed as a measure of affinity between clusters and the way in which pairs of clusters are compared. For this work, the Euclidean distance is used as a measure of affinity using the Ward method, which consists of the use of the Ward variance minimization algorithm. Given that the clusters x and y have been combined to generate cluster z, the distance between z and another cluster v is calculated with the following formula [46]:
d ( z , v ) = | v | + | x | T d ( v , x ) 2 + | v | + | y | T d ( v , y ) 2 | v | T d ( x , y ) 2
where z is the newly joined cluster consisting of clusters x and y, z is an unused cluster in the forest, T = | v | + | x | + | y | , and | | represents the cardinality operator of a set. Moreover, for internal validation, in the absence of truth ground, the Calinski-Harabasz index is used to select the number of clusters.
The Calinski–Harabasz index, also known as the variance ratio criterion, is the ratio of the sum of between-clusters dispersion and of intercluster dispersion for all clusters. The formula to compute this index is the following:
C H = k = 1 K n k c k c 2 K 1 / k = 1 K i = 1 n k d i c k 2 N K
where n k and c k are the number of points and centroid of the k th cluster, respectively, c is the global centroid, N is the total number of data points, and d i is the i th element associated with a cluster k.

2.4. Optimization

A nonlinear optimization problem has the following form [47]:
min x f ( x ) s . t . g ( x ) = 0 h ( x ) 0
where x is the decision variable vector, f is an scalar function, and g and h are vector-valued functions.

3. NLP Model Formulation

This sections describes in detail the optimization to find the optimal sizing and operational level of the HRES depicted in Figure 2. The economic, social, and environmental aspects are considered, which involve the three dimensions of sustainability [48]. The notation is described in Section 7. The required sets to formulate the multi-period, multi-scenario optimization model are the following:
τ = 1 , . . . , T
ς = 1 , . . . , S
Ψ = P V , W T , D G
The set τ entails the periods of time t in which the each day is partitioned. Given that the cardinality of τ is T, the duration for the corresponding elements of this set is calculated as Δ t = 24 T (in hours). Furthermore, the set ς includes the different scenarios in which the 365 days were clustered using the method explained in Section 2. Then, the number of days represented by each scenario s is different and is expressed as Θ s . Moreover, each element of set Ψ corresponds to one energy generation technology.

3.1. Objective Function

The objective function of this model is to minimize the total annualized cost whereas the social and environmental dimensions of sustainability are included as constraints.

3.1.1. Economic Dimension

The minimization objective is the total annualized cost ( T A C ). It is made up by the sum of the incurred costs to install, maintain, and operate the energy facilities. Therefore, it includes the capital cost ( C a p C o s t ), cost of fuel ( F u e l C o s t ), and operation and maintenance cost ( C o s t O & M ) as shown in Equation (12a).
T A C = k f · C a p C o s t + F u e l C o s t + C o s t O & M
Capital cost
The capital cost for power generation units ( C a p C o s t ψ ) is calculated using the installed capacity, the variable cost associated to the size ( ν ψ ), and the fixed cost associated to installation ( ϖ ψ ) as stated in Equations (12b)–(12d):
C a p C o s t P V = ϖ P V + ν P V · A P V
C a p C o s t W T = ϖ W T + ν W T · A W T
C a p C o s t D G = ϖ D G + ν D G · W D G M A X
For the battery system (BS) and inverter (INV), the expressions to calculate the capital costs are presented in Equations (12e) and (12f):
C a p C o s t B S = ϖ B S + ν B S · E B S M A X
C a p C o s t I N V = ϖ I N V + ν I N V · W I N V M A X
The total capital cost ( C a p C o s t ) is expressed in Equation (12g).
C a p C o s t = C a p C o s t W T + C a p C o s t P V + C a p C o s t D G + C a p C o s t B S + C a p C o s t I N V
Operation and maintenance cost
Equation (13a) formulates the annual production of energy by each technology whereas Equation (13b) indicates the annual amount of energy stored by the BS:
E ψ = s = 1 S t = 1 T W t , s ψ · Θ s · Δ t , ψ Ψ
E B S = s = 1 S t = 1 T W t , s B S H · Θ s · Δ t
The annual energy production and the maximum capacity of equipment are the drivers for operation and maintenance costs (Equations (13c)–(13e)):
O & M C o s t ψ = χ O & M ψ · E ψ , ψ Ψ
O & M C o s t B S = χ O & M B S · E B S
O & M C o s t I N V = χ O & M I N V · W I N V M A X
The total operation and maintenance cost ( C o s t O & M ) is expressed as follows:
C o s t O & M = O & M C o s t P V + O & M C o s t W T + O & M C o s t B S + O & M C o s t D G + O & M C o s t I N V
Cost of fuel
The cost of fuel associated with the DG unit is computed as the total cost for the fuel employed by the diesel generator over the whole year. This is expressed by Equation (14):
F u e l C o s t = s = 1 S t = 1 T F t , s · Θ s · λ
where Θ s is the number of days in each scenario s.

3.1.2. Environmental Dimension

The system’s reliability is aimed to be improved by adding a diesel generator. However, pollution generated by primary-sources-based generation units is highly undesirable. For that reason, we employ the renewable factor (RF) to set a lower bound ( L B R F ) for the proportion of energy produced by renewable energy with respect to the energy produced by the diesel generator [18]. The renewable factor metric is formulated in Equation (15):
R F = 1 s = 1 S t = 1 T W t , s D G · Θ s s = 1 S t = 1 T W t , s W T + W t , s P V · Θ s L B R F

3.1.3. Social Dimension

For rural inhabitants, the HRES provides energy supply so that they can meet their information, education, and communication primary needs. In that sense, reliability constitutes a desirable feature for the optimized system. Loss of load occurs whenever the system load exceeds the available generating capacity [49]. In this work, the social dimension is expressed as minimizing the ratio corresponding to the Loss of Load Probability (LOLP) because of insufficient installed capacity which is expressed in Equation (16) [50]. In other words, we are setting an upper bound ( U B L O L P ) for the proportion of unsatisfied demand throughout the whole year:
L O L P = s = 1 S t = 1 T W t , s H η I N V · ( W t , s W T H + W t , s P V H + W t , s D G H + W t , s B S H ) · Θ s s = 1 S t = 1 T W t , s H · Θ s U B L O L P

3.2. Operational Constraints

The behavior of the system components under steady-state conditions is formulated in this subsection.

3.2.1. Power Generation

Power generation technologies include a photovoltaic system (PV), wind turbines (WT), and a diesel generator (DG). For each technology, the equations to calculate the power generation and efficiency are expressed below.
Photovoltaic system (PV)
The PV output power produced is calculated using the allocated area for solar panels ( A P V ), the solar irradiance ( α ), and the efficiency of the photovoltaic system ( η P V ).
W t , s P V = A P V · η t , s P V · α t , s , t τ , s ς
where the corresponding efficiency depends on the difference between ambient temperature ( T a m b ) and the reference temperature ( T R e f ).
η t , s P V = η R e f P V · 1 β · T t , s a m b T R e f , t τ , s ς
Wind turbine (WT)
The eolic output power is addressed in Equation (17c):
W t , s W T = 1 2 · 1 1000 · ρ a i r · A W T · η W T · υ t , s 3 , t τ , s ς
The efficiency of the aerogenerators η W T is calculated using Equation (17d):
η W T = η r o t o r · η g e n e r a t o r · η t r a n s m i s s i o n
Diesel generator (DG)
The power generation of the diesel generator is expressed in Equation (17e):
η t , s D G = W t , s D G · Δ t F t , s , t τ , s ς
The efficiency of the diesel generator is affected by the partial load during each period t. The mathematical relationships corresponding to this technology are formulated in Equations (17f)–(17i):
P L t , s D G = W t , s D G W D G M A X , t τ , s ς
P L D G M I N P L t , s D G P L D G M A X , t τ , s ς
W t , s D G W D G M A X , t τ , s ς
η t , s D G = φ D G P L t , s · η 0 D G , t τ , s ς

3.2.2. Energy Storage

BS acts as a backup when renewable resources are scarce and allow to meet the gap between energy generation and demand.
Battery system (BS)
We are considering Lithium batteries for the energy storage system. The entries of the BS come from PV, WT, and DG units (see Equation (18)):
E t , s B S E t 1 , s B S = Δ t · ( η t , s B S · W t , s P V B S + W t , s W T B S + W t , s D G B S W t , s B S H ) , t τ , s ς
The BS efficiency affects the energy inputs and depends on the State of Charge (SoC) using the Equations (19)–(21):
S o C t , s = E t , s B S E B S M A X , t τ , s ς
E t , s B S E B S M A X , t τ , s ς
η t , s B S = ϕ B S S o C t , s , t τ , s ς
where ϕ B S is a non-linear function that relates the state of charge ( S o C ) and the BS efficiency η B S . A lower bound for S o C is considered to prevent early deterioration:
S o C L B S o C t , s 1 , t τ , s ς

3.2.3. Power Supply to Households

Household demand of electricity is supplied using the PV, WT, and DG units. The excess pf power supply is stored in the BS:
W t , s P V = W t , s P V H + W t , s P V B S , t τ , s ς
W t , s W T = W t , s W T H + W t , s W T B S , t τ , s ς
W t , s D G = W t , s D G H + W t , s D G B S , t τ , s ς
Inverter operation (INV)
The inverter capacity is constrained by the maximum amount of energy sent to the households as expressed in Equation (23d):
W I N V M A X W t , s H , t τ , s ς
Land use
The elements of the superstructure occupy the available land (see Figure 2):
A T S F · ( A P V + A W T + A B S + A I N V + A D G )
where A T is the total area and S F is the proportion of the total area that can effectively occupied by the system. The use of land of each element is expressed in Equations (25)–(27):
μ B S · A B S = E B S M A X
μ I N V · A I N V = W I N V M A X
μ D G · A D G = W D G M A X
Initialization of storage units
The formulation for BS presented in Equation (18) requires an strategy to deal with the balance of energy for t = 1 . In this work, we propose to define the following decision variable: E 0 , s B S , such that E 0 , s B S = E t 1 , s B S when t = 1 . Moreover, the formulation incorporates the linkage between the end of one day and the beginning of the next one, such that E 0 , s B S E t , s B S , when t = T .
Non-linear relationships for efficiencies [36]
The correlation ϕ B S between BS efficiency and S o C is given by Equation (28):
η t , s B S = 2.77 · S o C t , s 2 + 2.361 · S o C t , s + 0.498 , t τ , s ς
The expression φ D G to relate the partial load with the efficiency of the DG unit is expressed in Equation (29):
φ t , s D G P L = 0.4324 · P L t , s 2 + 0.8847 · P L t , s + 0.5385 , t τ , s ς

4. Case Study

As a case study, we use data from a rural community located in the Pacific coast of Mexico. Technical data was obtained through direct measures, geographic data, and surveys [51].
Weather historical information was obtained from the National Renewable Energy Laboratory (NREL) through an API to obtain data collected from specific coordinates in this region. The National Solar Radiation Database (NSRDB) is one the most accepted datasets for solar energy and meteorological data collected with high temporal (30 min) and spatial resolution (4 km) [52,53]. Information for the specific station we take the measurements from is shown in Table 1.
Table 2 contains data about efficiencies, land use, and costs. Moreover, a lower bound of 15% for the state of charge of the BS ( SoC LB ) is defined to avoid early wearing out. Finally, the security factor SF is defined as 0.75. Therefore, only 75% of the total land can be occupied to allow some space among units of the superstructure. Table 2 and Table 3 present the parameter values that should be introduced into the model explained in Section 3. The reference value for the temperature of the PV technology is 20 °C. Finally, we use a lower bound for renewable factor ( L B R F ) and an upper bound for LOLP ( U B L O L P ) of 0.5.

5. Methodology

In this section, we outline the overall methodology proposed in this work to find the optimal sizing of an HRES.
The first step is data collection. In this work, we acquire weather and technical information. The former was obtained from NREL API, and more details are provided in Section 4. Three weather variables were obtained: solar irradiance, wind speed, and ambient temperature. Regarding solar irradiance, we consider the global horizontal irradiance (GHI) given that it is widely used to compute PV power generation [57].
The second step was to describe the dataset. In this work, our dataset is made up of fourteen years of historical half-hourly data (from 2007 to 2020). We employ a timeseries decomposition to observe the patterns related to trend, seasonality and residual components. The analysis of daily distribution of weather parameters is also carried out which, in particular, support getting rid of zero or neglectable values of GHI.
The third step is to predict the three weather variables mentioned earlier with two methodologies: seasonal naive and RNN. For RNN, we take the mean of ten runs using different random seeds to avoid the bias that seed selection might have in our outputs. Furthermore, each weather variable is predicted separately by a single RNN model. Moreover, in the case of the GHI long-term forecast, the Solis clear-sky model is incorporated as an additional continuous feature. To grasp more details, the interested reader can consult [58]. Then, we end up with two datasets with forecast values for the weather variables for the year 2020.
The fourth step is to create two scenarios using multivariate time series clustering. The analysis of the number of clusters is based on the Calinski–Harabasz index, which is explained in Section 2.3.
The fifth step is to find an optimal sizing for each set of scenarios. For this purpose, the nonlinear mathematical formulation is described in Section 3. An extension of this model suitable for the WEFN analysis can be studied in [59].
Finally, the evaluation of both designs is performed by carrying out a simulation in which we compute the loss of load probability (LOLP) for both designs as a metric for comparison.
All these steps are illustrated in Figure 3.

6. Analysis of Results

In this section, we show the results for each step explained in Section 5.

6.1. Data Exploration

Figure 4 shows boxplots for GHI data, and zero values are found before 8:00 am and after 17:30 pm. We then only consider values among these hours since the RNN model will not extract significant information besides these limits.
A time series decomposition using the moving average method was performed to identify patterns in the historical GHI, wind speed, and temperature data. December 2019 data is used to illustrate this procedure since this is the last month of our training set. To this aim, the additive model is chosen since the variability of the seasonal fluctuations do not depend on the level of the time series [60].
The additive model is stated as follows:
y t = S t + T t + R t
where y t is the observed value, and S t , T t , and R t are the seasonal, trend, and residual components, respectively. Observed values for GHI are depicted in Figure 5a.
Although no clear pattern for the trend is observed (see Figure 5), a much more stronger seasonal component is observed in Figure 5. The residual component is depicted in Figure 5.
In contrast, the boxplot for wind speed in Figure 6 indicates that there are no such hourly intervals with only zero values. Furthermore, the trend component observed in Figure 7b is weak or nonexistent. Nevertheless, the seasonal component shown in Figure 7c has stronger results.
The boxplot of temperature time series in Figure 8 indicates that it follows a daily seasonal pattern similar to the GHI variable. Regarding the time series decomposition, there is a downward part of the trend from the beginning until day 23, which indicates the importance of this component inside each month (see Figure 9b). However, the scale is much lower than the seasonal component, as shown in Figure 9c.

6.2. Data Preparation

In this work, to predict each variable, seven days of data (with 20 and 48 timesteps for GHI and wind/temperature, respectively) from seven consecutive years are fed to the model as inputs.
In the case of GHI, the first sample in the training set is constituted as follows: it includes 20 timesteps of 1 January for seven years (2007–2013). Two continuous features are included for each timestep: the observed GHI and the clear-sky value using the Solis model. According to data exploration carried out in Section 6.1, GHI presents daily seasonality, and given that the declination angle varies during a year between −23.45 and 23.45 , there is also a strong yearly seasonal component in this time series. For that reason, we incorporate dummy variables related to the month and hour of each timestep. In this way, we aim to increase the model capacity to grasp the daily and yearly seasonality from data.
For wind speed and temperature, only historical data and one dummy variable (for months) were included. This is due to the fact that for these two time series, each day entails 48 timesteps and therefore each sample has more data. Thus, including dummy variables for the hour leads to out-of-memory problems.
RNN requires 3D shape data where the first axis corresponds to the dimension of the sample. In our case, the input for the proposed RNN model is a matrix with 140 rows and 22 columns (for GHI), and 12 columns (for wind speed and temperature). It is worth noting that we dropped the first column of the dummy variables for months (all the variables) and hours (only GHI) to avoid collinearity issues. This is illustrated in Figure 10. Moreover, the three training samples are depicted in Figure 11. The output of each model is a 2D-rank tensor where the output linked to each sample is a 20-dimension vector and 48-dimension vector for the case of GHI and wind/temperature, respectively.
The model proposed for time series forecasting adopts the multiple input multiple output (MIMO) approach detailed in [61]. For each variable, the proposed method yields one forecasting model to predict one day of data. Then, for our long-term forecasting task of predicting a whole year, the obtained model has to be fed 365 times to predict one year of each weather parameter.

6.3. Evaluation

The computational framework used in this work for modeling and evaluation purposes is Keras which employs a seed to randomly generate the initial values of the weight parameters. For this reason, our forecasts to be evaluated are the average of 20 forecasts to isolate the effect of the seed from the performance evaluation. Figure 12, Figure 13 and Figure 14 illustrate the performance of RNN in this forecasting task for the parameters GHI, wind speed, and temperature, respectively. To illustrate the performance of our models, we plot weeks 16, 34, and 51 to contrast the difference between forecast and observed values of year 2020. Figure 12 shows that although more noise is found in week 33 (see Figure 12b), a similar level of the seasonality of the global irradiance is depicted by the RNN throughout the whole year. In contrast, for wind speed, different amplitudes in the cycles are predicted by the RNN (see Figure 13b,c). These results indicate the model’s capacity to learn not only daily but yearly patterns. Finally, Figure 14 illustrates that the model learns quite accurately the patterns in temperature data.
To define and train our model, we use Keras from Tensorflow 2.7 (developed by researchers from Google) which is an open-source deep learning API for python. Training our RNN model requires taking care of computational time. To this aim, we build the sequence-to-sequence architecture according to CUDA requirements to keep our model parallelizable [62]. Regarding the hardware, the model was run using a GPU NVIDIA GeForce GTX 960M to accelerate the training process. Before testing, a validation stage is carried out using a grid search procedure. Thererfore, the training set for this stage entails only from 2007 up to 2018, so that the 2019 data is used as validation set. Table 4 depicts the values employed for the grid search procedure where the bold text specifies the chosen values found based on the average MSE of ten runs per combination.
Moreover, the medians of the forecasting metrics are shown in Table 5. Table 6 shows the average computational time for each model in seconds. It is worth noting that training time for GHI is lower than the other two variables because for GHI we remove zero values in the preprocessing step, ending up with only 20 timesteps per day (whereas 48 are used for temperature and wind speed).

6.4. Hierarchical Clustering

Special care should be taken regarding the dimensionality of the problem. A balance of energy equation such as the one presented in Equation (18) at the current time resolution (48 timesteps per day) would mean adding 17,520 (48 times 365) constraints only for that equation, which would be unnecessarily hard to manage by the solver in an affordable time. For that reason, we propose an NLP formulation where a scenario is a typical day weighted according to the number of days similar to it. To find these scenarios, in this work we employ multivariate clustering, specifically hierarchical agglomerative clustering, to agglomerate similar days into time series clusters for four parameters of the NLP model: GHI, wind, temperature, and power consumption. To this aim, we use the Euclidean distance as a similarity function, and the Ward method to agglomerate and update the distance matrix at each iteration as is explained in Section 2. Our search space for the number of clusters is between 2 and 48, and we examine all the possibilities based on the CH index for each forecasting methodology, as is illustrated in Figure 15. We select 30 scenarios since it allows us to increase the CH index from 48 and at the same time maintain a number of scenarios near our search space upper bound. Figure 16 and Figure 17 show 5 out of the 30 scenarios obtained by this method using the seasonal naive forecast and RNN, respectively. It is worth noting that RNN allows us to retrieve a smoother forecast and therefore smoother scenarios.

6.5. Optimization Results

Numerical experiments for this optimization task were performed using a CPU with the following characteristics: Intel(R) Core(TM) i5-6300HQ @ 2.30 GHz, 8 GB of RAM. The optimization model was programmed in Julia using the JuMP library [63]. Our main goal from the numerical experiments is to yield the optimal decision variables value corresponding to the areas allocated for each technology as well as the nominal capacity required. These values are obtained using two sets of parameters (scenarios): the ones obtained using the RNN forecast and the ones obtained using the seasonal naive forecast. Table 7 presents the areas as well as the optimal costs for both cases. It is worth noting that RNN scenarios demand a high level of area for PV panels and that the first approach requires a higher dimension for the inverter. The objective function, total annual cost, is USD 4526.536 and USD 4424.052 for RNN and SN, respectively. Figure 18 and Figure 19 present six scenarios of PV output and BS energy level for the RNN and SN approach, respectively. We can observe that the peak of PV power output has higher variability in the latter case, whereas the energy level in BS does not vary, to keep it at the point of maximum efficiency.

6.6. Simulation

In order to establish a fair comparison and have a good sense of the performance of the proposed forecasting methodology hierarchical clustering, and the optimization model, we propose a logic to control the HRES system depicted in Figure 20. The flow diagram is based on the HRES operation description described in some works, such as [64]. In the beginning, the controller reads the current information regarding the BS unit. Then, it retrieves the information about PV and WT generation. If there is any excess of load with respect to the demand, it charges the battery, or even dumps the excess of power in case it is necessary. However, in case this renewable power generation is not sufficient at any given point, then the BS unit is used to meet the current power demand, and if this is just not possible, the DG unit is used for that purpose. For this instance, we obtain a simulation result in which the LOLP for RNN and SN are 0.06008 and 0.6014, respectively, which means that a reduction of the LOLP metric in 0.1% was achieved.

7. Conclusions and Future Work

The optimal design of HRES requires finding a balance between undersizing and oversizing, taking into account sustainability concerns. Very few jobs have incorporated the weather forecast into the HRES design as an optimization problem. In this work, we propose a full methodology to find the optimal configuration of an HRES using RNN to predict three variables: global solar irradiance, wind speed, and ambient temperature.
The RNN model in this work employs the RMSprop optimizer for training the parameters. Furthermore, a grid search procedure was carried out to find appropriate values for the hyper-parameters in the validation stage. The three models for the weather variables: GHI, wind, and temperature took 118.42, 2103.35, and 726.71 seconds for training purposes, respectively. Moreover, the MASE for them were 0.815, 0.767, and 0.820 so they proved better than the Seasonal Naive method.
Before feeding the forecast into the model, multivariate hierarchical agglomerative time series clustering was applied to create 30 scenarios that represent the whole year of data. This allowed us to reduce the problem dimension to avoid out-of-memory issues. This step allowed us to solve the entire problem in 32.02 min.
A nonlinear mathematical formulation for the optimization problem was proposed, taking into account three power generation units: solar photovoltaics, wind turbines, and diesel generator. Moreover, a battery system was also available as a backup to ensure HRES autonomy. Renewable factor (RF) and loss of load probability (two important metrics for HRES design) were included as constraints. Our approach was then compared with the use of past data, which entails the seasonal naive method to predict the whole year of 2020. As a case study, we ran numerical experiments using data collected from a rural community on the Pacific Coast of Mexico. Our results show that the total annual cost to supply electricity to the rural inhabitants is USD 4526.536 and USD 4424.052 for RNN and SN, respectively. Additionally, the resulting HRES design is mainly made up of PV and DG units in both cases.
A simulation process was then carried out to evaluate both approaches, and for the instance studied, prediction with the RNN model was proved to be 0.1% superior based on the LOLP metric using real data collected for the year 2020.
For future work, it is interesting to apply meta-heuristics such as BBO and PSO algorithms to solve the optimization problem so that the application of this methodology is entirely cost-free. Furthermore, it could be beneficial to study the use of train tensor neural networks as a top-edge methodology to predict weather parameters. Additionally, comparing different methods for hierarchical clustering could lead to an increase in the benefit of using complex forecasting methods. Finally, given that there are several HRES sizing approaches in the literature, a comparison of the latest and more important ones in terms of numerical solutions using the same superstructure and case study for all of them would be beneficial to identify research directions.

Author Contributions

Conceptualization, A.A.M.-S. and L.E.C.-B.; data curation, A.A.M.-S.; formal analysis, A.A.M.-S. and L.E.C.-B.; investigation, A.A.M.-S. and L.E.C.-B.; methodology, A.A.M.-S. and L.E.C.-B.; software, A.A.M.-S.; supervision, L.E.C.-B.; validation, A.A.M.-S. and L.E.C.-B.; visualization, A.A.M.-S.; writing—original draft, A.A.M.-S.; writing—review and editing, L.E.C.-B. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

Data employed in this article can be found in https://nsrdb.nrel.gov/ (accessed on 1 February 2022).

Acknowledgments

To Angel Medina De Paz for your unconditional support during the realization of this work.

Conflicts of Interest

The authors declare no conflict of interest.

Abbreviations

Sets
SymbolDescriptionUnits
t— τ Time30 min period
s— ς ScenarioPeriod of days
ψ Ψ Power generation technologies
Acronyms
SymbolDescriptionUnits
ambAmbient conditions
BSBattery system
HHousing—households
INVInverter
LBLower bound
MAXMaximum
MINMinimum
NLPNonlinear programming
O&M, OMOperation and maintenance
PVPhotovoltaic system
SOSocial objective
TACTotal annual cost
UBUpper bound
WElectricity
WTWind turbine
Variables
AArea allocated for a unitm2
C o s t Cost$
C a p C o s t Capital cost$
EEnergykWh
fObjective function
O & M C o s t Operation and maintenance cost$
S o C State of charge
S O p Social objective
TTemperature°C
WElectric fluxkW
T A C Total annual cost$/year
η Efficiency
ϕ Operative function
Parameter
k f Annualization factor$
S F Security factor
α Solar irradiancekW/m2
β Temperature coefficient of the PV system
χ Unit cost$/kWh, $/kW
μ Factor for land usagekW/m2, kWh/m2
Δ t Duration of a time period th
ν Variable cost$/kW, $/m2, $/kWh
ϖ Fixed cost$
ρ Densitykg/m3
Θ Duration of each scenario sdays
υ Wind speedm/s
Abbreviation
NLNonlinear
LSTMLong short-term memory
FFNNFeedforward neural network
RNNRecurrent neural network
HRESHybrid renewable energy system

References

  1. Ameur, H.B.; Han, X.; Liu, Z.; Peillex, J. When did the global warming start? A new baseline for carbon budgeting. Econ. Model. 2022, 116, 106005. [Google Scholar] [CrossRef]
  2. Lu, Z.Q.; Wu, C.G.; Wu, N.Y.; Lu, H.L.; Wang, T.; Xiao, R.; Liu, H.; Wu, X.H. Change trend of natural gas hydrates in permafrost on the Qinghai-Tibet Plateau (1960–2050) under the background of global warming and their impacts on carbon emissions. China Geol. 2022, 5, 475–509. [Google Scholar]
  3. IEA. World Energy Outlook 2020. Available online: https://www.iea.org/reports/world-energy-outlook-2020 (accessed on 1 October 2021).
  4. Kahwash, F.; Barakat, B.; Taha, A.; Abbasi, Q.H.; Imran, M.A. Optimising Electrical Power Supply Sustainability Using a Grid-Connected Hybrid Renewable Energy System—An NHS Hospital Case Study. Energies 2021, 14, 7084. [Google Scholar] [CrossRef]
  5. Lim, B.; Hong, K.; Yoon, J.; Chang, J.I.; Cheong, I. Pitfalls of the eu’s carbon border adjustment mechanism. Energies 2021, 14, 7303. [Google Scholar] [CrossRef]
  6. SENER. Reporte de Avance de Energías Limpias Primer Semestre 2018; SENER: Getxo, Spain, 2018; p. 21. [Google Scholar]
  7. Erdinc, O. Optimization in Renewable Energy Systems: Recent Perspectives; Butterworth-Heinemann: Oxford, UK, 2017. [Google Scholar]
  8. Bank, W. Sustainable Energy for all Database. 2017. Available online: https://data.worldbank.org/indicator/EG.ELC.ACCS.RU.ZS (accessed on 27 April 2020).
  9. Ferrer-Martí, L.; Domenech, B.; García-Villoria, A.; Pastor, R. A MILP model to design hybrid wind-photovoltaic isolated rural electrification projects in developing countries. Eur. J. Oper. Res. 2013, 226, 293–300. [Google Scholar] [CrossRef]
  10. Eriksson, E.; Gray, E.M. Optimization of renewable hybrid energy systems–A multi-objective approach. Renew. Energy 2019, 133, 971–999. [Google Scholar] [CrossRef]
  11. Emad, D.; El-Hameed, M.; Yousef, M.; El-Fergany, A. Computational methods for optimal planning of hybrid renewable microgrids: A comprehensive review and challenges. Arch. Comput. Methods Eng. 2019, 27, 1297–1319. [Google Scholar] [CrossRef]
  12. Al-Falahi, M.D.; Jayasinghe, S.; Enshaei, H. A review on recent size optimization methodologies for standalone solar and wind hybrid renewable energy system. Energy Convers. Manag. 2017, 143, 252–274. [Google Scholar] [CrossRef]
  13. Kusakana, K.; Vermaak, H.; Numbi, B. Optimal sizing of a hybrid renewable energy plant using linear programming. In Proceedings of the IEEE Power and Energy Society Conference and Exposition in Africa: Intelligent Grid Integration of Renewable Energy Resources (PowerAfrica), Bari, Italy, 7–10 September 2021; IEEE: Piscataway, NJ, USA, 2012; pp. 1–5. [Google Scholar]
  14. Domenech, B.; Ranaboldo, M.; Ferrer-Martí, L.; Pastor, R.; Flynn, D. Local and regional microgrid models to optimise the design of isolated electrification projects. Renew. Energy 2018, 119, 795–808. [Google Scholar] [CrossRef]
  15. Khatod, D.K.; Pant, V.; Sharma, J. Analytical approach for well-being assessment of small autonomous power systems with solar and wind energy sources. IEEE Trans. Energy Convers. 2009, 25, 535–545. [Google Scholar] [CrossRef]
  16. Luna-Rubio, R.; Trejo-Perea, M.; Vargas-Vázquez, D.; Ríos-Moreno, G. Optimal sizing of renewable hybrids energy systems: A review of methodologies. Sol. Energy 2012, 86, 1077–1088. [Google Scholar] [CrossRef]
  17. Nadjemi, O.; Nacer, T.; Hamidat, A.; Salhi, H. Optimal hybrid PV/wind energy system sizing: Application of cuckoo search algorithm for Algerian dairy farms. Renew. Sustain. Energy Rev. 2017, 70, 1352–1365. [Google Scholar] [CrossRef]
  18. Suman, G.K.; Guerrero, J.M.; Roy, O.P. Optimisation of solar/wind/bio-generator/diesel/battery based microgrids for rural areas: A PSO-GWO approach. Sustain. Cities Soc. 2021, 67, 102723. [Google Scholar] [CrossRef]
  19. Bahramara, S.; Moghaddam, M.P.; Haghifam, M. Optimal planning of hybrid renewable energy systems using HOMER: A review. Renew. Sustain. Energy Rev. 2016, 62, 609–620. [Google Scholar] [CrossRef]
  20. Lambert, T.W.; Hittle, D. Optimization of autonomous village electrification systems by simulated annealing. Sol. Energy 2000, 68, 121–132. [Google Scholar] [CrossRef]
  21. Das, B.K.; Al-Abdeli, Y.M.; Kothapalli, G. Optimisation of stand-alone hybrid energy systems supplemented by combustion-based prime movers. Appl. Energy 2017, 196, 18–33. [Google Scholar] [CrossRef]
  22. Lan, H.; Wen, S.; Hong, Y.Y.; David, C.Y.; Zhang, L. Optimal sizing of hybrid PV/diesel/battery in ship power system. Appl. Energy 2015, 158, 26–34. [Google Scholar] [CrossRef] [Green Version]
  23. Abd el Motaleb, A.M.; Bekdache, S.K.; Barrios, L.A. Optimal sizing for a hybrid power system with wind/energy storage based in stochastic environment. Renew. Sustain. Energy Rev. 2016, 59, 1149–1158. [Google Scholar] [CrossRef]
  24. Iqbal, M.M.; Sajjad, I.A.; Khan, M.F.N.; Liaqat, R.; Shah, M.A.; Muqeet, H.A. Energy management in smart homes with pv generation, energy storage and home to grid energy exchange. In Proceedings of the 2019 International Conference on Electrical, Communication, and Computer Engineering (ICECCE), Swat, Pakistan, 24–25 July 2019; IEEE: Piscataway, NJ, USA, 2019; pp. 1–7. [Google Scholar]
  25. Rasheed, M.B.; Javaid, N.; Ahmad, A.; Jamil, M.; Khan, Z.A.; Qasim, U.; Alrajeh, N. Energy optimization in smart homes using customer preference and dynamic pricing. Energies 2016, 9, 593. [Google Scholar] [CrossRef] [Green Version]
  26. Nasir, T.; Raza, S.; Abrar, M.; Muqeet, H.A.; Jamil, H.; Qayyum, F.; Cheikhrouhou, O.; Alassery, F.; Hamam, H. Optimal scheduling of campus microgrid considering the electric vehicle integration in smart grid. Sensors 2021, 21, 7133. [Google Scholar] [CrossRef]
  27. Muqeet, H.A.; Munir, H.M.; Javed, H.; Shahzad, M.; Jamil, M.; Guerrero, J.M. An energy management system of campus microgrids: State-of-the-art and future challenges. Energies 2021, 14, 6525. [Google Scholar] [CrossRef]
  28. Muqeet, H.A.; Javed, H.; Akhter, M.N.; Shahzad, M.; Munir, H.M.; Nadeem, M.U.; Bukhari, S.S.H.; Huba, M. Sustainable Solutions for Advanced Energy Management System of Campus Microgrids: Model Opportunities and Future Challenges. Sensors 2022, 22, 2345. [Google Scholar] [CrossRef]
  29. Fei, L.; Shahzad, M.; Abbas, F.; Muqeet, H.A.; Hussain, M.M.; Bin, L. Optimal Energy Management System of IoT-Enabled Large Building Considering Electric Vehicle Scheduling, Distributed Resources, and Demand Response Schemes. Sensors 2022, 22, 7448. [Google Scholar] [CrossRef] [PubMed]
  30. Balouch, S.; Abrar, M.; Abdul Muqeet, H.; Shahzad, M.; Jamil, H.; Hamdi, M.; Malik, A.; Hamam, H. Optimal Scheduling of Demand Side Load Management of Smart Grid Considering Energy Efficiency. Front. Energy Res. 2022, 10, 861571. [Google Scholar]
  31. Kamjoo, A.; Maheri, A.; Dizqah, A.M.; Putrus, G.A. Multi-objective design under uncertainties of hybrid renewable energy system using NSGA-II and chance constrained programming. Int. J. Electr. Power Energy Syst. 2016, 74, 187–194. [Google Scholar] [CrossRef]
  32. Hosseini, S.M.; Carli, R.; Dotoli, M. Robust optimal energy management of a residential microgrid under uncertainties on demand and renewable power generation. IEEE Trans. Autom. Sci. Eng. 2020, 18, 618–637. [Google Scholar] [CrossRef]
  33. Hosseini, S.M.; Carli, R.; Dotoli, M. Robust energy scheduling of interconnected smart homes with shared energy storage under quadratic pricing. In Proceedings of the 2019 IEEE 15th International Conference on Automation Science and Engineering (CASE), Vancouver, BC, Canada, 22–26 August 2019; IEEE: Piscataway, NJ, USA, 2019; pp. 966–971. [Google Scholar]
  34. Zakaria, A.; Ismail, F.B.; Lipu, M.H.; Hannan, M.A. Uncertainty models for stochastic optimization in renewable energy applications. Renew. Energy 2020, 145, 1543–1571. [Google Scholar] [CrossRef]
  35. Fuentes-Corté, L.F.; Ortega-Quintanilla, M.; Flores-Tlacuahuac, A. Water–Energy Off-Grid Systems Design Using a Dominant Stakeholder Approach. ACS Sustain. Chem. Eng. 2019, 7, 8554–8578. [Google Scholar] [CrossRef]
  36. Fuentes-Cortés, L.F.; Ponce-Ortega, J.M. Optimal design of energy and water supply systems for low-income communities involving multiple-objectives. Energy Convers. Manag. 2017, 151, 43–52. [Google Scholar] [CrossRef]
  37. Singla, P.; Duhan, M.; Saroha, S. A comprehensive review and analysis of solar forecasting techniques. Front. Energy 2021, 16, 187–223. [Google Scholar] [CrossRef]
  38. Aslam, M.; Seung, K.H.; Lee, S.J.; Lee, J.M.; Hong, S.; Lee, E.H. Long-term Solar Radiation Forecasting using a Deep Learning Approach-GRUs. In Proceedings of the 2019 IEEE 8th International Conference on Advanced Power System Automation and Protection (APAP), Xi’an, China, 21–24 October 2019; IEEE: Piscataway, NJ, USA, 2019; pp. 917–920. [Google Scholar]
  39. Kumar, N.M.; Subathra, M. Three years ahead solar irradiance forecasting to quantify degradation influenced energy potentials from thin film (a-Si) photovoltaic system. Results Phys. 2019, 12, 701–703. [Google Scholar] [CrossRef]
  40. Zhang, W.; Maleki, A.; Rosen, M.A. A heuristic-based approach for optimizing a small independent solar and wind hybrid power scheme incorporating load forecasting. J. Clean. Prod. 2019, 241, 117920. [Google Scholar] [CrossRef]
  41. Zhang, W.; Maleki, A.; Rosen, M.A.; Liu, J. Sizing a stand-alone solar-wind-hydrogen energy system using weather forecasting and a hybrid search optimization algorithm. Energy Convers. Manag. 2019, 180, 609–621. [Google Scholar] [CrossRef]
  42. Gupta, R.; Kumar, R.; Bansal, A.K. BBO-based small autonomous hybrid power system optimization incorporating wind speed and solar radiation forecasting. Renew. Sustain. Energy Rev. 2015, 41, 1366–1375. [Google Scholar] [CrossRef]
  43. Maleki, A.; Khajeh, M.G.; Rosen, M.A. Weather forecasting for optimization of a hybrid solar-wind–powered reverse osmosis water desalination system using a novel optimizer approach. Energy 2016, 114, 1120–1134. [Google Scholar] [CrossRef]
  44. Smyl, S. A hybrid method of exponential smoothing and recurrent neural networks for time series forecasting. Int. J. Forecast. 2020, 36, 75–85. [Google Scholar] [CrossRef]
  45. Hewamalage, H.; Bergmeir, C.; Bandara, K. Recurrent neural networks for time series forecasting: Current status and future directions. Int. J. Forecast. 2021, 37, 388–427. [Google Scholar] [CrossRef]
  46. Müllner, D. Modern hierarchical, agglomerative clustering algorithms. arXiv 2011, arXiv:1109.2378. [Google Scholar]
  47. Otto, K.N. Product Design: Techniques in Reverse Engineering and new Product Development; Prentice Hall: Hoboken, NJ, USA, 2003. [Google Scholar]
  48. Askarzadeh, A. Optimisation of solar and wind energy systems: A survey. Int. J. Ambient. Energy 2017, 38, 653–662. [Google Scholar] [CrossRef]
  49. Čepin, M. Assessment of Power System Reliability: Methods and Applications; Springer Science & Business Media: Berlin/Heidelberg, Germany, 2011. [Google Scholar]
  50. Maleki, A.; Pourfayaz, F. Optimal sizing of autonomous hybrid photovoltaic/wind/battery power system with LPSP technology by using evolutionary algorithms. Sol. Energy 2015, 115, 471–483. [Google Scholar] [CrossRef]
  51. INEGI (National Institute of Statistics). Anuario Estadìstico y Geogràfico de Michoacàn de Ocampo; INEGI (National Institute of Statistics): Aguascalientes, Mexico, 2017.
  52. IEA (International Energy Agency) National Solar Radiation Database. 2021. Available online: https://nsrdb.nrel.gov/ (accessed on 13 November 2022).
  53. Sengupta, M.; Xie, Y.; Lopez, A.; Habte, A.; Maclaurin, G.; Shelby, J. The national solar radiation data base (NSRDB). Renew. Sustain. Energy Rev. 2018, 89, 51–60. [Google Scholar] [CrossRef]
  54. INEGI (Instituto Nacional de EstadÍ y Stica Geografía). Anuario Estadístico y Geográfico de Michoacán de Ocampo 2017; Instituto Nacional de EstadÍ y Stica Geografía: Aguascalientes, Mexico, 2018; Volume 10, p. 132. [CrossRef] [Green Version]
  55. IRENA (International Renewable Energy Agency). Battery Storage for Renewables: Market Status and Technology Outlook; IRENA (International Renewable Energy Agency): Masdar City, Abu Dhabi, 2015. [Google Scholar]
  56. IRENA (International Renewable Energy Agency). Renewable Power Generation Costs in 2017 Report; International Renewable Energy Agency: Abu Dhabi, United Arab Emirates, 2018. [Google Scholar]
  57. Gbémou, S.; Eynard, J.; Thil, S.; Guillot, E.; Grieu, S. A Comparative Study of Machine Learning-Based Methods for Global Horizontal Irradiance Forecasting. Energies 2021, 14, 3192. [Google Scholar] [CrossRef]
  58. Medina-Santana, A.A.; Hewamalage, H.; Cárdenas-Barrón, L.E. Deep Learning Approaches for Long-Term Global Horizontal Irradiance Forecasting for Microgrids Planning. Designs 2022, 6, 83. [Google Scholar] [CrossRef]
  59. Medina-Santana, A.A.; Flores-Tlacuahuac, A.; Cárdenas-Barrón, L.E.; Fuentes-Cortés, L.F. Optimal design of the water-energy-food nexus for rural communities. Comput. Chem. Eng. 2020, 143, 107120. [Google Scholar] [CrossRef]
  60. Hyndman, R.J.; Athanasopoulos, G. Forecasting: Principles and Practice; Monash University: Clayton, Australia, 2018. [Google Scholar]
  61. Taieb, S.B.; Bontempi, G.; Atiya, A.F.; Sorjamaa, A. A review and comparison of strategies for multi-step ahead time series forecasting based on the NN5 forecasting competition. Expert Syst. Appl. 2012, 39, 7067–7083. [Google Scholar] [CrossRef] [Green Version]
  62. Tesorflow Documentation. Available online: https://www.tensorflow.org/api_docs/python/tf/keras/layers/LSTM/ (accessed on 3 January 2022).
  63. Dunning, I.; Huchette, J.; Lubin, M. JuMP: A Modeling Language for Mathematical Optimization. SIAM Rev. 2017, 59, 295–320. [Google Scholar] [CrossRef] [Green Version]
  64. Bukar, A.L.; Tan, C.W.; Lau, K.Y. Optimal sizing of an autonomous photovoltaic/wind/battery/diesel generator microgrid using grasshopper optimization algorithm. Sol. Energy 2019, 188, 685–696. [Google Scholar] [CrossRef]
Figure 1. Sequence-to-sequence RNN architecture.
Figure 1. Sequence-to-sequence RNN architecture.
Energies 15 09045 g001
Figure 2. Superstructure to supply electricity to the rural inhabitants.
Figure 2. Superstructure to supply electricity to the rural inhabitants.
Energies 15 09045 g002
Figure 3. Flowchart of the methodology.
Figure 3. Flowchart of the methodology.
Energies 15 09045 g003
Figure 4. Boxplot of GHI for every intra-day time step from 2007 to 2019.
Figure 4. Boxplot of GHI for every intra-day time step from 2007 to 2019.
Energies 15 09045 g004
Figure 5. GHI time series decomposition. (a) Observed values. (b) Trend component. (c) Seasonal component. (d) Residual component.
Figure 5. GHI time series decomposition. (a) Observed values. (b) Trend component. (c) Seasonal component. (d) Residual component.
Energies 15 09045 g005
Figure 6. Boxplot of wind speed for every intraday timestep from 2007 to 2019.
Figure 6. Boxplot of wind speed for every intraday timestep from 2007 to 2019.
Energies 15 09045 g006
Figure 7. Wind time series decomposition. (a) Observed values. (b) Trend component. (c) Seasonal component. (d) Residual component.
Figure 7. Wind time series decomposition. (a) Observed values. (b) Trend component. (c) Seasonal component. (d) Residual component.
Energies 15 09045 g007
Figure 8. Boxplot of temperature for every intraday timestep from 2007 to 2019.
Figure 8. Boxplot of temperature for every intraday timestep from 2007 to 2019.
Energies 15 09045 g008
Figure 9. Temperature time series decomposition. (a) Observed values. (b) Trend component. (c) Seasonal component. (d) Residual component.
Figure 9. Temperature time series decomposition. (a) Observed values. (b) Trend component. (c) Seasonal component. (d) Residual component.
Energies 15 09045 g009
Figure 10. Composition of an input matrix in GHI training set for the RNN model.
Figure 10. Composition of an input matrix in GHI training set for the RNN model.
Energies 15 09045 g010
Figure 11. Three different samples to feed RNN model after data preparation [58]. (a) First sample in the training set. (b) Sample 101 in the training set. (c) Sample 102 in the training set.
Figure 11. Three different samples to feed RNN model after data preparation [58]. (a) First sample in the training set. (b) Sample 101 in the training set. (c) Sample 102 in the training set.
Energies 15 09045 g011
Figure 12. GHI prediction for three weeks of 2020 with RNN. (a) Week 16. (b) Week 33. (c) Week 51.
Figure 12. GHI prediction for three weeks of 2020 with RNN. (a) Week 16. (b) Week 33. (c) Week 51.
Energies 15 09045 g012
Figure 13. Wind speed prediction for three weeks of 2020 with RNN. (a) Week 16. (b) Week 33. (c) Week 51.
Figure 13. Wind speed prediction for three weeks of 2020 with RNN. (a) Week 16. (b) Week 33. (c) Week 51.
Energies 15 09045 g013
Figure 14. Temperature prediction for three weeks of 2020 with RNN. (a) Week 16. (b) Week 33. (c) Week 51.
Figure 14. Temperature prediction for three weeks of 2020 with RNN. (a) Week 16. (b) Week 33. (c) Week 51.
Energies 15 09045 g014
Figure 15. Search for the number of clusters. (a) SN forecast. (b) RNN forecast.
Figure 15. Search for the number of clusters. (a) SN forecast. (b) RNN forecast.
Energies 15 09045 g015
Figure 16. Scenarios created from seasonal naive forecast. (a) GHI. (b) Wind speed. (c) Temperature. (d) Power demand.
Figure 16. Scenarios created from seasonal naive forecast. (a) GHI. (b) Wind speed. (c) Temperature. (d) Power demand.
Energies 15 09045 g016
Figure 17. Scenarios created from RNN forecast. (a) GHI. (b) Wind speed. (c) Temperature. (d) Power demand.
Figure 17. Scenarios created from RNN forecast. (a) GHI. (b) Wind speed. (c) Temperature. (d) Power demand.
Energies 15 09045 g017
Figure 18. Optimization results for PV and BS using RNN forecast. (a) PV output. (b) Energy stored in BS.
Figure 18. Optimization results for PV and BS using RNN forecast. (a) PV output. (b) Energy stored in BS.
Energies 15 09045 g018
Figure 19. Optimization results for PV and BS using seasonal naive forecast. (a) PV output. (b) Energy stored in BS.
Figure 19. Optimization results for PV and BS using seasonal naive forecast. (a) PV output. (b) Energy stored in BS.
Energies 15 09045 g019
Figure 20. Flow diagram for the HRES management strategy.
Figure 20. Flow diagram for the HRES management strategy.
Energies 15 09045 g020
Table 1. Station information.
Table 1. Station information.
ID571501
Latitude19.65
Longitude−101.66
Table 2. Parameters of the rural area [54].
Table 2. Parameters of the rural area [54].
DescriptionValue
Price of fuel (USD/kWh)0.023
Total area (m2)5000
Annualization factor0.117
Air density (kg/m3)1.225
Table 3. Technical parameters for the technologies [55,56].
Table 3. Technical parameters for the technologies [55,56].
WTPVDGBSINV
Nominal efficiency η 0 , η 0.1120.210.35 0.8
Fixed Cost ϖ (USD)10080012503030
Variable cost ν
(USD/kW, USD/kWh )
95020074525530
O&M Cost, χ O & M
(USD/kWh, USD/kW)
0.030.0030.010.00120.3
Land usage, μ
(kW/m2, kWh/m2)
--0.02525.3631.07
Table 4. Hyperparameter values for grid-search.
Table 4. Hyperparameter values for grid-search.
EpochsBatch SizeUnits EncoderUnits DecoderLearning Rate
GHI40, 80, 120256, 512, 102416, 32, 6416, 32, 640.0001, 0.001, 0.01
Wind velocity40, 80, 120256, 512, 102416, 32, 6416, 32, 640.0001, 0.001, 0.01
Temperature40, 80, 120256, 512, 102416, 32, 6416, 32, 640.0001, 0.001, 0.01
The numbers in bold correspond to the chosen values for the hyperparameters.
Table 5. Evaluation of weather forecasting.
Table 5. Evaluation of weather forecasting.
MetricGHIWind SpeedTemperature
RMSE170.0330.6682.057
WAPE0.2240.3540.084
MASE0.8150.7670.820
MAE131.1440.4821.616
APB2.7955.5663.041
Table 6. Training and testing time in seconds.
Table 6. Training and testing time in seconds.
Computational TimeGHIWind SpeedTemperature
Training118.422103.35726.71
Testing2.031.923.09
Table 7. Results of the optimization run for both approaches.
Table 7. Results of the optimization run for both approaches.
VariablePVWTDGBSINV
RNNSNRNNSNRNNSNRNNSNRNNSN
Area, A (m2)68.72467.2990.0900.10067.26767.2670.1000.1001.0791.043
Energy, E (kWh)29,462.76029,462.6980.2310.29314,731.49514,731.4950.1000.10099,911.35299,916.457
Capital cost, C a p C o s t ( U S D )14,544.88114,259.820194.999195.0002502.8492502.84993.40093.40018,274.54917,686.509
O&M cost O M c o s t ( U S D )88.38888.3880.0060.008147.314147.3140.0000.00010.0619.728
Total Cost, T A C ( U S D )RNN:4526.536SN:4424.052
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Medina-Santana, A.A.; Cárdenas-Barrón, L.E. Optimal Design of Hybrid Renewable Energy Systems Considering Weather Forecasting Using Recurrent Neural Networks. Energies 2022, 15, 9045. https://doi.org/10.3390/en15239045

AMA Style

Medina-Santana AA, Cárdenas-Barrón LE. Optimal Design of Hybrid Renewable Energy Systems Considering Weather Forecasting Using Recurrent Neural Networks. Energies. 2022; 15(23):9045. https://doi.org/10.3390/en15239045

Chicago/Turabian Style

Medina-Santana, Alfonso Angel, and Leopoldo Eduardo Cárdenas-Barrón. 2022. "Optimal Design of Hybrid Renewable Energy Systems Considering Weather Forecasting Using Recurrent Neural Networks" Energies 15, no. 23: 9045. https://doi.org/10.3390/en15239045

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop