Next Article in Journal
Macroeconomic Effects of Maritime Transport Costs Shocks: Evidence from the South Korean Economy
Previous Article in Journal
On the Special Issue “Limit Theorems of Probability Theory”
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Applying Fuzzy Time Series for Developing Forecasting Electricity Demand Models

by
José Rubio-León
1,
José Rubio-Cienfuegos
2,
Cristian Vidal-Silva
3,*,
Jesennia Cárdenas-Cobo
4 and
Vannessa Duarte
5
1
Escuela de Computación e Informática, Universidad Bernardo O’Higgins, Av. Viel 1497, Santiago 8320000, Chile
2
Departamento de Ingeniería Eléctrica, Universidad de Chile, Av. Tupper 2007, Santiago 8320000, Chile
3
School of Videogame Development and Virtual Reality Engineering, Faculty of Engineering, University of Talca, Talca 3480260, Chile
4
Facultad de Ciencias e Ingenierías, Universidad Estatal de Milagro, Milagro 091706, Ecuador
5
Escuela de Ciencias Empresariales, Universidad Católica del Norte, Coquimbo 1781421, Chile
*
Author to whom correspondence should be addressed.
Mathematics 2023, 11(17), 3667; https://doi.org/10.3390/math11173667
Submission received: 20 July 2023 / Revised: 16 August 2023 / Accepted: 18 August 2023 / Published: 25 August 2023

Abstract

:
Managing the energy produced to support industries and various human activities is highly relevant nowadays. Companies in the electricity markets of each country analyze the generation, transmission, and distribution of energy to meet the energy needs of various sectors and industries. Electrical markets emerge to economically analyze everything related to energy generation, transmission, and distribution. The demand for electric energy is crucial in determining the amount of energy needed to meet the requirements of an individual or a group of consumers. But energy consumption often exhibits random behavior, making it challenging to develop accurate prediction models. The analysis and understanding of energy consumption are essential for energy generation. Developing models to forecast energy demand is necessary for improving generation and consumption management. Given the energy variable’s stochastic nature, this work’s main objective is to explore different configurations and parameters using specialized libraries in Python and Google Collaboratory. The aim is to develop a model for forecasting electric power demand using fuzzy logic. This study compares the proposed solution with previously developed machine learning systems to create a highly accurate forecast model for demand values. The data used in this work was collected by the European Network of Transmission System Operators of Electricity (ENTSO-E) from 2015 to 2019. As a significant outcome, this research presents a model surpassing previous solutions’ predictive performance. Using Mean Absolute Percentage Error (MAPE), the results demonstrate the significance of set weighting for achieving excellent performance in fuzzy models. This is because having more relevant fuzzy sets allows for inference rules and, subsequently, more accurate demand forecasts. The results also allow applying the solution model to other forecast scenarios with similar contexts.

1. Introduction

Electric power has been one of the most significant driving forces for humanity since the late 18th century (see [1]). Currently, every industry relies on electricity, creating a significant need to effectively manage the energy generated in order to sustain and advance all human activities that depend on its use. Electrical markets emerge to economically analyze all aspects of energy generation, transmission, and distribution (see [2]). One purpose of electrical markets is to satisfy all the energy needs of each sector and industry [3]. An essential variable for understanding this behavior is the demand for electric energy [4]. This information indicates the amount of energy required for an entity or a series of consumers to meet their needs [5].
Since human activities are influenced by various external factors, the demand for energy is not exempt from these influences. Analyzing and understanding energy demand is essential for the development of the energy sector [6,7]. That is highly relevant for the field of energy generation [8], where this last activity is still carried out for most non-renewable resources. Oil (32.89%), coal (29.16%), and natural gas (23.40%) are the three most used energy sources in the world [9]. This characteristic shows the necessity of developing models that enable demand forecasting. By doing so, it would facilitate improved management of energy generation and consumption.
When analyzing the electricity demand as a time series and observing its evolution over time, we can discover interesting patterns and behaviors [10]. The growth over the years can be attributed to the development of industries, population, technology, and economic development (see Figure 1). On the other hand, if the demand is analyzed with values recorded per hour, an increase is observed during the day and a reduction is observed at night. This indicates a close relationship between this variable and the development of work and daily activities [11]. However, when analyzing the demand during this recent period, some records do not adhere to this pattern on multiple occasions and even exceed the maximum values recorded in previous days. As previously mentioned, the demand depends to a large extent on the development of human activities, which are influenced by a wide range of factors. These factors often exhibit stochastic behaviors, such as electrical system failures, events with high attendance, the economic evolution of the industry, and climate changes, among others. Hence, the demand often exhibits random behavior, making it challenging to analyze when developing forecast models [12].
Due to these characteristics and the significance of demand, numerous systems have been developed to forecast this variable using various techniques, including supervised machine learning, deep learning, and autoregressive systems [15,16,17]. Among all the regression models, the utilization of fuzzy series has shown superior performance in this field [18,19]. Besides their diversity, these models facilitate the smooth integration of information from related variables. This is because their training process thoroughly analyzes the relationships between the processed variables [20]. The main objective of this work is to develop a model for forecasting electric power demand using fuzzy logic models. To develop a model for forecasting demand values more accurately, we will explore various configurations and parameters using specialized Python libraries.
The rest of this paper is organized as follows: Section 2 summarizes and provides examples of time series and fuzzy time series. Section 3 describes the main features and models of fuzzy time series. Section 4 outlines the source data used for training and testing solutions, the programming tools utilized for applying fuzzy series models, and the computational implementation details. Section 5 provides a detailed overview of the main results obtained for each fuzzy series model used. Section 6 describes previous research and tools for similar purposes. Section 7 concludes this work and summarizes the main contributions.

2. Time Series

A time series is a succession of data ordered chronologically in defined time intervals [21,22]. The data may be evenly spaced, such as the record of daily solar generation from a photovoltaic plant, or it may be different, such as the number of annual earthquakes in a defined area. This type of representation offers many advantages because its analysis allows us to discover underlying relationships in the data, which can be from various time series or within the data itself. These can be used to extrapolate behavior in the past, during periods of data loss, and in the future. They have two relevant characteristics: seasonality, which shows if it follows a pattern over time, and the trend, which indicates the evolution of this variable (whether the values increase, decrease, or remain within the same range).
Figure 2 displays a temporal representation of an economic indicator, revealing a noticeable seasonality of approximately one year and a discernible growth trend.

