CN111026075A - Error matching-based fault detection method for medium-low pressure gas pressure regulator - Google Patents

Error matching-based fault detection method for medium-low pressure gas pressure regulator Download PDF

Info

Publication number
CN111026075A
CN111026075A CN201911178051.2A CN201911178051A CN111026075A CN 111026075 A CN111026075 A CN 111026075A CN 201911178051 A CN201911178051 A CN 201911178051A CN 111026075 A CN111026075 A CN 111026075A
Authority
CN
China
Prior art keywords
pressure regulator
pressure
data
true
fault
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201911178051.2A
Other languages
Chinese (zh)
Inventor
栗风永
孙猛
王超群
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Aerospace Energy Co ltd
Shanghai University of Electric Power
Shanghai Electric Power University
University of Shanghai for Science and Technology
Original Assignee
Shanghai Aerospace Energy Co ltd
Shanghai Electric Power University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Aerospace Energy Co ltd, Shanghai Electric Power University filed Critical Shanghai Aerospace Energy Co ltd
Priority to CN201911178051.2A priority Critical patent/CN111026075A/en
Publication of CN111026075A publication Critical patent/CN111026075A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B23/00Testing or monitoring of control systems or parts thereof
    • G05B23/02Electric testing or monitoring
    • G05B23/0205Electric testing or monitoring by means of a monitoring system capable of detecting and responding to faults
    • G05B23/0218Electric testing or monitoring by means of a monitoring system capable of detecting and responding to faults characterised by the fault detection method dealing with either existing or incipient faults
    • G05B23/0243Electric testing or monitoring by means of a monitoring system capable of detecting and responding to faults characterised by the fault detection method dealing with either existing or incipient faults model based detection method, e.g. first-principles knowledge model
    • G05B23/0245Electric testing or monitoring by means of a monitoring system capable of detecting and responding to faults characterised by the fault detection method dealing with either existing or incipient faults model based detection method, e.g. first-principles knowledge model based on a qualitative model, e.g. rule based; if-then decisions
    • G05B23/0248Causal models, e.g. fault tree; digraphs; qualitative physics

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Automation & Control Theory (AREA)
  • Measuring Fluid Pressure (AREA)

Abstract

The invention provides a fault detection method for a medium-low pressure gas pressure regulator based on error matching, which utilizes a discretization data thought and a statistical learning thought, establishes an algorithm model according to a random forest algorithm, utilizes a random search optimization algorithm model, inputs preprocessed training data to train the optimized algorithm model to obtain a trained algorithm model, inputs the preprocessed test data into the trained algorithm model to output a predicted value of pressure of the pressure regulator, then carries out difference calculation and error feature matching on the predicted value of the pressure regulator and a real pressure value of the pressure regulator, and finally outputs a corresponding fault grade and a fault type. According to the detection method, the pressure data segment is segmented, so that independent prediction of a single subdata segment is realized, the accuracy and adaptability of a prediction result are optimized, the influence of various factors on the prediction result is considered, the data of each part of temperature, time, flow and pressure are fully utilized, and the generalization performance and robustness of the algorithm are enhanced.

Description

