Adaptive Predictive Control Method and Device for Petrochemical Plants

By employing an adaptive predictive control method and utilizing large language models and intelligent agents for collaborative optimization, the nonlinear and time-varying characteristics of traditional control methods in petrochemical processes are addressed, achieving high-precision and low-cost dynamic control and improving the control performance of petrochemical plants.

CN121386423BActive Publication Date: 2026-04-21SUPCON TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SUPCON TECH CO LTD
Filing Date
2025-12-22
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

Traditional control methods are difficult to adapt to the strong nonlinearity and time-varying characteristics of petrochemical processes, resulting in low control accuracy and high energy consumption. Furthermore, existing APC technology suffers from problems such as model mismatch, parameter rigidity, weak multi-objective coordination, and high implementation and maintenance costs.

Method used

An adaptive predictive control method is adopted, which obtains user instructions through a large language model (LLM), generates orchestration instructions, and combines automatic data preprocessing, automated modeling and an adaptive predictive control agent to build an adaptive predictive model, thereby realizing dynamic data processing and control parameter optimization.

Benefits of technology

It achieves high-precision, adaptive dynamic control of petrochemical plants, reduces implementation and operation and maintenance costs, and improves control accuracy and steady-state optimization capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121386423B_ABST
    Figure CN121386423B_ABST
Patent Text Reader

Abstract

This application discloses an adaptive predictive control method and apparatus for a petrochemical plant. The method includes: acquiring user instructions and determining training data matching the user instructions based on their semantic information, wherein the user instructions instruct the main control console to construct a controller for controlling the petrochemical plant; constructing a predictive model based on the training data, wherein the predictive model predicts the output state of the petrochemical plant at the next time step based on the output and input states of the petrochemical plant at the current time step; acquiring the predicted output state predicted by the predictive model and determining the input quantity of the controller at the next time step based on the predicted output state; and issuing control instructions to the petrochemical plant, wherein the control instructions include the input quantity. This application solves the technical problems of model mismatch and low control accuracy caused by the strong nonlinearity and time-varying characteristics of the petrochemical process in traditional control techniques.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of intelligent predictive control, and more specifically, to an adaptive predictive control method and apparatus for a petrochemical plant. Background Technology

[0002] The petrochemical industry involves complex physicochemical reactions, characterized by strong nonlinearity, large time-varying variables, and multivariate coupling. Traditional control methods (such as PID control, Proportional-Integral-Derivative control) rely on fixed parameters and empirical rules, making it difficult to adapt to dynamic operating conditions. This results in low control accuracy, high energy consumption, and even production fluctuations.

[0003] There is currently no effective solution to the above problems. Summary of the Invention

[0004] This application provides an adaptive predictive control method and apparatus for a petrochemical plant, which at least solves the technical problems of easy model mismatch and low control accuracy caused by the strong nonlinearity and time-varying characteristics of the petrochemical process.

[0005] According to one aspect of the embodiments of this application, an adaptive predictive control method for a petrochemical plant is provided, comprising: acquiring a user instruction and generating a scheduling instruction based on the semantic information of the user instruction, wherein the user instruction is used to instruct a main control console to construct a controller, the controller is used to control the petrochemical plant, and the scheduling instruction includes a data processing subtask, the data processing subtask being used to determine training data matching the user instruction; determining the training data matching the user instruction based on the data processing subtask, and constructing a prediction model based on the training data, wherein the prediction model is used to predict the predicted output state of the petrochemical plant at the next time step based on the output state and input state of the petrochemical plant at the current time step; acquiring the predicted output state predicted by the prediction model, determining the input quantity of the controller at the next time step based on the predicted output state and control parameters, wherein the control parameters are adaptively adjusted based on the predicted output state; and issuing a control instruction to the petrochemical plant, wherein the control instruction includes the input quantity.

[0006] Optionally, the data processing subtask includes a user intent corresponding to the user instruction determined based on semantic information, whereby the user intent includes at least one of the following: the controller's control object; the training data matching the user instruction determined by the data processing subtask includes: querying the system configuration based on the control object to determine the data source corresponding to the control object, wherein the data source includes at least one of the following: a target database; determining the data requirements corresponding to the control object based on the control object, wherein the data requirements include at least one of the following: variable type, data sampling interval, data time range; querying the target database for target data corresponding to the data requirements; preprocessing the target data, and using the preprocessed target data as training data.

[0007] Optionally, constructing a prediction model based on training data includes: iteratively training multiple candidate models in the model set based on training data, wherein the hyperparameter configurations used by the candidate models are different in each round of iterative training; determining the prediction model based on the comprehensive evaluation index score of the candidate models in each round of iterative training, wherein the comprehensive evaluation index score of the prediction model is greater than or equal to that of the candidate models.

[0008] Optionally, iterative training of the candidate model includes: determining the comprehensive evaluation score of the candidate model in each iteration, the comprehensive evaluation score being used to characterize the predictive performance of the candidate model; constructing a surrogate model based on the comprehensive evaluation score and hyperparameter configuration of the candidate model in each iteration, wherein the surrogate model is used to characterize the correlation between the hyperparameter configuration and the comprehensive evaluation score; generating a target hyperparameter configuration corresponding to the next iteration based on the surrogate model and the acquisition function; training the candidate model based on the target hyperparameter configuration, determining the comprehensive evaluation score corresponding to the target hyperparameter configuration, updating the surrogate model based on the comprehensive evaluation score corresponding to the target hyperparameter configuration, and generating a target hyperparameter configuration corresponding to the next iteration based on the surrogate model and the acquisition function, until the candidate model meets the training termination condition, wherein the training termination condition includes at least one of the following: the number of iterations of the candidate model is greater than or equal to a first preset threshold, and the ratio of the comprehensive evaluation score to the comprehensive evaluation score of the previous round is less than a second preset threshold.

[0009] Optionally, the training data includes data for multiple variables, the prediction model is determined from candidate models, and the candidate models are trained based on the training data; constructing a prediction model based on the training data includes: obtaining the loss values ​​of multiple variables output by the candidate models; assigning corresponding weights to the variables based on the loss values ​​of the variables, wherein the loss value of a variable is inversely proportional to the weight of the variable; determining the loss function value of the candidate model based on the weights and loss values; and training the candidate model based on the loss function value.

[0010] Optionally, determining the controller's input at the next moment based on the predicted output state includes: substituting the predicted output state into a first objective function, wherein the constraints of the first objective function include at least one of the following: device dynamic constraints, output state constraints, input state constraints, control increment constraints, control time-domain constraints, and interval control constraints; the first objective function also includes control parameters; solving the first objective function to obtain the controller's control sequence, wherein the control sequence includes multiple control inputs; and using the first control input in the control sequence as the input.

[0011] Optionally, determining the controller's input at the next moment based on the predicted output state further includes: substituting the predicted output state into a second objective function according to a preset period, wherein the second objective function is used to perform steady-state optimization on the controller; solving the second objective function to obtain the controller's optimal steady-state optimization point at the next moment; and using the control input corresponding to the optimal steady-state optimization point as the input.

[0012] Optionally, after the control command is issued to the petrochemical unit, the method further includes: determining a performance evaluation index value based on the predicted output state, input quantity, and target reference value within a preset time period, wherein the target reference value is a preset ideal output state; substituting the performance evaluation index value into a third objective function, the third objective function being used to adaptively adjust the control parameters of the controller, the control parameters including at least one of the following: prediction time domain and control time domain; solving the third objective function to obtain the solved target control parameters; and updating the controller's control parameters to the target control parameters.

[0013] Optionally, after updating the controller's control parameters to the target control parameters, the method further includes: determining the performance evaluation index value of the petrochemical unit; obtaining the historical performance evaluation index value of the petrochemical unit; determining the performance optimization degree based on the performance evaluation index value and the historical performance evaluation index value; and restoring the control parameters to the control parameters before the update if the performance optimization degree is less than a third preset threshold.

