Application of the modified self-organizing migration algorithm MSOMA in optimal open-loop control problems

The article discusses the application of the metaheuristic algorithm of global constrained optimization for solving the problem of finding the optimal open-loop control for nonlinear continuous deterministic dynamical systems. The quality of control is assessed by the value of the functional defined on individual trajectories. The optimal control problem is reduced to a parametric optimization problem, which is solved using the MSOMA algorithm, which belongs to the evolutionary group. The MSOMA algorithm is a new algorithm based on the SOMA self-organizing migration algorithm. A step-by-step algorithm for piecewise-constant, piecewise-linear, quadratic spline and cubic spline methods of control laws approximation is proposed. The effectiveness of proposed method is demonstrated by the example of solving the problem of optimal control of a chemical process in a mixing reactor and a singular problem of optimal control. The influence of the parameters of the MSOMA algorithm on the quality of the obtained result is investigated. Comparison of the operation of the algorithm with a known solution, as well as with a solution using the original SOMA method is carried out.


Introduction
The solution of the problem of finding the open-loop optimal control of nonlinear deterministic dynamical systems is considered. The object model is described by a system of nonlinear ordinary differential equations. The controls are constrained by a parallelepiped type. The quality of control is assessed by the value of the Bolz functional.
For the numerical solution of the problem of finding the optimal open-loop control of deterministic systems, as a rule, the necessary optimality conditions in the form of the maximum principle are applied together with methods for solving two-point boundary value problems (shooting method, residual minimization, grid method, differential sweep method, finite element method, etc.) [1]. The collocation method, methods of approximation of control by piecewise-constant, piecewise-linear functions, splines, expansions in various systems of basis functions, spectral and quasispectral methods still remain popular [2][3][4][5][6]. In most approaches, the problem of finding the optimal control is reduced to the problem of parametric optimization, for the solution of which both classical methods of zero, first and second orders are used, as well as new metaheuristic algorithms [7][8].
In this article, to solve optimal control problems, the transition to a discrete problem is carried out, and then the solution to the original problem is constructed by interpolating the values at the grid nodes. When searching for a control in the form of a piecewise constant or piecewise linear function, the calculation formulas of the Runge-Kutta method of the fourth order are used, into which expressions for the control law are substituted corresponding to the used type of approximation. Next, 2 a single-criterion optimization algorithm is used to select the optimal values of the parameters that define the desired control.
As an optimization method, it is proposed to use a modified self-organizing migration algorithm MSOMA [9]. The MSOMA algorithm is a new algorithm based on the SOMA self-organizing migration algorithm [10]. A computational procedure is proposed, the effectiveness of which is demonstrated by the example of optimal control problems for a chemical process in a mixing reactor and a singular optimal control problem [7].

Statement of the problem
The behavior of the nonlinear continuous deterministic model of the control plant is described by the equation is given continuous function.
The initial conditions are given: (2) It is assumed that only time information is used during control, i.e. the open-loop control is applied.
The set of admissible processes is a set of pairs ( ( ), ( )) d x t u t  , including the trajectory ( ) x t and piecewise continuous admissible control ( ) u t , where ( ) ( ) u t U t  , satisfying the differential equation (1) and the initial condition (2).
On the set 0 (0, ) x D the control quality functional is defined: where 0 ( , , ) f t x u and   F x are given continuous functions.
It is required to find such a pair 0 * ( * ( ), * ( )) To calculate the integral part of the control quality criterion (3) in order to avoid loss of accuracy, it is more convenient to use a numerical method of the same order as when integrating the differential equations of the object state. In this case, it is convenient to translate the integral part of the criterion into equations of state. An additional variable Then the control quality criterion will take the following form: Further, we will assume : 1, n n   and the new state vector will be denoted  ( ) : ( ), x t x t  keeping in mind that it is an extended state vector. Thus, the transition is made from the Bolza problem (the criterion contains the integral and terminal terms) to the Mayer problem (the criterion contains only the terminal term).

