Valve fault diagnosis method and system based on machine learning model and mechanism model

Through the combination of ARX model and machine learning and mechanism model, accurate and real-time diagnosis of valve failures is achieved, and the problems of sensitive operating conditions and high false alarm rates in the existing technology are solved, and the accuracy and universality of valve failure detection are improved.

CN120257005APending Publication Date: 2025-07-04SUPCON TECH CO LTD
View PDF 0 Cites 4 Cited by

Patent Information

Application Number
CN202510323750.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-19
Publication Date
2025-07-04

AI Technical Summary

Technical Problem

In the prior art, valve fault diagnosis methods cannot effectively identify early, slight blockage and leakage faults, and the diagnostic model is sensitive to changes in working conditions, resulting in frequent false positives, and relying on a large amount of label data, resulting in limited application scenarios.

Method used

The ARX model is used for working condition classification and marking, combining machine learning model and mechanism model, and the deviation value is calculated through flow prediction and flow characteristic analysis to achieve accurate diagnosis of valve failure.

Benefits of technology

It improves the accuracy and real-time nature of valve fault detection, adapts to changes in different working conditions, reduces the false alarm rate, and reduces the dependence on label data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120257005A_ABST
    Figure CN120257005A_ABST
Patent Text Reader

Abstract

The invention relates to a valve fault diagnosis method and system based on a machine learning model and a mechanism model. The method comprises the steps that working condition classification marking is conducted on operation data of a valve through an ARX model; when the operation data under the same working condition is single-loop operation data, flow prediction is carried out in a machine learning model, deviation calculation is carried out on a generated flow prediction value and an actual flow value, and a flow deviation value under the current working condition is obtained; when the operation data under the same working condition is multi-loop operation data, analyzing the flow characteristics of the operation data by using the mechanism model, and performing deviation calculation on the obtained flow characteristic value and the flow characteristic reference value to obtain a flow characteristic deviation value under the current working condition; all the flow deviation values or the flow characteristic deviation values are traversed to be compared with a deviation value threshold value, and the fault type of the valve is determined according to a comparison result. According to the method, the accuracy, the real-time performance and the universality of valve fault detection in the process industry are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of valve fault diagnosis, and particularly to a valve fault diagnosis method and system based on a machine learning model and a mechanism model. Background Art

[0002] A valve is a device used to control fluid flow and regulate parameters such as pressure and flow rate, and is widely used in industrial production and process control. Due to the long-term operation of valves being affected by various factors, such as harsh working environments, improper operations, and component aging, the probability of valve equipment failure is relatively high, bringing certain losses and risks to enterprise production. Therefore, how to effectively perform predictive maintenance on valves, discover potential problems in advance, and reduce the adverse effects brought by equipment failures has become one of the urgent problems to be solved in current industrial production.

[0003] Currently, valve fault diagnosis mainly relies on regular manual inspections and simple condition monitoring means. Among them, manual inspections require the equipment to be shut down, which is time-consuming and laborious, and it is difficult to discover potential faults in a timely manner; simple condition monitoring means, such as monitoring pressure, temperature, and flow rate, although they can reflect the operating state of the valve to a certain extent, cannot accurately locate and identify specific fault types, especially for early and minor blockage and leakage faults, it is even more difficult to effectively detect.

[0004] In the prior art, there are also methods of collecting real-time operating parameters such as vibration, sound wave, pressure, temperature, and flow rate of valves, and combining advanced data processing and analysis algorithms to build a diagnostic model to achieve real-time monitoring and fault diagnosis of the operating state of valves. However, there are corresponding technical defects in such solutions:

[0005] (1) The diagnostic model does not consider the influence of actual operating conditions changes on data, resulting in possible false alarm phenomena due to changes in operating conditions in actual use.

[0006] (2) Excessive reliance on a large amount of labeled fault data in the real production environment to train the diagnostic model, but these data are extremely difficult to collect in the industrial field, and when there are significant changes in the production environment or valve type, the diagnostic model needs to be retrained, resulting in limited application scenarios of the model. Summary of the Invention

[0007] (1) Technical Problems to be Solved

[0008] In view of the above-mentioned shortcomings and deficiencies of the prior art, the present invention provides a valve fault diagnosis method and system based on a machine learning model and a mechanism model, aiming to improve the accuracy, real-time performance, and universality of valve fault detection in process industries.

[0009] (2) Technical Solutions

[0010] To achieve the above object, the main technical solutions adopted by the present invention include:

[0011] In a first aspect, an embodiment of the present invention provides a valve fault diagnosis method based on a machine learning model and a mechanism model, including:

[0012] Obtain the operation data of the valve sampled at equal intervals, perform ARX model identification on the valve operation loop data in the operation data, and classify and mark the operation data according to the identification result;

[0013] When the operation data under the same working condition is single-loop operation data, input the obtained valve opening data into a preset machine learning model for flow prediction, calculate the deviation between the generated flow prediction value and the actual flow value of the valve, and obtain the flow deviation value under the current working condition;

[0014] When the operation data under the same working condition is multi-loop operation data, use a preset mechanism model to analyze the flow characteristics of the operation data, calculate the deviation between the obtained flow characteristic value and the set flow characteristic reference value, and obtain the flow characteristic deviation value under the current working condition;

[0015] Traverse the flow deviation values or flow characteristic deviation values under all working conditions and compare them with the set deviation threshold, and obtain the valve fault diagnosis results under all working conditions according to the comparison results.

[0016] Optionally, obtaining the operation data of the valve sampled at equal intervals, performing ARX model identification on the valve operation loop data in the operation data, and classifying and marking the operation data according to the identification result includes:

[0017] Obtain the operation data of the valve sampled at equal intervals within a specified time period, where the operation data includes a time stamp, valve position data, valve operation loop data, and valve process variables;

[0018] Perform ARX model identification on the loop flow set value and loop flow measurement value in the valve operation loop data to obtain the identified flow value to which the current operation data belongs;

[0019] Within the data range of a section of operation data, calculate the relative deviation between the identified flow value of another section of operation data and the loop flow measurement value, and determine whether the obtained relative deviation value is less than the set relative deviation threshold;

