Channel group gate regulation control method and device, electronic equipment and storage medium

By constructing an initial objective function and performing a second-order Taylor expansion in the channel group gate control, and combining it with long-term value assessment using reinforcement learning, the control strategy is optimized. This solves the short-sightedness effect caused by the limited prediction time domain in the channel group gate control, achieving high-precision and stable water level regulation, and reducing frequent gate adjustments and wear.

CN122131591APending Publication Date: 2026-06-02CHINA AGRI UNIV +2

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHINA AGRI UNIV
Filing Date
2026-02-05
Publication Date
2026-06-02

AI Technical Summary

Technical Problem

In existing channel group gate control methods, due to the limited prediction time domain, the controller generates aggressive control commands, resulting in frequent gate adjustments and high wear, making it difficult to achieve a balance between high precision and stability over long periods.

Method used

By obtaining the current open channel state vector, an initial objective function is constructed and the initial control sequence is solved. The current value function is calculated and a second-order Taylor expansion is performed. The Jacobian matrix and Hessian matrix are extracted and superimposed on the initial objective function to form a modified objective function. Combined with the long-term value assessment of reinforcement learning, the control strategy is optimized.

Benefits of technology

It significantly improved the accuracy of water level control, reduced water level deviation, and enabled the efficient, stable, and long-lasting operation of the canal group water conveyance system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122131591A_ABST
    Figure CN122131591A_ABST
Patent Text Reader

Abstract

This invention provides a control method, device, electronic device, and storage medium for channel group gate regulation. The method includes: obtaining an initial control sequence based on the current open channel state vector and a constructed initial objective function; calculating a current value function based on the predicted open channel state corresponding to the initial control sequence; performing a second-order Taylor expansion on the current value function to extract the Jacobian and Hessian matrices; superimposing the Jacobian and Hessian matrices onto the first-order and second-order term matrices of the initial objective function, respectively, to obtain a modified objective function; and inputting the current open channel state vector into the modified objective function to obtain an output control sequence. The method provided by this invention enables the controller to perceive and avoid potential future risks at the current moment, significantly improving the accuracy of water level control, reducing water level deviation, and achieving efficient, stable, and long-term operation of the channel group water conveyance system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of water level control technology for open channel systems, and in particular to a control method, device, electronic equipment, and storage medium for channel group gate regulation. Background Technology

[0002] With the expansion of water conservancy projects, achieving automatic control of canal gate systems while ensuring high-precision water level regulation and maximizing the operational lifespan of actuators has become a crucial requirement in this field. Currently, model predictive control (MMC) based on physical mechanisms is widely used in canal gate control. This method typically employs discretized and linearized Saint-Venant equations to establish a state prediction model. At each control moment, the system optimizes the control sequence over a finite time domain based on the current state and physical constraints, and executes the first control action according to a rolling time-domain mechanism, thereby achieving feedback regulation of the water level.

[0003] However, existing technologies mainly rely on a limited prediction time domain for optimization. This limited prediction time domain cannot cover the complete cycle of hydraulic fluctuation propagation, causing the controller to only evaluate short-term performance within its field of view when generating scheduling strategies. As a result, in order to quickly eliminate deviations within a limited time, the controller often generates overly aggressive control commands, leading to excessively frequent gate adjustments or excessively large movements. This not only exacerbates equipment wear but also makes it difficult to achieve a global balance between control accuracy and stability over long periods. Summary of the Invention

[0004] This invention provides a control method, device, electronic equipment, and storage medium for channel group gate regulation, which solves the short-sightedness effect caused by the limited prediction time domain in the prior art model predictive control, resulting in low gate control accuracy, frequent operation, and large wear.

[0005] This invention provides a control method for channel gate regulation, comprising: Obtain the current open channel state vector; Based on the current open channel state vector and the constructed initial objective function, the initial control sequence is obtained by solving the problem; the initial objective function includes a first-order term matrix and a second-order term matrix, which are constructed based on the historical open channel state vector. The current value function is calculated based on the predicted open channel state corresponding to the initial control sequence; The current value function is expanded using a second-order Taylor series to extract the Jacobian matrix and the Hessian matrix. The Jacobian matrix is ​​then superimposed onto the first-order term matrix of the initial objective function, and the Hessian matrix is ​​superimposed onto the second-order term matrix of the initial objective function to obtain the modified objective function. The current open channel state vector is input into the modified objective function, and the output control sequence is obtained by solving the problem.

[0006] According to the control method for channel gate regulation provided by the present invention, the steps for constructing the initial objective function include: Construct a performance index function with the objectives of minimizing water level deviation and minimizing control quantity; The state prediction model, constructed based on historical open channel state vectors, transforms the performance index function into the initial objective function, which includes the first-order term matrix and the second-order term matrix.

[0007] According to the control method for channel gate regulation provided by the present invention, the method for constructing the state prediction model includes: Based on the time-delay integral model and the historical open channel state vector, a linear state-space model describing the relationship between channel water level deviation and flow rate is constructed. The state prediction model is constructed based on the linear state-space model.

[0008] According to a control method for channel gate regulation provided by the present invention, the step of calculating the current value function based on the predicted open channel state corresponding to the initial control sequence includes: Obtain the basis functions and pre-trained convergence weights; The predicted open channel state is input into the basis function to obtain the output value of the basis function; The current value function is obtained by multiplying the output value of the basis function with the convergence weight vector.