2.1. Fuzzy Logic and Fuzzy Time Series

Fuzzy logic is a form of paraconsistent logic (a logic system that handles contradictions in a weakened manner) that does not categorize all statements as completely true or false. This is the primary distinction from classical logic (see  refs. [23,24]). Fuzzy logic allows for an interesting approach to decision problems because, in the real world, it is impossible to abstract everything into a binary system [25]. For example, let’s consider a dataset that records the heights of people in order to determine who is tall or short (see Figure 3). We can use the value of 1.70 m as the dividing point: individuals with a height equal to or greater than 1.70 m are considered tall, while those with a height lower than 1.70 m are considered short. With standard logic, it is assumed that all the data will fall into one of these categories; however, would it be accurate to classify someone with a height of 1.69 m as small or 1.71 m as tall?
Fuzzy logic allows for the establishment of a degree of membership among the defined sets. This means that variables can belong to more than one set [26]. Fuzzy logic operates on fuzzy sets, which have values in a range of [0, 1] instead of binary terms. These values are determined by the membership function of a set for each element that belongs to the universe of discourse [27]. Thus, a fuzzy set A is characterized by its membership function in Equation (1).
μ A : X [ 0 , 1 ] A = { ( x , μ A ( x ) ) } .
As its name indicates, a fuzzy time series corresponds to a time series that utilizes fuzzy logic to transform each value of the series into elements that belong to fuzzy sets [28]. A time series in the fuzzy domain further enhances the analysis of the series by applying fuzzy set relationship analysis to the original data [29].

2.2. Universe of Discourse

In fuzzy time series, the universe of discourse represents the range of values that certain time series elements can take, which in turn represents a specific phenomenon [30]. For example, if there is a time series with values Y R , the universe of discourse U would be defined as U = [ min ( Y ) m , max ( Y ) + m ] , where m represents a margin that allows for the inclusion of new elements in the time series, even if their values fall outside the initial range.

3. Fuzzy Models

3.1. Fuzzy Time Series Models

Fuzzy time series models utilize fuzzy logic to forecast data within time intervals where there are no available records [31]. Many fuzzy models exist because Fuzzy Logic theory and time series analysis are extensive. However, they all share characteristics that enable them to be grouped. The following are relevant characteristics of fuzzy time series models. Considering the sine and cosine values as coordinates of points on a unit circle, the range of both functions is the interval [ 1, 1].
  • Order ( Ω ): It is the amount of past data required to obtain the next value. It should be noted that using more previous data increases the likelihood of obtaining a model with improved performance (see Figure 4).
  • Partition (∏): This parameter controls how temporary data is pushed to the fuzzy sets. There are two relevant characteristics for this parameter: the partition type (the general form that the partition will have) and the number of fuzzy sets (the number of sets in the fuzzification process). Figure 5 exemplifies the second characteristic of Partition ∏.
  • Membership function ( μ ): This parameter determines the type of mapping applied to the partition. Thus, it controls how the data is associated with fuzzy sets.

3.2. Univariable and Multivariable Models

Fuzzy logic analyzes the degrees of membership of variables in fuzzy sets, allowing for the processing of information that includes not only objective variables but also information related to those variables. Hence, these models can be categorized as univariable and multivariable.
  • Univariable models.
    HOFTS (High Order Fuzzy Time Series): The model presented here corresponds to a development made by Petronio e Silva [32]. The High Order Fuzzy Time Series, or HOFTS, method defines its rules using the form L H S R H S , which represents the antecedent and consequent, respectively, and takes into account the order for the forecast process. Equation (2) is given.
    f ( t L ( Ω 1 ) ) , , F ( t L ( 0 ) ) f ( t + 1 )
    When implementing this system, the user must define the order Ω and the number of partitions k. The other variables are previously defined (see Table 1).
    WHOFTS (Weighted High Order Fuzzy Time Series): This model, after obtaining the partition rules, assigns weights to the fuzzy sets to give more importance to certain values when making forecasts. WHOFTS is an extension of the previous fuzzy system, in which the rules have varying levels of importance.
    PWFTS (Probabilistic Weighted Fuzzy Time Series): This model weighs the importance of each fuzzy set and not only takes into account the obtained rules but also the initial configuration of the partition and the performance of models without weights. The inclusion of those weights is achieved probabilistically. It should be noted that this model performs better with a larger amount of data, so increasing the order can be counterproductive when using this model. This model has the parameters shown in the Table 1 follows the probabilistically weighted FLRG model rule.
  • Multivariable models.
    MVFTS (MultiVariable Fuzzy Time Series): It is a system that analyzes the relationships between variables without assigning additional importance to the created sets. The similarity to the HOFTS model allows for a more comprehensive analysis and the generation of forecasts, thanks to the inclusion of information related to the objective variable.
    Weighted MVFTS: This model is similar to the MVFTS model, but it assigns importance to the data in order to improve the analysis and generate better forecasts.
    FIG-FTS (Fuzzy Information Granules-Fuzzy Time Series): This model emphasizes obtaining the relationships between variables through clustering algorithms. Additionally, they incorporate weightings in the created fuzzy sets.

4. Methodology

The information used in this work is data compiled by the European Network of Electricity Transmission Network Operators (ENTSO-E), an organization of electricity managers that contains records on various variables related to the electricity market in several European countries [33]. The data shown corresponds to consumption and generation information in Spain during the years 2015 and 2019. The dataset format is shown in Table 2.
In total, there is a dataset with 29 features and 35,064 samples. This information contains data for the recorded date (in yyyy/mm/dd - hh/mm/ss format), 21 sources of energy generation (including both renewable and non-renewable sources), renewable energy generation forecasts in MW, the price of energy and its forecasts in EUR/MWh, and the demand for hourly electrical power along with forecasted values by Spanish TSO models (Transmission System Operator, a commercial company that manages the operation of the electricity sector).
The most frequently used data were the demand data and the values forecasted by the TSO. These data were used to compare the performance of the models with the systems used in this research up until 2019.

