Channel pi parameter setting method and system based on context bayesian optimization

By employing a context-based Bayesian optimization-based channel PI parameter tuning method, which utilizes operating condition context modeling and stability feasible region constraints, the problem of low PI parameter tuning efficiency in long-distance open channel water conveyance systems is solved, achieving efficient and safe control under varying operating conditions.

CN122308046APending Publication Date: 2026-06-30WUHAN UNIV

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
WUHAN UNIV
Filing Date
2026-03-31
Publication Date
2026-06-30

AI Technical Summary

Technical Problem

Existing PI parameter tuning methods are difficult to balance system stability, safety and optimization efficiency under varying operating conditions in long-distance open channel water conveyance systems, and do not fully utilize the correlation information between different operating conditions, resulting in low parameter tuning efficiency.

Method used

A channel PI parameter tuning method based on contextual Bayesian optimization is adopted. By combining operating condition context modeling, stability prior learning and stability feasible region constraints, and offline and online optimization, a stability knowledge base and Gaussian process model are constructed to achieve adaptive tuning of PI control parameters.

Benefits of technology

It improves the efficiency of parameter tuning under new operating conditions, ensures system stability and safety, and optimizes efficiency while ensuring control accuracy and stability. The tuning method is continuously improved through data closed-loop updates.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122308046A_ABST
    Figure CN122308046A_ABST
Patent Text Reader

Abstract

This invention discloses a method and system for tuning channel PI parameters based on contextual Bayesian optimization. The method includes: First, performing Bayesian optimization under multiple typical operating conditions with the objective of minimizing the settling time, constructing an offline stability knowledge base that integrates operating condition context information, and training a context-aware stability prediction Gaussian process model; Second, for the target operating condition, adaptively selecting knowledge transfer or local exploration paths based on model prediction uncertainty to construct a stability feasible region; Subsequently, within the feasible region, combining channel water level control accuracy and gate action stability indicators, dynamically constructing a comprehensive performance objective function and performing Bayesian optimization to obtain the optimal PI parameters; Finally, continuously updating the knowledge base and model through data closure. This invention achieves safe, efficient, and adaptive tuning of channel PI parameters under varying operating conditions, fundamentally ensuring the operational stability of the 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 automated control and intelligent optimization technology for open channel water conveyance projects, specifically to a channel proportional-integral (PI) parameter tuning method based on contextual Bayesian optimization, which is applicable to the adaptive tuning of gate PI controller parameters under multiple operating conditions such as large and medium-sized water diversion projects and irrigation canal systems. Background Technology

[0002] In long-distance open channel water conveyance systems, PI control based on downstream water level or flow feedback is typically used to regulate gates and maintain stable water level or flow within the target range. The selection of PI controller parameters directly affects the system's regulation speed, overshoot characteristics, steady-state accuracy, and the smoothness of gate operation.

[0003] Existing PI parameter tuning methods mainly include grid search-based methods, empirical tuning methods, and intelligent optimization methods based on offline models. Among these, grid search-based methods typically perform uniform sampling and traversal evaluation in the parameter space, resulting in high computational cost, low efficiency, and a lack of explicit constraints on system stability, making it prone to evaluating unstable parameter combinations during the search process. Empirical tuning methods rely on human experience and are ill-suited for channel systems with frequently changing operating conditions. While intelligent optimization methods based on offline models can improve parameter performance to some extent, they have high computational costs and require large-scale recalculations when operating conditions change.

[0004] Furthermore, existing methods generally do not fully utilize the correlation information between different operating conditions, making it difficult to achieve knowledge transfer across operating conditions, resulting in low parameter tuning efficiency under new operating conditions. Therefore, there is an urgent need for a PI parameter tuning method that can balance system stability, safety, and optimization efficiency under varying operating conditions. Summary of the Invention

[0005] The purpose of this invention is to overcome the shortcomings of the prior art and provide a channel PI control parameter tuning method based on contextual Bayesian optimization. By introducing operating condition context modeling, stability prior learning, and stability feasible region constraint mechanism, the method achieves safe, efficient, and adaptive tuning of PI control parameters under multiple operating conditions.