[0020] If the obtained relative deviation value is less than the set relative deviation threshold, mark the working conditions to which the two sections of operation data belong as the same type.

[0021] Optionally, after obtaining the operation data of the valve with equally spaced sampling, performing ARX model identification on the valve operation loop data in the operation data, and classifying and marking the operation data according to the identification results, the following steps are further included:

[0022] Obtain the variable types in the valve process variables, where the valve process variables include flow data, pressure data, medium temperature data, and medium type information;

[0023] Judge the number of valve process variables in the operation data under the same working condition;

[0024] When the valve process variables in the operation data under the same working condition are only flow data, it is determined that the operation data under the current working condition is single-loop operation data;

[0025] When the valve process variables in the operation data under the same working condition include flow data, pressure data, and transmission medium information, it is determined that the operation data under the current working condition is multi-loop operation data.

[0026] Optionally, when the operation data under the same working condition is single-loop operation data, input the obtained valve opening data into a preset machine learning model for flow prediction, calculate the deviation between the generated flow prediction value and the actual flow value of the valve, and obtain the flow deviation value under the current working condition, including:

[0027] When the operation data under the same working condition is single-loop operation data, extract the valve opening data and valve operation loop data to which each operation data belongs from all the operation data under the current working condition;

[0028] Perform data preprocessing on the valve operation loop data, and normalize the flow measurement values in the preprocessed valve operation loop data to obtain the actual flow value corresponding to each operation data;

[0029] Input all the valve opening data into the trained machine learning model for flow prediction to obtain the flow prediction value corresponding to each operation data;

[0030] Traverse all the flow prediction values and actual flow values for deviation calculation, and perform mean processing on the obtained flow deviation values to obtain the mean flow deviation under the current working condition.

[0031] Optionally, performing data preprocessing on the valve operation loop data, and normalizing the flow measurement values in the preprocessed valve operation loop data to obtain the actual flow value corresponding to each operation data includes:

[0032] Perform preprocessing on the valve operation loop data in each operation data, including noise reduction, removing disturbance segments, and removing abnormal data points, to obtain the preprocessed valve operation loop data;

[0033] According to the obtained flow control range of the valve, normalize the flow measurement values in each pre-processed valve operation loop data to obtain the actual flow value corresponding to each operation data;

[0034] Among them, the abnormal data points are the flow measurement data points or control variable data points that exceed 3 standard deviations from the average value in the valve operation loop data.

[0035] Optionally, before inputting all valve opening data into the trained machine learning model for flow prediction to obtain the flow prediction value corresponding to each operation data, it further includes:

[0036] Obtain the historical operation data of the valve, and extract the valve opening data and flow measurement values from the historical operation data;

[0037] Taking the parameter vector of the machine learning model as the ridge regression target, construct the loss function of the parameter vector;

[0038] Using the valve opening data and flow measurement values as training data, solve the minimization of the loss function to obtain the optimal parameter vector, and construct the machine learning model based on the optimal parameter vector.

[0039] Optionally, when the operation data under the same working condition is multi-loop operation data, use a preset mechanism model to analyze the flow characteristics of the operation data, calculate the deviation between the obtained flow characteristic value and the set flow characteristic reference value, and obtain the flow characteristic deviation value under the current working condition, including

[0040] When the operation data under the same working condition is multi-loop operation data, extract the valve process variable data from the operation data;

[0041] After denoising the pressure data in the valve process variable data, obtain the medium type information in the valve process variable data;

[0042] According to the medium type information, input the denoised valve process variable data into the corresponding mechanism model for flow characteristic analysis to obtain the flow characteristic value corresponding to each operation data;

[0043] Traverse all the flow characteristic values to calculate the deviation from the set flow characteristic reference value, and perform mean processing on the obtained flow characteristic deviation values to obtain the average flow characteristic deviation under the current working condition.

[0044] Optionally, when the medium is gas, the selected mechanism model is:

[0045]

[0046] Wherein, Cv’ represents the flow characteristic value corresponding to the valve opening when the medium is gas, Cv0’ represents the reference flow characteristic value corresponding to the valve opening when the medium is gas, Q represents the valve flow rate, P1 and P2 represent the pressure data before and after the valve, and T represents the temperature data of the medium;

[0047] When the medium is liquid, the selected mechanism model is:

[0048]

[0049] Wherein, Cv” represents the flow characteristic value corresponding to the valve opening when the medium is liquid, and Cv0” represents the reference flow characteristic value corresponding to the valve opening when the medium is liquid.

[0050] Optionally, traverse the flow deviation value or the flow characteristic deviation value under all working conditions and compare it with the set deviation threshold, and obtain the valve fault diagnosis results under all working conditions according to the comparison results, including:

[0051] Traverse the flow deviation value or the flow characteristic deviation value under all working conditions and compare it with the set deviation threshold, and judge the fault type of the valve according to the comparison result;

[0052] When the flow deviation value is positive and greater than the deviation threshold, it is determined that the fault type of the valve is a leakage fault;

[0053] When the flow deviation value is negative and the absolute value of the flow deviation value is greater than the deviation threshold, it is determined that the fault type of the valve is a blockage fault;

[0054] When the flow characteristic deviation value is positive and greater than the deviation threshold, it is determined that the fault type of the valve is a leakage fault;

[0055] When the flow characteristic deviation value is negative and the absolute value of the flow deviation value is greater than the deviation threshold, it is determined that the fault type of the valve is a blockage fault.

[0056] In a second aspect, an embodiment of the present invention provides a valve fault diagnosis system based on a machine learning model and a mechanism model, including:

[0057] A working condition classification and marking module, configured to obtain the operation data of the valve sampled at equal intervals, perform ARX model identification on the valve operation loop data in the operation data, and perform working condition classification and marking on the operation data according to the identification result;

[0058] A flow deviation calculation module, configured to, when the operation data under the same working condition is single-loop operation data, input the obtained valve opening data into a preset machine learning model for flow prediction, calculate the deviation between the generated flow prediction value and the actual flow value of the valve, and obtain the flow deviation value under the current working condition;

