An open channel flat gate passing flow prediction and flow control system and method based on parameter intelligent rating

By improving the particle swarm optimization algorithm and the closed-loop technology of fuzzy PID control, the uncertainty problem of flow control through open channel flat gates was solved, achieving high-precision and stable flow prediction and control effects, which is suitable for the automation transformation of farmland irrigation channels.

CN122085643APending Publication Date: 2026-05-26JIANGSU UNIV +1

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
JIANGSU UNIV
Filing Date
2026-02-10
Publication Date
2026-05-26

AI Technical Summary

Technical Problem

In the existing technology, the flow control model for open channel flat gates is affected by factors such as channel cross-section, roughness, local hydraulic loss of the gate, and changes in operating conditions, resulting in large prediction errors, insufficient flow control accuracy, and instability of the model under complex construction and disturbance conditions, leading to low control efficiency.

Method used

By adopting a closed-loop technical approach of data acquisition, flow regime discrimination, parameter calibration, and opening inverse calculation, and using an improved particle swarm optimization algorithm with a compression factor for parameter calibration, combined with fuzzy PID control, stable flow regime discrimination and robust opening control are achieved, reducing systematic deviations and improving flow control accuracy and stability.

Benefits of technology

It achieves stable flow control under changing operating conditions and disturbances, improves the accuracy of flow prediction and the engineering applicability of the flow control system, reduces the computational burden of iterative solutions, and enhances the adaptability to water level disturbances and actuator friction hysteresis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122085643A_ABST
    Figure CN122085643A_ABST
Patent Text Reader

Abstract

This invention discloses a system and method for predicting and controlling the flow through a flat gate in an open channel based on intelligent parameter calibration. The system includes a data acquisition module that obtains the gate opening, upstream and downstream water levels, and measured flow through the gate, and performs sliding median filtering on the data. A flow pattern discrimination module determines the outflow condition of the gate based on the relative opening, calculates the discrimination quantity, and combines the hysteresis band to achieve stable discrimination between free outflow and submerged outflow. A parameter calibration module constructs objective functions for both free outflow and submerged outflow conditions, and uses an improved particle swarm optimization algorithm with a compression factor to calibrate the parameters and obtain the optimal solution. An opening inverse calculation module receives the target flow and calculates the target gate opening. An opening control module performs fuzzy inference on the opening tracking error and equivalent flow deviation, and outputs a control quantity to drive the gate actuator. This invention can quickly obtain adaptive model parameters when the channel and operating conditions change, improving the stability of flow control and engineering feasibility.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of water flow control technology for open channel gates in farmland irrigation, and in particular to a system and method for predicting and controlling the flow through a flat gate in an open channel based on intelligent parameter calibration. Background Technology

[0002] In open irrigation canal systems, flat gates are commonly used for water distribution and regulation. During actual operation, the flow rate through the gate is not only related to the gate opening, but also closely influenced by upstream and downstream water levels, canal hydraulic conditions, and operating conditions, and may switch between free outflow and submerged outflow. Solving the key issues of flat gate flow control is of great significance for improving field water distribution efficiency and reducing reliance on manual regulation.

[0003] A Chinese patent (CN113050565A) discloses a gate control method, device, electronic equipment, and storage medium for open channel flat gates. This method acquires a set of state parameters of the gate to be processed, inputs these parameters into a preset control model to obtain control data for the gate, and then controls the gate based on this data. The problem with this gate flow control system is that, due to factors such as channel cross-section, roughness, local hydraulic losses at the gate, and changes in operating conditions, key coefficients in the model often have significant uncertainties, leading to increased prediction errors and further insufficient flow control accuracy. Furthermore, due to complex construction, mechanical operation, and unforeseen disturbances, these models are not always effective, resulting in low gate control efficiency.

[0004] Chinese patent (CN119335879A) discloses an automatic regulation system for irrigation district sluice gates based on fuzzy logic control. Taking the irrigation district as the target scale, it first calculates the regional load state based on flow and pressure, then selects combinations of gate opening and closing angles and durations, and combines environmental factors, water level threshold settings, and flow prediction. Finally, it uses error analysis results to provide feedback adjustments to the gate opening and closing, achieving automatic balance control of water flow in the irrigation district. The problems with the above flow prediction are: a lack of stable discrimination of free / submerged outflow boundaries and reproducible calibration of key coefficients in the mechanism model; reliance on long-term historical samples and training processes; and insufficient constraints on model interpretability and physical feasibility.

