Optimization of modes of the electric power systems by genetic algorithms

In article discusses issues for solving optimization problems based on the use of genetic algorithms. Nowadays, the genetic algorithms for solving various problems. This includes the shortest path search, approximation, data filtering and others. In particular, data is being examined regarding the use of a genetic algorithm to solve problems of optimizing the modes of electric power systems. Imagine an algorithm for developing the development of mathematical models, which includes developing the structure of the chromosome, creating a started population, creating a directing force for the population, etc.


Introduction
Genetic algorithms are currently very popular ways to solve optimization problems. They are based on the use of evolutionary principles to find the optimal solution. The very idea seems quite intriguing and curious to put it into practice, and numerous positive results only stir up interest from researchers. Often, a small change in one of them can lead to an unexpected improvement in the result. The use of genetic algorithms is useful only in cases where for this problem there is no suitable special solution algorithm. These algorithms are based on the principles of natural selection by C. Darwin and were proposed relatively recently -in 1975 by John Holland. They use both an analog of the mechanism of genetic inheritance and an analog of natural selection. At the same time, biological terminology in a simplified form and the basic concepts of linear algebra are preserved [2].
Formally, a genetic algorithm is an algorithm that allows you to find a satisfactory solution to canally insoluble problems through the consistent selection and combination of the desired parameters using mechanisms resembling biological evolution.
Optimization of modes of modern power systems on active power is a complex task of nonlinear mathematical programming with a set of simple and functional constraints in the forms of equality and inequality. Therefore, the effectiveness of algorithms of its solution is determined, in particular, by the possibility of effectively taking into account such constraints.
The main constraints that are taken into account in solving the problem of optimal planning of modes of power systems with thermal power plants for a certain period of time are: -constraints in the form of inequality on minimum and maximum possible loads of power plants (simple constraints) Pimin ≤ Pi ≤ Pimax , i = 1,2,… n ; -condition of active power balance in power system (functional constraint in the form of equality) where n is the number of power plants, which participate in optimization; Pi-power of i th plant; PL-the total load of consumers in power system; -constraints on power flows along certain controlled transmission lines (functional constraints in the form of inequality) Plmin ≤ Pl ≤ Plmax , l = 1,2,… L ; (3) where L is the number of lines in which active power flows are limited; Pl-active power flow along the l th controlled line [8]. At present, the methods for taking into account such constraints in optimization of modes of power systems by traditional algorithms are quite developed. Genetic algorithms offer a new and powerful approach to solving optimization problems. Their use was made possible by expanding the capabilities of computational tools at relatively low costs. Recently, these algorithms are used in solving global problems of search optimization, when traditional optimization algorithms cannot be used. The probability of convergence of a genetic algorithm to the global solution of the problem is the highest, since it simultaneously evaluates a set of points in the parameter space. These algorithms also do not require differentiability and continuity of the search space. At the same time, the issues of taking into account of functional constraints in the form of equality and inequality in optimization of power system modes by these algorithms are researched not sufficiently.