[0059] A flow characteristic deviation calculation module, which is used to perform flow characteristic analysis on the operation data by using a preset mechanism model when the operation data under the same working condition is multi-loop operation data, calculate the deviation between the obtained flow characteristic value and the set flow characteristic reference value, and obtain the flow characteristic deviation value under the current working condition;

[0060] A valve fault judgment module, which is used to traverse the flow deviation values or flow characteristic deviation values under all working conditions and compare them with the set deviation threshold, and obtain the valve fault diagnosis results under all working conditions according to the comparison results.

[0061] (III) Beneficial effects

[0062] The beneficial effects of the present invention are as follows: The valve fault diagnosis method proposed by the present invention, after the operation data of the valve is segmented by working conditions through ARX model identification, based on the control loop characteristics of the operation data, a machine learning model or a mechanism model is selected to calculate the deviation between the target parameter and the actual parameter during the operation of the valve, and the valve is diagnosed for faults by obtaining the deviation. Compared with the prior art, the present invention separately analyzes the operation data of valves with different control loop characteristics through the deployed machine learning model and mechanism model, thereby improving the detection accuracy and universality while ensuring the real-time performance of fault detection. Description of the drawings

[0063] Figure 1 It is a schematic flowchart of a valve fault diagnosis method based on a machine learning model and a mechanism model provided by an embodiment of the present invention;

[0064] Figure 2 It is a schematic flowchart of the valve fault diagnosis process of a specific process industry provided by an embodiment of the present invention. Detailed implementation manners

[0065] In order to better explain the present invention and facilitate understanding, the present invention will be described in detail below with reference to the drawings through specific implementation manners.

[0066] Reference Figure 1As shown in the figure, a valve fault diagnosis method based on a machine learning model and a mechanism model proposed by an embodiment of the present invention includes: obtaining the operation data of a valve sampled at equal intervals, performing ARX model identification on the valve operation loop data in the operation data, and classifying and labeling the operation data according to the identification result; when the operation data under the same working condition is single-loop operation data, inputting the obtained valve opening data into a preset machine learning model for flow prediction, calculating the deviation between the generated flow prediction value and the actual flow value of the valve, and obtaining the flow deviation value under the current working condition; when the operation data under the same working condition is multi-loop operation data, using a preset mechanism model to analyze the flow characteristics of the operation data, calculating the deviation between the obtained flow characteristic value and the set flow characteristic reference value, and obtaining the flow characteristic deviation value under the current working condition; traversing the flow deviation values or flow characteristic deviation values under all working conditions and comparing them with the set deviation threshold, and obtaining the valve fault diagnosis results under all working conditions according to the comparison results.

[0067] For the valve fault diagnosis method proposed in this embodiment, after the operation data of the valve is segmented by working conditions through ARX model identification, based on the control loop characteristics of the operation data, a machine learning model or a mechanism model is selected to calculate the deviation between the target parameter and the actual parameter during the valve operation, and the valve is fault diagnosed by obtaining the deviation. Compared with the prior art, in this embodiment, the operation data of valves with different control loop characteristics are separately analyzed through the deployed machine learning model and mechanism model, thereby improving the detection accuracy and universality while ensuring the real-time performance of fault detection.

[0068] To better understand the above technical solution, the exemplary embodiments of the present invention will be described in more detail with reference to the accompanying drawings. Although the exemplary embodiments of the present invention are shown in the drawings, it should be understood that the present invention can be implemented in various forms and should not be limited by the embodiments described herein. On the contrary, these embodiments are provided to enable a more clear and thorough understanding of the present invention and to fully convey the scope of the present invention to those skilled in the art.

[0069] Specifically, referring to Figure 1 As shown in the figure, a valve fault diagnosis method based on a machine learning model and a mechanism model proposed in this embodiment includes:

[0070] S1. Obtain the operation data of the valve sampled at equal intervals, perform ARX model identification on the valve operation loop data in the operation data, and classify and label the operation data according to the identification result.

[0071] In the entire industrial process system, several valves with different functions are set, and each valve has different working conditions during different working periods. Different working conditions also make the valves have different operation data. For example, in the industrial process of crude oil atmospheric and vacuum distillation, a variety of valves are set to control the flow of the medium (the medium includes crude oil, light components, and heavy components) in the pipeline and adjust the medium pressure and medium flow rate. For example, a globe valve set on the crude oil pipeline is used to cut off or adjust the crude oil flow rate; a safety valve set on the pipeline at the outlet of the heating furnace is used to discharge gas when the pressure exceeds the limit; a control valve set on the pipeline from the gas phase outlet of the atmospheric fractionating column to the condenser is used to adjust the light component flow rate; a pressure reducing valve set on the pipeline before the heavy components at the bottom of the atmospheric fractionating column enter the vacuum furnace is used to reduce the medium pressure in the pipeline. Therefore, in this embodiment, the ARX model identification is performed on the operation data of the same valve to complete the task of classifying the working conditions of the valve, and the valve operation data is classified through the working condition classification information, so that the subsequent valve fault diagnosis based on the operation data only needs to analyze the operation data of a data segment of the same type to determine whether there is a fault in the working condition of the valve under the operation data, improving the efficiency of valve fault diagnosis.

[0072] In this embodiment, step S1 may include the following sub-steps S1-1 to S1-4:

[0073] S1-1. Obtain the operation data of the valve sampled at equal intervals within a specified time period. The operation data includes a time stamp, valve position data, valve operation loop data, and valve process variables.

[0074] For example, with a sampling period of 1 hour, obtain the operation data of the valve within 1 day. Each segment of operation data includes a time stamp, valve position data, valve operation loop data, and valve process variables. If the valve control adopts PID control, the valve operation loop data includes the loop flow control value (MV), the loop flow set value (SV), and the loop flow measurement value (PV). In the case of additionally setting a temperature sensor and a pressure sensor on the valve pipeline, the valve process variables also include pressure data, medium temperature data, and medium type information, etc.

[0075] S1-2. Perform ARX model identification on the loop flow set value and the loop flow measurement value in the valve operation loop data to obtain the working condition change data under the current operation data.

