Fuzzy Logic and Linear Programming-Based Power Grid-Enhanced Economical Dispatch for Sustainable and Stable Grid Operation in Eastern Mexico

: Sustainable, stable, and cost-optimized operation of power grids must be the main objec-tives of power grid operators and electric utilities. The energy transition towards a preponderant green energy economy requires innovative solutions to enhance the power grid economic dispatches looking for a better allocation of the energy demand among the diverse renewable and fossil fuel energy plants. Green renewable energy systems must be preferred over fossil fuel generators when they are available. However, fossil plants are still required to be kept operational due to the variability and uncertainty of renewable energy plants. This study proposes a hybrid rational economic dispatch model that combines a cost minimization linear model enhanced with a fuzzy logic system for decision-making on wind and hydropower minimum and maximum generation levels. The model considers the intermittency of wind energy and recognizes the strategic value of hydropower as energy storage. The results of the model with real data taken from wind, hydroelectric, geothermal, nuclear, bioenergy, and fossil fuel power plants in the eastern region of Mexico show that a fairer, rational, and cost-optimized power grid economic dispatch can be achieved with the proposed approach.


Introduction
Achieving net-zero emissions goals requires decarbonizing the electricity generation system with the greater participation of clean and renewable energy sources while maintaining its reliability, economics, and efficiency [1,2]. However, one of the main barriers that slows down a greater penetration of renewable energies is their high variability and intermittency, putting at risk the reliability and security of the electricity grid [3]. Furthermore, the high variability and uncertainty of renewables cause the need to have costly energy storage systems or fossil fuel plants as backup systems, with the associated high costs. In addition, it creates a tremendous operational challenge because constant energy generators must be frequently adjusted to match the demand and the dynamic variation of renewables [4]. Therefore, this work aims to develop a new management model for electricity generation networks that maximize the participation of renewables but in a context that protects the operational response of baseload plants and ensures the reliability and cost-effectiveness of the power system.
The objective of the electric utility or grid operator is to minimize the total generation cost of meeting the electricity demand. Economic dispatch (ED) is how the utility operator selects which of its generators will be used to meet electricity demand [5]. With the proliferation of renewable energies and the interest in increasing their use due to sustainability goals,

Modeling of Wind Energy Plants
The modeling approach for the energy output of a WPP is based on a fuzzy logic description, as shown in Figure 2. The starting point is to consider a wind power plant i = 1 and assume that its operation depends on the average wind speed measured in the current period step and the forecast for the next step for which the wind power generation participation is estimated (see Figure 2a). With this rule, even if the wind speed forecast is favorable but has high intermittency in the present step, its power generation is limited in the next step. This is a strategy to penalize its variability. The wind plant can access a In contrast, for the set of intermittent and uncertain power sources, an FL scheme is proposed to have intermediate values of the output energy generation of each plant between two states. The purpose is to limit the participation of renewables based on the variability and intermittency they have accumulated in the current step and the forecast availability for the next step. In this way, the aim is to qualify their intermittency. Once the parameters of each plant that form the network were defined, the equations describing the energy system were established, which are the input data for the economic dispatch model. Finally, the conditions to achieve the minimization of costs of the complete system were obtained.

