{'fraction_non_alphanumeric': 0.029852343248448533, 'fraction_numerical': 0.013802696340680504, 'mean_word_length': 4.863864491844416, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Modeling and simulation of water levels control in open canals using Simulink

This paper discusses the question of modeling and simulation of water levels control in open canals as a key decition of water and energy resources scarsity in the vegetation period of agricultural irrigation. The mathematical model of the water levels control in open canals is developed and the outcomes are evaluated using by Matlab’s tool Simulink. In addition, the paper proposes that the pivot weir or overshot gate for water levels control in open canals is simple in terms of precise and quality control of the upstream and downstream water levels control. Then dynamic equation of control object that describes dynamic state of the water levels control was obtained. A functional diagram has been developed and PID control was applied for the water levels control in the open canals. PID control was applied for the water levels control in the open canals to know how faster response the object to disturbance. Based on functional diagram the model of the system was built in Simulink environment and obtained the dynamic response.


Introduction
As the world's population grows, water is becoming the most valuable resource. There are no substitutes for water because its scarcity causes serious Economic, Social and Demographic problems in the country. Recently in many regions of the world, particularly in Central Asia, Africa, the Near East, and the Southwest U.S and in some states of Latin America faces the challenge of irrigation and drinking water shortages [1]. We think that the below mentioned data should force every reasonable person to preserve the most valuable resources that has no substitutes on earth's space when uses water as needed. According to "Our World in Data" global freshwater use for agriculture, industry and domestic use since 2000 to 2014 significantly increase from 3.79 trillion cubic meter per year to 4 trillion cubic meter. Every day, 2.1 billion people still wake up each morning without access to clean water [2]. This means that millions of vulnerable families around the world do not drink, cook, or bathe with clean water. About 3.4 million people die each year from scarce and contaminated water sources. Millions of women and children spend 3-6 hours each day collecting water from distant and polluted sources [3]. The time it takes to walk the average 3.7 miles for clean water is time not spent generating income, caring for family members, or attending school. The agricultural industry is attributed to 70 percent of the world's water withdrawal. Fifty percent of those facing water scarcity live in India and China, and 500 million people live in regions where the water supply cannot keep up with the rate of water consumption [4]. Hence agricultural irrigation as the biggest water and energy consumer requires advanced water and energy saving technology. There is one of the largest world's irrigation systems in the Central Asia providing water about 7.95 million hectares land under irrigation. Big dams, water reservoirs, canals, pumping stations and drainage systems were constructed in the region. Approximately 90 % of water resources are used for agricultural irrigation purposes in the Central Asian region, including Uzbekistan [1]. One of pressing problem of water management sector is water flow and level measurement and controls in open canals. Because in the vegetation period of the agricultural plants require the optimum control of the water levels of the main canals in irrigation season. In this study, the authors attempt to develop more precise water levels control system in open canals using SIMULINK model. The literature reviews show that most existing water levels control systems have some limitations for practical use in open canals [5][6][7][8][9][10][11][12][13][14][15][16][17]. Currently, various system for water flow measurement and control in open canals have been developed [5][6][7][8][9][10][11][12][13][14][15][16][17]. However, few authors paid an attention to increase accuracy and quality of the water levels control systems in open canals. A smart sensor for automatic drip irrigation systems for paddy cultivation was proposed in [5]. But, the system has not water levels control in open canals features. In addition, an automatic pivot weir control system was proposed in [16]. The system has two ultrasonic sensors to measure water depth in upstream and downstream of the weir and the data will be transferred to computer for the further processing. However, irrigation water is usually turbid and has small particles, stones and other things. In this case, ultrasonic sensors often generate false signals and precision of control systems going down. The study of existing problem is presented in Section I, the Section II describes materials and methods, pivot weir for open canals, dynamic equation of the water levels control, simulation of the water levels control in Simulink, functional diagram and dynamic response of the control system, results and Section III covers the future study and conclusion.

Materials and Methods
As mentioned in [1,14,15] the pivot weir or overshot gate is energy efficient, simple in terms of water flow and level measurement and controls in open canals. Because the authors have investigated the pivot weir or overshot gate for water levels control in open canals. The water levels control model is shown in Figure  1. The pivot weir operates in submerged in water condition and water level and flow measurement and controls realizes based on an equation relating to the water level [1,14]. Based on the Figure 1, a functional diagram of the water levels control system has been developed, that shown in Figure 2.

Figure 1. A pivot weir in open canals
The water level measurement sensor's output is electrical signal (Us) it is input to the comparison element (CE). Then CE calculates the difference between values of sensor output signal with the set point at CE that is water level value desired by person. If there is a difference (∆U) then PID controller generates corresponding signal (Ue) and ordered the value (φ) through stepper motor (SM) to open or close the pivot weir-changing angle (α). Consequently, gate angle (α) raising or lowering to open or close the pivot weir. The process of water levels control continues until difference (∆U) value is zero.

Results and Discussion
From the material balance, equation for the specified period 0 o 't is obtained as follows: where Q up, Q down, -upstream and downstream water flows (m 3 /s), A -is total flat area of the gate under hydrostatic pressure force. Upstream and downstream water flows are:    (4) The water levels h(t) we shall obtain by substituting equation (4) to equation (2) as follows: The equation (5) Then, taking into account (8) Here we need find the numerical values of the coefficients a and b. For this, we find the partial derivatives of expression (10) and we obtain:      (14) Finally, expression (12) can be transformed to the following form: To determine the numerical value of the transfer functions of the control object, you need to know the values of all quantities included in equation (14). Object parameters will be determined experimentally as follows: by condition, the nominal value of the water levels of the chosen canals , 1 Taking into account of above mentioned chosen canals coefficients differential equation of the control object is : (16) Corresponding transfer function of the control object is : To obtain the dynamic characteristics of the water levels control system, we will build a computer model in Simulink. Figure 3 shows a model of the system built in the Simulink environment. The dynamic response obtained from the Simulink model is shown in Figure 4.   As you can see, when the optimal value of the PID controller's parameter Kp = 0.75 is found, the regulation time is minimal and equal to 229 seconds, while the static regulation deviation is 7 %, which is less than the limitation value of 15%. Consequently, the developed water level control system with a regulator's transfer function equal to meets W reg (s)=0.75 to all the formulated requirements for the quality of regulation.

Conclusions
In accordance of the outcomes of the study, we can conclude that the mathematical model, the functional and structural diagrams of the system of regulation of the water level control in open canals have been developed, as well as a dynamic model in the Simulink environment has been developed and obtained the transfer functions of the control object by the control action, the equation of the dynamic process of object has been obtained. The transfer functions of the control system obtained from the simulation model corresponding to the first-order aperiodic link are determined. The problem of synthesis of the water levels control system is formulated and the optimal water levels control parameters are determined that meet the specified requirements. From the obtained curve ( Figure 4) it can be seen that the regulation time is approximately 229 seconds, while there is no overshoot. The control error is 7% and this fully meets the requirements of the water level control system in open canals. Therefore, we can conclude that the proposed system shows stable performance with a good margin.