[0006] The method for tuning channel PI parameters based on contextual Bayesian optimization for open channel water conveyance systems designed in this invention includes the following steps: Under multiple typical operating conditions, Bayesian optimization with the goal of minimizing the settling time is performed, data is collected, and an offline stability knowledge base that integrates operating condition context information is constructed. Based on the offline stability knowledge base, a context-aware stability prediction Gaussian process model is trained to predict the settling time and its uncertainty under any combination of "operating conditions and parameters". For the current target operating condition to be optimized, a confidence assessment is performed based on the prediction uncertainty of the context-aware Gaussian process model: If the prediction uncertainty is below a preset threshold, it is determined to be a high-confidence path, and the model is directly used to predict the stabilization time under the target operating condition; otherwise, it is determined to be a low-confidence path, and local Bayesian optimization is initiated under the target operating condition to obtain a stabilization time estimate; based on the predicted or estimated stabilization time, a stability feasible region under the target operating condition is constructed, thereby establishing stability constraints under the operating condition. The establishment of stability constraints is decoupled from the comprehensive performance optimization: within the constructed stability feasible region, with water level control accuracy and gate operation smoothness as optimization objectives, a comprehensive performance objective function is dynamically constructed and Bayesian optimization is performed to search for the optimal PI parameters. New data generated during the online optimization process is fed back to the offline stability knowledge base, and the context-aware stability prediction Gaussian process model is updated to achieve continuous learning.

[0007] Preferably, the construction of the offline stability knowledge base in step S1 specifically includes: S11: Select a set of typical operating conditions that cover the preset operating range; S12: For each typical operating condition, execute a local Bayesian optimization loop within its PI parameter space with the objective of minimizing the settling time. S13: In each optimization iteration, the settling time of the candidate parameters is evaluated through the simulation model, and a data tuple containing the PI parameters, operating context variables and the corresponding settling time is recorded; S14: Summarize the data tuples generated under all typical operating conditions to form an offline stability knowledge base.

[0008] Preferably, the context-aware Gaussian process model described in step S2 uses the Matern kernel function with automatic correlation determination function, takes the joint PI parameter and operating condition context variable as input, and takes the steady-state time as output. It estimates the hyperparameter by maximizing the log marginal likelihood and is used to predict the mean and standard deviation of the steady-state time under any combination of inputs.

[0009] Preferably, the construction of the stability feasible region under the target operating condition in step S3 specifically includes: S31: Compare the prediction standard deviation of the context-aware Gaussian process model with a preset threshold. If the prediction standard deviation is lower than the threshold, it is determined to be a high-confidence path and the model is used directly for prediction; otherwise, it is determined to be a low-confidence path and local Bayesian optimization is initiated under the target working condition to construct a local stability model. S32: Based on the selected path, obtain the theoretical minimum settling time estimate under the target working condition, and introduce the engineering safety margin coefficient to determine the stability threshold; S33: Perform a grid scan in the PI parameter space, and based on the predicted mean and standard deviation of the selected model, use the robustness criterion to select the set of parameter points that meet the stability threshold as the explicitly defined stable feasible region.

[0010] Preferably, the robustness criterion in step S33 is:

[0011] in, For the Gaussian process model, the parameter θ under the target working condition The predicted mean of the next settling time. To predict the standard deviation, The confidence coefficient is... The stability threshold is the threshold value under the target operating condition.

[0012] Preferably, the dynamic construction of the comprehensive performance objective function in step S4 specifically includes: S41: Within the feasible region of stability, Latin hypercube sampling is used to select multiple initial sample points. Simulation is performed on each initial sample point to calculate the normalized integral absolute error index used to measure the accuracy of water level control and the normalized total variation index of control quantity used to measure the smoothness of gate action. S42: Determine the normalized reference value based on the normalized integral absolute error value and the normalized total variation value of the control quantity calculated from all initial sample points. S43: Set weighting coefficients according to engineering preferences, divide the two indicators by their corresponding normalized benchmark values, and then perform a weighted summation to construct the comprehensive performance objective function.

