**1. Introduction**

The optimal control belongs to complex computational problems for which there are no universal solution algorithms. The most well-known result in this area [1] transforms the optimization problem into a boundary-value problem, and the dimension of the problem doubles. The goal of solving the boundary-value problem is to find the initial conditions for conjugate variables such that the vector of state variables falls into a given terminal condition. In general, for this problem, there is no guarantee that the functional for the boundary-value problem is not unimodal and convex on the space of initial conditions of conjugate variables.

The optimal control problem with phase constraints is considered. Phase constraints are included in the functional, so they are included in the system of equations for conjugate variables. This greatly complicates the analysis of the problem on the convexity and unimodality of the target functional. The accurate solution of optimal control problem has to use additional functions and regularization of equations at the search of control [2,3]. An additional problem in solving a boundary-value problem is determination of time for checking the fulfillment of boundary conditions.

In this paper, for the numerical solution of the problem, it is proposed to use evolutionary algorithms that have shown efficiency in solving optimal control problems [4]. SOMA is a universal algorithm for various difficult optimization problems [5,6]. However, our attempt to apply SOMA to the optimal control problem of four robots with constraints has failed to find a good solution for any values of the algorithm parameters. We supposed that the modification of each possible solution in population in the process of evolution using the best current possible solution is not enough [7]. We expanded the modification of SOMA by introducing the best historical solution among randomly selected ones for each possible solution in the population.

The article consists of an introduction and eight sections. Statement of the optimal control problem with phase constraints is presented in Section 2. Section 3 contains Pontryagin maximum principle as one of main approaches for its numerical solution. Section 4 contains a description of one of the evolutionary algorithms, modified SOMA. An example is given in Section 5. The computational experiment and results are presented in Section 6. Section 7 describes the search of optimal control by direct method. Alternative non-deterministic control methods are observed in Section 8. Results and future research directions are discussed in Section 9.

## **2. Optimal Control Problem with Phase Constraints for Group of Robots**

Consider the problem of optimal control for a group of robots with phase constraints. Given a mathematical model of control objects in the form of the system of ordinary differential equations

$$
\dot{\mathbf{x}}^j = \mathbf{f}^j(\mathbf{x}^j, \mathbf{u}^j),
\tag{1}
$$

where **<sup>x</sup>***<sup>j</sup>* is a state space vector of control object *<sup>j</sup>*, **<sup>x</sup>***<sup>j</sup>* <sup>∈</sup> <sup>R</sup>*nj* , **<sup>u</sup>***<sup>j</sup>* is a control vector of object *<sup>j</sup>*, **<sup>u</sup>***<sup>j</sup>* <sup>∈</sup> <sup>U</sup>*<sup>j</sup>* <sup>⊆</sup> <sup>R</sup>*mj* , U*<sup>j</sup>* is a compact limited set, *mj nj*, *j* = 1, ... , *M*, *M* is a number of objects. For the system (1) initial conditions are given

$$\mathbf{x}^{j}(0) = \mathbf{x}^{j,0} \in \mathbb{R}^{\mathbf{n}\_{j}}, j = 1, \dots, M. \tag{2}$$

Given terminal conditions

$$\mathbf{x}^{j}(t\_{f,j}) = \mathbf{x}^{j,f} \in \mathbb{R}^{n\_j},\tag{3}$$

where *tf* ,*<sup>j</sup>* is an unknown limited positive value, that corresponds to time when object *j* achieves its terminal position

*tf* ,*<sup>j</sup> t* <sup>+</sup>, (4)

*t* <sup>+</sup> is a given time of achievement of terminal conditions (3),

$$t\_{f,j} = \begin{cases} \ t, \text{if } t < t^+ \text{ and } \|\mathbf{x}^j(t) - \mathbf{x}^{j,f}\| \lessapprox \varepsilon\_1\\ t^+, \text{otherwise} \end{cases},\tag{5}$$

*ε*<sup>1</sup> is a small positive value, *j* = 1, . . . , *M*. The phase constraints are given

$$\varphi\_i(\mathbf{x}^j(t)) \lessapprox 0, \ i = 1, \ldots, r, \ j = 1, \ldots, M. \tag{6}$$

The conditions of collision avoidance are described as

$$\chi(\mathbf{x}^{j}(t), \mathbf{x}^{k}(t)) \ll 0, \; j = 1, \ldots, M - 1, \; k = j + 1, \ldots, M. \tag{7}$$

The quality functional is given in general integral form

$$J\_0 = \int\_0^{t\_f} f\_0(\mathbf{x}^1(t), \dots, \mathbf{x}^M(t), \mathbf{u}^1(t), \dots, \mathbf{u}^M(t))dt \to \min,\tag{8}$$

where

$$t\_f = \max\{t\_{f,1}, \dots, t\_{f,M}\}.\tag{9}$$

It is necessary to find control as a time function

$$\mathbf{u}^{j} = \mathbf{v}^{j}(t), \; j = 1, \ldots, M,\tag{10}$$

in order to provide terminal conditions (3) with optimal value of functional (8) without violation of constraints (6) and with collision avoidance (7). For a numerical solution of the problem, let us insert phase constraints and terminal conditions in quality functional (8)

$$J\_1 = \int\_0^{t\_f} f\_0(\mathbf{x}^1(t), \dots, \mathbf{x}^M(t), \mathbf{u}^1(t), \dots, \mathbf{u}^M(t))dt + a \int\_0^{t\_f} \sum\_{i=1}^M \sum\_{j=1}^M \mu^2(\varphi\_i(\mathbf{x}^j(t)))dt + b$$

$$b \int\_0^{t\_f} \sum\_{j=1}^{M-1} \sum\_{k=j+1}^M \mu^2(\chi(\mathbf{x}^j(t), \mathbf{x}^k(t)))dt + c \sum\_{j=1}^M ||\mathbf{x}^j(t\_f) - \mathbf{x}^{jf}|| \to \min,\tag{11}$$

where *a*, *b*, *c* are given positive weight coefficients, *μ*(*A*) = max{0, *A*}.

To solve the problem stated above, we use the Pontryagin maximum principle.
