An intelligent and efficient method for calculating gate flow
By establishing a general calculation formula for the gate's full flow state overflow capacity and a multi-layer feedforward neural network model, the critical point of the gate's flow state conversion is automatically identified, which solves the problem of large gate flow calculation errors in the existing technology and achieves a more efficient water volume scheduling.
Patent Information
- Application Number
- CN202210587101.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-26
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2042-05-26
AI Technical Summary
Due to insufficient nonlinear generalization capabilities and insufficient study of flow regime conversion conditions, the existing gate flow calculation method results in large calculation errors and cannot accurately achieve accurate and efficient water volume dispatching.
An intelligent and efficient calculation method is designed. By collecting and filtering gate operation data, a general calculation formula for the gate's full flow state flow capacity is established, and a multi-layer feedforward neural network model is used to automatically identify the critical points of flow state transition in holes and weirs. , calculate the gate comprehensive flow coefficient, thereby improving the accuracy of gate flow calculation.
This method significantly improves the accuracy of gate flow calculation, reduces errors, can accurately calculate gate flow under different hydraulic conditions, and supports accurate scheduling of long-distance water diversion projects.
Smart Images

Figure CN114896566B
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of water conservancy projects, and in particular to an intelligent and efficient method for calculating a gate flow rate. Background Art
[0002] Long-distance water diversion projects have long water lines, wide water supply ranges, and large water diversion flows. The gate is a key hydraulic control structure for controlling the operation of the water diversion channel and achieving smooth water diversion. Accurately calculating the gate flow capacity is a prerequisite for ensuring efficient water distribution and safe water diversion of the project, and achieving accurate and efficient water scheduling. The use of empirical formulas is currently the main way to determine the gate flow rate. However, in the actual operation of water diversion projects, due to different operating conditions, there are obvious changes in the hydraulic conditions before and after the gate, resulting in significant changes in the gate flow capacity. The traditional empirical calculation model for gate flow based on the known function form has insufficient nonlinear generalization ability, and the calculated gate flow rate is quite different from the measured value, with a relative error of more than 30%. In addition, there are two flow states in the gate flow: hole flow and weir flow, and its flow capacity changes significantly with the rapid conversion of flow states under the adjustment of operating conditions. It is generally believed that the conversion conditions of orifice and weir flow are related to the relative opening. The empirical practice is to take it as a fixed value. For example, a flat weir with a relative opening less than 0.65 is orifice flow, and a flat weir with a relative opening greater than 0.65 is weir flow; a practical weir with a relative opening less than 0.75 is orifice flow, and a practical weir with a relative opening greater than 0.75 is weir flow. However, in addition to being related to the relative opening, the flow pattern conversion conditions are also related to the gate type and upstream flow, and the demarcation criteria have not been fully studied so far. The wrong judgment of the flow pattern conversion conditions will inevitably introduce errors into the calculation of the flow through the gate. Summary of the invention
[0003] The purpose of the present invention is to overcome the shortcomings of the above-mentioned background technology and provide an intelligent and efficient method for calculating the flow rate through the gate, which can automatically identify the critical points of flow transition between different gate holes and weir flows.
[0004] To achieve the above object, the present invention provides an intelligent and efficient method for calculating gate flow rate, comprising the following steps:
[0005] S1: Collect gate layout parameters and gate operation monitoring data along the project;
[0006] S2: Screen and clean the gate operation monitoring data to eliminate the detection value jump caused by equipment power failure;
[0007] S3: Establish a general calculation formula for the full flow capacity of the gate;
[0008] S4: Plot the relationship between the gate flow rate and the relative opening, and determine the critical points of the gate hole flow to transition flow and the transition flow to weir flow;
[0009] S5: Based on the general calculation formula for the gate's full-flow capacity and the critical point of the orifice-weir flow pattern conversion, the gate's comprehensive flow coefficient is calculated, and the gate's comprehensive flow coefficient and the sample sequence consisting of the gate opening, gate flow, water depth before the gate, and water depth after the gate are randomly divided into a training set and a validation set;
[0010] S6: Based on the multi-layer feedforward neural network machine learning algorithm, a multi-layer feedforward neural network gate flow intelligent calculation model is built, and the model is trained using the training set;
[0011] S7: Use the validation set to verify whether the trained multi-layer feedforward neural network can accurately calculate the flow rate through the gate under different hydraulic conditions. At the same time, use the multivariate regression algorithm and the formula recommended by the specification to calculate the flow rate through the gate of the validation set, and compare the calculation results with those of the multi-layer feedforward neural network.
[0012] S8: Conduct sensitivity analysis and robustness judgment on the network parameters and network performance of the multilayer feedforward neural network, adjust the learning rate and the number of hidden layer elements of the multilayer feedforward neural network until the corresponding learning rate and the number of hidden layer elements are obtained when the calculation error is minimized; adjust the number of iterations of the multilayer feedforward neural network until the calculation error remains stable.
[0013] In the above technical solution, in step S1, the engineering layout parameters include hinge height, radius, bottom elevation, hole width, number of holes, pier thickness, and slope coefficient of the front channel section; the gate operation monitoring data includes gate opening, flow rate through the gate, water depth before the gate, and water depth after the gate.
[0014] In the above technical solution, in step S2, the principles for screening and cleaning the gate operation monitoring data are as follows:
[0015] S2.1: Exclude data when flow, opening, and water depth monitoring values are missing;
[0016] S2.2: Exclude data where the water depth before the gate is less than the water depth after the gate;
[0017] S2.3: Exclude the data corresponding to the gates with large differences in openings of different gate holes;
[0018] S2.4: Exclude data corresponding to relative opening less than 0.05.
[0019] In the above technical solution, in step S3, a general calculation formula for the full-flow capacity of the gate is established as follows:
[0020]
[0021] Where Q is the flow rate through the gate (m 3 / s); m is the gate comprehensive flow coefficient; b is the gate width (m); e is the gate opening (m); g is the gravitational acceleration (m / s 2 ) ; H0 is the water head before the gate (m); a is the flow state conversion parameter, a is 0-1;
[0022] When the flow state conversion parameter a=1, the gate flow state is hole flow, which is converted into the following formula:
[0023]
[0024] Where m is the gate comprehensive flow coefficient; b is the gate width (m); e is the gate opening (m); g is the gravitational acceleration (m / s 2 ); H0 is the water head before the gate (m);
[0025] When the flow state conversion parameter a=0, the gate flow state is weir flow, which is converted into the following formula:
[0026]
[0027] Where m is the gate comprehensive flow coefficient; b is the gate width (m); e is the gate opening (m); g is the gravitational acceleration (m / s 2 ); H0 is the water head before the gate (m).
[0028] In the above technical scheme, in step S4, the gate operation monitoring data obtained after screening is used to draw the relationship between the flow rate through different gates and the relative opening point by point, and a power exponential function is used to gradually fit the relationship curve between the flow rate through the gate and the relative opening starting from the minimum point of relative opening. The relative opening corresponding to the moment when the exponential term in the power exponential fitting function is closest to 1 is the critical point θ1 for the conversion of the gate hole flow to the transition flow state; the relative opening corresponding to the moment when the exponential term is closest to 0 is the critical point θ2 for the conversion of the gate transition flow state to the weir flow, thereby realizing automatic identification of different flow state conversion points of any gate.
[0029] In the above technical solution, in step S5, based on the identified critical point of hole weir flow pattern conversion, the gate comprehensive flow coefficient m is calculated by reverse calculation using the general calculation formula of the gate full flow pattern flow capacity:
[0030]
[0031]
[0032] Where Q is the flow rate through the gate (m 3 / s); m is the gate comprehensive flow coefficient; b is the gate width (m); e is the gate opening (m); g is the gravitational acceleration (m / s 2) ; H0 is the water head before the gate (m); a is the flow state conversion parameter, which is a dimensionless parameter; θ1 is the critical point of the conversion from the gate hole flow to the transition flow state, which is a dimensionless parameter; θ2 is the critical point of the conversion from the transition flow state to the weir flow, which is a dimensionless parameter;
[0033] 80% of the sample sequence consisting of the gate comprehensive flow coefficient obtained by back calculation and the gate opening, flow through the gate, water depth before the gate and water depth after the gate is randomly selected as the training set, and the remaining 20% is selected as the validation set.
[0034] In the above technical solution, in step S6, based on the multi-layer feedforward neural network machine learning algorithm, a multi-layer feedforward neural network gate flow intelligent calculation model is built, and the model is trained using a training set. The specific method is as follows:
[0035] S6.1: Neural network topology and parameter initialization, including the number of input layers, the number of hidden layer elements, the number of output layers, as well as the number of iterations, learning rate, input layer to hidden layer connection weights and thresholds, hidden layer to output layer connection weights and thresholds;
[0036] S6.2: Normalize the training set samples by using the mean and standard deviation of the gate opening, water depth before the gate, water depth after the gate, and gate comprehensive flow coefficient;
[0037] S6.3: Calculate the hidden layer output based on the training samples and the initial connection weights and thresholds from the input layer to the hidden layer:
[0038]
[0039] In the formula, H j is the hidden layer output value; x i are input values, which are the water depth before the gate (m), the water depth after the gate (m) and the gate opening (m); ω ij is the connection weight from the input layer to the hidden layer; t j is the threshold from the input layer to the hidden layer; n is the number of input layers, which takes a value of 3; l is the number of hidden layer elements; f is the hidden layer activation function, which uses the Sigmoid function as the activation function to map the input to the range of 0 to 1;
[0040] S6.4: Calculate the output layer based on the hidden layer output results and the initial connection weights and thresholds from the hidden layer to the output layer:
[0041]
[0042] In the formula, O k is the output value of the multi-layer feedforward neural network, which can be expressed by the gate comprehensive flow coefficient; ω j is the connection weight from the hidden layer to the output layer; t is the threshold from the hidden layer to the output layer; H jis the output value of the hidden layer; l is the number of hidden layer elements;
[0043] S6.5: According to the network output value O k and the measured value Y k Calculation error E k :
[0044] E k =Y k -O k
[0045] S6.6: According to the gradient descent theory, adjust the connection weights and thresholds in the grid according to the prediction error:
[0046]
[0047]
[0048] Where η is the learning rate, Δω represents the amount of connection weight adjustment required for the next training obtained by calculating the reverse feedback of the error according to the gradient descent theory; Δt represents the amount of threshold adjustment required for the next training obtained by calculating the reverse feedback of the error according to the gradient descent theory;
[0049] S6.7: Repeat steps S6.3 to S6.6 until the number of training times reaches the number of iterations.
[0050] In the above technical solution, in step S7, the validation set is used to evaluate the suitability of the trained multi-layer feedforward neural network, specifically: the validation set is used to verify whether the trained multi-layer feedforward neural network can accurately calculate the gate flow under different hydraulic conditions, and the multiple regression algorithm and the specification recommended formula are used to calculate the gate flow of the validation set, and the error between the gate flow obtained by the multiple regression algorithm and the specification recommended formula and the measured value is calculated, and the error of different gate flow calculation methods is compared. The specific method is as follows:
[0051] S 7.1: Input the gate opening, water depth before the gate and water depth after the gate in the validation set, use the trained multi-layer feedforward neural network to calculate the gate comprehensive flow coefficient, and use the general calculation formula of the gate's full flow state flow capacity to calculate the gate flow rate;
[0052] S 7.2: The multiple regression algorithm and the formula recommended by the specification are used to calculate the flow rate of the verification set. The multiple regression algorithm is to establish the gate comprehensive flow coefficient m and the relative opening e * and relative water depth H * The multiple regression formula is:
[0053]
[0054] Where: m is the gate comprehensive flow coefficient; H * is the relative water depth, which is equal to the water depth behind the gate divided by the water depth before the gate; e * is the relative opening, which is equal to the gate opening divided by the water depth in front of the gate; m1, m2, and m3 are calibration parameters, which are obtained by fitting based on the training set;
[0055] S 7.3: Calculate the error between the gate flow rate obtained by the multivariate regression algorithm and the formula recommended by the specification and the actual value, and the error between the gate flow rate obtained by the neural network and the actual value, and compare them according to the error values.
[0056] In the above technical solution, in step S7.3, if the error value between the gate flow rate obtained by using the multilayer feedforward neural network and the measured value is less than the error value between the gate flow rate calculated by using the multivariate regression algorithm or the formula recommended by the specification and the measured value, then the established multilayer feedforward neural network passes the verification; otherwise, return to step S2, review the screening and cleaning results of the gate operation monitoring data, exclude the flow and water level sequences with large monitoring data errors, and then proceed to the next step.
[0057] Compared with the prior art, the present invention has the following advantages:
[0058] Firstly, the present invention proposes a universal calculation formula for the flow capacity of the gate in all flow states. The calculation formula unifies the calculation formulas for the flow rate through the gate under hole flow, weir flow and transition flow states, making up for the deficiency of the traditional method that different formulas need to be used for calculation according to different flow states. The formula has good versatility, strong physical significance, and remains continuous near the flow state transition point.
[0059] Secondly, based on the universal calculation formula for the full-flow capacity of the gate, the present invention proposes an automatic identification method for the critical points of flow pattern transitions of different gate holes and weir flows, which overcomes the defects of traditional methods that do not consider the influence of gate layout types and artificially assume the critical points of gate flow pattern transitions.
[0060] Thirdly, based on the general formula for the flow capacity of all flow states and the critical points for the conversion of orifice and weir flow states, the present invention proposes a method for calculating the flow rate through the gate by using a multi-layer feedforward neural network to intelligently learn the changes in the comprehensive flow coefficient of the gate. The calculation accuracy of the flow rate through the gate by this method is significantly improved compared with the traditional formula, and the gate flow capacity under different hydraulic conditions and opening conditions can be better calculated, which has guiding significance for the precise scheduling of long-distance water diversion and regulation projects. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] Figure 1 It is a schematic diagram of the critical point identification of the hole weir flow state conversion of the present invention;
[0062] Figure 2 It is a topological relationship diagram of a multi-layer feedforward neural network;
[0063] Figure 3 This is a comparison diagram of the flow rate calculated using a multi-layer feedforward neural network and the measured value;
[0064] Figure 4 This is a comparison chart of the gate flow calculated by different methods and the measured value;
[0065] Figure 5 This is a parameter sensitivity analysis diagram for a multilayer feedforward neural network;
[0066] Figure 6 This is a robustness analysis diagram of a multi-layer feedforward neural network. DETAILED DESCRIPTION
[0067] The following is a detailed description of the implementation of the present invention in conjunction with the implementation cases, but they do not constitute a limitation of the present invention and are only given as examples. At the same time, the advantages of the present invention will become clearer and easier to understand through the description.
[0068] The present invention provides an intelligent calculation method for the flow rate of an engineering gate, comprising the following steps:
[0069] S1: Collect the engineering layout parameters of all gates along the long-distance water diversion project, including hinge height, radius, bottom elevation, hole width, number of holes, pier thickness, slope coefficient of the front section of the channel, etc., as well as the operation monitoring data of all gates every two hours from 2018 to 2021, including gate opening, flow rate through the gate, water depth before the gate, and water depth after the gate.
[0070] S2: Screen and clean the operation monitoring data to exclude the detection value jump caused by equipment power failure, etc. The screening principles are as follows:
[0071] (1) Exclude data when the monitoring values of flow, opening, water depth, etc. are missing;
[0072] (2) exclude data where the water depth before the gate is less than the water depth after the gate;
[0073] (3) Exclude the data corresponding to the gate openings with large differences between different gate openings;
[0074] (4) Excluding the data corresponding to the relative opening less than 0.05, it is considered that the gate is in an unstable adjustment state at this moment.
[0075] S3: Based on the traditional gate flow calculation formula, the general calculation formula for the gate's full flow capacity is derived. The specific steps include:
[0076] 3.1 Analysis of the empirical formula for flow through the gate under orifice flow and weir flow conditions:
[0077] Hole flow:
[0078] Weir Flow
[0079] Where m is the gate comprehensive flow coefficient; b is the gate width (m); e is the gate opening (m); g is the gravitational acceleration (m / s 2 ); H0 is the water head before the gate (m).
[0080] By analyzing the structure of formulas (1) and (2), it can be found that the difference between the calculation formulas for hole flow and weir flow is reflected in the relative opening e / H0.
[0081] 3.2 Introduce the exponential term a that reflects the change in flow pattern and establish a general calculation formula for the gate's full flow capacity:
[0082]
[0083] Where Q is the flow rate through the gate (m 3 / s); m is the gate comprehensive flow coefficient; b is the gate width (m); e is the gate opening (m); g is the gravitational acceleration (m / s 2 ); H0 is the water head before the gate (m); a is the flow state conversion parameter, a is 0-1; a is a parameter that reflects the effect of gate flow state changes on the flow capacity, named flow state conversion parameter. When the flow state conversion parameter is equal to 1, formula (3) is converted to gate hole outflow calculation formula (1); when the flow state conversion parameter is equal to 0, formula (3) is converted to weir flow calculation formula (2); when the flow state conversion parameter is between 0 and 1, the gate is in a transitional flow state, and at this time, formula (3) calculates the gate flow rate under the gate transitional flow state.
[0084] S4: According to the derived general calculation formula for the full flow capacity of the gate, when the gate flow state is hole flow, there should be a significant statistical significance between the flow rate through the gate and the first power of the relative opening; when the gate flow state is weir flow, there should be a significant statistical significance between the flow rate through the gate and the zero power of the relative opening. Based on this law, the relationship between the flow rate through the gate and the relative opening of different gates is plotted point by point using the operation observation data obtained after screening, and the power exponential function is used to gradually fit the relationship curve between the flow rate through the gate and the relative opening starting from the minimum point of the relative opening. It is believed that the relative opening corresponding to the moment when the exponential term in the power exponential fitting function is closest to 1 is the critical point θ1 of the conversion from the hole flow to the transition flow state of the gate; the relative opening corresponding to the moment when the exponential term is closest to 0 is the critical point θ2 of the conversion from the transition flow state to the weir flow of the gate. This realizes the automatic identification of the critical point of the conversion of the hole weir flow flow state of any gate, such as Figure 1 shown.
[0085] S5: Based on the critical point of orifice-weir flow pattern conversion obtained by identification, the gate comprehensive flow coefficient is calculated by reverse calculation using the general calculation formula (3) for the gate full flow pattern flow capacity:
[0086]
[0087]
[0088] Where Q is the flow rate through the gate (m 3 / s); m is the gate comprehensive flow coefficient; b is the gate width (m); e is the gate opening (m); g is the gravitational acceleration (m / s 2 ), H0 is the water head before the gate (m), a is the flow state conversion parameter, which is a dimensionless parameter, θ1 is the critical point of the conversion from the gate hole flow to the transition flow state, which is a dimensionless parameter, and θ2 is the critical point of the conversion from the transition flow state to the weir flow, which is a dimensionless parameter.
[0089] 80% of the random sample sequence consisting of the gate comprehensive flow coefficient obtained by back calculation and the gate opening, water depth before the gate, water depth after the gate and flow rate through the gate are used as training samples, and the remaining 20% are used as verification samples.
[0090] S6: Based on the multi-layer feedforward neural network machine learning algorithm, an intelligent calculation model for gate flow is constructed. The specific steps are as follows:
[0091] S6.1: Neural network topology and parameter initialization, including the number of input layers, the number of hidden layer elements, the number of output layers, as well as the number of iterations, learning rate, input layer to hidden layer connection weights and thresholds, hidden layer to output layer connection weights and thresholds, such as Figure 2 As shown in the figure, the number of iterations is initialized to 5000, the learning rate is 0.01, and the number of hidden layer elements is 8.
[0092] S6.2: Normalization of training samples. To eliminate the impact of the magnitude differences of different input variables among training samples on the training results, the gate opening, water depth before the gate, water depth after the gate and comprehensive flow coefficient are normalized by their mean and standard deviation respectively.
[0093] S6.3: Calculate the hidden layer output based on the training samples and the initial connection weights and thresholds from the input layer to the hidden layer:
[0094]
[0095] In the formula, H j is the hidden layer output value; x i is the input value; ω ij is the connection weight from the input layer to the hidden layer; t j is the threshold from the input layer to the hidden layer; n is the number of input layers, which is equal to 3, representing the gate opening, the water depth before the gate, and the water depth after the gate; l is the number of hidden layer elements; f is the hidden layer activation function, and the Sigmoid function is used as the activation function to map the input to the range of 0 to 1.
[0096] S6.4: Calculate the output layer based on the hidden layer output results and the initial connection weights and thresholds from the hidden layer to the output layer:
[0097]
[0098] In the formula, O k is the output value of the multi-layer feedforward neural network, which can be expressed by the gate comprehensive flow coefficient; ω j is the connection weight from the hidden layer to the output layer; t is the threshold from the hidden layer to the output layer; H j is the output value of the hidden layer; l is the number of hidden layer elements.
[0099] S6.5: According to the network output value O k and the measured value Y k Calculation error E k :
[0100] E k =Y k -O k (6)
[0101] S6.6: According to the gradient descent theory, adjust the connection weights and thresholds in the grid according to the prediction error:
[0102]
[0103] Where η is the learning rate, Δω represents the amount of connection weight adjustment required for the next training obtained by calculating the reverse feedback of the error according to the gradient descent theory; Δt represents the amount of threshold adjustment required for the next training obtained by calculating the reverse feedback of the error according to the gradient descent theory;
[0104] S 6.7: Repeat steps S 6.3 to S 6.6 until the number of training times reaches the number of iterations.
[0105] S7: Based on the validation set, verify whether the trained multi-layer feedforward neural network can accurately calculate the flow rate through the gate under different hydraulic conditions. At the same time, use the multivariate regression algorithm and the formula recommended by the specification to calculate the flow rate through the gate of the validation set, and compare the calculation results with the calculation results of the multi-layer feedforward neural network. The specific steps are as follows:
[0106] S7.1: Input the gate opening, water depth before the gate, and water depth after the gate in the validation set, use the trained multi-layer feedforward neural network to calculate the gate comprehensive flow coefficient, and use the general calculation formula for the gate's full flow capacity to calculate the gate flow. The comparison results with the measured flow in the validation set show that the two are in good agreement ( Figure 3 ).
[0107] S7.2: The multiple regression algorithm and the formula recommended by the specification are used to calculate the flow rate of the validation set. The multiple regression algorithm is to establish the gate comprehensive flow coefficient m and the relative opening e * and relative water depth H * The multiple regression formula is:
[0108]
[0109] Where: m is the gate comprehensive flow coefficient; H * is the relative water depth, which is equal to the water depth behind the gate divided by the water depth before the gate; e * is the relative opening, which is equal to the gate opening divided by the water depth in front of the gate; m1, m2, and m3 are calibration parameters, which are obtained by fitting the training set. According to the multivariate regression formula of the gate comprehensive flow coefficient, the flow through the gate under different hydraulic conditions in the validation set can be calculated.
[0110] The gate comprehensive flow coefficient in the standard formula is composed of the flow coefficient, lateral contraction coefficient and submergence coefficient. Different formulas are used to calculate the gate comprehensive flow coefficient according to different flow patterns. For specific formulas, please refer to the relevant design specifications (Sluice Design Specification SL 265-2016). Based on the calculated gate comprehensive flow coefficient, the gate flow under different hydraulic conditions can be calculated and verified.
[0111] S7.3: Compare the relationship between the flow rate through the gate calculated by different calculation methods and the measured flow rate through the gate, such as Figure 4 As shown in the figure, the flow rate through the gate calculated based on the multivariate regression algorithm or the standard formula is quite different from the measured value, and the scatter points of the calculated flow rate through the gate and the measured flow rate through the gate deviate significantly from the 1:1 line. The flow rate through the gate calculated based on the multi-layer feedforward neural network machine learning algorithm is in good agreement with the measured value, and the scatter points of the calculated flow rate through the gate and the measured flow rate through the gate are basically distributed near the 1:1 line.
[0112] S8: Perform sensitivity analysis and robustness judgment on the multi-layer feedforward neural network to determine whether the selection of key parameters is appropriate. The specific steps are as follows:
[0113] S8.1: Adjust the learning rate and the number of hidden layer elements, recalculate steps S6 and S7, and study the impact of changes in key parameters of the neural network on the calculation accuracy of the flow through the gate. The results are as follows: Figure 5 As shown in the figure, the calculation results show that the network calculation accuracy increases first and then decreases with the increase of learning rate. If the learning rate is too small, the network converges slowly; if the learning rate is too large, the network is over-corrected. At a low learning rate, the calculation accuracy is proportional to the number of hidden layer elements, and at a large learning rate, the calculation accuracy is inversely proportional to the number of hidden layer elements. At a large learning rate, too many hidden neurons will lead to overfitting.
[0114] S8.2: Adjust the number of iterations, recalculate steps S6 and S7, and study the effect of the change in the number of iterations of the multi-layer feedforward neural network on the calculation accuracy of the flow through the gate. The results are as follows: Figure 6 The calculation results show that when the number of iterations is small, the relative error of the calculated flow through all gates decreases with the increase of network training times, but when the number of iterations exceeds 1000, the accuracy of the calculated flow through all gates is not significantly improved.
[0115] The above are only specific embodiments of the present invention. It should be pointed out that any changes or substitutions that can be easily thought of by any technician familiar with the field within the technical scope disclosed by the present invention should be covered within the protection scope of the present invention, and the rest not described in detail belong to the prior art.
Claims
1. An intelligent and efficient method for calculating gate flow, characterized in that: The steps include: S1: Collect gate layout parameters and gate operation monitoring data along the project; S2: Screen and clean the gate operation monitoring data to eliminate the detection value jump caused by equipment power failure; S3: Establish a general calculation formula for the full flow capacity of the gate; S4: Plot the relationship between the gate flow rate and the relative opening, and determine the critical points of the gate hole flow to transition flow and the transition flow to weir flow; S5: Based on the general calculation formula for the gate's full-flow capacity and the critical point of the orifice-weir flow pattern conversion, the gate's comprehensive flow coefficient is calculated, and the gate's comprehensive flow coefficient and the sample sequence consisting of the gate opening, gate flow, water depth before the gate, and water depth after the gate are randomly divided into a training set and a validation set; S6: Based on the multi-layer feedforward neural network machine learning algorithm, a multi-layer feedforward neural network gate flow intelligent calculation model is built, and the model is trained using the training set; S7: Use the validation set to verify whether the trained multi-layer feedforward neural network can accurately calculate the flow rate through the gate under different hydraulic conditions. At the same time, use the multivariate regression algorithm and the formula recommended by the specification to calculate the flow rate through the gate of the validation set, and compare the calculation results with those of the multi-layer feedforward neural network. S8: Perform sensitivity analysis and robustness judgment on the network parameters and network performance of the multi-layer feedforward neural network, adjust the learning rate and the number of hidden layer elements of the multi-layer feedforward neural network until the learning rate and the number of hidden layer elements corresponding to the minimum calculation error are obtained; adjust the number of iterations of the multi-layer feedforward neural network until the calculation error remains stable; Among them, in the step S3, the general calculation formula for the full flow state flow capacity of the gate is established as follows: Where Q is the flow rate through the gate (m 3 / s); m is the gate comprehensive flow coefficient; b is the gate width (m); e is the gate opening (m); g is the gravitational acceleration (m / s 2 ); H0 is the water head before the gate (m); a is the flow state conversion parameter, a is 0-1; When the flow state conversion parameter a=1, the gate flow state is hole flow, which is converted into the following formula: Where m is the gate comprehensive flow coefficient; b is the gate width (m); e is the gate opening (m); g is the gravitational acceleration (m / s 2 ); H0 is the water head before the gate (m); When the flow state conversion parameter a=0, the gate flow state is weir flow, which is converted into the following formula: Where m is the gate comprehensive flow coefficient; b is the gate width (m); e is the gate opening (m); g is the gravitational acceleration (m / s 2 ); H0 is the water head before the gate (m); In the step S4, the gate operation monitoring data obtained after screening is used to draw the relationship between the flow rate through different gates and the relative opening point by point, and the power exponential function is used to gradually fit the relationship curve between the flow rate through the gate and the relative opening starting from the minimum relative opening point. The relative opening corresponding to the moment when the exponential term in the power exponential fitting function is closest to 1 is the critical point θ1 of the gate hole flow to the transition flow state conversion; the relative opening corresponding to the moment when the exponential term is closest to 0 is the critical point θ2 of the gate transition flow state conversion to the weir flow, thereby realizing the automatic identification of different flow state conversion points of any gate; In step S5, based on the identified critical point of orifice-weir flow pattern conversion, the gate comprehensive flow coefficient is calculated by reverse calculation using the general calculation formula for the full flow pattern flow capacity of the gate: Where Q is the flow rate through the gate (m 3 / s); m is the gate comprehensive flow coefficient; b is the gate width (m); e is the gate opening (m); g is the gravitational acceleration (m / s 2 ) ; H0 is the water head before the gate (m); a is the flow state conversion parameter, which is a dimensionless parameter; θ1 is the critical point of the gate hole flow to the transition flow state conversion, which is a dimensionless parameter; θ2 is the critical point of the transition flow state to the weir flow conversion, which is a dimensionless parameter; 80% of the sample sequence consisting of the gate comprehensive flow coefficient obtained by back calculation and the gate opening, flow through the gate, water depth before the gate and water depth after the gate is randomly selected as the training set, and the remaining 20% is selected as the validation set.
2. The intelligent and efficient method for calculating gate flow rate according to claim 1 is characterized in that: In step S1, the engineering layout parameters include hinge height, radius, bottom elevation, hole width, number of holes, pier thickness, and slope coefficient of the front channel section; the gate operation monitoring data includes gate opening, flow through the gate, water depth before the gate, and water depth after the gate.
3. The intelligent and efficient method for calculating gate flow rate according to claim 2 is characterized in that: In step S2, the principles for screening and cleaning the gate operation monitoring data are as follows: S2.1: Exclude data when flow, opening, and water depth monitoring values are missing; S2.2: Exclude data where the water depth before the gate is less than the water depth after the gate; S2.3: Exclude the data corresponding to the gates with large differences in openings of different gate holes; S2.4: Exclude data corresponding to relative opening less than 0.
05.
4. The intelligent and efficient method for calculating gate flow rate according to claim 1 is characterized in that: In step S6, based on the multi-layer feedforward neural network machine learning algorithm, a multi-layer feedforward neural network gate flow intelligent calculation model is built, and the model is trained using the training set. The specific method is as follows: S6.1: Neural network topology and parameter initialization, including the number of input layers, the number of hidden layer elements, the number of output layers, as well as the number of iterations, learning rate, input layer to hidden layer connection weights and thresholds, hidden layer to output layer connection weights and thresholds; S6.2: Normalize the training set samples by using the mean and standard deviation of the gate opening, water depth before the gate, water depth after the gate, and gate comprehensive flow coefficient; S6.3: Calculate the hidden layer output based on the training samples and the initial connection weights and thresholds from the input layer to the hidden layer: In the formula, H j is the hidden layer output value; x i are input values, which are the water depth before the gate (m), the water depth after the gate (m) and the gate opening (m); ω ij is the connection weight from the input layer to the hidden layer; t j is the threshold from the input layer to the hidden layer; n is the number of input layers, which takes a value of 3; l is the number of hidden layer elements; f is the hidden layer activation function, which uses the Sigmoid function as the activation function to map the input to the range of 0 to 1; S6.4: Calculate the output layer based on the hidden layer output results and the initial connection weights and thresholds from the hidden layer to the output layer: In the formula, O k is the output value of the multi-layer feedforward neural network; ω j is the connection weight from the hidden layer to the output layer; t is the threshold from the hidden layer to the output layer; H j is the hidden layer output value; l is the number of hidden layer elements; S6.5: According to the network output value O k and the measured value Y k Calculation error E k : AND k =And k -EITHER k S6.6: According to the gradient descent theory, adjust the connection weights and thresholds in the grid according to the prediction error: In the formula, η is the learning rate, and Δω represents the adjustment amount of the connection weight required in the next training obtained by calculating the reverse feedback of the error according to the gradient descent theory; Δt represents the threshold adjustment required for the next training, obtained by calculating the error reverse feedback according to the gradient descent theory; S6.7: Repeat steps S6.3 to S6.6 until the number of training times reaches the number of iterations.
5. The intelligent and efficient method for calculating gate flow rate according to claim 1 is characterized in that: In step S7, the validation set is used to evaluate the suitability of the trained multilayer feedforward neural network. Specifically, the validation set is used to verify whether the trained multilayer feedforward neural network can accurately calculate the gate flow under different hydraulic conditions. At the same time, the gate flow of the validation set is calculated using a multiple regression algorithm and a formula recommended by the specification, and the error between the gate flow obtained by the multiple regression algorithm and the formula recommended by the specification and the measured value is calculated. The error of different gate flow calculation methods is compared. The specific method is as follows: S 7.1: Input the gate opening, water depth before the gate and water depth after the gate in the validation set, use the trained multi-layer feedforward neural network to calculate the gate comprehensive flow coefficient, and use the general calculation formula of the gate's full flow state flow capacity to calculate the gate flow rate; S 7.2: The multiple regression algorithm and the formula recommended by the specification are used to calculate the flow rate of the validation set. The multiple regression algorithm is to establish the gate comprehensive flow coefficient m and the relative opening e * and relative water depth H * The multiple regression formula is: Where: m is the gate comprehensive flow coefficient; H * is the relative water depth, which is equal to the water depth behind the gate divided by the water depth before the gate; e * is the relative opening, which is equal to the gate opening divided by the water depth in front of the gate; m1, m2, and m3 are calibration parameters, which are obtained by fitting based on the training set; S 7.3: Calculate the error between the gate flow rate obtained by the multivariate regression algorithm and the formula recommended by the specification and the actual value, and the error between the gate flow rate obtained by the neural network and the actual value, and compare them according to the error values.
6. The intelligent and efficient method for calculating gate flow rate according to claim 5 is characterized in that: In step S7.3, if the error between the gate flow rate obtained by using the multilayer feedforward neural network and the measured value is less than the error between the gate flow rate calculated by using the multivariate regression algorithm or the formula recommended by the specification and the measured value, the established multilayer feedforward neural network passes the verification; Otherwise, return to step S2 to review the gate operation monitoring data screening and cleaning results.