Solution search strategy
To solve the problem, the transition to the discrete problem is carried out, and then the solution to the original problem is constructed by interpolating the values at the grid nodes. As a result, an approximate control is constructed in the form of piecewise constant or piecewise linear vector functions. The resulting solution will be suboptimal. The general method of working with the considered algorithms in the search for continuous control is that a zero sampling step is added to all algorithms, and at the last step, to obtain an answer, an approximate control is constructed in the required form.
Step 0. Transition to a discrete system. 1. N points are selected on the segment 0, f t     at which the optimal discrete control will be determined. Find the step size , is determined by a numerical method for solving the differential equation (1): where the increment ( ) x t  is determined by the ratios of the chosen numerical method, ˆ0 ,1,..., 1 t N   .. The initial condition (2) will then take the following form: As a result of step 0, the transition to the problem of finding the optimal open-loop control of a discrete deterministic system is carried out. The problems use tree types of control laws approximation:  spline approximation on the segment [0, ] T :    p = 0 for piecewise constant function, p = 1 for piecewise linear function, p = 2 for quadratic spline, p = 3 for cubic spline, i u -unknown parameters [11].
4. Modified self-organizing migration algorithm (MSOMA) Step 1. Set method parameters: 1. NStep is a control parameter that determines the number of steps before the end of the movement; 2. PRT is a controlling parameter that determines whether the individual will move along the selected coordinate to the leader. The recommended value is 0.3; 3. Np is a control parameter that determines the size of the population of individuals.
Recommended value Np > 10; 4. Migration is a stopping parameter showing the maximum number of iterations.
Recommended Migration value > 10; 5. MinDist is a stopping parameter that reflects the value of the average deviation between the three leaders of the population in terms of the value of the objective function. If this value is less than the specified value, the algorithm will stop. Any value can be set (if the value is negative, the condition will not be fulfilled, and the search will stop when the maximum number of migration cycles is reached); 6. MCount is an iteration counter required to stop the algorithm when it reaches the Migration number. Let MCount = 0.
Step 2. Creation of the initial population. Creating a population of individuals with randomly generated coordinates i x from the interval Step 3.5. After all the steps taken, for each individual, the best step is found (the step at which the value of the objective function was the smallest), and the individual takes this position, assigning himself the corresponding coordinate values, and moves to the next population for the first leader:  , constraints are 0.5 5 u    , control quality criterion is It is necessary to minimize the criterion value by using tree types of control laws approximation. Set 10 N  , then 0.078 h  .  Example 2 (singular optimal control problem [7]). The model of a continuous deterministic system is described by the system of nonlinear differential equations: It is necessary to minimize the criterion by using tree types of control laws approximation. Set 10 N  , then 0.1 h  . The values obtained with the SOMA algorithm in the table 4 are inferior to those obtained with the MSOMA algorithm. The SOMA algorithm, as mentioned earlier [9], works worse with functions that are more complex. This difference arises from the different way of movement (movement in MSOMA covers a large area due to movement around three different leaders and the addition of new individuals) and different stopping conditions. But at the same time, this difference in the way the individuals move makes the MSOMA algorithm work longer with those functions that the basic version of the SOMA algorithm can handle quickly and accurately. Thus, the MSOMA algorithm performs better on those functions that require more coverage of the set of feasible solutions to find the extremum.

Conclusion
In this work, a strategy, a step-by-step algorithm and corresponding software for the approximate solution of the problem of optimal open-loop control of continuous systems have been developed. The presented algorithm and program are tested on the examples of solving the problem of optimal control of a chemical process in a mixing reactor and the singular problem of optimal control. The influence of the parameters of the MSOMA algorithm on the quality of the obtained result is investigated.
Comparison of the operation of the algorithm with a known solution, with a solution using the original SOMA method, as well as with various methods of control laws approximation is given.
Recommendations on the choice of algorithm parameters are given.