[0009] According to a control method for channel gate regulation provided by the present invention, the step of superimposing the Jacobian matrix onto the linear term matrix of the initial objective function and superimposing the Hessian matrix onto the quadratic term matrix of the initial objective function to obtain a modified objective function includes: Based on the response matrix in the state prediction model, the Jacobian matrix and the Hessian matrix are multiplied respectively to obtain the first-order correction term and the second-order correction term; The first-order correction terms are superimposed onto the first-order term matrix, and the second-order correction terms are superimposed onto the second-order term matrix to obtain the correction objective function; The response matrix represents the linear response relationship between the control sequence at the current moment and the water level output at a future moment.

[0010] According to a control method for channel gate regulation provided by the present invention, the step of superimposing the first-order correction term onto the first-order term matrix and superimposing the second-order correction term onto the second-order term matrix to obtain the correction objective function includes: Obtain the first and second regulatory factors; The first-order correction term and the second-order correction term are weighted based on the first adjustment factor and the second adjustment factor, respectively, to obtain a weighted first-order correction term and a weighted second-order correction term; The weighted first-order correction term is superimposed onto the first-order term matrix, and the weighted second-order correction term is superimposed onto the second-order term matrix to obtain the correction objective function.

[0011] The present invention also provides a control device for regulating channel gates, comprising: The acquisition unit acquires the current open channel state vector; The initial solution unit solves for the initial control sequence based on the current open channel state vector and the constructed initial objective function; the initial objective function includes a first-order term matrix and a second-order term matrix, which are constructed based on the historical open channel state vector. The value function calculation unit calculates the current value function based on the predicted open channel state corresponding to the initial control sequence; The optimization unit performs a second-order Taylor expansion on the current value function to extract the Jacobian matrix and the Hessian matrix. The Jacobian matrix is ​​then superimposed onto the first-order term matrix of the initial objective function, and the Hessian matrix is ​​superimposed onto the second-order term matrix of the initial objective function to obtain the modified objective function. The secondary solution unit inputs the current open channel state vector into the modified objective function and solves to obtain the output control sequence.

[0012] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the control method for channel gate regulation as described above.

[0013] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the control method for channel gate regulation as described above.

[0014] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the control method for channel gate regulation as described above.

[0015] The control method, device, electronic equipment, and storage medium for channel group gate regulation provided by this invention obtains the current open channel state vector and constructs an initial objective function to obtain an initial control sequence. Based on the predicted open channel state corresponding to the initial control sequence, the current value function is calculated, and the Jacobian matrix and Hessian matrix are extracted through a second-order Taylor expansion. These high-order information representing long-term value are superimposed on the first-order and second-order term matrices of the initial objective function, respectively. This enables the controller to perceive and avoid potential future risks at the current moment, significantly improving the accuracy of water level control, reducing water level deviation, and achieving efficient, stable, and long-term operation of the channel group water conveyance system. Attached Figure Description

[0016] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0017] Figure 1 This is one of the flowcharts illustrating the control method for channel gate regulation provided by the present invention; Figure 2 This is a schematic diagram of the mathematical model construction of a single channel pool based on the time-delay integral model provided by the present invention; Figure 3 This is the second flowchart illustrating the control method for channel group gate regulation provided by the present invention; Figure 4 This is a schematic diagram of the control device for channel gate regulation provided by the present invention; Figure 5 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation

[0018] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.

[0019] It should be understood that the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Therefore, features defined with "first" and "second" may explicitly or implicitly include one or more of the stated features. In the description of embodiments of the present invention, "a plurality of" means two or more, unless otherwise explicitly specified.

[0020] To address the aforementioned problems, this invention provides a control method for channel group gate regulation, enabling precise control of long-delay, multi-constraint channel systems. Figure 1 This is one of the flowcharts illustrating the control method for channel gate regulation provided by the present invention, such as... Figure 1 As shown, the method includes: Step 110: Obtain the current open channel state vector.

[0021] Here, the current open channel state vector refers to the set of descriptions that characterize the hydraulic operation of the open channel at the current control moment. In practical applications, to achieve precise control, it is necessary to discretize the continuous physical process of water flow.

[0022] Specifically, water level and flow data of the channel can be collected in real time by sensors installed at various key nodes, such as water level gauges and flow meters. It should be noted that since the channel system is usually composed of multiple canals and gates connected in series, the current open channel state vector not only includes the water level deviation of each canal at the current moment, that is, the difference between the actual water level and the target water level, but also includes the flow information of each control structure.

[0023] Furthermore, considering the time-delay characteristic of water flow propagation, the current open channel state vector can also include historical flow data from several past moments, thus forming a high-dimensional vector that reflects the dynamic characteristics of the system. Obtaining an accurate current open channel state vector provides a data foundation for subsequent model prediction and control calculations.

[0024] Step 120: Based on the current open channel state vector and the constructed initial objective function, solve for the initial control sequence; the initial objective function includes a first-order term matrix and a second-order term matrix, which are constructed based on the historical open channel state vector.

