A Fuzzy Logic Model for Hourly Electrical Power Demand Modeling

: In this article, a fuzzy logic model is proposed for more precise hourly electrical power demand modeling in New England. The issue that exists when considering hourly electrical power demand modeling is that these types of plants have a large amount of data. In order to obtain a more precise model of plants with a large amount of data, the main characteristics of the proposed fuzzy logic model are as follows: (1) it is in accordance with the conditions under which a fuzzy logic model and a radial basis mapping model are equivalent to obtain a new scheme, (2) it uses a combination of the descending gradient and the mini-lots approach to avoid applying the descending gradient to all data.


Introduction
The availability of energy is strongly related to quality of life and wellness in humans and is also a sign of economic growth. The availability of hourly electrical power is in demand, which is one of the clearest indicators of development. Currently, 70% of the total hourly electrical power demand is produced by fossil fuels. This indicates that the relationship between electrical producing and consuming is extremely important. More recently, the hourly electrical power demand has been changing rapidly. The issue of hourly electrical power demand modeling has been addressed with different approaches. This has led the companies involved in this service to look for other approaches in order to obtain hourly electrical power demand modeling.
In the last decade, cities have experienced a significant growth in the total hourly electrical power demand. As the needs of hourly electrical power demand grow, the complexity of the plant grows. There are many factors that influence the hourly electrical power demand. In this scenario, modeling approaches need more precision.
Hourly electrical power demand modeling relies not only on the availability of primary fuels, but also in the following economic technical factors:

•
Knowing the behavior of financial expenses for fuel acquisition in the hourly electrical power demand. • Anticipating changes in electrical networks, substations, and transmission lines.
• Applying new measures for saving.
On a technical level, the behavior of growth or decrease in the hourly electrical power demand, also referred to as hourly electrical power demand modeling, makes it possible to achieve the maximum hourly electrical power demand in the best possible economic conditions. The modeling of events requires a meticulous study of past events as well as their relationships, and from this, trying to extrapolate an actual event.
There are some approaches used in various applications. In References [1][2][3], the approaches are for system controls. In References [4][5][6], the approaches are for plant modeling. In References [7][8][9], the approaches are for parameter optimization. In References [10][11][12], the approaches are for prediction. In References [13][14][15], the approaches are for classification. In [16][17][18], the approaches are for recognition. Since these approaches use modeling in various applications, this modeling could also be applied to the behavior of the hourly electrical power demand.
Some approaches are also used for hourly electrical power demand modeling. In References [19][20][21], the authors used recurrent neural models. In References [22][23][24][25], the authors used deep neural models. In References [26][27][28][29], the authors compared neural and fuzzy logic models. In References [30][31][32], the authors used fuzzy logic models. In References [33][34][35][36], the authors used neural models. Since these approaches do not frequently use the fuzzy logic models for hourly electrical power demand modeling, any contribution with regard to this subject is welcome by the scientific community.
The issue that exists when considering hourly electrical power demand modeling is that this type of plant has a large amount of data. This indicates that the approach that is employed for the modeling of plants with a large amount of data may require a high computational cost. With this in mind, an approach capable of modeling a large amount of data is required.
In this article, a fuzzy logic model is proposed for a more precise hourly electrical power demand model using the data provided by the International Organization for Standardization (ISO) from New England between2002 to 2006. While the data provided are old, this plant has a large amount of data.
In order to obtain a more precise model of plants with a large amount of data, the main characteristics of the proposed fuzzy logic model are as follows: (1) it is in accordance with the conditions under which a fuzzy logic model and a radial basis mapping model are equivalent to propose a new scheme which uses training and generalization, (2) it uses a combination of the descending gradient and the mini-lots approach to apply the descending gradient to a small subset of the training dataset where the subset is called mini-lot and the set is called lot.
The organization of this article is as follows. In Section 2, the fuzzy logic model, the descending gradient, and the mini-lots approach are detailed. In Section 3, the fuzzy logic model and the neural model are compared for a more precise hourly electrical power demand model. In Section 4, the conclusion, implications, and future research are detailed.

Fuzzy Logic Model Approach
The proposed fuzzy logic model is in accordance with the conditions under which a fuzzy logic model and a radial basis mapping model are equivalent to obtain a new scheme where the mentioned conditions are summarized as follows [37]:

•
Both the fuzzy logic model referred to in this document and the radial basis mapping model use the same aggregation method (namely, either weighted average or weighted sum) to derive their overall outputs.