[0076] The ARX model (AutoRegressive with eXogenous inputs) is a linear time series model widely used in dynamic system modeling. It predicts the current output value by combining the past output values of the system itself (the autoregressive part) and the external input signals (the exogenous input part). Specifically, the order of the ARX model is taken from 1 to 20 in sequence, and the simulation outputs of the identification models corresponding to the loop flow set value and the loop flow measured value are calculated respectively, so as to classify the operating conditions corresponding to all the operating data by calculating the relative deviation between the simulation output results and the historical output data.

[0077] S1-3. Within the data range of a section of operating data, calculate the relative deviation between the identified flow value and the loop flow measurement value of another section of operating data, and determine whether the obtained relative deviation value is less than the set relative deviation threshold.

[0078] Calculate the relative deviation RE through formula (1):

[0079]

[0080] In formula (1), m represents the amount of operating data, PV i represents the loop flow measurement value of the i-th section of operating data, ysim i represents the identified flow value of the i-th section of operating data, k i is the weight coefficient of the i-th section of operating data, and std represents the standard deviation.

[0081] S1-4. If the obtained relative deviation value is less than the set relative deviation threshold, then mark the operating conditions to which the two sections of operating data belong as the same type.

[0082] For example, in the process of classifying the operating conditions of the operating data segments [a1:a2], [b1:b2], and [c1:c2], the identified flow values output by the ARX model are denoted as ysima, ysimb, and ysimc respectively. Calculate the relative deviation value (denoted as REb_a) between ysima and the loop flow measurement value (denoted as PVa) and the relative deviation value (denoted as REb_c) between ysimc and the loop flow measurement value (denoted as PVc) within the range of [b1:b2]. When REb_a is less than the relative deviation threshold, the operating conditions of [a1:a2] and [b1:b2] are of the same type. At the same time, when REb_c is also less than the relative deviation threshold, the operating conditions of [a1:a2], [b1:b2], and [c1:c2] are of the same type.

[0083] In this embodiment, after step S1, the following steps F1 to F3 are further included:

[0084] F1. Obtain the variable type in the valve process variables, where the valve process variables include flow data, pressure data, medium temperature data, and medium type information.

[0085] F2. Determine the number of valve process variables in the operation data under the same working condition.

[0086] F3a. When the valve process variables in the operation data under the same working condition are only flow data, determine that the operation data under the current working condition is single-loop operation data.

[0087] F3b. When the valve process variables in the operation data under the same working condition include flow data, pressure data, and transmission medium information, determine that the operation data under the current working condition is multi-loop operation data.

[0088] For example, in the industrial process of crude oil atmospheric and vacuum distillation, for the globe valve set on the crude oil pipeline, the valve process variables in its operation data are only flow data, belonging to single-data feedback loop control; for the safety valve set on the pipeline at the outlet of the heating furnace, the regulating valve set on the pipeline from the gas outlet of the atmospheric fractionating tower to the condenser, and the pressure reducing valve set on the pipeline before the heavy components at the bottom of the atmospheric fractionating tower enter the vacuum furnace, the valve process variables in their operation data include flow data, pressure data, and transmission medium information, belonging to multi-data feedback loop control.

[0089] S2a. When the operation data under the same working condition is single-loop operation data, input the obtained valve opening data into a preset machine learning model for flow prediction, calculate the deviation between the generated flow prediction value and the actual flow value of the valve, and obtain the flow deviation value under the current working condition.

[0090] Under a certain working condition, the mapping relationship between single-loop flow measurement data and valve opening data remains unchanged. Therefore, the ridge regression in the machine learning regression algorithm is selected to establish a single-loop flow model. Ridge Regression, also known as L2-regularized regression, is a linear regression model with a regularization term. It reduces the model complexity by adding a regularization term to the loss function to avoid overfitting. Also, ridge regression imposes a penalty on the model parameters, making the model not overly sensitive to the noise in the training data.

[0091] In this embodiment, step S2a includes the following sub-steps S2a-1 to S2a-4:

[0092] S2a-1. When the operation data under the same working condition is single-loop operation data, extract the valve opening data and valve operation loop data to which each operation data belongs from all the operation data under the current working condition.

[0093] To exclude data anomalies (blockage, leakage) caused by valve malfunctions itself, the actual measured opening data of the valve, rather than the controller output value, is selected when establishing the machine learning model (i.e., the single-loop flow model).

[0094] S2a-2. Preprocess the valve operation loop data, and normalize the flow measurement values in the preprocessed valve operation loop data to obtain the actual flow value corresponding to each operation data.

[0095] In this embodiment, step S2a-2 includes the following steps S2a-21 to S2a-22:

[0096] S2a-21. Preprocess the valve operation loop data in each operation data, including noise reduction, removing disturbance segments, and removing abnormal data points, to obtain the preprocessed valve operation loop data.

[0097] First, use mean filtering to perform noise reduction on the valve operation loop data to eliminate the influence of noise on the modeling accuracy; second, to prevent the adverse impact of process fluctuations on subsequent fault identification, it is necessary to remove the disturbance segments in the valve operation loop data; finally, remove the abnormal data points in the valve operation loop data, where the abnormal data points are flow measurement data points or control variable data points that exceed 3 standard deviations (μ±3σ) of the average value in the valve operation loop data.

[0098] S2a-22. According to the obtained flow control range of the valve, normalize the flow measurement values in each preprocessed valve operation loop data to obtain the actual flow value corresponding to each operation data.

[0099] The normalization calculation formula is:

[0100]

[0101] In formula (2), Y represents the normalized flow measurement value, Y0 represents the flow measurement value, Y max represents the maximum controllable flow in the valve operation loop, and Y min represents the minimum controllable flow in the valve operation loop.

[0102] S2a-3. Input all the valve opening data into the trained machine learning model for flow prediction to obtain the flow prediction value corresponding to each operation data.

[0103] In this embodiment, the machine learning model construction and training process includes the following steps G1 to G3:

[0104] G1. Obtain the historical operation data of the valve, and extract the valve opening data and flow measurement values from the historical operation data.

[0105] A data set formed by combining valve opening data and valve operation loop data is used as training data for a machine learning model. Among them, the operation loop data is extracted from the preprocessed valve operation loop data.

[0106] G2. Taking the parameter vector of the machine learning model as the ridge regression target, construct the loss function of the parameter vector.