[0005] Therefore, there is an urgent need for a system and method that can intelligently calibrate the key parameters of the gate flow model by combining measured data, and on this basis realize stable flow state discrimination, target opening degree analytical back calculation and robust opening degree closed-loop control, so as to improve the accuracy, stability and engineering applicability of open channel flat gate flow prediction and control. Summary of the Invention

[0006] The purpose of this invention is to provide a system and method for predicting and controlling the flow through a flat gate in an open channel based on intelligent parameter calibration. Through a closed-loop technical route of "data acquisition - flow state discrimination - parameter calibration - opening degree back calculation - opening degree control", stable and feasible flow control can be achieved under conditions of changing operating conditions and disturbances.

[0007] The present invention achieves the above-mentioned technical objectives through the following technical means.

[0008] A method for predicting and controlling flow through a flat gate in an open channel based on intelligent parameter calibration:

[0009] Collect gate opening Upstream water level Downstream water level and measured traffic ;

[0010] Calculate relative opening ,when At that time, calculate the conjugate water depth after the contraction section jump. And construct hydraulic discrimination quantities ,in accordance with With hysteresis bandwidth The magnitude relationship determines whether the flow regime is free outflow or submerged outflow; among which, This is the relative opening threshold;

[0011] A free outflow flow coefficient model and a submerged outflow submerged flow coefficient model are established. The objective function is constructed to minimize the error between the flow rate predicted by the mechanistic model and the measured flow rate. An improved particle swarm optimization algorithm with a compressibility factor is used to calibrate the parameters of the coefficient models, and physical feasible region constraints are applied to determine the optimal solution for the free outflow parameters. and optimal solution of submerged outflow parameters ;

[0012] Receive target traffic Under free outflow conditions, Substituting the corresponding parameters into the free outflow flow coefficient model, an expression for the target gate opening is obtained. This expression is then substituted into the free outflow mechanism model to solve for the target gate opening. Under submerged outflow conditions, the... Corresponding parameters and Substituting the corresponding parameters into the submerged outflow coefficient model yields an expression for the target gate opening, which is then substituted into the submerged outflow mechanism model to solve for the target gate opening; the free outflow mechanism model is set when constructing the objective function.

[0013] In the Each control cycle reads the gate opening. Upstream water level Downstream water level Real-time data, and simultaneously read the target gate opening. With target traffic Construction of opening error Calculate the equivalent flow deviation based on the mechanism model and the corresponding optimal parameter solution. ; as stated and As input to fuzzy inference, fuzzy PID online tuning is used to output control quantity, which drives the actuator of the hoist.

[0014] Furthermore, based on With hysteresis bandwidth The magnitude relationship is used to determine whether the flow is free outflow or submerged outflow. Specifically:

[0015] If the flow regime discrimination result of the previous sampling period is not available when the system starts up or during the first sampling, the discrimination result of the current first sampling period will be used. Perform initialization: when When initialized to free outflow; when When, initialized to submerged outflow; when When the time is right, initialize to the default value and proceed to the subsequent sampling period discrimination process;

[0016] In subsequent sampling periods, when When, it is judged as free outflow; when When, it is judged as a submerged outflow; when At the same time, the flow state judgment result of the previous sampling period is maintained.

[0017] Furthermore, the objective function is:

[0018]

[0019]

[0020] in, The objective function value, Let be the parameter vector to be calibrated. For the number of iterations, Number the particles. For the number of sample data, For parameter vectors Next Mechanistic models predict flow based on individual sample data points For the clear width of the gate, It is the acceleration due to gravity. For the first Measured flow rate of each sample data point The free outflow coefficient, The submergence coefficient is the submergence coefficient of the submerged outflow.

[0021] Furthermore, the target opening is subjected to amplitude limiting processing.

[0022] Furthermore, the equivalent flow deviation Model predicts flow , This represents the optimal solution for the parameters.