[0013] Further, the normalized benchmark values ​​mentioned in step S42 are the median of the normalized integral absolute error of the initial sample points and the median of the total variation of the normalized control quantity; the comprehensive performance objective function mentioned in step S43 is:

[0014] in, and These are the median of the normalized integral absolute error of the initial sample points and the median of the total variation of the normalized control quantity, respectively. and The weighting coefficients and ; Preferably, the step S4, which involves performing Bayesian optimization within the feasible region to search for the optimal PI parameters, specifically includes: training a Gaussian process surrogate model based on initial sample points and their corresponding comprehensive performance objective function values; within the stable feasible region, with the goal of minimizing the comprehensive performance objective function value, using an expected improvement acquisition function to guide the search, iteratively updating the surrogate model and recommending new candidate parameters, until the preset maximum number of iterations is reached or the process terminates after multiple consecutive iterations without improvement, and outputting the optimal PI parameters that minimize the comprehensive performance objective function value.

[0015] Preferably, updating the context-aware Gaussian process model in step S5 specifically includes: feeding back and expanding the offline stability knowledge base with the new data generated by starting local exploration under the low-confidence path in step S3, and the new data generated by evaluating candidate parameters during the online comprehensive performance optimization process in step S4; when the accumulated amount of new data reaches a preset quantity or a preset time period, retraining the context-aware Gaussian process model using the updated offline stability knowledge base.

[0016] Based on the same inventive concept, this invention also discloses a tuning system for implementing a channel PI control parameter tuning method based on contextual Bayesian optimization, comprising: The offline learning module is used to perform Bayesian optimization with the goal of minimizing the settling time under multiple typical working conditions. It collects data to build and update an offline stability knowledge base that integrates working condition context information, and trains a context-aware Gaussian process model that integrates prior information from multiple working conditions based on the offline stability knowledge base. This model can transfer the stability knowledge of the learned working conditions to new working conditions. The online optimization module is used to evaluate the confidence level based on the prediction uncertainty of the context-aware Gaussian process model for the current target working condition to be optimized, and adaptively select the path. Based on the selected path, the stabilization time is obtained and a stable feasible region is constructed, thereby establishing the stability constraints under the working condition. Within the constructed stable feasible region, with water level control accuracy and gate action smoothness as optimization objectives, a comprehensive performance objective function is dynamically constructed and Bayesian optimization is performed to search for the optimal PI parameters. The data closed-loop module is used to feed back new data generated during the online optimization process to the offline stability knowledge base and trigger the offline learning module to update the context-aware Gaussian process model to achieve continuous learning.

[0017] Compared with the prior art, the present invention has the following beneficial effects: 1) By introducing working condition context modeling, stability knowledge transfer across working conditions is realized, which improves the efficiency of parameter tuning under new working conditions; 2) Before parameter optimization, explicitly construct the stable feasible region, introduce system stability as a hard constraint into the optimization process, avoid evaluating unstable parameters, and improve operational safety; 3) Decouple stability optimization from overall performance optimization to balance control accuracy and control smoothness while ensuring system stability; 4) Through the data closed-loop update mechanism, the tuning method can be continuously improved as the running data accumulates. Attached Figure Description

[0018] Figure 1 This is a flowchart of the channel PI control parameter tuning method based on contextual Bayesian optimization according to the present invention.

[0019] Figure 2 The structure diagram of the channel hydraulic simulation model and control system.

[0020] Figure 3 This is a schematic diagram of a two-path decision-making process based on confidence assessment.

[0021] Figure 4 Predicting surfaces for steady-time Gaussian processes.

[0022] Figure 5 This represents the feasible region of stability under the target operating condition.

[0023] Figure 6 Optimize the convergence curve for the overall objective.

[0024] Figure 7-8 For the evolutionary comparison of comprehensive target agent models.

[0025] Figure 9 The diagram shows the effect of optimizing parameter control. Detailed Implementation

[0026] The parameter tuning method proposed in this invention will be further described below with reference to specific embodiments. Those skilled in the art should understand that the following embodiments are only used to explain the technical principles of this invention and are not intended to limit the scope of protection of this invention.