[0107] The mathematical expression of the loss function is:

[0108] J(θ) = ‖Xθ - y‖ 2 + λ‖θ‖ 2 (3)

[0109] In formula (3), θ represents the model parameter vector, X represents the feature matrix of the training data, y represents the target value of ridge regression, λ represents the regularization coefficient, and ‖ . ‖ represents the Euclidean norm of the vector.

[0110] G3. Using the valve opening data and the flow measurement value as training data, solve the minimization of the loss function to obtain the optimal parameter vector, and construct a machine learning model based on the optimal parameter vector.

[0111] To find the model parameter vector θ that minimizes the loss function ridge , take the derivative of the loss function J(θ) and set the derivative equal to zero to obtain the following analytical formula:

[0112] θ ridge = (X T X + λI) -1 X T y (4)

[0113] In formula (4), I represents the identity matrix, and its dimension is the same as that of X T X.

[0114] During the modeling process, cross-validation is used to verify the model. The training data set is divided into K subsets, and one subset is used as the test set in turn, and the rest are used as the training set. Train the model on the training set and evaluate the model performance on the test set. Repeat this process K times, calculate the average performance for different λ values, select the λ value that makes the model perform best on the test set, calculate the optimal model parameter vector, and finally associate the optimal model parameter vector with the current working condition. Finally, the following machine learning model for flow prediction is obtained:

[0115] Y* = θ ridge X (5)

[0116] In formula (5), Y* represents the flow prediction value.

[0117] S2a - 4. Traverse all flow prediction values and actual flow values to calculate the deviation, and perform mean processing on the obtained flow deviation values to obtain the mean flow deviation under the current working condition.

[0118] The calculation formula for the flow deviation value is as follows:

[0119]

[0120] In formula (6), represents the mean flow deviation, and N represents the amount of valve operation data under the same working condition.

[0121] S2b. When the operation data under the same working condition is multi - loop operation data, use a preset mechanism model to analyze the flow characteristics of the operation data, calculate the deviation between the obtained flow characteristic value and the set flow characteristic reference value, and obtain the flow characteristic deviation value under the current working condition.

[0122] In this embodiment, step S2b includes the following sub - steps S2b - 1 to S2b - 4:

[0123] S2b - 1. When the operation data under the same working condition is multi - loop operation data, extract valve process variable data from the operation data. The valve process variable data includes flow data, pressure data, medium temperature data, and medium type information.

[0124] S2b - 2. After denoising the pressure data in the valve process variable data, obtain the medium type information in the valve process variable data. The medium types are mainly gas medium and liquid medium.

[0125] For valves with pressure measuring points before and after the valve, the change of valve flow characteristics can be used to diagnose valve blockage. However, due to the large fluctuation of valve pressure data, only the steady - state information in the valve pressure data is required when calculating through the mechanism model. Therefore, it is necessary to denoise the valve pressure data, and mean filtering can also be used to denoise the valve pressure data.

[0126] S2b - 3. According to the medium type information, input the denoised valve process variable data into the corresponding mechanism model for flow characteristic analysis to obtain the flow characteristic value corresponding to each operation data.

[0127] When calculating the mechanism model of flow characteristic-valve opening, it is necessary to perform block calculations on the collected valve process variable data (pressure data before and after the valve, flow rate, temperature data) according to the valve opening. The valve opening is normalized to between 0-100%, and the entire data set is cut into multiple sub-data sets (pressure data before and after the valve, flow rate, temperature data corresponding to each valve opening) through the range of the normalized valve opening data. Each sub-data set represents the flow characteristic value corresponding to an opening, and the opening range is 1%. When the amount of data in the sub-data set is greater than 1 hour of data volume, the least squares algorithm is used to calculate the flow characteristic value of the current opening. The calculated flow characteristic value is stored in the model, and finally the calculated mechanism model is associated with the current working condition.

[0128] It can be seen from the valve flow calculation formula (6) that the valve flow is proportional to the medium density, valve flow characteristic, and pressure difference before and after the valve:

[0129]

[0130] In formula (7), Q represents the valve flow, a0 represents the valve flow characteristic constant, Cv represents the flow characteristic value of the medium at the valve, ΔP represents the pressure difference before and after the valve, and SG is the ratio of the specific gravity to the density of the medium.

[0131] Since the density of the gas medium is greatly affected by temperature, when the transmission medium is a gas medium, it is necessary to correct the valve flow calculation formula (7) through the ideal gas formula to obtain the following valve flow calculation formula (8) for gas media:

[0132]

[0133] In formula (8), ρ0 represents the density of the medium gas in the ideal state, T0 represents the temperature of the medium gas in the ideal state, P0 represents the pressure of the medium gas in the ideal state, a represents the gas specific gravity correction constant, T represents the temperature data of the medium, and P1, P2 represent the pressure data before and after the valve.

[0134] Therefore, when the medium is a gas, the following mechanism model (8) is selected to calculate the flow characteristic value of the valve relative to the gas medium.

[0135]

[0136] In formula (9), Cv’ represents the flow characteristic value corresponding to the valve opening when the medium is a gas, Cv0’ represents the reference flow characteristic value corresponding to the valve opening when the medium is a gas, Q represents the valve flow, P1, P2 represent the pressure data before and after the valve, and T represents the temperature data of the medium.

[0137] Since the liquid medium is an incompressible fluid and the influence of temperature on its density is very small within the determined operating conditions, the influence of temperature change can be ignored when constructing the mechanism model. Therefore, when the medium is liquid, the following mechanism model (9) is selected to calculate the flow characteristic value at the valve relative to when the medium is gas.

[0138]

[0139] In Equation (10), Cv” represents the flow characteristic value corresponding to the valve opening when the medium is liquid, and Cv0” represents the reference flow characteristic value corresponding to the valve opening when the medium is liquid.

[0140] S2b-4. Traverse all the flow characteristic values and calculate the deviation from the set reference flow characteristic value, and perform mean processing on the obtained flow characteristic deviation values to obtain the mean flow characteristic deviation under the current operating conditions.

[0141] The calculation formula for the flow characteristic deviation value is as follows:

[0142]

[0143] In Equation (11), represents the mean flow characteristic deviation, M represents the amount of valve operation data under the same operating conditions, bias represents the deviation between the flow characteristic value and the reference flow characteristic value, and bias = (flow characteristic value - reference flow characteristic value) / reference flow characteristic value.

[0144] S3. Traverse the flow deviation values or flow characteristic deviation values under all operating conditions and compare them with the set deviation threshold, and obtain the valve fault diagnosis results under all operating conditions based on the comparison results.

[0145] In this embodiment, step S3 includes the following sub-steps S3-1 to S3-2:

[0146] S3-1. Traverse the flow deviation values or flow characteristic deviation values under all operating conditions and compare them with the set deviation threshold, and judge the fault type of the valve based on the comparison results.

[0147] S3-2a. When the flow deviation value is positive and greater than the deviation threshold, it is determined that the fault type of the valve is a leakage fault.

[0148] S3-2b. When the flow deviation value is negative and the absolute value of the flow deviation value is greater than the deviation threshold, it is determined that the fault type of the valve is a blockage fault.

[0149] S3-2c. When the flow characteristic deviation value is positive and greater than the deviation threshold, it is determined that the fault type of the valve is a leakage fault.

[0150] S3-2d. When the flow characteristic deviation value is negative and the absolute value of the flow deviation value is greater than the deviation threshold, it is determined that the failure type of the valve is a blockage failure.

[0151] In a specific embodiment, referring to Figure 2 as shown, a fault diagnosis is performed on the valves in the crude oil atmospheric and vacuum distillation industrial process. The specific diagnosis process is as follows:

[0152] Step 101: Collect the operation data of each valve, such as the globe valve set on the crude oil pipeline, the safety valve set on the pipeline at the outlet of the heating furnace, the regulating valve set on the pipeline from the gas phase outlet of the atmospheric fractionating tower to the condenser, and the pressure reducing valve set on the pipeline before the bottom heavy components of the atmospheric fractionating tower enter the vacuum furnace. The operation data includes the positioner data of the valve, the valve operation loop data, and the valve process variables. The positioner data includes the valve set value (setPoint) and the valve stroke feedback data (travel). The valve operation loop data includes the loop flow control value (MV), the loop flow set value (SV), and the loop flow measurement value (PV). The valve process variables include the medium flow rate (Q), the medium temperature data (T), and the medium type (gas, liquid).

[0153] Step 102: According to the ARX model, classify and label the operation data of each valve according to the working conditions.

[0154] Step 103: Determine whether there are the pressure before and after the valve and the medium temperature data in the pipeline in the valve process variables of the operation data of each valve. If the corresponding data exists, go to Step 104; if the data does not exist, go to Step 105. For example, the valve process variables of the globe valve set on the crude oil pipeline and the regulating valve set on the pipeline from the gas phase outlet of the atmospheric fractionating tower to the condenser do not have the pressure before and after the valve and the medium temperature data in the pipeline; the valve process variables of the safety valve set on the pipeline at the outlet of the heating furnace and the pressure reducing valve set on the pipeline before the bottom heavy components of the atmospheric fractionating tower enter the vacuum furnace have the pressure before and after the valve and the medium temperature data in the pipeline.

[0155] Step 105: Preprocess the operation loop data of the valves of the same type as the above globe valve and regulating valve, including noise reduction, removing the disturbance section, and removing abnormal data points.

[0156] Step 106: Determine whether there is a flow-valve opening machine learning model under each working condition. If not, go to Step 112; if so, perform Step 107.

[0157] Step 112: According to the historical operation data under the current working condition, select the ridge regression in the machine learning regression algorithm to establish a flow-valve opening machine learning model.

[0158] Step 107: Perform flow prediction using the valve opening data and the flow-valve opening machine learning model for the current working condition, and select the valve opening data for at least one day to predict the corresponding flow prediction value.

[0159] Step 108: Calculate the deviation between all flow prediction values and the actual flow values, and perform mean processing on the obtained flow deviation values to obtain the mean flow deviation under the current working condition.

[0160] Step 104: Process the pressure data before and after the valve and the medium temperature data. Use mean filtering to denoise the pressure data.

[0161] Step 113: Determine whether the medium is liquid or gas. The medium in the above-mentioned safety valve is gas, and the medium in the pressure reducing valve is liquid.

[0162] Step 114: Calculate the mechanism model of the gas flow characteristic Cv-valve opening to obtain the flow characteristic value for the medium being gas under the current working condition. For example, the flow characteristic value of the safety valve is calculated using this mechanism model. The safety valve is used to release gas when the heating furnace is overpressurized.

[0163] Step 115: Calculate the mechanism model of the liquid flow characteristic Cv-valve opening to obtain the flow characteristic value for the medium being liquid under the current working condition. For example, the flow characteristic value of the pressure reducing valve is calculated using this mechanism model; the pressure reducing valve reduces the medium pressure by throttling to create a low-pressure environment for vacuum distillation.

[0164] Step 116: Calculate the mean value of the real-time flow characteristic.

[0165] Step 117: If there is no flow characteristic reference value within the current working condition and valve opening range, save the mean value of the real-time calculated flow characteristic to the corresponding mechanism model.

[0166] Step 109: Calculate the blockage and leakage indicators through the deviation. After completing the deviation calculation of the flow-valve opening machine learning model or the flow characteristic Cv-valve opening model, normalize the two deviations to obtain a unified fault indicator based on blockage and leakage.

[0167] Step 110: Output alarm information based on the calculated post-indicators. Determine whether it is a blockage or a leakage according to the magnitude of the deviation, and set the model deviation fault threshold (LIMIT) based on the operating conditions information and the process information. In the case of a valve usage scenario without pre-valve and post-valve pressures, alarm through the flow-valve opening machine learning model, where a leakage alarm is issued when the mean value of the flow deviation is a positive number exceeding LIMIT, and a blockage alarm is issued if the mean value of the flow deviation is a negative number and its absolute value exceeds LIMIT; for a valve usage scenario with pre-valve and post-valve pressures, alarm based on the mean value of the flow characteristics of the flow characteristic Cv-valve opening model. When the mean value of the flow characteristics is a negative number and its absolute value is greater than LIMIT, a blockage alarm is issued; when the mean value of the flow characteristics is greater than LIMIT, a leakage alarm is issued.