Modeling of Wind Energy Plants
The modeling approach for the energy output of a WPP is based on a fuzzy logic description, as shown in Figure 2. The starting point is to consider a wind power plant i = 1 and assume that its operation depends on the average wind speed measured in the current period step and the forecast for the next step for which the wind power generation participation is estimated (see Figure 2a). With this rule, even if the wind speed forecast is favorable but has high intermittency in the present step, its power generation is limited in the next step. This is a strategy to penalize its variability. The wind plant can access a higher power generation level if the forecast is favorable and its availability is adequate in the current step. Stage 1. Due to the dynamic nature of the wind and the range of speeds in which it oscillates, linguistic variables associated with sub-ranges are established for the current measured wind velocity (see Table 1). This process of generating subsets is called fuzzifica- tion. A similar procedure is performed concerning the forecast wind availability estimated with a probability function. From these estimations, another subset of possible velocity ranges is generated. The wind forecast for the day is established through the Weibull probability function [29].
Stage 2. The next step is to establish the inference rules for the fuzzy system, which are a group of rules between both sets. Stage 3. The last step of the process is called defuzzification and consists essentially of giving a numerical value to the resulting membership function. This generates two characteristic output system parameters: the maximum and minimum generation energies (E wmax and E wmin , respectively). The whole FL process described above is applied to each wind plant that makes up the system (i = 1, 2, 3 . . . n).
higher power generation level if the forecast is favorable and its availability is adequate in the current step. Stage 1. Due to the dynamic nature of the wind and the range of speeds in which it oscillates, linguistic variables associated with sub-ranges are established for the current measured wind velocity (see Table 1). This process of generating subsets is called fuzzification. A similar procedure is performed concerning the forecast wind availability estimated with a probability function. From these estimations, another subset of possible velocity ranges is generated. The wind forecast for the day is established through the Weibull probability function [29].
Stage 2. The next step is to establish the inference rules for the fuzzy system, which are a group of rules between both sets. Stage 3. The last step of the process is called defuzzification and consists essentially of giving a numerical value to the resulting membership function. This generates two characteristic output system parameters: the maximum and minimum generation energies (Ewmax and Ewmin, respectively). The whole FL process described above is applied to each wind plant that makes up the system (i = 1, 2, 3…n).    The wind speed range in which the plants operate was obtained, as shown in Table 1 [30], and they were regrouped in terms of linguistic variables, defined in Table 2, to carry out the fuzzification process of Stage 1.
The indicated linguistic variables generate the membership functions scaled in a range of 0-1 [31]; the input values of the current wind speed and wind speed forecast for each wind power plant are shown in Table S1 of the Supplementary Materials. Figure 3 shows the membership functions of the fuzzy sets of the wind speed for the values in Table 2. The wind speed range in which the plants operate was obtained, as shown in Table  1 [30], and they were regrouped in terms of linguistic variables, defined in Table 2, to carry out the fuzzification process of Stage 1.
The indicated linguistic variables generate the membership functions scaled in a range of 0-1 [31]; the input values of the current wind speed and wind speed forecast for each wind power plant are shown in Table S1 of the Supplementary Materials. Figure 3 shows the membership functions of the fuzzy sets of the wind speed for the values in Table 2.  Then, a group of inference rules characterizes the performance of the fuzzy system. (Stage 2). The rules defined for the wind system are set out in Figure 4.  Then, a group of inference rules characterizes the performance of the fuzzy system. (Stage 2). The rules defined for the wind system are set out in Figure 4. The wind speed range in which the plants operate was obtained, as shown in Table  1 [30], and they were regrouped in terms of linguistic variables, defined in Table 2, to carry out the fuzzification process of Stage 1.
The indicated linguistic variables generate the membership functions scaled in a range of 0-1 [31]; the input values of the current wind speed and wind speed forecast for each wind power plant are shown in Table S1 of the Supplementary Materials. Figure 3 shows the membership functions of the fuzzy sets of the wind speed for the values in Table 2.  Then, a group of inference rules characterizes the performance of the fuzzy system. (Stage 2). The rules defined for the wind system are set out in Figure 4.  Subsequently, the inference process of the fuzzy logic methodology is responsible for calculating the result obtained from the input values using the membership functions described in Figure 5. This defuzzification process generates the minimum and maximum energy of each plant, shown in Figure 5   Subsequently, the inference process of the fuzzy logic methodology is responsible for calculating the result obtained from the input values using the membership functions described in Figure 5. This defuzzification process generates the minimum and maximum energy of each plant, shown in Figure 5