[0023] Furthermore, the improved particle swarm optimization algorithm with a compression factor adopts the following rate update method:

[0024]

[0025] in, , It is a random number. , As a learning factor, As the compression factor, For inertial weights, Let be the parameter vector to be calibrated. The optimal position globally. For the individual's optimal position, For the first Sub-particles The speed.

[0026] Furthermore, control quantity Control increment ,in, , , These are PID parameters.

[0027] Furthermore, in the fuzzy reasoning process, the output value obtained from defuzzification is... , , Mapping the scaling coefficient to parameter increments: , , ,in, For the first The incremental correction of PID parameters by the period. , , This is the preset scaling factor.

[0028] Furthermore, the free outflow coefficient model is as follows: The flooding outflow flooding coefficient model is as follows: ,in, , , , , , All of these are parameters to be calibrated. This is the undercurrent ratio.

[0029] A system for predicting and controlling the flow through a flat gate in an open channel based on intelligent parameter calibration includes:

[0030] The data acquisition module is used to collect gate opening, upstream water level, downstream water level and measured flow rate to form a sample dataset, and to perform median filtering preprocessing on the sample dataset;

[0031] The flow regime discrimination module is used to classify the flow regime of sample data based on relative opening and hydraulic discriminant parameters.

[0032] The parameter calibration module constructs objective functions for both free outflow and submerged outflow conditions, uses an improved particle swarm optimization algorithm with a compressibility factor to calibrate the coefficient model, and introduces physical feasible region constraints to obtain the optimal solution for the parameters.

[0033] The gate opening inverse calculation module receives the target flow, analyzes the target gate opening, and performs amplitude limiting processing.

[0034] The gate opening control module performs fuzzy inference on the gate opening tracking error and equivalent flow deviation, realizes online tuning of PID parameters, and outputs control quantities to drive the gate hoist actuator, so that the gate opening continuously tracks the target gate opening.

[0035] Compared with the prior art, the present invention has the following beneficial effects:

[0036] 1. By using an improved particle swarm optimization algorithm with a compression factor to perform data-driven intelligent calibration of the free outflow flow coefficient and the submerged outflow submersion coefficient, and by introducing physical feasible region constraints, we can obtain the optimal solution of parameters that is more in line with specific channels and operating conditions, reduce the systematic deviation caused by fixed empirical coefficients, and improve the reliability of the basic model for calculating the flow through the gate and controlling the flow.

[0037] 2. By adopting a two-level discrimination strategy and introducing a hysteresis anti-jitter mechanism, frequent switching can be suppressed near the boundary between free outflow and submerged outflow, avoiding oscillations in back-calculated opening and control output caused by model selection jitter, and improving the stability of system operation.

[0038] 3. After completing parameter calibration and determining the flow regime, the target opening is directly solved analytically based on the corresponding mechanism model, and amplitude limiting is performed to reduce the computational burden and real-time risk caused by iterative solutions, making it easier to deploy in the field controller.

[0039] 4. The opening control module not only controls based on the opening tracking error, but also uses the equivalent flow deviation to participate in the fuzzy PID online tuning, making the control strategy closer to the flow control target and more adaptable to deviations caused by factors such as water level disturbance and actuator friction hysteresis, thereby improving steady-state accuracy and dynamic stability.

[0040] 5. The system modules are clearly divided, which can not only use measured data to complete the model parameter calibration, but also rely on water level and opening information for control decisions during the operation phase. The overall solution is easy to implement in the measurement and automation transformation of farmland irrigation channels. Attached Figure Description

[0041] Figure 1 This is a block diagram of the overall system structure of the present invention.

[0042] Figure 2 This is a flowchart of the method of the present invention.

[0043] Figure 3 This is a schematic diagram of the internal process of the parameter calibration module.

[0044] Figure 4 The block diagram of the opening control module (fuzzy PID online tuning and introduction of equivalent flow deviation). Detailed Implementation

[0045] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings. It should be understood that this embodiment is only used to explain the present invention and is not intended to limit the scope of protection of the present invention; under the premise of no conflict, those skilled in the art can make various modifications or substitutions to the present invention, all of which should fall within the scope of protection of the present invention.