[0025] Here, the initial objective function refers to the optimization function constructed based on classical Model Predictive Control (MPC) theory, whose purpose is to find the optimal control input while satisfying the constraints. Here, the historical open channel state vector refers to the open channel state vectors from multiple historical moments prior to the current moment.

[0026] Specifically, the future system state can be predicted in advance using a pre-built predictive model based on the historical open channel state vector. To balance water level control accuracy and gate operation stability, the initial objective function is usually designed as a weighted sum of state deviation and control increment terms; for example, it can be a weighted sum of water level error and gate actuation amplitude. Mathematically, the initial objective function can be transformed into a standard quadratic form, where the quadratic term matrix reflects the curvature of the objective function, determining the convergence speed and stability of the optimization; the linear term matrix reflects the direction of the gradient, guiding the search towards the optimal solution.

[0027] Furthermore, after constructing the initial objective function, the current open channel state vector can be input and solved using a quadratic programming solver to obtain the initial control sequence. This initial control sequence represents the theoretically optimal gate scheduling strategy calculated solely based on the physical model within the finite prediction time domain, before the introduction of reinforcement learning corrections.

[0028] It should be noted that the calculations at this stage mainly rely on the physical mechanism model. Although the hard constraints are satisfied, the long-term dynamic effects of the system have not been fully considered.

[0029] Step 130: Calculate the current value function based on the predicted open channel state corresponding to the initial control sequence.

[0030] Here, the predicted open channel state refers to the water level and flow rate that the channel may reach within a certain period of time after the system executes the initial control sequence. The current value function, introduced with reinforcement learning concepts, is a key metric used to evaluate the value of the current state from a long-term operational perspective.

[0031] Specifically, first, the initial control sequence calculated in step 120 is substituted into the prediction model to derive the predicted open channel state of the open channel system at future times.

[0032] Subsequently, the predicted state is evaluated using a pre-trained value function model, such as a model built based on basis functions and weight vectors, and the current value function is calculated.

[0033] Understandably, the current value function quantifies the cumulative costs that might arise from the current state over an infinitely long period. If the predicted state leads to drastic fluctuations in water levels or frequent gate adjustments, the value function will increase significantly, signaling a need to adjust the control strategy.

[0034] Step 140: Perform a second-order Taylor expansion on the current value function to extract the Jacobian matrix and the Hessian matrix. Add the Jacobian matrix to the first-order term matrix of the initial objective function and add the Hessian matrix to the second-order term matrix of the initial objective function to obtain the modified objective function.

[0035] The Jacobian and Hessian matrices here are mathematical tools used to describe the local properties of a function. The Jacobian matrix represents the first-order partial derivatives, reflecting the gradient direction of the value function as a function of control variables. The Hessian matrix represents the second-order partial derivatives, reflecting the curvature or convexity information of the value function.

[0036] Furthermore, the modified objective function here is a new optimization objective that integrates short-term predictions from the physical model with long-term value assessments from reinforcement learning.

[0037] Specifically, since the value function in reinforcement learning is typically nonlinear, it is difficult to directly embed it into the quadratic programming solver of standard MPC. Therefore, a second-order Taylor expansion can be used to approximate the current value function in the vicinity of the initial control sequence. Through this mathematical processing, the Jacobian matrix and Hessian matrix with respect to the control sequence can be extracted.

[0038] In one embodiment, the obtained current value function can be expanded using a second-order Taylor series at the output zero. Since the value function is a linear combination of basis functions and weights, its derivative can be obtained by differentiating the basis functions. The first-order partial derivatives of the basis functions can be calculated to obtain the Jacobian matrix. The second-order partial derivatives of the basis functions are then calculated to obtain the Hessian matrix with respect to the state. Here, the second-order Taylor series is performed to extract the Jacobian matrix, which can be expressed by the following formula: ; in, Represents the Jacobian matrix. Represents the Hessian matrix; Representing state basis functions; Represents a constant.

[0039] Subsequently, a matrix reconstruction strategy is implemented. That is, the extracted Jacobian matrix can be superimposed on the linear term matrix of the initial objective function. This is equivalent to adding a guiding force from long-term value assessment to the original gradient direction, telling the controller which direction is more conducive to the long-term goal.

[0040] Meanwhile, the Hessian matrix can be superimposed on the quadratic term matrix of the initial objective function, which is equivalent to adjusting the optimization step size or penalty intensity, and increasing the intelligent penalty for the control strategy.

[0041] Understandably, this superposition correction essentially injects the foresight of reinforcement learning into the solution kernel of MPC in mathematical form, thereby giving the controller the current vision and enabling it to make additional water level adjustments based on the deviation of the current water level, thus reducing the peak water level.

[0042] Step 150: Input the current open channel state vector into the modified objective function and solve to obtain the output control sequence.

[0043] The output control sequence here refers to the sequence of instructions that will be sent to the execution gate after intelligent correction, which may include the instruction sequence of all gates in the channel group.

[0044] Specifically, after obtaining the modified objective function, the solver solves the quadratic programming problem again. Since the modified objective function not only retains the initial MPC's ability to handle physical constraints such as water level limits and maximum gate opening, but also incorporates reinforcement learning optimization suggestions for long-term performance through matrix superposition, the resulting output control sequence possesses both physical feasibility and long-term optimality. Finally, this output control sequence can be transformed into specific gate opening commands to control the actions of each gate in the channel group, thereby achieving precise and stable water level regulation, reducing frequent and large-scale gate adjustments, and minimizing equipment wear.