Modeling of Hydraulic Power Plants
The process described above applies similarly to hydraulic power plants. HPPs also have a variable operation defined by the height levels or volume of water within the dam (see Figure 2b). Additionally, recognizing its strategic value as a storage energy system, a water storage capacity of 60% was fixed, so that if the dam is below this fill level, the power production stops. The height up to this value was one of the variables that makes up the input fuzzy system. The other parameter was the sum of the maximum energy contributions of each wind power plant mentioned above (see Figure 2b). The objective is that if the production of renewable sources-wind power, in this case-is low, and water levels are high, the generation of hydropower can be increased, performing as a backup system. This creates a synergy between the renewables and hydropower to ensure a more significant proportion of clean energy in the generation matrix.
The level or volume of water in the dam is one of the input variables to the hydroelectric fuzzy system, as shown in Figure 2b. For our case study, the height of the water was assumed from real data obtained by [32], and the possible water level values for each hydropower plant were related to linguistic variables through ranges, as shown in Table 3. Table 3. Fuzzification of water height.

Fuzzification
Water Height (m) These values were used to establish the membership functions for one hydroelectric power plant, as shown in Figure 6.
It is important to note that the membership ranges are different according to the particular elevation characteristics of each HPP established. These input parameters of hydro plants are found in Table S3 of the Supplementary Materials. In the present work, HPPs were assumed as support and energy storage systems for renewables. We propose

Modeling of Hydraulic Power Plants
The process described above applies similarly to hydraulic power plants. HPPs also have a variable operation defined by the height levels or volume of water within the dam (see Figure 2b). Additionally, recognizing its strategic value as a storage energy system, a water storage capacity of 60% was fixed, so that if the dam is below this fill level, the power production stops. The height up to this value was one of the variables that makes up the input fuzzy system. The other parameter was the sum of the maximum energy contributions of each wind power plant mentioned above (see Figure 2b). The objective is that if the production of renewable sources-wind power, in this case-is low, and water levels are high, the generation of hydropower can be increased, performing as a backup system. This creates a synergy between the renewables and hydropower to ensure a more significant proportion of clean energy in the generation matrix.
The level or volume of water in the dam is one of the input variables to the hydroelectric fuzzy system, as shown in Figure 2b. For our case study, the height of the water was assumed from real data obtained by [32], and the possible water level values for each hydropower plant were related to linguistic variables through ranges, as shown in Table 3. Table 3. Fuzzification of water height.

Fuzzification
Water Height (m) These values were used to establish the membership functions for one hydroelectric power plant, as shown in Figure 6.
It is important to note that the membership ranges are different according to the particular elevation characteristics of each HPP established. These input parameters of hydro plants are found in Table S3 of the Supplementary Materials. In the present work, HPPs were assumed as support and energy storage systems for renewables. We propose that in regions where water resources are abundant, as in the case of eastern Mexico, hydropower should be managed as a storage source. Therefore, in the fuzzy logic model for HPPs, the power generation is a function of two parameters: (a) the water level in the dam and (b) the total contribution of the wind power plants. This means that if the energy production of the WPPs is low, the model will seek to increase the hydro output to compensate for the drop in renewables; see Figure 2b. The membership functions of the wind input variable are shown in Figure 7.
that in regions where water resources are abundant, as in the case of eastern Mexico, hydropower should be managed as a storage source. Therefore, in the fuzzy logic model for HPPs, the power generation is a function of two parameters: (a) the water level in the dam and (b) the total contribution of the wind power plants. This means that if the energy production of the WPPs is low, the model will seek to increase the hydro output to compensate for the drop in renewables; see Figure 2b. The membership functions of the wind input variable are shown in Figure 7.  Using the input variables, the rules of the hydropower fuzzy system described in Figure 8 were established.
Finally, the inference rules generated the values of maximum and minimum energy produced by HPPs, as shown in Figure 9; these obtained values are found in Table S4 of  the Supplementary Materials. As can be seen, both fuzzy systems are coupled, establishing the characteristic parameters of the different wind and hydropower plants under study. These ranges of maximum and minimum energy for each type of plant are necessary as input data to the economic dispatch model, which is in charge of searching for optimized system conditions (see Figure 2). that in regions where water resources are abundant, as in the case of eastern Mexico, hydropower should be managed as a storage source. Therefore, in the fuzzy logic model for HPPs, the power generation is a function of two parameters: (a) the water level in the dam and (b) the total contribution of the wind power plants. This means that if the energy production of the WPPs is low, the model will seek to increase the hydro output to compensate for the drop in renewables; see Figure 2b. The membership functions of the wind input variable are shown in Figure 7.  Using the input variables, the rules of the hydropower fuzzy system described in Figure 8 were established.
Finally, the inference rules generated the values of maximum and minimum energy produced by HPPs, as shown in Figure 9; these obtained values are found in Table S4 of  the Supplementary Materials. As can be seen, both fuzzy systems are coupled, establishing the characteristic parameters of the different wind and hydropower plants under study. These ranges of maximum and minimum energy for each type of plant are necessary as input data to the economic dispatch model, which is in charge of searching for optimized system conditions (see Figure 2). Using the input variables, the rules of the hydropower fuzzy system described in Figure 8 were established.
Finally, the inference rules generated the values of maximum and minimum energy produced by HPPs, as shown in Figure 9; these obtained values are found in Table S4 of the  Supplementary Materials. As can be seen, both fuzzy systems are coupled, establishing the characteristic parameters of the different wind and hydropower plants under study. These ranges of maximum and minimum energy for each type of plant are necessary as input data to the economic dispatch model, which is in charge of searching for optimized system conditions (see Figure 2).

