Instrument fault diagnosis model construction method and device, processor and storage medium
By generating sample datasets of experimental and control instruments, using machine learning models to predict detection data, determining fault labels, generating fault diagnosis sample datasets, and training the target instrument fault diagnosis model, the problem of false alarms and missed alarms in hardware redundancy diagnosis methods is solved, achieving high-accuracy instrument fault diagnosis and reducing costs.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHINA PETROLEUM & CHEMICAL CORP
- Filing Date
- 2024-10-16
- Publication Date
- 2026-04-17
AI Technical Summary
Existing instrument fault diagnosis methods based on hardware redundancy suffer from false alarms or missed alarms, resulting in low diagnostic accuracy.
By generating sample datasets of experimental and control instruments, using machine learning models to predict detection data, determining fault labels, generating fault diagnosis sample datasets, and training a fault diagnosis model for the target instrument, a fast and accurate fault diagnosis can be achieved.
High-accuracy instrument fault diagnosis was achieved without the need for additional hardware, reducing costs and improving diagnostic speed and precision.
Smart Images

Figure CN121880916A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of fault diagnosis technology, specifically to a method for constructing an instrument fault diagnosis model, an instrument fault diagnosis model construction device, a processor, and a storage medium. Background Technology
[0002] Instruments are one of the key components of an equipment system. For example, in the control system of a chemical plant, instruments provide accurate process parameters to the controller, providing an important data foundation for ensuring the safe operation of the system.
[0003] In related technologies, instrument fault diagnosis (i.e., determining whether an instrument is faulty) mainly includes methods based on hardware redundancy, mathematical models, qualitative knowledge, information processing, and data-driven approaches. Among these, hardware redundancy-based instrument fault diagnosis methods are commonly used to improve the diagnostic accuracy and reliability of equipment systems. However, even under normal operating conditions, two or more instruments detecting the same parameter may still have some detection error. Directly using hardware redundancy-based instrument fault diagnosis methods may lead to false alarms or missed alarms, reducing diagnostic accuracy. Summary of the Invention
[0004] The purpose of this application is to provide a method, apparatus, processor, and storage medium for constructing an instrument fault diagnosis model, in order to solve the problem of low accuracy in instrument fault diagnosis.
[0005] To achieve the above objectives, the first aspect of this application provides a method for constructing an instrument fault diagnosis model, comprising:
[0006] Generate a first sample dataset of experimental instruments and a second sample dataset of control instruments corresponding to the experimental instruments;
[0007] Based on the first sample dataset, determine the fault label;
[0008] Based on the first sample dataset, the second sample dataset, and the fault labels, a fault diagnosis sample dataset is generated;
[0009] The initial instrument fault diagnosis model is trained using the fault diagnosis sample dataset to obtain the target instrument fault diagnosis model.
[0010] In this embodiment of the application, the first sample dataset for generating experimental instruments includes:
[0011] Obtain the first historical detection dataset of the experimental instrument;
[0012] The target experimental instrument data prediction model is used to predict the first predicted detection data corresponding to each first historical detection data in the first historical detection dataset.
[0013] The first sample dataset is determined based on each of the first historical detection data and its corresponding first predicted detection data.
[0014] In this embodiment of the application, before predicting the first predicted detection data corresponding to each first historical detection data in the first historical detection dataset using the target experimental instrument data prediction model, the method further includes:
[0015] Obtain the second historical detection dataset of the experimental instrument when it is fault-free;
[0016] Normalize each second historical detection data in the second historical detection dataset to obtain the first normalized dataset;
[0017] The first normalized dataset is reconstructed to generate a first input matrix and a first output matrix;
[0018] The initial experimental instrument data prediction model is trained using the first input matrix and the first output matrix to obtain the target experimental instrument data prediction model.
[0019] In this embodiment of the application, determining the first sample dataset based on each of the first historical detection data and its corresponding first predicted detection data includes:
[0020] For each of the first historical detection data, the first sample data corresponding to the first historical detection data is determined based on the percentage error between the first historical detection data and its corresponding first predicted detection data.
[0021] The first sample dataset includes the first sample data corresponding to each of the first historical detection data.
[0022] In this embodiment of the application, the fault label is either a fault-free label or a faulty label;
[0023] The step of determining the fault label based on the first sample dataset includes:
[0024] Based on the preset fault diagnosis length and the first sample dataset, at least one first fault diagnosis sequence is determined;
[0025] Based on the preset fault discrimination length, determine the fault label corresponding to each of the first fault diagnosis sequences.
[0026] In this embodiment of the application, generating a fault diagnosis sample dataset based on the first sample dataset, the second sample dataset, and the fault label includes:
[0027] Based on the preset fault diagnosis length and the second sample dataset, at least one second fault diagnosis sequence is determined; wherein, the second fault diagnosis sequence corresponds one-to-one with the first fault diagnosis sequence;
[0028] For each of the first fault diagnosis sequences, fault diagnosis sample data is generated based on the first fault diagnosis sequence and its corresponding second fault diagnosis sequence and fault label.
[0029] The fault diagnosis sample dataset includes each of the fault diagnosis sample data.
[0030] A second aspect of this application provides a method for diagnosing instrument faults, comprising:
[0031] Obtain a first initial detection dataset detected by the instrument to be diagnosed and a second initial detection dataset detected by a control instrument corresponding to the instrument to be diagnosed;
[0032] Generate a first target detection dataset corresponding to the first initial detection dataset and a second target detection dataset corresponding to the second initial detection dataset;
[0033] The first target detection dataset and the second target detection dataset are input into the target instrument fault diagnosis model obtained by the instrument fault diagnosis model construction method described in the first aspect above for prediction, so as to obtain the diagnosis result of the instrument to be diagnosed; wherein, the diagnosis result is faulty or not faulty.
[0034] A third aspect of this application provides a method for constructing an instrument fault classification model, including:
[0035] Obtain the fault diagnosis sample dataset obtained by the instrument fault diagnosis model construction method described in the first aspect above, and determine the fault classification sequence set based on the fault diagnosis sample dataset; and / or,
[0036] Generate a third sample dataset of faulty instruments, and determine a fault classification sequence set based on the third sample dataset;
[0037] Determine the fault type label corresponding to each fault classification sequence in the fault classification sequence set;
[0038] Based on each of the aforementioned fault classification sequences and their corresponding fault type labels, a fault classification sample dataset is generated;
[0039] The initial instrument fault classification model is trained using the fault classification sample dataset to obtain the target instrument fault classification model.
[0040] In this embodiment of the application, the third sample dataset for generating faulty instruments includes:
[0041] Obtain the fourth historical detection dataset of the faulty instrument;
[0042] The third predicted detection data corresponding to each fourth historical detection data in the fourth historical detection dataset is predicted by the target fault instrument data prediction model.
[0043] The third sample dataset is determined based on each of the fourth historical detection data and its corresponding third predicted detection data.
[0044] In this embodiment of the application, before predicting the third predicted detection data corresponding to each of the fourth historical detection data in the fourth historical detection dataset using the target fault instrument data prediction model, the method further includes:
[0045] Obtain the fifth historical detection dataset of the faulty instrument when it is fault-free;
[0046] Normalize each fifth historical detection data in the fifth historical detection dataset to obtain the third normalized dataset;
[0047] The third normalized dataset is reconstructed to generate a third input matrix and a third output matrix;
[0048] The initial fault instrument data prediction model is trained using the third input matrix and the third output matrix to obtain the target fault instrument data prediction model.
[0049] In this embodiment of the application, determining the fault classification sequence set based on the third sample dataset includes:
[0050] Based on the preset fault diagnosis length and the third sample dataset, at least one second fault diagnosis sequence is determined; wherein, the second fault diagnosis sequence includes multiple third sample data in the third sample dataset;
[0051] For each of the second fault diagnosis sequences, the value of the first element in the second fault diagnosis sequence is used as the initial value corresponding to the second fault diagnosis sequence. The initial value is then subtracted from the values of all elements in the second fault diagnosis sequence to obtain the fault classification sequence corresponding to the second fault diagnosis sequence.
[0052] The fourth aspect of this application provides a method for classifying instrument faults, including:
[0053] Obtain the initial fault dataset detected by the faulty instrument;
[0054] Generate the target fault dataset corresponding to the initial fault dataset;
[0055] The target fault dataset is input into the target instrument fault classification model obtained by the instrument fault classification model construction method described in the first aspect above for prediction, so as to obtain the fault type of the faulty instrument.
[0056] The fifth aspect of this application provides an instrument fault diagnosis model construction device, comprising:
[0057] The sample data determination module generates a first sample dataset of experimental instruments and a second sample dataset of control instruments corresponding to the experimental instruments.
[0058] The fault label determination module determines the fault label based on the first sample dataset;
[0059] The fault diagnosis sample determination module generates a fault diagnosis sample dataset based on the first sample dataset, the second sample dataset, and the fault label.
[0060] The fault diagnosis model generation module trains the initial instrument fault diagnosis model using the fault diagnosis sample dataset to obtain the target instrument fault diagnosis model.
[0061] The sixth aspect of this application provides a processor configured to execute the instrument fault diagnosis model construction method described in the first aspect above.
[0062] The seventh aspect of this application provides a machine-readable storage medium storing instructions that, when executed by a processor, configure the processor to perform the instrument fault diagnosis model construction method described in the first aspect above.
[0063] The above-mentioned one or more technical solutions provided in this application may have the following advantages or at least achieve the following technical effects:
[0064] First, a first sample dataset of experimental instruments and a second sample dataset of control instruments are generated. Then, based on the data performance during instrument failure, fault labels are determined according to the first sample dataset. Next, a fault diagnosis sample dataset is generated using the first sample dataset, the second sample dataset, and the fault labels. Finally, the model is trained using the fault diagnosis sample dataset. This allows for rapid and accurate fault diagnosis of the instrument under test after obtaining the detection data of the instrument to be diagnosed and its corresponding control instrument, through the trained target instrument fault diagnosis model. Furthermore, generating the instrument fault diagnosis model, diagnosing the instrument fault, generating the instrument fault classification model, and classifying the instrument fault all only require the data detected by the corresponding instrument, and can be implemented without adding additional hardware, resulting in low implementation costs.
[0065] Other features and advantages of the embodiments of this application will be described in detail in the following detailed description section. Attached Figure Description
[0066] The accompanying drawings are provided to further illustrate the embodiments of this application and form part of the specification. They are used together with the following detailed description to explain the embodiments of this application, but do not constitute a limitation on the embodiments of this application. In the drawings:
[0067] Figure 1 The schematic diagram illustrates a flowchart of the instrument fault diagnosis model construction method according to an embodiment of this application;
[0068] Figure 2 This illustration schematically shows a diagram of historical process data from a reference instrument in an example embodiment of this application;
[0069] Figure 3 This illustration schematically shows a diagram of the historical process data of the instrument under test in an example of an embodiment of this application;
[0070] Figure 4 This schematic diagram illustrates the actual value of the measured temperature instrument in an example embodiment of this application.
[0071] Figure 5 This illustration schematically shows a diagram of the predicted value of the temperature instrument being measured in an example of an embodiment of this application;
[0072] Figure 6 The schematic diagram illustrates a flow chart of an instrument fault diagnosis method according to an embodiment of this application;
[0073] Figure 7 The diagram illustrates the fault diagnosis results of the instrument fault diagnosis method according to an embodiment of this application.
[0074] Figure 8 The schematic diagram illustrates a flowchart of the instrument fault classification model construction method according to an embodiment of this application;
[0075] Figure 9 The schematic diagram illustrates a flowchart of an instrument fault classification method according to an embodiment of this application;
[0076] Figure 10 The diagram illustrates the fault classification results of the instrument fault classification method according to an embodiment of this application.
[0077] Figure 11 This schematic diagram illustrates the structural block diagram of an instrument fault diagnosis model construction device according to an embodiment of this application;
[0078] Figure 12The diagram illustrates the internal structure of a computer device according to an embodiment of this application.
[0079] Explanation of reference numerals in the attached figures
[0080] A01 - Processor; A02 - Network Interface; A03 - Internal Memory; A04 - Display Screen; A05 - Input Device; A06 - Non-volatile Storage Media; B01 - Operating System; B02 - Computer Program. Detailed Implementation
[0081] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are only for illustration and explanation of the embodiments of this application and are not intended to limit the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.
[0082] It should be noted that if the embodiments of this application involve directional indicators (such as up, down, left, right, front, back, etc.), the directional indicators are only used to explain the relative positional relationship and movement of each component in a certain specific posture (as shown in the figure). If the specific posture changes, the directional indicators will also change accordingly.
[0083] Furthermore, if the embodiments of this application involve descriptions such as "first" or "second," these descriptions are for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, features defined with "first" or "second" may explicitly or implicitly include at least one of those features. Additionally, the technical solutions of various embodiments can be combined with each other, but this must be based on the ability of those skilled in the art to implement them. If the combination of technical solutions is contradictory or impossible to implement, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection claimed in this application.
[0084] Instruments are a key component of equipment systems. However, because instruments often operate in harsh environments such as high temperature, high pressure, strong acids, and strong alkalis, and are affected by factors such as manufacturing processes and materials, they are prone to various malfunctions. These malfunctions ultimately manifest in the data they acquire. Since this data is crucial information for controlling the corresponding equipment system, any deviation can lead to anything from unstable system operation, affecting production efficiency and product quality, to serious accidents causing severe personal injury and property damage. Therefore, when an instrument malfunctions, quickly and accurately diagnosing the fault and taking appropriate countermeasures is essential to ensuring the safe and stable operation of the equipment system using the instrument and preventing accidents.
[0085] In related technologies, the main methods for diagnosing instrument faults can be categorized as follows:
[0086] (1) Hardware Redundancy-Based Fault Diagnosis: The principle of the instrument fault diagnosis method based on hardware redundancy is to use multiple instruments to detect the same process data, and then compare the detection values of different instruments. When the detection values show a large deviation, it indicates that some instruments must have failed. This type of method is simple to implement, fast and reliable in diagnosis, but it has a large amount of equipment redundancy, which increases equipment costs and maintenance expenses.
[0087] (2) Mathematical Model-Based Approach: Instrument fault diagnosis methods based on data models analyze the material and energy balance mechanisms of equipment systems, establish accurate mathematical models of the equipment systems, and then use filters to estimate the system state to obtain residual sequences. These methods mainly include observer-based and filter-based approaches. This type of method does not require hardware redundancy and has a low cost, but it is often difficult to establish accurate mathematical models, making it difficult to apply to equipment systems with severe nonlinearity.
[0088] (3) Qualitative Knowledge-Based Methods: Instrument fault diagnosis methods based on qualitative knowledge require prior knowledge of the research object. This involves collecting and summarizing relevant expert knowledge and experience, and then using this knowledge to establish a corresponding fault diagnosis model. In practical applications, the instrument's signals are analyzed and reasoned according to the established model rules to achieve fault diagnosis. This type of method mainly includes graph theory, abstract hierarchical systems, fuzzy systems, and expert systems. However, it suffers from problems such as subjectivity and uncertainty, high knowledge acquisition costs, difficulty in knowledge expression and reasoning, limited applicability, and difficulty in handling complex systems.
[0089] (4) Information Processing-Based Methods: Information processing-based instrument fault diagnosis methods utilize signal models to analyze instrument signals, extract feature information such as variance and amplitude, and perform processing and transformation to obtain fault information, thereby achieving instrument fault diagnosis. These methods mainly include statistical analysis, wavelet analysis, and information fusion. They have high sensitivity and can overcome noise, but due to the lack of analysis of the equipment system, they are difficult to distinguish between process fluctuations and instrument faults, and are prone to false alarms.
[0090] (5) Data-driven: Data-driven instrument fault diagnosis methods directly utilize the data obtained from instrument detection and deeply mine the fault information hidden in the data through various data processing and analysis methods. This type of method does not require a systematic mathematical model, but only processes the instrument data, and the theoretical results in this field can be implemented in actual production relatively quickly. However, the accuracy of this method is greatly limited by the quality and quantity of the analyzed data.
[0091] In practical applications, using instrument fault diagnosis methods based on hardware redundancy can improve the diagnostic accuracy and reliability of equipment systems. However, even when two or more instruments are detecting the same parameter under normal operating conditions, there will still be some detection error. Directly using instrument fault diagnosis methods based on hardware redundancy may lead to false alarms or missed alarms, reducing diagnostic accuracy.
[0092] In view of the fact that instrument fault diagnosis in related technologies is easily affected by the limitations of sample data processing, which leads to a reduction in the accuracy of instrument fault diagnosis, this application provides an instrument fault diagnosis model construction method. The instrument fault diagnosis model construction method provided in this application will be described in detail below with reference to the accompanying drawings and through specific embodiments and implementation methods.
[0093] Example 1
[0094] Figure 1 The schematic diagram illustrates a flowchart of the instrument fault diagnosis model construction method according to an embodiment of this application. For example... Figure 1 As shown in one embodiment of this application, a method for constructing an instrument fault diagnosis model is provided, including the following steps:
[0095] Step S200: Generate a first sample dataset of experimental instruments and a second sample dataset of control instruments corresponding to the experimental instruments.
[0096] In this embodiment, the experimental instrument and the control instrument belong to the same category and are in the same equipment system. The control instrument is located at the front end of the experimental instrument in the process flow of the equipment system, or the control instrument is a redundant instrument in the equipment system.
[0097] In this context, the experimental instrument and the control instrument belonging to the same category indicate that they can be instruments of the same brand or model, meaning they have similar functions, performance, and specifications. They can also be similar types of instruments, meaning they may have different brands and models but similar functions, measurement principles, or applications. Furthermore, they can be instruments with the same characteristics, meaning they have the same technical specifications, performance indicators, or specific features and can be used in similar application scenarios. They can also be instruments from the same batch or production series, meaning they may have similar manufacturing processes, materials, and performance. This embodiment uses data collected from instruments of the same category for instrument fault diagnosis and classification to ensure the accuracy of instrument fault diagnosis and classification.
[0098] It is understood that the experimental instrument and the control instrument are components of the equipment system. For the experimental instrument, when the control instrument is selected as an instrument located upstream of the experimental instrument in the process flow of the equipment system, the selection of the control instrument is based on the instruments included in the equipment system and the categories to which each instrument belongs. For example, in a chemical plant equipment system, according to the category of the experimental instrument (such as temperature instruments or pressure instruments), an instrument of the same category can be selected as the control instrument at a nearby location upstream of the process flow of the same chemical plant.
[0099] It is worth mentioning that, in this embodiment, when the reference instrument corresponding to the experimental instrument can be selected as a redundant instrument of the same category as the experimental instrument in the equipment system, it indicates that the equipment system itself contains the redundant instrument to improve system safety, rather than adding a redundant instrument of the same category as the experimental instrument to implement the technical solution of this application. When the equipment system has both a redundant instrument of the same category as the experimental instrument and an instrument in the process flow that is upstream of the experimental instrument and belongs to the same category as the experimental instrument, the redundant instrument is preferred as the reference instrument corresponding to the experimental instrument.
[0100] In this embodiment, step S200, generating the first sample dataset of the experimental instrument, includes:
[0101] Step S210: Obtain the first historical detection dataset of the experimental instrument.
[0102] The first historical detection dataset includes multiple first historical detection datasets.
[0103] Step S220: Predict the first predicted detection data corresponding to each first historical detection data in the first historical detection dataset using the target experimental instrument data prediction model.
[0104] Step S230: Determine the first sample dataset based on each of the first historical detection data and its corresponding first predicted detection data.
[0105] Understandably, analyzing historical detection data of instruments using machine learning or deep learning network models to obtain predictive detection data can better manage equipment and production processes. Based on this, in this embodiment, before step S220, the method further includes:
[0106] Step S110: Obtain the second historical detection dataset of the experimental instrument when it is fault-free.
[0107] The second historical detection dataset includes multiple second historical detection datasets.
[0108] Step S120: Normalize each second historical detection data in the second historical detection dataset to obtain the first normalized dataset.
[0109] In this embodiment, step S120 includes:
[0110] For each second historical detection data point, the second historical detection data is normalized using a first formula to obtain the first normalized data corresponding to the second historical detection data, wherein the first formula is:
[0111]
[0112] Among them, X i This represents the first normalized data corresponding to the i-th second historical detection data in the second historical detection dataset, where i represents the i-th element in the second historical detection dataset, and x... i Let x represent the i-th second historical detection data in the second historical detection dataset. max x min These represent the maximum and minimum values in the second historical detection dataset, respectively.
[0113] The first normalized dataset includes the first normalized data corresponding to each of the second historical detection data. This embodiment normalizes the data in the second historical detection dataset to avoid inconsistencies in data dimensions that could affect subsequent fault diagnosis.
[0114] Step S130: Reconstruct the first normalized dataset to generate a first input matrix and a first output matrix.
[0115] In this embodiment, the first normalized dataset is reconstructed using a sliding window method, and the resulting first input matrix can be represented as:
[0116]
[0117] Where input represents the first input matrix, m represents the sliding window length, n represents the length of the first normalized dataset, and X i (1≤i≤n-1) represents the first normalized data corresponding to the i-th second historical detection data in the second historical detection dataset, where i represents the i-th element in the second historical detection dataset.
[0118] The generated first output matrix can be represented as:
[0119]
[0120] Where output represents the first output matrix, X i (m+1≤i≤n) represents the first normalized data corresponding to the i-th second historical detection data in the second historical detection dataset, where i represents the i-th element in the second historical detection dataset.
[0121] Step S140: Train the initial experimental instrument data prediction model using the first input matrix and the first output matrix to obtain the target experimental instrument data prediction model.
[0122] In this embodiment, the Gated Recurrent Unit (GRU) effectively solves the gradient vanishing problem when processing sequential data, possessing advantages such as high computational efficiency and memory capacity, low computational cost, and ease of implementation. Therefore, the initial experimental instrument data prediction model adopts a GRU to effectively extract effective information from the data and reduce the complexity of data processing, resulting in the target experimental instrument data prediction model. The GRU can predict the data for the next time step from multiple input data. Of course, it is understood that the initial experimental instrument data prediction model can also employ other neural networks that can handle temporal inputs well, such as Recurrent Neural Networks (RNNs). This embodiment does not limit the selection of the initial experimental instrument data prediction model.
[0123] Understandably, by using the reconstructed first input matrix and first output matrix for model training, a target experimental instrument data prediction model can be obtained to predict the experimental instrument's detection data in the next time step. After obtaining the trained target experimental instrument data prediction model, based on a determined sliding window length (i.e., the number or length of data points used to predict the next time step), the historical detection data of the experimental instrument is used as model input to obtain the predicted detection data of the experimental instrument in the next time step. That is, the target experimental instrument data prediction model can be used to obtain the first predicted detection data corresponding to each of the first historical detection data.
[0124] Of course, it is understandable that the construction and training of the initial experimental instrument data prediction model in this application to obtain the target experimental instrument data prediction model can be completed before obtaining the first historical detection dataset of the experimental instrument, so as to ensure that after obtaining the first historical detection dataset, the first predicted detection data corresponding to each first historical detection data in the first historical detection dataset can be quickly predicted.
[0125] In this embodiment, step S230 includes:
[0126] For each of the first historical detection data, the first sample data corresponding to the first historical detection data is determined based on the percentage error between the first historical detection data and its corresponding first predicted detection data.
[0127] In this embodiment, the percentage error between the first historical detection data and its corresponding first predicted detection data is determined by a second formula, wherein the second formula is:
[0128]
[0129] Among them, y i,error This represents the percentage error between the i-th first historical detection data in the first historical detection dataset and its corresponding first predicted detection data, where i represents the i-th element in the first historical detection dataset, and y represents the percentage error between the i-th first historical detection data and its corresponding first predicted detection data. i y represents the i-th first historical detection data in the first historical detection dataset. i,pred This represents the first predicted detection data corresponding to the i-th first historical detection data in the first historical detection dataset.
[0130] In this embodiment, for each first historical detection data, the first sample data corresponding to the first historical detection data is the percentage error between the first historical detection data and its corresponding first predicted detection data, and the first sample dataset includes the first sample data corresponding to each first historical detection data.
[0131] In this embodiment, step S200, generating a second sample dataset of control instruments corresponding to the experimental instruments, includes:
[0132] Step S240: Obtain the historical detection dataset of the reference instrument.
[0133] Step S250: Predict the predicted control detection data corresponding to each historical control detection data in the historical control detection dataset using the target control instrument data prediction model.
[0134] Step S260: Determine the second sample dataset based on each of the historical detection data of the control and its corresponding predicted detection data of the control. The second sample dataset includes multiple second sample datasets.
[0135] In this embodiment, before step S250, the method further includes:
[0136] Step S150: Obtain the third historical detection dataset of the reference instrument when it is fault-free.
[0137] Step S160: Normalize each third historical detection data in the third historical detection dataset to obtain a second normalized dataset.
[0138] Step S170: Reconstruct the second normalized dataset to generate a second input matrix and a second output matrix.
[0139] Step S180: Train the initial reference instrument data prediction model using the second input matrix and the second output matrix to obtain the target reference instrument data prediction model.
[0140] In this embodiment, the training structure of the initial control instrument data prediction model is the same as that of the initial experimental instrument data prediction model. The specific methods for generating the second sample dataset of the control instrument corresponding to the experimental instrument are the same as those for generating the first sample dataset of the experimental instrument, and will not be repeated here. This application constructs and trains the target experimental instrument data prediction model and the target control instrument data prediction model respectively, enabling prediction based on the corresponding models to obtain the corresponding sample data when corresponding historical detection data is acquired.
[0141] It should be understood that, in this embodiment, each of the first historical detection data, the second historical detection data, the control historical detection data, and the third historical detection data is stored in the corresponding dataset in chronological order according to the corresponding detection time (i.e., the time point / time period at which the first historical detection data was detected), and each data has a corresponding position in the corresponding dataset. Furthermore, the detection time of each of the first historical detection data is the same as the detection time of the control historical detection data at the corresponding position of the first historical detection data in the control historical detection dataset. Based on this, it can be seen that the detection time corresponding to each first sample data in the first sample dataset is the same as the detection time corresponding to the second sample data at the corresponding position of the first sample data in the second sample dataset.
[0142] Step S400: Determine the fault label based on the first sample dataset.
[0143] The fault label can be a fault-free label or a faulty label.
[0144] In this embodiment, step S400 includes:
[0145] Step S410: Determine at least one first fault diagnosis sequence based on the preset fault diagnosis length and the first sample dataset.
[0146] The first fault diagnosis sequence includes multiple first sample data from the first sample dataset.
[0147] In this embodiment, the preset fault diagnosis length can be set according to the actual situation, and the length of each first fault diagnosis sequence is selected as the preset fault diagnosis length. That is, in this embodiment, the preset fault diagnosis length is used to divide the first sample dataset to obtain the first fault diagnosis sequence.
[0148] Step S420: Determine the fault label corresponding to each of the first fault diagnosis sequences according to the preset fault discrimination length.
[0149] In this embodiment, step S420 includes:
[0150] For each of the first fault diagnosis sequences, determine the total number of first sample data that are fault data in the first fault diagnosis sequence. If the total number is greater than or equal to the preset fault discrimination length, set the fault label corresponding to the first fault diagnosis sequence as a faulty label. If the total number is less than the preset fault discrimination length, set the fault label corresponding to the first fault diagnosis sequence as a faultless label.
[0151] In this embodiment, the preset fault discrimination length can be set according to actual conditions. When the length of the first fault diagnosis sequence is selected as the preset fault diagnosis length, it means that in the first fault diagnosis sequence with a length of the preset fault diagnosis length, if the total number of first sample data that are fault data in the first fault diagnosis sequence is greater than or equal to the preset fault discrimination length, then the fault label corresponding to the first fault diagnosis sequence is a faulty label.
[0152] In addition, in this embodiment, for each of the first fault diagnosis sequences, whether each of the first sample data contained therein is fault data is determined based on the data performance when the instrument fails. This can be determined manually or automatically by a computer program. This embodiment does not limit this determination.
[0153] Step S600: Generate a fault diagnosis sample dataset based on the first sample dataset, the second sample dataset, and the fault label.
[0154] In this embodiment, step S600 includes:
[0155] Step S610: Determine at least one second fault diagnosis sequence based on the preset fault diagnosis length and the second sample dataset.
[0156] The second fault diagnosis sequence includes multiple second sample data in the second sample dataset, and the second fault diagnosis sequence corresponds one-to-one with the first fault diagnosis sequence.
[0157] It is understandable that, since the detection time corresponding to each first sample data in the first sample dataset is the same as the detection time corresponding to the second sample data at the corresponding position of the first sample data in the second sample dataset, each second fault diagnosis sequence determined based on the same preset fault diagnosis length has a corresponding first fault diagnosis sequence, and the second fault diagnosis sequence corresponds one-to-one with the first fault diagnosis sequence. In other words, the detection time corresponding to each second sample data in the second fault diagnosis sequence is the same as the detection time corresponding to the first sample data at the corresponding position of the second sample data in the first fault diagnosis sequence.
[0158] Step S620: For each of the first fault diagnosis sequences, generate fault diagnosis sample data based on the first fault diagnosis sequence and its corresponding second fault diagnosis sequence and fault label.
[0159] In this embodiment, for each of the first fault diagnosis sequences, the fault diagnosis sample data generated based on the first fault diagnosis sequence includes the first fault diagnosis sequence, its corresponding second fault diagnosis sequence, and a fault label. The fault diagnosis sample dataset includes each of the fault diagnosis sample data. In this embodiment, the fault diagnosis sample data can be represented as:
[0160]
[0161] Among them, D k This represents the k-th fault diagnosis sample data in the fault diagnosis sample dataset, where k represents the k-th element in the fault diagnosis sample dataset; The percentage error between the p-th first historical detection data in the first historical detection dataset and its corresponding first predicted detection data is represented, where p represents the p-th element in the first historical detection dataset, l1 represents the preset fault diagnosis length, and the superscript "1" represents the experimental instrument. This represents the percentage error between the q-th historical control data point in the historical control dataset and its corresponding predicted control data point, where q represents the q-th element in the historical control dataset, and the superscript "2" indicates the control instrument; flag k This represents the fault label corresponding to the first fault diagnosis sequence contained in the k-th fault diagnosis sample data in the fault diagnosis sample dataset. It can be seen that, in this embodiment, for fault diagnosis sample data D... k The first fault diagnosis sequence it contains can be represented as: The second fault diagnosis sequence can be represented as follows:
[0162] The fault diagnosis sample dataset can be represented as:
[0163]
[0164] in, Let n represent the fault diagnosis sample dataset, and n1 represent the length of the first historical detection dataset / the second historical detection dataset.
[0165] Step S800: Train the initial instrument fault diagnosis model using the fault diagnosis sample dataset to obtain the target instrument fault diagnosis model.
[0166] Understandably, after obtaining the fault diagnosis sample dataset, it is used as the model input to the pre-built initial instrument fault diagnosis model for model training, which enables the trained target instrument fault diagnosis model to perform instrument fault diagnosis better.
[0167] In this embodiment, during the training of the GRU model (i.e., the initial instrument fault diagnosis model), the cross-entropy loss function is selected as the loss function to optimize the model parameters so that the model can learn the correct classification decision on the training data.
[0168] It is worth mentioning that for various types of instruments in the same equipment system, when there is an instrument of the same type at the front end of the instrument in the process flow of the equipment system or when there is a redundant instrument of the same type in the equipment system, that is, when there is a corresponding reference instrument, the instrument fault diagnosis model construction method provided in this embodiment can be used to obtain a model that can diagnose whether the instrument is faulty.
[0169] The following example illustrates the instrument fault diagnosis model construction method provided in this embodiment.
[0170] In the safety interlock circuit of a certain coking process unit, there are 14 temperature instruments. The relevant information of each temperature instrument is shown in Table 1 below.
[0171] Table 1 - Relevant Information on Temperature Instruments
[0172] Instrument tag number Tag Number Explanation Instrument tag number Tag Number Explanation TI-11002A F101 convection chamber flue gas outlet temperature TI-11902B F102 convection chamber flue gas outlet temperature TI-11002B F101 convection chamber flue gas outlet temperature TI-11902C F102 convection chamber flue gas outlet temperature TI-11002C F101 convection chamber flue gas outlet temperature TI-11902D F102 convection chamber flue gas outlet temperature TI-11002D F101 convection chamber flue gas outlet temperature TI-11917 F102 preheater flue gas inlet temperature TI-11017 F101 preheater flue gas inlet temperature TI-11918 F102 preheater flue gas outlet temperature TI-11018 F101 preheater flue gas outlet temperature TI-15601A Pump P-123A temperature TI-11902A F102 convection chamber flue gas outlet temperature TI-15601B Pump P-123B temperature
[0173] This example uses a temperature instrument with tag number TI-11018 as the experimental instrument (hereinafter referred to as the measured temperature instrument, corresponding to...). Figure 3 For the instrument under test (as shown in the image), establish an instrument fault diagnosis model, including the following steps:
[0174] Step 1: Identify the reference instrument from the safety interlock circuit of the coking process unit.
[0175] Based on the tag number descriptions in Table 1 above, temperature instrument TI-11017, located relatively close to temperature instrument TI-11018 upstream of the process, is selected as the reference instrument. The two instruments are located at the inlet and outlet of preheater F101, respectively. Before the flue gas enters the preheating period, the reference instrument first measures the temperature. After the flue gas passes through the preheater, the instrument being measured measures the flue gas temperature. If process fluctuations cause fluctuations in the flue gas temperature, this will first be reflected in the measurement value of the reference instrument. Therefore, when the data from the instrument being measured fluctuates, it can be compared with the reference instrument to make a judgment.
[0176] Step 2: Obtain historical process data (i.e., historical test data) of the two instruments when there are no faults and perform preprocessing.
[0177] Historical process data of the two instruments when there are no faults, such as Figure 2 and Figure 3As shown. According to Figure 2 and Figure 3 It can be seen that there is a clear correlation between the two instruments, and their data changes and fluctuation trends are consistent. The historical process data of both instruments were normalized using a filter window size of l=5.
[0178] Step 3: Reconstruct the training dataset.
[0179] For the normalized historical process data of the measured temperature instrument, a time window length (corresponding to the sliding window length mentioned above) is set to m = 40. This means that 40 consecutive data points from the normalized historical process data of the measured temperature instrument are used as input, and the 41st data point is used as output, reconstructing the first input matrix and the first output matrix. For the normalized historical process data of the reference instrument, 40 consecutive data points from the normalized historical process data of the reference instrument are used as input, and the 41st data point is used as output, reconstructing the second input matrix and the second output matrix.
[0180] Step 4: Training the data prediction model.
[0181] A pre-constructed initial experimental instrument data prediction model GRU is trained using the reconstructed first input matrix and first output matrix to obtain the target experimental instrument data prediction model. A pre-constructed initial control instrument data prediction model GRU is trained using the reconstructed second input matrix and second output matrix to obtain the target control instrument data prediction model.
[0182] The initial experimental instrument data prediction model GRU and the initial control instrument data prediction model GRU have the same structure, with 40 input layer nodes, 1 output layer node, 100 hidden layer nodes, and a maximum training iteration count of 500. To ensure network training convergence, a variable learning rate method is used to gradually reduce the learning rate.
[0183] Step 5: Predict future data from both instruments.
[0184] The trained target experimental instrument data prediction model GRU and the target control instrument data prediction model GRU are used to predict the data of the measured temperature instrument and the control instrument, respectively. By continuously shifting the time window forward, the data for a certain period of time is predicted, resulting in the predicted values of the measured temperature instrument and the control instrument, as well as the historical process data of the measured temperature instrument (corresponding to...). Figure 4 Actual values and predicted values (as shown in the figure) Figure 4 and Figure 5 As shown.
[0185] Step 6, set fault labels.
[0186] Based on the historical process data and predicted values of the temperature instrument under test, the percentage error of each predicted value at each point is calculated to obtain the prediction error sequence of the temperature instrument under test; based on the historical process data and predicted values of the experimental instrument, the percentage error of each predicted value at each point is calculated to obtain the prediction error sequence of the experimental instrument.
[0187] Set the fault diagnosis length l1 = 10 and the fault discrimination length l2 = 5. Use a sliding window of length l1 to reassemble the prediction error sequences of the measured temperature instrument and the reference instrument to obtain the first fault diagnosis sequence of the measured temperature instrument and the second fault diagnosis sequence of the reference instrument. Then, determine the fault label corresponding to each first fault diagnosis sequence based on the fault discrimination length l2.
[0188] Step 7, Fault diagnosis model training.
[0189] The determined first fault diagnosis sequence, second fault diagnosis sequence, and fault label are used as training data for the supervised classification algorithm model SVM. After sufficient training, the model is used for fault diagnosis.
[0190] In the safety interlock circuit of the above coking process unit, there are a total of 19 pressure gauges. The relevant information of each pressure gauge is shown in Table 2 below.
[0191] Table 2 - Relevant Information on Pressure Instruments
[0192] Instrument tag number Tag Number Explanation Instrument tag number Tag Number Explanation PI-10603A F101 main burner fuel gas pressure PI-10704C F102 Long-lasting Lamp Fuel Gas Pressure PI-10603B F101 main burner fuel gas pressure PI-10704D F102 Long-lasting Lamp Fuel Gas Pressure PI-10603C F101 main burner fuel gas pressure PI-11703A F102 main burner fuel gas pressure PI-10603D F101 main burner fuel gas pressure PI-11703B F102 main burner fuel gas pressure PI-10604A F101 Long-lasting Lamp Fuel Gas Pressure PI-11703C F102 main burner fuel gas pressure PI-10604B F101 Long-lasting Lamp Fuel Gas Pressure PI-11703D F102 main burner fuel gas pressure PI-10604C F101 Long-lasting Lamp Fuel Gas Pressure PI-70105 D303 Top Pressure PI-10604D F101 Long-lasting Lamp Fuel Gas Pressure PI-70106 D304 Top Pressure PI-10704A F102 Long-lasting Lamp Fuel Gas Pressure PI-70107 Nitrogen pipe pressure PI-10704B F102 Long-lasting Lamp Fuel Gas Pressure —— ——
[0193] Among them, instruments with tag numbers PI-10603A, PI-10603B, PI-10603C, and PI-10603D are all redundant instruments. In this example, to perform fault diagnosis and classification on the pressure instrument with tag number PI-10603A (hereinafter referred to as the pressure instrument under test), instrument PI-10603B is selected as the reference instrument corresponding to the pressure instrument under test. Although both instruments detect the same process parameter—pressure—there will still be a certain detection error between their detection data. Directly using the fault diagnosis method of hardware redundancy instruments for fault judgment results in a high false negative rate. In this embodiment, the fault diagnosis model for the pressure instrument under test generated by the instrument fault diagnosis model construction method provided in this embodiment is used to diagnose the fault of the pressure instrument under test, and its false negative rate is less than 0.4%.
[0194] It is easy to see that the instrument fault diagnosis model construction method provided in this embodiment, without the need to add additional hardware equipment, first generates a first sample dataset of the experimental instrument and a second sample dataset of the control instrument. Then, based on the data performance when the instrument fails, the fault label is determined according to the first sample dataset. Next, a fault diagnosis sample dataset is generated according to the first sample dataset, the second sample dataset, and the fault label. Finally, the fault diagnosis sample dataset is used for model training. This allows the fault diagnosis result of the instrument to be diagnosed to be quickly obtained through the trained target instrument fault diagnosis model after obtaining the detection data of the instrument to be diagnosed and its corresponding control instrument. The diagnostic accuracy is high and the diagnostic cost is low.
[0195] Figure 1 This is a flowchart illustrating a method for constructing an instrument fault diagnosis model in one embodiment. It should be understood that, although... Figure 1 The steps in the flowchart are shown sequentially as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise explicitly stated herein, there is no strict order in which these steps are executed, and they can be performed in other orders. Figure 1 At least some of the steps in the process may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least some of the sub-steps or stages of other steps.
[0196] In view of the problem of low diagnostic accuracy in instrument fault diagnosis in related technologies, this application provides an instrument fault diagnosis method. The instrument fault diagnosis method provided in this application will be described in detail below with reference to the accompanying drawings and specific embodiments and implementation methods.
[0197] Example 2
[0198] Figure 6 The schematic diagram illustrates a flow chart of an instrument fault diagnosis method according to an embodiment of this application. For example... Figure 6 As shown in one embodiment of this application, an instrument fault diagnosis method is provided, including the following steps:
[0199] Step A200: Obtain the first initial detection dataset detected by the instrument to be diagnosed and the second initial detection dataset detected by the control instrument corresponding to the instrument to be diagnosed.
[0200] The instrument to be diagnosed can be the experimental instrument, or it can be an instrument belonging to the same category as the experimental instrument and located in the same equipment system, and the instrument is located downstream of the control instrument in the process flow of the equipment system.
[0201] In this embodiment, the first initial detection dataset includes multiple first initial detection data, and the second initial detection dataset includes multiple second initial detection data. Each first initial detection data and each second initial detection data is stored in its corresponding dataset in chronological order of its detection time, and each data point has a corresponding position within its dataset. Furthermore, the detection time corresponding to each first initial detection data point in the first initial detection dataset is the same as the detection time corresponding to the second initial detection data at the same position as the first initial detection data in the second initial detection dataset.
[0202] Step A400: Generate a first target detection dataset corresponding to the first initial detection dataset and a second target detection dataset corresponding to the second initial detection dataset.
[0203] In this embodiment, the specific methods for generating the first target detection dataset corresponding to the first initial detection dataset and the second target detection dataset corresponding to the second initial detection dataset are the same as those for generating the first sample dataset of the experimental instrument in Embodiment 1, and will not be repeated here. In this embodiment, the lengths of the generated first target detection dataset, the second target detection dataset, and the preset fault diagnosis length are equal.
[0204] Step A600: Input the first target detection dataset and the second target detection dataset into the target instrument fault diagnosis model obtained by the instrument fault diagnosis model construction method described in Embodiment 1 for prediction, and obtain the diagnosis result of the instrument to be diagnosed.
[0205] The diagnostic result is either faulty or not faulty.
[0206] It is understood that the training data for the target instrument fault diagnosis model is generated from instruments of the same category as the instrument to be diagnosed. In other words, the target instrument fault diagnosis model can be used to diagnose whether the instrument to be diagnosed is faulty.
[0207] Based on the example in Embodiment 1, this embodiment uses the trained instrument fault diagnosis model SVM for temperature instruments to perform instrument fault diagnosis. The schematic diagram of the result is shown below. Figure 7 As shown, the false negative rate of fault diagnosis using the instrument fault diagnosis method provided in this embodiment is 0.12%.
[0208] It is easy to see that the instrument fault diagnosis method provided in this embodiment can efficiently and accurately diagnose the fault of the instrument to be diagnosed by obtaining the first initial detection dataset of the instrument to be diagnosed and the second initial detection dataset of the reference instrument corresponding to the instrument to be diagnosed.
[0209] Instrument malfunctions can be categorized into several types, such as constant value malfunctions, drift malfunctions, and bias malfunctions, each with different manifestations and possible causes. A constant value malfunction manifests as a fixed, unchanging measured value after the malfunction occurs. A drift malfunction is characterized by a gradual increase in the measured deviation over time, while a bias malfunction is characterized by a fixed deviation between the measured value and the true value. After identifying an instrument malfunction using diagnostic methods, timely classification of the malfunction helps to quickly pinpoint the underlying cause, resolve potential problems more rapidly and accurately, and prevent the recurrence of the same malfunction.
[0210] Given that the detection of instrument faults in related technologies is still at the fault diagnosis level, without further classifying instrument faults to guide maintenance personnel to quickly identify and fundamentally solve the causes of instrument faults, it is not conducive to solving potential problems in the equipment system. Therefore, this application provides a method for constructing an instrument fault classification model. The following, in conjunction with the accompanying drawings, will provide a detailed description of the instrument fault classification model construction method provided in this application through specific embodiments and implementation methods.
[0211] Example 3
[0212] Figure 8 The schematic diagram illustrates a flowchart of the instrument fault classification model construction method according to an embodiment of this application. For example... Figure 8 As shown in one embodiment of this application, a method for constructing an instrument fault classification model is provided, including the following steps:
[0213] Step B200: Generate a fault classification sequence set.
[0214] In one specific embodiment, step B200 includes:
[0215] Step B210: Obtain the fault diagnosis sample dataset obtained by the instrument fault diagnosis model construction method described in Embodiment 1.
[0216] For each fault diagnosis sample data in the fault diagnosis sample dataset, the first fault diagnosis sequence included in the fault diagnosis sample data can be divided into two categories: fault diagnosis sequence and faultless diagnosis sequence. The fault diagnosis sequence indicates that the fault label corresponding to the first fault diagnosis sequence is a fault label, and the faultless diagnosis sequence indicates that the fault label corresponding to the first fault diagnosis sequence is a faultless label.
[0217] Understandably, since the fault diagnosis sample dataset used to train the initial instrument fault diagnosis model contains fault diagnosis sample data with fault labels, the fault classification sample dataset can be directly generated based on the fault diagnosis sample dataset to achieve instrument fault classification.
[0218] Step B220: Determine the fault classification sequence set based on the fault diagnosis sample dataset.
[0219] In this embodiment, step B220 includes:
[0220] Step B221: Determine the first fault diagnosis sequence based on the fault diagnosis sample dataset.
[0221] Wherein, the first fault diagnosis sequence is the fault diagnosis sequence in the fault diagnosis sample dataset, that is, the first fault diagnosis sequence in the fault diagnosis sample dataset with the corresponding fault label is the fault label.
[0222] Step B222: For each of the first fault diagnosis sequences, the value of the first element in the first fault diagnosis sequence is used as the initial value corresponding to the first fault diagnosis sequence. The initial value is subtracted from the values of all elements in the first fault diagnosis sequence to obtain the fault classification sequence corresponding to the first fault diagnosis sequence.
[0223] The fault classification sequence set includes fault classification sequences corresponding to each of the first fault diagnosis sequences.
[0224] Understandably, since the value of the first element in each of the first fault diagnosis sequences is 0 after subtracting its own value and does not carry any valid information, the length of the fault classification sequence corresponding to each of the first fault diagnosis sequences can be equal to the length of the first fault diagnosis sequence, i.e., the preset fault diagnosis length, or it can be the value obtained by subtracting 1 from the preset fault diagnosis length. In other words, the elements in the fault classification sequence corresponding to each of the first fault diagnosis sequences do not contain the element corresponding to the first element in the first fault diagnosis sequence, so as to improve the quality and availability of the data.
[0225] In this embodiment, for each of the first fault diagnosis sequences, by subtracting the value of the first element in the first fault diagnosis sequence from the value of each element in the first fault diagnosis sequence, only the deviation between the values of each element in the first fault diagnosis sequence is retained. This can eliminate the influence caused by the difference in the instrument data itself, thereby facilitating subsequent data analysis to determine the correct fault type label.
[0226] In another specific embodiment, step B200 includes:
[0227] Step B230: Generate the third sample dataset of faulty instruments.
[0228] Understandably, during the operation of the equipment system, historical detection data detected by each instrument is typically recorded. These data records help to understand the equipment's performance, trends, etc. Therefore, in addition to determining the fault classification sequence based on the fault diagnosis sample dataset used to train the initial instrument fault diagnosis model, sample data for fault classification can also be obtained through the recorded historical detection data of the faulty instruments.
[0229] In this embodiment, step B230 includes:
[0230] Step B231: Obtain the fourth historical detection dataset of the faulty instrument.
[0231] Step B232: Predict the third predicted detection data corresponding to each fourth historical detection data in the fourth historical detection dataset using the target fault instrument data prediction model.
[0232] Step B233: Determine the third sample dataset based on each of the fourth historical detection data and its corresponding third predicted detection data.
[0233] In this embodiment, before step B232, the method further includes:
[0234] Step B110: Obtain the fifth historical detection dataset of the faulty instrument when it is fault-free.
[0235] Step B120: Normalize each fifth historical detection data in the fifth historical detection dataset to obtain a third normalized dataset.
[0236] Step B130: Reconstruct the third normalized dataset to generate a third input matrix and a third output matrix.
[0237] Step B140: Train the initial fault instrument data prediction model using the third input matrix and the third output matrix to obtain the target fault instrument data prediction model.
[0238] In this embodiment, the fourth historical detection dataset includes multiple fourth historical detection data, and the fifth historical detection dataset includes multiple fifth historical detection data. Each of the fourth historical detection data and the fifth historical detection data is stored in the corresponding dataset in chronological order of the corresponding detection time. The specific method for generating the third sample dataset of the faulty instrument is the same as that for generating the first sample dataset of the experimental instrument in Embodiment 1, and will not be repeated here.
[0239] Step B240: Determine the fault classification sequence set based on the third sample dataset.
[0240] In this embodiment, step B240 includes:
[0241] Step B241: Determine at least one second fault diagnosis sequence based on the preset fault diagnosis length and the third sample dataset.
[0242] The second fault diagnosis sequence includes multiple third sample data in the third sample dataset. In this embodiment, the third sample dataset is divided using the preset fault diagnosis length to obtain the second fault diagnosis sequence.
[0243] Step B242: For each of the second fault diagnosis sequences, the value of the first element in the second fault diagnosis sequence is used as the initial value corresponding to the second fault diagnosis sequence. The initial value is subtracted from the values of all elements in the second fault diagnosis sequence to obtain the fault classification sequence corresponding to the second fault diagnosis sequence.
[0244] The fault classification sequence set includes fault classification sequences corresponding to each of the second fault diagnosis sequences.
[0245] Of course, it is understandable that in order to obtain a target instrument fault classification model with high classification accuracy, the fault classification sequence set may include both the fault classification sequence determined based on the fault diagnosis sample dataset and the fault classification sequence determined based on the third sample dataset. The selection of the fault classification sequence can be set according to the actual situation / requirements.
[0246] Step B400: Determine the fault type label corresponding to each fault classification sequence in the fault classification sequence set.
[0247] In this embodiment, for each fault classification sequence, the corresponding fault type label can be set manually or automatically by a computer program. This embodiment does not limit it.
[0248] Step B600: Generate a fault classification sample dataset based on each fault classification sequence and its corresponding fault type label.
[0249] In this embodiment, the fault classification sample dataset includes multiple fault classification sample data, each of which includes the fault classification sequence and its corresponding fault type label. The fault classification sample data can be represented as follows:
[0250]
[0251] Among them, W k Y represents the k-th fault classification sample data in the fault classification sample dataset, where k represents the k-th element in the fault classification sample dataset; u,error (i≤u≤i+l1) represents the u-th element in the dataset consisting of all the aforementioned fault classification sequences, T k This represents the fault type label corresponding to the k-th fault classification sequence in the fault classification sample dataset. The dataset is obtained by sequentially arranging the elements of all the fault classification sequences. It can be seen that in this embodiment, for the fault classification sample data W... k The fault classification sequence it contains can be represented as:
[0252] The fault classification sample dataset can be represented as:
[0253]
[0254] in, Let l1 represent the fault classification sample dataset, l1 represent the preset fault diagnosis length, m1 represent the total length of each fault classification sequence (i.e., the length of the dataset consisting of all fault classification sequences), and Y represent the fault classification sample dataset. x,error (1≤x≤m1) represents the x-th element in the dataset consisting of all the fault classification sequences.
[0255] Step B800: Train the initial instrument fault classification model using the fault classification sample dataset to obtain the target instrument fault classification model.
[0256] Understandably, after obtaining the fault classification sample dataset, it is used as the model input to the pre-built initial instrument fault classification model for model training, which enables the trained target instrument fault classification model to perform instrument fault classification well.
[0257] In this embodiment, Support Vector Machines (SVMs) are used in the initial instrument fault classification model because they have advantages such as good generalization ability, ability to handle nonlinear problems, good performance on small sample datasets, and avoidance of getting trapped in local optima. This effectively identifies data biases caused by process fluctuations and other reasons, thereby avoiding affecting the accuracy of fault classification. By using SVM for supervised learning prediction, the trained target instrument fault classification model can effectively classify instrument faults without the need for manually setting relevant thresholds, reducing the amount of data processing while ensuring the reasonableness of the fault classification results. Of course, it is understood that the initial instrument fault classification model can also use other classification algorithms, such as the k-Nearest Neighbor (KNN) classification algorithm. This embodiment does not limit the choice of the initial instrument fault classification model.
[0258] The following example illustrates the instrument fault classification model construction method provided in this embodiment, based on the example in Embodiment 1.
[0259] When the instrument fault diagnosis model in Example 1 determines that the measured temperature instrument is faulty based on the detection data of the measured temperature instrument, it can classify the fault type of the measured temperature instrument by the target instrument fault classification model KNN based on the detection data of the measured temperature instrument.
[0260] It is easy to see that the instrument fault classification model construction method provided in this embodiment can classify faults based on relevant fault data after the instrument fault is determined, thereby guiding maintenance personnel to quickly identify and fundamentally solve the causes of instrument faults, and solve potential hidden dangers more quickly and accurately, so as to avoid the continuous occurrence of instrument faults and ensure the safe and stable operation of the equipment system.
[0261] Given that the detection of instrument faults in related technologies is still at the fault diagnosis level, without further classification of instrument faults to guide maintenance personnel to quickly identify and fundamentally solve the causes of instrument faults, which is not conducive to solving potential problems in the equipment system, this application provides an instrument fault classification method. The instrument fault classification method provided by this application will be described in detail below with reference to the accompanying drawings and specific embodiments and implementation methods.
[0262] Example 4
[0263] Figure 9 A schematic flowchart illustrating an embodiment of the instrument fault classification method of this application is shown. Figure 9 As shown in one embodiment of this application, an instrument fault classification method is provided, including the following steps:
[0264] Step C200: Obtain the initial fault dataset detected by the faulty instrument.
[0265] The initial fault dataset includes multiple initial fault data sets, and each initial fault data set is stored in the initial fault dataset in chronological order according to its corresponding detection time.
[0266] Step C400: Generate the target fault dataset corresponding to the initial fault dataset.
[0267] In this embodiment, the target fault dataset includes target fault data corresponding to each of the initial fault data. The specific method for determining the target fault data corresponding to each of the initial fault data is the same as that for determining the first sample data corresponding to each of the first historical detection data in Embodiment 1, and will not be repeated here.
[0268] Step C600: Input the target fault dataset into the target instrument fault classification model obtained by the instrument fault classification model construction method described in Example 3 for prediction, and obtain the fault type of the faulty instrument.
[0269] It is easy to see that the instrument fault classification method provided in this embodiment, after obtaining the initial fault dataset of the faulty instrument, first determines its corresponding target fault dataset, and then uses the trained target instrument fault classification model to classify the fault of the faulty instrument, thereby obtaining the fault type of the faulty instrument. This can guide relevant personnel to discover and eliminate hidden dangers in the equipment system, and ensure the safe and stable operation of the equipment system.
[0270] The following example illustrates the instrument fault classification model construction method provided in this embodiment, based on the example in Embodiment 1.
[0271] For the temperature instrument being measured in the example, when the instrument fault diagnosis model corresponding to the temperature instrument in Example 1 determines that the temperature instrument is faulty based on its detection data, the detection data of the temperature instrument is first used as the initial fault dataset to generate the corresponding target fault dataset. Then, the target fault dataset is input into the target instrument fault classification model KNN corresponding to the temperature instrument for fault classification. In this example, the classification accuracy of the target instrument fault classification model KNN for the above three common faults (i.e., constant value fault, bias fault, and drift fault) can reach 100%, and the classification results are as follows: Figure 10 As shown.
[0272] Similarly, for the pressure gauge under test in the example, when the instrument fault diagnosis model corresponding to the pressure gauge in Embodiment 1 determines that the pressure gauge is faulty based on the detection data of the pressure gauge under test, the detection data of the pressure gauge under test is first used as the initial fault dataset to generate the corresponding target fault dataset. Then, the target fault dataset is input into the target instrument fault classification model KNN corresponding to the pressure gauge for fault classification. In this embodiment, the classification accuracy of the target instrument fault classification model KNN for the above three common faults (i.e., constant value fault, bias fault, and drift fault) can reach 99.8%.
[0273] Example 5
[0274] Figure 11 The diagram schematically illustrates the structural block diagram of an instrument fault diagnosis model construction device according to an embodiment of this application. Figure 11 As shown, in one embodiment of this application, an instrument fault diagnosis model construction device is provided, including a sample data determination module, a fault label determination module, and a fault diagnosis sample determination module, wherein:
[0275] The sample data determination module generates a first sample dataset of experimental instruments and a second sample dataset of control instruments corresponding to the experimental instruments.
[0276] The fault label determination module determines the fault label based on the first sample dataset.
[0277] The fault diagnosis sample determination module generates a fault diagnosis sample dataset based on the first sample dataset, the second sample dataset, and the fault label.
[0278] The fault diagnosis model generation module trains the initial instrument fault diagnosis model using the fault diagnosis sample dataset to obtain the target instrument fault diagnosis model.
[0279] In this embodiment, the sample data determination module includes:
[0280] The first historical detection data acquisition submodule is used to acquire the first historical detection dataset of the experimental instrument.
[0281] The first predicted detection data determination submodule is used to predict the first predicted detection data corresponding to each first historical detection data in the first historical detection dataset through the target experimental instrument data prediction model.
[0282] The first sample dataset determination submodule is used to determine the first sample dataset based on each of the first historical detection data and its corresponding first predicted detection data.
[0283] In this embodiment, the device further includes an experimental instrument data prediction model determination module, which includes:
[0284] The second historical detection data acquisition submodule is used to acquire the second historical detection dataset of the experimental instrument when it is fault-free.
[0285] The first normalized dataset determination submodule is used to normalize each second historical detection data in the second historical detection dataset to obtain the first normalized dataset.
[0286] The first data reconstruction submodule is used to reconstruct the first normalized dataset to generate a first input matrix and a first output matrix.
[0287] The prediction model generation submodule is used to train the initial experimental instrument data prediction model using the first input matrix and the first output matrix to obtain the target experimental instrument data prediction model.
[0288] In this embodiment, the first sample dataset determination submodule includes:
[0289] The first sample data determination unit is used to determine the first sample data corresponding to each first historical detection data based on the percentage error between the first historical detection data and its corresponding first predicted detection data.
[0290] In this embodiment, the fault label determination module includes:
[0291] The first fault diagnosis sequence determination submodule is used to determine at least one first fault diagnosis sequence based on a preset fault diagnosis length and the first sample dataset.
[0292] The fault label determination submodule is used to determine the fault label corresponding to each of the first fault diagnosis sequences based on a preset fault discrimination length.
[0293] In this embodiment, the fault diagnosis sample determination module includes:
[0294] The second fault diagnosis sequence determination submodule is used to determine at least one second fault diagnosis sequence based on the preset fault diagnosis length and the second sample dataset; wherein the second fault diagnosis sequence corresponds one-to-one with the first fault diagnosis sequence.
[0295] The fault diagnosis sample data determination submodule is used to generate fault diagnosis sample data for each of the first fault diagnosis sequences, based on the first fault diagnosis sequence and its corresponding second fault diagnosis sequence and fault label.
[0296] In this embodiment, the instrument fault diagnosis model construction device includes a processor and a memory. The sample data determination module, the fault label determination module, the fault diagnosis sample determination module, and the fault diagnosis model generation module are all stored as program units in the memory, and the processor executes the above-mentioned program modules stored in the memory to implement the corresponding functions.
[0297] The processor contains a kernel, which retrieves the corresponding program units from memory. One or more kernels can be configured, and the aforementioned instrument fault diagnosis model construction method can be implemented by adjusting kernel parameters.
[0298] The memory may include non-permanent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.
[0299] In one embodiment of this application, a processor is provided, configured to execute the above-described instrument fault diagnosis model construction method.
[0300] In one embodiment of this application, a machine-readable storage medium is provided, on which instructions are stored, which, when executed by a processor, cause the processor to be configured to perform the above-described instrument fault diagnosis model construction method.
[0301] Figure 12 The diagram schematically illustrates the internal structure of a computer device according to an embodiment of this application. Figure 12 As shown, in one embodiment of this application, a computer device is provided, which can be a terminal. The computer device includes a processor A01, a network interface A02, a display screen A04, an input device A05, and a memory (not shown) connected via a system bus. The processor A01 provides computing and control capabilities. The memory includes internal memory A03 and a non-volatile storage medium A06. The non-volatile storage medium A06 stores an operating system B01 and a computer program B02. The internal memory A03 provides an environment for the operation of the operating system B01 and the computer program B02 stored in the non-volatile storage medium A06. The network interface A02 is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor A01, it implements a method for constructing an instrument fault diagnosis model. The display screen A04 can be a liquid crystal display (LCD) or an e-ink display. The input device A05 can be a touch layer covering the display screen, or buttons, a trackball, or a touchpad mounted on the computer device casing, or an external keyboard, touchpad, or mouse.
[0302] Those skilled in the art will understand that Figure 12 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0303] In one embodiment, the instrument fault diagnosis model construction device provided in this application can be implemented as a computer program, which can be implemented in the form of, for example, Figure 12 The computer device shown runs on this device. The computer device's memory can store the various program modules that make up the instrument fault diagnosis model construction device, for example, Figure 11 The sample data determination module, the fault label determination module, the fault diagnosis sample determination module, and the fault diagnosis model generation module are shown. The computer program, comprising these modules, causes the processor to execute the steps in the instrument fault diagnosis model construction method of the various embodiments of this application described in this specification.
[0304] Figure 12 The computer equipment shown can be used as follows Figure 11 The sample data determination module in the instrument fault diagnosis model construction device shown executes step S200, the fault tag determination module executes step S400, the fault diagnosis sample determination module executes step S600, and the fault diagnosis model generation module executes step S800.
[0305] This application provides a device, which includes a processor, a memory, and a program stored in the memory and executable on the processor. When the processor executes the program, it performs the following steps:
[0306] Generate a first sample dataset of experimental instruments and a second sample dataset of control instruments corresponding to the experimental instruments.
[0307] Based on the first sample dataset, determine the fault label.
[0308] A fault diagnosis sample dataset is generated based on the first sample dataset, the second sample dataset, and the fault label.
[0309] The initial instrument fault diagnosis model is trained using the fault diagnosis sample dataset to obtain the target instrument fault diagnosis model.
[0310] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0311] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0312] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0313] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0314] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0315] Memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0316] Computer-readable media include both permanent and non-permanent, removable and non-removable media, which can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0317] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0318] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.
Claims
1. A method for constructing an instrument fault diagnosis model, characterized in that, include: Generate a first sample dataset of experimental instruments and a second sample dataset of control instruments corresponding to the experimental instruments; Based on the first sample dataset, determine the fault label; Based on the first sample dataset, the second sample dataset, and the fault labels, a fault diagnosis sample dataset is generated; The initial instrument fault diagnosis model is trained using the fault diagnosis sample dataset to obtain the target instrument fault diagnosis model.
2. The method according to claim 1, characterized in that, The first sample dataset for generating the experimental instruments includes: Obtain the first historical detection dataset of the experimental instrument; The target experimental instrument data prediction model is used to predict the first predicted detection data corresponding to each first historical detection data in the first historical detection dataset. The first sample dataset is determined based on each of the first historical detection data and its corresponding first predicted detection data.
3. The method according to claim 2, characterized in that, Before predicting the first predicted detection data corresponding to each first historical detection data in the first historical detection dataset using the target experimental instrument data prediction model, the method further includes: Obtain the second historical detection dataset of the experimental instrument when it is fault-free; Normalize each second historical detection data in the second historical detection dataset to obtain the first normalized dataset; The first normalized dataset is reconstructed to generate a first input matrix and a first output matrix; The initial experimental instrument data prediction model is trained using the first input matrix and the first output matrix to obtain the target experimental instrument data prediction model.
4. The method according to claim 2, characterized in that, The step of determining the first sample dataset based on each of the first historical detection data and its corresponding first predicted detection data includes: For each of the first historical detection data, the first sample data corresponding to the first historical detection data is determined based on the percentage error between the first historical detection data and its corresponding first predicted detection data. The first sample dataset includes the first sample data corresponding to each of the first historical detection data.
5. The method according to claim 1, characterized in that, The fault label can be a fault-free label or a faulty label; The step of determining the fault label based on the first sample dataset includes: Based on the preset fault diagnosis length and the first sample dataset, at least one first fault diagnosis sequence is determined; Based on the preset fault discrimination length, determine the fault label corresponding to each of the first fault diagnosis sequences.
6. The method according to claim 5, characterized in that, The step of generating a fault diagnosis sample dataset based on the first sample dataset, the second sample dataset, and the fault label includes: Based on the preset fault diagnosis length and the second sample dataset, at least one second fault diagnosis sequence is determined; wherein, the second fault diagnosis sequence corresponds one-to-one with the first fault diagnosis sequence; For each of the first fault diagnosis sequences, fault diagnosis sample data is generated based on the first fault diagnosis sequence and its corresponding second fault diagnosis sequence and fault label. The fault diagnosis sample dataset includes each of the fault diagnosis sample data.
7. A method for diagnosing instrument faults, characterized in that, include: Obtain a first initial detection dataset detected by the instrument to be diagnosed and a second initial detection dataset detected by a control instrument corresponding to the instrument to be diagnosed; Generate a first target detection dataset corresponding to the first initial detection dataset and a second target detection dataset corresponding to the second initial detection dataset; The first target detection dataset and the second target detection dataset are input into the target instrument fault diagnosis model obtained by the instrument fault diagnosis model construction method according to any one of claims 1 to 6 for prediction, so as to obtain the diagnosis result of the instrument to be diagnosed; wherein the diagnosis result is faulty or not faulty.
8. A method for constructing an instrument fault classification model, characterized in that, include: Obtain the fault diagnosis sample dataset obtained by the instrument fault diagnosis model construction method according to any one of claims 1 to 6, and determine the fault classification sequence set based on the fault diagnosis sample dataset; and / or, Generate a third sample dataset of faulty instruments, and determine a fault classification sequence set based on the third sample dataset; Determine the fault type label corresponding to each fault classification sequence in the fault classification sequence set; Based on each of the aforementioned fault classification sequences and their corresponding fault type labels, a fault classification sample dataset is generated; The initial instrument fault classification model is trained using the fault classification sample dataset to obtain the target instrument fault classification model.
9. The method according to claim 8, characterized in that, The third sample dataset for generating faulty instruments includes: Obtain the fourth historical detection dataset of the faulty instrument; The third predicted detection data corresponding to each fourth historical detection data in the fourth historical detection dataset is predicted by the target fault instrument data prediction model. The third sample dataset is determined based on each of the fourth historical detection data and its corresponding third predicted detection data.
10. The method according to claim 9, characterized in that, Before predicting the third predicted detection data corresponding to each fourth historical detection data in the fourth historical detection dataset using the target fault instrument data prediction model, the method further includes: Obtain the fifth historical detection dataset of the faulty instrument when it is fault-free; Normalize each fifth historical detection data in the fifth historical detection dataset to obtain the third normalized dataset; The third normalized dataset is reconstructed to generate a third input matrix and a third output matrix; The initial fault instrument data prediction model is trained using the third input matrix and the third output matrix to obtain the target fault instrument data prediction model.
11. The method according to claim 8, characterized in that, The step of determining the fault classification sequence set based on the third sample dataset includes: Based on the preset fault diagnosis length and the third sample dataset, at least one second fault diagnosis sequence is determined; wherein, the second fault diagnosis sequence includes multiple third sample data in the third sample dataset; For each of the second fault diagnosis sequences, the value of the first element in the second fault diagnosis sequence is used as the initial value corresponding to the second fault diagnosis sequence. The initial value is then subtracted from the values of all elements in the second fault diagnosis sequence to obtain the fault classification sequence corresponding to the second fault diagnosis sequence.
12. A method for classifying instrument faults, characterized in that, include: Obtain the initial fault dataset detected by the faulty instrument; Generate the target fault dataset corresponding to the initial fault dataset; The target fault dataset is input into the target instrument fault classification model obtained by the instrument fault classification model construction method according to any one of claims 8 to 11 for prediction, so as to obtain the fault type of the faulty instrument.
13. An instrument fault diagnosis model construction device, characterized in that, include: The sample data determination module generates a first sample dataset of experimental instruments and a second sample dataset of control instruments corresponding to the experimental instruments. The fault label determination module determines the fault label based on the first sample dataset; The fault diagnosis sample determination module generates a fault diagnosis sample dataset based on the first sample dataset, the second sample dataset, and the fault label. The fault diagnosis model generation module trains the initial instrument fault diagnosis model using the fault diagnosis sample dataset to obtain the target instrument fault diagnosis model.
14. A processor, characterized in that, It is configured to perform the instrument fault diagnosis model construction method according to any one of claims 1 to 6.
15. A machine-readable storage medium storing instructions thereon, characterized in that, When executed by a processor, this instruction causes the processor to be configured to perform the instrument fault diagnosis model construction method according to any one of claims 1 to 6.