[0045] The method provided in this invention obtains the current open channel state vector and constructs an initial objective function to solve for the initial control sequence. Based on the predicted open channel state corresponding to the initial control sequence, the current value function is calculated, and the Jacobian matrix and Hessian matrix are extracted through a second-order Taylor expansion. These high-order information representing long-term value are superimposed on the first-order and second-order term matrices of the initial objective function, respectively. This enables the controller to perceive and avoid potential future risks at the current moment, significantly improving the accuracy of water level control, reducing water level deviation, and achieving efficient, stable, and long-term operation of the canal group water conveyance system.

[0046] Based on any of the above embodiments, the steps for constructing the initial objective function include: Construct a performance index function with the objectives of minimizing water level deviation and minimizing control quantity; The state prediction model, constructed based on historical open channel state vectors, transforms the performance index function into the initial objective function, which includes the first-order term matrix and the second-order term matrix.

[0047] Here, the performance index function can be used to measure the quality of control effectiveness. It is understandable that in channel control, the core objective is to make the actual water level as close as possible to the target water level, i.e., to minimize the water level deviation. At the same time, in order to protect the actuators and maintain flow stability, it is desirable to minimize the gate's actuation range or control energy, i.e., to minimize the control quantity.

[0048] Specifically, firstly, a performance index function is constructed with the objectives of minimizing water level deviation and minimizing control variables. Here, the performance index function of the standard model predictive control can be expressed as: ; In the formula, Represents a performance metric function; This represents the output vector within the prediction horizon, which can specifically be the predicted water level of each canal or pool. This represents the corresponding reference water level vector, which could be the target water level, and is usually set to a fixed value. This represents the input vector within the control horizon, i.e., the gate control sequence to be solved, such as flow rate or opening degree changes; Q represents the state weight matrix, used to adjust the degree of emphasis on water level deviation; R represents the control weight, used to adjust the penalty for the magnitude of control actions. It should be noted that a balance can be found between rapid response and system stability by adjusting Q and R.

[0049] Then, based on the open channel state vector, the state prediction model transforms the performance index function into an initial objective function including a first-order term matrix and a second-order term matrix. Specifically, to solve for the minimum value of the performance index function, it is necessary to establish the input... With output The mathematical connection between them is what we call establishing a state prediction model. Here, the state prediction model can be constructed using historical open channel state vectors, that is, the linear relationship between open channel state vectors at multiple historical moments.

[0050] Then, the state prediction model can be substituted into the performance index function to eliminate... Only retain unknown variables Therefore, through mathematical derivation such as expanding and combining like terms of the substituted function, the non-standard performance index function can be transformed into a standard quadratic programming form, that is, into an initial objective function including a linear term matrix and a quadratic term matrix. Here, the initial objective function can be expressed by the following formula, as shown in the equation below: ; In the formula, Describe the initial objective function; Represents a quadratic term matrix; The term matrix represents the linear terms and determines the direction of the gradient for optimization.

[0051] The method provided in this invention constructs a performance index function that includes water level deviation and control variables, and substitutes the state prediction model into the performance index function. This transforms the performance index function into a standard quadratic programming form containing a linear and a quadratic term matrix, thus converting the complex channel hydraulic control problem into a classic mathematical optimization problem. This transformation not only allows for the rapid acquisition of control solutions that satisfy physical constraints using mature and efficient QP solvers, but also enables flexible balancing of water level control accuracy and equipment operating costs through the configuration of the weight matrix. It provides a clear and standard mathematical interface for subsequent reinforcement learning-based value function correction, laying the foundation for algorithm fusion.

[0052] Based on any of the above embodiments, the method for constructing the state prediction model includes: Based on the time-delay integral model and the historical open channel state vector, a linear state-space model describing the relationship between channel water level deviation and flow rate is constructed. The state prediction model is constructed based on the linear state-space model.

[0053] Here, the time-delay integral model is a simplified one-dimensional hydrodynamic model that can effectively describe the inertial and delay characteristics of open channel flow. Furthermore, the linear state-space model used here is a mathematical model that discretizes the physical model and describes the system's state evolution in matrix form.

[0054] Specifically, taking a system control cycle of 300 seconds, a prediction time domain of Np=100, and a control time domain of Nc=100 as an example, the backwater area, time delay, and gate parameters of the branch canal control gates are constructed based on the actual conditions of the local canal. Then, the state-space model of the system is constructed. Figure 2 This is a schematic diagram of the mathematical model construction of a single channel pool based on the time-delay integral model provided by the present invention, as shown in the figure. Figure 2 As shown, this model generalizes a water conveyance open channel system into physical units that include upstream and downstream control structures. Among them, This indicates the downstream flow process of the upstream control structure; This represents the downstream flow process of the control structure. To accurately describe the hydraulic characteristics of open channel flow, the model spatially divides the channel basin into a uniform flow zone and a backflow zone. The arrows in the figure indicate the lag time. Specifically, it refers to the number of time steps required for a change in upstream flow to propagate from the uniform flow zone to the downstream backwater zone. The area represents the water surface area of ​​the downstream backwater region, reflecting the water storage capacity characteristics of the channel. In the figure, y represents the control target, i.e., the water level deviation.