Economic Dispatch
The ED was implemented in this work through a linear programming model, a detailed description of the model is already reported elsewhere [29]. The analytical model of economic dispatch is formulated as follows.
The electric generation network is integrated by j = 1, 2, 3, … J plants, each with its own particular characteristics, where J is the total number of generation plants in the system, and each j works under the maximum and minimum limits given by the following: where is the power generated by each plant j; , are the minimum and maximum powers of each plant, and is a binary variable indicating when the plant is working. The power generated by each plant must satisfy the demand D requested by the electrical distribution network; therefore, = In addition, demand fulfillment generates costs for each plant, whose total cost of generation is called R. Thus, the cost function R is expressed as follows: where Aj indicates the fixed cost of the plant, Bj is the variable cost of production, pj is the plant production, Mj is the cost of stopping each plant, and zj is a binary shutdown

Economic Dispatch
The ED was implemented in this work through a linear programming model, a detailed description of the model is already reported elsewhere [29]. The analytical model of economic dispatch is formulated as follows.
The electric generation network is integrated by j = 1, 2, 3, . . . J plants, each with its own particular characteristics, where J is the total number of generation plants in the system, and each j works under the maximum and minimum limits given by the following: where P j is the power generated by each plant j; Pmin j , Pmax j are the minimum and maximum powers of each plant, and v j is a binary variable indicating when the plant is working. The power generated by each plant must satisfy the demand D requested by the electrical distribution network; therefore, In addition, demand fulfillment generates costs for each plant, whose total cost of generation is called R. Thus, the cost function R is expressed as follows: where A j indicates the fixed cost of the plant, B j is the variable cost of production, pj is the plant production, M j is the cost of stopping each plant, and z j is a binary shutdown variable. For the scheduling of plants by periods, three parameters must be considered for planning: (a) the starting plant; (b) the stopping plant; (c) the allocation of energy to be generated. Furthermore, these three parameters must satisfy the demand in each time cycle.
In such a case, the planning horizons are divided into a day by k time cycles and meeting k = 1,2, . . . , K, where K is the total number of cycles established for the study. Based on the above, the objective function cost minimization R is now rewritten at all time intervals as follows: where the sum of all plant costs in each of the periods is represented. The first term of Equation (4) incorporates the fixed cost A j and the variable cost Bj of each generation plant, which are based on the generation carried out, with these multiplied by the energy Ejk to be generated in each generation plant j in period k. The term Cj indicates the startup cost of a plant that is incurred at the time the plant is started up. Finally, the equation incorporates the cost M j , generated when a plant is off. Thus, each of the costs described is set according to the binary state parameters of activation or shutdown, called v jk , y jk , and z jk , respectively. The constraints established to satisfy the different energy demands while optimizing the use of the available resources and minimizing the total generation cost are outlined in Equations (4)- (12). Therefore, each plant cannot generate more or less energy than its operating limits (Equations (5) and (6)). The change in the generation between periods cannot rise or fall above the maximum ramps up or down for each plant (Equations (7) and (8)). Binary variables allow for establishing when a plant is in operation in the previous period, and in the following period, it cannot start up because it was already started up (Equation (9)). In addition, it cannot be in operation and turned off at the same time, as shown in Equation (10), the state logic of Equation (11) shows the behavior of the binary variables of operation, start, and stop. The model satisfies the demands established in the different periods due to Equation (12). The model equations are presented as follows [29]: Minimum energy: Maximum energy: Maximum load rise ramp: Maximum load descent ramp: On/Stop: v jk + z jk = 1 (10) Demand: The parameters of each plant, such as maximum energy (E max,j ), minimum energy (E min,j ), variable costs B j , fixed costs A j , startup costs C j , and shutdown costs (M j ), are presented in Table S5 of the Supplementary Materials.

