The aim of the research was to control the electrical network of a hybrid power supply systemfor an autonomous underwater vehicle designed to travel over ultra-long distances over tensof thousands of kilometers. To overcome ultra-long distances, the urgent task is to minimize thespecific consumption of electricity, provided that all consumers are provided with electricity. Therelevance of the work is determined by the novelty of using a hybrid power supply system in autonomousunmanned underwater vehicles, consisting of heterogeneous sources of electricity operatingon different physical principles. Due to the lack of research to date, related to the control ofthe hybrid power supply system, coordinated with the modes of motion of the vehicle in a wide range of speeds, the problem arose of developing control algorithms for the hybrid power supplysystem. To solve the problem, the reasons for the change in current consumption during themovement of the device were analyzed, the necessary conditions for connecting consumers to thebus ducts were formed, including providing all consumers with electricity in full, excluding theexcess of the rated currents of each bus duct with consumption currents, minimizing electricitylosses when passing through the conductor and through the equipment. In this regard, the possibleconfigurations of the construction of the electrical network using conductors and equipment wereanalyzed, and losses on the current conductors and on the equipment used were estimated. Basedon the results of the research, a graph of consumers' connections to the conductors was formed,and to determine the way of connecting each consumer to the energy source through the powergrid, a connection path was determined that minimizes losses. The problem was formalized asfinding the shortest path in a graph, and Dijkstra's algorithm was used as a basis to solve it. Basedon the research results, algorithms were formed for the formation of ways to connect consumers toelectricity sources through the power grid and an algorithm for controlling the switching of keysin the power grid when the consumption currents change. The developed algorithms were implementedin software, and a numerical experiment was carried out using a simulation model. Theresults of the experiment showed the correctness of the developed algorithms, and can be furtherused for implementation in the devices under development for moving over ultra-long distances.