[0014] Optionally, after the control command is sent to the petrochemical unit, the method further includes: determining the degree of deviation between the actual output state and the predicted output state of the petrochemical unit; and, if the degree of deviation is greater than a preset threshold, fine-tuning the prediction model based on the actual output state.

[0015] According to another aspect of the embodiments of this application, an adaptive predictive control device for a petrochemical plant is also provided, comprising: a first processing module, configured to acquire user instructions and generate orchestration instructions based on the semantic information of the user instructions, wherein the user instructions are used to instruct a main control console to construct a controller, the controller is used to control the petrochemical plant, and the orchestration instructions include a data processing subtask, the data processing subtask being used to determine training data matching the user instructions; a second processing module, configured to determine the training data matching the user instructions based on the data processing subtask, and construct a prediction model based on the training data, wherein the prediction model is used to predict the predicted output state of the petrochemical plant at the next moment based on the output state and input state of the petrochemical plant at the current moment; a third processing module, configured to acquire the predicted output state predicted by the prediction model, and determine the input quantity of the controller at the next moment based on the predicted output state and control parameters, wherein the control parameters are adaptively adjusted based on the predicted output state; and a fourth processing module, configured to send control instructions to the petrochemical plant, wherein the control instructions include the input quantity.

[0016] According to another aspect of the embodiments of this application, a non-volatile storage medium is also provided, wherein a program is stored in the non-volatile storage medium, wherein, when the program is running, it controls the device where the non-volatile storage medium is located to execute an adaptive predictive control method for a petrochemical plant.

[0017] According to another aspect of the embodiments of this application, an electronic device is also provided, including: a memory and a processor, the processor being configured to run a program stored in the memory, wherein the program executes an adaptive predictive control method for a petrochemical device during runtime.

[0018] According to another aspect of the embodiments of this application, a computer program product is also provided, including a computer program that, when executed by a processor, implements an adaptive predictive control method for a petrochemical plant.

[0019] In this embodiment, a user instruction is acquired, and a programming instruction is generated based on the semantic information of the user instruction. The user instruction instructs the main control console to construct a controller, which controls the petrochemical unit. The programming instruction includes a data processing subtask, which determines training data matching the user instruction. The data processing subtask determines the training data matching the user instruction and constructs a prediction model based on the training data. The prediction model predicts the predicted output state of the petrochemical unit at the next moment based on the current output and input states of the petrochemical unit. The predicted output state is acquired, and the input quantity of the controller at the next moment is determined based on the predicted output state and control parameters. The parameters are adaptively adjusted based on the predicted output state; control commands are issued to the petrochemical unit, including input quantities. By constructing a multi-agent system composed of an automatic data preprocessing agent, an automated modeling agent, and an adaptive predictive control agent coordinated by a Large Language Model (LLM), and dynamically optimizing control parameters and predictive models based on real-time data, the system achieves the goals of automated data processing, self-optimization modeling, and real-time adjustment of control parameters. This enables high-precision, adaptive dynamic control and steady-state optimization of the petrochemical unit, thereby solving the technical problems of model mismatch and low control accuracy caused by the strong nonlinearity and time-varying characteristics of the petrochemical process in traditional control technologies. Attached Figure Description

[0020] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments of this application and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:

[0021] Figure 1 This is a schematic diagram of the structure of a computer terminal according to an embodiment of this application;

[0022] Figure 2 This is a schematic diagram of an adaptive predictive control system for a petrochemical plant according to an embodiment of this application;

[0023] Figure 3 This is a flowchart illustrating an adaptive predictive control method for a petrochemical plant according to an embodiment of this application.

[0024] Figure 4 This is a schematic diagram of an adaptive predictive control framework for a petrochemical plant according to an embodiment of this application;

[0025] Figure 5 This is a schematic diagram of an adaptive predictive control system for a petrochemical plant according to an embodiment of this application;

[0026] Figure 6This is a schematic diagram of a polypropylene apparatus control process according to an embodiment of this application;

[0027] Figure 7 This is a schematic diagram of a polypropylene device controlled by the control method of this application according to an embodiment of this application. Detailed Implementation

[0028] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.

[0029] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0030] In related technologies, traditional control methods (such as PID control) rely on fixed parameters and empirical rules, making it difficult to adapt to dynamic changes in operating conditions. This results in low control accuracy, high energy consumption, and even production fluctuations. To improve control efficiency, advanced process control (APC) technologies (such as model predictive control, MPC) have been introduced into the petrochemical industry.

[0031] While APC improves system stability and economy by predicting future states and optimizing control inputs through models, its limitations become increasingly apparent in complex scenarios as device scale increases and intelligence requirements evolve. Specifically, APC suffers from the following problems:

[0032] 1) Existing APC models are highly dependent on data and are based on linear models for identification. However, the petrochemical process mechanism is complex, the modeling cost is high, and it is prone to mismatch (such as model failure caused by changes in raw materials).

[0033] 2) Insufficient adaptability: Fixed models are difficult to handle dynamic scenarios such as load increases and decreases and nonlinear liquid level control, requiring frequent manual parameter adjustments;

[0034] 3) Fragmented applications: Current APC is mostly limited to single-unit, single-objective optimization (such as distillation column control), lacking full-process collaboration;

[0035] 4) Insufficient level of intelligence: Data processing relies on human experience (such as outlier removal rules), cannot automatically adapt to data streams with different characteristics, and passively responds to changes in control parameters, lacking predictive optimization;

[0036] 5) Poor system coordination: Multiple modules operate independently (such as data cleaning and modeling are separated), resulting in "data silos" and decision delays.

[0037] Therefore, existing adaptive predictive control applications in the petrochemical industry suffer from problems such as model mismatch, low prediction accuracy, parameter rigidity, weak multi-objective coordination, and high implementation and maintenance costs. To address these issues, this application provides relevant solutions, which are detailed below.

[0038] According to an embodiment of this application, an adaptive predictive control method for a petrochemical plant is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0039] The methods and embodiments provided in this application can be executed on mobile terminals, computer terminals, or similar computing devices. Figure 1 A hardware block diagram of a computer terminal for implementing an adaptive predictive control method for a petrochemical plant is shown. Figure 1 As shown, the computer terminal 10 may include one or more processors 102 (shown as 102a, 102b, ..., 102n in the figure) 102 (processor 102 may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.), a memory 104 for storing data, and a transmission device 106 for communication functions. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of a BUS bus), a network interface, a power supply, and / or a camera. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the aforementioned electronic device. For example, computer terminal 10 may also include... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.

[0040] It should be noted that the aforementioned one or more processors 102 and / or other data processing circuits are generally referred to herein as "data processing circuits". These data processing circuits may be embodied, in whole or in part, in software, hardware, firmware, or any other combination thereof. Furthermore, the data processing circuits may be a single, independent processing module, or may be integrated, in whole or in part, into any other element within the computer terminal 10. As involved in the embodiments of this application, the data processing circuits serve as processor control (e.g., selection of a variable resistor termination path connected to an interface).

[0041] The memory 104 can be used to store software programs and modules for application software, such as the program instructions / data storage device corresponding to the adaptive predictive control method for petrochemical plants in this embodiment. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, thereby realizing the aforementioned adaptive predictive control method for petrochemical plants. The memory 104 may include high-speed random access memory and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to the computer terminal 10 via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0042] The transmission device 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the communication provider of the computer terminal 10. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 may be a Radio Frequency (RF) module, used for wireless communication with the Internet.

[0043] The display can be, for example, a touchscreen liquid crystal display (LCD) that allows the user to interact with the user interface of the computer terminal 10.