Case of Study: Eastern Mexico Zone
The case study was located in Mexico, where the energy distribution system is formed by nine zones [33], as shown in Figure 10. In particular, the interest in applying the hybrid economic dispatch model was focused on the eastern zone, which has 110 generation plants and a significant and diverse mix of generation technologies. It is worth mentioning that the zone has a remarkable importance because it represents 22% of the total national demand [33] and contributes to adjacent zones. To simplify the analysis of the proposed model, a significant sample of 17 of the 110 plants installed in the eastern zone was selected. Figure 10 shows the geographic distribution of the sample.
Additionally, Figure 11 describes the distribution of installed power according to the type of technology located in the eastern zone and the study sample of the 17 plants considered. Let us note that the selected sample is representative.

Case of Study: Eastern Mexico Zone
The case study was located in Mexico, where the energy distribution system is formed by nine zones [33], as shown in Figure 10. In particular, the interest in applying the hybrid economic dispatch model was focused on the eastern zone, which has 110 generation plants and a significant and diverse mix of generation technologies. It is worth mentioning that the zone has a remarkable importance because it represents 22% of the total national demand [33] and contributes to adjacent zones. To simplify the analysis of the proposed model, a significant sample of 17 of the 110 plants installed in the eastern zone was selected. Figure 10 shows the geographic distribution of the sample. Additionally, Figure 11 describes the distribution of installed power according to the type of technology located in the eastern zone and the study sample of the 17 plants considered. Let us note that the selected sample is representative.
Finally, for comparative purposes to evaluate the model's performance under annual dynamic conditions, such as demand variation, wind resource availability, and water levels; four days were arbitrarily chosen, one for each of the four seasons. Figure 12 shows the variation of demand (MW) as a function of the time of day for four days selected. As can be seen, the demand tended to decrease during the first hours of the day, from 12:00 to 6:00 a.m. It then began to increase during the course of the day until it reached a maximum in the evening from 6:00 p.m. to 12:00 a.m. It can also be observed that the demand was lower on the winter day than on the summer and autumn days. The bar chart represents the demand   Finally, for comparative purposes to evaluate the model's performance under annual dynamic conditions, such as demand variation, wind resource availability, and water levels; four days were arbitrarily chosen, one for each of the four seasons. Figure 12 shows the variation of demand (MW) as a function of the time of day for four days selected. As can be seen, the demand tended to decrease during the first hours of the day, from 12:00 to 6:00 a.m. It then began to increase during the course of the day until it reached a maximum in the evening from 6:00 p.m. to 12:00 a.m. It can also be observed that the demand was lower on the winter day than on the summer and autumn days. The bar chart represents the demand transformation into consumption (MWh) in 6-h time periods (1 period). These values are the input data for the model. It must find the most optimal generation matrix to satisfy the demand considering the availability of wind and hydro resources. Hydropower is used as a backup source to compensate for the variability of wind power. The ED optimization considers the fixed and variable costs and the plants' ramp-up and -down costs, established in Equation (4), and subject to the restrictions of Equations (5)- (12) implemented in Matlab ® through the mixed-integer linear programming function intlinprog to obtain the results.