[0027] Example 1 This embodiment discloses a method for tuning channel PI control parameters based on contextual Bayesian optimization, including the following process: 1. Overall System Framework and Problem Modeling As attached Figure 1 As shown, the overall process of implementing this invention includes two major stages: offline learning and online optimization, and forms a collaborative closed loop through data feedback.

[0028] 1.1 Modeling the Channel PI Control Problem Consider using a PI control system for the open channel gate with downstream constant water level feedback. Control water level deviation. ,in For the target water level, This is the measured water level. The PI control law is:

[0029] in For gate or flow control operation, This is the proportionality coefficient. Let be the integral coefficients. For ease of engineering adjustment, the vector of parameters to be tuned is defined as follows: ,in The time for integration.

[0030] 1.2 Definition of Operating Condition Context Variables Define a vector of operating condition context variables to describe the operating conditions. In one embodiment, ,in The water intake flow rate at the water distribution point. This refers to the downstream outflow rate.

[0031] 1.3 Definition of Key Performance Indicators Stabilization time In closed-loop simulation, the time it takes for the controlled water level deviation to first enter and remain within the steady-state tolerance band.

[0032] Normalized integral absolute error Indicators for measuring the accuracy of water level control.

[0033] Total variation of normalized control quantity An indicator for measuring the smoothness of gate operation.

[0034] The hydraulic simulation modeling and control system structure is shown in the attached figure. Figure 2 As shown.

[0035] 2. Specific Implementation Steps 2.1 Steps for building an offline stability knowledge base Select a set of typical operating conditions covering the operating range .

[0036] For each fixed working condition Within its PI parameter space, perform a function to minimize the settling time. A local Bayesian optimization loop for the objective.

[0037] Evaluate candidate parameters in each optimization iteration At that time, the simulation model is called to perform closed-loop control simulation and calculate the settling time. and record data tuples .

[0038] An offline stability knowledge base is formed by summarizing the data tuples generated from optimization under all typical operating conditions. .

[0039] 2.2 Training Steps for Context-Stable Proxy Model based on Training a context-aware Gaussian process prediction model for stability .

[0040] With joint input As the independent variable, with The dependent variable is denoted as . The model employs a Matern 5 / 2 kernel function with Automatic Relevance Determination (ARD) to automatically learn the impact of each input dimension on the settling time. By maximizing the log-marginal likelihood to estimate the hyperparameters, a model capable of predicting any combination of "operating conditions and parameters" is obtained. Values ​​and their uncertainty model .

[0041] 2.3 Stability Feasible Region Adaptive Construction Steps For the target working conditions Constructing a stable feasible region .

[0042] Confidence assessment and path selection: utilizing The assessment of its predictive uncertainty is compared with a reference threshold (the scale of change in the original data). Specific steps are detailed in the attached document. Figure 3 As shown.

[0043] High-confidence path: If the uncertainty is below the threshold, then use it directly. Model.

[0044] Low-confidence path: Otherwise, in Next, a new local Bayesian optimization is initiated, a local stability model is built using the new data, and the data is fed back into the system in real time. .

[0045] Determine the stability threshold : Obtain the estimated theoretical minimum settling time under the target operating condition through the selected path. Set the safety margin factor for the project. Calculate the stability threshold .

[0046] Feasible region construction: Using the selected model, perform a grid sampling scan in the PI parameter space, for each sampling parameter... According to robust criteria The set of feasible parameter points is the explicitly defined stable feasible region. ; This is the confidence coefficient.

[0047] 2.4 Online Comprehensive Performance Optimization Steps exist Internal optimization is performed to find the parameters with the best overall control performance.

[0048] Initial sampling and evaluation within the feasible domain: Latin hypercube sampling is used for internal selection. initial sample points For each point Perform simulation and synchronous calculation and : Construct a comprehensive performance objective function: 1) Calculate the initial sampling points and median of values and .

[0049] 2) Set weighting coefficients based on project preferences. and ( Construct the objective function:

[0050] Build the proxy model and perform Bayesian optimization: 1) Based on the initial dataset Training Gaussian process model As The proxy model.