[0055] Therefore, based on the time-delay integral theory, the relationship between the rate of change of water level and the flow rate of a typical canal canal can be described by the following differential equation: ; In the formula, Indicates water level deviation; Indicates time; Indicates the surface area of ​​the backwater zone; The time delay step represents the time required for changes in upstream flow to propagate to the downstream. This indicates the downstream flow process of the upstream control structure; Indicates a lagging upstream inflow; This indicates the downstream flow process of the control structure; This indicates the water intake flow rate within the canal / pool.

[0056] Next, the differential equation can be discretized, and appropriate state variables can be selected. For example, the current open channel state vector can be defined. ,in, Indicates the current time Water level deviation; Represents the rate of change of water level; and the historical open channel state vector at several past moments. to .

[0057] Here, the specific dimension can depend on the lag time. The final linear state-space model is as follows: ; ; In the formula, Represents the current open channel state vector; Represented as a control sequence vector, i.e., the flow rates of the upstream and downstream gates. ; Represents a known or predicted disturbance vector; This represents the predicted open channel state; A is the state matrix, B is the input matrix, M is the disturbance matrix, and C is the output matrix.

[0058] Then, based on the discrete state equations, the output expressions for each future time step can be obtained through iterative derivation: ; in, .

[0059] Therefore, the future prediction time domain can be used. Listing all the output equations and writing them in compact matrix form yields the state prediction model. Here, the state prediction model can be represented by the following formula: ; In the formula, This represents the output sequence vector within the future prediction time domain; It is the control sequence vector in the future control time domain; denoted as the perturbation sequence vector; P, G, and D are the corresponding prediction coefficient matrices, respectively.

[0060] The method provided in this invention, compared to the complex Saint-Venant equations, employs a time-delay integral model to construct a linear state-space model of the channel. This significantly reduces the computational complexity of the model while preserving the core dynamic characteristics of open channel flow. Furthermore, the derived state prediction model enables rapid prediction of long-term water level changes using explicit matrix operations. This not only ensures the real-time requirements of model predictive control but also allows the linearized model structure to be easily transformed into a standard quadratic programming problem, ensuring the stable implementation and efficient solution of the control algorithm in practical engineering.

[0061] Based on any of the above embodiments, step 130 includes: Obtain the basis functions and pre-trained convergence weights; The predicted open channel state is input into the basis function to obtain the output value of the basis function; The current value function is obtained by multiplying the output value of the basis function with the convergence weight vector.

[0062] Here, the basis function refers to the transformation function that maps the high-dimensional or complex channel state space to the feature space. It is usually in polynomial form and is used to fit the shape of the value function. Convergence weights refer to the parameter vector obtained through reinforcement learning training, representing the contribution of different state features to the long-term cumulative reward.

[0063] Specifically, before commissioning or during online updates, an offline training set can be constructed using historical open channel state vectors or a simulation environment. Since the channel state vector has a high dimensionality, directly using it as input would lead to the curse of dimensionality. Therefore, this embodiment selects key state variables, such as the water level difference between the two channel pools, as feature inputs. Thus, optimization algorithms such as stochastic gradient descent can be used to train the value network in reinforcement learning. The goal of training is to enable the value function to accurately estimate the long-term cumulative cost starting from a certain state. After training, a stable set of convergent weight vectors is obtained. Additionally, basis functions are obtained, which can be in the form of quadratic polynomial basis functions.

[0064] Then, the predicted open channel state vector under the initial control sequence can be extracted, focusing primarily on the predicted water level deviation. This vector is then substituted into a preset basis function for feature extraction. For example, if the basis function is set to a second-order polynomial form, it will perform operations such as squaring and cross-products on the input water level deviation, thereby capturing the nonlinear features in the state space. After calculation, the output value of the basis function is obtained, thus completing the transformation from the physical state to the value feature space.

[0065] Furthermore, the output value of the basis function is multiplied by the convergence weight vector to obtain the current value function. It can be understood that the smaller the calculated current value function, the more ideal the predicted state trajectory is in the long run, and the more conducive it is to system stability; conversely, if the value is large, it indicates that although the constraints are met in the short term, there may be hidden dangers in the long term, requiring adjustment.

[0066] The method provided in this invention utilizes offline-trained weight vectors and requires only simple basis function mapping and vector product to evaluate the long-term value of the current control strategy within milliseconds. This not only greatly reduces the online computational load and ensures the real-time response capability of the control system, but also effectively captures the complex relationship between water level deviation and long-term system performance through the nonlinear mapping capability of basis functions, providing accurate quantitative basis for subsequent control strategy correction.

[0067] Based on any of the above embodiments, in step 140, the Jacobian matrix is ​​superimposed onto the linear term matrix of the initial objective function, and the Hessian matrix is ​​superimposed onto the quadratic term matrix of the initial objective function to obtain the modified objective function, including: Based on the response matrix in the state prediction model, the Jacobian matrix and the Hessian matrix are multiplied respectively to obtain the first-order correction term and the second-order correction term; The first-order correction terms are superimposed onto the first-order term matrix, and the second-order correction terms are superimposed onto the second-order term matrix to obtain the correction objective function; The response matrix represents the linear response relationship between the control sequence at the current moment and the water level output at a future moment.