Electricity Generation Matrix
The optimization model results for the eastern region of Mexico can be seen in Figure 13, which shows the electrical generation matrix by technology for the four periods on four different days of the year. The innermost ring represents the first period, which corresponds to 12:00 a.m. to 6:00 a.m., while the last period, from 6:00 p.m. to 12:00 a.m., is the outermost ring. Figure 13 shows the generation matrix of (a) a winter day (15 January), where electricity generation during the first period was 18, 695.6 MWh, and the source with the highest percentage of generation was hydropower with 57.7%. The next most significant source was the gas combined cycle, with 30%. The rest of Period 1's consumption was supplied by wind power, at 12.4%. As the day went on, the demand increased in Periods 2, 3, and 4, Figure 12. Generation increased from 20.38 GWh in Period 2 to 22.93 GWh in Period 4, as shown in Table 4. Hydropower participation increased by 61.2%, 63.8%, and 65.5%, respectively. The increase in hydropower generation was due to higher demand and the physical limitations of the installed capacity of the combined cycle and wind power. (b) For the spring day (15 April), there was an increase in consumption of 7% compared to 15 January, from 83.9 GWh to 89.8 GWh. The consumption increment in the first two periods of the day was supplied by incorporating cogeneration (6.7%) and steam turbines (2.5%); together they accounted for 9.2% (1.93 GWh) of the 21 GWh required in Period 1, meaning an average increase in demand of 322 MW. However, as can be seen in Figure 12, the demand and consumption increased even more for the last two periods of the day, so greater participation of steam thermoelectrics was needed, and the startup of small geothermal, combustion engine, and bioenergy plants was also required. (c) The summer day (15 June) was the day with the highest consumption of all four days. For Period 1, the consumption reached almost 23 GWh, but in contrast, the participation of hydro and wind power was reduced. This generated a larger energy deficit, which was solved with the startup of the nuclear plant. It is important to note that although nuclear energy has lower costs than steam thermoelectric power due to its size (1510 MW), it is not recommended to enter into operation when the energy deficit is small. Generation was mainly defined by hydropower, nuclear, combined cycle, cogeneration, and wind. These maintained approximately stable production throughout the day. However, there was a slight difference in Period 4; consumption increased to 24.85 GWh, and the energy deficit was covered by a greater share of cogeneration, from 6.2% in the first period to 8.6% in the last. (d) On the fall day (15 October), hydropower had the lowest participation of the four days. The low output of the hydro plants, below 47.8% in Period 1, led to the higher participation of nuclear generation. Although the consumption between 15 April (21 GWh) and 15 October (21.95 GWh) was close, the high deficit caused by the reduction in hydropower gave rise to the startup of the operation of nuclear energy. The highest consumption in the four days analyzed was present in the last period of the fall day, at 25.08 GWh; therefore, a greater participation of the nuclear plant and the entry into operation of the geothermal power plant are required. As can be seen from these results, the dispatch model takes into account the fixed and variable costs of the different plants and considers the changes in demand, the size of each plant, and the startup and shutdown costs.     Table 4 summarizes the electricity generated in each period for the four different season days and the total generation for each day. The energy generated by each plant during the four periods for the four days of the study is reported in Tables S6-S9 of the Supplementary Materials.
The high participation of hydropower plants in the electricity matrix of eastern Mexico is due to the particular conditions of the study area, which has the highest concentration of hydroelectric install capacity in Mexico due to the abundant rainfall in the region.