4.1. Exploratory Analysis of Available Demand

The most significant piece of information is the demand. Table 3 and Figure 6 highlight the values of this variable during the study period.

4.2. Data Preprocessing

Data preprocessing was performed using the available information in the database, as synthesized in Table 2. All this was carried out in Python, where it was possible to obtain a clear visualization of the dataset using the functions of the Pandas library.
The first filter eliminated the columns with more than 90% of null information using the function defined in Listing 1. This algorithm removes the columns of a dataframe that have a percentage of null values exceeding a specified limit (nan_threshold). To carry out the process mentioned at the beginning, only the data was loaded into the input of this function. The value of nan_threshold was adjusted to 0.9, and samples that did not have information in the remaining columns were removed.
Listing 1. Column removal function with little information.
Mathematics 11 03667 i001
After applying Listing 1 for data cleaning, pre-processing was performed for each tested model. This involved creating various time series (see Table 4) or partitioning the data.
Although there is a large amount of information, the data used were the registration date (time), the demand (total load actual), and the forecast made by the Spanish TSO (total load forecast). Therefore, the values of these columns were selected, thus forming a dataset, which can be seen in Table 5.

4.3. Definition of Training and Test Sets

The distribution of these sets can be seen in Table 6. The training set contained 70 % of the data, leaving the rest for model evaluation.
This research only uses the demand values (Table 5, column total load actual) for the construction, training, and testing of models. The results were obtained using data from the test set. One point to consider is that additional preprocessing was performed based on the model used and the data.
The solutions in this work utilized the pyFTS library, which was developed in 2018 by the Data Science and Computational Intelligence Laboratory at Minas Gerais University in Belo Horizonte, Brazil. This library is specifically designed for processing fuzzy time series [34]. PyFTS offers excellent versatility when using fuzzy time series of various types. Therefore, all implementations of fuzzy models were completed using this library.
The procedure for using fuzzy systems to make time series forecasts is outlined as follows (see [35]).
  • Data preprocessing: This step is crucial for using forecast models. All the cleaning and filtering of the information are completed here to prepare it for the models.
  • Partition configuration: This is the most important step when using fuzzy models. A thorough analysis must be conducted on the dependent variable to determine the most suitable partition type and number of fuzzy sets. Also, the model type and its order of usage are Configured.
  • Fuzzification of the data: This step involves transforming the data into the fuzzy domain, which generates fuzzy time series.
  • Generation of fuzzy rules: At this point, temporary transition rules are obtained based on the configuration used to partition. Depending on the model, the significance of the generated sets and the relationships between the processed variables are determined.
  • Forecast: The forecasts require a series of values with a length that is at least equal to the order configured in the partition in order to forecast the subsequent periods.
  • Data defuzzification: This process is the opposite of fuzzification, where the data is transformed back to its original domain.
It should be noted that, depending on the models used for fuzzy rule generation, point 4 may involve multiple processes. The primary metric used to evaluate the performance of the models was the MAPE (Mean Absolute Percentage Error), which was calculated after obtaining the forecasts of each model trained with the information from the test sets.

5. Results

The previously defined fuzzy models were applied to the test set, which included demand visualizations from 22 to 23 December 2019.

5.1. Univariable Models

  • HOFTS. This model obtained a MAPE equal to 6.90%, 3.61%, and 2.94% for orders 1, 2, and 3, respectively. A portion of their forecasts can be seen in Figure 7.
  • WHOFTS This model had more correct answers than the HOFTS, and the MAPE obtained was 3.89%, 2.54%, and 2.33% for orders 1, 2, and 3, respectively. Figure 8 shows a portion of the forecast’s behavior.
  • PWFTS. The number of hits increased significantly with this system, to the point where the order 1 model shows a remarkable similarity to the actual demand. The MAPE obtained was 0.87%, 2.46%, and 2.83% for orders 1, 2, and 3, respectively. A portion of their forecasts can be seen in Figure 9.

Performance of Single-Variable Models

Ordering the performance of the models according to the MAPE obtained, Table 7 is generated.
The PWFTS model outperformed the forecasts made by the TSO. A better overall performance was obtained for the higher-order fuzzy models, except for the PWFTS.

5.2. Multivariable Models

Different performances were achieved by incorporating the temporal partition into the data and including it in the forecasting process. The forecasts displayed were created between 21 October and 26 October 2017.
  • MVFTS. This system had a MAPE of 3.60%. A portion of the forecasts from this model can be seen in Figure 10.
  • Weighted MVFTS. Incorporating the weights in the fuzzy sets partially improves the performance. This system obtained a MAPE of 3.48%, where a portion of its forecasts can be seen in Figure 11.
  • FIG-FTS. Searching for pools improves performance. A MAPE of 1.70 % , 1.54 % , and 1.58 % was obtained for 1, 2, and 3 neighbors, respectively, using the K-Nearest Neighbors (KNN) algorithm to calculate relationships between variables. Part of their forecasts can be seen in Figure 12.

Performance of Multivariable Models

Ordering the models according to the MAPE obtained as in the previous section, the results are presented in Table 8.
In this case, a model with higher performance than the TSO was not obtained. However, the forecasts of these systems generally had lower errors than those of the single-variable models.

5.3. Overall Performance

The previous results only used the triangular membership function. Tests were also conducted using a different type of membership function to compare the performance of these models with the results from the previous sections. Table 9 shows the ranking of models and the corresponding results obtained.
In most of these systems, the performance did not differ significantly when only the membership function was changed. Therefore, the graphical behavior is expected to be similar to that already shown for each model.

6. Related Work

6.1. Electric Energy Demand Forecast

