A high-end control valve fault diagnosis method based on a large language model

CN122902511APending Publication Date: 2026-10-13Liupanshan Laboratory
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411329288.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-24
Publication Date
2026-10-13

AI Technical Summary

Technical Problem

虽然这些方法应用广泛,然而在面对工况频繁波动、多因素耦合的复杂工业场景时,往往表现出诊断周期长、预测精度不高、适应性差和成本高的问题

Benefits of technology

[0017]经由上述的技术方案可知,与现有技术相比,本发明公开提供了一种基于大语言模型的高端控制阀故障诊断方法,通过利用Llama 2大语言模型对高端控制阀故障仿真数据进行预训练和微调,确定当前数据状态下的故障类型,本发明的方法通过预训练模型和微调技术提高故障诊断模型在样本量小的情况的适应性和泛化能力,能够有效地提升高端控制阀故障诊断精度从而保证故障诊断模型的前沿性,保证故障诊断模型的故障预测准确性,并且针对故障类型提供针对性的维护策略与建议。因此,本发明能够降低维护成本,及时发现并处理控制阀的故障问题,减少生产过程中的停机时间和维护成本;增强系统稳定性,提高故障诊断的实时性和准确性,有助于增强整个工业系统的稳定性和安全性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122902511A_ABST
    Figure CN122902511A_ABST
Patent Text Reader

Abstract

The application discloses a high-end control valve fault diagnosis method based on a large language model, relates to the technical field of industrial automation control and artificial intelligence, and comprises the following steps: step 1, collecting high-end control valve behavior data under different fault states to obtain a fault data set; step 2, constructing a prompt data set according to the fault data set, training a large language model by using the prompt data set, and obtaining a fault diagnosis model; setting a prompt template, splitting and filling the fault data set into the prompt template to obtain the prompt data set; and step 3, collecting real-time monitoring data of the high-end control valve, inputting the real-time monitoring data into the fault diagnosis model, and obtaining a fault prediction result and a processing strategy. The application can quickly and effectively monitor the state of the high-end control valve, early warning before a major fault occurs, and saves the labor cost and the fault processing cost.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of industrial automation control and artificial intelligence technology, and more specifically to a high-end control valve fault diagnosis method based on a large language model. Background Technology

[0002] In the field of industrial automation, high-end control valves are core components, and their operating status has a crucial impact on the stable operation and safety of production processes. However, in actual production environments, control valves may be affected by a variety of complex factors, including but not limited to deposits on the valve core and seat, blockage of the valve passage, increased friction coefficient between the valve core and bushing, deformation of the actuator push rod, deterioration of spring performance, and diaphragm damage. These factors can all cause malfunctions, thereby threatening the overall performance of the system.

[0003] Traditionally, fault diagnosis of control valves has relied primarily on the subjective judgment of domain experts and model analysis based on physical principles. While these methods are widely used, they often exhibit problems such as long diagnostic cycles, low prediction accuracy, poor adaptability, and high costs when facing complex industrial scenarios with frequent fluctuations in operating conditions and multiple coupled factors.

[0004] In recent years, with the rapid development of large language model technology, its high predictive accuracy has led to its widespread application in various fields, thus providing new insights for the accurate fault identification and prevention of high-end control valves. Currently, there are almost no large-scale models for fault diagnosis in high-end control valves, but some published patents highly praise large-scale model diagnosis. Compared with traditional methods, it can effectively improve the accuracy and efficiency of fault diagnosis, especially since large-scale models can provide maintenance-related suggestions. Therefore, research on fault prediction and diagnosis based on large language models is of great significance.

[0005] Therefore, how to reduce the diagnostic cycle and cost of high-end control valve fault diagnosis, and improve the prediction accuracy and adaptability, is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention

[0006] In view of this, the present invention provides a high-end control valve fault diagnosis method based on a large language model. By combining high-end control valve data with a large language model for fault prediction and diagnosis, the method can quickly and effectively monitor the status of high-end control valves, provide early warnings before major faults occur, and save labor costs and fault handling costs.

[0007] To achieve the above objectives, the present invention adopts the following technical solution:

[0008] A high-end control valve fault diagnosis method based on a large language model includes the following steps:

[0009] Step 1: Collect high-end control valve behavior data under different fault conditions to obtain a fault dataset;