[0068] Specifically, to transform the derivative with respect to state Y into the derivative with respect to control input U, i.e., the final required matrix, matrix operations can be performed using the chain rule. Specifically, for the Jacobian matrix, the response matrix can be multiplied by the Jacobian matrix to obtain the first-order correction term with respect to the control sequence. Furthermore, for the Hessian matrix, the response matrix can be multiplied by the Hessian matrix to obtain the second-order correction term with respect to the control sequence.

[0069] It should be noted that the response matrix here can be considered as a linear state-space model. Matrix in This is used to characterize the linear response between the control sequence at the current moment and the water level output at future moments. Furthermore, the Taylor expansion is based on the output vector u, but the variables in the quadratic programming matrix are the output matrix U. Therefore, u needs to be combined to form U. Thus, the response matrix here can be derived using a prediction model. The first-order correction term is calculated using matrix G, where matrix G represents the impact of the output on the current water level at the current moment, satisfying both the piecing together and dimensionality requirements. Therefore, the first-order correction term can be calculated by multiplying the response matrix by the Jacobian matrix and the Hessian matrix respectively. and second-order correction terms .

[0070] To further improve the correction effect, based on any of the above embodiments, the first-order correction term is superimposed on the first-order term matrix, and the second-order correction term is superimposed on the second-order term matrix to obtain the correction objective function, including: Obtain the first and second regulatory factors; The first-order correction term and the second-order correction term are weighted based on the first adjustment factor and the second adjustment factor, respectively, to obtain a weighted first-order correction term and a weighted second-order correction term; The weighted first-order correction term is superimposed onto the first-order term matrix, and the weighted second-order correction term is superimposed onto the second-order term matrix to obtain the correction objective function.

[0071] Here, the first adjustment factor refers to a preset hyperparameter used to control the weight of the reinforcement learning correction term in the overall objective function.

[0072] Specifically, the first and second adjustment factors can be set or adjusted online according to actual engineering needs. For example, when the water level fluctuation is relatively stable, the factor value can be appropriately reduced to allow MPC to dominate and maintain precise control; when encountering large disturbances or abnormal water levels, the factor value can be increased to introduce stronger long-term planning capabilities to quickly stabilize the system.

[0073] Then, it can be done through the first regulatory factor. Second regulatory factor For the first-order correction term and second-order correction terms By weighting, we obtain the weighted first-order correction term. and weighted second-order correction term Furthermore, the weighted first-order correction terms are superimposed onto the linear term matrix. In the middle, the weighted second-order correction terms are superimposed onto the quadratic term matrix. In the middle, we obtained including , The corrected objective function.

[0074] Finally, the corrected objective function can be solved using the quadprog function to obtain the output control sequence, which can then be used to inversely calculate the actual gate opening command using the gate orifice outflow formula. If the calculation result satisfies the physical constraints, the command is sent to the actuator; simultaneously, the state at the next moment under the current disturbance can be simulated based on the state equation, entering the next cycle, and finally outputting all control strategies.

[0075] It should be noted that by introducing the first and second adjustment factors, the balance between short-term physical constraints and long-term intelligent planning can be flexibly adjusted, giving the system strong adaptability. The correction method does not require changing the core algorithm structure of the MPC solver, and also ensures the stability and computational efficiency of the algorithm. At the same time, it effectively injects the intelligent decision-making ability of reinforcement learning into the control process, realizing intelligent punishment and trend guidance for the channel gate action.

[0076] Based on any of the above embodiments Figure 3 This is the second flowchart illustrating the control method for channel gate regulation provided by the present invention, as shown below. Figure 3 As shown, the method includes: First, obtain information about the open channel, including collecting basic physical parameters such as the area of ​​the backwater zone and the time delay, as well as real-time status data such as water level and flow rate, to provide basic input for subsequent calculations.

[0077] Next, a mathematical model is constructed based on the time-delay integral model and the Saint-Venant equations. Specifically, the Saint-Venant equations describing the hydrodynamic process of open channels can be linearized using the time-delay integral theory to establish a discrete state-space model that reflects the dynamic transmission relationship between water level deviations and flow rates among multiple channels and pools.

[0078] Based on this, we enter the basic control stage, construct the objective function and constraints of the basic MPC, set the performance index function with the goal of minimizing water level deviation and control quantity, including the state weight matrix Q and the control weight matrix R, and clarify the physical hard constraints such as the upper and lower limits of flow and the maximum rate of change.

[0079] Subsequently, the gate control strategy of the basic MPC is solved, the performance index is converted into the standard form of quadratic programming, and the initial control sequence in the finite prediction time domain is calculated by the solver.

[0080] To overcome the short-sightedness effect of traditional MPC due to time-domain limitations, this method further constructs a value function for reinforcement learning, building RL-MPC. This involves using basis functions and pre-trained convergent weight vectors to construct the value function, which evaluates the cumulative cost of the current state from a long-term perspective. Next, a Taylor expansion is performed to solve for the RL-MPC objective function. This is the core step in this embodiment. By performing a second-order Taylor expansion of the value function with respect to the control sequence, the Jacobian matrix representing gradient information and the Hessian matrix representing curvature information are extracted. These two matrices are then weighted and superimposed onto the first-order term matrix (H) and the second-order term matrix (E) of the basic MPC objective function, respectively, thus generating a modified objective function that incorporates long-term planning capabilities.

