Development of an algorithm for optimization of continuous technological process of cultivation of microorganisms

. When implementing the tasks of controlling technological processes, finding the optimal control actions, and creating control algorithms that implement the optimal modes of technological processes, it is necessary to present the criterion of optimality in the form of a goal function, the extremum of which best meets the purpose of this object and expressed as - Relevant technical and economic indicators. The criterion of optimality should be an integral indicator that reflects the main aspects of production. Profit is most often taken as such a criterion for typical microbiological industries - as the most generalized indicator, reflecting almost all aspects of the enterprise. Possible criteria of optimality are analyzed in the form of technical and economic indicators of the process of cultivation of microorganisms, the extremum of which best meets the objectives of production and reflects the main aspects of the functioning of the control object. The analysis of possible modes of microalgae cultivation has been carried out. Two optimization algorithms are substantiated. The first one is based on random search method with an absolute bias, an algorithm for optimizing the process of cultivating microorganisms with continuous regeneration of the flow in one cultivator. The second is an algorithm for determining the optimal residence time of chlorella particles in multistage cultivators, focused on the method of dynamic programming implemented in Wellman's recurrence relation. The developed algorithm for operational forecasting and automatic control of the chlorella cultivation process allows, under given production conditions and the composition of nutrients, to increase the productivity of technological equipment and improve the quality of the target product, as well as to prevent in advance various unforeseen and emergency production situations.


Introduction
Microbiological processes are characterized by a mode of operation in which a complex biochemical reaction and mass transfer phenomena are accompanied by an intensive consumption of various nutrients and a single-mode growth and reproduction of a culture or the formation of a target product. At the same time, as the analysis of the modeling results has shown, the content of nutrients is constantly decreasing, and the growth rate decreases, although, at the initial stage, the value of these indicators increases intensively [1,2,3,4].
An attempt to optimize the process according to the appropriate criteria at each moment of time leads to a forced drop in the culture's growth rate. As a result, the operation of the fermenter is far from optimal. Therefore, when optimizing, it is necessary to choose such a mode and the desired trajectory of the growth rate (depending on the mode of the microbiological process of the chemostat or pipe-stat), which would provide the optimal value of the objective function and at the same time satisfy the restrictions imposed on the operating mode of cultivators described by the system of equations (1) [5][6][7].
Due to the complexity and insufficient knowledge of the class of processes under consideration, the best, in a certain sense, the technological regime cannot be determined in advance, since its choice depends on several factors, information about which is revealed already in the course of the process itself. To optimize the facility, it is necessary to implement the conditions for ensuring the best quality of the output product that meets economic standards and specific production conditions. The noted circumstances lead to the fact that the properties and quality of the produced target product vary within wide limits. Therefore, it is necessary to solve a complex optimization problem that would consider the given values of the input and control parameters [8][9][10].

Methods
The problem is solved based on a mathematical model using effective computational methods and modern computer technology.
An equation of the type describes the control object Let the initial value x 0 be given at time t = t 0 . Then each control U∈ V (U is some set containing a constraint arising from the conditions of the technical regulations, the current state corresponds) x = x(t,u,x 0 ,t 0 ) S is some surface in the space of variables t, x 1 ,…, x n given by the equation The optimal control problem consists of choosing U∈ V so that at some moment t, the model described by the system of equation (1) reaches the surface S and at the same time, the control (U1, ...,Un) and phase coordinates (x 1 , ..., x n , u 1 ,…, u n , t) would satisfy the constraints: F1 constraints can be functional. Now let's turn to the process of optimizing the cultivator on the time interval (0, T). Here T can be a variable or a given fixed time of the end of the process. In this case, restrictions are imposed on the control functions where V is a given limitation corresponding to the conditions of the technological regulations.
In this case, the optimization problem is to determine the admissible vector of the function u (t), which delivers an extremum to the conditional criterion described by a functional of the form Let in n-dimensional space a problem moving with constant speed point Suppose that at the initial moment t = t 0 it is found at the p point X which is not optimal for the function f (X). Let us consider the question of which direction of a point from X moves in which the value of the function f (X) increases (decreases) with the greatest speed. It is known that such a direction is determined by the gradient of the function f (x) calculated at the point X = X ̅ , i.e.
Indeed, if the direction of motion of the point entering from the state X is determined by the vector i = {l 1 , ... l 2 }, then the equation of this motion can be represented as x = x s +l s t; s = 1,2,…, n; ≥ 0 The rate of increase of the function f (x) along the ray from the initial point X ̅ is determined by the formula The right-hand side of this ratio is of greatest importance at Formula (7) gives an expression for the components of the unit vector directed along the gradient of the function f (x) • The function f (x) when moving from the point X ̅ , has the highest rate of decrease opposite to the direction of the vector (7). This property of the gradient f (x) is the basis of the method for numerically finding the values of the control parameters at which f (x) has a minimum. This method gives good results only with the largest number of input parameters. It is also effective when combined with other methods.
The main idea of the method is to randomly choose the direction of movement at each step. With all the variety of random search methods, they are united by the use of a random vector ∆x having an equally probable possibility of different directions in the subsequent space of variables. When forming a random vector, random numbers are used [11,12].
Consider the algorithm we used for a random search with an absolute bias [13,14]. The absolute offset random search method is used to repeatedly execute a random step until it succeeds. If ∆x (f) is a successful step, then is it checked whether such a choice is successful? If ∆x j led to failure, then we choose The problem of optimizing the technological process of growing microalgae was solved on a computer.