[0010] Step 2: Construct a prompt dataset based on the fault dataset, and use the prompt dataset to train a large language model to obtain a fault diagnosis model; set a prompt template, split the fault dataset and fill it into the prompt template to obtain the prompt dataset;

[0011] Step 3: Collect real-time monitoring data of the high-end control valve and input it into the fault diagnosis model to obtain fault prediction results and handling strategies.

[0012] Preferably, in step 1, the high-end control valve behavior data includes control displacement, stroke displacement, and deviation; the high-end control valve behavior process under different fault conditions is simulated using a high-end control valve control system simulation model, and high-end control valve behavior data of various fault types are collected.

[0013] Preferably, the prompt template in step 2 includes an explanation, content, and answer. The explanation is composed of information from the large language model, the content is populated with high-end control valve behavior data from the fault dataset, and the answer is populated with labels indicating the fault types from the fault dataset.

[0014] Preferably, the large language model adopts the Liama ​​2 large language model with a Transformer network structure, which consists of multiple stacked Transformer layers. Each Transformer layer includes a multi-head self-attention mechanism and a fully connected layer. The Liama ​​2 large language model is pre-trained and fine-tuned based on the fault dataset to build a fault diagnosis model.

[0015] Preferably, the Liama ​​2 language models are pre-trained using a masked language model and an autoregressive language model for self-supervised learning.

[0016] Preferably, the Liama ​​2 language model adopts an autoregressive Transformer network structure, uses grouped query attention as the multi-head self-attention mechanism, employs LoRa for fine-tuning, and uses the cross-entropy loss function and Adam optimizer for model optimization.

[0017] As can be seen from the above technical solution, compared with the prior art, this invention discloses a high-end control valve fault diagnosis method based on a large language model. By using the Llama 2 large language model to pre-train and fine-tune high-end control valve fault simulation data, the fault type under the current data state is determined. The method of this invention improves the adaptability and generalization ability of the fault diagnosis model under small sample sizes through pre-training model and fine-tuning techniques, effectively improving the fault diagnosis accuracy of high-end control valves, thus ensuring the cutting-edge nature of the fault diagnosis model and the accuracy of fault prediction. Furthermore, it provides targeted maintenance strategies and suggestions for different fault types. Therefore, this invention can reduce maintenance costs, promptly detect and handle control valve faults, reduce downtime and maintenance costs in the production process, enhance system stability, improve the real-time performance and accuracy of fault diagnosis, and contribute to enhancing the stability and safety of the entire industrial system. Attached Figure Description

[0018] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0019] Figure 1 A schematic diagram of a high-end control valve fault diagnosis method based on a large language model is provided in one embodiment of the present invention;

[0020] Figure 2 A schematic diagram of a high-end control valve fault diagnosis method based on a large language model is provided in one embodiment of the present invention;

[0021] Figure 3 This is a schematic diagram illustrating the performance of the trained model in one embodiment of the present invention.

[0022] Figure 4 This is a schematic diagram of the model evaluation results in one embodiment of the present invention. Detailed Implementation

[0023] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0024] This invention discloses a high-end control valve fault diagnosis method based on a large language model, such as... Figure 1 As shown, by using the MATLAB Simulink platform to build a sophisticated fault simulation model and generate a fault dataset that closely matches actual working conditions, and then combining it with advanced large language model technology for pre-training and fine-tuning, a fault identification model with high accuracy can be constructed. This model can not only accurately distinguish different types of fault modes, but also provide targeted maintenance strategies and suggestions based on fault characteristics, thereby significantly improving the maintenance efficiency of control valves and the overall reliability of the system. Specifically, the following steps are included:

[0025] S1: Simulation Data Generation; A simulation model of a high-end control valve with a Fisher positioner and its control system is established using the Actuator module in MATLAB Simulink simulation software. The simulation model simulates the data characteristics of the control valve's behavior under different fault conditions, generating a simulation dataset containing multiple fault types. The data characteristics include control displacement (CV), stroke displacement (X), and bias (where bias refers to the absolute value of the difference between control displacement and stroke displacement). Fault categories include F0, F1, F2, F4, F7, F12, F15, F16 (F10), and F17, totaling nine categories. To simulate uncertainties in the actual working environment, random noise and interference are added during the simulation process, while also increasing data diversity.