Electricity Cost by Plant
Each of the 17 plants has a cost, regardless of whether it is in operation or remains out of operation. The variable costs of plants that require fuel increase as their energy production increases. All plants have fixed costs. Figure 14 shows the results of the costs of each of the 17 plants during Period 4. The bar graph represents the electricity generated by each plant and the red dots represent the cost of the plant in USD during the period. (a) As can be seen, the energy generated on 15 January was mostly from combined cycle and hydropower plants, representing the highest costs of approximately USD 800,000 and USD 200,000, respectively, during the period. However, if we calculate the cost per unit in USD per megawatt hour, the average cost for CC was USD 71.5/MWh and USD 72.9/MWh for hydro. The lowest-cost technology was wind power, at USD 67.6/MWh. (b) On the spring day (15 April), the demand was higher, and the production of the hydroelectric plants was lower. Therefore, this energy deficiency was covered by steam turbine, combustion engine, and geothermal production. As can be seen, hydro was the most expensive technology during the period, exceeding USD 500,000. However, the most costly plant per unit was a steam turbine at USD 108/MWh. (c) On the summer day, 15 June, the consumption was the highest at 92.8 GWh. Hydro, combined cycle, nuclear, and wind power production were the main generators. The most costly plant of the period was the hydroelectric plant III, with a total cost of USD 415,000. However, in terms of the cost per unit, the most expensive were combustion engine, geothermal, and nuclear production, with USD 144, 97, and 91.6 per megawatt hour. In addition, it should be clarified that the geothermal and combustion production were minimal. (d) The autumn day was very similar to the summer day. The highest cost was hydro III at USD 400,000. The total costs and total energy generated by each plant during the four periods for the four days of the study are reported in Tables S6-S9 of the  Supplementary Materials. Although the unit costs per technology are different, the optimization model helps us choose the cheapest technology according to the demand variation. The most critical cost parameter is the average cost per unit of energy in each period. In Figure 15, the unit cost per period is illustrated. This value was obtained by dividing all the energy produced during the period by the sum of the costs of all the plants, whether or not they were in operation. This gave an average price of the energy generated. As can be seen in the figure, the lowest costs were achieved on the winter day (15 January). There was low demand, which could be supplied with the installed capacity of the cheapest technologies-wind, combined cycle, and hydro. In the first period of the different days, the cost per unit was lower on the spring day than on the summer and autumn days. However, the demand increased in the last period of the day. Meanwhile, in summer, it was supplied with an increase in hydropower generation, allowing for keeping the unit cost stable; for the spring and autumn days, the hydro could not increase. Therefore, the energy deficit had to be supplied with more expensive technologies, such as nuclear and steam turbines.

Discussion
Sustainable energy policies have established that green energies must be preferred over fossil fuel generators when they are available, but fossil plants are still required to be kept operational due to the intermittence of wind, solar, hydroelectric, and other

Discussion
Sustainable energy policies have established that green energies must be preferred over fossil fuel generators when they are available, but fossil plants are still required to be kept operational due to the intermittence of wind, solar, hydroelectric, and other renewable energy plants. In the presented enhanced economic dispatch, the operational levels for the wind generation plants are selected by a fuzzy inference system with combined inputs of actual wind and the short-term wind forecast. The total amount of energy contribution by all of the wind generators is put into another fuzzy inference system that also considers the actual volume of each hydroelectric generator to define the minimum and maximum power generation levels of the individual hydroelectric plant. The main results of the proposed approach are the following:

•
The intermittence of the wind generator is compensated for with the hydroelectric plants as long as they have enough capacity. In this way, the energy storage capacity of the hydroelectric plants is used to supply the energy generated by renewable energy sources.

•
The remaining energy generation capacity to supply the total energy demand is distributed among the fossil fuel plants. This implies that some energy is generated by the thermoelectric plants to keep them operational and profitable.