[0168] Step 111: Output the alarm information and the corresponding model, give the comprehensive alarm information and the calculated indicators, record the current operating conditions, and output the flow-valve opening machine learning model or the flow characteristic Cv-valve opening model.

[0169] On the other hand, this embodiment also proposes a valve fault diagnosis system based on a machine learning model and a mechanism model, which includes:

[0170] An operating condition classification and marking module, which is used to obtain the operating data of the valve sampled at equal intervals, perform ARX model identification on the valve operating loop data in the operating data, and classify and mark the operating data according to the identification results.

[0171] A flow deviation calculation module, which is used to input the obtained valve opening data into a preset machine learning model for flow prediction when the operating data under the same operating condition is single-loop operating data, calculate the deviation between the generated flow prediction value and the actual flow value of the valve, and obtain the flow deviation value under the current operating condition.

[0172] A flow characteristic deviation calculation module, which is used to perform flow characteristic analysis on the operating data using a preset mechanism model when the operating data under the same operating condition is multi-loop operating data, calculate the deviation between the obtained flow characteristic value and the set flow characteristic reference value, and obtain the flow characteristic deviation value under the current operating condition.

[0173] A valve fault judgment module, which is used to traverse and compare the flow deviation values or the flow characteristic deviation values under all operating conditions with the set deviation threshold, and obtain the valve fault diagnosis results under all operating conditions according to the comparison results.

[0174] In summary, for the valve fault diagnosis method and system based on the machine learning model and the mechanism model proposed by the present invention, first, the ARX linear model is identified through the loop data of the input and output, and the working conditions are segmented according to the differences of the identified models. When less data is available, the machine learning regression algorithm is selected to construct the machine learning model of flow-valve opening. When the pressure data before and after the valve is available, the flow characteristic-valve opening model is constructed through mechanism modeling. Finally, the fault diagnosis of valve blockage and leakage is realized by monitoring the changes of the models. When deploying the detection scheme, the present invention does not require offline operation of the valve and can be directly deployed on the valves of the operating device, greatly reducing the usage threshold of the diagnosis algorithm. At the same time, since the algorithm combines mechanism modeling for diagnosis in scenarios with rich data, the accuracy and universality of valve fault detection are further improved.

[0175] Since the system / device described in the above embodiments of the present invention is the system / device adopted for implementing the method in the above embodiments of the present invention, based on the method described in the above embodiments of the present invention, those skilled in the art can understand the specific structure and variations of the system / device, and thus will not be elaborated herein. Any system / device adopted for the method in the above embodiments of the present invention falls within the scope of protection of the present invention.

[0176] Those skilled in the art should understand that the embodiments of the present invention can be provided as a method, a system, or a computer program product. Therefore, the present invention can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present invention can adopt the form of a computer program product implemented 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.

[0177] The present invention is described with reference to the flowcharts and / or block diagrams of methods, apparatuses (systems), and computer program products according to embodiments of the present invention. It should be understood that each flow and / or block in the flowcharts and / or block diagrams can be implemented by computer program instructions, and the combination of flows and / or blocks in the flowcharts and / or block diagrams can also be implemented by computer program instructions.

[0178] It should be noted that in the description of the present invention, the words "a" or "an" before a component do not exclude the existence of multiple such components. The present invention can be implemented by means of hardware including several different components and by means of a properly programmed computer. The use of the words first, second, third, etc. is only for convenience of expression and does not represent any order. These words can be understood as part of the component name.

[0179] In addition, it should be noted that in the description of this specification, the descriptions of terms such as "one embodiment", "some embodiments", "embodiment", "example", "specific example", or "some examples" mean that the specific features, structures, materials, or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, without contradiction, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of different embodiments or examples.

[0180] Although the preferred embodiments of the present invention have been described, those skilled in the art can make additional changes and modifications to these embodiments after learning the basic creative concepts.

[0181] Obviously, those skilled in the art can make various modifications and variations to the present invention without departing from the spirit and scope of the present invention.

Claims

1. A valve fault diagnosis method based on a machine learning model and a mechanism model, characterized in that, Including: Obtain the operation data of the valve sampled at equal intervals, perform ARX model identification on the valve operation loop data in the operation data, and classify and label the operation data according to the identification result; When the operation data under the same working condition is single-loop operation data, input the obtained valve opening data into a preset machine learning model for flow prediction, calculate the deviation between the generated flow prediction value and the actual flow value of the valve, and obtain the flow deviation value under the current working condition; When the operation data under the same working condition is multi-loop operation data, use a preset mechanism model to analyze the flow characteristics of the operation data, calculate the deviation between the obtained flow characteristic value and the set flow characteristic reference value, and obtain the flow characteristic deviation value under the current working condition; Traverse the flow deviation values or flow characteristic deviation values under all working conditions and compare them with the set deviation threshold, and obtain the valve fault diagnosis results under all working conditions according to the comparison results.

2. The method according to claim 1, wherein Obtain the operation data of the valve sampled at equal intervals, perform ARX model identification on the valve operation loop data in the operation data, and classify and label the operation data according to the identification result, including: Obtain the operation data of the valve sampled at equal intervals within a specified time period, where the operation data includes a time stamp, valve position data, valve operation loop data, and valve process variables; Perform ARX model identification on the loop flow set value and loop flow measurement value in the valve operation loop data to obtain the identified flow value to which the current operation data belongs; Within the data range of a section of operation data, calculate the relative deviation between the identified flow value of another section of operation data and the loop flow measurement value, and determine whether the obtained relative deviation value is less than the set relative deviation threshold; If the obtained relative deviation value is less than the set relative deviation threshold, then label the working conditions to which the two sections of operation data belong as the same type.