Many forecasting models already exist; some of them will be described below.
  • The work of Palma [36] seeks to forecast power and electrical demand using different regressors in order to develop a model that can enhance the estimates made by the affiliated electrical company. Various projection models of electrical energy demands were made, separated into three sectors: residential, industrial, and commercial. Statistical validations were performed to compare and analyze performance differences between these models and the company’s own models. The applied methodology consisted of Knowledge Discovery in Databases (KDD), which involved using analytical tools to search for patterns and relevant information. Regressors were implemented using neural networks and random forests. Additionally, the statistical models SARIMA and SARIMAX were implemented to compare their performance with traditional forecasting methods. As part of a research project conducted by a company, the data used was provided by the company itself. This data includes information on customer demand and electricity consumption. These are the historical monthly energy data and the corresponding monthly maximum electric power from June 2001 to August 2014. Weather and economic data from the same period were also used to prepare the multivariate models.
    When conducting multiple tests with various models, neural networks proved to be the most efficient system for making predictions. The structure and hyperparameters of the neural networks were determined through a grid search, resulting in a MAPE of 2.78%.
  • The work of Zerveas et al. [37] proposed an adapted transformer to perform learning on time series by applying their attention systems to build multivariate time series regressors. The adaptation of the original model consisted of using only one component of the architecture: the encoder. Before using it, a preprocessing module is implemented. This module applies positional encoding to the series and a mask to the input. The positional encoding is responsible for filtering the attention obtained by calculating subsequent values concerning the term the transformer encoder is processing. Additionally, a linear layer is applied at the end of this process. Additionally, a linear layer is applied at the end of this process. Comparisons were made with supervised machine learning models, such as neural networks or SVR6, to evaluate the performance of the model. This work corresponds to an improvement of the model proposed by Li et al. [38] that only utilizes the transformer to process single-variable time series. The research focuses on forecasting electric energy demand.
    One database that this research addresses is the Appliances Energy database, which provides information on the energy consumption, temperature, and humidity conditions of a low-energy building in Belgium [39]. This database contains 19,735 samples and has a large number of features. However, the primary variable corresponds to the energy consumption predicted by the model proposed in this research.
    The solution has a MAPE of 2.8 % for the database, compared with 3.457 % of support vector regression (SVR) and 4.227 % of the neural networks.
  • The research [40] corresponds to a doctoral thesis that presents several fuzzy models for predicting time series and their computational implementation in Python. Although research analyzes various fuzzy time series models, it also explores the strengths and weaknesses of using them as regression models. It also introduces new fuzzy models that are associated with probabilistic forecasts. These models explore the uncertainties in the database and develop a novel system for converting this information into fuzzy rules. This model is the PWFTS. The final model is the most significant innovation implemented in this work. This research also improves scalability for solving problems that involve large datasets and extends its application to multivariate models by extracting detailed fuzzy information from various time series. The model’s versatility and effectiveness make it suitable for a wide range of problems. This research utilized multiple datasets for both the single-variable and multivariable models.
    Single-variable models
    *
    The Taiwan Stock Exchange Capitalization-Weighted Index, also known as TAIEX, is a widely used economic indicator in the field of fuzzy time series. It provides information on the daily average valuation of the Taiwan stock market from 1995 to 2014 [41].
    *
    The NASDAQ indices [42] represent the largest automated and electronic stock market in the United States. These economic indices have also been used in studies of time series and have historical data sampled from 2000 to 2016.
    *
    The Standard & Poor’s index, one of the main indices of the US market [43], was also utilized. The index is based on the market capitalization of 500 large companies listed on the major stock exchanges in the US. This dataset contains the mean daily rates per business day from 1950 to 2017, with 16,000 records.
    Multivariable models
    *
    The SONDA (Sistema de Organização Nacional de Dados Ambientais) project [44] is a Brazilian government initiative that collects data on various environmental characteristics, such as solar radiation, wind speed, and rainfall. The variables analyzed for this study were global horizontal solar radiation and wind speed at a height of 10 m. These variables were recorded by the Brasilia telemetry station between 2012 and 2015, with data collected every minute. In total, there were approximately 2 million values to analyze.
    *
    Another interesting dataset used was the Malaysia power and energy consumption dataset [45], which contains 17,519 samples from Johor, Malaysia.

6.2. Python Tools for Machine and Deep Learning

Concerning the Python programming language [46] for machine and deep learning libraries, Scikit-Learn and PyTorch are popular libraries.
  • Scikit Learn is a project driven by the collaboration of various data scientists from around the world [47]. The Scikit-Learn project receives institutional and private grants to ensure its sustainability [48]. Scikit-Learn represents one of the most popular machine learning libraries in Python, offering a wide range of models for tasks such as linear regression, classification, regression, and clustering (see [49]).
  • Deep learning modules allow for feature transformation [50]. For example, PyTorch [51] is a recommended Python library for implementing deep learning transformers.
The authors of this paper also applied Scikit Learn (random forest) and PyTorch frameworks (neural networks) to forecast electricity demand using the same datasets. Table 10 shows the MAPE results of these solutions.
Although these results seem of quality, we can appreciate that they do not enhance the PWFTS or TSO results.

7. Conclusions

The main contribution of this research is to find, after applying different single-variable and multivariable models, that the PWFTS model can outperform the TSO regarding forecast performance. Although that result is encouraging, the PWFTS system is still under development and undergoing revision. One of its shortcomings is the absence of a more precise computational implementation for developing extended forecasts. That motivates me to continue using the model with high precision levels to forecast TSO demand values.
This study demonstrated the continued usefulness of developing forecast models, with the PWFTS model being the most prominent. This model, despite its computational simplicity in applying it to the demand data, was the most complex system implemented in this work from a theoretical perspective. The model obtained better results. Therefore, this system corresponds to the most efficient fuzzy model for forecasting energy demand. In addition, its characteristics allow it to be present within other, more complex systems, such as FIG-FTS. Due to this, the memory served to validate its effectiveness. However, it is not accurate to claim that it is one of the best models for developing forecast models because there are many other systems in this field that perform this task. These are updated daily with improvements in various fields, such as deep learning. Given this, in future work in this field, it is expected to be possible to implement a larger number of regressors that utilize this type of learning. In addition to the adapted transformer developed in this report, these models are considered to be among the best in the industry.
Another fascinating point to consider is the adaptation of this system for processing local demand data. One of the difficulties was obtaining data for the development of this model. As a result, this work was approached more experimentally than practically. Therefore, one aspect to be developed involves adapting this system for local and practical use, with a focus on the information preprocessing stage, which plays a crucial role in the models presented in this report.
The theory indicated the limited relevance of the membership function and emphasized the importance of order when configuring a fuzzy time series model. Therefore, the results obtained support that. However, there were cases where a notable difference was observed between the same models but with different membership functions, although this behavior is not common. It is assumed that this characteristic is the result of the specific training methods and the data utilized.
One of the most significant challenges of this work was the utilization of high-order models. The results indicate that there is better performance when the order is increased; however, increasing the value of this characteristic also leads to higher computational expenses. The same consequence occurred when incorporating variables related to demand into the multivariable models.