•
The rules number in the fuzzy logic model is equal to the unit number in the radial basis mapping model.

•
Each membership mapping of the fuzzy rule antecedent in the fuzzy logic model is equal to each radial basis mapping of the radial basis mapping model. One way to achieve this is to use Gaussian membership mappings with the same variance as in the fuzzy rule and to apply additions to calculate the firing strength.
• They should have the same constant terms (for the zero-order fuzzy logic model and original radial basis mapping model) or linear equations (for the first order fuzzy logic model and extended radial basis mapping model).
In order to obtain a precise model with the fuzzy logic model, the data must be highly variant and the training and generalization must be used. Both the training, as represented by the adjustment of terms, and the generalization of the resulting model are related; neither works well without the other being correctly executed.
In the training, the fuzzy logic model calculates its terms in relation to a plant at each time to obtain a result which is compared with the actual value of the plant; the fuzzy logic model's terms are then adjusted to try to reduce the error. Through the initialization of terms, the fuzzy logic model has a point in which to start adapting the terms. The training takes place over time until the terms stabilize and the error criterion converges to a minimum value.
The basic approach to estimate the modeling efficiency of the fuzzy logic model is to measure the error made on a new training dataset, also called generalization data. This approach consists of working only one set of data and reserving a percentage of said data (around 20%) to check the generalization of the modeling once it had been trained.
The schema of the fuzzy logic model employed in this article is shown in Figure 1. The fuzzy logic model is is the output of the rules part, and z 3 = h(x) is the output of the fuzzy logic model.
The Gaussian membership mapping is z 2 is the input, c is the center, and σ is the width. For the training of the fuzzy logic model by means of the descending gradient, the next methodology is implemented: (1) Terms are initialized randomly.
(2) Forward propagation is implemented to obtain h(x).
(3) The value of the cost J(θ 1 , θ 2 ) is obtained. (4) Backward propagation is implemented by using the descending gradient and the mini-lots approach described in the following two subsections. (5) The descending gradient is employed to optimize the terms (θ 1 , θ 2 ).
The next two approaches of the fuzzy logic model described in the following two subsections are intended to deal with a large amount of data.

Descending Gradient
The fuzzy logic model is fed by the training data. The terms are then initialized and forward propagation is implemented using the Gaussian membership mapping in the rules part to obtain the model, which is compared to the plant output. The terms are then optimized using the descending gradient until the error converges to a minimum [38,39].
The descending gradient is employed, and the cost is y is the plant output, m is the number of rules, and the error e is In the backward propagation for the output part, The gradient is negative, and taking into account a constant learning factor α, the tune of the terms in the output part is In the backward propagation for the rules part, The gradient is negative, and taking into account a constant factor α, the tune of the terms in the rules part is

Descending Gradient with Mini-Lots
One of the most frequently used approaches to adjust the fuzzy logic model is the descending gradient with mini-lots, which is a modification of the descending gradient. The main characteristic of this approach is that the descending gradient is applied to a relatively small subset of the training dataset; the subset is called a mini-lot, and the set is called a lot. The training dataset is divided into mini-lots, and all mini-lots are traversed by tuning the terms in each mini-lot. A tour of all mini-lots corresponds to an epoch [40,41].
Employ a training dataset with m data and u characteristics, Y m = [y 1 , y 2 , y 3 , . . . , y m ] Often, this type of modeling cannot find the global minimum due to the complexity in the cost (see Figure 2), and consequently, it is trapped in a regional minimum. To address this issue, the descending gradient with mini-lots was employed. This type of optimizer divided the training dataset into small lots in order to avoid being trapped in a regional minimum and to achieve the global minimum.
The approach of the descending gradient with mini-lots was expressed (we randomly separated the training data into p mini-lots of size n) as follows: (1) For each epoch.
(2) Calculate the gradient on each of the mini-lots 1, 2, . . . , p (3) α is the constant factor which is chosen with a value between 0 and 1, and y is the plant output. (4) Repeat for the next epoch.
The properties of the descending gradient with mini-lots are: • It is not necessaryto use all the data to find a good direction of descent. A small number of mini-lots may be enough for agood model.

•
Calculating the descending gradient using the entire training dataset is computationally inefficient.