•
Once a fuzzy logic adjustment has been made to wind power based on its intermittency and a minimum reserve level of hydroelectric power is ensured, the model tries to satisfy the current demand with the cheapest technologies, taking into account the costs of turning a plant on and off. The increase in demand on a spring day is supplied with a gas turbine thermoelectric plant, which has a higher unit cost than nuclear. However, it is feasible to turn on the nuclear plant for the summer and autumn days when the consumption levels are higher.
The proposed enhanced economical dispatch implies better power grid stability and fair allocation of the energy demand among the diverse renewable energy and fossil fuel plants.

Conclusions
Economic dispatch (ED) implies the cost-effective distribution of the total energy demand among the diverse available types of green energy sources and the installed capacity of fossil fuel power generation. This study proposed a hybrid rational economic dispatch that combines a linear model for cost minimization that is enhanced with a fuzzy logic system for the decision-making of the minimum and maximum operational levels of the wind generation and hydroelectric plants. The intermittence of the wind generator is compensated for with the hydroelectric plants as long as they have enough capacity. The remaining energy generation capacity is distributed among the fossil fuel plants. This implies better distribution of the power generation among the power generation plants.
The results of the model with real data taken from wind, hydroelectric, geothermal, nuclear, bioenergy, and fossil fuel power plants in the southeastern region of Mexico show that a fairer, rational, and cost-optimized power grid economic dispatch can be achieved with the proposed approach. In all weather seasons, the hydropower generation tended to compensate for the wind generator, but there were mixed results on the spring and autumn days due to higher energy demand and lower availability of water (average of 53% of the power was generated by hydro plants versus 9.4% by wind power). The expected compensation by hydropower was more clearly seen in January, as demand increased with the time of day and the share of wind decreased from 12.4% to 10.1%. This decrease was offset by an increase in hydroelectric generation, which went from 55.7% to 65.5%. On the summer day, the effect was similar; the demand increased with the passing of the day, and therefore, the share of wind power decreased from 8.4 to 7.7%. Hydro remained stable at 51%, although, in net terms, it increased its production due to the fact that demand was higher in the evening. The deficit was covered by fossil fuel and nuclear plants. On the spring and autumn days, the reduction in the share of wind was not accompanied by an increase in hydro due to its water levels, so the shortfall, in this case, was covered by geothermal, nuclear, and fossil fuel production.
Supplementary Materials: The following supporting information can be downloaded at: https:// www.mdpi.com/article/10.3390/en15114069/s1. Table S1. Input parameters to the wind fuzzy system. Table S2. Output values of the wind fuzzy system. Table S3. Input values to the hydraulic diffuse system. Table S4. Output values of the hydraulic diffuse system. Table S5. Input parameters of the linear system. Table S6. Results of electricity generation and total cost by plant for a winter day (January 15). Table S7. Results of electricity generation and total cost by plant for a spring day (April 15). Table S8. Results of electricity generation and total cost by plant for a summer day (June 15). Table S9. Results of electricity generation and total cost by plant for a fall day (October 15).

Conflicts of Interest:
The authors declare no conflict of interest.

Subscripts j
Power plant k Period Symbols A j Fixed cost of plant j B j Variable cost of plant j C j Silver start-up costs j D Demand requested D k Demand in period k E jk Energy to be generated by plant j in period k E min, j Minimum energy to be generated by plant j E max, j Maximum energy to be generated by plant j F j Maximum descent ramp of floor j J Total number of plants in the system K Total number of time periods M j Shutdown cost of plant j P j Power to be generated from plant j P min,j Minimum power to be generated by plant j P max,j Maximum power to be generated by plant j R Total cost of power generation on the day U j Maximum ascent ramp of floor j v j Binary variable: plant j in operation v jk Binary variable: operation of plant j in period k y jk Binary variable: startup of plant j in period k z jk Binary variable: stopage of plant j in period k