Error matching-based fault detection method for medium-low pressure gas pressure regulator
Technical Field
The invention relates to a fault detection method for a medium-low pressure gas pressure regulator, in particular to a medium-low pressure gas fault detection method based on error matching and statistical analysis.
Background
In a natural gas transportation system, a gas pressure regulator plays a very important role, and as the use of natural gas is increasing nowadays, the gas consumption is also rising year by year, and in the operation and maintenance of the gas pressure regulator, more and more problems are also shown, wherein the most important problems are roughly: the diagnosis mode of the voltage regulator is backward, and the diagnosis accuracy of the voltage regulator is low; at present, most of pressure regulator diagnosis still adopts regular manual maintenance, the maintenance cost is very high, and the intelligent degree is lower. Therefore, it is very important to provide an intelligent diagnostic technique for the voltage regulator.
At present, most of pressure regulator fault detection methods assign professionals to gas enterprises for regular maintenance, pressure data are checked manually, and fault types are analyzed and judged based on expert experience.
In recent years, Machine learning methods are more and more widely applied, and learners propose intelligent diagnosis methods of the pressure regulator one by one, wherein a classifier, such as a Support Vector Machine (SVM) method, is used for processing and analyzing pressure information of the pressure regulator in one day as an integral data sample to judge the fault type of the pressure regulator, so that the operation speed is high, and a large amount of manpower, material resources and financial resources can be saved; however, the method has an obvious disadvantage: for irregular pressure information, particularly for medium and small-sized gas pressure regulators used by medium and small-sized enterprises, the pressure information has large change, the regularity cannot be analyzed, and the fault type cannot be effectively judged; meanwhile, the robustness is poor for the influence of other factor changes, such as temperature, flow and the like.
Disclosure of Invention
Based on the background, the invention aims to provide a fault detection device which has high fault detection accuracy and strong adaptability; the detection method which is low in algorithm complexity and easy to realize is based on integrated learning and statistical learning ideas, and adopts the following technical scheme:
the invention provides a fault detection method for a medium-low pressure gas pressure regulator based on error matching, which is characterized by comprising the following steps of:
step (a), training data is preprocessed;
step (b), an algorithm model is established, preprocessed training data are input to train the algorithm model, and the trained algorithm model is stored;
step (c), the test data is preprocessed;
inputting the preprocessed test data into the trained algorithm model, and outputting a predicted value of the pressure regulator;
and (e) performing error characteristic matching on the predicted value of the pressure regulator and the real pressure value of the pressure regulator, and outputting the corresponding fault grade and fault type.
Further, in the error matching-based medium and low pressure gas pressure regulator fault detection method provided by the invention, the step (a) comprises the following steps:
step (a1), for regulator time, temperature T, flow F, pressure P as training datatrueConstructing a one-dimensional array a, a ═ T, F, Ptrue]Deleting the training data with the pressure data lower than 0, and constructing a one-dimensional array a to form a nested array A, wherein A is [ a ]1,a2,a3,…aM];
Step (a2), arranging the corresponding data month mouth, hour, temperature T, flow F and pressure P according to time category for the training data after data cleaningtrueAnd storing in a one-dimensional array a, a ═ month, hour, T, F, Ptrue]。
Further, in the error matching-based medium and low pressure gas pressure regulator fault detection method provided by the invention, the step (b) comprises the following steps:
step (b1), an algorithm model is established according to a random forest algorithm, and optimal parameters are searched for the algorithm model by using a random search algorithm;
step (b2), dividing the preprocessed training data into ten parts according to a cross validation method, and sequentially selecting one part as a test set DtestAnd the remaining 9 are used as training set Dtrain
And (b3) training the algorithm model with the found optimal parameters by using the split training data, and storing the trained algorithm model.
Further, in the error matching-based middle and low pressure gas pressure regulator fault detection method provided by the invention, the step (b3) comprises the following steps:
step (b31), test set Dtest=[a1,a2,a3,…]Each one-dimensional array a ini=[month,hour,T,F,Ptrue]Is split into ai(p)=[month,hour,T,F]And ai(o)=[Ptrue];
Step (b32), according to the random forest algorithm, ai(p) as input to the tree, ai(o) as child nodes of the tree, training a CART decision tree, wherein the segmentation rule for each node in the training process is as follows:
randomly selecting i features from all input features, selecting an optimal cutting point from the i features, dividing left and right subtrees, and training a next CART decision tree in the same way;
step (b33), a plurality of decision tree fusion modes are set according to the forest algorithm, the leaf node weight of the CART decision tree sample points is set to be z, the number of decision trees is set to be n, the mean value of the leaf node weights of the n CART decision tree sample points is set to be y, and according to the formula:
Figure RE-GDA0002383509580000041
in the above formula, n is 100, and finally a single CART decision tree, i.e., a weak classifier, is combined into a plurality of CART decision trees, i.e., a strong classifier, and the mean value y of each node is saved, so that a trained algorithm model is obtained and saved.
Further, in the error matching-based medium and low pressure gas pressure regulator fault detection method provided by the invention, the step (c) comprises the following steps:
step (c1), for the pressure regulator time, temperature T, flow F, pressure P as test datatrueConstructing a one-dimensional array c, c ═ T, F, Ptrue]Deleting the test data with the pressure data lower than 0, and constructing a one-dimensional array C to form a nested array C, wherein C is [ C ═ C [ ]1,c2,c3,…cM];
Step (c2), arranging corresponding data month mouth, hour, temperature T, flow F and pressure P according to time category for the test data after data cleaningtrueAnd storing in a one-dimensional array c, c ═ month, hour, T, F, Ptrue]。
Further, in the error matching-based medium and low pressure gas pressure regulator fault detection method provided by the invention, the step (d) comprises the following steps:
step (d1), reading the saved algorithm model after training;
step (d2), inputting the preprocessed test data into the trained algorithm model;
step (d3) of outputting the predicted value P of the pressure regulator pressureout
Further, in the error matching-based middle and low pressure gas pressure regulator fault detection method provided by the invention, the step (d2) comprises the following steps:
step (d21), the nested array C is ═ C1,c2,c3,…cM]As a test data set, for each one-dimensional array ci=[month,hour,T,F,Ptrue]Split into ci(p)= [month,hour,T,F]And ci(o)=[Ptrue];
Step (d22), splitting ci(p) as input quantity, ci(o) as input to the trained algorithm model.
Further, in the error matching-based medium and low pressure gas pressure regulator fault detection method provided by the invention, the step (e) comprises the following steps:
step (e1) for predicting the pressure of the output of the pressure regulatoroutWith the actual value P of the pressure in the pressure regulatortruePerforming error characteristic analysis;
and (e2) matching and outputting the corresponding fault type according to the error characteristics obtained by the error characteristic analysis.
Further, in the error matching-based middle and low pressure gas pressure regulator fault detection method provided by the invention, the step (e1) comprises the following steps:
step (e11) of using the predicted value P of the pressure regulator output pressureoutWith the actual value P of the pressure in the pressure regulatortrueAccording to the formula
E=Ptrue-Pout
Recording an error value E;
step (e12), set f1,f2For the early warning accuracy range of the voltage regulator, PaveThe average output pressure value of the pressure regulator is obtained, the number of the one-dimensional arrays C in the nested array C is M, and according to a formula:
Figure RE-GDA0002383509580000061
Figure RE-GDA0002383509580000062
wherein [. ]]Is an Everson bracket, the condition in the Everson bracket is 1 if the condition is satisfied, and is 0 if the condition is not satisfied, and S is recorded1,S2A value of (d);
step (e13), F is the flow rate, according to the formula:
Figure RE-GDA0002383509580000063
Figure RE-GDA0002383509580000064
wherein [. ]]Is an Everson bracket, the condition in the Everson bracket is 1 if the condition is satisfied and is 0 if the condition is not satisfied, and SF is recorded1,SF2A value of (d);
step (e14), according to the formula:
Figure RE-GDA0002383509580000065
Figure RE-GDA0002383509580000066
Figure RE-GDA0002383509580000067
Figure RE-GDA0002383509580000071
Figure RE-GDA0002383509580000072
Figure RE-GDA0002383509580000073
wherein [. ]]Is an Everson bracket, the condition in the Everson bracket is 1 if the condition is satisfied, and is 0 if the condition is not satisfied, and S is recorded31,S32,S41,S42,S51,S52The value of (c).
Further, in the error matching-based middle and low pressure gas pressure regulator fault detection method provided by the invention, the step (e2) comprises the following steps:
step (e21), set the output fault level as Out1α, β, γ are error fault point ratios, according to the formula:
Figure RE-GDA0002383509580000074
in the above formula, α is 0.3, β is 0.5, γ is 0.1,
outputting the corresponding fault level, Out1If the output is normal, the equipment operates normally without maintenance; out1If the fault early warning I is output, the equipment has slight fault and needs to be maintained regularly; out1If the fault early warning II is output, the equipment is in serious fault and needs to be overhauled immediately;
step (e22), set the output fault type as Out2According to the formula:
Figure RE-GDA0002383509580000081
and outputting the corresponding fault type.
Action and Effect of the invention
According to the error matching-based fault detection method for the medium-low pressure gas pressure regulator, the discretization data thought is utilized, the pressure data segment is segmented, independent prediction of a single subdata segment is achieved, compared with a mode of predicting the whole pressure data, the method improves accuracy of a prediction result, irregular pressure data can be responded, and adaptability is obviously enhanced. Meanwhile, aiming at the characteristics of the voltage regulator, the number of the error points of the voltage regulator under different conditions corresponding to different fault types is different, and according to the characteristics, the number of the error points corresponding to different fault types of the voltage regulator is subjected to statistical analysis by using a statistical learning idea, so that an error matching method is provided, and the fault type and the fault grade of the voltage regulator can be more effectively identified. In addition, the influence of various factors on the prediction result is considered, and data of each part of temperature, time, flow and pressure are completely utilized, so that the generalization performance and robustness of the algorithm are enhanced, and the practicability of the algorithm is improved.
Drawings
FIG. 1 is a flow chart of the algorithm of the present invention.
Fig. 2a) is a normal image of the voltage regulator output from the experiment of the present invention.
Fig. 2b) is a graph of the pressure regulator early warning I-off pressure high output from the experiment of the present invention.
Fig. 2c) is a graph of pressure regulator early warning I-gas pressure high output by the experiment of the present invention.
Fig. 2d) is a low image of the pressure regulator early warning I-gas pressure output by the experiment of the present invention.
Fig. 2e) is a voltage regulator early warning I-surge image output by the experiment of the present invention.
Fig. 2f) is a voltage regulator early warning II-closing pressure high image output by the experiment of the present invention.
Fig. 2g) is a pressure regulator early warning II-gas pressure high image output by the experiment of the present invention.
Fig. 2h) is the pressure regulator early warning II-gas pressure low image output by the experiment of the present invention.
Fig. 2i) is a voltage regulator early warning II-surge image output by the experiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to examples, but the embodiments of the present invention are not limited thereto.
As shown in fig. 1, the method for detecting faults of a medium-low pressure gas pressure regulator based on error matching in this embodiment includes the following steps:
step (a), training data is preprocessed;
step (b), an algorithm model is established, preprocessed training data are input, the algorithm model is trained, and the trained algorithm model is stored;
step (c), the test data is preprocessed;
inputting the preprocessed test data into the trained algorithm model, and outputting a predicted value of the pressure regulator;
and (e) performing error characteristic matching on the predicted value of the pressure regulator and the real pressure value of the pressure regulator, and outputting a corresponding fault grade and a corresponding fault type.
Step (a) is further detailed below:
step (a1), inputting the pressure regulator time, temperature T, flow F and pressure PtrueData cleaning is carried out on the data;
and a step (a2) of arranging and storing the data after washing in time.
Further, the specific process of step (a1) is as follows:
step (a11), according to the pressure type query data, constructing a one-dimensional array a, a ═ T, F, Ptrue];
A step (a12) of deleting an array a whose pressure data is lower than 0;
step (a13), a null array is established, the inquired one-dimensional array a is added, and a nested array A is formed, wherein A is [ a ]1,a2,a3…aM]。
Further, the specific process of step (a2) is as follows:
a step (a21) of inquiring the cleaned data according to the time sequence of 'year-month-day';
step (a22), recording month of month as month and hour as hour, arranging and storing in one-dimensional array a according to time sequence, a ═ month, hour, T, F, Ptrue]。
Step (b) is further detailed below:
step (b1), an algorithm model is established according to a random forest algorithm, and optimal parameters are searched for the algorithm model by using a random search algorithm;
step (b2), splitting the nested array A by using a ten-fold cross validation method;
step (b3), training the algorithm model with the optimal parameters by using the split training data;
and (b4) saving the trained algorithm model.
Further, the specific process of step (b1) is as follows:
step (b11), setting random numbers of random search, and generating random points continuously and randomly;
step (b12), for the random search algorithm, setting a constraint function f (x), an objective function g (x), calculating the values of the constraint function f (x) and the objective function g (x), judging the function as P (x), and according to the formula:
x=P(f(x)==g(x))
and comparing the values of the target functions of the points meeting the constraint conditions one by one, discarding bad points, and reserving good points, so as to iterate, and stopping when finding the approximate solution x of the optimal solution.
Further, the specific process of step (b2) is as follows:
step (b21), splitting the training data, namely the nested array A into ten parts, wherein each part is Dt,t=1,2,3…10;
Step (ii) of(b22) Sequentially selecting one as a test set DtestThe rest 9 are training set Dtrain
Further, the specific process of step (b3) is as follows:
a step (b31) of collecting the test set Dtest=[a1,a2,a3,…]Each of the one-dimensional arrays ai=[month,hour,T,F,Ptrue]Is split into ai(p)=[month,hour,T,F]And ai(o)=[Ptrue];
Step (b32), according to the random forest algorithm, converting the ai(p) as input to the tree, adding a toi(o) as child nodes of the tree, training a CART decision tree, wherein in the training process, the segmentation rule for each node is as follows: randomly selecting i features from all input features, then selecting an optimal cutting point from the i features, and then dividing left and right subtrees, and training the next CART decision tree by analogy;
step (b33), a plurality of decision tree fusion modes are set according to the forest algorithm, the leaf node weight of the CART decision tree sample points is set to be z, the number of decision trees is set to be n, the mean value of the leaf node weights of the n CART decision tree sample points is set to be y, and according to a formula:
Figure RE-GDA0002383509580000121
in the above formula, n is 100, and finally a single CART decision tree, i.e., a weak classifier, is combined into a plurality of CART decision trees, i.e., a strong classifier, and the mean value y of each node is saved, so that the trained algorithm model is obtained and saved.
Step (c) is further detailed below:
step (c1), inputting the pressure regulator time, temperature T, flow F and pressure PtrueData cleaning is carried out on the data;
a step (c2) of arranging and storing the data after washing in time;
further, the specific process of step (c1) is as follows:
step (c11), according to the pressure type query data, constructing a one-dimensional array c, c ═ T, F, Ptrue];
Step (c12), deleting the array c with the pressure data lower than 0;
step (C13), a null array is established, the inquired one-dimensional array C is added, and a nested array C is formed, wherein C is [ C ═ C [1,c2,c3…cM]。
Further, the specific process of step (c2) is as follows:
step (c21), the data after washing is inquired according to the time sequence of 'year-month-day';
and (c22) recording time month as month and hour as hour, arranging the time month and hour in the one-dimensional array c, and storing the time month and hour into the one-dimensional array c, wherein c is [ month, hour, T, F, Ptrue]。
Step (d) is further detailed below:
step (d1), reading the saved algorithm model after training;
step (d2), inputting the preprocessed test data into the trained algorithm model;
step (d3) of outputting the predicted value P of the pressure regulator pressureout
Further, the specific process of step (d2) is as follows:
step (d21), namely nesting the array C ═ C1,c2,c3,…cM]As a test data set, for each of said one-dimensional arrays ci=[month,hour,T,F,Ptrue]Split into ci(p)=[month,hour,T,F]And ci(o)=[Ptrue];
Step (d22), splitting ci(p) as input quantity, ci(o) as output to the trained algorithmic model.
Step (e) is further detailed below:
step (e1) for predicting the pressure of the output of the pressure regulatoroutWith the actual value P of the pressure in the pressure regulatortruePerforming error characteristic analysis;
and (e2) matching and outputting the corresponding fault type according to the error characteristics obtained by the error characteristic analysis.
Further, the specific process of step (e1) is as follows:
step (e11) of using the predicted value P of the pressure regulator output pressureoutWith the actual value P of the pressure in the pressure regulatortrueAccording to the formula
E=Ptrue-Pout
Recording an error value E;
step (e12), f1,f2For the early warning accuracy range of the voltage regulator, PaveThe average output pressure value of the pressure regulator is obtained, the number of the one-dimensional arrays C in the nested array C is M, and according to a formula:
Figure RE-GDA0002383509580000141
Figure RE-GDA0002383509580000142
wherein [. ]]Is an Everson bracket, the condition in the Everson bracket is 1 if the condition is satisfied, and is 0 if the condition is not satisfied, and S is recorded1,S2A value of (d);
step (e13), F is the flow rate, according to the formula:
Figure RE-GDA0002383509580000151
Figure RE-GDA0002383509580000152
step (a) wherein]Is an Everson bracket, the condition in the Everson bracket is 1 if the condition is satisfied and is 0 if the condition is not satisfied, and SF is recorded1,SF2A value of (d);
step (e14), according to the formula:
Figure RE-GDA0002383509580000153
Figure RE-GDA0002383509580000154
Figure RE-GDA0002383509580000155
Figure RE-GDA0002383509580000156
Figure RE-GDA0002383509580000157
Figure RE-GDA0002383509580000158
wherein [. ]]Is an Everson bracket, the condition in the Everson bracket is 1 if the condition is satisfied, and is 0 if the condition is not satisfied, and S is recorded31,S32,S41,S42,S51,S52The value of (c).
Further, the specific process of step (e2) is as follows:
Figure RE-GDA0002383509580000161
step (e21), set the output fault level as Out1α, β, γ are error fault point ratios, according to the formula:
in the above formula, α is 0.3, β is 0.5, γ is 0.1,
outputting the corresponding fault level, Out1If the output is normal, the equipment operates normally without maintenance; out1If the fault early warning I is output, the equipment has slight fault and needs to be maintained regularly; out1If the fault early warning II is output, the equipment is in serious fault and needs to be overhauled immediately;
step (e22), the output fault type is Out2According to the formula:
Figure RE-GDA0002383509580000162
and outputting the corresponding fault type.
The effects of the present embodiment can be verified and explained by the following performance analysis and simulation experiment tests.
The data source used in the experiment is Shanghai aviation energy resources, Inc. -Chaozhou Honghua meter reading system-gas pressure regulator data 2017-aveAccording to the value of (A), the middle-low pressure gas pressure regulator setting P for this experiment ave165, setting the early warning precision f of the voltage regulator according to different precision of the voltage regulator1,f2The voltage regulator used according to this example is set to f1=0.02,f2=0.05,。
And selecting about 1400 pieces of voltage regulator data of one day for testing by using the trained algorithm model. Because the number of fault samples is small, the fault diagnosis model of the medium-low pressure gas pressure regulator is tested by simulating fault data through original data.
Fig. 2a) is a normal image of the pressure regulator output by the experiment of the embodiment, wherein a curve a1 is a real value of the pressure regulator, a curve a2 is a test value of the pressure regulator, and a curve a3 is a flow rate.
Fig. 2b) is a graph of the pressure regulator early warning I-closing pressure high output by the experiment of the present embodiment, wherein a curve b1 is a real value of the pressure regulator, a curve b2 is a test value of the pressure regulator, and a curve b3 is the flow rate.
Fig. 2c) is an image of the pressure regulator level warning I output by the experiment of the present embodiment, i.e., an image of the high gas pressure, where a curve c1 is an actual value of the pressure regulator, a curve c2 is a test value of the pressure regulator, and a curve c3 is the flow rate.
Fig. 2d) is an image of the pressure regulator level warning I output by the experiment of the present embodiment, i.e., an image of low gas pressure, where a curve d1 is an actual value of the pressure regulator, a curve d2 is a test value of the pressure regulator, and a curve d3 is a flow rate.
Fig. 2e) is an image-surge image of the pressure regulator level warning I output in the experiment of this embodiment, where a curve e1 is a real value of the pressure regulator, a curve e2 is a test value of the pressure regulator, and a curve e3 is the flow rate.
According to image analysis, the predicted pressure value can be obviously distinguished from the real fault pressure value, which shows that the invention can well distinguish normal data from fault data so as to accurately identify the fault problem, ten sample data are tested by selecting sample simulation data of a voltage regulator for one day, and the accuracy rate of the test result is as follows:
fault early warning I test sample number Accuracy of test
1 88%
2 90%
3 91%
4 89%
5 90%
6 90%
7 89%
8 89%
9 86%
10 90%
TABLE 1
According to ten test results, the average accuracy of the test with the fault grade of the medium-low voltage regulator as the fault early warning I is 89%.
Fig. 2f) is a graph of the pressure regulator warning II — closing pressure high output in the experiment of this embodiment, where a curve f1 is the real value of the pressure regulator, a curve f2 is the test value of the pressure regulator, and a curve f3 is the flow rate.
Fig. 2g) is an image of the pressure regulator level warning II output by the experiment of this embodiment, i.e., an image of high gas pressure, where a curve g1 is an actual value of the pressure regulator, a curve g2 is a test value of the pressure regulator, and a curve g3 is a flow rate.
Fig. 2h) is an image of the pressure regulator level warning II output by the experiment of the present embodiment, that is, an image of low gas pressure, where a curve h1 is a real value of the pressure regulator, a curve h2 is a test value of the pressure regulator, and a curve h3 is a flow rate.
Fig. 2i) is an image-surge image of the pressure regulator level warning II output in the experiment of this embodiment, where a curve i1 is a real value of the pressure regulator, a curve i2 is a test value of the pressure regulator, and a curve i3 is a flow rate.
Compared with the fault level I, the method has the advantages that the difference between the real pressure image and the predicted pressure image of the fault level II is more obvious, the fault of the pressure regulator can be detected more easily, ten sample data are tested by selecting the sample simulation data of the pressure regulator for one day, and the accuracy of the test result is as follows:
Figure RE-GDA0002383509580000191
Figure RE-GDA0002383509580000201
TABLE 2
According to ten test results, the average accuracy of the test with the fault grade of the medium-low voltage regulator as the fault early warning II is 92%.
In the embodiment, by using the idea of discretization data, the pressure data segment is segmented in the step (b3) and the step (d2), so that the single sub-data segment is independently predicted, and compared with the mode of predicting the whole pressure data, the accuracy of the prediction result is increased; meanwhile, the adaptability of the device is obviously enhanced to deal with irregular pressure data.
In the embodiment, by using the statistical learning idea and aiming at the characteristics of the voltage regulator, the number of the error points of the voltage regulator corresponding to different fault types under different conditions is different, the statistical analysis is performed on the number of the error points of the voltage regulator corresponding to different fault types, and the error matching method is provided in the step (e), so that the fault type and the fault level of the voltage regulator can be more effectively identified.
In the embodiment, in the step (a) and the step (c), the influence of various factors on the prediction result is considered for the training data and the test data, and the data of each part of temperature, time, flow and pressure are completely utilized, so that the generalization performance and robustness of the algorithm are enhanced, and the practicability of the algorithm is improved.