[0051] 2) In Inside, to minimize To achieve this, a Bayesian optimization loop is initiated (using the desired improvement to the EI acquisition function): new points are recommended based on the acquisition function. Assessment of authenticity Update model .

[0052] 3) Preset number of iterations Next, the output makes Minimum optimal parameters .

[0053] S5: Steps for Collaborative Update of Knowledge Base and Model The low-confidence path in the adaptive construction step of the stability feasible region in section 2.3 and the new data tuples generated in the online comprehensive performance optimization step in section 2.4 will be used to construct the new data tuples. Feedback to the offline stability knowledge base The updated version will be used whenever a preset amount of new data is accumulated or a periodic trigger occurs. Retrain the context-aware stability prediction model This enables the continuous evolution of system knowledge.

[0054] Examples and Effect Verification To verify the effectiveness and superiority of the method of the present invention, a simulation experiment was conducted using a long channel pool as an example of the ASCE gentle slope test channel.

[0055] 1. Experimental Setup 1.1 Channel Parameters Canal length bottom slope roughness The channel design traffic is... Increase traffic The gate width of the upstream control gate is The gate flow coefficient is The maximum opening of the gate is The water inlet is located downstream of the canal pool, with a maximum water intake flow rate of [missing information]. The elevation of the end point of the canal bottom is... The initial water depth downstream is The downstream constant water level is used for control, with the initial water level also serving as the target water level.

[0056] 1.2 Simulation Environment A channel hydraulic simulation model was constructed based on the one-dimensional Saint-Venant equations. The simulation duration was... Sampling time interval The steady-state tolerance zone is set at the target water level. .

[0057] 1.3 PI parameter range The search space for the PI parameter and the scaling factor are determined based on engineering experience. Integral time

[0058] 1.4 Operating Condition Definition Define operating condition context variables ,in The water intake flow rate at the water distribution point. This refers to the downstream outflow, also known as the initial flow. The value ranges are as follows: , The water intake conditions are all set to step change, that is, the water intake changes instantaneously from 0 to the set value.

[0059] 1.5 Comparison Methods The following methods were selected as the benchmark for comparison: Method 1: Particle Swarm Optimization Algorithm Method 2: Standard Bayesian optimization method (weighting the settling time with other objectives for optimization) 2. Execution process of offline learning phase 2.1 Selection of Typical Working Conditions The working space is divided into 4×6 typical working points at equal intervals: Right now: , The combination yields 24 representative working conditions. .

[0060] 2.2 Local Bayesian Optimization For each typical operating condition, execute separately to minimize the settling time. For the local Bayesian optimization of the objective, 20 points are initially sampled for each working condition, and the process is iterated 20 times, with 4 points sampled in each iteration. Data is collected synchronously during the optimization process. Data tuples, a total of A set of sample data constitutes an offline stability knowledge base. .

[0061] based on Training a context-aware Gaussian process model The model employs the Matern 5 / 2 kernel function with Automatic Relevance Determination (ARD). By maximizing the log-marginal likelihood to estimate the hyperparameters, a model capable of predicting arbitrary combinations of operating conditions and parameters is obtained. Values ​​and their uncertainty model .

[0062] 3. Execution process of online optimization phase 3.1 Selection of Target Operating Conditions Select a new operating condition that does not occur in the typical operating conditions. As a test condition.

[0063] 3.2 Confidence Assessment and Path Selection use The prediction uncertainty under the target operating condition is assessed, and the mean prediction standard deviation is calculated. It is less than the average variance of the overall change in the database data. If it is determined to be a high-confidence path, the global model is used directly. Perform subsequent predictions; otherwise, perform local Bayesian optimization separately under the target operating condition.

[0064] 3.3 Construction of Stable Feasible Region 1) Obtain the theoretical minimum settling time under the target operating condition through model query. .

[0065] 2) Set the safety margin factor for the project Calculate the stability threshold

[0066] 3) Perform a grid scan on the PI parameter plane and calculate the robustness criterion for each grid point. The stable feasible region was obtained by screening. .

