Thermoelectric generation with reduced pollutants made possible by bio-inspired computing

The debate to establish a balance between the generation of electricity and the preservation of the environment is, extraordinarily, important. This article proposes, as a short-term solution, the replacement of diesel oil by natural gas in thermoelectric generation. Natural gas emits 75% less pollutants to the environment than diesel and has a similar energetic efficiency. As a strategy for this replacement to occur safely, the computational modeling was developed in a Bioinspired Computing methodology, called Genetic Algorithm (GA). The GA incorporated all the variables of the Research, Society and Development, v. 11, n. 1, e7611124568, 2022 (CC BY 4.0) | ISSN 2525-3409 | DOI: http://dx.doi.org/10.33448/rsd-v11i1.24568 2 electricity and natural gas networks, presented in the mathematical modeling. The result was a significant reduction in the level of pollutants emitted, with high stability in the electrical power system.


Introduction
Between October 31 and November 12, 2021, at the Scottish Event Campus (SEC), in Glasgow, Scotland, the United Nations Climate Change Conference, COP26, was held. During the Conference, 24 nations, including the United Kingdom, Canada and New Zealand, and numerous car manufacturers such as Ford, Mercedes and Volvo signed an agreement to end the sale of fossil fuel-powered vehicles by 2040. According to data from the United Nations (UN), the sale of electric cars is growing in North American countries, European countries and China. About 3 million vehicles were sold in 2020. This value represents 4.6% of total sales in the automotive market (UNECE, 2021). Data from the UN Economic Commission for Europe, UNECE, show that electric car transactions already account for 10% of that market's share. Projections and estimates by the International Energy Agency indicate that this fraction will increase to 19% by 2025.
This replacement to electric vehicles will reduce the emission of pollutants. However, it will increase the demand for electricity, and one of the most used strategies for such energy generating is thermoelectric.
There is now a wide variety of power generation technologies available, of various scales and natures, of plant sizes and configurations. Such technologies settings, as their adequacy, relative pollution, and relative risk, depending on the different geographic, hydrological, environmental and social situations where they are intended to be installed. These technologies create incentives for the development of new energy sources capable of replacing coal and diesel oil. However, this transition must respect all these conditions, so that there is a coordinated and efficient transformation of all analyses. Natural gas is one of these energy sources.
According to the Energy Research Company (EPE, 2021), natural gas corresponds to 22.8% of the world's energy matrix. The Decennial Plan for Energy Expansion -PDE (Brasil, 2021), states that natural gas accounts for 12.2% of the Brazilian energy matrix. Although natural gas is not a renewable source of energy generation, it presents itself as one of the cleanest and lowest cost intermediate strategies, applicable in the transition from the use of coal/diesel, until reaching models such as photovoltaic and wind power, for example. Research, Society andDevelopment, v. 11, n. 1, e7611124568, 2022 (CC BY 4.0) | ISSN 2525-3409 | DOI: http://dx.doi.org/10.33448/rsd-v11i1.24568 3 Costa, et al. (2016a), present, in their work, an integrated dispatch between the natural gas network and the thermoelectric power generation system. The authors propose a security region, based on Bioinspired Computing, applying the Decision Tree strategy. Based on the values obtained by the Decision Tree, it was possible to optimize the integrated dispatch of these systems, substantially reducing the environmental impact on the ecosystem.
The primary objective of this work is to present natural gas as a safe and stable option for environmental and electrical systems, as it presents, as physical-chemical characteristics, less pollution power and great energy efficiency. The use of natural gas in thermoelectric generation will reduce dependence on coal and diesel oil and will require a lower investment cost in storage, as it does not require storage. Another gas advantage is its versatility of natural gas: it is a competitor to all other alternative fuels, and by realizing this characteristic of natural gas, it is possible to arbitrate between one energy source and another (Santos, 2002).
The Mathematical-Computational Modeling (MCM) was performed in MATLAB computer language. The process of optimizing the multiobjective function, resulting from the integration of the matrices of the phenomena involved, was made in accordance with the research area of Bioinspired Computing. The applied strategy was the Genetic Algorithm (GA), because, in the research, the probabilistic character of certain variables is considered, and the GA is a tool with a very high degree of accuracy and precision that uses a parallel and adaptive search engine (Costa, et al, 2021a).

Natural gas
Natural Gas (NG) is a mixture of light hydrocarbons, predominantly methane (CH4 87%), ethane (C2H6 6%), propane (C3H8 3%) and, to a lesser extent, other higher molecular weight hydrocarbons. It is found accumulated in underground porous rocks, constituting the so-called reservoir. It usually has low levels of contaminants such as nitrogen, carbon dioxide, water and sulfur compounds. NG is the result of the decomposition of natural sediments over many thousands of years. It is classified into two categories: associated gas when, in the reservoir, it is dissolved in oil or in the form of a gas cap. Non-associated NG when, in the reservoir, it is free or in the presence of very small amounts of oil, as shown in Figure 1. Its composition can vary from field to field, depending on whether it is associated with oil or not. At room temperature and atmospheric pressure, it remains in a gaseous state (Costa, 2016b). The replacement of coal and diesel oil by natural gas, in the generation of electric energy, could lead to a reduction of up to 94% in the emission of polluting gases. For Carvalho et al (2021), the use of natural gas turbines is justified due to the fact Research, Society andDevelopment, v. 11, n. 1, e7611124568, 2022 (CC BY 4.0) | ISSN 2525-3409 | DOI: http://dx.doi.org/10.33448/rsd-v11i1.24568 that they are compatible with the decarbonization network and its infrastructure emits less amounts of pollutants than other fossil fuels.