[0044] Under the aforementioned operating environment, embodiments of this application provide an adaptive predictive control system for a petrochemical plant, such as... Figure 2As shown, the system includes a Large Language Model (LLM) main console 01, an automatic data preprocessing agent 02, an automated modeling agent 03, and an adaptive predictive control agent 04. The LLM main console 01 is used to acquire user instructions and generate orchestration instructions based on the semantic information of the user instructions. The user instructions instruct the main console 01 to construct a controller, which controls the petrochemical unit. The orchestration instructions include data processing subtasks, which determine training data that matches the user instructions. The automatic data preprocessing agent 02 determines training data that matches the user instructions based on the data processing subtasks. The system uses training data; the automated modeling agent 03 is used to construct a prediction model based on the training data, wherein the prediction model is used to predict the predicted output state of the petrochemical unit at the next moment based on the current output state and input state of the petrochemical unit; the adaptive predictive control agent 04 is used to obtain the predicted output state predicted by the prediction model, and determine the input quantity of the controller at the next moment based on the predicted output state and control parameters, wherein the control parameters are adaptively adjusted according to the predicted output state; the large language model main console 01 is also used to send control commands to the petrochemical unit, wherein the control commands include the input quantity. During the control process, the large language model LLM main console 01 first obtains multimodal command information input by the user for user intent recognition, automatic task decomposition, and intelligent orchestration, and then sends the orchestration commands to three agents: the data automatic preprocessing agent 02, the automated modeling agent 03, and the adaptive predictive control agent 04, for dynamic decision-making and collaborative optimization execution among the agents. Among them, the automatic data preprocessing agent 02 analyzes different characteristics of real-time data and automatically selects methods such as data imputation, filtering, outlier detection and removal, and feature engineering to construct high-quality data required by the modeling agent. Using the processed high-quality data, the automated modeling agent 03, based on a deep learning model library, automatically constructs the optimal model as the predictive model for the control agent through model structure and hyperparameter self-optimization. It can also fine-tune the model online to match model mismatch caused by changes in operating conditions. The adaptive predictive control agent 04, based on a deep learning predictive model, integrates dynamic control and steady-state optimization, and adaptively adjusts predictive control parameters online according to actual operating condition changes. The three agents form a closed-loop feedback adaptive predictive control through an LLM coordination center, thereby solving the instability problem of traditional predictive control caused by the strong nonlinearity and time-varying characteristics of petrochemical plants, improving control accuracy, and significantly reducing implementation and maintenance costs.

[0045] Under the aforementioned operating environment, embodiments of this application provide an adaptive predictive control method for a petrochemical plant, such as... Figure 3 As shown, the method includes the following steps:

[0046] Step S302: Obtain user instructions and generate orchestration instructions based on user instructions. The user instructions are used to instruct the main control console to build a controller, which is used to control the petrochemical unit. The orchestration instructions include data processing subtasks, which are used to determine training data that matches the user instructions.

[0047] In the technical solution provided in step S302, the data processing subtask includes a user intent corresponding to the user instruction determined based on semantic information. The user intent includes at least one of the following: the control object of the controller. The training data matching the user instruction determined by the data processing subtask includes: querying the system configuration based on the control object to determine the data source corresponding to the control object, wherein the data source includes at least one of the following: a target database; determining the data requirements corresponding to the control object based on the control object, wherein the data requirements include at least one of the following: variable type, data sampling interval, data time range; querying the target data corresponding to the data requirements in the target database; preprocessing the target data, and using the preprocessed target data as training data.

[0048] Optionally, determining the user intent corresponding to the user instruction based on semantic information includes: after receiving the user instruction (e.g., "Please collect a historical field data for modeling, and generate an adaptive prediction polypropylene unit controller deployment based on the model") from the user's main console of the Large Language Model (LLM), the Large Language Model will automatically parse, decompose, and dynamically orchestrate the user instruction to generate the orchestration instruction "Automatic Data Preprocessing (i.e., data processing subtask) -> Automated Modeling (i.e., modeling subtask) -> Adaptive Control (i.e., adaptive control subtask)", and issue it to the Automatic Data Preprocessing Agent, the Automated Modeling Agent, and the Adaptive Control Agent.

[0049] Automatic parsing refers to the process by which the LLM control console, acting as the brain, performs semantic understanding and intent recognition on natural language commands issued by the user. By determining semantic information and recognizing user intent, vague and macroscopic user needs can be transformed into a precise and actionable list of task objectives, and the control object to be controlled by the controller (such as a polypropylene unit) can be determined.

[0050] Task decomposition, in the context of the LLM console, involves breaking down the parsed structured task objective into a series of specific, executable atomic task sequences based on its built-in process control domain knowledge (or expertise acquired through Retrieval Augmentation (RAG)). These atomic tasks must be directly executable by downstream agents.

[0051] Dynamic orchestration means that the LLM console acts as the overall scheduler. Based on the list of atomic tasks decomposed from the task, it calls and manages the corresponding agents in real time to execute each task and handles various states (success, failure, exception) during task execution. Ultimately, it ensures the completion of the overall workflow. When a task fails or an exception occurs, the LLM console will re-execute the task and send reminder messages to the operations and maintenance personnel after multiple failures or exceptions to remind them to handle the exception.

[0052] Optionally, after receiving the orchestration instructions, the data preprocessing agent first queries the system configuration to determine which database, plant, unit, and tag (i.e., data source) the data comes from. Then, it defines the data specifications (data requirements): determining the data's time range, sampling interval, and required process variables (MV, CV, DV, etc.) (i.e., variable types). Next, it performs data extraction: calling the database query API to perform data extraction. By calling the data integration engine, it obtains the initial parameters required for the petrochemical unit model from the DCS / real-time database and online analysis database and stores them in the data warehouse. The initialization parameters include: product properties of petrochemical units obtained from the online analysis database, such as polyolefin density, melt index, and output; operating conditions of equipment such as prepolymerization reactors, single-loop reactors, double-loop reactors, and axial flow pumps obtained from the DCS / real-time database, such as the set of operating variables MVi, including single-loop hydrogen content, double-loop hydrogen content, single-loop ethylene flow rate, double-loop ethylene flow rate, single-loop feed propylene flow rate, double-loop feed propylene flow rate, and catalyst flow rate; the set of controlled variables CVj, including single-loop shaft power, double-loop shaft power, single-loop density, double-loop density, melt index, and polymer output; and the set of disturbance variables DV, including single-reactor pressure, double-reactor pressure, single-reactor jacket water temperature, double-reactor jacket water temperature, and DONOR flow rate.

[0053] Optionally, preprocessing the target data includes: an automatic data preprocessing agent performing automatic data consistency checks, automatic data feature analysis, automatic online data preprocessing, and automatic modeling data construction on historical data from a certain stage of initialization parameters in the data warehouse. The data consistency check refers to ensuring that the initial parameters of the data warehouse exist and are valid through parameter matching, preventing variable loss during data transmission.

[0054] Data feature analysis refers to the analysis of the characteristics of data in a data warehouse, including noise level, skewness, distribution, correlation, missing rate, anomaly rate, etc., and automatically selecting the appropriate data preprocessing method based on different data characteristics.

[0055] Online data preprocessing refers to the automatic selection of various preprocessing techniques after the raw data has undergone feature analysis. These techniques include dynamic missing value imputation, hybrid anomaly detection, adaptive filtering and denoising, data augmentation, and feature engineering. Dynamic missing value imputation techniques include forward / backward imputation, KNN, and MICE; hybrid anomaly detection includes Isolation Forest, DBSCAN, and zscore / iqr; adaptive filtering and denoising includes wavelet thresholding and Savitzky-Golay filtering; data augmentation includes time warp, slice stitching, and TimeGAN; and feature engineering includes mutual information, MIC, and L1 regularization.

[0056] The automatic construction of modeling data involves automatically splitting the preprocessed data into training, validation, and test sets, which serve as the data source for the automated modeling agent.

[0057] As an optional implementation, the system receives the user instruction "I need to implement melt index control of a polypropylene unit." Upon receiving this instruction, the system first uses the Large Language Model (LLM) as the intelligent hub to quickly perform deep semantic analysis of the user instruction, identify the user's intent—to implement melt index control of the polypropylene unit, and determine that the key control object is the polypropylene unit. This analysis process demonstrates the system's flexibility and advanced understanding capabilities, enabling it to extract clear task objectives from the engineer's simple description.