Simulations
In this section, the neural model of [33][34][35][36] was compared to the fuzzy logic model of this article for the hourly electrical power demand model. Accurate hourly electrical power demand modeling is critical for effective operations and planning in order to maximize profits. The hourly electrical power demand influences a series of decisions, including the period in which the generators should be used, wholesale prices, and market prices.
The training dataset was a table with a record of hourly electricity demands and temperature observations from the International Organization for Standardization (ISO) for New England between2002 to 2006. There are other more recent training data from other places, but these training data were selected because they offer the largest amount of consecutive data [42]. The data were measured during the first half of each year. The information included the temperature of the dry bulb and the dew point.
For the hourly electrical power demand model, 8 characteristics were taken into account in order to train the fuzzy logic model: We used the demand of the same day as the output. With the7000 training dataset, the fuzzy logic model was trained to model the hourly electrical power demand. Since the fuzzy logic model had been trained, the behavior was checked, sothe 1000 generalization dataset was used for each characteristic. Table 1 shows the numerical values for the 8 inputs with training data and 1 output with training data, where count is the number of training data, mean is the mean of the training data, std is the standard deviation of the training data, min is the minimal value of the training data, max is the maximum value of the training data, BulbT(Â • F) is the temperature of the dry bulb, dewPoint(Â • F) is the dew point, Weekend is the mark indicating if this is free or a weekend day, PaverageLoad in MWh is the average load of the past day, LoadPreviousD in MWh is the load of the same hour in the past day, LoadPreviousW in MWh is the load of the same hour and day in the past week, and ActualLoad in MWh is the load of the same hour and day in the current week. The fuzzy logic model had3parts:1input part,1 rules part, and1 output part. The input part had8 terms, the rules part had3 rules, and the output part had1 term. Remark 1. The number of rules in the rules part, the constant factor α, the width σ, the center c, and the number of training data for each mini-lot were chosen by trial and error such that good modeling was obtained from the fuzzy logic model.

The Fuzzy Logic Model
The modeling of the fuzzy logic model was done using the next tune of the terms: The fuzzy logic model was trained with a constant factor of α = 0.9, the width was σ = rand, the center is c = rand. rand was a random number between0to1.
This type of optimizer divided the training dataset into small lots in order to avoid being trapped in a regional minimum so that it could achieve the global minimum or a value very close to it. For its implementation,8 mini-lots were selected and each mini-lot of2000 training dataset was selected. The remaining training dataset can be expressed in this way: The next results wereobtained.

The Comparison Results
Modeling occurs from time to time until the terms stabilize and the error criterion converges to some minimum value. The basic approach to obtain efficiency of the fuzzy logic model was to create new tuning with the trained terms and to measure the error made on a new training dataset (generalization data). The approach consisted of working only one set of data and reserving a percentage of said data to check the generalization of the plant once it had been trained.The 7000 dataset was used for the training andthe 1000 training dataset was used for the generalization.
The cost is employed for comparison. The cost J is defined in (3). It is transcendent to know that the result of the cost J with a value closer to0 is desired, which yieldsa greater adjustment of the modeling to the output. It is important to note that the cost J defined in (3) contains and is directly proportional to the error e defined in (4). Consequently, the closer to 0in the cost J yields, the closer to 0in the error e which yields a greater adjustment of the modeling to the output.
The results of the neural model of [33][34][35][36] against the fuzzy logic model of this article for hourly electrical power demand modeling are shown in Figures 3 and 4 for modeling comparisons, in Figures 5 and 6 and Table 2 Table 3 for the cost comparisons during the training and generalization of the second training dataset. From the Figures 3, 4, 7 and 8 it can be seen that the fuzzy logic model is more precise than the neural model for hourly electrical power demand modeling due to the fact that the advised approach obtains a model closer to the plant. From Figures 5, 6, 9 and 10 as well as Tables 2 and 3, it is evident that the fuzzy logic model of this article is more precise than the neural model for hourly electrical power demand modeling due to the fact that the advised approach contains a smaller cost value.

Conclusions
In this article, the hourly electrical power demand model is established. Hourly electrical power demand modeling is used to save electricity as a renewable energy approach, thus a fuzzy logic model which uses the scheme of the radial basis mapping model and the descending gradient with mini-lots is proposed. This fuzzy logic model was compared to a neural model. The results of the analysis indicated that the former approach is more precise due to the fact that its modeling was closer to that of the real plant and that it offered a smaller cost value. The policy implication is with regard to the public availability of the data; this data is not publicly available in the country where it was researched, while in other countries the data is public. For future research, an alternative approach to the fuzzy logic model should be analyzed to seek and to improve the aforementioned results. The proposed approach can be applied in the modeling of robotic or mechatronic plants.