Author Contributions

Formal analysis, C.V.-S.; Investigation, J.R.-L. and J.R.-C.; Resources, J.C.-C.; Data curation, V.D. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Erenoglu, A.K.; Erdinç, O.; Taşcıkaraoğlu, A. History of Electricity. In Pathways to a Smarter Power System; Elsevier: Amsterdam, The Netherlands, 2019; pp. 1–27. [Google Scholar] [CrossRef]
  2. He, W.; King, M.; Luo, X.; Dooner, M.; Li, D.; Wang, J. Technologies and economics of electric energy storages in power systems: Review and perspective. Adv. Appl. Energy 2021, 4, 100060. [Google Scholar] [CrossRef]
  3. Wang, S.; Sun, L.; Iqbal, S. Green financing role on renewable energy dependence and energy transition in E7 economies. Renew. Energy 2022, 200, 1561–1572. [Google Scholar] [CrossRef]
  4. Filippov, S.; Malakhov, V.; Veselov, F. Long-term energy demand forecasting based on a systems analysis. Therm. Eng. 2021, 68, 881–894. [Google Scholar] [CrossRef]
  5. Twenergy. La Demanda eléCtrica. Available online: https://twenergy.com/eficiencia-energetica/como-ahorrar-energia-casa/la-demandaelectrica-953/ (accessed on 10 August 2023).
  6. Abbasi, K.R.; Hussain, K.; Abbas, J.; Adedoyin, F.F.; Shaikh, P.A.; Yousaf, H.; Muhammad, F. Analyzing the role of industrial sector’s electricity consumption, prices, and GDP: A modified empirical evidence from Pakistan. Aims Energy 2021, 9, 29–49. [Google Scholar] [CrossRef]
  7. Laimon, M.; Mai, T.; Goh, S.; Yusaf, T. Energy sector development: System dynamics analysis. Appl. Sci. 2019, 10, 134. [Google Scholar] [CrossRef]
  8. Ahmad, T.; Zhang, D. A critical review of comparative global historical energy consumption and future demand: The story told so far. Energy Rep. 2020, 6, 1973–1991. [Google Scholar] [CrossRef]
  9. Arriols, E. Cuales son las Fuentes de Energía más Utilizadas en el Mundo. Available online: https://www.ecologiaverde.com/cuales-son-las-fuentes-de-energia-mas-utilizadas-en-el-mundo-1426.html (accessed on 10 August 2023).
  10. Niu, Z.; Wu, J.; Liu, X.; Huang, L.; Nielsen, P.S. Understanding energy demand behaviors through spatio-temporal smart meter data analysis. Energy 2021, 226, 120493. [Google Scholar] [CrossRef]
  11. Moral-Carcedo, J.; Pérez-García, J. Time of day effects of temperature and daylight on short term electricity load. Energy 2019, 174, 169–183. [Google Scholar] [CrossRef]
  12. Koot, M.; Wijnhoven, F. Usage impact on data center electricity needs: A system dynamic forecasting model. Appl. Energy 2021, 291, 116798. [Google Scholar] [CrossRef]
  13. Prevención, I. El Dato del Día: Evolución del Consumo de Energía en los últimos Cincuenta Años. Available online: https://bit.ly/3Hyiq45 (accessed on 10 August 2023).
  14. Forecasting, A.E. La Eficiencia Energética en España o Cómo ha Cambiado el Uso de la Energía Desde el Récord de Demanda de 2007. Enero 2021. Available online: https://bit.ly/3qNMkKO (accessed on 10 August 2023).
  15. Almaghrebi, A.; Aljuheshi, F.; Rafaie, M.; James, K.; Alahmad, M. Data-driven charging demand prediction at public charging stations using supervised machine learning regression methods. Energies 2020, 13, 4231. [Google Scholar] [CrossRef]
  16. Aslam, M.S.; Ghazal, T.M.; Fatima, A.; Said, R.A.; Abbas, S.; Khan, M.A.; Siddiqui, S.Y.; Ahmad, M. Energy-efficiency model for residential buildings using supervised machine learning algorithm. Intell. Autom. Soft Comput. 2021, 30, 881–888. [Google Scholar] [CrossRef]
  17. Olu-Ajayi, R.; Alaka, H.; Sulaimon, I.; Sunmola, F.; Ajayi, S. Building energy consumption prediction for residential buildings using deep learning and other machine learning techniques. J. Build. Eng. 2022, 45, 103406. [Google Scholar] [CrossRef]
  18. Song, C.; Xu, Z.; Song, C.; Xu, Z. Regression Analysis Models Under the Hesitant Fuzzy Environment. In Techniques of Decision Making, Uncertain Reasoning and Regression Analysis under the Hesitant Fuzzy Environment and Their Applications; Springer: Berlin/Heidelberg, Germany, 2021; pp. 83–124. [Google Scholar]
  19. Song, C.; Wang, L.; Xu, Z. An optimized logistic regression model based on the maximum entropy estimation under the hesitant fuzzy environment. Int. J. Inf. Technol. Decis. Mak. 2022, 21, 143–167. [Google Scholar] [CrossRef]
  20. Alagbe, V.; Popoola, S.I.; Atayero, A.A.; Adebisi, B.; Abolade, R.O.; Misra, S. Artificial intelligence techniques for electrical load forecasting in smart and connected communities. In Proceedings of the Computational Science and Its Applications–ICCSA 2019: 19th International Conference, Saint Petersburg, Russia, 1–4 July 2019; Part V 19. Springer: Berlin/Heidelberg, Germany, 2019; pp. 219–230. [Google Scholar]
  21. Arafet, K.; Berlanga, R. Digital twins in solar farms: An approach through time series and deep learning. Algorithms 2021, 14, 156. [Google Scholar] [CrossRef]
  22. Wang, Q.; Zhao, Y.; Hu, J. Reset output feedback control of cluster linear multi-agent systems. J. Frankl. Inst. 2021, 358, 8419–8442. [Google Scholar] [CrossRef]
  23. Goguen, J.A. L. A. Zadeh. Fuzzy Sets. Information and Control, Vol. 8, pp. 338?353. - L. A. Zadeh. Similarity Relations and Fuzzy Orderings. Information Sciences, Vol. 3, pp. 177–200. J. Symb. Log. 1973, 38, 656–657. [Google Scholar] [CrossRef]
  24. Samonto, S.; Kar, S.; Pal, S.; Atan, O.; Sekh, A.A. Fuzzy logic controller aided expert relaying mechanism system. J. Frankl. Inst. 2021, 358, 7447–7467. [Google Scholar] [CrossRef]
  25. Chandrasekaran, S.; Durairaj, S.; Padmavathi, S. A Performance evaluation of a fuzzy logic controller-based Photovoltaic-fed multi-level inverter for a three-phase induction motor. J. Frankl. Inst. 2021, 358, 7394–7412. [Google Scholar] [CrossRef]
  26. Khater, A.A.; El-Nagar, A.M.; El-Bardini, M.; El-Rabaie, N.M. Online learning of an interval type-2 TSK fuzzy logic controller for nonlinear systems. J. Frankl. Inst. 2019, 356, 9254–9285. [Google Scholar] [CrossRef]
  27. Zou, Y.; Yan, F.; Wang, X.; Zhang, J. An efficient fuzzy logic control algorithm for photovoltaic maximum power point tracking under partial shading condition. J. Frankl. Inst. 2020, 357, 3135–3149. [Google Scholar] [CrossRef]
  28. Gautam, S.S.; Abhishekh. A novel moving average forecasting approach using fuzzy time series data set. J. Control. Autom. Electr. Syst. 2019, 30, 532–544. [Google Scholar] [CrossRef]
  29. Najariyan, M.; Pariz, N. Stability and controllability of fuzzy singular dynamical systems. J. Frankl. Inst. 2022, 359, 8171–8187. [Google Scholar] [CrossRef]
  30. Pattanayak, R.M.; Behera, H.S.; Panigrahi, S. A novel probabilistic intuitionistic fuzzy set based model for high order fuzzy time series forecasting. Eng. Appl. Artif. Intell. 2021, 99, 104136. [Google Scholar] [CrossRef]
  31. Khanesar, M.; Branson, D.T. Prediction interval identification using interval type-2 fuzzy logic systems: Lake water level prediction using remote sensing data. IEEE Sens. J. 2021, 21, 13815–13827. [Google Scholar] [CrossRef]
  32. E Silva, P. A Short Tutorial on Fuzzy Time Series. Available online: https://bit.ly/3BTGlro (accessed on 10 August 2023).
  33. Kaggle. Hourly Energy Demand Generation and Weather 2015–2019. Available online: https://www.kaggle.com/datasets/nicholasjhana/energy-consumption-generation-prices-and-weather (accessed on 10 August 2023).
  34. Severiano, C.A.; e Silva, P.C.d.L.; Cohen, M.W.; Guimarães, F.G. Evolving fuzzy time series for spatio-temporal forecasting in renewable energy systems. Renew. Energy 2021, 171, 764–783. [Google Scholar] [CrossRef]
  35. Castillo, O.; Melin, P. Forecasting of COVID-19 time series for countries in the world based on a hybrid approach combining the fractal dimension and fuzzy logic. Chaos Solitons Fract. 2020, 140, 110242. [Google Scholar] [CrossRef]
  36. Palma, A. Pronóstico de Demanda de Energía y Potencia Eléctrica en el Largo Plazo para la red de Chilectra sa Utilizando Técnicas de Minería de Datos. Ph.D. Thesis, Universidad de Chile, Santiago, Chile, 2015. [Google Scholar]
  37. Zerveas, G.; Jayaraman, S.; Patel, D.; Bhamidipaty, A.; Eickhoff, C. A Transformer-Based Framework for Multivariate Time Series Representation Learning. In Proceedings of the 27th ACM SIGKDD Conference on Knowledge Discovery & Data Mining, Virtual, 14–18 August 2021; Association for Computing Machinery: New York, NY, USA, 2021; pp. 2114–2124. [Google Scholar] [CrossRef]
  38. Li, S.; Jin, X.; Xuan, Y.; Zhou, X.; Chen, W.; Wang, Y.X.; Yan, X. Enhancing the Locality and Breaking the Memory Bottleneck of Transformer on Time Series Forecasting. In Proceedings of the 33rd International Conference on Neural Information Processing Systems, Vancouver, BC, Canada, 8–14 December 2019; Curran Associates Inc.: Red Hook, NY, USA, 2019. [Google Scholar]
  39. Candanedo, L. Appliances Energy Prediction Data Set. Available online: https://archive.ics.uci.edu/ml/datasets/Appliances+energy+prediction (accessed on 10 August 2023).
  40. De Lima e Silva, P.C. Scalable Models for Probabilistic Forecasting with Fuzzy Time Series. Ph.D. Thesis, Universidade Federal de Minas Gerais, Belo Horizonte, Brazil, 2019. [Google Scholar]
  41. Clement, J. Taiwan Index Plus. Available online: https://taiwanindex.com.tw/en/indexes/t00 (accessed on 10 August 2023).
  42. Nasdaq Inc. Nasdaq: Stock Market, Data Updates, Reports & News. Available online: https://www.nasdaq.com/ (accessed on 10 August 2023).
  43. S&P Dow Jones Indices. U.S. Core—Investment Themes | S&P Dow Jones Indices. Available online: https://www.spglobal.com/spdji/en/indices/equity/sp-500/#overview (accessed on 10 August 2023).
  44. INPE—Instituto Nacional de Pesquisas Espaciais. SONDA—Sistema de Organização Nacional de Dados Ambientais. Available online: http://sonda.ccst.inpe.br/ (accessed on 10 August 2023).
  45. Suruhanjaya Tenaga (Energy Commission). Malaysia Energy Statistics Handbook. Available online: https://meih.st.gov.my/documents/10620/adcd3a01-1643-4c72-bbd7-9bb649b206ee (accessed on 10 August 2023).
  46. Van Rossum, G.; Drake, F.L. Python 3 Reference Manual; CreateSpace: Scotts Valley, CA, USA, 2009. [Google Scholar]
  47. Zhu, Q.; Xiong, Q.; Wang, K.; Lu, W.; Liu, T. Accurate WiFi-based indoor localization by using fuzzy classifier and mlps ensemble in complex environment. J. Frankl. Inst. 2020, 357, 1420–1436. [Google Scholar] [CrossRef]
  48. Pedregosa, F.; Varoquaux, G.; Gramfort, A.; Michel, V.; Thirion, B.; Grisel, O.; Blondel, M.; Prettenhofer, P.; Weiss, R.; Dubourg, V.; et al. Scikit-learn: Machine Learning in Python. J. Mach. Learn. Res. 2011, 12, 2825–2830. [Google Scholar]
  49. Tran, M.K.; Panchal, S.; Chauhan, V.; Brahmbhatt, N.; Mevawalla, A.; Fraser, R.; Fowler, M. Python-based scikit-learn machine learning models for thermal and electrical performance prediction of high-capacity lithium-ion battery. Int. J. Energy Res. 2022, 46, 786–794. [Google Scholar] [CrossRef]
  50. Xu, J.; Yang, J.; Xiong, X.; Li, H.; Huang, J.; Ting, K.; Ying, Y.; Lin, T. Towards interpreting multi-temporal deep learning models in crop mapping. Remote Sens. Environ. 2021, 264, 112599. [Google Scholar] [CrossRef]
  51. Paszke, A.; Gross, S.; Massa, F.; Lerer, A.; Bradbury, J.; Chanan, G.; Killeen, T.; Lin, Z.; Gimelshein, N.; Antiga, L.; et al. PyTorch: An Imperative Style, High-Performance Deep Learning Library. In Advances in Neural Information Processing Systems 32; Curran Associates, Inc.: Red Hook, NY, USA, 2019; pp. 8024–8035. [Google Scholar]
