Mathematical model of an artificial neural network for controlling a robotic transport system during emergency rescue operations at energy facilities of the Penal System

. The paper investigates a mathematical model of an artificial neural network with a delay in the arguments of the state and control functions, designed to control a robotic system during rescue operations at the facilities of the energy complex. The learning process of the considered artificial neural network is described by the problem of optimal control with delay. Using the Pontryagin maximum principle and the method of fast automatic differentiation, a method for solving the obtained optimal control problem has been developed. The results of the software tool operation, which was created using the algorithm for constructing an approximate optimal control of the problem under consideration, are presented


Introduction
Nowadays, advances in the development of domestic robotics provide the possibility of using robotic systems (RS) in emergency rescue operations and firefighting in the correctional facilities .The development and implementation of automated systems in the practice of rescue services, which can reduce the risk of death of people during rescue operations in extreme conditions, is a promising area of modern scientific research.The relevance of the development of such systems, among other things, is dictated by the growing level of terrorist threats, the implementation of which at large industrial, chemically and radiation hazardous facilities can lead to man-made accidents and disasters with unpredictable consequences.In this regard, it is expedient to develop models and algorithms for controlling robotic systems intended for use by rescue services in emergency response at important facilities [1,2,3].Such facilities can include a number of production and other facilities of the penitentiary system of the Russian Federation, characterized by a large crowd of people and the existence of a high level of criminogenic threats.
The use of artificial neural networks (ANN) is effective for the development of robotic systems.The paper considers the construction of a neural network model for the control of a robotic rescue system designed for rescue operations in extreme conditions [4,5].
Over the past decades, artificial neural networks have been actively introduced into various areas of human activity, including the creation of robotic systems and vehicles with automatic control [6,7].Such technical complexes find wide prospects for application in the development of decision support systems when working in extreme conditions [8].At the same time, the most promising for use in complex technical systems are dynamic neural networks, which, unlike static ANNs, have the ability to adapt their structure and parameters to the input data through the learning process.This property of ANNs provides the advantage of their use in comparison with static models.In modeling the control processes of complex technical systems, it is necessary to take into account delays [9].This fact leads to the need to consider an ANN with a non-trivial architecture.According to the proposed approach, for training such neural networks, it is required to search for a solution to the optimal control problem (OCP) with a delay [10].The study considers the delays in the state and control functions used to build a neural network model for controlling a robotic system with feedback, which makes it possible to refine the model, and also serves to develop a numerical algorithm for constructing an optimal system control.
The above factors determine the novelty, relevance and practical significance of the study.

Materials and methods
Let us consider the mathematical model of the ANN, which is used to avoid obstacles when controlling the movement of the RS, which has a differential wheel drive.The automatic distance to the obstacle provides the ability to establish the appropriate speed and direction of further movement of the RS, while the speed of the left and right drives for moving the system in the required direction depends on the input parameters -the obstacles location and the acceleration coefficient value [11].
To describe the corresponding ANN containing N neurons, a nonlinear system of secondorder differential equations (DE) with delay is used [6,9,12]: Taking into account the notation: 1) will be rewritten in the form of a first-order DE system of the following form: The conditions that the state and control functions must satisfy at the initial time interval are taken into account: where ( ), ( ) ii tt


-the given functions.
The following limitations on control actions are introduced: ( ) , ( ) .
under given constraints ( 2) -(4).Here the constants 3 , MM play the role of weight coefficients.It is necessary to build an optimal process that minimizes the functional (5) under given constraints ( 2) -(4).Let's assume that .
The objective functional takes the following form: For the obtained problem of minimization of the considered functional, the necessary optimality conditions are applied in the form of the Pontryagin maximum principle [6,9].
The Pontryagin function for the problem under consideration takes following form: Here ( ) ( ), , 1,.. , [0, ] , the introduced functions p(t), q(t) are conjugate functions satisfying the DE system with leading argument.In this case, the maximum condition takes the form: To construct an approximate numerical solution, we construct a discrete OCP (DOCP) using a uniform partition of the interval [0,T] with q points.To approximate the integral, we use the rule of left rectangles.Then, we approximate the system of DEs according to the Euler scheme.
As a result, we get DOCP of the following form: In equations ( 7) - (10), index 1, iN  denotes the number of the vector coordinate, index 1, lq  determines the number of the neural layer.To solve the DOCP, we use the method of fast automatic differentiation (FAD) [9,13].To implement the computational algorithm that implements the gradient descent method and is built taking into account the obtained relations and the FAD method, the author has developed a software tool in the Lazarus IDE.

Results and discussion
For given values of penalty coefficients ( ), ( ), ( ). u t u t u t The stopping criterion in the algorithm is the achievement of the admissible value of the learning error   = 0,08 or the fulfillment of the maximum admissible number of completed iterations The key feature of the developed algorithm is the possibility of its application for modeling ANNs, the dynamics of which is described by a DE system with delays.
Let us denote the RS coordinates by   ,   , the linear speeds by   ,   , corresponding to the left and right drives and obtained using the trained ANN.Let's further denote the width and angle of rotation performed by the RS by ,; L  [ 0 ,   ] are the coordinates of the initial position of the RS.
Then the RS coordinates at each moment of time of a given time interval can be calculated taking into account the system of differential equations:

Conclusion
The constructed mathematical model of the ANN can be used to create an autopilot RS designed for emergency rescue operations in extreme conditions in the correctional facilities.Due to the flexibility, stability, and ability to adapt to external conditions, ANNs make it possible to solve control problems for complex technical systems in a wide range of parameters [14].

Fig. 3 .Figure 4 Fig. 4 .
Fig. 3.Control action graphs yt expresses the rate of change in the oscillation amplitude of the i-th neuron;N is the number of network neurons; T is the specified time of the process; i xt determines the amplitude of oscillations of the i-th neuron at time t; () i