[0058] Next, based on the parsed user intent, LLM queries the system's internal configuration information to automatically identify the specific data sources associated with the melt index control of the polypropylene unit, including the plant's real-time data center (DCS) and online analysis database. This intelligent matching process, based on a pre-built knowledge graph and a glossary of control domain terms, accurately links user commands with actual data storage locations, demonstrating the system's high degree of automation and intelligent decision-making capabilities.

[0059] Subsequently, the LLM further refined the task, determining precise data requirements based on the controlled object: it learned that to optimize melt flow index control, key variables needed to be monitored, including reactor hydrogen content, catalyst flow rate, ethylene and propylene flow rates in the first and second loops, and reactor pressure and temperature. The LLM also automatically set the data acquisition timeframe to the past week and determined appropriate sampling intervals to ensure data timeliness and representativeness. This ability to automatically configure data requirements based on user intent greatly simplified the data preparation process and improved work efficiency.

[0060] LLM then generates custom query commands, which are sent to DCS and the online analysis database, automatically extracting all data matching the user commands. After data collection is complete, an automatic data preprocessing agent intervenes, performing a series of preprocessing steps on the collected raw data, including quality checks, outlier filtering, and missing value imputation, to ensure the integrity and accuracy of the data and provide high-quality training material for the modeling agent.

[0061] This series of automated operations, from understanding user commands to accurately locating and acquiring data, and then to data preprocessing, completely eliminates the tedious manual data screening and configuration processes in traditional control engineering, demonstrating the unique advantages and ingenuity of the solution presented in this invention. By automatically generating training data that matches user intentions, this application not only accelerates the development cycle of control strategies but also ensures the effectiveness and relevance of the control model, providing a solid foundation for subsequent model prediction and controller adaptation.

[0062] Step S304: Construct a prediction model based on the training data. The prediction model is used to predict the output state of the petrochemical unit at the next moment based on the output state and input state of the petrochemical unit at the current moment.

[0063] In the technical solution provided in step S304, constructing a prediction model based on training data includes: iteratively training multiple candidate models in the model set based on training data, wherein the hyperparameter configurations used by the candidate models are different in each round of iterative training; determining the prediction model based on the comprehensive evaluation index score of the candidate models in each round of iterative training, wherein the comprehensive evaluation index score of the prediction model is greater than or equal to that of the candidate models.

[0064] As an optional implementation, iterative training of the candidate model includes: determining the comprehensive evaluation score of the candidate model in each iteration, the comprehensive evaluation score being used to characterize the predictive performance of the candidate model; constructing a surrogate model based on the comprehensive evaluation score and hyperparameter configuration of the candidate model in each iteration, wherein the surrogate model is used to characterize the correlation between the hyperparameter configuration and the comprehensive evaluation score; generating a target hyperparameter configuration corresponding to the next iteration based on the surrogate model and the acquisition function; training the candidate model based on the target hyperparameter configuration, determining the comprehensive evaluation score corresponding to the target hyperparameter configuration, updating the surrogate model based on the comprehensive evaluation score corresponding to the target hyperparameter configuration, and generating a target hyperparameter configuration corresponding to the next iteration based on the surrogate model and the acquisition function, until the candidate model meets the training termination condition, wherein the training termination condition includes at least one of the following: the number of iterations of the candidate model is greater than or equal to a first preset threshold, and the ratio of the comprehensive evaluation score to the comprehensive evaluation score of the previous round is less than a second preset threshold.

[0065] As an optional implementation, the training data includes data on multiple variables, the prediction model is determined from candidate models, and the candidate models are trained based on the training data; constructing the prediction model based on the training data includes: obtaining the loss values ​​of multiple variables output by the candidate models; assigning corresponding weights to the variables based on the loss values ​​of the variables, wherein the loss value of a variable is inversely proportional to the weight of the variable; determining the loss function value of the candidate model based on the weights and loss values; and training the candidate model based on the loss function value.

[0066] Optionally, the valid dataset after data consistency detection and online preprocessing is input into the automated modeling agent to automatically build a deep learning prediction model. Through automatic optimization of multiple model hyperparameters, the optimal model is quickly pre-trained from many candidate models in the deep learning model library as the prediction model of the adaptive prediction control agent, and the model can be automatically fine-tuned in the online environment to achieve continuous learning and optimization to adapt to constantly changing data and avoid model mismatch.

[0067] A deep learning model library refers to a predefined collection of models (i.e., a collection of candidate models) that contains a variety of advanced deep learning models. New model architectures can be easily supported through registration. When modeling, the system does not rely on just one model, but simultaneously initializes or calls multiple models with different structures and principles (i.e., candidate models), providing a rich selection space for subsequent automatic optimization.

[0068] Optionally, the deep learning prediction model is automatically built, including:

[0069] (1) Determine the model input variables (including MV and DV, such as the hydrogen content of the first ring, the hydrogen content of the second ring, the ethylene flow rate of the first ring, the ethylene flow rate of the second ring, the propylene flow rate of the first ring feed, the propylene flow rate of the second ring feed, the catalyst flow rate, the pressure of the first reactor, the pressure of the second reactor, the jacket water temperature of the first reactor, the jacket water temperature of the second reactor, and the DONOR flow rate) and output variables (such as the shaft power of the first ring, the shaft power of the second ring, the density of the first ring, the density of the second ring, the melt index, and the polymer yield).

[0070] (2) Establish the input-output model relationship of the petrochemical unit:

[0071]

[0072] Where k represents the variable value at time k, CV(k) is the output variable at time k, MV(k) is the operation variable at time k, DV(k) is the perturbation variable at time k, CV(k-1) is the output variable at time k-1, and fnn is the model. The above formula means that by inputting the output variable at time k-1, the perturbation variable at time k, and the operation variable at time k into the model fnn, the output variable at time k can be predicted.

[0073] Based on the deep learning model library, the model uses automatically preprocessed sample data (processed by the agent) for pre-training, in which an adaptive weighted loss function for multi-task learning is introduced as the training objective function for the multivariate model.

[0074]

[0075] in:

[0076] It is the Huber loss of the i-th output variable.

[0077] It is a learnable parameter vector with the same length as the output variable.

[0078] The learned weights are normalized into a probability distribution, representing the “attention” that the model should assign to the loss of each task;

[0079] This is the value of the loss function.

[0080] By optimizing both model parameters and task weights simultaneously through backpropagation, the model may automatically assign a smaller weight to variables that are difficult to predict (with a large Loss_i) to prevent them from dominating the entire training process and disrupting the fit of other variables. For variables that are easy to predict or more important, the model may assign a larger weight. This is an implicit multi-task balancing strategy that is more effective than fixed weights or manual tuning.

[0081] (3) Select a model from the deep learning model library and configure a set of hyperparameters for it (such as Batch size, learning-rate-with-decay, Attention-heads, e_layers). Then train the model and use multi-dimensional comprehensive evaluation metrics (MSE - mean squared error, NMSE - normalized mean squared error, RMSE - root mean square error, MAPE - mean absolute percentage error, R² - coefficient of determination). Calculate a set of regression task evaluation metrics on the validation set or test set to comprehensively measure the model performance. Based on the current model evaluation results, use automatic hyperparameter optimization algorithms (such as Bayesian optimization, random search, TPE, etc.) to intelligently suggest the model architecture and hyperparameter combination to be tried in the next round. Through multiple iterations, continuously generate and evaluate new "model-hyperparameter" candidates. Finally, terminate the search based on preset stopping conditions (such as reaching the maximum number of iterations, performance improvement less than the threshold, or exhaustion of computing resources) and output the model with the highest comprehensive evaluation in the historical evaluation and its hyperparameter configuration as the "best model" (i.e., the final prediction model).