[0067] As attached Figure 4 , 5 As shown, construct the condition that satisfies This refers to the stable feasible region with a stabilization time threshold of 832 minutes. It can be seen that the unstable region constitutes the majority of the entire parameter space. Performing comprehensive performance optimization within the entire parameter space would lead to the evaluation of unstable parameters, affecting the convergence of the objective.

[0068] 3.4 Overall Performance Optimization 1) In Latin hypercube sampling is used for internal selection. Given an initial sample point, calculate the value of each point. value.

[0069] 2) Calculate the initial sampling points and median of values and .

[0070] 3) Set weighting coefficients Construct the comprehensive objective function:

[0071] 4) Train a Gaussian process model based on the initial data Bayesian optimization is performed using the desired improvement of the EI acquisition function, and the process is iterative. Each iteration samples one point.

[0072] 5) Terminate the optimization if the maximum number of iterations is reached or if there is no improvement after 10 consecutive iterations, and obtain the optimal parameters. and the corresponding .

[0073] As attached Figure 6-8 As shown, within the feasible region The sampled NIAE and NTV values ​​change gradually, the median normalization is effective, the optimization process focuses on exploration in the early stage and utilization in the later stage, and can converge quickly with fewer sampling points.

[0074] 4. Optimization Results and Comparative Analysis The control effect of applying the optimized parameters obtained by this method to the simulation is shown in the attached figure. Figure 9 As shown, it can keep the water level stable within a specified time range (830 min), and the water level control is precise, while the flow rate and gate control processes are smooth.

[0075] Performance index comparison (where particle swarm optimization and standard BO both use steady-state time and NIAE, NTV weighted optimization, and the coefficient of the comprehensive value J is determined by the median of the initial sampling)

[0076] Experimental results show that the method of this invention significantly outperforms the comparative methods in terms of control accuracy (NIAE reduced by 14.0%-15.2%), control stability (NTV reduced by 5.6%-10.9%), and overall performance (J value optimized by 12.3%-13.6%). More importantly, this invention reduces the tuning time to 15 minutes and the number of evaluations to 40%-92.8%, greatly improving the feasibility of online applications. Simultaneously, by constraining the stability feasible region, it fundamentally avoids the evaluation and application of unstable parameters, providing intrinsic safety assurance for engineering practice.

[0077] 5. Ablation test To verify the effectiveness of the confidence judgment mechanism, comparative experiments were conducted on high-confidence paths and low-confidence paths, respectively.

[0078] 1) High-confidence scenario: Select the target operating condition within the coverage area of ​​typical operating conditions. Two strategies are used to construct the stability feasible region: Strategy A directly uses the global model. (Corresponding to the high-confidence path of this invention), strategy B restarts local Bayesian optimization under the target condition. Experimental results show that the settling time obtained by the two strategies is... The estimated value difference is less than 5%, meaning the global model can replace local optimization with high accuracy. However, strategy A only needs to call the global model for prediction without additional simulation evaluation, while strategy B requires at least 30 simulations to obtain the initial model. Therefore, at high confidence levels, this invention reduces the number of simulation evaluations by 30 by directly using the global model, while ensuring that the accuracy loss is less than 5%, significantly reducing online computing costs and time consumption.

[0079] 2) Low-confidence scenario: Selecting target operating conditions that exceed the coverage of typical operating conditions. Strategy A directly uses the global model for prediction, while Strategy B initiates local Bayesian optimization. The results show that Strategy A's prediction error is as high as 30%, causing the constructed feasible region to deviate significantly from the true stable region; while Strategy B obtains an accurate feasible region through local optimization. This indicates that under low-confidence conditions, local exploration must be initiated to ensure reliability.

[0080] The above experiments fully demonstrate that the confidence judgment mechanism can adaptively select the optimal path based on the degree of matching between the working condition and prior knowledge: high efficiency is achieved by using the prior model under high confidence (accuracy loss <5%, simulation number reduced by 30), and local exploration is initiated under low confidence to ensure high reliability, thus taking into account both the efficiency and accuracy of the overall tuning process.