Claims (10)

1. A fault detection method for a medium-low pressure gas pressure regulator based on error matching is characterized by comprising the following steps:
step (a), training data is preprocessed;
step (b), an algorithm model is established, the preprocessed training data is input to train the algorithm model, and the trained algorithm model is stored;
step (c), the test data is preprocessed;
inputting the preprocessed test data into the trained algorithm model, and outputting a predicted value of the pressure regulator;
and (e) carrying out error characteristic matching on the predicted value of the pressure regulator pressure and the real pressure value of the pressure regulator pressure, and outputting the corresponding fault grade and fault type.
2. The error matching-based medium and low pressure gas pressure regulator fault detection method according to claim 1, characterized in that:
wherein the step (a) comprises the steps of:
step (a1), for regulator time, temperature T, flow F, pressure P as said training datatrueConstructing a one-dimensional array a, a ═ T, F, Ptrue]Deleting the training data with the pressure data lower than 0, and constructing the one-dimensional array a to form a nested array A, wherein A is [ a ]1,a2,a3,…aM];
Step (a2), arranging corresponding data month mouth, hour, temperature T, flow F and pressure P according to time category for the training data after data cleaningtrueAnd storing in a one-dimensional array a, a ═ month, hour, T, F, Ptrue]。
3. The error matching-based medium and low pressure gas pressure regulator fault detection method according to claim 1, characterized in that:
wherein the step (b) comprises the steps of:
step (b1), the algorithm model is established according to a random forest algorithm, and the random search algorithm is used for searching the optimal parameters for the algorithm model;
step (b2), dividing the preprocessed training data into ten parts according to a cross validation method, and sequentially selecting one part as a test set DtestAnd the remaining 9 are used as training set Dtrain
And (b3) training the algorithm model with the optimal parameters found by using the split training data, and storing the trained algorithm model.
4. The error matching-based medium and low pressure gas pressure regulator fault detection method according to claim 3, characterized in that:
wherein the step (b3) comprises the steps of:
a step (b31) of collecting the test set Dtest=[a1,a2,a3,…]Each of the one-dimensional arrays ai=[month,hour,T,F,Ptrue]Is split into ai(p)=[month,hour,T,F]And ai(o)=[Ptrue];
Step (b32), according to the random forest algorithm, converting the ai(p) as input to the tree, adding a toi(o) as child nodes of the tree, training a CART decision tree, wherein the segmentation rule for each node in the training process is as follows:
randomly selecting i features from all input features, selecting an optimal cutting point from the i features, dividing left and right subtrees, and training a next CART decision tree in the same way;
step (b33), a plurality of decision tree fusion modes are set according to the forest algorithm, the leaf node weight of the CART decision tree sample points is set to be z, the number of decision trees is set to be n, the mean value of the leaf node weights of the n CART decision tree sample points is set to be y, and according to a formula:
Figure FDA0002289717010000031
in the above formula, n is 100, and finally a single CART decision tree, i.e., a weak classifier, is combined into a plurality of CART decision trees, i.e., a strong classifier, and the mean value y of each node is saved, so that the trained algorithm model is obtained and saved.
5. The error matching-based fault detection method for the medium-low pressure gas pressure regulator is characterized by comprising the following steps of:
wherein the step (c) comprises the steps of:
step (c1) of applying pressure regulator time, temperature T, flow F, pressure P as said test datatrueConstructing a one-dimensional array c, c ═ T, F, Ptrue]Deleting the test data with the pressure data lower than 0, and constructing the one-dimensional array C to form a nested array C, wherein C is [ C ═ C [ ]1,c2,c3,…cM];
Step (c2), arranging corresponding data month mouth, hour, temperature T, flow F and pressure P according to time category for the test data after data cleaningtrueAnd storing in a one-dimensional array c, c ═ month, hour, T, F, Ptrue]。
6. The error matching-based medium and low pressure gas pressure regulator fault detection method according to claim 1, characterized in that:
wherein the step (d) comprises the steps of:
step (d1), reading the saved algorithm model after training;
step (d2), inputting the preprocessed test data into the trained algorithm model;
step (d3), outputting the predicted value P of the pressure regulator pressureout
7. The error matching-based medium and low pressure gas pressure regulator fault detection method according to claim 6, characterized in that:
wherein the step (d2) comprises the steps of:
a step (d21) of setting the nested array C ═ C1,c2,c3,…cM]As a test data set, for each of said one-dimensional arrays ci=[month,hour,T,F,Ptrue]Split into ci(p)=[month,hour,T,F]And ci(o)=[Ptrue];
A step (d22) of splitting the ci(p) as an input quantity, said ci(o) as output to said trained algorithmic model.
8. The error matching-based fault detection method for the medium-low pressure gas pressure regulator is characterized by comprising the following steps of:
wherein the step (e) comprises the steps of:
step (e1) of predicting value P of output pressure of the pressure regulatoroutWith the true value P of the pressure in the pressure regulatortruePerforming error characteristic analysis;
and (e2) matching and outputting the corresponding fault type according to the error characteristics obtained by the error characteristic analysis.
9. The error matching-based medium and low pressure gas pressure regulator fault detection method according to claim 8, characterized in that:
wherein the step (e1) comprises the steps of:
a step (e11) of using the predicted value P of the pressure regulator output pressureoutWith the true value P of the pressure in the pressure regulatortrueAccording to the formula
E=Ptrue-Pout
Recording an error value E;
step (e12), set f1,f2For the early warning accuracy range of the voltage regulator, PaveThe number of the one-dimensional arrays C in the nested array C is M, and the average output pressure value of the pressure regulator is obtained according to a formula:
Figure FDA0002289717010000051
Figure FDA0002289717010000052
wherein [. ]]Is an Everson bracket, the condition in the Everson bracket is 1 if the condition is satisfied, and is 0 if the condition is not satisfied, and S is recorded1,S2A value of (d);
step (e13), F is the flow rate, according to the formula:
Figure FDA0002289717010000053
Figure FDA0002289717010000054
wherein [. ]]Is an Everson bracket, the condition in the Everson bracket is 1 if the condition is satisfied and is 0 if the condition is not satisfied, and SF is recorded1,SF2A value of (d);
step (e14), according to the formula:
Figure FDA0002289717010000061
Figure FDA0002289717010000067
Figure FDA0002289717010000062
Figure FDA0002289717010000063
Figure FDA0002289717010000064
Figure FDA0002289717010000065
wherein [. ]]Is an Everson bracket, the condition in the Everson bracket is 1 if the condition is satisfied, and is 0 if the condition is not satisfied, and S is recorded31,S32,S41,S42,S51,S52The value of (c).
10. The error matching-based medium and low pressure gas pressure regulator fault detection method according to claim 8, characterized in that:
wherein the step (e2) comprises the steps of:
step (e21), set the output fault level as Out1α, β, γ are error fault point ratios, according to the formula:
Figure FDA0002289717010000066
in the above formula, α is 0.3, β is 0.5, γ is 0.1,
outputting the corresponding fault level, Out1If the output is normal, the equipment operates normally without maintenance; out1If the fault early warning I is output, the equipment has slight fault and needs to be maintained regularly; out1If the fault early warning II is output, the equipment is in serious fault and needs to be overhauled immediately;
step (e22), set the output fault type as Out2According to the formula:
Figure FDA0002289717010000071
and outputting the corresponding fault type.
CN201911178051.2A 2019-11-26 2019-11-26 Error matching-based fault detection method for medium-low pressure gas pressure regulator Pending CN111026075A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911178051.2A CN111026075A (en) 2019-11-26 2019-11-26 Error matching-based fault detection method for medium-low pressure gas pressure regulator

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911178051.2A CN111026075A (en) 2019-11-26 2019-11-26 Error matching-based fault detection method for medium-low pressure gas pressure regulator