Figure 1. Increase in energy demand, population, electric consumption and CO 2 from 1970 to 2015. (a) The increase in energy demand and Spanish GDP, an economic value, shows how demand increases as the economy grows [13]. (b) Evolution of population, electricity consumption, and CO 2 emissions in the last decades [14].
Figure 1. Increase in energy demand, population, electric consumption and CO 2 from 1970 to 2015. (a) The increase in energy demand and Spanish GDP, an economic value, shows how demand increases as the economy grows [13]. (b) Evolution of population, electricity consumption, and CO 2 emissions in the last decades [14].
Mathematics 11 03667 g001
Figure 2. Time series of the Monthly Index of Economic Activity (IMACEC) of the mining, non-mining and joint sectors between 2019–2039.
Figure 2. Time series of the Monthly Index of Economic Activity (IMACEC) of the mining, non-mining and joint sectors between 2019–2039.
Mathematics 11 03667 g002
Figure 3. Differences between the association of the height to the sets of tall and short through classical logic (a) and fuzzy logic (b), the x-axis in both examples corresponds to the height. In contrast, the y-axis corresponds to the membership degree.
Figure 3. Differences between the association of the height to the sets of tall and short through classical logic (a) and fuzzy logic (b), the x-axis in both examples corresponds to the height. In contrast, the y-axis corresponds to the membership degree.
Mathematics 11 03667 g003
Figure 4. Forecasting the behavior of a sine function using fuzzy models of various orders.
Figure 4. Forecasting the behavior of a sine function using fuzzy models of various orders.
Mathematics 11 03667 g004
Figure 5. Forecasts of a fuzzy model for a sine function with varying numbers of partitions.
Figure 5. Forecasts of a fuzzy model for a sine function with varying numbers of partitions.
Mathematics 11 03667 g005
Figure 6. Graphic display of total demand and its values during the first 10 days 2015. (a) Visualization of the total demand, (b) Display of the first 200 demand values together with the forecast.
Figure 6. Graphic display of total demand and its values during the first 10 days 2015. (a) Visualization of the total demand, (b) Display of the first 200 demand values together with the forecast.
Mathematics 11 03667 g006
Figure 7. Demand forecasts made by the HOFTS univariate model for three orders.
Figure 7. Demand forecasts made by the HOFTS univariate model for three orders.
Mathematics 11 03667 g007
Figure 8. Demand forecasts made by the WHOFTS univariate model for 3 orders.
Figure 8. Demand forecasts made by the WHOFTS univariate model for 3 orders.
Mathematics 11 03667 g008
Figure 9. Demand forecasts made by the PWFTS univariable model for three orders.
Figure 9. Demand forecasts made by the PWFTS univariable model for three orders.
Mathematics 11 03667 g009
Figure 10. Demand forecasts made by the MVFTS multivariable model.
Figure 10. Demand forecasts made by the MVFTS multivariable model.
Mathematics 11 03667 g010
Figure 11. Demand forecasts made by the multivariate model Weighted MVFTS.
Figure 11. Demand forecasts made by the multivariate model Weighted MVFTS.
Mathematics 11 03667 g011
Figure 12. Demand forecasts made by the FIG-FTS multivariate model, up to 3 neighbors using KNN.
Figure 12. Demand forecasts made by the FIG-FTS multivariate model, up to 3 neighbors using KNN.
Mathematics 11 03667 g012
Table 1. Hyperparameters defined for HOFTS and WHOFTS models.
Table 1. Hyperparameters defined for HOFTS and WHOFTS models.
ParameterValue
Ω User Defined
kUser Defined
Grid
μ triangle
α cut0
L { 1 , , Ω }
Table 2. Summary information available in the database used.
Table 2. Summary information available in the database used.
TimeGeneration Biomass [MW]Forecast Solar [MW]Price Forecast [Eur/MWh]Price Actual [Eur/MWh]Total Load Forecast [MW]Total Load Actual [MW]
2015/01/01 00:00:00 + 01:004471750.165.4126,11825,385
2015/01/01 01:00:00 + 01:004491648.1064.9224,93424,382
2018/12/31 23:00:00 + 01:002902664.2769.8824,42424,455
Table 3. Interesting data on available demand.
Table 3. Interesting data on available demand.
Registered datesFrom 2015/01/01 - 00:00:00 to 2018/12/31 - 23:59:59
Demand rangeMinimum: 18,041 [MW], Maximum: 41,015 [MW]
MAPE TSO forecast1.096%
Table 4. Time series created from the demand data and the registration date.
Table 4. Time series created from the demand data and the registration date.
TimeLoad-72 h [MW]Load-71 h [MW]Load-1 h [MW]Load Actual [MW]
2015/01/02 00:00:00 + 01:0025,38524,38226,79827,070
2015/01/02 01:00:00 + 01:0024,38222,73427,07024,935
2018/12/31 22:00:00 + 01:0029,14526,93428,07125,801
2018/12/31 23:00:00 + 01:0026,93424,31225,80124,455
Table 5. Demand registered by the Spanish TSO, together with this forecast and its date.
Table 5. Demand registered by the Spanish TSO, together with this forecast and its date.
TimeTotal Load Actual [MW]Total Load Forecast [MW]
2015/01/01 00:00:00 + 01:0025,38526,118
2015/01/01 01:00:00 + 01:0024,38224,934
2018/12/31 22:00:00 + 01:0025,80125,450
2018/12/31 23:00:00 + 01:0024,45524,424
Table 6. Data distributions for the training and test sets.
Table 6. Data distributions for the training and test sets.
SetSizeStartEnd
Training24,5192015/01/01 00:00:002017/10/19 23:00:00
Test10,5092017/10/20 00:00:002018/12/31 23:00:00
Table 7. Absolute Mean Percentage Error obtained by the single-variable fuzzy models.
Table 7. Absolute Mean Percentage Error obtained by the single-variable fuzzy models.
ModelOrderMAPE (%)
PWFTS10.8783
TSO forecastDoes not apply0.9590
WHOFTS32.3359
PWFTS22.4677
WHOFTS22.5408
PWFTS32.8389
HOFTS32.9445
HOFTS23.6125
WHOFTS13.8930
HOFTS16.9030
Table 8. Mean Absolute Percentage Error obtained by multivariable fuzzy models.
Table 8. Mean Absolute Percentage Error obtained by multivariable fuzzy models.
ModelMAPE (%)
TSO forecast0.9590
FIG-FTS (k = 2)1.5421
FIG-FTS (k = 3)1.5866
FIG-FTS (k = 1)1.7079
WeightedMVFTS3.4820
MVFTS3.6086
Table 9. Performance of fuzzy models tested.
Table 9. Performance of fuzzy models tested.
ModelTypeOrderPartitionMAPE (%)
PWFTSsingle1Grid Partition tri0.8738
PWFTSsingle1Grid Partition gauss0.8779
PWFTSsingle1Grid Partition trap0.8851
TSO forecastNot applicableNot applicableNot applicable0.9590
FIG-FTS (k = 2)multi2Grid Partition tri1.5421
FIG-FTS (k = 3)multi2Grid Partition tri1.5866
FIG-FTS (k = 1)multi2Grid Partition tri1.7079
WHOFTSsingle3Grid Partition tri2.3359
WHOFTSsingle3Grid Partition trap2.3359
PWFTSsingle2Grid Partition trap2.3936
PWFTSsingle2Grid Partition tri2.4677
WHOFTSsingle2Grid Partition tri2.5408
WHOFTSsingle2Grid Partition trap2.5408
WHOFTSsingle3Grid Partition gauss2.6005
PWFTSsingle2Grid Partition gauss2.6868
PWFTSsingle3Grid Partition trap2.7710
PWFTSsingle3Grid Partition tri2.8389
WHOFTSsingle2Grid Partition gauss2.9332
HOFTSsingle3Grid Partition trap2.9445
HOFTSsingle3Grid Partition tri2.9445
PWFTSsingle3Grid Partition gauss3.0015
WeightedMVFTSmulti2Grid Partition tri3.4820
HOFTSsingle3Grid Partition gauss3.6079
MVFTSmulti1Grid Partition tri3.6086
HOFTSsingle2Grid Partition trap3.6125
HOFTSsingle2Grid Partition tri3.6125
WHOFTSsingle1Grid Partition tri3.8930
WHOFTSsingle1Grid Partition trap3.8930
WHOFTSsingle1Grid Partition gauss3.9295
HOFTSsingle2Grid Partition gauss4.7830
HOFTSsingle1Grid Partition tri6.9030
HOFTSsingle1Grid Partition trap6.9030
HOFTSsingle1Grid Partition gauss8.0617
Table 10. MAPE of Random Forest and Neural Network models for predictions.
Table 10. MAPE of Random Forest and Neural Network models for predictions.
ModelMAPE
Random Forest1.066
Neural Network1.9256
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Rubio-León, J.; Rubio-Cienfuegos, J.; Vidal-Silva, C.; Cárdenas-Cobo, J.; Duarte, V. Applying Fuzzy Time Series for Developing Forecasting Electricity Demand Models. Mathematics 2023, 11, 3667. https://doi.org/10.3390/math11173667

AMA Style

Rubio-León J, Rubio-Cienfuegos J, Vidal-Silva C, Cárdenas-Cobo J, Duarte V. Applying Fuzzy Time Series for Developing Forecasting Electricity Demand Models. Mathematics. 2023; 11(17):3667. https://doi.org/10.3390/math11173667

Chicago/Turabian Style

Rubio-León, José, José Rubio-Cienfuegos, Cristian Vidal-Silva, Jesennia Cárdenas-Cobo, and Vannessa Duarte. 2023. "Applying Fuzzy Time Series for Developing Forecasting Electricity Demand Models" Mathematics 11, no. 17: 3667. https://doi.org/10.3390/math11173667

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