Online Model Identification Of Open-Channel System With High Order IDZ Model

In the control of open-channel, it is difficult to estimate wave propergation time because of the complexity of reflection, superposition and energy attenuation of shallow water waves. Although SaintVenant equation have reasonable accuracy in describing the motion law of unsteady flow, mathematically it is the first order quasilinear hyperbolic partial differential equations which makes it difficult to be used as control model in the design optimized controller. The Channel Integrator Delay Zero (IDZ) model linearizes the Saint-Venant equation and ensures the accuracy of the response of water level and discharge in high frequency band. However, there is still a considerable difference between the theoretical value and the actual response. In order to avoid this difference caused by theoretical derivation, this paper uses the single channel model of Zhanghe Irrigation District to play online identification of the relevant parameters by using the existing periodic response process of the canal system. The reliability of model identification under step water intake is verified, and the effect of this method on periodic water intakes in long channel is verified. The results show that the identified model can catch most dynamic action of the canal system with water intakes, which ensures its validity to be used for controller design. Meanwhile, it is simple in application.


Introduction
With the continuous development of economy and society, water resources are becoming increasingly scarce. It is becoming more and more important to use and manage the available water resources rationally and effectively. The lack of water and the uneven distribution of water resources are the basic water conditions in China [1]. At the same time, there are some problems such as extensive utilization of water resources. For example, the effective utilization coefficient of farmland irrigation water is only 0.50, and the remarkable volume loss of water in canal system is one of the reasons for the low coefficient. According to the U.S. Bureau of Reclamation, 20%-30% of the water loss in the open-canal system is caused by poor or improper operation of the canal system [2]. In order to avoid the odds of slow response due to manual operation, inaccurate water supply and unfavorable coordination among management agencies, the implementation of automatic operation control of the canal system has become particularly critical.
The control algorithm is the essential part of the canal automation, which describes the entire logic process from input channel information (water level, flow) to output control (gate motion) [3]. Its development can be divided into three stages: the classical control theory stage is mainly based on PID class control algorithm, such as EL-FLO+Reset algorithm [4], P+PR controller [5][6][7][8] and so on. The modern control theory stage mainly studies the nonlinear system control algorithm of multiple input multiple output (MIMO) [9], such as designing the controller based on the LQR optimal control principle [10,11] and studying its performance. In the stage of intelligent control theory, a series of complex control algorithms have been developed in the field of canal automatic control, such as predictive control [12], neural network [13,14], and fuzzy control [15][16][17].
In canal system operation, the Saint-Venant equation is used to describe the dynamic property of water flow in canal pool, which is a set of nonlinear partial differential equations. And it is difficult to be used in control design. The usual method is to linearize the Saint-Venant equation [18,19]. In 1995, Schuuramns [20] proposed the firstorder linear model (ID model) for open channel flow, using two parameters to capture the low-frequency behavior of the system. The results show that it is effective to approximate Saint-Venant equation with ID model at low frequency. However, the method of obtaining approximate parameters is relatively rough and needs to be improved [21]. In 2004, Litrico et al. put forward the Integrator Delay Zero (IDZ) model [22,23] based on the ID model to characterize the low-frequency and highfrequency response of the channel, which is intended to be applicable to any operating flow. Similarly, the key of IDZ model is to obtain the parameters, but the existing methods for parameter calculation through theoretical analysis are too complex.
System identification method is to identify the input and output signal data obtained by dynamic testing of the system and select the best fitting model [24,25] in a group of model classes according to some chosen criteria. Simple differential or difference mathematical equations can be obtained without any precise physical mechanism. It is suitable for controller design, prediction and fault detection purpose [26]. In 2007 Cantoni et al. [27], Litrico, Malaterre et al. [28], 2005 Litrico, Fromion et al. [19], Van Overloop, Schuurmans et al. [29], 2011 Nasir, Muhammad [30], 2009 Negenborn, Van Overlook et al. [31], 2008 Ooi, Weyer [32],2001, Weyer [33] and others have proved that the system identification and control system can improve the service quality and water distribution efficiency of irrigation canals. Yang and Wang [34] both studied the principle and method of dynamic system parameter identification for gate (valve) characteristics of South-to-North Water Transfer Project of China in 2011, and validated them with measured data. However, there are few studies on the system identification of water level and flow control in irrigation canal system. In this paper, by means of system identification, the small-size canal of Zhanghe irrigation district is selected for linear model identification, and the mathematical model between water level and discharge is obtained through simulation data identification. Meanwhile, the application effect of high-order model in long channel reach is discussed. The results show that the process of obtaining channel model parameters is simpler and more effective by system identification method, which ensures online modeling and controller design in further research.