[0081] Finally, the gate control strategy of RL-MPC is solved, and the modified objective function is solved by quadratic programming to obtain the final gate opening control command that satisfies the current physical constraints and has a long-term optimization perspective, and then sent to the actuator.

[0082] Based on any of the above embodiments Figure 4 This is a schematic diagram of the control device for channel gate regulation provided by the present invention, as shown below. Figure 4 As shown, the device includes: Unit 410 obtains the current open channel state vector; The initial solution unit 420 solves for the initial control sequence based on the current open channel state vector and the constructed initial objective function; the initial objective function includes a first-order term matrix and a second-order term matrix, which are constructed based on the historical open channel state vector. The value function calculation unit 430 calculates the current value function based on the predicted open channel state corresponding to the initial control sequence; The optimization unit 440 performs a second-order Taylor expansion on the current value function to extract the Jacobian matrix and the Hessian matrix. The Jacobian matrix is ​​then superimposed onto the first-order term matrix of the initial objective function, and the Hessian matrix is ​​superimposed onto the second-order term matrix of the initial objective function to obtain the modified objective function. The secondary solution unit 450 inputs the current open channel state vector into the modified objective function and solves to obtain the output control sequence.

[0083] The apparatus provided in this invention obtains the current open channel state vector and constructs an initial objective function to solve for the initial control sequence. Based on the predicted open channel state corresponding to the initial control sequence, the current value function is calculated, and the Jacobian matrix and Hessian matrix are extracted through a second-order Taylor expansion. These high-order information representing long-term value are superimposed on the first-order and second-order term matrices of the initial objective function, respectively. This enables the controller to perceive and avoid potential future risks at the current moment, significantly improving the accuracy of water level control, reducing water level deviation, and achieving efficient, stable, and long-lasting operation of the canal group water conveyance system.

[0084] Based on any of the above embodiments, the device further includes a function construction unit, which is specifically used for: Construct a performance index function with the objectives of minimizing water level deviation and minimizing control quantity; The state prediction model, constructed based on historical open channel state vectors, transforms the performance index function into the initial objective function, which includes the first-order term matrix and the second-order term matrix.

[0085] Based on any of the above embodiments, the device further includes a model building unit, which is specifically used for: Based on the time-delay integral model and the historical open channel state vector, a linear state-space model describing the relationship between channel water level deviation and flow rate is constructed. The state prediction model is constructed based on the linear state-space model.

[0086] Based on any of the above embodiments, the value function calculation unit is specifically used for: Obtain the basis functions and pre-trained convergence weights; The predicted open channel state is input into the basis function to obtain the output value of the basis function; The current value function is obtained by multiplying the output value of the basis function with the convergence weight vector.

[0087] Based on any of the above embodiments, the optimization unit is specifically used for: Based on the response matrix in the state prediction model, the Jacobian matrix and the Hessian matrix are multiplied respectively to obtain the first-order correction term and the second-order correction term; The first-order correction terms are superimposed onto the first-order term matrix, and the second-order correction terms are superimposed onto the second-order term matrix to obtain the correction objective function; The response matrix represents the linear response relationship between the control sequence at the current moment and the water level output at a future moment.

[0088] Based on any of the above embodiments, the optimization unit is further specifically used for: Obtain the first and second regulatory factors; The first-order correction term and the second-order correction term are weighted based on the first adjustment factor and the second adjustment factor, respectively, to obtain a weighted first-order correction term and a weighted second-order correction term; The weighted first-order correction term is superimposed onto the first-order term matrix, and the weighted second-order correction term is superimposed onto the second-order term matrix to obtain the correction objective function.

[0089] Figure 5 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 5 As shown, the electronic device may include: a processor 510, a communication interface 520, a memory 530, and a communication bus 540, wherein the processor 510, the communication interface 520, and the memory 530 communicate with each other through the communication bus 540. The processor 510 can call logic instructions in the memory 530 to execute a control method for channel gate regulation. The method includes: obtaining the current open channel state vector; solving for an initial control sequence based on the current open channel state vector and a constructed initial objective function; the initial objective function includes a first-order term matrix and a second-order term matrix, constructed based on historical open channel state vectors; calculating the current value function based on the predicted open channel state corresponding to the initial control sequence; performing a second-order Taylor expansion on the current value function to extract the Jacobian matrix and the Hessian matrix; superimposing the Jacobian matrix onto the first-order term matrix of the initial objective function, and superimposing the Hessian matrix onto the second-order term matrix of the initial objective function to obtain a modified objective function; inputting the current open channel state vector into the modified objective function, and solving for the output control sequence.

[0090] Furthermore, the logical instructions in the aforementioned memory 530 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0091] On the other hand, the present invention also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the control method for channel gate regulation provided by the above methods. The method includes: obtaining the current open channel state vector; solving for an initial control sequence based on the current open channel state vector and a constructed initial objective function; the initial objective function includes a first-order term matrix and a second-order term matrix, constructed based on historical open channel state vectors; calculating a current value function based on the predicted open channel state corresponding to the initial control sequence; performing a second-order Taylor expansion on the current value function to extract the Jacobian matrix and the Hessian matrix; superimposing the Jacobian matrix into the first-order term matrix of the initial objective function; superimposing the Hessian matrix into the second-order term matrix of the initial objective function to obtain a modified objective function; and inputting the current open channel state vector into the modified objective function to solve for an output control sequence.