Results and discussion.
The previous one solved the problem of optimizing the process of cultivating chlorella with continuous regeneration of the flow in one cultivator.
However, the cultivation process is often carried out in several series-connected cascades of cultivators, where the flow continuously flows from one cultivator to another in a multistage switching mode. To optimize such multistage processes, it is important to determine the optimal cultivation time in individual cultivators to obtain the maximum concentration of chlorella at the output [15,16].
For the problem under consideration, an optimality criterion of the form Where Since each investigated control object is individually periodic and multistage, the criterion of optimality of the entire technological system, in which a continuous process of growing a microorganism is ultimately implemented, is an additive function (8) for each separate stage. The vector of output parameters of any stage depends only on the vector of input and control parameters (9) of any stage. Therefore, to solve the problem posed, the dynamic programming method [13,17,18,19] is effective, according to which, for given output values of the process, the calculation starts from the end. It is assumed that the evaluation of the effectiveness. For a cultivator cascade, it is defined as follows: When passing from stage to stage at the first stage of solving the problem using dynamic programming, its dimension increases by one due to a constraint of the type of equality (10) in the range of D * (89).
To return to the original difference, an undefined Lagrange multiplier λ is used. To assess the optimality criterion, new expressions are formed at each stage: * = ; * = * + ( ) With the introduction of an indefinite Lagrange multiplier, the original criterion is modified * = ( ) + ∑ 1/ =1 The maximum value of the optimality criterion, in this case, is a function of two quantities X (0) and λ; however, the value of λ is no longer associated with the restriction of the choice of control at the stage. Therefore, the Wellman recurrence relation depends on the mathematical formulation of the optimality principle for the last reactor of a multistage process The change in the concentration xi in the process of continuous cultivation of chlorella is described by the equation To obtain the values of the concentration of chlorella (9) for the case of a stationary regime, it is sufficient in this equation (13) to set the time derivatives equal to zero: The x i value from equation (14) and the optimal Dn value for the last cultivator are determined from the following condition: 15) allowing to obtain the equation The solution is as follows: Using relation (14), we substitute the obtained values into equation ( Similarly, we find D N-1 and f 2 (x (N-2) , λ) from condition (15): For the (N-2) -th cultivator, you can also derive the following equations: Using the formula (25), we calculate the optimal value for the case i = 2 Substituting the values D i found as functions from expression (25) into condition (10), we determine the values of λ. In this case, the equation takes the form = ( ) It follows from this expression that for N cultivators connected in series, the total residence time = 1 should be distributed equally over all cultivators if separately they have the same volume. For μ = const, we also have x = const. Consequently, to determine the residence time of the particles of the cultivated mass in each cultivator, it is necessary to perform a calculation on a computer. Thus, it can be concluded that the maximum value of the concentration of chlorella X at the exit from the last cultivator can be expressed as (11), if we bear in mind that the maximum value of R * is reflected by the relation (28)

Conclusions
The developed algorithm for predicting and controlling the process of chlorella cultivation allows, under given production conditions and the composition of nutrients, to increase the productivity and quality of the target product and prevent various unforeseen and emergency production situations in advance. Based on the developed models and algorithms, a functional and algorithmic structure of a control system for the cultivation of chlorella is proposed, focused on solving the following tasks: collection and primary processing of information, forecasting the course of the technological process, optimization of operating parameters and control of the course of the technological process [20].