Methodology
The systematization used in this work is structuralist, according to Pereira et al. (2018). The research is based on real data and computer simulations, based on mathematical models. The scientific object is represented and, finally, the product of the investigation is evidenced, related to a priori information about nature, idealized and correlated with the conditions and restrictions of Engineering, Physics, and especially socio-environmental ones.

Mathematical modeling
The mathematical notation used will be defined as the pair (N, A), where N represents the nodes and A NxN  is the pipeline (arc) that connects two nodes. Figure 2 shows, in shape, the nodes and arcs (Wolf, 2003). In Figure 2, w is the gas production associated with a given node, for example, wg is the natural gas production at node g. f is the flow from one node to another, this means that fgk is the gas flow from node g to node k. Still referring to Figure 2, dGN represents the gas demands at each node. Thus, the mathematical model can be represented by the System of Equations (1).
In the DC power flow model, for an electrical network, the power in each network bus is given by Equation (3).
( 3) Being, set of bars directly connected to the bus i or j; xelement reactance.
Thus, it is possible to represent the linearized power flow model in a matrix form, according to Equation (4). (4) on what, P -vector of power injections on each bus;  -vector of the phase angles of the voltages across all system buses with respect to the reference bus; [B] -matrix whose elements are given by the Set of Equations (5). (5) In this way, the complete modeling of the problem can be represented by the System of Equations (6), forming the fitness function to be implemented through Genetic Algorithm.
In which, Tstudy period; set of nodes where there is a natural gas thermal plant in the pipeline network; ai -Natural gas production cost function in the i-nth supplier node; w t i -Production of natural gas in the i-nth supplier node; bi -Natural gas transport cost function; y t i -Natural gas flow inside the pipeline (depends on the gas pressure in the pipeline); Cgroup of natural gas thermoelectric plants; cUTE -Generation cost function of the natural gas thermoelectric plant; PUTE -Power generated 5 2 15 96, 074830.10 6 at the natural gas thermoelectric plant;  -electrical network bus set; cdefgeneration deficit cost; Pdefungenerated power, generation deficit; Gset of gas pipeline network nodes; PGh -power generated at the plant h, which can be gas thermoelectric or conventional thermoelectric; hp angle difference between h-bus and p-bus; xhpreactance in the transmission line between the h-bus and the p-bus; Dhelectrical demand on the bus h; fthpmaxmaximum power flow in the transmission line between the h-bus and the p-bus.

Computational modeling
Bioinspired Computing (BIC), or Evolutionary Computing, is an emerging branch of Artificial Intelligence research that proposes a new paradigm for problem solving inspired by Natural Selection (Mitchell, 1997). Computational modeling is performed by a BIC method called Genetic Algorithm (GA). GA is an optimization and search algorithm based on natural and genetic selection mechanisms. The theory emulates the process of nature in which the fittest individual wins the selection process and reproduce, consequently, the weakest become extinct. The method initially consists of a population formed by a series of bits (stringrepresenting the chromosomes), which is transformed by three genetic operators: selection, reproduction and mutation (Goldberg, 1989).
In the analogy with mathematical modeling, individuals in the population are the starting points or initial solutions. It is important to highlight that the GA always works with a group of individuals. Determining the number of individuals is a parameter that must be adjusted for each case and there is no optimal parameter, however, there is a way to determine a working range (Michalewicz, 1994).
The values of the crossing and mutation probabilities are modified by observing the measure of the genetic diversity mdg of the population, represented by Equation (7)   (7) in which ffmed is the average performance of the population and ffmax the best result of the population. When mdg if approaching 1, it means that there is low diversity; and when it gets close to 0, the diversity is high. Figure 3 shows that, as the number of generations grows, the average value of the performance function approaches the maximum value found, producing values of mdg close to 1, indicating scarcity of genetic material within the population.  The basic operators of GA are: creating the initial population randomly, crossing, mutation and selection. Initially, the initial population has individuals with good and bad characteristics, due to the creation process that is random. These characteristics can be exchanged with other individuals in the population and transmitted to later generations through the crossover operator. In the mutation operator, individuals are randomly modified as process to make them more apt to remain in the next generations. In the mathematical analogy, aptitude is related to the objective function. In the selection operator, the fittest individuals will be chosen to be part of later generations (Holland, 1975). Costa, H. A. O. et al. (2021b), establish a model formed by the combination of GA and Particle Swarm Optimization (PSO). This model made it possible to solve, in a minimum period interval, extremely complex problems, optimizing the operation of the components of the 14-bus electrical system. Costa, H. A. O. et al. (2021c) establish a method that combines fractional-order differential calculus with computational intelligence. The authors presented a hybrid system to be used in automata controllers that will have a shorter response time and greater efficiency.  Research, Society andDevelopment, v. 11, n. 1, e7611124568, 2022 (CC BY 4.0) | ISSN 2525-3409 | DOI: http://dx.doi.org/10.33448/rsd-v11i1.24568 8 This flowchart shows the integrated dispatch model for the natural gas system and the electricity generation system.
The model proposes to minimize the level of pollutant emissions by optimizing thermoelectric generation, respecting the load demand, the plants' generation limits and the restrictions of the environmental system. This modeling, based on Bioinspired Computing, was implemented in MATLAB programming language (Mathworks, 2021).

