{'fraction_non_alphanumeric': 0.033180880638507756, 'fraction_numerical': 0.00955071294054345, 'mean_word_length': 4.729000770613922, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 1, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 5, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
A New Short Term Electrical Load Forecasting by Type-2 Fuzzy Neural Networks

: In this study, we present a new approach for load forecasting (LF) using a recurrent fuzzy neural network (RFNN) for Kermanshah City. Imagine if there is a need for electricity in a region in the coming years, we will have to build a power plant or reinforce transmission lines, so this will be resolved if accurate forecasts are made at the right time. Furthermore, suppose that by building distributed generation plants, and predicting future consumption, we can conclude that production will be more than consumption, so we will seek to export energy to other countries and make decisions on this. In this paper, a novel combination of neural networks (NNs) and type-2 fuzzy systems (T2FSs) is used for load forecasting. Adding feedback to the fuzzy neural network can also beneﬁt from past moments. This feedback structure is called a recurrent fuzzy neural network. In this paper, Kermanshah urban electrical load data is used. The simulation results prove the efﬁciency of this method for forecasting the electrical load. We found that we can accurately predict the electrical load of the city for the next day with 98% accuracy. The accuracy index is the evaluation of mean absolute percentage error (MAPE). The main contributions are: (1) Introducing a new fuzzy neural network. (2) Improving and increasing the accuracy of forecasting using the proposed fuzzy neural network. (3) Taking data from a speciﬁc area (Kermanshah City) and forecasting the electrical load for that area. (4) The ability to enter new data without calculations from the beginning.


Introduction
The information read by power meters about value and behavior of many times is the most important source of design and planning in electricity distribution companies. Based on this information, predictions are made about how the network will be designed and operated. In fact, the load information estimates the amount of annual investment required for the network, including the number of transformers, the size of the medium-voltage grid, the size of the low-voltage grid, the number of switchboards, and also the location, capacity, and dependency of feeders, substations, and other equipment needed to pass the network peak consumption [1]. Load forecasting is basic planning in the electricity industry. Many approaches have been researched and applied in the last two decades to address this issue. These methods are often of a different nature and are based on different theories of engineering and economic analysis. In developed and developing countries, medium-term and long-term economic programs are designed to meet the economic and social goals of those countries [2,3].
The IEEE LF Working Group has developed two lists of documented load forecasting. The first list (phase 1) covers the general concepts of the LF problem, and the second list (phase 2) focuses on the economic issues of load forecasting. Almost all methods presented in the distant past (more than 20 years ago) have used statistical methods, but today there are more advanced methods that use expert (knowledge-based) load forecasting systems. Since power generation in Iran is mainly performed with fossil fuels, and these fuels are available in abundance and cheaply, the issues of production planning and energy storage, as well as the use of renewable energy, have not been taken seriously. Numerous studies on load forecasting in the power system have been discussed and various methods have been proposed for it. However, less has been proposed for a specific city or region based on real data [4][5][6]. In the following, some of the most recent related works are discussed.
In reference [7], the authors examined the burdens and conditions of the use of renewable resources in an area of Khorasan Razavi called Arzumandeh Village, which was powered in 2001 by an 11 km length of 20 kV lines. In the mentioned paper, they found that the existence of a wind turbine with two diesel generators is necessary for the future. In reference [8], the optimal model of long-term load forecasting in North Khorasan Province is presented. To find a suitable model, two models of linear and non-linear regression including the variables of population, gross domestic product (GDP), average electricity price, and the number of household subscribers and industrial subscribers have been considered. The proposed models use a meta-heuristic algorithm called a learning-based algorithm, and real data of Khorasan Province from 2003 to 2013 is used for parameter estimation. In reference [9], the performance of the Markov hidden algorithm in the hourly prediction of load in several sample distribution points of Kermanshah Province is evaluated. Unfortunately, the accuracy of the method presented in the mentioned paper is low and also can not be forecast for more than an hour. For the first time, in reference [10], an optimal method is proposed to improve the short-term LF problem. The proposed method of the mentioned paper is to split the holidays into two categories of national and religious holidays, then group each of these holiday categories into two categories of "holiday" and "mourning" holidays, and then to employ a short-term expert forecasting system. In reference [11], a blended-learning approach is proposed to extract more inputs and reduce input space dimensions to predict short-term loads. The suggested method finds a non-linear relation between features by visualizing a local linear curve in the feature space. In references [12,13], research has been conducted to improve short-term electricity load prediction using NNs based on machine learning. In contrast to the existing methods, in the mentioned papers, both packet and seed training methods are used to enhance neural network training. In reference [14], a fuzzy-controlled NN is used to predict the next 24 h of a city in Brazil. In the mentioned paper, despite the desirable results, the system dynamics are not considered. As we know computational intelligence methods such as neural networks [15], fuzzy logics [16,17] have received a lot of attention. The innovations of this article are: 1. Introducing a new structure of type-2 RFNN with high accuracy for time series forecasting; 2. The practical extraction of electricity load data in Kermanshah and its documentation; 3. The ability to enter new data without calculations from the beginning.
First, the problem of electrical load forecasting is explained and detailed in Section 2. The proposed recurrent fuzzy neural network structure is presented and explained in Section 3. The suggested forecasting approach is illustrated in Section 4. The results and conclusions are given in Sections 5 and 6.

Load Forecasting Theory
Among the types of energy in the world, electrical energy has special properties. Firstly, this energy cannot be stored extensively. Secondly, the return on investments in electricity is time-consuming (especially in third-world countries that procure most of the equipment they need from developed countries). In the field of load forecasting, there are various advantages and disadvantages. The problem of electrical load forecasting is performed in two ways: 1. Multivariate simulation for large systems with multiple and varied data, providing accurate results; 2. Fitting and extrapolating load growth from past to future, which is a more general approach than the first method.
The second method, in addition to simple computations, is more feasible and economically better than the first method, although the results are weaker than those obtained from the simulation. In estimating load distribution systems, usually, the area covered is divided into small sections and the future load of each of these sections is predicted. Two methods can be used to segment the covered areas: regular segmentation and irregular segmentation.
In regular segmentation, the whole area is divided into small squares of the same size that can vary in size from a few meters to a few kilometers. The irregular division of the area according to the area covered by the feeders is divided into irregular sections. The classical method of charge orientation in each small area, hereinafter referred to as the cell, is to fit the curve with multiple regressions with respect to past loads in each cell. By estimating the peak load per cell in year t, and by applying the least-squares method, the estimated peak load is obtained for years t > T (T is now).
From the standpoint of load, cell growth presents a complex character and does not have a regular, continuous form, but usually, the peak of charge growth and its gradient of change are uncertain for years to come. To compute the steady-state tendency, the burden estimation at the end of the forecast period (horizon year) is also included in the input data. The load regression method is defined in terms of its descriptive factors, such as the climate variable and the non-climatic factors that affect the electrical load. The load model is as follows: y(t) = a 0 + a 1 χ 1 (t) + . . . + a n χ n (t) (1) y(t) denotes the load, χ 1 (t), . . . , χ n (t) are descriptive factors associated with y(t), a 0 is a random input with a zero mean, a 1 . . . a n are coefficients. The descriptive terms of (1) are computed based on correlation analysis. Experience with load modeling helps in identifying the effective variables early. The estimation of coefficients is commonly obtained using the least-square estimation technique and statistical tests. The obtained tests determine the importance of each coefficient and the significance of the corresponding variables of these coefficients. In the usual regression method, the data required is, as mentioned, limited to the peak load of previous years and the program horizon year, while achieving more realistic results and avoiding errors that result from issues such as transferring loads from one feeder to another or the presence of areas of dots that are expected to become pregnant in the coming years or the present. Furthermore, lowering the calculation time and the number of curves fittings and finding the appropriate function to fit in cases where the number of cells is high requires more information, as well as changes in sensory prediction methods, as mentioned below. The usual Gersian method, although a relatively simple and useful one, has some drawbacks, such as the load transfer problem, the difficulty of deducing the empty level, and the grouping problem. By the use of regression approaches, some modifications have been presented to solve the load transfer coupling, vacant area inference, and clustering problems.

Time Domain Forecasting
Large-scale electricity generation is not economically viable. For this reason, unlike other branches of the economy, electricity has to be produced simultaneously with con-sumption. Electricity consumption is not fixed but is a complex and non-linear notion of many parameters. Given the variability in the amount of electricity consumed, power generating companies are required to predict the timing of the information needed to make their decisions in the power system [18,19]. Generally, load forecasts are divided into categories based on the forecast period: • Long-term (5 to 30 years), economic statistical forecasting that plays a key role in the economic planning of production capacity and transmission networks; • Mid-term (1 month to 5 years), mainly used for fuel consumption planning, maintenance and maintenance planning, financing, and tariff planning; • Short-term (1 day to several weeks), for daily and weekly scheduling, optimum power generation (voltage-reactive power optimization, scheduling for the reserved power required, storage pump operation time) and electricity exchange partners are used; • Very-short-term (minutes to several hours), providing the information needed to distribute the economic burden and estimate the reliability. Very-short-term forecasts (minutes to hours) are also useful for scheduling power switches between companies and studying transmission imputations.
The short-term LF problem, which is predicted hourly from one day to the next week, is an important criterion in planning for power grid utilization. Distribution loads, system reliability studies, network service planning, and even the economic exploitation of generation and transmission networks all depend on short-term hourly load forecasting.

Recurrent Fuzzy Neural Network
RFNNs have been more popular in recent years. The capacity of these NNs to imitate the behavior of dynamic systems owing to their feedback structure is one of the reasons for their expanding usage. Back propagation is often used to train these NNs [20]. In this, the parameters are often adjusted as conventional integers; however, in recent years, several publications have looked into fuzzy weights. To boost overall forecasting capabilities and improve forecasting accuracy, references [21][22][23] propose a fuzzy-distance time-series prediction model based on various NN-based time-frequency spaces and induced-ordered weighted averaging aggregates (IOWA). The combination of a radial-basis-function neural network (RBFN) and fuzzy systems have received a lot of interest in recent years.
In reference [24], the fuzzy clustering method is used to classify the RBFN input space. In reference [25], the combination of the fuzzy system, genetic algorithm, and RBFN is used to find the optimal values of the PID coefficients. In references [26][27][28], the fuzzy system is used to adjust the middle-layer parameters of the RBFN. However, articles on the fuzzy type-2 combination with the RBFN are few. In reference [29], an RBFN with type-2 fuzzy intermediate-layer neurons with interval weights is presented. A type-2 fuzzy set is used in RBF neurons and at regular weights. A typical RBFN network is given in Figure 1. In the hidden layer, we can write: where, u = [u 1 , ..., u i , ..., u n ] T , σ j ∈ R, c j , and u i denote the width and the center of the j-th neuron and i-th input. The output is written as: In Figure 2, the suggested RFNN structure is depicted. In the weights between the hidden layer and the output layer, neurons employ type-1 fuzzy membership functions (MFs), as seen in Figure 2. Adding a delay unit to the network as an input allows us to better describe and identify dynamical systems, since their output is time dependent. To be sure, depending on the system's complexity, delays may be taken into consideration, but if an appropriate response is not obtained, the number of delays should be raised. For the RBF layer, we have: Remark 1. The output signal at any time depends on the state of the system in the previous moments. Then, for better and more accurate modeling, the delays in input signals should be considered. Exactly how many delays should be applied is unclear and depends on the order of the system. However, more delays should be applied until the system responds better. Adding more delay (more than the order of the system) leads to a worse response, and it should stop.
Therefore the output of the RBF layer is calculated as follows.
where, u n+1 = φ(t − 1). The outputs are written as: where, c 1 w i is the center-left (smaller center), c 2 w i is the center-right (larger center), and σ w i is the width of the Gaussian membership function (MF). Note that the considered MF has two centers and a width. In relation to (8) and (9), p and q are type-reduction parameters [30]. Then,ŷ =ŷ l +ŷ r 2 (10) Recurrent type-2 fuzzy RBFN learning formulations and parameter updates are not stated here to avoid confusion for readers, but those interested can refer to reference [31] for more details.

Recurrent Type-2 Fuzzy RBFN for Load Forecasting
The general diagram is given in Figure 3. In the load forecasting method, the type-2 fuzzy (T2F) RBFN is employed to construct the relationship between input variables (u 1 , u 2 , . . . , u n ) and forecasting load (y). In the electricity distribution network, distributed renewable energy sources, active loads, and electricity markets are highly uncertain. Therefore, the modeling tool (here the recurrent type-2 fuzzy RBFN) must be able to provide an accurate model. Input and output data are recorded at the power distribution company's center and backed up. The number of inputs of the T2F-RNN can be increased or decreased. For example, in some articles, only two inputs (load in the past and day of the year) are considered, and in others, in addition to these two, the amount of temperature, humidity, holiday and non-holiday electricity costs, etc., are also considered. However, it should be noted that the number of inputs should be commensurate with that particular area (city). So, a mapping function of inputs to output is created as follows: Therefore, the more accurate the mapping, the more accurate the load forecasting.

Results and Discussion
This section deals with the LF problem using the RFNN. Inputs in the recurrent fuzzy neural network model are hours, days of the week, holiday (0) and non-holiday (1), days of the year, air temperature, as well as the output in the past moment. The output is the amount of electrical load. However, the recurrent fuzzy neural network has five inputs and one output. A case study is the Kermanshah City, which is a large city in western Iran. The reason for choosing this city is its complete information and data. Here are the results of the recurrent fuzzy neural network training for some hours on some days. In Figure 4, the 10-year interval data from 2008 to 2018 are applied to the proposed recurrent neural network and the results are shown.   Since the 10-year dataset is very large, the size of the neural network is naturally enlarged, and the training time may be several tens of hours, the last three years can be used. Figure 7 illustrates the proposed neural network training results for the last three years . For greater clarity, we have enlarged the multi-day interval in Figure 8.  If we only use the data of the last year, the data will be much smaller and the trained neural network will be much more comprehensible and smaller in size. However, it will definitely have some errors. Figure 9 depicts the results of the suggested NN training for one year (2018). For greater clarity, we have magnified the few days that you see in Figure 10. As illustrated in Figures 4-10, the recurrent fuzzy neural network training process is well performed and the model obtained can predict future moments well. Figure 11 shows the forecast results for 20 October 2019, which is a holiday day with a temperature from 9 to 15 degrees. Further, the load consumption is predicted on 30 July 2019, which is a non-holiday day with temperatures of 21 to 25 • C, and the result is illustrated in Figure 12. In Figures 11 and 12, the least consumed (holiday days and average temperatures) and the most consumed (non-holiday days and warm temperatures) were predicted, respectively. As can be seen, the proposed method performs well. Other days of the year are easily predictable since they have consumed between the two days above. Figures 4-12 show that if accurate data on the consumed electrical load by an area are available, by designing and adjusting a recurrent fuzzy neural network, the load of the coming days can be well predicted with a more than 95% accuracy. With more information available (e.g., ten years or more) using big-data techniques, more than 98% accuracy can be achieved. However, large data volumes reduce the speed of the training and processing of the recurrent fuzzy neural networks. However, computers with fast processors can overcome this problem. The results of this study can help plan electricity generation in the Kermanshah region. Some generators can be removed if not needed. Electricity can even be sold to neighboring countries. Table 1 shows a comparison between our proposed method in this paper and the method of two valid references. In Table 1, four parameters including computational time, accuracy, implementation complexity (or user-friendliness), and the need to start from the beginning (with the entry of new data) are considered to evaluate and compare methods. The comparison index MAPE is defined as: where, y andŷ, represent the real and estimated signals. As seen in Table 1, our designed approach is the most accurate due to the presence of feedback (using past-moment information) as well as type-2 fuzzy logic (due to its high ability to approximate functions).

Remark 2.
In the suggested method, a type-2 fuzzy approach is presented, which has a high resistance against uncertainties. Furthermore, various effective factors (such as weather conditions and day-type in terms of being a working day or a holiday) are proposed as input variables to obtain an accurate forecasting. Furthermore, a strong learning scheme is proposed to optimize the structure such that a desirable result is achieved. An examination with real-world datasets demonstrates the better capability of the suggested approach.

Conclusions
Load forecasting has been the basic planning of the electricity industry. The electric load is a complex and non-linear function of several parameters, such as weather conditions and day types (holidays and non-holidays). Incidentally, each day has a different pattern. In various seasons of a year, on the basis of specific factors, such as the length of the day, the consumption curve changes. In this paper, a novel fuzzy RFNN is developed for load forecasting. The recurrent fuzzy neural network, since it used the information from the previous moments, provided the dynamic state for the model, and thus forecast closer to reality. The simulations show the superiority of the introduced LF method. The designed LF scheme results in a high forecasting accuracy (between 97 and 98%). The following can be suggested to continue the method of this paper. (1) Using other type-2 fuzzy systems that have a higher approximation ability. (2) Using deep learning methods for more than 10 years of data. (3) The hardware implementation of the results of this paper as a "live panel" in power distribution companies.