[0082] The automatic hyperparameter optimization involves modeling the black-box functional relationship between multi-model hyperparameter combinations and model performance (such as validation set MSE) using a Bayesian optimization framework (here, Gaussian Process (GP) or Tree Parzen Estimator (TPE) is used as a surrogate model). This model represents the correlation between hyperparameter configuration and overall evaluation score through the surrogate model. Based on a collection function (here, the Expected Improvement (EI) function is chosen, a commonly used collection function that quantifies the expected improvement a new point can bring compared to the current best observation, thus prioritizing hyperparameter combinations that have the potential to surpass the current best (utilization) but also have significant uncertainty (exploration) for the next evaluation), the system intelligently balances exploring unknown regions with utilizing currently known excellent regions. This automatically and efficiently finds the best-performing hyperparameter configuration for a given model (such as LSTM, Transformer, etc.), without requiring manual intervention.

[0083] The automatic model fine-tuning refers to the continuous monitoring of the model's predictive performance (such as accuracy and drift) after pre-training and deployment. Once the model's performance drops below a threshold, retraining or an alarm will be triggered. When new real-time data flows in, the system will not train from scratch, but will fine-tune the existing "best model" by updating the model weights with the new data, allowing it to quickly adapt to new operating conditions.

[0084] Step S306: Obtain the predicted output state of the prediction model, and determine the input quantity of the controller at the next moment based on the predicted output state.

[0085] Optionally, the adaptive predictive control agent utilizes the deep learning optimal prediction model built by the automated modeling agent to automatically establish dynamic rolling optimization control and steady-state optimization models, predicting the future output variable state trajectory at each sampling point, thereby enabling multivariate nonlinear control and efficiency optimization of petrochemical plants (such as polyolefins).

[0086] In the technical solution provided in step S306, determining the controller's input at the next moment based on the predicted output state includes: substituting the predicted output state into a first objective function, wherein the constraints of the first objective function include at least one of the following: device dynamic constraints, output state constraints, input state constraints, control increment constraints, control time-domain constraints, and interval control constraints; the first objective function also includes control parameters; solving the first objective function to obtain the controller's control sequence, wherein the control sequence includes multiple control inputs; and using the first control input in the control sequence as the input.

[0087] Optionally, the best deep learning model trained by the automated modeling agent can be used. (i.e., a predictive model) is used to describe the dynamic characteristics of the petrochemical unit (i.e., to obtain the predicted output state of the predictive model), as follows:

[0088]

[0089] in: Indicates the system output status. This represents the input to the controller at time k.

[0090] It is a pre-trained, optimal deep neural network model used to predict the output state at the next time step (i.e., ).

[0091] Optionally, at each time k Solve a finite-time nonlinear optimization problem, given the objective function (first objective function) as follows, whose optimization objective is to minimize the value of the first objective function:

[0092]

[0093] Where: the first term is tracking error, the second term is control penalty, the third term is terminal cost, and the fourth term is relaxation penalty. , , For adaptive weight parameters, The relaxation coefficient is... For reference trajectory, As slack variables, , To predict the time domain, , The dimension of the input and output variables.

[0094] The constraints are as follows:

[0095] Device dynamic constraints:

[0096] Input / output state constraints:

[0097] Control Incremental Constraints: , =

[0098] Control time domain constraints

[0099] Interval control constraints: , Allowable deviation range

[0100] The above problem is solved using nonlinear optimization methods (such as SQP sequential quadratic programming) to obtain the control sequence of the controller. and output state sequence ,in As the device control input for the next moment

[0101] As an optional implementation, determining the controller's input at the next moment based on the predicted output state further includes: substituting the predicted output state into a second objective function according to a preset period, wherein the second objective function is used to perform steady-state optimization on the controller; solving the second objective function to obtain the controller's optimal steady-state optimization point at the next moment; and using the control input corresponding to the optimal steady-state optimization point as the input.

[0102] Optionally, steady-state optimization involves establishing a steady-state optimization model and periodically (e.g., the steady-state optimizer automatically performs optimization calculations every 15 minutes, 30 minutes, or 1 hour) triggering the calculation of the economically optimal (minimum energy or material consumption) steady-state point. This serves as the optimal setpoint for the dynamic optimization controller at the next time step. The objective function (i.e., the second objective function) of the steady-state optimization model is as follows:

[0103] min

[0104] Constraints:

[0105] Steady-state equilibrium based on the optimal depth model:

[0106] Input / State Constraints:

[0107] Economic constraints: This indicates the cost of energy or material consumption.

[0108] in, This represents the economic weight of the tracking error relative to the input. This is the loss weight.

[0109] Finally, the SLSQP solver is called to find the optimal steady-state optimization point. The setpoint for the next moment in dynamic control is the control input corresponding to the optimal steady-state optimization point. As input.

[0110] Step S308: A control command is sent to the petrochemical unit, wherein the control command includes an input quantity.

[0111] In the technical solution provided in step S308, after the control command is issued to the petrochemical unit, the method further includes: determining the performance evaluation index value based on the predicted output state, input quantity, and target reference value within a preset time period, wherein the target reference value is a preset ideal output state; substituting the performance evaluation index value into a third objective function, the third objective function being used to adaptively adjust the control parameters of the controller, the control parameters including at least one of the following: prediction time domain and control time domain; solving the third objective function to obtain the solved target control parameters; and updating the controller's control parameters to the target control parameters.

[0112] Optionally, when the device undergoes dynamic changes or environmental disturbances, the adaptive predictive control agent automatically activates the parameter adaptive optimization module to optimize and adjust parameters such as the prediction time domain and control time domain online, thereby enabling the controller to automatically follow the changes in operating conditions.

[0113] Optionally, by analyzing historical data (including predicted output status and input quantities within the preset time period) within the sliding window, control parameters (such as weight matrix) can be dynamically adjusted. , , (e.g., prediction in the time domain Np, control in the time domain Nc) to cope with dynamic changes in the system or environmental disturbances. The following are the specific implementation steps:

[0114] 1. Collect and manage historical sliding window data, including state sequences (i.e., predicted states within each control cycle). ), control input sequence (i.e., the control quantity in actual application) ), reference trajectory sequence (i.e. target reference value) ).

[0115] The sliding window mechanism involves sliding to store a fixed length of historical data, that is, retaining the most recent W-step data (e.g., W=10) and overwriting the old data with new data, ensuring that the data reflects the current dynamics of the device and avoiding outdated information from interfering with optimization.

[0116] 2. Based on sliding window data, define quantitative control performance indicators as the basis for parameter optimization. These indicators include:

[0117] Tracking error: measures the deviation between the actual state and the reference trajectory, and is obtained by weighting the values ​​in the prediction time domain.

[0118]

[0119] Control energy consumption: reflects the cost of control input, resulting in:

[0120]

[0121] Terminal error: Evaluating the steady-state accuracy of the predicted time-domain terminal state, we obtain:

[0122]

[0123] 3. Design the parameter optimization objective function (i.e., the third objective function): integrate the performance indicators into a multi-objective optimization problem and balance the priorities through weight coefficients.

[0124] min

[0125] Wherein, the parameter θ contains the parameters to be optimized. The weighting coefficient λ is the penalty weight for controlling energy consumption (increasing it results in greater energy savings), and μ is the penalty weight for terminal error (increasing it results in greater focus on steady state). The penalty weight for time-domain parameters (to suppress the computational overhead caused by excessively long time domains).

[0126] 4. Define constraints: Limit the range of parameter adjustments to ensure system stability and rationality.

[0127] Parameter boundary constraints:

[0128]

[0129] Logical constraint: The control time domain shall not exceed 60% of the prediction time domain, i.e. .

[0130] Weight balance constraint: (Avoid optimization dominated by a single state).

[0131] 5. Optimization Algorithm Selection and Solution. Select a suitable optimization algorithm (such as SLSQP) and solve for the optimal parameter values ​​based on the sliding window data.

[0132] 6. Parameter update and verification. Follow the update rules.

[0133]

[0134] right Update the parameters to obtain the target control parameters.

[0135] As an optional implementation, after updating the controller's control parameters to the target control parameters, the method further includes: determining the performance evaluation index value of the petrochemical unit; obtaining the historical performance evaluation index value of the petrochemical unit; determining the performance optimization degree based on the performance evaluation index value and the historical performance evaluation index value; and restoring the control parameters to the control parameters before the update if the performance optimization degree is less than a third preset threshold.