Publications (1)

Publication Number Publication Date
CN111026075A true CN111026075A (en) 2020-04-17

Family

ID=70206859

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911178051.2A Pending CN111026075A (en) 2019-11-26 2019-11-26 Error matching-based fault detection method for medium-low pressure gas pressure regulator

Country Status (1)

Country Link
CN (1) CN111026075A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112819107A (en) * 2021-04-16 2021-05-18 四川九门科技股份有限公司 Artificial intelligence-based fault prediction method for gas pressure regulating equipment
CN113944801A (en) * 2021-11-10 2022-01-18 华中科技大学无锡研究院 Method and device for detecting performance of gas pressure regulator based on data analysis

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100106458A1 (en) * 2008-10-28 2010-04-29 Leu Ming C Computer program and method for detecting and predicting valve failure in a reciprocating compressor
CN103257921A (en) * 2013-04-16 2013-08-21 西安电子科技大学 Improved random forest algorithm based system and method for software fault prediction
CN106093612A (en) * 2016-05-26 2016-11-09 国网江苏省电力公司电力科学研究院 A kind of method for diagnosing fault of power transformer
CN110310006A (en) * 2019-05-21 2019-10-08 北京市燃气集团有限责任公司 Gas pressure regulator, governor fault monitoring method and device
CN110363141A (en) * 2019-07-15 2019-10-22 郑州大学 Method for diagnosing gas pressure regulator, governor failure

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100106458A1 (en) * 2008-10-28 2010-04-29 Leu Ming C Computer program and method for detecting and predicting valve failure in a reciprocating compressor
CN103257921A (en) * 2013-04-16 2013-08-21 西安电子科技大学 Improved random forest algorithm based system and method for software fault prediction
CN106093612A (en) * 2016-05-26 2016-11-09 国网江苏省电力公司电力科学研究院 A kind of method for diagnosing fault of power transformer
CN110310006A (en) * 2019-05-21 2019-10-08 北京市燃气集团有限责任公司 Gas pressure regulator, governor fault monitoring method and device
CN110363141A (en) * 2019-07-15 2019-10-22 郑州大学 Method for diagnosing gas pressure regulator, governor failure

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
安小然 等: "中低压燃气调压器安全预警技术的优化实例", 《煤气与热力》 *
朱永伟 等: "基于VPMCD的变压器故障诊断方法", 《工业控制计算机》 *
薛钦枥 等: "供热锅炉用燃气调压器故障诊断方法及应用", 《煤气与热力》 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112819107A (en) * 2021-04-16 2021-05-18 四川九门科技股份有限公司 Artificial intelligence-based fault prediction method for gas pressure regulating equipment
CN112819107B (en) * 2021-04-16 2021-07-02 四川九门科技股份有限公司 Artificial intelligence-based fault prediction method for gas pressure regulating equipment
CN113944801A (en) * 2021-11-10 2022-01-18 华中科技大学无锡研究院 Method and device for detecting performance of gas pressure regulator based on data analysis
CN113944801B (en) * 2021-11-10 2023-05-09 华中科技大学无锡研究院 Gas pressure regulator performance detection method and device based on data analysis

