Simulation Modeling of First Rise Section of Water Supply System with Installed Complex of Automatic Pump Performance Control †

: The article considers the important problem of technical and economic optimization of the operating modes of the ﬁrst rise section of water supply systems. At the same time, the task is to minimize the costs associated with the excessive operation of pumps, while providing the protection of the pipeline from freezing in harsh natural operating conditions. To solve this problem, a computer simulation model was developed for the ﬁrst rise section, equipped with a pump performance control system. The main differences of the developed model are: integrated approach to the analysis of parameters of various physical nature, assessment of the object economic indicators, possibility of simulating non-standard control algorithms. Preliminary studies of the model have shown the possibility and feasibility of its application for calculating the optimal parameters and operating modes of the object under consideration. Based on the simulation results, it was revealed that to calculate the control action by level, it is advisable to use the PID law, for temperature—PD law, for ﬂow rate—PI law. To calculate the main control action, it is proposed to simultaneously calculate the actions in terms of level and temperature, followed by bringing the larger of them to the value of the setpoint for the ﬂow rate maintained by the ﬂow controller. The studies of the proposed management concept for the ﬁrst rise section have shown its high technical and economic efﬁciency. In particular, the savings in electricity consumption are estimated at about 55.2% while providing pipeline frost protection.


Introduction
In the modern world, the process of water supply plays an important role in the life of human society. All over the world, there is a tendency to provide a quality, centralized water supply to an increasing number of settlements. Organization of water supply requires certain capital and current economic costs, which must be minimized in the design and operation of a water supply system. Of particular difficulty is the intake and transportation of water in the harsh natural operating conditions, which brings about additional economic costs for these processes. Severe operating conditions are characteristic, first of all, of the regions of the extreme north and territories with a sharply continental climate. Nevertheless, the development of these territories has recently been a strategic task for most countries that include such areas in their composition. The main factors behind the harsh operating conditions are low ambient temperatures, permafrost, and challenging natural landscape.
There are a large number of scientific works devoted to the optimization of the operating modes of various elements of water supply systems operating in harsh natural conditions [1][2][3][4][5][6][7][8]. Analyzing the considered works, it can be concluded that the main areas in the optimization of water supply systems are the development of principles and standards for the correct design of water supply facilities and the use of automatic control systems for them. The design of a water supply system or its control complex requires a detailed analysis of the possible operation modes, including transients arising from changes in internal or external operating conditions. At the same time, the structure and parameters of the entire system must be selected based on the properties and operating conditions of a particular water supply facility. It is rather difficult or impossible to correctly perform calculations or an experimental study of the existing water supply system, due to a large number of processes of various physical nature taking place in the object under consideration. The solution to this problem is the development of a mathematical simulation model of the water supply system or its section, which can be easily adapted for a specific water supply object [9].
A review of the existing papers showed that when studying and optimizing water supply systems, the key focus is on the process of water distribution between end users already on the territory of a settlement or enterprise [10][11][12][13][14][15][16], while insufficient attention is paid to water intakes and first rise sections. However, the first rise sections are key elements of the water supply system, since their suboptimal performance can affect the functioning of the entire system. Accordingly, an urgent task is to study and optimize the operating modes of this section of water supply systems.
The most widespread is the plan of a water supply system with a storage reservoir, due to its resistance to changes in the water supply and draw-off. A plan of the first rise section with an storage reservoir is shown in Figure 1. In accordance with Figure 1, the main elements of the first rise section are a borehole or horizontal pump that pumps water into an storage reservoir, from where it is supplied to the water supply system of the final water consumer. To control the hydraulic resistance of the pipeline of the first rise, shut-off and control valves can be installed on it. Sometimes the system may have several pumps that provide additional water supply or are back-up pumps.
Machines 2021, 9, x FOR PEER REVIEW 2 of 31 erating modes of various elements of water supply systems operating in harsh natural conditions [1][2][3][4][5][6][7][8]. Analyzing the considered works, it can be concluded that the main areas in the optimization of water supply systems are the development of principles and standards for the correct design of water supply facilities and the use of automatic control systems for them. The design of a water supply system or its control complex requires a detailed analysis of the possible operation modes, including transients arising from changes in internal or external operating conditions. At the same time, the structure and parameters of the entire system must be selected based on the properties and operating conditions of a particular water supply facility. It is rather difficult or impossible to correctly perform calculations or an experimental study of the existing water supply system, due to a large number of processes of various physical nature taking place in the object under consideration. The solution to this problem is the development of a mathematical simulation model of the water supply system or its section, which can be easily adapted for a specific water supply object [9]. A review of the existing papers showed that when studying and optimizing water supply systems, the key focus is on the process of water distribution between end users already on the territory of a settlement or enterprise [10][11][12][13][14][15][16], while insufficient attention is paid to water intakes and first rise sections. However, the first rise sections are key elements of the water supply system, since their suboptimal performance can affect the functioning of the entire system. Accordingly, an urgent task is to study and optimize the operating modes of this section of water supply systems.
The most widespread is the plan of a water supply system with a storage reservoir, due to its resistance to changes in the water supply and draw-off. A plan of the first rise section with an storage reservoir is shown in Figure 1. In accordance with Figure 1, the main elements of the first rise section are a borehole or horizontal pump that pumps water into an storage reservoir, from where it is supplied to the water supply system of the final water consumer. To control the hydraulic resistance of the pipeline of the first rise, shut-off and control valves can be installed on it. Sometimes the system may have several pumps that provide additional water supply or are back-up pumps. Despite the advantages described above, such plans have a number of disadvantages. The main ones include unreasonable operating costs and emergencies. In most cases, unnecessary operating costs arise in connection with the excessive operation of the first rise pumps. This situation entails an overconsumption of electricity to power the electric drive of the pumping unit, premature wear of the pump, and pipeline system units, waste of natural resources (as a rule, artesian water) due to the overflow of water Despite the advantages described above, such plans have a number of disadvantages. The main ones include unreasonable operating costs and emergencies. In most cases, unnecessary operating costs arise in connection with the excessive operation of the first rise pumps. This situation entails an overconsumption of electricity to power the electric drive of the pumping unit, premature wear of the pump, and pipeline system units, waste of natural resources (as a rule, artesian water) due to the overflow of water from the reservoir [17]. The reason for excessive operation can be either the excess of the first rise Machines 2021, 9, 63 3 of 32 pump flow above the water draw-off from the reservoir, or the maintenance of preset parameters of the water supply system. Emergency situations at the first rise section can be caused by a sudden breakdown of the pump unit or pipeline system. A promising direction for preventing sudden breakdowns of the electric drive and the pump body of the pumping unit is diagnostics of their technical state, followed by the calculation of the resource and the implementation of preventive anti-emergency actions [18]. Accidents on a pipeline operating in harsh environmental conditions most often occur as a result of transported water freezing. It should be borne in mind that the temperature of the water in the pipeline can decrease not only due to low ambient temperatures, but also due to changes in the hydraulic parameters of the system, first of all, the pump supply [1,2,5,6].
If the existing water supply system is not properly designed, then operating costs and sudden emergencies can pose a serious problem. The solution is to use automatic pump performance control systems [19,20]. However, in this case, it is also necessary to pay serious attention to the parameters and operating conditions of each specific water supply facility. For example, it is necessary to maintain a sufficient temperature of the water in the piping while changing the pump performance in low ambient temperatures [2,6].
It was revealed that the optimal method for controlling the performance of the first rise pump is frequency regulation of asynchronous motor according to the scalar principle [21][22][23][24][25][26][27][28][29][30][31][32][33]; this method is considered in the current research work. Additional measures can also be used to maintain the required temperature in the pipeline, such as the use of passive insulation, active heating, pipeline burying, etc. [3,4,7]. The operating conditions of water supply facilities can impose serious restrictions on the use of certain algorithms and control parameters, as well as additional methods of protecting the pipeline from freezing [8]. In order to assess these limitations at the stage of system design, it is necessary to develop a complex mathematical model that takes into account the energy, mechanical, hydraulic, and thermal parameters of the simulated object, as well as the interconnections between them.
A review of existing works in the field of the simulation of the first rise sections and similar objects [16,[34][35][36][37][38][39] showed the absence of models that provide a complete analysis of the interconnections of elements of different physical nature in the complex "Electric network-Electric drive-Pump-Pipeline-Reservoir-Control system". Additionally, insufficient attention is paid to assessing the dynamic effect of the hydraulic and geometric parameters of the pipeline on the thermal properties of water in the process of automatic control.
In the current research, the process of developing and testing a simulation model of the first rise section of the water supply system with a storage reservoir, equipped with a complex for automatic control of the performance of a borehole pump, and providing protection of the pipeline from freezing by maintaining a sufficient supply [9], is considered. Since the process of modeling such systems presupposes the possibility of flexible adjustment of the model structure and the sequential input of large arrays of input data, it is advisable to implement a mathematical model using computer simulation tools. For these purposes, the Simulink package of the mathematical environment Mathworks MATLAB R2017b (9.3.0.713579) was selected since it has powerful tools for the visual block design and calculation of the objects of various physical nature and complexity.
The principal differences of the developed model are: • Mathematical description and computer implementation of the interconnections of the "Electric network-Electric drive-Pump-Pipeline-Reservoir-Control system" complex. The key ones are the dependences of the level in the reservoir and the temperature of the water at the end of the pipeline on the flow rate and the supply electric frequency; • Possibility of assessing the economic parameters of the facility functioning, such as the amount of power consumption and overflow of water from the reservoir; • Flexible design of a pipeline from the same-type of elements to achieve a more realistic modeling process; • Implementation of a non-standard way to control the pump performance by the water level in the reservoir and the temperature of water at the pipeline end.
To achieve this goal, it was necessary to solve the following tasks: • Selection of the main parameters of the system, taken into account in the simulation; • Determination of mathematical dependences existing between the selected parameters (building a mathematical model); • Development of the model general structure. In the model, it is necessary to implement the following basic blocks: frequency-controlled asynchronous electric motor; centrifugal pump; overhead laying pipeline; storage reservoir, control system; • Defining the optimal way of object management, calculating the coefficients of the governing laws; • Trial calculation of the model using specially selected parameters. Collecting and analyzing data obtained during the trial model implementation. Defining the output parameters of the control system.
In accordance with the tasks set in the article, the following results were obtained: (1) A list of input, output and internal parameters of the model has been determined, which provide a systematic approach to a comprehensive analysis of the first rise section of the water supply system. (2) Mathematical dependencies were selected and adapted for calculating the controlled parameters of the model, such as supply in the pipeline, water level in the reservoir, water temperature at the end of the pipeline. (3) A block diagram of the simulation model has been developed, which is implemented in the MATLAB Simulink computer modeling environment. The structure of the model completely repeats the section of the first rise to achieve a sufficient level of accuracy. (4) A model of the control system for the first rise section has been developed, which ensures the minimization excessive operation of pump, while protecting the pipeline from freezing. The model is based on a two-channel PID controller with optimal control elements, which allows calculating and maintaining the flow rate in terms of the level in the reservoir and the temperature in the pipeline. (5) The results of calculating the model of the first rise section in transient modes are obtained, and the proposed control system is also investigated. The calculation results showed the effectiveness of the developed solutions, and also made it possible to determine the optimal parameters of the control algorithm.
This work is an extended version of Conference paper presented in 2020 International Russian Automation Conference (RusAutoCon), Sochi, Russia, © 2021 IEEE [9].
The initial report to the conference was devoted to the development of a simulation model of the first rise of the water supply system, that is, the controlled object. In the current study, the general scheme of the model, the pipeline model was significantly revised, the object control system was implemented and investigated, and sensor and disturbance generation subsystems were added.
The text of this article differs from the conference materials as follows: the Abstract is completely revised, new results are obtained; the Introduction is written in more detail; in the Materials and Methods section, the diagrams of the elements of the simulation model of the first rise section have been significantly revised and diagrams of the simulation model of the control system have been added; the Results include computational experiments on a model with a control system; Discussion and Conclusion sections are written; the review of literary sources has been expanded.

Model Parameters
When developing a mathematical and simulation model, the main parameters of the control object were taken into account and analyzed, which have a mutual effect on the elements of the system. The list of these parameters is given in Table 1.

Model Equations and Block Diagram
The general mathematical model of the considered control object can be described by the following system of equations [5,16,40,41]: The above dependences form the basis of the mathematical model of the first rise section and allow to fully implement the required functionality of the simulated object.
Similarly, additional calculations are performed in the model to determine the internal parameters. For example, the S value is calculated as: where λ-coefficient of hydraulic resistance of a line section pipeline with round section, which is calculate in different ways, which are presented in Table 3 [40].
The method of calculating the coefficient is set by the nature of the water movement in the pipeline, determined using the Reynolds number: The total coefficient of local resistance LR shows the resistances of all non-linear sections of the pipeline, such as a bend, branch or coupling. It is determined experimentally or using tabular values.
To calculate the water temperature at the end of the pipeline, several auxiliary values are also calculated. Dissipative heat of friction calculated by the equation [5]: Heat transfer coefficient from water to the pipe wall calculated by the equation [5]: Reduced heat transfer coefficient calculated by the equation [5]: Figure 2 shows a block diagram of a simulation model [42], reflecting the main elements of the system and their interrelationships.  Figure 2 shows a block diagram of a simulation model [42], reflecting the main elements of the system and their interrelationships.  Table 1. All internal parameters of each of these blocks are described in Table 2. The "Frequency Converter", "Asynchronous motor", "Pump" blocks represent the controller, and the "Pipeline and fittings" and "Reservoir" blocks are the control object itself. In accordance with the block diagram of the object being automated, the fu signal is the main control action on the object; signals Q1, l, tk form negative feedback by calculating the corresponding control errors eQ, eL, eT are from the set flow setpoints SetQ, level SetL and temperature SetT. Q2 and to are the main disturbing actions. The output signals of each element are influenced by its external and internal parameters, conventionally taken unchanged in the control process. The output signals of the "Frequency Converter" and "Asynchronous motor" units are determined by the standard properties of the Simulink units. The outputs of the "Pump" block are calculated using Equations (1)-(3). The outputs of the "Pipeline and fittings" block are calculated using Equations (4) and (5), and some internal parameters are calculated using Equations (8)- (12). The outputs of the "Reservoir" block are calculated using Equations (6) and (7).  Table 1. All internal parameters of each of these blocks are described in Table 2. The "Frequency Converter", "Asynchronous motor", "Pump" blocks represent the controller, and the "Pipeline and fittings" and "Reservoir" blocks are the control object itself. In accordance with the block diagram of the object being automated, the f u signal is the main control action on the object; signals Q 1 , l, t k form negative feedback by calculating the corresponding control errors e Q , e L , e T are from the set flow setpoints Set Q , level Set L and temperature Set T. Q 2 and t o are the main disturbing actions. The output signals of each element are influenced by its external and internal parameters, conventionally taken unchanged in the control process. The output signals of the "Frequency Converter" and "Asynchronous motor" units are determined by the standard properties of the Simulink units. The outputs of the "Pump" block are calculated using Equations (1)-(3). The outputs of the "Pipeline and fittings" block are calculated using Equations (4) and (5), and some internal parameters are calculated using Equations (8)- (12). The outputs of the "Reservoir" block are calculated using Equations (6) and (7).

Simulink Imitation Model
The described scheme and mathematical representations are implemented in the Simulink environment in the form of a simulation model shown in Figure 3.
Machines 2021, 9, x FOR PEER REVIEW 9 of 31 The described scheme and mathematical representations are implemented in the Simulink environment in the form of a simulation model shown in Figure 3. This model consists of six main and one auxiliary subsystem blocks. The "Pump", "PipeLine", "Reservoir", and "ControlSystem" blocks correspond to the blocks of the same name in Figure 2. The "FreqDrive" unit combines a three-phase power supply, a frequency converter and a three-phase asynchronous motor. The "ConstInput" block, shown in Figure 4, is intended for inputting external data and parameters into the model, the auxiliary subsystem "SimpleDrive" allows to simulate the output signals of an asynchronous electric drive in a simplified way when it is necessary to carry out lengthy calculations that do not require high calculation accuracy.  This model consists of six main and one auxiliary subsystem blocks. The "Pump", "PipeLine", "Reservoir", and "ControlSystem" blocks correspond to the blocks of the same name in Figure 2. The "FreqDrive" unit combines a three-phase power supply, a frequency converter and a three-phase asynchronous motor. The "ConstInput" block, shown in Figure 4, is intended for inputting external data and parameters into the model, the auxiliary subsystem "SimpleDrive" allows to simulate the output signals of an asynchronous electric drive in a simplified way when it is necessary to carry out lengthy calculations that do not require high calculation accuracy.
Machines 2021, 9, x FOR PEER REVIEW 9 of 31 The described scheme and mathematical representations are implemented in the Simulink environment in the form of a simulation model shown in Figure 3. This model consists of six main and one auxiliary subsystem blocks. The "Pump", "PipeLine", "Reservoir", and "ControlSystem" blocks correspond to the blocks of the same name in Figure 2. The "FreqDrive" unit combines a three-phase power supply, a frequency converter and a three-phase asynchronous motor. The "ConstInput" block, shown in Figure 4, is intended for inputting external data and parameters into the model, the auxiliary subsystem "SimpleDrive" allows to simulate the output signals of an asynchronous electric drive in a simplified way when it is necessary to carry out lengthy calculations that do not require high calculation accuracy.  A subsystem "ConstInput" mainly consists of constants that allow to set constant and conditionally constant parameters of all blocks of the model. The parameter values are fed to the main bus, from where, if necessary, they are distributed among the rest of the model elements. Additionally, the subsystem has the ability to generate continuous signals of the main disturbing influences-t o and Q 2 , using the "Disturbances" block, the diagram of which is shown in Figure 5.
Machines 2021, 9, x FOR PEER REVIEW 10 of 31 A subsystem "ConstInput" mainly consists of constants that allow to set constant and conditionally constant parameters of all blocks of the model. The parameter values are fed to the main bus, from where, if necessary, they are distributed among the rest of the model elements. Additionally, the subsystem has the ability to generate continuous signals of the main disturbing influences-to and Q2, using the "Disturbances" block, the diagram of which is shown in Figure 5. The to signal in this subsystem is specified as a sinusoidal dependence with variable frequency, phase, and offset. It is assumed that over a cyclical period of time (day, year), temperature fluctuations will approximately correspond to a sinusoidal law. In this case, the average temperature and the maximum amplitude of the deviation are set (day-maximum of the sinusoid, night-minimum). It is also possible to add random fluctuations of arbitrary frequency and amplitude to the signal. The Q2 signal is set in a graphical editor manually or through a file based on statistical information about the amount of water consumption at the current facility for a given time interval. Figure 6 shows a diagram of the "FreqDrive" subsystem.  The t o signal in this subsystem is specified as a sinusoidal dependence with variable frequency, phase, and offset. It is assumed that over a cyclical period of time (day, year), temperature fluctuations will approximately correspond to a sinusoidal law. In this case, the average temperature and the maximum amplitude of the deviation are set (daymaximum of the sinusoid, night-minimum). It is also possible to add random fluctuations of arbitrary frequency and amplitude to the signal. The Q 2 signal is set in a graphical editor manually or through a file based on statistical information about the amount of water consumption at the current facility for a given time interval. Figure 6 shows a diagram of the "FreqDrive" subsystem.

Model of Controlled Object
Machines 2021, 9, x FOR PEER REVIEW 10 of 31 A subsystem "ConstInput" mainly consists of constants that allow to set constant and conditionally constant parameters of all blocks of the model. The parameter values are fed to the main bus, from where, if necessary, they are distributed among the rest of the model elements. Additionally, the subsystem has the ability to generate continuous signals of the main disturbing influences-to and Q2, using the "Disturbances" block, the diagram of which is shown in Figure 5. The to signal in this subsystem is specified as a sinusoidal dependence with variable frequency, phase, and offset. It is assumed that over a cyclical period of time (day, year), temperature fluctuations will approximately correspond to a sinusoidal law. In this case, the average temperature and the maximum amplitude of the deviation are set (day-maximum of the sinusoid, night-minimum). It is also possible to add random fluctuations of arbitrary frequency and amplitude to the signal. The Q2 signal is set in a graphical editor manually or through a file based on statistical information about the amount of water consumption at the current facility for a given time interval. Figure 6 shows a diagram of the "FreqDrive" subsystem.  The "Three-Phase Programmable Voltage Source" element generates 380 V AC line voltage at 50 Hz. This voltage is rectified by a "Universal Bridge" [43] full-bridge three-phase diode rectifier and fed to a "Universal Bridge1" three-phase full-bridge insulated-gate bipolar transistor (IGBT) inverter. The operating mode of the inverter is set using the pulse-width modulation (PWM) signals of "PWM 3Sine Generate" block, shown in Figure 7. The "Three-Phase Programmable Voltage Source" element generates 380 V AC line voltage at 50 Hz. This voltage is rectified by a "Universal Bridge" [43] full-bridge three-phase diode rectifier and fed to a "Universal Bridge1" three-phase full-bridge insulated-gate bipolar transistor (IGBT) inverter. The operating mode of the inverter is set using the pulse-width modulation (PWM) signals of "PWM 3Sine Generate" block, shown in Figure 7. This unit generates 6 pulse-width modulation signals for opening the transistor switches of the inverter based on three reference sinusoids corresponding to phase voltages. The frequency of the reference sinusoid (fu) is supplied to the block as an external signal and the amplitude is calculated using the V1/f1-const principle, which corresponds to the scalar frequency conversion method (the most suitable for a pumping load drive application [22,32]). The converted voltage of the required frequency is fed to the "Asynchronous Machine SI Units" element.

Model of Controlled Object
The internal parameters of the frequency converter are set by the properties of the standard blocks used. The electrical and mechanical parameters of an induction machine are calculated by special equations [44] using the parameters of the equivalent circuit [45]. In addition to the required frequency at the output of the frequency converter, the unit receives a moment of resistance on the motor shaft Mc. The main output signals of the unit are the mechanical rotor speed n, the torque and the consumed electrical power P.
When simulating long-term processes, it becomes necessary to reduce the number of computational operations to decrease the time of model calculation. In this case, it is permissible to simplify some blocks with a certain loss of computational accuracy. For example, if during the simulation process it is not required to evaluate the internal parameters of the electric drive, but only its effect on the pump performance, it is possible to use approximate equations for calculating the rotational speed of the electric motor shaft and the power consumed by it from the frequency of the supply voltage. For these purposes, a subsystem "SimpleDrive" has been specially developed, the diagram of which is shown in Figure 8. The rotor speed and power consumption in this subsystem is calculated as follows [40]: η η This unit generates 6 pulse-width modulation signals for opening the transistor switches of the inverter based on three reference sinusoids corresponding to phase voltages. The frequency of the reference sinusoid (f u ) is supplied to the block as an external signal and the amplitude is calculated using the V 1 /f 1 -const principle, which corresponds to the scalar frequency conversion method (the most suitable for a pumping load drive application [22,32]). The converted voltage of the required frequency is fed to the "Asynchronous Machine SI Units" element.
The internal parameters of the frequency converter are set by the properties of the standard blocks used. The electrical and mechanical parameters of an induction machine are calculated by special equations [44] using the parameters of the equivalent circuit [45]. In addition to the required frequency at the output of the frequency converter, the unit receives a moment of resistance on the motor shaft M c . The main output signals of the unit are the mechanical rotor speed n, the torque and the consumed electrical power P.
When simulating long-term processes, it becomes necessary to reduce the number of computational operations to decrease the time of model calculation. In this case, it is permissible to simplify some blocks with a certain loss of computational accuracy. For example, if during the simulation process it is not required to evaluate the internal parameters of the electric drive, but only its effect on the pump performance, it is possible to use approximate equations for calculating the rotational speed of the electric motor shaft and the power consumed by it from the frequency of the supply voltage. For these purposes, a subsystem "SimpleDrive" has been specially developed, the diagram of which is shown in Figure 8. The rotor speed and power consumption in this subsystem is calculated as follows [40]: It should be noted that the rotational speed of the shaft, calculated according to the Equation (13), practically coincides with the data obtained by using the standard block of an asynchronous machine. Deviations are observed only at low frequencies, near the border of the pump stop. Deviations in the calculated power are more significant, since Equation (14) does not take into account the power consumption of the frequency converter, inrush currents and other transients. Nevertheless, for the relative estimation of long simulation intervals, where the second and minute fluctuations do not have a significant effect, the use of Equation (14) is also acceptable.
A block diagram of the "Pump" pump is shown in Figure 9. This subsystem calculates the resistance on the motor shaft, the flow and head of the pump according to the previously given dependencies (Equations (3), (1) and (2) accordingly). It should be noted that the output results will depend on the value of the resistance of the pipeline system, namely, must provide the required system head Sp. To do this, it is necessary to correctly select the value of Qn, which will be graphically determined as the point of intersection of the Sp curve and the pump characteristic curve at the rated operating frequency. The Sp value is calculated by Equation (4) by the PipeLine subsystem, the diagram of which is shown in Figure 10. It should be noted that the rotational speed of the shaft, calculated according to the Equation (13), practically coincides with the data obtained by using the standard block of an asynchronous machine. Deviations are observed only at low frequencies, near the border of the pump stop. Deviations in the calculated power are more significant, since Equation (14) does not take into account the power consumption of the frequency converter, inrush currents and other transients. Nevertheless, for the relative estimation of long simulation intervals, where the second and minute fluctuations do not have a significant effect, the use of Equation (14) is also acceptable.
A block diagram of the "Pump" pump is shown in Figure 9. It should be noted that the rotational speed of the shaft, calculated according to the Equation (13), practically coincides with the data obtained by using the standard block of an asynchronous machine. Deviations are observed only at low frequencies, near the border of the pump stop. Deviations in the calculated power are more significant, since Equation (14) does not take into account the power consumption of the frequency converter, inrush currents and other transients. Nevertheless, for the relative estimation of long simulation intervals, where the second and minute fluctuations do not have a significant effect, the use of Equation (14) is also acceptable.
A block diagram of the "Pump" pump is shown in Figure 9. This subsystem calculates the resistance on the motor shaft, the flow and head of the pump according to the previously given dependencies (Equations (3), (1) and (2) accordingly). It should be noted that the output results will depend on the value of the resistance of the pipeline system, namely, must provide the required system head Sp. To do this, it is necessary to correctly select the value of Qn, which will be graphically determined as the point of intersection of the Sp curve and the pump characteristic curve at the rated operating frequency. The Sp value is calculated by Equation (4) by the PipeLine subsystem, the diagram of which is shown in Figure 10. This subsystem calculates the resistance on the motor shaft, the flow and head of the pump according to the previously given dependencies (Equations (3), (1) and (2) accordingly). It should be noted that the output results will depend on the value of the resistance of the pipeline system, namely, must provide the required system head S p . To do this, it is necessary to correctly select the value of Q n, which will be graphically determined as the point of intersection of the S p curve and the pump characteristic curve at the rated operating frequency. The S p value is calculated by Equation (4) by the PipeLine subsystem, the diagram of which is shown in Figure 10. The proposed diagram is distinguished by a decomposition approach to the construction of a pipeline line model. The model is divided into a set of blocks of the same type, which can define sections of a straight pipeline, or fittings and other non-standard elements. Each block receives different parameters at the input, which makes it possible to simulate different sections of the line operated in different conditions. The blocks are connected in series with each other via transmission lines by loss of pressure and temperature. The block is implemented by the "PipeElement" subsystem shown in Figure 11.  The proposed diagram is distinguished by a decomposition approach to the construction of a pipeline line model. The model is divided into a set of blocks of the same type, which can define sections of a straight pipeline, or fittings and other non-standard elements. Each block receives different parameters at the input, which makes it possible to simulate different sections of the line operated in different conditions. The blocks are connected in series with each other via transmission lines by loss of pressure and temperature. The block is implemented by the "PipeElement" subsystem shown in Figure 11. The proposed diagram is distinguished by a decomposition approach to the construction of a pipeline line model. The model is divided into a set of blocks of the same type, which can define sections of a straight pipeline, or fittings and other non-standard elements. Each block receives different parameters at the input, which makes it possible to simulate different sections of the line operated in different conditions. The blocks are connected in series with each other via transmission lines by loss of pressure and temperature. The block is implemented by the "PipeElement" subsystem shown in Figure 11. Figure 11. Subsystem "PipeElement". Figure 11. Subsystem "PipeElement". The subsystem is divided into two blocks: • "SysPress", which calculates the required pipeline head by Equation (4), depending on the flow rate and internal parameters of the pipeline (in accordance with Table 2), the diagram of which is shown in Figure 12. • "Temperature", which calculates the final temperature of the water in the pipeline by Equation (5), based on the volumetric flow, taking into account internal and external parameters and disturbances (in accordance with Tables 1 and 2). The block diagram is shown in Figure 13. The subsystem is divided into two blocks: • "SysPress", which calculates the required pipeline head by Equation (4), depending on the flow rate and internal parameters of the pipeline (in accordance with Table 2), the diagram of which is shown in Figure 12. • "Temperature", which calculates the final temperature of the water in the pipeline by Equation (5), based on the volumetric flow, taking into account internal and external parameters and disturbances (in accordance with Tables 1 and 2). The block diagram is shown in Figure 13.  Also, the subsystem "Temperature" allows calculate the delay in temperature change during flow control, for which the "TemperatureDelay""subsystem is used, shown in Figure 14. The last subsystem that implements the control object-"Reservoir", is shown in Figure 15.  Also, the subsystem "Temperature" allows calculate the delay in temperature change during flow control, for which the "TemperatureDelay""subsystem is used, shown in Figure 14. Also, the subsystem "Temperature" allows calculate the delay in temperature change during flow control, for which the "TemperatureDelay""subsystem is used, shown in Figure 14. The last subsystem that implements the control object-"Reservoir", is shown in Figure 15.  The last subsystem that implements the control object-"Reservoir", is shown in Figure 15. Also, the subsystem "Temperature" allows calculate the delay in temperature change during flow control, for which the "TemperatureDelay""subsystem is used, shown in Figure 14. The last subsystem that implements the control object-"Reservoir", is shown in Figure 15.  The subsystem is an integrator of the difference in flow rates Q 1 -Q 2 . The subsystem is distinguished by the ability to calculate the level in the reservoir l (by Equation (6)) together with the volumetric overflow Q 3 (by Equation (7)), which makes it possible to assess the amount of resource losses and the economic feasibility of using certain solutions.

Model of the Control System
Subsystem "ControlSystem", shown in Figure 16, implements various options for the system automatic control. The subsystem is an integrator of the difference in flow rates Q1-Q2. The subsystem is distinguished by the ability to calculate the level in the reservoir l (by Equation (6)) together with the volumetric overflow Q3 (by Equation (7)), which makes it possible to assess the amount of resource losses and the economic feasibility of using certain solutions.

Model of the Control System
Subsystem "ControlSystem", shown in Figure 16, implements various options for the system automatic control. The main control principle, implemented in the subsystem, is the simultaneous calculation of control actions by level and temperature, with obtaining the optimal value of the total control action. The basic elements of the subsystem are standard proportional-integral-derivative (PID) controllers. In this case, two or three PID controllers are used. One of the PID controller monitors the change in the water level in the reservoir, and the second the temperature of the water in the pipeline. Then the selection of the resulting control action is made according to the criterion of optimal (according to the maximum). The selected value is transmitted to the regulator directly, or as a flow setpoint, which is calculated by the equation: The main control principle, implemented in the subsystem, is the simultaneous calculation of control actions by level and temperature, with obtaining the optimal value of the total control action. The basic elements of the subsystem are standard proportionalintegral-derivative (PID) controllers. In this case, two or three PID controllers are used. One of the PID controller monitors the change in the water level in the reservoir, and the second the temperature of the water in the pipeline. Then the selection of the resulting control action is made according to the criterion of optimal (according to the maximum). The selected value is transmitted to the regulator directly, or as a flow setpoint, which is calculated by the equation: Selecting the largest impact allows to simultaneously minimize the amount of pump excessive productivity when temperature is not important and protect the pipeline from freezing in low ambient temperatures. Thus, a simple and low-demand optimal control algorithm is realized. The flow setpoint can also be maintained with a third PID controller. Modeling this subsystem will allow to select the most effective coefficients of the PID controllers, as well as a method for determining the overall control action.
The control system is discrete, therefore the received signals must be discretized. Additionally, information can be distorted when measured by sensors. To increase the likelihood of calculations, a universal block for modeling various sensors was developed, the diagram of which is shown in Figure 17.
Selecting the largest impact allows to simultaneously minimize the amount of pump excessive productivity when temperature is not important and protect the pipeline from freezing in low ambient temperatures. Thus, a simple and low-demand optimal control algorithm is realized. The flow setpoint can also be maintained with a third PID controller. Modeling this subsystem will allow to select the most effective coefficients of the PID controllers, as well as a method for determining the overall control action.
The control system is discrete, therefore the received signals must be discretized. Additionally, information can be distorted when measured by sensors. To increase the likelihood of calculations, a universal block for modeling various sensors was developed, the diagram of which is shown in Figure 17. The block allows to set the limitation of the measurement range of the value, the measurement delay (inertia), the sensor resolution, as well as the presence of random noises lying in the measurement error range.
Also, within the "ControlSystem" there are two auxiliary subsystems, shown in Figure 18. The "CalcFlow" subsystem is designed to calculate the flow setpoint based on control actions from level and temperature. Subsystem "SwitchControl" selects the largest signal, first performing its scaling. The following is a description of the calculations performed on the developed model. The block allows to set the limitation of the measurement range of the value, the measurement delay (inertia), the sensor resolution, as well as the presence of random noises lying in the measurement error range.
Also, within the "ControlSystem" there are two auxiliary subsystems, shown in Figure 18.
Selecting the largest impact allows to simultaneously minimize the amount of pump excessive productivity when temperature is not important and protect the pipeline from freezing in low ambient temperatures. Thus, a simple and low-demand optimal control algorithm is realized. The flow setpoint can also be maintained with a third PID controller. Modeling this subsystem will allow to select the most effective coefficients of the PID controllers, as well as a method for determining the overall control action.
The control system is discrete, therefore the received signals must be discretized. Additionally, information can be distorted when measured by sensors. To increase the likelihood of calculations, a universal block for modeling various sensors was developed, the diagram of which is shown in Figure 17. The block allows to set the limitation of the measurement range of the value, the measurement delay (inertia), the sensor resolution, as well as the presence of random noises lying in the measurement error range.
Also, within the "ControlSystem" there are two auxiliary subsystems, shown in Figure 18. The "CalcFlow" subsystem is designed to calculate the flow setpoint based on control actions from level and temperature. Subsystem "SwitchControl" selects the largest signal, first performing its scaling. The following is a description of the calculations performed on the developed model. The "CalcFlow" subsystem is designed to calculate the flow setpoint based on control actions from level and temperature. Subsystem "SwitchControl" selects the largest signal, first performing its scaling. The following is a description of the calculations performed on the developed model.

Experiment Plan
To test the correctness of the construction of the model, a number of computational experiments were performed to assess the transient processes of the model, to select the coefficients of the governing laws and to evaluate the effectiveness of the proposed solutions.
The values of the main parameters were chosen as input data for the calculation, which corresponded to the characteristics of the previously developed laboratory bench [9,17]. These characteristics are given in Table 4. Calculations and analysis of transient processes with a smooth exit to the nominal feed.

3.
Analysis of control algorithms, selection of coefficients of control laws.

4.
Calculation of the model with the optimal control option for a time interval of 24 h.

Determination of the Nominal Pump Flow
To obtain the rated pump flow, a graphical method was used to find the operating point of the pump at the rated supply frequency. Figure 19 shows the result of calculating the pressure-flow characteristics of the pump and the pipeline system.

Determination of the Nominal Pump Flow
To obtain the rated pump flow, a graphical method was used to find the operating point of the pump at the rated supply frequency. Figure 19 shows the result of calculating the pressure-flow characteristics of the pump and the pipeline system. Based on the graph, it was revealed that the nominal and, in fact, the maximum possible pump flow in this system is 2 m 3 /h.

Calculation of Transients
When calculating transient processes, the simulation was carried out in the time range from 0 to 5 s. The value of the impact in frequency varied in the range from 15 to 50 Hz, starting from 0.1 s along a straight-line relationship with a factor of 5. The calculation results are shown in Figure 20. Based on the graph, it was revealed that the nominal and, in fact, the maximum possible pump flow in this system is 2 m 3 /h.

Calculation of Transients
When calculating transient processes, the simulation was carried out in the time range from 0 to 5 s. The value of the impact in frequency varied in the range from 15 to 50 Hz, starting from 0.1 s along a straight-line relationship with a factor of 5. The calculation results are shown in Figure 20.

Determination of the Nominal Pump Flow
To obtain the rated pump flow, a graphical method was used to find the operating point of the pump at the rated supply frequency. Figure 19 shows the result of calculating the pressure-flow characteristics of the pump and the pipeline system. Based on the graph, it was revealed that the nominal and, in fact, the maximum possible pump flow in this system is 2 m 3 /h.

Calculation of Transients
When calculating transient processes, the simulation was carried out in the time range from 0 to 5 s. The value of the impact in frequency varied in the range from 15 to 50 Hz, starting from 0.1 s along a straight-line relationship with a factor of 5. The calculation results are shown in Figure 20. Zero flow and temperature at the initial stage of the calculation are due to insufficient pump head, which, as can be seen from the graph, begins to exceed the static head of the system in the region of the supply frequency of 25 Hz. The delay in the temperature change is approximately 16 s; there is also a high inertia of the level change. Comparative analysis of the results of calculations and laboratory experiments showed satisfactory convergence of the results of simulation modeling with experimental and passport data. The relative deflections of some parameters obtained by modeling, from those measured on a laboratory bench under the same conditions are shown in Figure 21.  Zero flow and temperature at the initial stage of the calculation are due to insufficient pump head, which, as can be seen from the graph, begins to exceed the static head of the system in the region of the supply frequency of 25 Hz. The delay in the temperature change is approximately 16 s; there is also a high inertia of the level change. Comparative analysis of the results of calculations and laboratory experiments showed satisfactory convergence of the results of simulation modeling with experimental and passport data. The relative deflections of some parameters obtained by modeling, from those measured on a laboratory bench under the same conditions are shown in Figure 21. Zero flow and temperature at the initial stage of the calculation are due to insufficient pump head, which, as can be seen from the graph, begins to exceed the static head of the system in the region of the supply frequency of 25 Hz. The delay in the temperature change is approximately 16 s; there is also a high inertia of the level change. Comparative analysis of the results of calculations and laboratory experiments showed satisfactory convergence of the results of simulation modeling with experimental and passport data. The relative deflections of some parameters obtained by modeling, from those measured on a laboratory bench under the same conditions are shown in Figure 21.  Perceptible deflections are observed at the supply frequencies corresponding to the regime of the beginning of water circulation in the system. This is due to the laminar and transient water flow regimes that arise under these conditions, and introduce an error in the calculation methods focused on the turbulent regime. Since laminar and transient modes are not recommended when operating water supply systems, it is not advisable to reduce the pump performance to the specified values. In the rest of the diagram, the relative deflections do not exceed 4%, which is acceptable for the problems under consideration.

Analysis of Control Algorithms
In order to maximize the efficiency of the management process, it is necessary to choose the right type of governing law, as well as its coefficients. As mentioned earlier, the classical PID controller is used as the main element of the control system. A full PID controller allows to change the control action as quickly as possible and to minimize the static control error. Nevertheless, for some processes, the use of this controller can give a negative effect, up to the system going out of equilibrium. Therefore, for each controlled process in the model, studies were carried out of both PID and proportional (P), proportional to integral (PI), and proportional to differential (PD) controllers. The coefficients of the proportional (P X ), integral (I X ), and differential (D X ) components of the controllers were selected according to the Ziegler-Nichols principle. This method easy implementation on a simulation model and allows preliminary estimation of the controller coefficients. In practice, it is necessary to use adaptive algorithms for calculating the coefficients. Figure 22 provides an analysis of the operation of various controllers to maintain the water level in the collection reservoir. Setpoint value Set L = 0.1 m. The main disturbance is Q 2 = 0.7 m 3 /h. Perceptible deflections are observed at the supply frequencies corresponding to the regime of the beginning of water circulation in the system. This is due to the laminar and transient water flow regimes that arise under these conditions, and introduce an error in the calculation methods focused on the turbulent regime. Since laminar and transient modes are not recommended when operating water supply systems, it is not advisable to reduce the pump performance to the specified values. In the rest of the diagram, the relative deflections do not exceed 4%, which is acceptable for the problems under consideration.

Analysis of Control Algorithms
In order to maximize the efficiency of the management process, it is necessary to choose the right type of governing law, as well as its coefficients. As mentioned earlier, the classical PID controller is used as the main element of the control system. A full PID controller allows to change the control action as quickly as possible and to minimize the static control error. Nevertheless, for some processes, the use of this controller can give a negative effect, up to the system going out of equilibrium. Therefore, for each controlled process in the model, studies were carried out of both PID and proportional (P), proportional to integral (PI), and proportional to differential (PD) controllers. The coefficients of the proportional (PX), integral (IX), and differential (DX) components of the controllers were selected according to the Ziegler-Nichols principle. This method easy implementation on a simulation model and allows preliminary estimation of the controller coefficients. In practice, it is necessary to use adaptive algorithms for calculating the coefficients. Figure 22 provides an analysis of the operation of various controllers to maintain the water level in the collection reservoir. Setpoint value SetL = 0.1 m. The main disturbance is Q2 = 0.7 m 3 /h. The coefficients of the considered types of level regulators and their performance indicators are shown in Table 5.  The coefficients of the considered types of level regulators and their performance indicators are shown in Table 5. Table 5. Level controller parameters. The most effective for this process under current conditions is the PID-law, which provides the largest period of fluctuations of the controlled value, which leads to an increase in the economic efficiency of control. Higher initial overshoot during level maintenance is not critical.

Maximum
It should be noted that the analysis of the control action in terms of level showed a frequency jump at the stage of motor acceleration, significantly exceeding the maximum allowable value. Therefore, it was decided to artificially limit the control action to the maximum possible value that can be produced by a frequency converter for motors of this type. This value was 50 Hz. Figure 23 shows a graph of the control action without limitation-U and with limitation Ucut. The most effective for this process under current conditions is the PID-law, which provides the largest period of fluctuations of the controlled value, which leads to an increase in the economic efficiency of control. Higher initial overshoot during level maintenance is not critical.
It should be noted that the analysis of the control action in terms of level showed a frequency jump at the stage of motor acceleration, significantly exceeding the maximum allowable value. Therefore, it was decided to artificially limit the control action to the maximum possible value that can be produced by a frequency converter for motors of this type. This value was 50 Hz. Figure 23 shows a graph of the control action without limitation-U and with limitation Ucut. The application of the limitation of the control action made it possible to significantly reduce the initial overshoot and improve the quality of the control process. The same principle was applied to the rest of the controllers in the system. Figure 24 provides an analysis of the operation of various controllers to maintain the water temperature at the end of the pipeline. The setpoint value SetT = 4.8 °C. The main disturbance is to = −9 °C; tn = +5 °C. The application of the limitation of the control action made it possible to significantly reduce the initial overshoot and improve the quality of the control process. The same principle was applied to the rest of the controllers in the system. Figure 24 provides an analysis of the operation of various controllers to maintain the water temperature at the end of the pipeline. The setpoint value Set T = 4.8 • C. The main disturbance is t o = −9 • C; t n = +5 • C.
The application of the limitation of the control action made it possible to significantly reduce the initial overshoot and improve the quality of the control process. The same principle was applied to the rest of the controllers in the system. Figure 24 provides an analysis of the operation of various controllers to maintain the water temperature at the end of the pipeline. The setpoint value SetT = 4.8 °C. The main disturbance is to = −9 °C; tn = +5 °C. The coefficients of the considered types of temperature regulators and their performance indicators are shown in Table 6. The coefficients of the considered types of temperature regulators and their performance indicators are shown in Table 6. Table 6. Temperature controller parameters. The most effective for this process under current conditions is the PD-law, which provides fast damping of fluctuations of the controlled quantity. The initial overshoot does not exceed the value of the remaining laws. In some areas, it slightly loses to the PD-the law in terms of the magnitude of the deviation.  The most effective for this process under current conditions is the PD-law, which provides fast damping of fluctuations of the controlled quantity. The initial overshoot does not exceed the value of the remaining laws. In some areas, it slightly loses to the PD-the law in terms of the magnitude of the deviation. Figure 25 provides an analysis of the operation of various controllers to maintain the supply (flow) of water in the pipeline. The value of setpoint SetQ = 1.5 m 3 /h.  Table 7.   Table 7. The most effective for this process under current conditions is the PI-law, which provides fast decay of fluctuations of the controlled value (subject to limiting the control action) and has an acceptable initial overshoot. It can be seen from the figure that the full PID-law leads to "loosening" of the system and is unacceptable under current conditions.

Maximum
The concept of the proposed control algorithm for the first rise section consists in the simultaneous calculation and analysis of level and temperature deviations. The main control action f u in this case can be determined either by calculating the required flow setpoint, which is then maintained by the flow controller, or by direct conversion of the actions in terms of level and temperature to the total action.
In the second case, the "SwitchControl" block selects the largest effect, which minimizes the overflow of the reservoir and ensures the pipeline is protected from freezing. Figure 26 provides an analysis of the operation of a direct two-channel level-temperature controller. Value of the setpoints Set T = 4.8 • C; Set L = 0.1 m.
In this case, a large flow is required to maintain the set temperature, so the level setpoint is ignored, which can lead to overfilling of the reservoir.
Next, the algorithm, in which the "CalcFlow" block calculates the variable setpoint for the flow rate SetQ, which is then maintained by the flow rate controller based on the effects of level and temperature was analyzed. Figure  control action fu in this case can be determined either by calculating the required flow setpoint, which is then maintained by the flow controller, or by direct conversion of the actions in terms of level and temperature to the total action.
In the second case, the "SwitchControl" block selects the largest effect, which minimizes the overflow of the reservoir and ensures the pipeline is protected from freezing. In this case, a large flow is required to maintain the set temperature, so the level setpoint is ignored, which can lead to overfilling of the reservoir.
Next, the algorithm, in which the "CalcFlow" block calculates the variable setpoint for the flow rate SetQ, which is then maintained by the flow rate controller based on the effects of level and temperature was analyzed.  In this case, a large flow is required to maintain the set temperature, so the level setpoint is ignored, which can lead to overfilling of the reservoir.
Next, the algorithm, in which the "CalcFlow" block calculates the variable setpoint for the flow rate SetQ, which is then maintained by the flow rate controller based on the effects of level and temperature was analyzed. Figure 27 provides an analysis of the operation of a two-channel level-temperature controller with an intermediate calculation of the flow setpoint. The value of the setpoints SetT = 0 °C; SetL = 0.1 m. In this case, the temperature is already ignored, which allows maintaining the required level in the reservoir. Fluctuations in flow rate lead to permanent, undesirable temperature jumps. It should be noted that this phenomenon is observed in the previous method at the same settings. Hence follows the conclusion about the need for a more In this case, the temperature is already ignored, which allows maintaining the required level in the reservoir. Fluctuations in flow rate lead to permanent, undesirable temperature jumps. It should be noted that this phenomenon is observed in the previous method at the same settings. Hence follows the conclusion about the need for a more detailed study of the issue of bringing the control actions of various physical processes to the value of the flow rate setting. detailed study of the issue of bringing the control actions of various physical processes to the value of the flow rate setting. Figure 28 provides an analysis of the operation of a two-channel level-temperature controller with an intermediate calculation of the flow setpoint for a long time interval (24 h  For this experiment, the main disturbances were set as values that change over time in accordance with the predicted daily fluctuations. The ambient temperature to was set in a sinusoidal manner with an average of 0 °C, a deviation of 9 °C and a frequency one period of hour. Since the reference point corresponds to the night time of the day at 0 For this experiment, the main disturbances were set as values that change over time in accordance with the predicted daily fluctuations. The ambient temperature t o was set in a sinusoidal manner with an average of 0 • C, a deviation of 9 • C and a frequency one period of hour. Since the reference point corresponds to the night time of the day at 0 o'clock, the sinusoid plot is shifted by half the period. The amount of water consumption Q 2 is determined by the averaged data of daily water consumption. From the dependences it can be seen that at night and in the morning there were fluctuations in the water temperature at the end of the pipeline, due to the lowest ambient temperatures. During this interval, the level control actions were practically not taken into account, and as a result, the reservoir overflowed. In the remaining areas, the level was maintained at a given value, with the exception of the segment with a sharp afternoon drop in water draw-off. Analyzing the graphs of the consumed electric power, one can observe a significant decrease in the average value of this indicator. An approximate estimate of the reduction in power consumption in comparison with the nominal operating mode of the system was about 55.2%. This provides complete protection of the pipeline against the threat of freezing. All this emphasizes the technical and economic efficiency of the proposed solutions.

Discussion
Preliminary studies of the simulation model of the first rise section and the automatic control system for pump performance have shown the possibility and expediency of its use for calculating the optimal parameters and operating modes of the object under consideration. In this case, to calculate the control action by the level, it is advisable to apply the PID law, by temperature-by the PD law, by the flow rate-by the PI law. It was also revealed that with a significant change in the parameters and disturbances of the system, an adjustment of the coefficients of the governing law is required, which leads to the need to use adaptive algorithms for their calculation. The studies of the proposed management concept of the first rise section have shown its high technical and economic efficiency. In particular, the savings in electricity consumption is estimated at about 55.2% (this value may vary depending on the parameters and operating modes of the simulated object).
The operating conditions of the first rise section imply the presence of inertia of the main controlled parameters. Moreover, the magnitude of inertia and delay of superposition of the control action for various parameters can differ significantly. For example, the delay in the temperature change when regulating the flow rate, for the given design experiment, was about 15-30 s, not taking into account the inertia of the temperature sensors. The delay in changing the level in the storage reservoir was about 2 min. To optimize the control process, it is necessary to develop a methodology for accurately bringing the control actions for various parameters to a single scale, and then minimize the negative impact of inertia. It should also be noted that changes in external and internal parameters and disturbances seriously affect the quality of the control process, which requires constant adjustment of the coefficients of the control elements.
A promising area of further work is the development and study of adaptive and predictive multichannel controllers that improve the quality of the control process. It is also necessary to consider the feasibility of using a software calculator of the setting value, which compensates for changes in the external conditions of the operation of the first rise section, with the possibility of using probabilistic models based on known statistical information about the operating modes of the object. For example, with a decrease in water draw-off at night, it is advisable to preliminarily reduce the maintained level in the reservoir in order to create a supply maintenance reserve while ensuring an acceptable water temperature. Closer to morning, on the contrary, it is necessary to increase the maintained level to compensate for the increase in water draw-off. The temperature setpoint can also change depending on the ambient temperature.
The experiments on the model have shown that in conditions of low water drawoff, maintaining the water temperature at the end of the pipeline by providing increased flow is not cost-effective due to the significant excessive pump operation. In this case, a permissible operational measure is the preheating of the water with electric heating elements. In this case, an additional controller must be introduced into the control complex, and a control algorithm must be built on the principle of finding the point of minimum energy consumption between the pump and the heater. For these purposes, it is possible to use regulators that use the maximum amount of information about the structure and state of an object by modeling it in the control process. These controllers include the optimal model predictive controllers (MPC) [14]. The output action of such regulators is calculated by analyzing the linearized model of the controlled object, which provides a predictive calculation of the impact taking into account the constraints and optimality criteria. The advantages of such regulators are high efficiency performance indicators and the ability to simultaneously analyze several input and output signals. The disadvantages of such systems include high requirements for the controller hardware and the need to linearize the model. Accordingly, an important task is to correctly adapt the structure of the MPC regulator and the model used to build a low-requirements control system.

Conclusions
In the process of performing of this work, a list of input, output, and internal parameters of the model of the first rise section was determined, selected, and adapted mathematical relationships for calculating the controlled parameters of the model, such as flow in the pipeline, water level in the reservoir, water temperature at the end of the pipeline. A block diagram of a simulation model was developed, which was implemented in the MATLAB Simulink computer simulation environment. A model of the control system for the first rise section has been developed, which ensures the minimization of excessive pump operation while simultaneously protecting the pipeline from freezing. The calculation of the model of the first rise section in transient modes was carried out, and the proposed control system was investigated. The simulation model of the first rise section was successfully tested on a laboratory bench, while the average deflections of the calculated and experimental values did not exceed 4%, which confirms the possibility and expediency of its use for calculating the optimal parameters and operating modes of the consideration object. The results of the calculations made it possible to determine the optimal parameters of the control algorithm: it was revealed that it is advisable to use the PID law to calculate the control action by level; for temperature-PD law; for flow rate-PI law. To calculate the main control action, it is proposed to simultaneously calculate the actions in terms of level and temperature, followed by bringing the larger of them to the setpoint value for the flow rate maintained by the flow controller. Studies of the proposed control method have shown its high technical and economic efficiency: the savings in electricity consumption is estimated at about 55.2% while ensuring the protection of pipelines from freezing.
The results obtained in this work can be used to develop and optimize systems for automatic control of borehole pumps of the first rise sections of water supply systems with or without a storage reservoir. The proposed control method is not demanding on control hardware and can be implemented on budget programmable logic controllers or regulators, while providing significant savings in electricity and natural resources while maintaining a sufficient level of system reliability when operating at low ambient temperatures. The developed model allows to optimizing the control system for a specific water supply facility without serious preliminary field research, which reduce the cost of putting the system into operation.
The project is aimed at application in water supply systems of small and medium-sized settlements and autonomous enterprises, especially those operating in conditions of low ambient temperatures. The prospects for the development of the work are the improvement of the control algorithm, using adaptive technologies [48] and the development of a lowrequirements high-precision optimization algorithm. To increase the reliability of the system, it is also advisable to control the temperature of the water in the borehole and in the reservoir, adjusting the flow in such a way as to ensure the normal functioning of all elements of the automated object.

Data Availability Statement:
The main data is fully presented in the current article.