2
The algorithms of taking into account of functional constraints.
Genetic algorithms are used to solve the following problems: •Extreme tasks (finding the minimum and minimum points).
• Approximation of functions.
• Selection (filtering) of input data.
• Set up an artificial neural network.
• Simulation of artificial life.
• Bioinformatics (coagulation of proteins and RNA).
• Developing agents / machines. Genetic algorithms are stochastic heuristic optimization methods, the main idea of which is taken from the theory of the evolutionary development of species. The main mechanism of evolution is natural selection, the essence of which is that more adapted individuals are more likely to survive and reproduce and, therefore, bring more offspring than less adapted individuals. Moreover, due to the transfer of genetic information, descendants inherit their main qualities from their parents. Carriers of genetic information of an individual are deoxyribonucleic acid (DNA) molecules. When animals multiply, two parent germ cells merge. Their DNA interacts to form descendant DNA. The main way of interaction is crossing over. When crossing overs, the DNA of ancestors is divided into two parts, and then exchanges their halves. With inheritance, mutations are possible due to radioactivity or other influences, as a result of which some genes in the germ cells of one of the parents can change. Altered genes are transmitted to the descendant and give him new properties. If these new properties are useful, they are likely to remain in this form and at the same time there will be an abrupt increase in the fitness of the species. [1] The first step in developing a mathematical model based on a genetic algorithm is to develop the chromosome structure in which the solution will be stored. The selected structure should take into account all the features and limitations imposed on the desired solution, as well as the fact that the implementation of crossing-over and mutation algorithms directly depends on its choice. Ultimately, the choice of chromosome affects not only the speed, but also the convergence of the algorithm in general [3].
The structure of the chromosome is convenient in that already at the stage of setting the initial data, obviously unsuccessful decisions can be eliminated by blocking the corresponding cells.
At the next step of the algorithm, an initial population is created, the size of which depends on the dimension of the problem and usually amounts to several hundred solutions.
To organize the optimizing process, it is necessary to create a guiding force for the development of the population. The requirement to minimization the objective function or, in terms of genetic algorithms of fitness function, acts as such strength. Usually, an additive optimality indicator is used as it, based on the fines set by each decision for any inconvenient one. The advantage of this choice is the ability to customize the algorithm for a specific task by varying the coefficients and thereby changing priorities when searching for the optimal solution [3].
Thus, placing the initial population in the artificial environment that we created and implementing the selection, crossing-over, and mutation processes, we obtain an iterative algorithm for finding the optimal solution, at each iteration the following actions are performed [1][2][3]: 1. Each individual in the population is evaluated using the fitness function.
2. The best decisions are copied to the new population without change. This principle (the principle of elitism) prevents the loss of the best decisions and provides increased convergence of the algorithm.
3. Based on proportional selection from the current population, two solutions are selected that undergo recombination. For this, the chromosomes of the parents exchange corresponding sites.
4. If a new population is formed, then the old one is removed, and then go to step 1. Otherwise, go to step 3.
The main parameters of GA are: • probability of mutation; • accuracy of the result; • the number of iterations of the algorithm or the number of generations; • population size.
The genetic algorithm works according to the following scheme: 1. First of all, in this algorithm for organizing the beginning of the account, an arbitrary initial family is created.
2. Next, the algorithm produces a certain sequence of new families or generations. At each individual step, the algorithm uses certain individuals from the current generation to create the next generation. When forming a new generation, the following actions are carried out in the algorithm: • Each member of the current family is flagged by calculating the appropriate fit-ness value.
• The obtained series of values of the fitness function is scaled, which allows constructing a range of values more convenient for subsequent use.
• Parent values are selected based on their suitability values.
• Some individuals from the parental generation have lower values of the fitness function and which are further selected as elite values. These elite values are passed on to the next generation.
• Child values are formed either by some random changes of a single parent -a mutation or by a combination of vector components of a certain pair of parents -a crossover.
• Replacing the current family with a subsidiary in order to form the next generation.
3. The algorithm is stopped when any stopping criterion is satisfied. In the electric power industry, genetic algorithms are capable of solving narrow but extremely important optimization problems, for example, the problems of improving the quality of electricity and lowering the cost of its production.
The main objects of study are indicators such as voltage deviation, coefficients of harmonic components and voltage asymmetries in the reverse and non-zero sequence.
The basic classical genetic algorithm (also called elementary or simple genetic algorithm) consists of the following steps (Fig. 1

) [2-3]:
1) initialization, or selection of the initial population chromosomes; 2) assessment of the fitness of chromosomes in a population; 3) checking the stopping condition of the algorithm; 4) selection of chromosomes; 5) the use of genetic operators; 6) the formation of a new population; 7) the choice of the "best" chromosome.

Fig. 1. Block diagram of the genetic algorithm
You can imagine the task as a combination of several functions (costs, capital in-vestments, damage from low quality of electricity), shown in Fig. 2. At the intersection of the three function graphs, the optimal solution to the problem is found, which can be found using a canonical or other GA.
The considered algorithm is not only resistant to local minima, but also due to internal parallelism, expressed in work not with individual solutions, but with entire classes of solutions, provides a relatively quick search for the optimal solution. Research methods basically use an iterative technique to improve results. During one iteration, they look for a solution, the best in the vicinity of the given. If such a solution is found, it becomes current and a new iteration begins. This continues until the increase in the objective function decreases to almost zero or the specified number of iterations is completed. Obviously, such methods are focused on the search for only local optima, and the position of the found optimum depends on the starting point. The global optimum can only be found by chance. To increase the likelihood of finding a global optimum, a multiple experiment with different starting points is used, which significantly increases the search time [2][3].