3. The method according to claim 2, wherein After obtaining the operation data of the valve sampled at equal intervals, performing ARX model identification on the valve operation loop data in the operation data, and classifying and labeling the operation data according to the identification result, it further includes: Obtain the variable type in the valve process variables, where the valve process variables include flow data, pressure data, medium temperature data, and medium type information; Judge the number of valve process variables in the operation data under the same working condition; When there is only flow data among the valve process variables in the operation data under the same working condition, determine that the operation data under the current working condition is single-loop operation data; When the valve process variables in the operation data under the same working condition include flow data, pressure data, and transmission medium information, determine that the operation data under the current working condition is multi-loop operation data.

4. The method according to claim 1, characterized in that, When the operation data under the same working condition is single-loop operation data, input the obtained valve opening data into a preset machine learning model for flow prediction, calculate the deviation between the generated flow prediction value and the actual flow value of the valve, and obtain the flow deviation value under the current working condition, including: When the operation data under the same working condition is single-loop operation data, extract the valve opening data and valve operation loop data to which each operation data belongs from all the operation data under the current working condition; Preprocess the valve operation loop data, and normalize the flow measurement values in the preprocessed valve operation loop data to obtain the actual flow value corresponding to each operation data; Input all valve opening data into the trained machine learning model respectively for flow prediction to obtain the flow prediction value corresponding to each operation data; Traverse all flow prediction values and actual flow values for deviation calculation, and perform mean processing on the obtained flow deviation values to obtain the mean flow deviation under the current working condition.

5. The method according to claim 4, wherein Preprocessing the valve operation loop data and normalizing the flow measurement values in the preprocessed valve operation loop data to obtain the actual flow value corresponding to each operation data includes: Preprocess the valve operation loop data in each operation data, including noise reduction, removing disturbance segments, and removing abnormal data points, to obtain the preprocessed valve operation loop data; According to the obtained flow control range of the valve, normalize the flow measurement values in each preprocessed valve operation loop data to obtain the actual flow value corresponding to each operation data; Among them, the abnormal data point is a flow measurement data point or a control variable data point that exceeds 3 standard deviations from the average value in the valve operation loop data.

6. The method according to claim 4, wherein Before inputting all valve opening data into the trained machine learning model respectively for flow prediction to obtain the flow prediction value corresponding to each operation data, it also includes: Obtain the historical operation data of the valve, and extract the valve opening data and flow measurement values from the historical operation data; Construct a loss function of the parameter vector with the parameter vector of the robot learning model as the ridge regression target; Using the valve opening data and flow measurement values as training data, solve the minimization of the loss function to obtain the optimal parameter vector, and construct a robot learning model based on the optimal parameter vector.

7. The method according to claim 1, wherein When the operation data under the same working condition is multi-loop operation data, use the preset mechanism model to analyze the flow characteristics of the operation data, and calculate the deviation between the obtained flow characteristic value and the set flow characteristic reference value to obtain the flow characteristic deviation value under the current working condition, including When the operation data under the same working condition is multi-loop operation data, extract the valve process variable data from the operation data; After noise reduction processing on the pressure data in the valve process variable data, obtain the medium type information in the valve process variable data; According to the medium type information, input the noise-reduced valve process variable data into the corresponding mechanism model for flow characteristic analysis to obtain the flow characteristic value corresponding to each operation data; Traverse all flow characteristic values and the set flow characteristic reference values for deviation calculation, and perform mean processing on the obtained flow characteristic deviation values to obtain the mean flow characteristic deviation under the current working condition.

8. The method according to claim 7, wherein When the medium is a gas, the selected mechanism model is: Where, Cv’ represents the flow characteristic value corresponding to the valve opening when the medium is gas, Cv0’ represents the reference value of the flow characteristic corresponding to the valve opening when the medium is gas, Q represents the valve flow rate, P1 and P2 represent the pressure data before and after the valve, and T represents the temperature data of the medium; When the medium is liquid, the selected mechanism model is: Where, Cv” represents the flow characteristic value corresponding to the valve opening when the medium is liquid, Cv0” represents the reference value of the flow characteristic corresponding to the valve opening when the medium is liquid.

9. The method according to claim 1, wherein Traverse the flow deviation values or flow characteristic deviation values under all working conditions and compare them with the set deviation threshold. According to the comparison results, obtain the valve fault diagnosis results under all working conditions, including: Traverse the flow deviation values or flow characteristic deviation values under all working conditions and compare them with the set deviation threshold. According to the comparison results, judge the fault type of the valve; When the flow deviation value is positive and greater than the deviation threshold, it is determined that the fault type of the valve is a leakage fault; When the flow deviation value is negative and the absolute value of the flow deviation value is greater than the deviation threshold, it is determined that the fault type of the valve is a blockage fault; When the flow characteristic deviation value is positive and greater than the deviation threshold, it is determined that the fault type of the valve is a leakage fault; When the flow characteristic deviation value is negative and the absolute value of the flow deviation value is greater than the deviation threshold, it is determined that the fault type of the valve is a blockage fault.

10. A valve fault diagnosis system based on a machine learning model and a mechanism model, characterized in that, Including: A working condition classification and marking module, which is used to obtain the operation data of the valve sampled at equal intervals, perform ARX model identification on the valve operation loop data in the operation data, and classify and mark the operation data according to the identification results; A flow deviation calculation module, which is used to input the obtained valve opening data into a preset machine learning model for flow prediction when the operation data under the same working condition is single-loop operation data, calculate the deviation between the generated flow prediction value and the actual flow value of the valve, and obtain the flow deviation value under the current working condition; A flow characteristic deviation calculation module, which is used to perform flow characteristic analysis on the operation data by using a preset mechanism model when the operation data under the same working condition is multi-loop operation data, calculate the deviation between the obtained flow characteristic value and the set flow characteristic reference value, and obtain the flow characteristic deviation value under the current working condition; A valve fault judgment module, which is used to traverse the flow deviation values or flow characteristic deviation values under all working conditions and compare them with the set deviation threshold, and obtain the valve fault diagnosis results under all working conditions according to the comparison results.

Citation Information

Cited By

  • Regulating valve detection system and method based on data characteristics

    CN121276999A

  • A data feature-based control valve detection system and method thereof

    CN121276999B

  • Valve full life cycle performance monitoring and fault pre-judging system and method

    CN121723303A

  • Valve intelligent detection system based on working condition simulation

    CN122062892A