[0026] S2: Construct the prompt dataset; Based on the input characteristics of the Llama 2 language models, construct a prompt training dataset and a prompt test dataset respectively. The prompt training dataset includes instructions, content, and answers. For example, the instructions are: "Instruction: You are an expert at Advanced ControlValve system who masters its designing and operation mechanism. Please determine the system condition based on the given monitoring data enclosed in square brackets. Determine if it is zero, one, two, four, seven, twelve, fifteen, sixteen, or seventeen, and return the answer as the corresponding label."

[0027] The prompt asks for examples like 'zero', 'one', 'two', 'four', 'seven', 'twelve', 'fifteen', 'sixteen', and 'seventeen'. The description section needs to provide a detailed introduction to the domain background, expertise, and classification results for the large language model. The content section asks, "In an Advanced Control Valve system, the X is 0.2488, the CV is 0.6390, and the bias is 0.3901. What is the system state?" The content section should describe the specific values ​​and system state of the simulation dataset. The answer is "zero," which corresponds to the label of the fault category in the simulation dataset. The prompt test dataset also includes an instruction and content section, in the same format as the training set, but without an answer section, because the answer section is what the large language model needs to predict.

[0028] S3: Constructing the Llama 2 language model; The Llama 2 language model adopts a Transformer network structure. The Transformer processes input data through a self-attention mechanism, which can capture complex relationships in the input sequence. In addition, the Llama 2 language model is composed of multiple stacked Transformer layers, each of which contains a multi-head self-attention mechanism and a fully connected layer. This stacked structure allows the model to gradually capture higher-level semantic information. In order to introduce positional information in the sequence, the Llama 2 language model uses positional encoding. This encoding adds positional information to word vectors, enabling the model to recognize the positional relationships in the input sequence.

[0029] Pre-training and fine-tuning of the two major language models, Llama, are performed, such as... Figure 2As shown, the Llama 2 language models are pre-trained on a training prompt dataset, enabling them to learn rich linguistic knowledge and data features. This allows for effective optimization based on monitoring data, resulting in new Llama 2 language models and fault diagnosis models. A self-supervised learning approach is employed, with pre-trained models including a Masked Language Model and an Autoregressive Transformer model. The Masked Language Model randomly masks parts of the input prompt text, requiring the model to predict these masked words based on context, thus improving the model's language understanding and generation capabilities. Furthermore, the Llama 2 language model's Transformer architecture uses an optimized Autoregressive Transformer, employs more powerful data cleaning and update methods, doubles the context length, and uses Grouped Query Attention (GQA) to improve the model's inference scalability. LoRa is used to train Llama... Two language models were fine-tuned on high-end control valve fault diagnosis simulation data. Lora_alpha was set to 16, loar_dropout to 0.1, epochs to 10, learning_rate to 2e-4, and weight_decay to 0.001. AdamW was used for model optimization. During fine-tuning, the large language model utilized labeled data from the training cue dataset for supervised learning, optimizing for the target task. This further improved the model's performance on specific tasks. Furthermore, to ensure predictive performance, and considering the significant impact of data selection on model performance during supervised fine-tuning, a small amount of high-quality training cue data was constructed.

[0030] S4: Collect real-time monitoring data of high-end control valves and input it into the fault diagnosis model to obtain fault prediction results and handling strategies.

[0031] Furthermore, the Llama 2 model specifically adopts the Llama 27B model, which is sufficient to meet the dataset requirements in terms of model capacity and prediction accuracy.

[0032] On the other hand, in a specific embodiment, the process of fault monitoring of the high-end control valve in the factory is as follows:

[0033] S1: Data preparation, generating a fault training set;

[0034] Data collection: The Actuator module in the MATLAB Simulink simulation software was used to generate 19 types of fault datasets, and 2000 samples were collected for each category;

[0035] Category screening: The generated samples are screened according to category conditions. The screened samples are visualized and correlation analysis is performed. In addition, combined with the actual operating environment in the factory, common failure modes are summarized. A total of 9 common failures are screened. Combined with the data that can be monitored by the intelligent positioner, including the target valve position, the actual valve position and the deviation between the two, a total of 3 features are selected. Some actual monitoring data are shown in Table 1 below.