[0092] In another aspect, the present invention also provides a non-transitory computer-readable storage medium storing a computer program thereon. When executed by a processor, the computer program implements a control method for channel gate regulation provided by the above methods. The method includes: obtaining a current open channel state vector; solving for an initial control sequence based on the current open channel state vector and a constructed initial objective function; the initial objective function includes a first-order term matrix and a second-order term matrix, constructed based on historical open channel state vectors; calculating a current value function based on the predicted open channel state corresponding to the initial control sequence; performing a second-order Taylor expansion on the current value function to extract a Jacobian matrix and a Hessian matrix; superimposing the Jacobian matrix onto the first-order term matrix of the initial objective function, and superimposing the Hessian matrix onto the second-order term matrix of the initial objective function to obtain a modified objective function; and inputting the current open channel state vector into the modified objective function to solve for an output control sequence.

[0093] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0094] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0095] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A control method for regulating channel gates, characterized in that, include: Obtain the current open channel state vector; Based on the current open channel state vector and the constructed initial objective function, the initial control sequence is obtained by solving the problem; The initial objective function includes a linear term matrix and a quadratic term matrix, which are constructed based on the historical open channel state vector; The current value function is calculated based on the predicted open channel state corresponding to the initial control sequence; The current value function is expanded using a second-order Taylor series to extract the Jacobian matrix and the Hessian matrix. The Jacobian matrix is ​​then superimposed onto the first-order term matrix of the initial objective function, and the Hessian matrix is ​​superimposed onto the second-order term matrix of the initial objective function to obtain the modified objective function. The current open channel state vector is input into the modified objective function, and the output control sequence is obtained by solving the problem.

2. The control method for channel gate regulation according to claim 1, characterized in that, The steps for constructing the initial objective function include: Construct a performance index function with the objectives of minimizing water level deviation and minimizing control quantity; The state prediction model, constructed based on historical open channel state vectors, transforms the performance index function into the initial objective function, which includes the first-order term matrix and the second-order term matrix.

3. The control method for channel gate regulation according to claim 2, characterized in that, The method for constructing the state prediction model includes: Based on the time-delay integral model and the historical open channel state vector, a linear state-space model describing the relationship between channel water level deviation and flow rate is constructed. The state prediction model is constructed based on the linear state-space model.

4. The control method for channel gate regulation according to any one of claims 1 to 3, characterized in that, The step of calculating the current value function based on the predicted open channel state corresponding to the initial control sequence includes: Obtain the basis functions and pre-trained convergence weights; The predicted open channel state is input into the basis function to obtain the output value of the basis function; The current value function is obtained by multiplying the output value of the basis function with the convergence weight vector.

5. The control method for channel gate regulation according to any one of claims 2 to 3, characterized in that, The step of superimposing the Jacobian matrix onto the linear term matrix of the initial objective function, and superimposing the Hessian matrix onto the quadratic term matrix of the initial objective function to obtain the modified objective function includes: Based on the response matrix in the state prediction model, the Jacobian matrix and the Hessian matrix are multiplied respectively to obtain the first-order correction term and the second-order correction term; The first-order correction terms are superimposed onto the first-order term matrix, and the second-order correction terms are superimposed onto the second-order term matrix to obtain the correction objective function; The response matrix represents the linear response relationship between the control sequence at the current moment and the water level output at a future moment.

6. The control method for channel gate regulation according to claim 5, characterized in that, The step of superimposing the first-order correction term onto the linear term matrix and the second-order correction term onto the quadratic term matrix to obtain the corrected objective function includes: Obtain the first and second regulatory factors; The first-order correction term and the second-order correction term are weighted based on the first adjustment factor and the second adjustment factor, respectively, to obtain a weighted first-order correction term and a weighted second-order correction term; The weighted first-order correction term is superimposed onto the first-order term matrix, and the weighted second-order correction term is superimposed onto the second-order term matrix to obtain the correction objective function.

7. A control device for regulating channel gates, characterized in that, include: The acquisition unit acquires the current open channel state vector; The initial solution unit solves for the initial control sequence based on the current open channel state vector and the constructed initial objective function; the initial objective function includes a first-order term matrix and a second-order term matrix, which are constructed based on the historical open channel state vector. The value function calculation unit calculates the current value function based on the predicted open channel state corresponding to the initial control sequence; The optimization unit performs a second-order Taylor expansion on the current value function to extract the Jacobian matrix and the Hessian matrix. The Jacobian matrix is ​​then superimposed onto the first-order term matrix of the initial objective function, and the Hessian matrix is ​​superimposed onto the second-order term matrix of the initial objective function to obtain the modified objective function. The secondary solution unit inputs the current open channel state vector into the modified objective function and solves to obtain the output control sequence.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the control method for channel gate regulation as described in any one of claims 1 to 6.

9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the control method for channel gate regulation as described in any one of claims 1 to 6.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the control method for channel gate regulation as described in any one of claims 1 to 6.