[0136] Optionally, after the new parameters are applied, the real-time performance (i.e., performance evaluation index values, including error and energy consumption) for the next few steps is monitored to confirm the stability of the updated control performance. If the update fails or the effect deteriorates (the degree of performance optimization is less than the third preset threshold), the system is restored to the previous effective parameters (the control parameters before the update) to avoid system instability.

[0137] In the technical solution provided in step S308, after the control command is sent to the petrochemical unit, the method further includes: determining the degree of deviation between the actual output state and the predicted output state of the petrochemical unit; and, if the degree of deviation is greater than a preset threshold, fine-tuning the prediction model based on the actual output state.

[0138] Optionally, Figure 4 An adaptive predictive control framework for a petrochemical plant is shown, such as Figure 4 As shown, the LLM master console is deployed in the host computer and interacts with the DCS distributed control system and real-time database. The adaptive predictive control agent automatically completes the controller configuration based on the acquired data and downloads the controller model to the host computer. The control input for each step of the controller is distributed to the petrochemical unit through the DCS. Once all agents have successfully executed, the LLM master console summarizes the final result ("Adaptive predictive controller successfully deployed to unit XX") and reports it to the user in natural language. The entire process achieves a fully automated closed loop from intelligent decision-making to on-site execution, requiring no manual intervention and significantly improving the real-time performance and accuracy of control. Simultaneously, the system has an automatic verification and rollback mechanism to ensure the safety and reliability of each deployment. From this point on, the unit can achieve more optimized autonomous operation, providing strong support for cost reduction, efficiency improvement, and safe production.

[0139] Through the above steps, the method embodiments of this application achieve intelligent coordination and automatic task orchestration based on Large Language Model (LLM), without relying on complex preset rules and manual intervention, greatly reducing the complexity of system implementation and operation and maintenance. The method embodiments of this application adopt a multi-agent collaborative architecture, realizing end-to-end adaptive optimization from data preprocessing and modeling to control, effectively addressing model mismatch problems caused by changes in operating conditions, and having wider applicability. The method embodiments of this application combine deep learning prediction models with adaptive control, ensuring control accuracy while adapting to dynamic process changes through online fine-tuning mechanisms, avoiding the control performance degradation caused by fixed models in traditional methods. The LLM coordination center ensures the collaborative consistency among agents, supports online gain updates, and avoids optimization and control coordination problems caused by model inconsistency in traditional multi-agent systems. Specifically, the method embodiments of this application have the following advantages:

[0140] 1) A multi-agent cooperative control system architecture and method based on Large Language Model (LLM), including the collaborative working mechanism of LLM intelligent coordination center, automatic data preprocessing agent, automatic modeling agent and adaptive predictive control agent, can automatically realize the complete control process from predictive modeling to control quantity determination and automatic updating and optimization of control parameters. By continuously adjusting and optimizing the predictive model to adapt to the strongly nonlinear petrochemical characteristics, it can accurately predict the output state of the petrochemical process and improve control accuracy.

[0141] 2) Multimodal command recognition and automatic task decomposition technology for petrochemical processes enables intelligent parsing and task orchestration of user language or image commands, reducing the burden on users deploying controllers: Users can directly interact with the system using everyday language or an intuitive graphical interface, lowering the technical threshold and training requirements. Whether it's text commands or image annotations, the system can accurately understand and convert them into executable control tasks, allowing users to focus on business objectives rather than technical details. By combining deep learning and natural language processing technologies, the system can understand complex control commands at the semantic level and automatically parse key information such as the controlled object, required data type, and time range, thereby reducing misconfigurations caused by misunderstandings or incomplete information.

[0142] 3) A full-process adaptive predictive control method, including data feature analysis and quality optimization techniques, deep learning model self-optimization and online fine-tuning techniques, and a fusion of dynamic control and steady-state optimization techniques. From data preprocessing to model building and then to control strategy generation, the entire process forms a closed-loop feedback system that can automatically respond to changes in operating conditions without frequent manual intervention. This closed-loop mechanism ensures the continuity and effectiveness of the control system, significantly reducing the workload and cost of implementation and maintenance.

[0143] Optionally, Figure 5 A schematic diagram of a polypropylene unit control process is shown. Figure 6 A schematic diagram of a polypropylene apparatus controlled by the control method of this application is shown, as follows: Figure 5As shown, the polypropylene unit comprises four reactors and one adaptive controller. Model input variables include manipulated variables (MV and disturbance variables (DV), such as primary ring hydrogen content, secondary ring hydrogen content, primary ring ethylene flow rate, secondary ring ethylene flow rate, primary ring feed propylene flow rate, secondary ring feed propylene flow rate, catalyst flow rate, primary and secondary reactor pressures, primary and secondary reactor jacket water temperatures, and DONOR flow rate) and output variables (controlled variables (CV), including primary ring shaft power, secondary ring shaft power, primary ring density, secondary ring density, melt index, and polymer yield). Modeling data is collected from three months of historical data, with 200,000 samples for each variable. The training set:validation set:test set ratio is 8:1:1. Objective functions include dynamic optimization, steady-state optimization, and adaptive parameter optimization. Constraints include upper and lower limits for MV and CV. The user outputs a command to the LLM console: "You are a control operator. Please design and deploy a controller for a polypropylene unit to achieve grade switching control." This is automatically orchestrated and called by the data preprocessing agent, the automated modeling agent, and the adaptive predictive control agent. With an average control cycle of 15 seconds, adaptive predictive control of the polypropylene unit has reduced energy consumption by 2% and reduced waste during grade switching by 10%, resulting in significant economic benefits.

[0144] This application provides an adaptive predictive control device for a petrochemical plant. Figure 7 This is a schematic diagram of the device, as shown below. Figure 7 As shown, the device includes: a first processing module 70, used to acquire user instructions and generate orchestration instructions based on the semantic information of the user instructions, wherein the user instructions are used to instruct the main control console to construct a controller, the controller is used to control the petrochemical unit, and the orchestration instructions include data processing subtasks, the data processing subtasks are used to determine training data matching the user instructions; a second processing module 72, used to determine training data matching the user instructions based on the data processing subtasks, and construct a prediction model based on the training data, wherein the prediction model is used to predict the predicted output state of the petrochemical unit at the next moment based on the output state and input state of the petrochemical unit at the current moment; a third processing module 74, used to acquire the predicted output state predicted by the prediction model, and determine the input quantity of the controller at the next moment based on the predicted output state and control parameters, wherein the control parameters are adaptively adjusted based on the predicted output state; and a fourth processing module 76, used to send control instructions to the petrochemical unit, wherein the control instructions include input quantities.

[0145] In some embodiments of this application, the data processing subtask includes a user intent corresponding to a user instruction determined based on semantic information. The user intent includes at least one of the following: the control object of the controller. The first processing module 70 determines the training data matching the user instruction based on the data processing subtask by: querying the system configuration based on the control object to determine the data source corresponding to the control object, wherein the data source includes at least one of the following: a target database; determining the data requirements corresponding to the control object based on the control object, wherein the data requirements include at least one of the following: variable type, data sampling interval, data time range; querying the target data corresponding to the data requirements in the target database; preprocessing the target data, and using the preprocessed target data as training data.

[0146] In some embodiments of this application, the second processing module 72 constructs a prediction model based on training data by: iteratively training multiple candidate models in the model set based on training data, wherein the hyperparameter configurations used by the candidate models are different in each round of iterative training; and determining the prediction model based on the comprehensive evaluation index score of the candidate models in each round of iterative training, wherein the comprehensive evaluation index score of the prediction model is greater than or equal to that of the candidate models.