[0036] Table 1 Monitoring Data

[0037]

[0038]

[0039] S2: Construct the hint dataset;

[0040] A prompt dataset was constructed according to the input format of the Llama 2 language model, and it was divided into a training prompt dataset and a test prompt dataset. To meet the requirements of the pre-trained model, a small amount of high-quality training prompt data was required. Therefore, the training and test prompt datasets were divided into four sampling methods: training set 900, test set 200; training set 1800, test set 400; training set 2700, test set 600; and training set 3600, test set 800. All original samples were stratified to ensure the balance of data in each category. The fault description data collected for training the Llama 2 language model is shown in Table 2 below.

[0041] Table 2 Fault Description

[0042]

[0043]

[0044] S3: Construct the Llama 2 language model, perform pre-training and fine-tuning to obtain a fault diagnosis model; load the pre-trained Llama 2 language model into the runtime environment, and fine-tune the Llama 2 language model using a small amount of labeled data from the prompt dataset (using the four sampling methods mentioned above). During training, the cross-entropy loss function and Adam optimizer are used, and the model is trained iteratively multiple times until it achieves high accuracy on the test prompt dataset, thus obtaining a fault diagnosis model for high-end control valves; the performance of the trained model is as follows: Figure 3 As shown, the blue line represents the training loss, and the red line represents the validation loss;

[0045] S4: Model Evaluation;

[0046] The model was evaluated using the test hint dataset, and performance metrics such as accuracy, recall, and confusion matrix were calculated, as shown in Table 3 below. Figure 3 As shown, Figure 3 The confusion matrix is ​​shown. Currently, the best prediction accuracy among the four sampling methods reaches 87.1%. The model will be further adjusted and optimized based on the evaluation results.

[0047] Table 3 Model Evaluation Results

[0048]

[0049]

[0050] S5: Model Application;

[0051] The trained Llama 2 language model (fault diagnosis model) is deployed to the actual automatic fault diagnosis device system to accurately judge the fault of high-end control valve based on real-time monitoring data.

[0052] S6: Maintenance Strategies and Recommendations;

[0053] Based on the fault categories identified by the Llama 2 language models, combined with historical maintenance experience and guidance manuals, the backend will output relevant fault handling strategies and suggestions. This is especially valuable for newly hired maintenance personnel, providing important learning opportunities and improving their control valve maintenance capabilities, thus ensuring the safe and stable operation of control valves.

[0054] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to the method section.

[0055] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A high-end control valve fault diagnosis method based on a large language model, characterized in that, Includes the following steps: Step 1: Collect high-end control valve behavior data under different fault conditions to obtain a fault dataset; Step 2: Construct a hint dataset based on the fault dataset, and use the hint dataset to train the large language model to obtain the fault diagnosis model; Set a prompt template, split the fault dataset and populate the prompt template to obtain the prompt dataset; Step 3: Collect real-time monitoring data of the high-end control valve and input it into the fault diagnosis model to obtain fault prediction results.

2. The high-end control valve fault diagnosis method based on a large language model according to claim 1, characterized in that, In step 1, the high-end control valve behavior data includes control displacement, stroke displacement, and deviation; the high-end control valve control system simulation model is used to simulate the high-end control valve behavior process under different fault conditions, and high-end control valve behavior data of various fault types are collected.

3. The high-end control valve fault diagnosis method based on a large language model according to claim 2, characterized in that, Step 2 prompts the template to include an explanation, content, and answer. The explanation is composed of information from the large language model. The content is populated with high-end control valve behavior data from the fault dataset. The answer is populated with labels indicating the fault types from the fault dataset.

4. The high-end control valve fault diagnosis method based on a large language model according to claim 1, characterized in that, The large language model adopts the Liama ​​2 large language model with a Transformer network structure, which consists of multiple stacked Transformer layers. Each Transformer layer includes a multi-head self-attention mechanism and a fully connected layer. The Liama ​​2 large language model is pre-trained and fine-tuned based on the fault dataset to build a fault diagnosis model.

5. The high-end control valve fault diagnosis method based on a large language model according to claim 4, characterized in that, The Liama ​​2 language models were pre-trained using a masked language model and an autoregressive language model for self-supervised learning.