Results and discussion
The results presented are linked to the case study related to the integration of the IEEE 14-bus network and the Belgian natural gas network. Figure 5 shows the connection between these systems, highlighting the diesel and natural gas generators, and their respective bars. Figure 5 highlights natural gas generators and their points of integration with NG producing cities. This association between these energy networks is highly relevant in this study, as it is able to estimate, with excellent accuracy and precision, the results related to thermoelectric generation, with a reduction in the level of pollutants. As shown in Figure 5, C represents the bank of synchronous capacitors and G the thermoelectric generators. Generators connected to bus 2 and bus 3 use natural gas as fuel. While the generators connected to bus 1 and bus 6 use diesel oil.
According to Carvalho (2018), the GA has superiorities compared to other optimization methodologies, as it applies the process of crossing between individuals, ensuring greater genetic diversity. The conventional search and optimization strategy starts with a set of individuals that, iteratively, is adjusted by applying heuristic operations directly associated with the studied phenomenon. Therefore, once the objective function is implemented in GA, all generation, crossing and mutation operations enable the best result for the variables, considering all a priori information, initial conditions, boundary conditions, obeying the restrictions highlighted in the proposed problem.
The graph in Figure 6 shows the behavior of the best individuals of each generation, according to their aptitude value, over the 100 generations performed by GA. The graph in Figure 7 represents the decay rate of the mean fitness value at each generation. This behavior expresses the best use of natural gas in the conversion of thermal energy into electrical energy.  As shown in Figure 8, it is noticeable that between the 20th and the 30th generations there is a peak in the genetic diversification of individuals. This is because the values of the crossing and mutation probabilities are modified by observing the measure of genetic diversity, according to Equation (7). Table 1 shows the generation of energy produced by thermoelectric plants using natural gas and diesel oil, in accordance with Figure 5. According to this table, the performance of fuel consumption, especially diesel consumption, is verified: -26.81%. Source: Authors.
The 13.43% increase in natural gas consumption, shown in Table 1, ensures the stability of the electrical system. In other words, the Genetic Algorithm is enabling a significant reduction in the level of pollutants emitted during the generation of thermoelectric energy, effecting a safe replacement of diesel with natural gas. Table 2 informs that there will be an increase in the cost of electricity generation using natural gas, imposed by the increase in production and transport of this fuel, through pipelines. This 2.18% increase in the cost of thermoelectric generation using natural gas is offset by the attenuation of the level of pollutants, since natural gas is 75% less pollutant than diesel oil (Mouette et al, 2019). Table 3 shows the production of natural gas being optimized by the Genetic Algorithm, in wells located in cities in Belgium, in accordance with Figure 5.

Final Considerations
The United Nations Conference on Climate Change, held in 2021, presented extremely alarming data regarding the Earth's average temperature. One of the strategies proposed at COP26 was the greater use of electric vehicles to replace those powered by petroleum products. However, this transformation would require much more electricity and today, it is known that a wide part of the world energy matrix benefits from thermoelectric plants that, in many cases, use diesel oil as fuel. In this way, the level of pollutants added to the environment would not be reduced.
This work proposed the replacement of diesel oil by natural gas in thermoelectric generation. Natural gas is about 75% less polluting than diesel and its energy efficiency is similar to other types of energy sources, such as diesel oil itself.
The use of natural gas to replace diesel in thermoelectric generation requires adjustments to the electrical power system.
These updates imposed by the new technology were duly presented in the mathematical and computational modeling of this research. The implementation of a strategy based on Bioinspired Computing provided the model with a robustness capable of achieving excellent accuracy with very high precision.
The Genetic Algorithm, an Artificial Intelligence methodology based on Evolutionary Computing, optimized the natural gas and electric energy systems, reducing the amount of pollutants from thermoelectric generation, maintaining the stability of the electrical power system.
As a proposal for new articles, we are already carrying out research in our laboratories, which are incorporating more environmental variables into the mathematical models, such as, for example, the average local temperature, relative air humidity and level of solar radiation received daily. These surveys are estimating the replacement of natural gas by alternative, renewable, clean and sustainable energy sources, such as those proposed in photovoltaic cells. With the incorporation of more variables and another energy modality, computational modeling is being based on another Bioinspired Computing strategy: the Particle Swarm Optimization (PSO).