[0046] like Figure 1 As shown, the present invention provides a flow prediction and control system for open channel flat gate based on intelligent parameter calibration, including a data acquisition module, a flow state discrimination module, a parameter calibration module, an opening degree back calculation module, and an opening degree control module.

[0047] The data acquisition module is connected to the upstream water level sensor, downstream water level sensor, gate opening sensor, and flow meter to collect gate opening data. Upstream water level Downstream water level Compared with the measured flow rate through the gate This generates a sample dataset, which is then preprocessed with median filtering and provided as input data to the flow regime discrimination module and the parameter calibration module.

[0048] The flow regime discrimination module is used to classify the sample data according to the relative opening and hydraulic discrimination parameters, output the discrimination result of "free outflow / submerged outflow", and send the discrimination result to the parameter calibration module to ensure the consistency of subsequent model selection.

[0049] While keeping the structures of the free outflow mechanism model and the submerged outflow mechanism model unchanged, the parameter calibration module constructs objective functions under the free outflow and submerged outflow conditions respectively, uses an improved particle swarm optimization algorithm with a compression factor for optimization, and introduces physical feasible region constraints to obtain the optimal solution of parameters.

[0050] The inverse calculation module receives the target flow. With the present , Based on the flow regime discrimination results, the corresponding mechanism model equation is selected, and the target gate opening is analytically calculated. and to Perform amplitude limiting to meet .

[0051] The opening control module, based on the opening tracking error, further utilizes a calibration model to calculate the equivalent flow deviation and performs fuzzy inference to achieve online tuning of PID parameters and output control quantities. Drive the hoist actuator to continuously track the target gate opening. This achieves stable flow control.

[0052] like Figure 2 As shown, a method for predicting and controlling the flow through a flat gate in an open channel based on intelligent parameter calibration includes the following steps:

[0053] S1. The gate opening is collected using an upstream water level sensor, a downstream water level sensor, a gate opening sensor, and a flow meter. Upstream water level Downstream water level and measured flow rate through the gate This forms a sample dataset.

[0054] To reduce the impact of glitch noise on subsequent flow regime discrimination and parameter calibration, a moving median filter preprocessing is performed on the sample dataset. For any sampling sequence in the sample dataset... (in express Any quantity), with the current sampling point as the center and a window length of... The median value within the sliding window is used as the filtered output.

[0055]

[0056] in, Sampling time, The preset window half width, This is the filtered sampled sequence. The preprocessed data is used in steps S2 and S3.

[0057] S2. Two-stage flow regime discrimination is performed based on relative opening and hydraulic discrimination quantity, and discrimination jitter near the boundary is suppressed by hysteresis anti-jitter strategy.

[0058] To ensure consistency and stability in model selection, a "two-stage flow regime discrimination + hysteresis debounce" approach is adopted.

[0059] (1) Relative opening degree screening: Calculate the relative opening degree :

[0060]

[0061] Set relative opening threshold (Empirical value, taken as 0.65 in this embodiment), when When the sample data is determined to be under the gate outlet flow condition; when When the sample data is determined to be a non-gate outflow condition, it is not included in the free outflow / submerged outflow model classification and parameter calibration.

[0062] (2) Hydraulic discrimination quantity construction: for those satisfying Using sample data, calculate the conjugate water depth after the contraction section jump. And construct hydraulic discrimination quantities:

[0063]

[0064] in Satisfying the conjugate water depth relationship of the hydraulic jump:

[0065]

[0066]

[0067]

[0068]

[0069] In the formula, To reduce the water depth at the cross-section, To reduce the Follower number of the cross-section, The velocity coefficient (taken as an empirical value of 0.95) This is the vertical contraction coefficient.

[0070] (3) Free outflow / submerged outflow discrimination and hysteresis debouncing: Set hysteresis bandwidth And judge according to the following rules:

[0071] When the flow prediction and control system is started or during the first sampling, if the flow regime discrimination result of the previous sampling period is not available, then the discrimination result of the current first sampling period will be used. Perform initialization: when When initialized to free outflow; when When, initialized to submerged outflow; when When the time is right, it is initialized to the default value (free outflow or submerged outflow) and then proceeds to the subsequent discrimination process.