[0081] Example 2 Based on the same inventive concept, this embodiment also discloses a tuning system for implementing a channel PI control parameter tuning method based on contextual Bayesian optimization, comprising: The offline learning module is used to perform Bayesian optimization with the goal of minimizing the settling time under multiple typical working conditions. It collects data to build and update an offline stability knowledge base that integrates working condition context information, and trains a context-aware Gaussian process model that integrates prior information from multiple working conditions based on the offline stability knowledge base. This model can transfer the stability knowledge of the learned working conditions to new working conditions. The online optimization module is used to evaluate the confidence level based on the prediction uncertainty of the context-aware Gaussian process model for the current target working condition to be optimized, and adaptively select the path. Based on the selected path, the stabilization time is obtained and a stable feasible region is constructed, thereby establishing the stability constraints under the working condition. Within the constructed stable feasible region, with water level control accuracy and gate action smoothness as optimization objectives, a comprehensive performance objective function is dynamically constructed and Bayesian optimization is performed to search for the optimal PI parameters. The data closed-loop module is used to feed back new data generated during the online optimization process to the offline stability knowledge base and trigger the offline learning module to update the context-aware Gaussian process model to achieve continuous learning.

[0082] Since the system described in Embodiment 2 of this invention is the same system used in Embodiment 1 of this invention for implementing the channel PI control parameter tuning method based on contextual Bayesian optimization, those skilled in the art can understand the specific structure and variations of this system based on the method described in Embodiment 1 of this invention, and therefore will not be repeated here. All systems used in any method of this invention fall within the scope of protection of this invention.

Claims

1. A method for adaptive tuning of channel proportional-integral (PI) controller parameters based on contextual Bayesian optimization, characterized in that, Includes the following steps: Bayesian optimization aimed at minimizing the settling time is performed under multiple typical operating conditions to build an offline stability knowledge base that integrates operating condition information; Based on the offline stability knowledge base, a context-aware stability prediction Gaussian process model is trained to predict the settling time and its uncertainty under any combination of "operating conditions and parameters". For the target operating condition, a confidence assessment is performed based on the prediction uncertainty of the context-aware Gaussian process model: If the prediction uncertainty is below a preset threshold, it is determined to be a high-confidence path, and the model is directly used to predict the stabilization time under the target operating condition; otherwise, it is determined to be a low-confidence path, and local Bayesian optimization is initiated under the target operating condition to obtain a stabilization time estimate; based on the predicted or estimated stabilization time, a stability feasible region under the target operating condition is constructed, thereby establishing stability constraints under the operating condition. The establishment of stability constraints is decoupled from the comprehensive performance optimization: within the feasible region of stability, a comprehensive performance objective function is constructed with control accuracy and motion smoothness as the objectives, and Bayesian optimization is performed to search for the optimal PI parameters. The new data generated by online optimization is fed back to the knowledge base and the context-aware stability prediction Gaussian process model is updated.

2. The method according to claim 1, characterized in that: The construction of the offline stability knowledge base mentioned in step S1 specifically includes: S11: Select a set of typical operating conditions that cover the preset operating range; S12: For each typical operating condition, execute a local Bayesian optimization loop within its PI parameter space with the objective of minimizing the settling time. S13: In each optimization iteration, the settling time of the candidate parameters is evaluated through the simulation model, and a data tuple containing the PI parameters, operating context variables and the corresponding settling time is recorded; S14: Summarize the data tuples generated under all typical operating conditions to form an offline stability knowledge base.

3. The method according to claim 1, characterized in that: The context-aware Gaussian process model described in step S2 uses the Matern kernel function with automatic correlation determination. It takes the joint PI parameter and operating context variable as input and the steady-state time as output. By maximizing the log-marginal likelihood to estimate the hyperparameter, it is used to predict the mean and standard deviation of the steady-state time under any combination of inputs.