IDZ model of Open-channel system
In the IDZ model [20], the integrator delay is used to represent the low frequency, and the zero reflects the direct effect of the flow on the water level at high frequencies. The model is derived from an accurate mathematical approximation of the Saint-Venant transfer matrix and is designed to reproduce the channel response of the system in any flow state, including backwater flow configuration. Compared with the ID model, the IDZ model provides more accurate delay approximation and integrator gain. By increasing the integrator delay zero and the integrator zero in the high frequency to compensate for the deviation of the ID model in the high frequency band, it can capture more high frequency dynamic information. At the same time, the accuracy of time domain simulation can be improved.
In order to simplify the IDZ model for controller design and optimization, linear input and output are used. The IDZ model takes into account the deviation between the hydraulic variables and the stable values of the canal pool. The flow Q 0 and the water depth Y 0 (x) along the canal reach are used to represent the deviation, and the corresponding deviation is expressed by the response of the lowercase letters. The IDZ model describes the relationship between upstream water level y(X,s) and upstream flow q(0,s) and downstream flow q(X,s): (1) The model input variable is the deviation of the upstream inflow and downstream outflow from the initial flow Q 0 , which are respectively q(0,t), q(x,t), where x is the length of the channel; (2) The output variable is the deviation between the upstream, downstream water depths and the initial water depths Y 0 (0) and Y 0 (x): y(0, t), y(x, t). In the Laplace domain, the input and output of the model are correlated with a 2× 2 transfer matrix P(s) and the parameter p ij (s) is introduced. ( ) s p 22 in the high frequency transfer function respectively. In order to identify the time response of the model, the IDZ time domain model is introduced, and the frequency domain model of IDZ is written as an ordinary differential equation with input delay: Where h(t) is the water level of backwater area and it is the intermediate variable, the initial value h(0)=0; y(X,s) is the model output; q(0,t) and q(X,t) are the model inputs. The ordinary differential equation is rewritten as a discrete time system identification format as follows. Where t = 1, 2, 3, ..., L . L is the data length; the parameter to be identified is θ=[a1 b1 b2 b3] T .

Online Model Identification
System identification determines the mathematical model describing the dynamic characteristics of a system or process by observing the input-output relationship of the system or process [35]. In order to get the estimated value of model parameter θ, the method of stepwise approximation is usually adopted.
At k time, the output ( ) k ẑ of the model is calculated according to the estimated parameters of the previous time, that is, the system output forecast value. The system output value z(k) and the input value h(k) of the identification expression can be measured, and the prediction error ( )  Figure 2.
In this paper, the identification method is used to identify the equation error, i.e. the least squares identification method. The model parameters are estimated by minimizing the criterion function.
Where ε(k) is the deviation of the model output from the system output, i.e. the model residual. The least squares (LS) method is robust, easy to implement and small in computation. The experimental data used for identification need not be excessive, because too much data cannot improve the accuracy of identification. For the high-order model, the performance of least squares is obviously better than other identification methods, and it has a reliable convergence. The IDZ model is a high-order model. In this paper, the least square algorithm is used to identify the parameters of channel system model.  k (1,2,...,L)} be the linear function of the parameter θ, and h(k) is the observable data vector. According to the criterion function, when a minimum parameter estimate is reached, it is called the least squares estimate of the model parameter θ.
In order to make the system identification process simple, the channel system is simplified into a discrete time system. Compared with the continuous model, the difference equation obtained by the discrete model is essentially algebraic, which is easier to calculate and identify than the differential model. When using the least squares algorithm for system identification, the block diagram is shown in Figure 3.