[0147] In some embodiments of this application, the second processing module 72 performs iterative training on the candidate model, including: determining the comprehensive evaluation score of the candidate model in each iteration, the comprehensive evaluation score being used to characterize the predictive performance of the candidate model; constructing a surrogate model based on the comprehensive evaluation score and hyperparameter configuration of the candidate model in each iteration, wherein the surrogate model is used to characterize the correlation between the hyperparameter configuration and the comprehensive evaluation score; generating a target hyperparameter configuration corresponding to the next iteration based on the surrogate model and the acquisition function; training the candidate model based on the target hyperparameter configuration, determining the comprehensive evaluation score corresponding to the target hyperparameter configuration, updating the surrogate model based on the comprehensive evaluation score corresponding to the target hyperparameter configuration, and generating a target hyperparameter configuration corresponding to the next iteration based on the surrogate model and the acquisition function, until the candidate model meets the training termination condition, wherein the training termination condition includes at least one of the following: the number of iterations of the candidate model is greater than or equal to a first preset threshold, and the ratio of the comprehensive evaluation score to the comprehensive evaluation score of the previous round is less than a second preset threshold.

[0148] In some embodiments of this application, the training data includes data of multiple variables, the prediction model is determined from candidate models, and the candidate models are trained based on the training data; the second processing module 72 constructs the prediction model based on the training data by: obtaining the loss values ​​of multiple variables output by the candidate models; assigning corresponding weights to the variables based on the loss values ​​of the variables, wherein the loss value of the variables is inversely proportional to the weights of the variables; determining the loss function value of the candidate models based on the weights and loss values; and training the candidate models based on the loss function values.

[0149] In some embodiments of this application, the third processing module 74 determines the controller's input at the next moment based on the predicted output state by: substituting the predicted output state into a first objective function, wherein the constraints of the first objective function include at least one of the following: device dynamic constraints, output state constraints, input state constraints, control increment constraints, control time-domain constraints, and interval control constraints, and the first objective function also includes control parameters; solving the first objective function to obtain the controller's control sequence, wherein the control sequence includes multiple control inputs; and using the first control input in the control sequence as the input.

[0150] In some embodiments of this application, the third processing module 74 further includes determining the controller's input at the next moment based on the predicted output state by: substituting the predicted output state into a second objective function according to a preset period, wherein the second objective function is used to perform steady-state optimization on the controller; solving the second objective function to obtain the controller's optimal steady-state optimization point at the next moment; and using the control input corresponding to the optimal steady-state optimization point as the input.

[0151] In some embodiments of this application, after the control command is issued to the petrochemical unit, the fourth processing module 76 is further configured to: determine a performance evaluation index value based on the predicted output state, input quantity, and target reference value within a preset time period, wherein the target reference value is a preset ideal output state; substitute the performance evaluation index value into a third objective function, the third objective function being used to adaptively adjust the control parameters of the controller, the control parameters including at least one of the following: prediction time domain and control time domain; solve the third objective function to obtain the solved target control parameters; and update the controller's control parameters to the target control parameters.

[0152] In some embodiments of this application, after updating the controller's control parameters to the target control parameters, the fourth processing module 76 is further configured to: determine the performance evaluation index value of the petrochemical unit; obtain the historical performance evaluation index value of the petrochemical unit; determine the degree of performance optimization based on the performance evaluation index value and the historical performance evaluation index value; and restore the control parameters to the control parameters before the update if the degree of performance optimization is less than a third preset threshold.

[0153] In some embodiments of this application, after the control command is sent to the petrochemical unit, the fourth processing module 76 is further configured to: determine the degree of deviation between the actual output state and the predicted output state of the petrochemical unit; and, if the degree of deviation is greater than a preset threshold, fine-tune the prediction model based on the actual output state.

[0154] It should be noted that each module in the above data storage device can be a program module (e.g., a set of program instructions to implement a specific function) or a hardware module. For the latter, it can take the following forms, but is not limited to them: each of the above modules is represented by a processor, or the functions of each of the above modules are implemented by a processor.

[0155] This application provides a non-volatile storage medium storing a program. During program execution, the device containing the non-volatile storage medium performs the following adaptive predictive control method for a petrochemical plant: acquiring user instructions and determining training data matching the user instructions based on their semantic information, wherein the user instructions instruct the main control console to construct a controller, which controls the petrochemical plant; constructing a predictive model based on the training data, wherein the predictive model predicts the predicted output state of the petrochemical plant at the next time step based on the current output and input states of the petrochemical plant; acquiring the predicted output state predicted by the predictive model and determining the input quantity of the controller at the next time step based on the predicted output state; and issuing control instructions to the petrochemical plant, wherein the control instructions include the input quantity.

[0156] This application provides an electronic device, including a memory and a processor. The processor is used to run a program stored in the memory. During program execution, the following adaptive predictive control method for a petrochemical device is implemented: acquiring user instructions and determining training data matching the user instructions based on semantic information of the user instructions, wherein the user instructions instruct a main control console to construct a controller, and the controller controls the petrochemical device; constructing a predictive model based on the training data, wherein the predictive model predicts the predicted output state of the petrochemical device at the next time step based on the output and input states of the petrochemical device at the current time step; acquiring the predicted output state predicted by the predictive model and determining the input quantity of the controller at the next time step based on the predicted output state; and issuing control instructions to the petrochemical device, wherein the control instructions include the input quantity.

[0157] This application provides a computer program product, including a computer program that, when executed by a processor, implements the following adaptive predictive control method for a petrochemical plant: acquiring user instructions and determining training data matching the user instructions based on the semantic information of the user instructions, wherein the user instructions are used to instruct the main control console to construct a controller, and the controller is used to control the petrochemical plant; constructing a predictive model based on the training data, wherein the predictive model is used to predict the predicted output state of the petrochemical plant at the next time based on the output state and input state of the petrochemical plant at the current time; acquiring the predicted output state predicted by the predictive model and determining the input quantity of the controller at the next time based on the predicted output state; and issuing control instructions to the petrochemical plant, wherein the control instructions include the input quantity.

[0158] In the above embodiments of this application, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0159] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units can be a logical functional division, and in actual implementation, there may be other division methods. For instance, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling, direct coupling, or communication connection may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.

[0160] 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 units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0161] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0162] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to related technologies, or all or 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 this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.

[0163] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.

Claims

1. An adaptive predictive control method for a petrochemical plant, characterized in that, include: Obtain user instructions and generate orchestration instructions based on the semantic information of the user instructions, wherein the user instructions are used to instruct the main control console to build a controller, the controller is used to control the petrochemical unit, and the orchestration instructions include data processing subtasks, the data processing subtasks are used to determine training data that matches the user instructions; Training data matching the user instruction is determined based on the data processing subtask, and a prediction model is constructed based on the training data. The prediction model is used to predict the predicted output state of the petrochemical unit at the next moment based on the output state and input state of the petrochemical unit at the current moment. The predicted output state predicted by the prediction model is obtained, and the input quantity of the controller at the next time step is determined based on the predicted output state and control parameters. The predicted output state is substituted into a first objective function, the constraints of which include at least one of the following: device dynamic constraints, output state constraints, input state constraints, control increment constraints, control time-domain constraints, and interval control constraints. The first objective function also includes the control parameters. At each time step k, the first objective function is: ; , , For adaptive weight parameters, The relaxation coefficient is... For reference trajectory, As slack variables, , To predict the time domain, , The dimensions of the input and output variables are defined; the first objective function is solved to obtain the control sequence of the controller, wherein the objective of the solution is to minimize the first objective function, and the control sequence includes multiple control inputs; the first control input in the control sequence is taken as the input, and the control parameters are adaptively adjusted according to the predicted output state; Control commands are issued to the petrochemical unit, wherein the control commands include the input quantity.

2. The adaptive predictive control method for petrochemical plants according to claim 1, characterized in that, The data processing subtask includes a user intent corresponding to the user instruction, determined based on the semantic information, and the user intent includes at least one of the following: the control object of the controller; The training data determined based on the data processing subtask and matched with the user instruction includes: Based on the system configuration for querying the controlled object, the data source corresponding to the controlled object is determined, wherein the data source includes at least one of the following: a target database; Based on the controlled object, the data requirements corresponding to the controlled object are determined, wherein the data requirements include at least one of the following: variable type, data sampling interval, and data time range; Query the target database for the target data corresponding to the data requirement; The target data is preprocessed, and the preprocessed target data is used as training data.