4. The method according to claim 1, characterized in that: The construction of the stability feasible region under the target operating condition described in step S3 specifically includes: S31: Compare the prediction standard deviation of the context-aware Gaussian process model with a preset threshold. If the prediction standard deviation is lower than the threshold, it is determined to be a high-confidence path and the model is used directly for prediction; otherwise, it is determined to be a low-confidence path and local Bayesian optimization is initiated under the target working condition to construct a local stability model. S32: Based on the selected path, obtain the theoretical minimum settling time estimate under the target working condition, and introduce the engineering safety margin coefficient to determine the stability threshold; S33: Perform a grid scan in the PI parameter space, and based on the predicted mean and standard deviation of the selected model, use the robustness criterion to select the set of parameter points that meet the stability threshold as the explicitly defined stable feasible region.

5. The method according to claim 1, characterized in that: The robustness criterion mentioned in step S33 is: in, For the Gaussian process model, the parameter θ under the target working condition The predicted mean of the next settling time. To predict the standard deviation, The confidence coefficient is... The stability threshold is the threshold value under the target operating condition.

6. The method according to claim 1, characterized in that, The dynamic construction of the comprehensive performance objective function described in step S4 specifically includes: S41: Within the feasible region of stability, Latin hypercube sampling is used to select multiple initial sample points. Simulation is performed on each initial sample point to calculate the normalized integral absolute error index used to measure the accuracy of water level control and the normalized total variation index of control quantity used to measure the smoothness of gate action. S42: Determine the normalized reference value based on the normalized integral absolute error value and the normalized total variation value of the control quantity calculated from all initial sample points. S43: Set weighting coefficients according to engineering preferences, divide the two indicators by their corresponding normalized benchmark values, and then perform a weighted summation to construct the comprehensive performance objective function.

7. The method according to claim 6, characterized in that: The normalized benchmark values ​​mentioned in step S42 are the median of the normalized integral absolute error of the initial sample points and the median of the total variation of the normalized control quantity; the comprehensive performance objective function mentioned in step S43 is: in, and These are the median of the normalized integral absolute error of the initial sample points and the median of the total variation of the normalized control quantity, respectively. and The weighting coefficients and .

8. The method according to claim 1, characterized in that: Step S4, which describes performing Bayesian optimization within the feasible region to search for the optimal PI parameters, specifically includes: training a Gaussian process surrogate model based on initial sample points and their corresponding comprehensive performance objective function values; within the stable feasible region, with the goal of minimizing the comprehensive performance objective function value, using an expected improvement acquisition function to guide the search, iteratively updating the surrogate model and recommending new candidate parameters, until the preset maximum number of iterations is reached or the process terminates after multiple consecutive iterations without improvement, and outputting the optimal PI parameters that minimize the comprehensive performance objective function value.

9. The method according to claim 1, characterized in that: The updating of the context-aware Gaussian process model in step S5 specifically includes: feeding back and expanding the offline stability knowledge base with the new data generated by starting local exploration under the low-confidence path in step S3, and the new data generated by evaluating candidate parameters during the online comprehensive performance optimization process in step S4; when the accumulated amount of new data reaches a preset number or a preset time period, the context-aware Gaussian process model is retrained using the updated offline stability knowledge base.

10. A system for implementing the channel PI parameter tuning method based on contextual Bayesian optimization as described in any one of claims 1-9, characterized in that, include: The offline learning module is used to perform Bayesian optimization with the goal of minimizing the settling time under multiple typical working conditions. It collects data to build and update an offline stability knowledge base that integrates working condition context information, and trains a context-aware Gaussian process model that integrates prior information from multiple working conditions based on the offline stability knowledge base. This model can transfer the stability knowledge of the learned working conditions to new working conditions. The online optimization module is used to evaluate the confidence level based on the prediction uncertainty of the context-aware Gaussian process model for the current target working condition to be optimized, and adaptively select the path. Based on the selected path, the stabilization time is obtained and a stable feasible region is constructed, thereby establishing the stability constraints under the working condition. Within the constructed stable feasible region, with water level control accuracy and gate action smoothness as optimization objectives, a comprehensive performance objective function is dynamically constructed and Bayesian optimization is performed to search for the optimal PI parameters. The data closed-loop module is used to feed back new data generated during the online optimization process to the offline stability knowledge base and trigger the offline learning module to update the context-aware Gaussian process model to achieve continuous learning.