Scenario set
The small size channel model was drawn from Zhanghe Irrigation District, with a total length of 9300 m. There are a large number of farming bridges, culverts and intakes in the simulation channel. The simplified channel geometric parameters and hydraulic characteristics are shown in Table 1.
The large size channel model selects the single channel pool model of Jingshi section of the middle route of South-to-North Water Transfer Project of China, and the channel parameters are shown in Table1 lagre size . The periodic condition of Zhanghe irrigation area is shown in Figure 4 and Figure 5, and the identification condition is shown in Figure 6. The initial flow rate of the canal pool is 34 m 3 /s under the periodic flow condition which needs to be identified by the long canal model, and the specific flow condition is shown in Figure 7.

Results and Discussions
The transition process of the parameters to be estimated in the Zhanghe Irrigation District is shown in Figure 8. The identified parameter is [ ] 0.008 , 0.0011 , 0.0001 , 0.9993 -= θ T . All the parameters to be estimated are basically stable in the 6th hour after the start of the simulation, and the flow change starts at the 4th hour after the start of the square matrix. That is, the data length of two hours can stabilize the model parameters.
Comparing the downstream water level response process line, the model mean square error is 1.6 × 10 -5 , and the identified IDZ model can simulate the water level change very well. The input of the identification condition is shown in Figure 9. The simulation effect of the IDZ model is also good. Compared with the simulated water level calculated by the Preismann four-point differential implicit format [36], the IDZ model has a mean square error of 3.137 × 10 -5 . The step flow condition input is verified by the model, and the output of the IDZ model is very close to the output of the Saint-Venant simulation model. It is further proved that the IDZ model is reliable for simulating and predicting the water level response of the pool in the backwater area.
In the long channel model, input the periodic flow conditions to be identified and identify the parameter is T . The IDZ model can simulate the fluctuation of the water level with the flow rate, and the mean square error is 0.964× 10 -3 . Whether the downstream water level rises or decreases due to flow, the IDZ model can accurately simulate the water level changes of the two processes. As the channel size increases, the IDZ model increases the variance, but in the actual channel control, it is still within the acceptable range. The IDZ model can better characterize the water wave motion in the channel.

Conclusions and prospects
In this paper, system parameter identification theory is applied to the canal modeling for automatic control, and the parameters in the model are calculated automatically by the identification method. With the arguments above , We can draw the following conclusions： (1) The Saint-Venant partial differential equations can be replaced by linear model for controller design, and parameter of the controller model can be effectively identified via field data. Results show that the identification process is stable and fast . Besides, the fitting parameters of the identified model parameters are relatively high.
(2) High-order IDZ model can accurately simulate the trend of water level change with satisfying information of the high frequency behavior of the channel pool. And it is more sensitive to the movement of water waves in the channel . Meanwhile, the IDZ model has higher accuracy in time domain simulation. It provides an appropriate accurate model for the relationship between the water level and the flow input. In the channel operation, the gate can be controlled according to the relationship between them, which can be used to design the channel controller.
(3) The IDZ model uses zero to reflect response of water level at high frequencies flow directly . In order to ensure the reliable convergence, strong robustness and small amount of calculation, the least square method is used to identify system parameters. Under the validation condition of canal model in Zhanghe irrigation area, the mean square deviation of the identified water level response is 3.137× 10 -5 . The results of parameter fitting using the least squares method are better.
However, in the actual canal system, the channel operator usually needs to control the entire channel network, and each channel has a coupling relationship with each other. In this paper, the effect of parameter identification for single-cell pool control is studied. After the availability of least squares method is verified, the next step can be used to identify and simulate the series multi-channel model to enhance the practicability.