[0072] In subsequent sampling periods, when When, it is judged as free outflow; when When, it is determined to be a submerged outflow; when At the same time, the flow state discrimination result of the previous sampling period is maintained to suppress discrimination jitter near the boundary. The sample dataset is discriminated point by point in time series order until all n sample points are processed.

[0073] Step S2 outputs the flow state discrimination result, which is then called by step S3.

[0074] S3. Construct the free outflow objective function and the submerged outflow objective function respectively, use the improved particle swarm optimization algorithm with compression factor to calibrate the parameters, and apply physical feasible region constraints.

[0075] While keeping the structure of the free outflow and submerged outflow mechanism models unchanged, parameter calibrations were performed for the two types of operating conditions (free outflow or submerged outflow).

[0076] (1) The coefficient model is set through experimental verification.

[0077] Free outflow coefficient Using relative opening The form of linear dependence:

[0078]

[0079] Submerged outflow submersion coefficient Using subsurface ratio cubic polynomial form:

[0080]

[0081] The undercurrent ratio is defined as:

[0082]

[0083] When the calibration parameter vector is in free outflow condition When the outflow is submerged .

[0084] (2) Construction of the objective function

[0085] The objective function is constructed with the goal of minimizing the error between the flow rate predicted by the mechanistic model and the measured flow rate, and it adopts the form of mean square error:

[0086]

[0087]

[0088] in, The objective function value, Let be the parameter vector to be calibrated. For the number of iterations, Number the particles. For the number of sample data, For parameter vectors Next Mechanistic models predict flow based on individual sample data points For the clear width of the gate, It is the acceleration due to gravity. For the first The measured flow rate of each sample data point.

[0089] (3) Physical feasible region constraint: Apply physical feasible region constraints to the parameters to be calibrated. Preferably, the physical range constraints on the free outflow flow coefficient and the submerged outflow flooding coefficient are equivalently transformed into upper and lower bound constraints on the vector of the parameters to be calibrated.

[0090] For the free outflow condition, the parameters to be calibrated are the parameter vectors in the free outflow flow coefficient model. Set upper and lower limits for its physical feasibility:

[0091] ,

[0092] in, , , , These are preset physical feasibility upper and lower limits, used to prevent the free outflow coefficient model from entering non-physical value ranges during the calibration process.

[0093] For the submerged outflow condition, the parameters to be calibrated are the parameter vectors in the submerged coefficient model. Set upper and lower limits for its physical feasibility:

[0094] , , ,

[0095] in, , , , , , , , These are the preset upper and lower limits of physical feasibility.

[0096] The preset upper and lower limits of physical feasibility are determined by a combination of channel cross-sectional conditions, empirical range, and historical data statistical range, thereby ensuring the accuracy of the calibrated data. and It has physical rationale.

[0097] (4) An improved particle swarm optimization algorithm with a compression factor is used for optimization.

[0098] To maintain statistical consistency of hydraulic conditions and improve calibration convergence and parameter identifiability, avoiding non-unique solutions caused by multiple sets of parameters compensating for each other during simultaneous calibration, this embodiment adopts a phased calibration strategy: First, based on the sample set corresponding to the free outflow identified in step S2, the free outflow flow coefficient model parameters are calibrated. The optimal solution of parameters under free outflow is obtained. Subsequently, during the flood outflow rate determination phase, Substitute into the submerged outflow model and only by flooding the sample set To determine the parameters of the submerged outflow coefficient model for data source continuity, the optimal parameter solution under submerged outflow is obtained. .

[0099] The parameters to be calibrated are encoded as particle positions. For calibration under free-outflow conditions, the particle position vector is defined as:

[0100]

[0101] When rate-controlled under submerged outflow conditions, the particle position vector is defined as:

[0102]

[0103] in, Number the particles. For iterative algebra.

[0104] like Figure 3 As shown, set the number of particles. Maximum number of iterations Convergence threshold Inertia weight Learning factors ( , ) and compression factor Preferably, a velocity boundary can also be set. and , used to limit the speed update amplitude.