Similar Documents

Publication Publication Date Title
CN110634080B (en) Abnormal electricity utilization detection method, device, equipment and computer readable storage medium
CN107949812A (en) For detecting the abnormal combined method in water distribution system
CN109491914B (en) High-impact defect report prediction method based on unbalanced learning strategy
CN111931868A (en) Time series data abnormity detection method and device
CN112756759B (en) Spot welding robot workstation fault judgment method
CN111343147B (en) Network attack detection device and method based on deep learning
CN105893876A (en) Chip hardware Trojan horse detection method and system
CN110880369A (en) Gas marker detection method based on radial basis function neural network and application
CN110502277A (en) A kind of bad taste detection method of code based on BP neural network
CN115343676B (en) Feature optimization method for positioning technology of redundant substances in sealed electronic equipment
KR102362872B1 (en) Method for refining clean labeled data for artificial intelligence training
CN111026075A (en) Error matching-based fault detection method for medium-low pressure gas pressure regulator
CN111950645A (en) Method for improving class imbalance classification performance by improving random forest
CN115204536A (en) Building equipment fault prediction method, device, equipment and storage medium
CN115329908A (en) Power transformer fault diagnosis method based on deep learning
CN113837266B (en) Software defect prediction method based on feature extraction and Stacking ensemble learning
CN111708865B (en) Technology forecasting and patent early warning analysis method based on improved XGboost algorithm
CN113554716A (en) Knowledge distillation-based tile color difference detection method and device
CN111105041B (en) Machine learning method and device for intelligent data collision
CN113283467A (en) Weak supervision picture classification method based on average loss and category-by-category selection
CN116304941A (en) Ocean data quality control method and device based on multi-model combination
CN113704073B (en) Method for detecting abnormal data of automobile maintenance record library
CN113657726B (en) Personnel risk analysis method based on random forest
CN113127342A (en) Defect prediction method and device based on power grid information system feature selection
ZUBEDI et al. Implementation of Winsorizing and random oversampling on data containing outliers and unbalanced data with the random forest classification method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20200417