Disclosure of Invention
In order to solve the problems, the invention provides a water pump unit fault diagnosis method based on an SGAN (serving gateway network), aiming at the problem of data synthesis and expansion of water pump unit fault data under the condition of a small sample, firstly, a two-stage countermeasure network synthesis mechanism is adopted, an attention mechanism is added into a second-stage network, the stability of the quality of the synthesized data is improved on the basis of the first-stage synthesized data, and then a DBN (database network) model is trained by using an expanded data set to realize the fault diagnosis of the water pump unit. The method makes full use of the feature fusion of the attention mechanism to the synthetic data of the primary countermeasure network and the original data, further improves the quality of the synthetic data by using the secondary countermeasure network, and solves the problems that the traditional GAN data training is unstable and the data quality is uncontrollable.
In order to solve the technical problems, the technical scheme adopted by the invention is as follows:
a water pump unit fault diagnosis method based on SGAN comprises the following steps:
step 1, acquiring various parameters of equipment when a water pump unit normally operates and various parameters of the equipment when various faults occur, and acquiring a parameter data set of the water pump unit equipment;
step 2, constructing a parameter matrix Z of the water pump unit equipment M ;
Step 3, establishing a secondary attention generation countermeasure network SGAN, and performing data synthesis processing on a water pump unit equipment parameter data set to expand the data set;
and 4, taking the expanded data set as input, calculating a probability value of the fault condition of the expanded data set by adopting a Deep Belief Network (DBN), and judging the fault type of the current water pump unit equipment according to the fault condition with the maximum probability value.
In the step 1, all parameters of the equipment during normal operation of the water pump unit and all parameters of the equipment during various faults include water pump temperature, water pump pressure, bearing rotating speed and throw.
In step 4, the fault conditions include temperature fault, pressure fault, rotating speed fault and swing fault.
The step 2 specifically comprises the following steps:
constructing parameter matrix Z of water pump unit equipment M :
wherein ,em ={ID m ,temperature m ,pressure m ,speed m ,swing m ,L},e m The parameter vector of the mth water pump unit equipment, ID is the serial number of the water pump unit equipment, temperature is a temperature parameter, pressure is a pressure parameter, speed is a rotating speed parameter, and swing is a swing parameter;
a water pump unit equipment parameter matrix Z is obtained by using the following formula (1) M The processing is carried out in an out-of-order way,
Z noise =Z M gRank(m) (1)
obtaining a noise matrix Z noise ,Z noise =[e no1 ,e no2 ,e no3 ,K,e nom ] T ;
wherein ,enom Is the m-th noise vector.
The step 3 specifically comprises the following steps:
step 3.1, constructing a primary countermeasure network, and converting the noise matrix Z into a noise matrix noise As an input to the primary generator S ', the primary generator S' synthesizes new data from the input data; the primary countermeasure network comprises a primary generator S 'and a primary discriminator P';
step 3.2, setting a parameter matrix Z of the water pump unit equipment M The new data synthesized by the first-stage generator S 'is used as the input of a first-stage discriminator P', and the first-stage discriminator P 'discriminates whether the new data synthesized by the first-stage generator S' and a parameter matrix Z of the water pump unit equipment M The data in (1) are consistent: if yes, executing step 3.3; otherwise, the primary countermeasure network feeds back to the primary generator S ' according to the result gradient of the primary discriminator P ', and repeats the countermeasure training of the step 3.1 and the step 3.2 until the synthesized new data passes the discrimination of the primary discriminator P '; parameter matrix Z of water pump unit equipment M The data in (1) is original equipment data; finally, the product is processedOutputting a first-level synthesis information matrix Z N ’:
wherein ,en '={ID n ',temperature n ',pressure n ',speed n ',swing n ',L},e n ' is the nth device parameter vector of the first-level synthesis; first order composite information matrix Z N The data in' is primary synthesized equipment data;
3.3, introducing an attention mechanism to realize interactive fusion of the primary synthesized equipment data and the original equipment data, and calculating a vector pair of the primary synthesized equipment data and the original equipment data by using a formula (3)<e m ,e n ’>Attention coefficient of (a) m,n :
α m,n =e m ge n ' (3)
Further obtaining the attention vector alpha of the nth primary synthesized equipment parameter by the formula (4) n :
And constructing a primary synthesized equipment parameter-original equipment parameter interaction matrix A:
A=[α 1 ;α 2 ;α 3 ;L;α N ]
wherein N represents N attention vectors;
step 3.4, the equipment parameter-original equipment parameter interaction matrix A synthesized in the first stage is used as the input of a secondary generator S' and new data is synthesized; the secondary countermeasure network includes a secondary generator S 'and a secondary discriminator P';
step 3.5, the equipment parameter interactive matrix A synthesized by the first stage synthesis is used as the new data synthesized by the second stage generator S 'as the input of the second stage discriminator P', and the second stage discriminator P 'discriminates the new data synthesized by the second stage generator S'Whether data are matched with parameter matrix Z of water pump unit equipment M Data in (2) are consistent: if yes, outputting a secondary synthetic data vector; otherwise, the secondary countermeasure network feeds back to the secondary generator S "according to the result gradient of the secondary discriminator P", and repeats the countermeasure training of the step 3.4 and the step 3.5 until the synthesized new data passes the discrimination of the secondary discriminator P ";
step 3.6, the two-stage synthesized equipment data and the original equipment data form an extended data matrix Z together EX :
wherein ,e
f EX ={ID
f EX ,temperature
f EX ,pressure
f EX ,speed
f EX ,swing
f EX ,L},
And f, expanding the parameter vector of the second-level synthesized device to obtain an expanded data set.
The objective function of the primary countermeasure network is as follows (2):
wherein ,
representing the expectation that the original equipment parameter vector e is judged as a real sample by a first-level discriminator P';
the device parameter vector representing the first-order synthesis is judged by a first-order discriminator P 'as the expectation of a true sample, where S' (e)
no ) Representing the parameter vector e of the first-order generator S' according to the noise matrix
no New data synthesized by the input data; p '(S' (e)
no ) Is represented by the aboveThe new data is input to the primary discriminator P'.
The objective function of the secondary countermeasure network is as follows (5):
wherein e represents the original device parameter vector, e' represents the device parameter vector of the primary synthesis,
representing the expectation that the secondary discriminator P' judges the original equipment parameter vector e as a real sample; e
α~A [log(1-P”(S”(α)))]The representation secondary arbiter P "in combination with the attention mechanism determines the expectation that the two-level synthesized device parameter vector is a true sample.
The step 4 specifically comprises the following steps: constructing a DBN model, wherein the DBN model comprises a DBN model bottom formed by sequentially overlapping a plurality of limited Boltzmann machines (RBMs) and a model top layer used for processing calculation results of the limited Boltzmann machines (RBMs), and the model top layer is a Softmax classifier;
expanding the two-level synthesized device parameter vector e EX Inputting a visible layer v of a first layer restricted Boltzmann machine RBM 1 I.e. v 1 =e EX Calculating the visible layer v by the formula (6) i Hidden layer l j Probability of activation:
wherein ,w
ij Representing a visible layer v
i And a hidden layer l
j The connection weight of (1); r is
i Representing a visible layer v
i A bias coefficient;
sigmoid (b) is an activation function, and the parenthesis content in b in sigmoid (b) in expression (6);
and (3) inputting the final output result of the equation (6) into a Softmax classifier at the top layer of the DBN model, wherein the Softmax classifier is expressed as the equation (7):
and (4) calculating a probability value of the fault condition of the secondary synthesized equipment data according to the formula (7), and judging the fault type of the current water pump unit equipment by taking the fault condition with the maximum probability value as a basis.
The limited Boltzmann machine RBM is composed of x visible layers v and y hidden layers l;
the hyperparameter of the restricted boltzmann machine RBM is θ = { w, r, u }, where w represents a connection weight of any two visible layers and hidden layers, r represents a visible layer bias coefficient, and u represents a hidden layer bias coefficient.
The invention has the following beneficial effects:
1. aiming at the problem that the fault data of the water pump unit is difficult to label, the small sample data is adopted as the experimental data set, so that the waste of manpower and time can be greatly reduced in practical application.
2. The invention provides a water pump unit fault diagnosis method based on SGAN (serving gateway access network) on the basis of generation of a countermeasure network, which is characterized in that firstly, aiming at the problem of data synthesis and expansion of water pump unit fault data under a small sample condition, a secondary countermeasure network synthesis mechanism is adopted, and an attention mechanism is added into a secondary network, so that the stability of the quality of synthesized data is improved on the basis of primary synthesized data, and the problems of unstable training and uncontrollable data quality of the traditional GAN (gateway access network) data are solved.
The invention discloses a water pump set fault diagnosis method based on an SGAN (serving gateway), which aims at the problem that fault samples in monitoring data (including vibration signals, displacement signals, swing signals, temperature signals, rotating speed signals and the like) in the operation process of a water pump set are insufficient, so that equipment faults cannot be diagnosed accurately and effectively in time. According to the invention, the GAN network is introduced to preprocess the fault data, so that the problem that the fault diagnosis model cannot be trained more effectively due to the low quality of the data generated by the traditional GAN model is solved, and the accuracy of the fault diagnosis result can be effectively improved.
Detailed Description
The present invention will be explained in further detail with reference to the drawings and embodiments. The specific embodiments described herein are merely illustrative of the invention and are not intended to be limiting.
Referring to fig. 1 to 2, the present embodiment provides a water pump unit fault diagnosis method based on an SGAN, which includes the following specific steps,
step 1, acquiring various parameters of equipment when the water pump unit normally operates and various parameters of the equipment when various faults occur (water pump temperature, water pump pressure, bearing rotating speed, throw and the like) to obtain a data set of the equipment parameters of the water pump unit.
Step 2, constructing a parameter matrix Z of the water pump unit equipment M :
wherein ,em ={ID m ,temperature m ,pressure m ,speed m ,swing m ,L},e m The parameter vector of the mth equipment, the ID is the equipment number, namely the number of the water pump unit equipment, the temperature is the temperature parameter, the pressure is the pressure parameter, the speed is the rotating speed parameter, and the swing is the swing parameter.
Water pump unit equipment parameter matrix Z by using formula (1) M The processing is carried out in an out-of-order way,
Z noise =Z M gRank(m) (1)
wherein, formula (1) is as water pump unit equipment parameter matrix Z M Based on the results obtained from formula (1) and Z M The matrix dimensions are the same and are all m;
obtaining a noise matrix Z noise :
Z noise =[e no1 ,e no2 ,e no3 ,K,e nom ] T
wherein ,enom Is the mth noise vector;
step 3, specifically comprising the following steps:
step 3.1, constructing a primary countermeasure network, and setting a parameter matrix Z of the water pump unit equipment M Out-of-order processing to obtain a noise matrix Z noise ,Z noise =[e no1 ,e no2 ,e no3 ,K,e nom ] T As an input to the primary generator S ', the primary generator S' synthesizes new data from the input data; the primary countermeasure network comprises a primary generator S 'and a primary discriminator P';
step 3.2, setting a parameter matrix Z of the water pump unit equipment M The new data synthesized by the first-level generator S 'is used as the input of a first-level discriminator P', and the first-level discriminator P 'discriminates whether the new data synthesized by the first-level generator S' is identical to the original data (namely, the parameter matrix Z of the water pump unit equipment) M ) And (3) consistency: if yes, executing step 3.3; otherwise, the primary countermeasure network feeds back to the primary generator S ' according to the result gradient of the primary discriminator P ', and repeats the countermeasure training of the step 3.1 and the step 3.2 until the synthetic data passes the discrimination of the primary discriminator P '.
The objective function of the primary countermeasure network is as follows (2):
wherein ,
representing the originalThe device parameter vector e of (1) is judged as the expectation of a real sample by a first-stage discriminator P';
the device parameter vector representing the first-order synthesis is judged by a first-order discriminator P 'as the expectation of a true sample, where S' (e)
no ) Representing the parameter vector e of the first-order generator S' according to the noise matrix
no New data synthesized by the input data; p '(S' (e)
no ) Represents the input of the first-stage discriminator P' with the new data; finally outputting a first-level synthesis information matrix Z
N ’:
wherein ,en '={ID n ',temperature n ',pressure n ',speed n ',swing n ',L},e n ' is the nth device parameter vector of the first-level synthesis;
step 3.3, the attention mechanism is introduced to realize the equipment data (namely Z) of the first-stage synthesis N Data in) with raw water pumping equipment data (i.e., Z) M Data in (2) and calculating a pair of primary synthesized equipment data and original water pump equipment data vectors by using formula (3)<e m ,e n ’>Attention coefficient of (a) m,n :
α m,n =e m ge n ' (3)
Further obtaining the attention vector alpha of the nth primary synthesized equipment parameter by the formula (4) n :
And constructing a primary synthesized equipment parameter-original equipment parameter interaction matrix A:
A=[α 1 ;α 2 ;α 3 ;L;α N ]
wherein,n represents N attention vectors; alpha is alpha n An attention vector representing the nth primary synthesized device parameter;
step 3.4, the primary synthesized equipment parameter-original equipment parameter interaction matrix A is used as the input of a secondary generator S' and new data is synthesized; the secondary countermeasure network includes a secondary generator S 'and a secondary discriminator P';
step 3.5, the interaction matrix A of the parameters of the primary synthesis equipment and the parameters of the primary equipment is used as the input of a secondary generator S 'synthesized new data as the input of a secondary discriminator P', and the secondary discriminator P 'discriminates whether the new data synthesized by the secondary generator S' is combined with the original data (namely, the parameter matrix Z of the equipment of the water pump unit) M ) And (3) consistency: if yes, outputting a secondary synthetic data vector; otherwise, the secondary countermeasure network feeds back to the secondary generator S "according to the result gradient of the secondary discriminator P", and repeats the countermeasure training of the step 3.4 and the step 3.5 until the synthetic data passes the discrimination of the secondary discriminator P ".
The objective function of the secondary countermeasure network is as follows (5):
wherein e represents the original equipment data vector of the water pump, namely the original equipment parameter vector, e' represents the equipment parameter vector synthesized in the first stage,
representing the expectation that the secondary discriminator P' judges the original equipment parameter vector e as a real sample; e
α~A [log(1-P”(S”(α)))]Representing the expectation that the two-stage discriminator P' combines with an attention mechanism to judge the equipment parameter vector of the two-stage synthesis as a real sample;
step 3.6, the equipment data of the second-stage synthesis and the equipment data of the raw water pump unit form an extended data matrix Z EX :
wherein ,e
f EX ={ID
f EX ,temperature
f EX ,pressure
f EX ,speed
f EX ,swing
f EX ,L},
Is the f-th two-stage synthesized device expansion parameter vector;
and 4, constructing a DBN model, wherein the bottom of the DBN model is formed by sequentially overlapping 5 Restricted Boltzmann Machines (RBMs), and the obtained result is finally sent to a model top Softmax classifier to judge the fault type. The top classifier is a softmax classifier and is used for processing the calculation results of 5 RBMs. The RBM consists of x visible layers v and y hidden layers i. The hyperparameter of the RBM is θ = { w, r, u }, where w represents the connection weight of any two visible layers and hidden layers, r represents the visible layer bias coefficient, and u represents the hidden layer bias coefficient.
Expanding the two-level synthesized device parameter vector e EX Inputting visible layer v of first layer RBM 1 I.e. v 1 =e EX Calculating the visible layer v by the equation (6) i Hidden layer l j Probability of activation:
wherein ,w
ij Represents a visible layer v
i And a hidden layer l
j The connection weight of (1); r is
i Representing a visible layer v
i A bias coefficient;
sigmoid (b) is an activation function, and the parenthesis content in b in sigmoid (b) in expression (6);
and (3) inputting the final output result of the equation (6) into a top-level classifier of the DBN model, wherein the final output result is expressed as the equation (7):
the probability value of a certain fault condition (which may include temperature fault, pressure fault, rotation speed fault and swing fault, and specifically what needs to be determined according to the actual condition) reflected by the two-stage synthesized equipment data is calculated by the formula (7), and then the fault condition with the maximum probability value is taken as the basis for judging the fault state of the current equipment.
In the description provided herein, numerous specific details are set forth. It is understood, however, that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be interpreted as reflecting an intention that: that the invention as claimed requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this invention.
Those skilled in the art will appreciate that the modules or units or groups of devices in the examples disclosed herein may be arranged in a device as described in this embodiment, or alternatively may be located in one or more devices different from the devices in this example. The modules in the foregoing examples may be combined into one module or may be further divided into multiple sub-modules.
Those skilled in the art will appreciate that the modules in the devices in an embodiment may be adaptively changed and arranged in one or more devices different from the embodiment. Modules or units or groups in embodiments may be combined into one module or unit or group and may furthermore be divided into sub-modules or sub-units or sub-groups. All of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or elements of any method or apparatus so disclosed, may be combined in any combination, except combinations where at least some of such features and/or processes or elements are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Moreover, those skilled in the art will appreciate that although some embodiments described herein include some features included in other embodiments, not others, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments. For example, in the following claims, any of the claimed embodiments may be used in any combination.
Furthermore, some of the described embodiments are described herein as a method or combination of method elements that can be performed by a processor of a computer system or by other means of performing the described functions. A processor having the necessary instructions for carrying out the method or method elements thus forms a means for carrying out the method or method elements. Further, the elements of the apparatus embodiments described herein are examples of the following apparatus: the apparatus is used to implement the functions performed by the elements for the purpose of carrying out the invention.
The various techniques described herein may be implemented in connection with hardware or software or, alternatively, with a combination of both. Thus, the methods and apparatus of the present invention, or certain aspects or portions thereof, may take the form of program code (i.e., instructions) embodied in tangible media, such as floppy diskettes, CD-ROMs, hard drives, or any other machine-readable storage medium, wherein, when the program is loaded into and executed by a machine, such as a computer, the machine becomes an apparatus for practicing the invention.
In the case of program code execution on programmable computers, the computing device will generally include a processor, a storage medium readable by the processor (including volatile and non-volatile memory and/or storage elements), at least one input device, and at least one output device. Wherein the memory is configured to store program code; the processor is configured to perform the method of the invention according to instructions in said program code stored in the memory.
By way of example, and not limitation, computer readable media may comprise computer storage media and communication media. Computer-readable media includes both computer storage media and communication media. Computer storage media store information such as computer readable instructions, data structures, program modules or other data. Communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media. Combinations of any of the above are also included within the scope of computer readable media.
As used herein, unless otherwise specified the use of the ordinal adjectives "first", "second", "third", etc., to describe a common object, merely indicate that different instances of like objects are being referred to, and are not intended to imply that the objects so described must be in a given sequence, either temporally, spatially, in ranking, or in any other manner.
While the invention has been described with respect to a limited number of embodiments, those skilled in the art, having benefit of this description, will appreciate that other embodiments can be devised which do not depart from the scope of the invention as described herein. Furthermore, it should be noted that the language used in the specification has been principally selected for readability and instructional purposes, and may not have been selected to delineate or circumscribe the inventive subject matter. Accordingly, many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the appended claims. The present invention has been disclosed in an illustrative rather than a restrictive sense, and the scope of the present invention is defined by the appended claims.