[0105] The initial position and initial velocity of each particle are randomly generated within the parameter boundaries, denoted as follows: and Set the initial optimal position of the individual to And select the particle with the lowest fitness from all particles as the initial global optimal position. At the same time, .

[0106] For the first Sub-particles , its position vector Substitute the flow rate model into the corresponding flow regime and calculate the model flow rate for the sample data points. And construct the objective function based on the sample dataset:

[0107]

[0108] Compare the current fitness with the historical best fitness: If Then update In all The position corresponding to the one with the lowest fitness is selected as the global optimal position. .

[0109] Generate random numbers Update particle velocities according to the following formula:

[0110]

[0111] And update the particle position according to the following formula:

[0112]

[0113] Preferably, the updated speed implement The upper and lower bounds of the updated position are constrained as described in (3) to reduce the risk of overshooting and oscillation.

[0114] The iteration terminates when any of the following conditions are met:

[0115] 1) The iterative algebra reaches ;

[0116] 2) The change in global optimal fitness satisfies ;

[0117] 3) Global optimal position It remains unchanged over several generations.

[0118] After terminating the iteration, output the optimal solution of parameters for the corresponding flow state: optimal solution of parameters for free outflow. Optimal solution of submerged outflow parameters The optimal solution of the parameters is then provided to the opening inverse calculation module for subsequent calculations.

[0119] S4, Receive target traffic Based on the flow regime, the corresponding mechanism model is selected to analyze and back-calculate the target opening and limit the amplitude.

[0120] Receive target traffic Based on the flow regime discrimination results output in step S2, the corresponding gate flow rate mechanism model equation is selected for analytical back-calculation of the target opening:

[0121] In this embodiment, the gate is adjusted according to its current opening degree. Adjust to target opening The execution process is relatively short, with a smaller timescale compared to the upstream and downstream water level changes caused by channel storage and release. To simplify the back-calculation of gate opening and execution control and improve real-time performance, it is assumed that during a single gate opening adjustment, the upstream water level... With downstream water level Ignore the changes and use the received target traffic. Measured upstream water level at time Participating in the calculation of the gate flow mechanism model and Solving this problem. Waiting to receive the next target traffic. Then, the updated water level is collected again for the next opening calculation and control.

[0122] If it is free outflow, correspond , Substituting into the free outflow flow coefficient model, we obtain an expression for the target opening. Substituting this into the free outflow mechanism model, we then... = , , Solve for the target opening ;

[0123] If the outflow is submerged, correspond , and correspond , , , Substituting into the submerged outflow coefficient model, we obtain an expression for the target aperture. Substituting this into the submerged outflow mechanism model, we then... = , , Solve for the target opening .

[0124] The target opening is then limited to meet the constraints of the actuator:

[0125]

[0126] in, It is determined by the physical structure of the gate.

[0127] S5. Based on the mechanism model, the equivalent flow deviation is calculated and combined with the opening error to implement fuzzy PID online tuning, and the output control quantity drives the start and stop motor to achieve stable flow control.

[0128] In step S5, the opening control module controls the opening period. Continuous execution of closed-loop control of opening degree, see [link / reference] Figure 4 Its execution process includes the following sub-steps:

[0129] (1) Obtain control cycle data and determine model operating conditions

[0130] In the Each control cycle reads the gate opening. Upstream water level Downstream water level The real-time quantity is read, and the target opening output in step S4 is read simultaneously. With target traffic .

[0131] (2) Construction opening error

[0132]

[0133] (3) Calculate the equivalent flow deviation based on the mechanism model

[0134] Based on the flow regime discrimination result in step S2, the corresponding gate flow rate mechanism model is selected, and the optimal solution of the corresponding calibration parameters output in step S3 is combined. Under current working conditions The following calculation model predicts the flow:

[0135]

[0136] The above formula indicates that, under a certain flow regime, , , , Substitute into the corresponding mechanism model and calculate ;

[0137] Based on this, an equivalent flow deviation is constructed:

[0138]

[0139] (4) Fuzzy inference for online tuning of PID parameters

[0140] 1) Input normalization and scale constant setting

[0141] by and As input for fuzzy inference, and normalized according to the following formula:

[0142] ,