1.
Generalized algorithm for optimizing the modes of Energy Systems based on GA: Step 1: Randomly in the Valid Range the initial population is formed, which is a combination individuals that correspond to possible solutions to the problem. In the problem of optimization for active power, possible solutions correspond to the generated active power of each TPP (nodes No. 1, 2,3, 4).
Step 2: The system of nonlinear equations is calculated steady state method of Newton. After calculating the system, the flow restrictions are checked using the penalty function method.
In optimization tasks for active power, the objective function is the minimum total fuel cost for all TPPs in the system.
Step 6: Verify the stopping criterion for the optimization process. If the given number of iterations for the GA is performed, the algorithm stops operation and a mode will be selected for which the value of the objective function has the best value, and whose parameters satisfy the specified requirements. If the specified number of iterations is not completed, then the transition to step 7.
Step 7: Using one of the selection methods, select pairs parent chromosomes (possible solutions).
Step 8: Two parents are crossed with probability Pc, producing two descendants.
Step 9: Offspring mutation with probability Pm.
Step 10: Formed a new population, which includes the most adapted individuals from individuals-parents and received individual's descendants.
Next, the algorithm proceeds to Step 2 and so on, until it works stopping criterion in the form of a given number of iterations.
To compare the results of calculations by the described algorithm as a reference, the result of solving the problem by the method of equality of relative growths is given: The described genetic algorithm is more suitable for unconditional optimization. Therefore, to solve the optimization problem under consideration by this algorithm, the conditions of the active power balance in the power system are taken into account by the quadratic penalty function S=α(P1+P2+P3+P4-700) 2 (4) where α, is weight (penalty) coefficients, α=1 Thus, the task is reduced to finding the minimum of the objective function, taking into account restrictions on the minimum and maximum possible loads of plants.
F=B1+ B2+ B3+ B4+S (5) The last function is also accepted as the fitness function. The population consisted of 50 chromosomes of individuals.
Optimization was performed by the described genetic algorithm using a 1-point and 2-point crossover. The convergence of the iterative process when using material coding with a 2-point crossover turned out to be faster than with a 1-point crossover.
For comparison and evaluation of the results, even chromosomes of the optimal population obtained by calculation by the described algorithm using a 2-point crossover are shown in Table 1. To select the best optimal solution to the problem from the obtained candidates, first of all, it is necessary to identify the feasible solutions for which the constraints are fulfilled with the required accuracy. Then, from these feasible solutions, the optimal one is selected for which the objective function has the smallest (and in maximization problems the largest) value.
In this case, restrictions on the minimum and maximum possible loads of the stations are fulfilled automatically. And the limitation on the balance of active power in the power system with the required accuracy of ± 0.5 MW is fulfilled for chromosomes (decision candidates) 4, 6, 12, 18, 26, 28, 42, at which the value of the total equivalent fuel consumption (target function) is 1836 0, 1836.0, 1836.0, 1836.0, 1836.0, 1836.0, 1836.7, t.o.e/h., respectively.
The smallest of these values is 1836.0 t.o.e/h. Thus, for the optimal solution to the problem, obtained by the described genetic algorithm, you can take any of the candidates: 4, 6, 12, 18, 26, 28, which are slightly different from each other. Comparing the obtained solution with the reference result, we will verify its high accuracy.

Conclusion
1) The efficient algorithm for taking into account of functional constraints in the form of equality and inequality in optimization of modes of power systems by genetic algorithm is proposed. 2) Genetic algorithm for optimization of modes of power systems taking into ac-count the functional constraints in the form of inequalities by exponential form of penalty function has a reliable convergence of an iterative calculation process. It also does not require differentiability and continuity of the search space.
3) The proposed algorithm of taking into account of functional constraints in opti-mization by genetic algorithms can be effectively used for optimal planning of short-term modes of power systems.