3. The adaptive predictive control method for petrochemical plants according to claim 1, characterized in that, Constructing a prediction model based on the training data includes: The training data is used to iteratively train multiple candidate models in the model set, wherein the hyperparameter configuration of the candidate models is different in each round of iterative training; The prediction model is determined based on the comprehensive evaluation index score of the candidate model in each iteration, wherein the comprehensive evaluation index score of the prediction model is greater than or equal to that of the candidate model.

4. The adaptive predictive control method for petrochemical plants according to claim 3, characterized in that, Iterative training of the candidate model includes: Determine the comprehensive evaluation score of the candidate model in the iteration, the comprehensive evaluation score being used to characterize the predictive performance of the candidate model; Based on the comprehensive evaluation score and hyperparameter configuration of the candidate model in each iteration, a surrogate model is constructed, wherein the surrogate model is used to characterize the correlation between the hyperparameter configuration and the comprehensive evaluation score; Based on the surrogate model and acquisition function, generate the target hyperparameter configuration corresponding to the next round of training iterations; The candidate model is trained according to the target hyperparameter configuration, a comprehensive evaluation score corresponding to the target hyperparameter configuration is determined, and the surrogate model is updated according to the comprehensive evaluation score corresponding to the target hyperparameter configuration. Based on the surrogate model and the acquisition function, a target hyperparameter configuration corresponding to the next round of iteration training is generated until the candidate model meets the training termination condition, wherein the training termination condition includes at least one of the following: the number of iterations of the candidate model is greater than or equal to a first preset threshold, and the ratio of the comprehensive evaluation score to the comprehensive evaluation score of the previous round is less than a second preset threshold.

5. The adaptive predictive control method for petrochemical plants according to claim 1, characterized in that, The training data includes data on multiple variables; the prediction model is determined from candidate models, and the candidate models are trained based on the training data; constructing the prediction model based on the training data includes: Obtain the loss values ​​of multiple variables output by the candidate model; Based on the loss value of the variable, a corresponding weight is assigned to the variable, wherein the loss value of the variable is inversely proportional to the weight of the variable; Based on the weights and the loss values, the loss function value of the candidate model is determined; Candidate models are trained based on the loss function values.

6. The adaptive predictive control method for petrochemical plants according to claim 1, characterized in that, Determining the controller's input at the next moment based on the predicted output state further includes: The predicted output state is substituted into a second objective function according to a preset period, wherein the second objective function is used to perform steady-state optimization on the controller; Solving the second objective function yields the optimal steady-state point of the controller at the next moment. The control input corresponding to the optimal steady-state optimization point is used as the input.

7. The adaptive predictive control method for petrochemical plants according to claim 1, characterized in that, After issuing control commands to the petrochemical unit, the method further includes: Based on the predicted output state within a preset time period, the input quantity and the target reference value are used to determine the performance evaluation index value, wherein the target reference value is a preset ideal output state; The performance evaluation index value is substituted into the third objective function, which is used to adaptively adjust the control parameters of the controller. The control parameters include at least one of the following: prediction time domain and control time domain. The third objective function is solved to obtain the target control parameters. Update the controller's control parameters to the target control parameters.

8. The adaptive predictive control method for petrochemical plants according to claim 7, characterized in that, After updating the controller's control parameters to the target control parameters, the method further includes: Determine the performance evaluation index values ​​for the petrochemical unit; Obtain the historical performance evaluation index values ​​of the petrochemical unit; The degree of performance optimization is determined based on the performance evaluation index values ​​and the historical performance evaluation index values. If the performance optimization level is less than a third preset threshold, the control parameters will be restored to the control parameters before the update.

9. The adaptive predictive control method for petrochemical plants according to claim 1, characterized in that, After issuing control commands to the petrochemical unit, the method further includes: Determine the degree of deviation between the actual output state and the predicted output state of the petrochemical unit; If the deviation exceeds a preset threshold, the prediction model is fine-tuned based on the actual output state.

10. An adaptive predictive control device for a petrochemical plant, characterized in that, include: The first processing module is used to acquire user instructions and generate orchestration instructions based on the semantic information of the user instructions. The user instructions are used to instruct the main control console to build a controller, the controller is used to control the petrochemical unit, and the orchestration instructions include data processing subtasks, which are used to determine training data that matches the user instructions. The second processing module is used to determine training data that matches the user instruction based on the data processing subtask, and to construct a prediction model based on the training data. The prediction model is used to predict the predicted output state of the petrochemical unit at the next moment based on the output state and input state of the petrochemical unit at the current moment. The third processing module is used to obtain the predicted output state predicted by the prediction model, and determine the input quantity of the controller at the next time step based on the predicted output state and control parameters. The predicted output state is substituted into a first objective function, the constraints of which include at least one of the following: device dynamic constraints, output state constraints, input state constraints, control increment constraints, control time-domain constraints, and interval control constraints. The first objective function also includes the control parameters. At each time step k, the first objective function is: ; , , For adaptive weight parameters, The relaxation coefficient is... For reference trajectory, As slack variables, , To predict the time domain, , The dimensions of the input and output variables are defined; the first objective function is solved to obtain the control sequence of the controller, wherein the objective of the solution is to minimize the first objective function, and the control sequence includes multiple control inputs; the first control input in the control sequence is taken as the input, and the control parameters are adaptively adjusted according to the predicted output state; The fourth processing module is used to send control commands to the petrochemical unit, wherein the control commands include the input quantity.

11. An adaptive predictive control system for a petrochemical plant, characterized in that, It includes a large language model control console, an automatic data preprocessing agent, an automated modeling agent, and an adaptive predictive control agent, among which: The large language model main control console is used to acquire user instructions and generate orchestration instructions based on the semantic information of the user instructions. The user instructions are used to instruct the main control console to build a controller, the controller is used to control the petrochemical device, and the orchestration instructions include data processing subtasks, which are used to determine training data that matches the user instructions. The automatic data preprocessing agent is used to determine training data that matches the user instructions based on the data processing sub-tasks; The automated modeling agent is used to construct a prediction model based on the training data, wherein the prediction model is used to predict the predicted output state of the petrochemical unit at the next moment based on the output state and input state of the petrochemical unit at the current moment. The adaptive predictive control agent is used to obtain the predicted output state predicted by the prediction model, and to determine the input of the controller at the next time step based on the predicted output state and control parameters. The predicted output state is substituted into a first objective function, the constraints of which include at least one of the following: device dynamic constraints, output state constraints, input state constraints, control increment constraints, control time-domain constraints, and interval control constraints. The first objective function also includes the control parameters. At each time step k, the first objective function is: ; , , For adaptive weight parameters, The relaxation coefficient is... For reference trajectory, As slack variables, , To predict the time domain, , The dimensions of the input and output variables are defined; the first objective function is solved to obtain the control sequence of the controller, wherein the objective of the solution is to minimize the first objective function, and the control sequence includes multiple control inputs; the first control input in the control sequence is taken as the input, and the control parameters are adaptively adjusted according to the predicted output state; The large language model main control console is also used to send control commands to the petrochemical unit, wherein the control commands include the input quantity.

12. A non-volatile storage medium, characterized in that, The non-volatile storage medium stores a program, wherein when the program is executed, it controls the device containing the non-volatile storage medium to perform the adaptive predictive control method for the petrochemical plant according to any one of claims 1 to 9.

13. An electronic device, characterized in that, include: A memory and a processor, the processor being configured to run a program stored in the memory, wherein the program, when running, executes the adaptive predictive control method for a petrochemical plant according to any one of claims 1 to 9.

14. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the adaptive predictive control method for petrochemical plants according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • Production system control method, device, system and equipment and storage medium

    CN116165976A

  • Instruction generation method and device, electronic equipment and storage medium

    CN120087448A