[0143] in, , The normalized scaling constant is determined according to the system's physical range. This is the amplitude limiting function.

[0144] 2) Membership function and universe of discourse discretization

[0145] enter , and output The universe of discourse is all [-1, 1], and 7 sets of linguistic variables are defined:

[0146]

[0147] Using symmetric triangular membership functions as the membership functions for this set of linguistic variables, the key breakpoints are:

[0148]

[0149] Specifically, for any variable Membership degree, in terms of trigonometric functions express:

[0150]

[0151] And order:

[0152] , , , , , , .

[0153] 3) Constructing a rule base

[0154] Construct rule bases with three outputs respectively , , Each rule is in the form of: "If belong and belong Then output belong ",in, This represents the set of antecedent languages ​​of the rule. This represents the set of consequent languages ​​of the rule. . As shown in Table 1, As shown in Table 2 As shown in Table 3.

[0155] Table 1 Fuzzy control table

[0156] Table 2 Fuzzy control table

[0157] Table 3 Fuzzy control table

[0158] 4) Mamdani reasoning, composition, and centroid method for fuzzy resolution

[0159] For any output channel Let the first The trigger strength of the fuzzy rule is:

[0160]

[0161] The consequents of each rule are then combined into an output membership function:

[0162]

[0163] The centroid method is used to resolve fuzziness and obtain a clear output value.

[0164]

[0165] in, Indicates the first The set of antecedent languages ​​for each rule and membership degree Indicates the first The set of antecedent languages ​​for each rule and membership degree Indicates output variable For the first Rule Consequence Language Set The membership function.

[0166] 5) Output scale mapping

[0167] The result of defuzzification , , Mapping the scaling coefficient to parameter increments:

[0168] , ,

[0169] in, For the first The incremental adjustment of PID parameters over time, and according to Perform online updates; , , The preset scaling factor is preferably given based on the sensitivity of the controlled object and the empirical tuning range.

[0170] 6) PID Parameter Initialization and Update

[0171] PID initial parameters are set to , , Update PID parameters and limit amplitude:

[0172]

[0173]

[0174] in, , , , , , These are preset upper and lower limits for gain, used to ensure that the tuned parameters are within the feasible range for engineering applications.

[0175] (5) Generate control signals and drive the gate hoist.

[0176] The control increment is generated using an incremental discrete PID structure:

[0177]

[0178] And order:

[0179]

[0180] Limit the control output:

[0181]

[0182] When the output reaches the limit, the integral accumulation is paused, and then the control quantity is... The output is sent to the gate hoist drive unit to drive the gate opening degree to change; the next control cycle repeats (1) to (5) to change the gate opening degree. Continuously track the opening degree of the target gate To achieve target traffic Stable flow control.

[0183] The embodiments described above are preferred embodiments of the present invention, but the present invention is not limited to the above embodiments. Any obvious improvements, substitutions or modifications that can be made by those skilled in the art without departing from the essence of the present invention shall fall within the protection scope of the present invention.

Claims

1. A method for predicting and controlling the flow through a flat gate in an open channel based on intelligent parameter calibration, characterized in that: Collect gate opening Upstream water level Downstream water level and measured traffic ; Calculate relative opening ,when At that time, calculate the conjugate water depth after the contraction section jump. And construct hydraulic discrimination quantities ,in accordance with With hysteresis bandwidth The magnitude relationship determines whether the flow regime is free outflow or submerged outflow; among which, This is the relative opening threshold; A free outflow flow coefficient model and a submerged outflow submerged flow coefficient model are established. The objective function is constructed to minimize the error between the flow rate predicted by the mechanistic model and the measured flow rate. An improved particle swarm optimization algorithm with a compressibility factor is used to calibrate the parameters of the coefficient models, and physical feasible region constraints are applied to determine the optimal solution for the free outflow parameters. and optimal solution of submerged outflow parameters ; Receive target traffic Under free outflow conditions, Substituting the corresponding parameters into the free outflow flow coefficient model, an expression for the target gate opening is obtained. This expression is then substituted into the free outflow mechanism model to solve for the target gate opening. Under submerged outflow conditions, the... Corresponding parameters and Substituting the corresponding parameters into the submerged outflow coefficient model yields an expression for the target gate opening, which is then substituted into the submerged outflow mechanism model to solve for the target gate opening; the free outflow mechanism model is set when constructing the objective function. In the Each control cycle reads the gate opening. Upstream water level Downstream water level Real-time data, and simultaneously read the target gate opening. With target traffic Construction of opening error Calculate the equivalent flow deviation based on the mechanism model and the corresponding optimal parameter solution. ; as stated and As input to fuzzy inference, fuzzy PID online tuning is used to output control quantity, which drives the actuator of the hoist.

2. The method for predicting and controlling the flow through a flat gate in an open channel according to claim 1, characterized in that, in accordance with With hysteresis bandwidth The magnitude relationship is used to determine whether the flow is free outflow or submerged outflow. Specifically: If the flow regime discrimination result of the previous sampling period is not available when the system starts up or during the first sampling, the discrimination result of the current first sampling period will be used. Perform initialization: when When initialized to free outflow; when When, initialized to submerged outflow; when When the time is right, initialize to the default value and proceed to the subsequent sampling period discrimination process; In subsequent sampling periods, when When, it is judged as free outflow; when When, it is judged as a submerged outflow; when At the same time, the flow state judgment result of the previous sampling period is maintained.

3. The method for predicting and controlling the flow through a flat gate in an open channel according to claim 1, characterized in that, The objective function is: in, The objective function value, Let be the parameter vector to be calibrated. For the number of iterations, Number the particles. For the number of sample data, For parameter vectors Next Mechanistic models predict flow based on individual sample data points For the clear width of the gate, It is the acceleration due to gravity. For the first Measured flow rate of each sample data point The free outflow coefficient, The submergence coefficient is the submergence coefficient of the submerged outflow.

4. The method for predicting and controlling the flow through a flat gate in an open channel according to claim 1, characterized in that, The target opening is then limited.

5. The method for predicting and controlling the flow through a flat gate in an open channel according to claim 1, characterized in that, The equivalent flow deviation Model predicts flow , This represents the optimal solution for the parameters.

6. The method for predicting and controlling the flow through a flat gate in an open channel according to claim 1, characterized in that, The improved particle swarm optimization algorithm with a compression factor adopts the following rate update method: in, , It is a random number. , As a learning factor, As the compression factor, For inertial weights, Let be the parameter vector to be calibrated. The optimal position globally. For the individual's optimal position, For the first Sub-particles The speed.

7. The method for predicting and controlling the flow through a flat gate in an open channel according to claim 1, characterized in that, Control quantity Control increment ,in, , , These are PID parameters.

8. The method for predicting and controlling the flow through a flat gate in an open channel according to claim 7, characterized in that, In the fuzzy inference process, the output value obtained by defuzzification is... , , Mapping the scaling coefficient to parameter increments: , , ,in, For the first The incremental correction of PID parameters by the period. , , This is the preset scaling factor.

9. The method for predicting and controlling the flow through a flat gate in an open channel according to claim 3, characterized in that, The free outflow coefficient model is as follows: The flooding outflow flooding coefficient model is as follows: ,in, , , , , , All of these are parameters to be calibrated. This is the undercurrent ratio.

10. A system for implementing the method for predicting and controlling the flow through a flat gate in an open channel as described in any one of claims 1-9, characterized in that, include: The data acquisition module is used to collect gate opening, upstream water level, downstream water level and measured flow rate to form a sample dataset, and to perform median filtering preprocessing on the sample dataset; The flow regime discrimination module is used to classify the flow regime of sample data based on relative opening and hydraulic discriminant parameters. The parameter calibration module constructs objective functions for both free outflow and submerged outflow conditions, uses an improved particle swarm optimization algorithm with a compressibility factor to calibrate the coefficient model, and introduces physical feasible region constraints to obtain the optimal solution for the parameters. The gate opening inverse calculation module receives the target flow rate, calculates the target gate opening, and performs amplitude limiting processing. The gate opening control module performs fuzzy inference on the gate opening tracking error and equivalent flow deviation, realizes online tuning of PID parameters, and outputs control quantities to drive the gate hoist actuator, so that the gate opening continuously tracks the target gate opening.