Large-scale natural gas compressor vibration abnormity monitoring system and method

By building an adversarial domain adaptive network model, using Swin Transformer and cross-entropy loss function to optimize the fault diagnosis of large natural gas compressors, the shortcomings in the existing system in model and operating conditions are solved, efficient fault monitoring and automatic detection are achieved, and the safety and economicality of the equipment are ensured.

CN120369100APending Publication Date: 2025-07-25INNER MONGOLIA WESTERN NATURAL GAS PIPELINE OPERATION CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510514955.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-23
Publication Date
2025-07-25

AI Technical Summary

Technical Problem

The existing fault diagnosis system has weak model generalization capabilities in large natural gas compressors, and it is impossible to accurately identify compressor data from different models and under different operating conditions, resulting in low fault diagnosis accuracy and efficiency.

Method used

Adversarial domain adaptive network model is adopted, and feature generators and tag classifiers are constructed using Swin Transformer. By acquiring and labeling historical vibration data, the network model is trained to identify fault data and normal data, and the cross entropy loss function and KL divergence loss function are used to optimize the model to realize the monitoring of compressor vibration.

Benefits of technology

It improves the accuracy of compressor vibration monitoring, realizes automatic abnormality detection, reduces maintenance costs and unexpected costs, and ensures the safe and reliable operation of the compressor.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120369100A_ABST
    Figure CN120369100A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of fault diagnosis, in particular to a vibration abnormity monitoring system and method for a large natural gas compressor, and the method comprises the steps: obtaining first historical vibration data, second historical vibration data, and time-frequency spectrograms corresponding to the first historical vibration data and the second historical vibration data; the method comprises the following steps: constructing an adversarial domain adaptive network model on the basis of swin transformer; training the network model to obtain a final network model; and monitoring the vibration result of the compressor. According to the invention, the accuracy of fault diagnosis is improved, automatic anomaly detection and alarm are realized, and the subsequent maintenance efficiency is 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 fault diagnosis, and particularly to a vibration anomaly monitoring system and method for a large natural gas compressor. Background Art

[0002] Modern production generally requires long-term continuous operation of natural gas compressors. Once these devices fail, it is often a serious accident, which will cause heavy economic losses. In order to ensure the safe and reliable operation of these devices.

[0003] Currently, the commonly used maintenance methods are mainly regular manual inspections and alarms at key positions in the central control room. Since manual inspections not only consume a large amount of manpower but also incompletely collect the operation state information of the compressor by humans, it may lead to missed judgment of faults and low maintenance efficiency; while the alarms at key positions in the central control room have few sensors and only target major accident areas, so potential hazards may be exacerbated and economic losses may become larger. Moreover, the existing fault diagnosis systems have weak model generalization ability and cannot accurately identify the compressor data under different models and different working conditions, resulting in low accuracy and efficiency of fault diagnosis.

[0004] Therefore, it is necessary to provide a vibration anomaly monitoring system and method for a large natural gas compressor to solve the above problems. Summary of the Invention

[0005] The present invention provides a vibration anomaly monitoring system and method for a large natural gas compressor to solve the problem that the existing fault diagnosis systems have weak model generalization ability and cannot accurately identify the compressor data under different models and different working conditions, resulting in low accuracy and efficiency of fault diagnosis.

[0006] The vibration anomaly monitoring system and method for a large natural gas compressor of the present invention adopt the following technical solutions, including: Obtain the first historical vibration data of the compressor to be measured and the second historical vibration data of the compressor with labels, and obtain the time-frequency spectrograms corresponding to the first historical vibration data and the second historical vibration data. Among them, both the first historical vibration data and the second historical vibration data are the same vibration signal among the engine valve vibration signal, engine piston vibration signal, engine crankshaft vibration signal, compressor valve vibration signal, compressor crosshead vibration signal, compressor crankshaft vibration signal, and compressor piston vibration signal; Construct a network model for adversarial domain adaptation. The network model includes: a feature generator and two label classifiers. The feature generator adopts the network structure and parameters of the migrated Swin Transformer; the feature generator is used to extract and encode the time-frequency spectrograms corresponding to the first historical vibration data and the second historical vibration data respectively, and make the distribution of the feature encoding close to the standard Gaussian distribution; the label classifier is used to classify the first historical vibration data or the second historical vibration data according to the feature data after feature encoding, and the classification results are the fault data and normal data in the first historical vibration data or the second historical vibration data; Construct the first loss function of the network model according to the vector composed of the feature encoding output by the feature generator and the standard Gaussian distribution vector, and the cross-entropy loss function constructed by the classification results of the two label classifiers and the labels; use the time-frequency spectrogram corresponding to the second historical vibration data as the input quantity and combine the label corresponding to the second historical vibration data to train the network model to obtain the initially trained first target network model; Input the time-frequency spectrogram corresponding to the first historical vibration data into the first target network model, and construct the second loss function according to the difference between the output results of the two label classifiers of the first target network model when the time-frequency spectrogram of the first historical vibration data is input and the first loss function. Fix the feature generator of the first target network model, and update the two label classifiers of the first target network model according to the second loss function to obtain the second target network model; Input the time-frequency spectrogram corresponding to the first historical vibration data into the second target network model, and construct the third loss function according to the vector composed of the feature encoding output by the feature generator of the second target network model and the standard Gaussian distribution vector and the difference between the output results of the two label classifiers; fix the label classifiers of the second target network model, and update the feature generator of the second target network model according to the third loss function; until the weighted sum of the first loss function, the second loss function and the third loss function is the smallest, and obtain the trained final network model; Input the current vibration data of the compressor to be tested into the final network model, and output the vibration monitoring result of the compressor to be tested.

[0007] Preferably, the expression of the first loss function of the network model is:

[0008] In the formula, represents the first loss function of the network model; represents the binary cross-entropy loss function corresponding to the first label classifier in the network model; represents the binary cross-entropy loss function corresponding to the second label classifier in the network model; It represents the KL divergence loss function constructed by the vector composed of the feature codes output by the feature generator when the second historical vibration data is input and the standard Gaussian distribution vector; It is the time-frequency spectrogram corresponding to the second historical vibration data; It is the label value corresponding to the second historical vibration data; It is the hyperparameter for balancing the loss.

[0009] Preferably, the expression of the binary cross-entropy loss function corresponding to the first label classifier in the network model is:

[0010] In the formula, It represents the binary cross-entropy loss function corresponding to the first label classifier in the network model; It represents the data volume of the second historical vibration data; It represents the label corresponding to the i-th second historical vibration data; It represents the time-frequency spectrogram corresponding to the i-th second historical vibration data; It represents the first label classifier; It represents the vector composed of the feature codes output by the feature generator.

[0011] Preferably, the expression of the binary cross-entropy loss function corresponding to the second label classifier in the network model is:

[0012] In the formula, It represents the binary cross-entropy loss function corresponding to the second label classifier in the network model; It represents the data volume of the second historical vibration data; It represents the label corresponding to the i-th second historical vibration data; It represents the time-frequency spectrogram corresponding to the i-th second historical vibration data; It represents the second label classifier; It represents the vector composed of the feature codes output by the feature generator.

[0013] Preferably, the expression of the KL divergence loss function is:

[0014] In the formula, It represents the KL divergence loss function; It represents the total amount of the second historical vibration data; It represents the standard Gaussian distribution vector; It represents the vector composed of the feature codes output by the feature generator when the time-frequency spectrogram corresponding to the second historical vibration data is input into the network model; Represents the time-frequency spectrogram corresponding to the i-th data of the second historical vibration data.

[0015] Preferably, the expression of the second loss function is:

[0016] In the formula, Represents the binary cross-entropy loss function corresponding to the first label classifier in the target network model; Represents the binary cross-entropy loss function corresponding to the second label classifier in the target network model; Represents the KL divergence loss function constructed by the vector composed of the feature encoding output by the feature generator when the second historical vibration data is input and the standard Gaussian distribution vector; Is the hyperparameter for balancing the loss; Represents the result difference loss function composed of the difference between the output results of the two label classifiers when the time-frequency spectrogram of the first historical vibration data is input into the first target network model.

[0017] Preferably, the expression of the result difference loss function is:

[0018] In the formula, Represents the output result of the first label classifier when the time-frequency spectrogram of the first historical vibration data is input into the first target network model; Represents the output result of the second label classifier when the time-frequency spectrogram of the first historical vibration data is input into the first target network model; Represents the data volume of the first historical vibration data.

[0019] Preferably, the expression of the third loss function:

[0020] In the formula, Represents the third loss function; Represents the alignment loss function composed of the vector formed by the feature encoding output by the feature generator when the time-frequency spectrogram corresponding to the first historical vibration data is input into the second target network model and the standard Gaussian distribution vector; Is the hyperparameter of the loss weight; Represents the result difference loss function composed of the difference between the output results of the two label classifiers when the time-frequency spectrogram of the first historical vibration data is input into the second target network model; Represents the time-frequency spectrogram corresponding to the first historical vibration data.

[0021] Preferably, the expression of the alignment loss function:

[0022] In the formula, is the L1 norm; represents the data volume of the first historical vibration data; represents a vector composed of the feature encodings output by the feature generator when the spectrogram corresponding to the first historical vibration data is input into the second target network model; represents a standard Gaussian distribution vector; represents the spectrogram corresponding to the j-th data of the first historical vibration data.

[0023] A technical solution of a vibration anomaly monitoring system for a large natural gas compressor according to the present invention includes: A data acquisition and processing module, configured to obtain the first historical vibration data of the compressor to be measured and the second historical vibration data of the compressor with labels, and obtain the spectrograms corresponding to the first historical vibration data and the second historical vibration data, wherein both the first historical vibration data and the second historical vibration data are the same vibration signal among the engine valve vibration signal, the engine piston vibration signal, the engine crankshaft vibration signal, the compressor valve vibration signal, the compressor crosshead vibration signal, the compressor crankshaft vibration signal, and the compressor piston vibration signal; A network model construction module, configured to construct an adversarial domain adaptation network model, the network model including: a feature generator and two label classifiers, and the feature generator adopts the network structure and parameters of a migrated Swin Transformer; the feature generator is configured to respectively perform feature extraction and encoding on the spectrograms corresponding to the first historical vibration data and the second historical vibration data, and make the distribution of the feature encodings close to the standard Gaussian distribution; the label classifier is configured to classify the first historical vibration data or the second historical vibration data according to the feature data after feature encoding, and the classification results are the fault data and the normal data in the first historical vibration data or the second historical vibration data; A network model training module is used to construct a first loss function of the network model based on the vector composed of the feature encodings output by the feature generator and the standard Gaussian distribution vector, as well as the cross-entropy loss function constructed by the classification results of two label classifiers and the labels; use the spectrogram corresponding to the second historical vibration data as the input quantity and combine it with the label corresponding to the second historical vibration data to train the network model to obtain a preliminarily trained first target network model; input the spectrogram corresponding to the first historical vibration data into the first target network model, and construct a second loss function based on the difference between the output results of the two label classifiers of the first target network model input with the spectrogram of the first historical vibration data and the first loss function. Fix the feature generator of the first target network model, and update the two label classifiers of the first target network model according to the second loss function to obtain a second target network model; input the spectrogram corresponding to the first historical vibration data into the second target network model, and construct a third loss function based on the vector composed of the feature encodings output by the feature generator of the second target network model and the standard Gaussian distribution vector and the difference between the output results of the two label classifiers; fix the label classifiers of the second target network model, and update the feature generator of the second target network model according to the third loss function; until the weighted sum of the first loss function, the second loss function, and the third loss function is minimized to obtain a trained final network model; A monitoring result prediction module is used to input the current vibration data of the compressor to be measured into the final network model and output the vibration monitoring result of the compressor to be measured.

[0024] The beneficial effects of the present invention are: By collecting the first historical vibration data of the compressor to be measured and the second historical vibration data of the compressor with labels, obtaining the time-frequency spectrograms corresponding to the first historical vibration data and the second historical vibration data, constructing a network model, first using the second historical vibration data and the corresponding labels to preliminarily train the network model to obtain the first target network model, and then, based on the first target network model, inputting the time-frequency spectrograms of the first historical vibration data and the second historical vibration data into the first target network model, constructing a second loss function according to the difference between the first loss function corresponding to the input of the time-frequency spectrogram of the second historical vibration data into the first target network model and the two label classifiers when the time-frequency spectrogram of the first historical vibration data is input into the first target network model, and then, based on the second loss function, updating the label classifier of the first target network model to minimize the recognition error of the second historical vibration data while maximizing the output divergence of the two label classifiers on the target compressor data. Finally, using the vector composed of the feature encoding of the output of the feature generator in the updated second target network model input with the first historical vibration data and the standard Gaussian distribution vector, as well as the difference between the output results of the two label classifiers, constructing a third loss function, fixing the label classifier of the second target network model, and updating the feature generator of the second target network model to minimize the output divergence of the two label classifiers on the first historical vibration data while promoting the feature distribution of the first historical vibration data to be close to the standard Gaussian distribution, so as to achieve the purpose of recognizing historical vibration data, and through continuous iterative repetition of the training process, finally obtaining the final network model when the weighted sum of the first loss function, the second loss function and the third loss function is the smallest. Using the final network model, the vibration monitoring result of the compressor can be recognized according to the historical vibration data of the current compressor, thereby improving the accuracy of the compressor vibration monitoring result. 2. By using a piezoelectric acceleration sensor to collect the signals of all vibration points related to moving parts, converting the analog signals into digital signals by a data acquisition device, inputting them into the industrial control computer on site and storing them in the system database, and performing abnormal state detection through a server, automatic abnormal detection is realized, digital management of the compressor is realized, accidental accidents can be effectively avoided, the operation and maintenance of the compressor can be correctly guided, and the maintenance cost and accidental cost are reduced. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0026] Figure 1 It is a schematic diagram of the overall structure of an embodiment of a method for monitoring abnormal vibration of a large natural gas compressor according to the present invention; Figure 2 Schematic diagram of vibration measurement points during data acquisition for a method for monitoring abnormal vibration of a large natural gas compressor according to the present invention; Figure 3 System block diagram of a device for monitoring abnormal vibration of a large natural gas compressor according to the present invention; Figure 4 Time-frequency spectrum diagram in a method for monitoring abnormal vibration of a large natural gas compressor according to the present invention; Figure 5 Schematic diagram of the structure of a network model in a method for monitoring abnormal vibration of a large natural gas compressor according to the present invention; Figure 6 Confusion matrix diagram of the training result of a network model in a method for monitoring abnormal vibration of a large natural gas compressor according to the present invention. Detailed implementation manner

[0027] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

[0028] An embodiment of a method for monitoring abnormal vibration of a large natural gas compressor according to the present invention is as Figure 1 shown and includes: S1. Obtain first historical vibration data and second historical vibration data, and the time-frequency spectrum diagrams corresponding to the first historical vibration data and the second historical vibration data; Step 11. Use the historical vibration data of the compressor to be measured as the first historical vibration data, and the historical vibration data of the compressor with labels as the second historical vibration data. Among them, the obtaining steps of the first historical vibration data and the second historical vibration data are: In this embodiment, the specific measuring points of the compressor are distributed around the moving parts of the compressor, and the historical vibration data of all vulnerable and important moving parts should be collected as much as possible to improve the comprehensiveness and reliability of abnormality detection; and they should be as close to the vibration source as possible, so that the signal interference in the collected signal is relatively small, the fault characteristics are relatively prominent, and the difficulty of signal analysis is also reduced. Since the function of the engine valve is to control the engine input air, fuel gas and exhaust gas through opening and closing; and the valve is constantly making high-speed reciprocating motion under high temperature conditions, it is susceptible to wear and corrosion and fatigue, so the first type of measuring points are distributed in the middle section of the left side of the engine cylinder head, mainly detecting the vibration signal from the engine valve; the function of the engine piston is to compress the fuel gas and improve the combustion efficiency of the fuel gas; and the piston is constantly making high-speed reciprocating motion under high temperature environment, bearing alternating mechanical loads, and is susceptible to wear and corrosion, so the second type of measuring points are distributed on the lower right side of the outside of the combustion chamber, mainly detecting the vibration signal from the engine piston; the engine crankshaft converts the thrust from the engine piston connecting rod into rotational torque, and transmits it to the compressor crankshaft through the transmission system to provide power to the compressor; and the crankshaft is subject to periodic gas pressure, reciprocating motion inertia force, rotational motion centrifugal force and mechanical braking force, and is susceptible to wear and deformation, so the third type of measuring points are distributed in the middle of the engine and compressor crankcase, mainly detecting the vibration signal from the engine The vibration signals of the engine and the compressor crankshaft; the function of the compressor valve is to control the flow rate and flow of the compressor intake and exhaust gas by opening and closing, and the valve plate operates under the action of high frequency and high pressure, which is prone to fatigue damage and friction damage, so the fourth type of measuring points are distributed in the center of the outside of the compressor valve, mainly detecting the vibration signal from the compressor valve; the function of the compressor crosshead is to guide the force of the compressor crankshaft to the thrust of the compressor piston; and the repeated sliding friction force will cause cracks, which may expand under the repeated action of periodic compressive stress, so the fifth type of measuring points are distributed outside the crosshead slide, and the vibration signal of the compressor crosshead is detected by horizontal and vertical bidirectional installation; the function of the compressor piston is to compress natural gas, which is one of the key components of the compressor; and the piston keeps making high-frequency reciprocating motion, which is prone to wear, jumping and even breakage, so the sixth type of measuring points are distributed on the side and front end of the compressor cylinder, and the vibration signal of the compressor piston is detected by horizontal and axial bidirectional installation. Therefore, in this embodiment, the first historical vibration data and the second historical vibration data obtained are both the same vibration signals among the engine valve vibration signal, the engine piston vibration signal, the engine crankshaft vibration signal, the compressor valve vibration signal, the compressor crosshead vibration signal, the compressor crankshaft vibration signal, and the compressor piston vibration signal.

[0029] When collecting historical vibration data, a piezoelectric acceleration sensor is installed at the vibration measurement point of the compressor. The piezoelectric acceleration sensor uses a sensor with an explosion-proof rating of Ex ia ⅡC T4, a measurement range of ±50g, and an operating temperature of -40 - 120°C. Among them, the installation method of the piezoelectric acceleration sensor is magnetic adsorption, which can minimize the impact of installing the sensor on the operation of the compressor unit. Among them, as Figure 2As shown in the figure, there are 113 vibration measurement points of the compressor unit, which are distributed in six areas: the engine cylinder head, the engine combustion chamber, the crankcase, the compressor valve, the compressor crosshead and the compressor cylinder block; (1) The piezoelectric acceleration sensor attached to the left middle section of the engine cylinder head mainly detects the vibration signal from the engine valve, which depends on the fragility and importance of the valve. First, the working conditions of the valve are very bad. The valve is in direct contact with the high-temperature combustion gas, which is seriously heated and difficult to dissipate. Therefore, the valve temperature is very high; the valve is subjected to the action of gas force and valve spring force, and the inertia force of the moving parts of the valve mechanism causes the valve to be impacted when it is seated; the valve opens and closes at a very high speed under poor lubrication conditions and reciprocates at high speed in the valve guide; the valve is corroded due to contact with corrosive gases in the high-temperature combustion gas. Secondly, the function of the valve is to input air and fuel gas into the engine and discharge the exhaust gas after combustion. If the valve is burned, the engine performance will be greatly affected. (2) The piezoelectric acceleration sensor adsorbed on the lower right area outside the engine combustion chamber mainly detects the vibration signal of the engine piston, which depends on the fragility and importance of the engine piston. First, the engine piston is in direct contact with the high-temperature combustion gas in the cylinder body, which is easy to produce carbon deposits; the engine piston reciprocates continuously in the cylinder body, which is easy to wear the piston ring and cause scratches on the cylinder body. Secondly, the function of the engine piston is to compress the combustion gas and bear the alternating mechanical load. If its sealing performance is reduced, the starting performance and power performance will be reduced. (3) The piezoelectric acceleration sensor adsorbed on the middle part of the crankcase mainly detects the vibration signal from the engine crankshaft, which depends on the fragility and importance of the crankshaft. First, the crankshaft is easily worn and deformed by periodic gas pressure, reciprocating motion inertia force, rotational motion centrifugal force and mechanical braking force; if the lubricating oil in the oil pan is not replaced on time, large metal and other abrasive particles in the lubricating oil will be mixed into the gap between the bearing and the journal, scratching and pulling the friction surface. Secondly, the function of the engine crankshaft is to convert the thrust from the piston connecting rod into rotational torque, convert the reciprocating linear motion of the piston into the circular rotational motion of the crankshaft, and then transmit the engine torque to the transmission system through the flywheel, and then to the compressor. If the crankshaft is damaged, there will be a great loss of power, and even cause shutdown. (4) The piezoelectric accelerometer adsorbed on the center of the outer side of the compressor valve mainly detects the vibration signal from the valve, which depends on the fragility and importance of the valve. First, when the compressor is running, the valve needs to be opened and closed continuously, and the valve plate operates under the action of high frequency and high pressure, which is prone to fatigue damage and friction damage, resulting in damage to the valve plate or valve spring; in addition, there is the possibility of poor lubrication or foreign matter intrusion. Secondly, the function of the valve is to control the flow rate and flow of the gas, realize the regulation and control of the flow, and have a direct impact on the exhaust volume, power consumption and operation reliability of the compressor.(5) The piezoelectric acceleration sensors adsorbed near the crosshead slideway of the compressor have two directions, horizontal and vertical, and mainly detect the vibration signals from the crosshead, which depends on the vulnerability and importance of the crosshead. First, the repeatedly acting sliding friction force can cause cracks, which may expand under the repeated action of periodic compressive stress; fatigue cracks are more likely to occur when the bearing alloy is poorly bonded to the bearing bush; the tensile strength of the alloy layer at high temperatures also has a great impact on the formation of cracks. Second, the role of the crosshead is to guide. If cracks appear in the crosshead, it will lead to problems with the crankshaft force guidance and reduce the compression efficiency. (6) The piezoelectric acceleration sensors adsorbed on the side and front end of the compressor cylinder block have two directions, horizontal and axial, and mainly detect the vibration signals from the compressor piston, which depends on the vulnerability and importance of the piston. First, the piston keeps making high-frequency reciprocating motions, the piston rings are prone to wear, the piston cylinder is also prone to scratches, and even cause the piston rod to jump, resulting in the fracture of the piston rod. Second, the role of the piston is to compress natural gas. If the piston wears and the sealing performance decreases, the compression efficiency will be reduced.

[0030] Step 12. The steps for obtaining the time-frequency spectrograms corresponding to the first historical vibration data and the second historical vibration data are as follows: By using the method of continuous wavelet transform, the waveform signals corresponding to the first historical vibration data and the second historical vibration data are transformed into time-frequency spectrograms, and the time-frequency spectrograms are as Figure 4 shown.

[0031] S2. Construct an adversarial domain adaptation network model based on the swin transformer; As Figure 5 shown, construct an adversarial domain adaptation network model. The network model includes: a feature generator and two label classifiers. The feature generator is used to extract and encode the features of the time-frequency spectrograms corresponding to the first historical vibration data and the second historical vibration data respectively, and make the distribution of the feature encodings close to the standard Gaussian distribution; the label classifier is used to classify the first historical vibration data or the second historical vibration data according to the feature data after feature encoding, and distinguish the fault data and normal data in the first historical vibration data or the second historical vibration data. Among them, the feature generator adopts the network structure and parameters of the migrated Swin Transformer, which greatly reduces the demand for training data.

[0032] S3. Train the network model to obtain the final network model; Step 31. Iteratively update the feature generator and label classifier of the network model to obtain the first target network model. The specific iterative update steps are as follows: Step 311: Construct the first loss function of the network model based on the vector composed of the feature codes output by the feature generator and the standard Gaussian distribution vector, and the cross-entropy loss function constructed by the classification results of the two label classifiers and the labels. The expression of the first loss function is:

[0033] In the formula, represents the first loss function of the network model; represents the binary cross-entropy loss function corresponding to the first label classifier in the network model; represents the binary cross-entropy loss function corresponding to the second label classifier in the network model; represents the KL divergence loss function constructed by the vector composed of the feature codes output by the feature generator and the standard Gaussian distribution vector when the second historical vibration data is input; is the spectrogram corresponding to the second historical vibration data; is the label value corresponding to the second historical vibration data; is the hyperparameter for balancing the loss.

[0034] Among them, the expression of the binary cross-entropy loss function corresponding to the first label classifier in the network model is:

[0035] In the formula, represents the binary cross-entropy loss function corresponding to the first label classifier in the network model; represents the data volume of the second historical vibration data; represents the label corresponding to the i-th second historical vibration data; represents the spectrogram corresponding to the i-th second historical vibration data; represents the first label classifier; represents the vector composed of the feature codes output by the feature generator.

[0036] Among them, the expression of the binary cross-entropy loss function corresponding to the second label classifier in the network model is:

[0037] In the formula, represents the binary cross-entropy loss function corresponding to the second label classifier in the network model; represents the data volume of the second historical vibration data; represents the label corresponding to the i-th second historical vibration data; represents the spectrogram corresponding to the i-th second historical vibration data; represents the second label classifier; A vector composed of the feature encodings output by the feature generator.

[0038] Among them, the expression of the KL divergence loss function is:

[0039] In the formula, represents the KL divergence loss function; represents the total amount of the second historical vibration data; represents the standard Gaussian distribution vector; represents a vector composed of the feature encodings output by the feature generator when the spectrogram corresponding to the second historical vibration data is input into the network model; represents the spectrogram corresponding to the i-th data of the second historical vibration data.

[0040] Step 312: Train the network model based on the first loss function of the network model; Use the spectrogram corresponding to the second historical vibration data as the input quantity and combine it with the compressor label corresponding to the second historical vibration data to train the network model, so that the first loss function decreases, and obtain the initially trained first target network model.

[0041] Step 32: By fixing the feature generator of the first target network model and updating the two label classifiers of the first target network model, obtain the second target network model, so as to minimize the recognition error of the first historical vibration data while maximizing the output divergence of the two label classifiers on the second historical vibration data. The specific steps are as follows: Step 321: Construct the second loss function; Specifically, input the spectrogram corresponding to the first historical vibration data into the first target network model, and construct the second loss function according to the difference between the output results of the two label classifiers of the first target network model when the spectrogram of the first historical vibration data is input and the first loss function.

[0042] Among them, the expression of the second loss function is:

[0043] In the formula, represents the binary cross-entropy loss function corresponding to the first label classifier in the network model; represents the binary cross-entropy loss function corresponding to the second label classifier in the network model; represents the KL divergence loss function constructed by the vector composed of the feature encodings output by the feature generator when the second historical vibration data is input and the standard Gaussian distribution vector; is a hyperparameter for balancing the loss; The result difference loss function is composed of the difference between the output results of two label classifiers when the time-frequency spectrogram representing the first historical vibration data is input into the first target network model.

[0044] Among them, the result difference loss function The expression is:

[0045] In the formula, represents the output result of the first label classifier of the first target network model when the time-frequency spectrogram representing the first historical vibration data is input; represents the output result of the first label classifier of the first target network model when the time-frequency spectrogram representing the first historical vibration data is input; represents the data volume of the first historical vibration data.

[0046] Step 322: Fix the feature generator of the first target network model, and update the two label classifiers of the first target network model according to the second loss function to minimize the second loss function, and obtain the second target network model.

[0047] Step 33: Fix the label classifier of the second target network model, and update the feature generator of the second target network model so that the output divergence of the two label classifiers on the first historical vibration data is minimized, and at the same time promote the feature encoding distribution of the first historical vibration data to be close to the standard Gaussian distribution, so as to achieve the purpose of identifying the target data, and obtain the updated final network model.

[0048] Step 331: Construct the third loss function; Specifically, input the time-frequency spectrogram corresponding to the first historical vibration data into the second target network model, and construct the third loss function according to the difference between the vector composed of the feature encoding output by the feature generator and the standard Gaussian distribution vector and the output results of the two label classifiers.

[0049] Among them, the expression of the third loss function is:

[0050] In the formula, represents the third loss function; represents the alignment loss function composed of the difference between the vector composed of the feature encoding output by the feature generator and the standard Gaussian distribution vector when the time-frequency spectrogram corresponding to the first historical vibration data is input into the second target network model; is the hyperparameter of the loss weight; represents the result difference loss function composed of the difference between the output results of the two label classifiers when the time-frequency spectrogram representing the first historical vibration data is input into the second target network model; Represents the time-frequency spectrogram corresponding to the first historical vibration data.

[0051] Among them, the alignment loss function The expression of:

[0052] In the formula, Is the L1 norm; Represents the data volume of the first historical vibration data; Represents the vector composed of the feature encodings output by the feature generator when the time-frequency spectrogram corresponding to the first historical vibration data is input into the second target network model; Represents the standard Gaussian distribution vector; Represents the time-frequency spectrogram corresponding to the j-th data of the first historical vibration data.

[0053] Step 332: Fix the label classifier of the second target network model, and update the feature generator of the second target network model according to the third loss function.

[0054] Step 34: Repeat steps 31 to 33. Calculate the weighted sum of the first loss function, the second loss function, and the third loss function each time an iteration is completed until the weighted sum of the first loss function, the second loss function, and the third loss function is minimized to obtain the trained final network model. It should be noted that steps 31 to 33 in this embodiment are an iterative update process. During the iterative update process, the model loss function is minimized as much as possible to achieve a better fault recognition effect. When the value of the model loss function no longer decreases but fluctuates within a range and remains basically unchanged, the accuracy of the model can reach 92.3333%, and it stabilizes around 85%. The confusion matrix composed of the output structure of the final network model is as Figure 6 Shown. And as the relative amount of the second historical compression data of the compressor with known labels increases, the discrimination of the final network model will become more accurate.

[0055] S4: Monitor the vibration result of the compressor; Input the current vibration data of the compressor to be tested into the final network model, and output the vibration monitoring result of the compressor to be tested. When a fault occurs, the system will give a safety warning to the staff, thus avoiding the occurrence of more serious faults.

[0056] An embodiment of a vibration anomaly monitoring system for a large natural gas compressor, which includes: a data acquisition and processing module, a network model construction module, a network model training module, and a monitoring result prediction module. The data acquisition and processing module is used to obtain the first historical vibration data of the compressor to be measured and the second historical vibration data of the compressor with labels, and obtain the time-frequency spectrograms corresponding to the first historical vibration data and the second historical vibration data. Among them, both the first historical vibration data and the second historical vibration data are the same vibration signal among the engine valve vibration signal, the engine piston vibration signal, the engine crankshaft vibration signal, the compressor valve vibration signal, the compressor crosshead vibration signal, the compressor crankshaft vibration signal, and the compressor piston vibration signal; the network model construction module is used to construct an adversarial domain adaptation network model, and the network model includes: a feature generator and two label classifiers, and the feature generator adopts the network structure and parameters of the transfer Swin Transformer; the feature generator is used to extract and encode the features of the time-frequency spectrograms corresponding to the first historical vibration data and the second historical vibration data respectively, and make the distribution of the feature encodings close to the standard Gaussian distribution; the label classifier is used to classify the first historical vibration data or the second historical vibration data according to the feature data after feature encoding, and the classification results are the fault data and normal data in the first historical vibration data or the second historical vibration data; the network model training module is used to construct the first loss function of the network model according to the vector composed of the feature encodings output by the feature generator and the standard Gaussian distribution vector, and the cross-entropy loss function constructed by the classification results of the two label classifiers and the labels; use the time-frequency spectrogram corresponding to the second historical vibration data as the input quantity and combine the label corresponding to the second historical vibration data to train the network model to obtain the initially trained first target network model; input the time-frequency spectrogram corresponding to the first historical vibration data into the first target network model, and construct the second loss function according to the difference between the output results of the two label classifiers of the first target network model input with the time-frequency spectrogram of the first historical vibration data and the first loss function. Fix the feature generator of the first target network model, and update the two label classifiers of the first target network model according to the second loss function to obtain the second target network model; input the time-frequency spectrogram corresponding to the first historical vibration data into the second target network model, and construct the third loss function according to the difference between the vector composed of the feature encodings output by the feature generator of the second target network model and the standard Gaussian distribution vector and the output results of the two label classifiers; fix the label classifier of the second target network model, and update the feature generator of the second target network model according to the third loss function; until the weighted sum of the first loss function, the second loss function, and the third loss function is the smallest, obtain the trained final network model; the monitoring result prediction module is used to input the current vibration data of the compressor to be measured into the final network model and output the vibration monitoring result of the compressor to be measured.

[0057] Such asFigure 3 As shown in the figure, this embodiment also provides a large natural gas compressor vibration anomaly monitoring device, including: a piezoelectric acceleration sensor, a data acquisition device, an industrial control computer, a system database, a server, and a human-machine interaction interface; the piezoelectric acceleration sensor is used to detect the vibration signals of various parts of the compressor; the data acquisition device is used to input the analog signals measured by the piezoelectric acceleration sensor into the industrial control computer in the form of digital quantities after steps such as adaptation, conditioning, and AD conversion. Among them, the data acquisition device selects differential analog quantity input with strong anti-interference performance to prevent the mutual superposition of interference sources, and multiple independent chips are used for synchronous acquisition to ensure the accuracy and real-time of data transmission. The data acquisition device transmits the acquired signals to the industrial control computer through PCI. In this embodiment, the acquisition frequency of the data acquisition device is set to 12,800 Hz, and the sensor sensitivity and signal coupling mode are configured; the industrial control computer is used to upload the integrated compressor state data to the system database for storage through an Ethernet hub HUB; the system database is used to store real-time sampling data, historical data, fault data, and equipment state information, and can respond to the user's query requests. In this embodiment, the system database uses SQL Server 2022. First, data design is carried out using the E-R model. In the E-R model, entities are represented by rectangles, the attributes of entities are represented by ellipses, and the relationships between entities are represented by diamonds. A total of 2 data tables are established in the system database, which are respectively used to store user names and passwords, the vibration data of the compressor, and the operating state information; the server is used to analyze the acquired data to judge the working state of the compressor and diagnose possible faults, that is, the server is connected to the database device through a USB interface, and it includes a final network model inside, and the final network model is used to monitor the natural gas compressor; the human-machine interaction interface is used to access the database and monitor and give early warnings about the state of the compressor unit.

[0058] The above are only the preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A method for monitoring abnormal vibration of a large natural gas compressor, characterized in that, Including: Obtain the first historical vibration data of the compressor to be tested and the second historical vibration data of the compressor with labels, and obtain the time-frequency spectrograms corresponding to the first historical vibration data and the second historical vibration data. Among them, both the first historical vibration data and the second historical vibration data are the same vibration signal among the engine valve vibration signal, the engine piston vibration signal, the engine crankshaft vibration signal, the compressor valve vibration signal, the compressor crosshead vibration signal, the compressor crankshaft vibration signal, and the compressor piston vibration signal; Construct an adversarial domain adaptation network model. The network model includes: a feature generator and two label classifiers. The feature generator adopts the network structure and parameters of the migrated Swin Transformer; the feature generator is used to extract and encode the features of the time-frequency spectrograms corresponding to the first historical vibration data and the second historical vibration data respectively, and make the distribution of the feature encodings close to the standard Gaussian distribution; the label classifier is used to classify the first historical vibration data or the second historical vibration data according to the feature data after feature encoding, and the classification results are the fault data and normal data in the first historical vibration data or the second historical vibration data; Construct the first loss function of the network model according to the vector composed of the feature encodings output by the feature generator and the standard Gaussian distribution vector, and the cross-entropy loss function constructed by the classification results of the two label classifiers and the labels; use the time-frequency spectrogram corresponding to the second historical vibration data as the input quantity and combine the label corresponding to the second historical vibration data to train the network model to obtain the initially trained first target network model; Input the time-frequency spectrogram corresponding to the first historical vibration data into the first target network model, and construct the second loss function according to the difference between the output results of the two label classifiers of the first target network model input with the time-frequency spectrogram of the first historical vibration data and the first loss function. Fix the feature generator of the first target network model, and update the two label classifiers of the first target network model according to the second loss function to obtain the second target network model; Input the time-frequency spectrogram corresponding to the first historical vibration data into the second target network model, and construct the third loss function according to the vector composed of the feature encodings output by the feature generator of the second target network model and the standard Gaussian distribution vector and the difference between the output results of the two label classifiers; fix the label classifier of the second target network model, and update the feature generator of the second target network model according to the third loss function; until the weighted sum of the first loss function, the second loss function, and the third loss function is the smallest, and obtain the trained final network model; Input the current vibration data of the compressor to be tested into the final network model, and output the vibration monitoring result of the compressor to be tested.

2. The method for monitoring abnormal vibration of a large natural gas compressor according to claim 1, characterized in that The expression of the first loss function is: In the formula, represents the first loss function of the network model; represents the binary cross-entropy loss function corresponding to the first label classifier in the network model; represents the binary cross-entropy loss function corresponding to the second label classifier in the network model; represents the KL divergence loss function constructed by the vector composed of the feature encoding output by the feature generator when the second historical vibration data is input and the standard Gaussian distribution vector; is the time-frequency spectrogram corresponding to the second historical vibration data; is the label value corresponding to the second historical vibration data; is the hyperparameter for balancing the loss.

3. The method for abnormal vibration monitoring of a large natural gas compressor according to claim 2, characterized in that, The expression of the binary cross-entropy loss function corresponding to the first label classifier in the network model is: Wherein, represents the binary cross-entropy loss function corresponding to the first label classifier in the network model; represents the data volume of the second historical vibration data; represents the label corresponding to the i-th second historical vibration data; represents the time-frequency spectrogram corresponding to the i-th second historical vibration data; represents the first label classifier; represents the vector composed of the feature encodings output by the feature generator.

4. A method for monitoring abnormal vibration of a large natural gas compressor according to claim 2, characterized in that, The expression of the binary cross-entropy loss function corresponding to the second label classifier in the network model is: Wherein, represents the binary cross-entropy loss function corresponding to the second label classifier in the network model; represents the data volume of the second historical vibration data; represents the label corresponding to the i-th second historical vibration data; represents the time-frequency spectrogram corresponding to the i-th second historical vibration data; represents the second label classifier; represents the vector composed of the feature encodings output by the feature generator.

5. A method for monitoring abnormal vibration of a large natural gas compressor according to claim 2, characterized in that, The expression of the KL divergence loss function is: In the formula, represents the KL divergence loss function; represents the total amount of the second historical vibration data; represents the standard Gaussian distribution vector; represents the vector composed of the feature codes output by the feature generator when the spectrogram corresponding to the second historical vibration data is input into the network model; represents the spectrogram corresponding to the i-th data of the second historical vibration data.

6. A method for abnormal vibration monitoring of a large natural gas compressor according to claim 1, characterized in that The expression of the second loss function is: Wherein, represents the binary cross-entropy loss function corresponding to the first label classifier in the target network model; represents the binary cross-entropy loss function corresponding to the second label classifier in the target network model; represents the KL divergence loss function constructed by the vector composed of the feature encoding output by the feature generator when the second historical vibration data is input and the standard Gaussian distribution vector; is the hyperparameter for balancing the loss; represents the result difference loss function composed of the difference between the output results of the two label classifiers when the time-frequency spectrogram of the first historical vibration data is input into the first target network model.

7. A method for monitoring abnormal vibration of a large natural gas compressor according to claim 6, characterized in that, The expression of the result difference loss function is: In the formula, represents the output result of the first label classifier of the first target network model with the time-frequency spectrogram of the first historical vibration data as the input; represents the output result of the second label classifier of the first target network model with the time-frequency spectrogram of the first historical vibration data as the input; represents the data volume of the first historical vibration data.

8. A method for monitoring abnormal vibration of a large natural gas compressor according to claim 1, characterized in that The expression of the third loss function: In the formula, represents the third loss function; represents the alignment loss function formed by the vector composed of the feature codes output by the feature generator when the spectrogram corresponding to the first historical vibration data is input into the second target network model and the vector of the standard Gaussian distribution; is the hyperparameter of the loss weight; represents the result difference loss function formed by the difference between the output results of the two label classifiers when the spectrogram of the first historical vibration data is input into the second target network model; represents the spectrogram corresponding to the first historical vibration data.

9. A method for monitoring abnormal vibration of a large natural gas compressor according to claim 8, characterized in that, Expression of alignment loss function: In the formula, is the L1 norm; represents the data volume of the first historical vibration data; represents the vector composed of the feature codes output by the feature generator when the time-frequency spectrogram corresponding to the first historical vibration data is input into the second target network model; represents the standard Gaussian distribution vector; represents the time-frequency spectrogram corresponding to the j-th data of the first historical vibration data.

10. A vibration anomaly monitoring system for a large natural gas compressor, characterized in that, Including: Data acquisition and processing module, which is used to obtain the first historical vibration data of the compressor to be measured and the second historical vibration data of the compressor with labels, and obtain the time-frequency spectrograms corresponding to the first historical vibration data and the second historical vibration data. Among them, the first historical vibration data and the second historical vibration data are both the same vibration signal among the engine valve vibration signal, engine piston vibration signal, engine crankshaft vibration signal, compressor valve vibration signal, compressor crosshead vibration signal, compressor crankshaft vibration signal, and compressor piston vibration signal; Network model construction module, which is used to construct a network model for adversarial domain adaptation. The network model includes: a feature generator and two label classifiers. The feature generator adopts the network structure and parameters of the migrated Swin Transformer; the feature generator is used to extract and encode the features of the time-frequency spectrograms corresponding to the first historical vibration data and the second historical vibration data respectively, and make the distribution of the feature encoding close to the standard Gaussian distribution; the label classifier is used to classify the first historical vibration data or the second historical vibration data according to the feature data after feature encoding, and the classification results are the fault data and normal data in the first historical vibration data or the second historical vibration data; Network model training module, which is used to construct the first loss function of the network model according to the vector composed of the feature encoding output by the feature generator and the standard Gaussian distribution vector, and the cross-entropy loss function constructed by the classification results of the two label classifiers and the labels; use the time-frequency spectrogram corresponding to the second historical vibration data as the input quantity and combine the label corresponding to the second historical vibration data to train the network model to obtain the initially trained first target network model; input the time-frequency spectrogram corresponding to the first historical vibration data into the first target network model, and construct the second loss function according to the difference between the output results of the two label classifiers of the first target network model input with the time-frequency spectrogram of the first historical vibration data and the first loss function. Fix the feature generator of the first target network model, and update the two label classifiers of the first target network model according to the second loss function to obtain the second target network model; input the time-frequency spectrogram corresponding to the first historical vibration data into the second target network model, and construct the third loss function according to the vector composed of the feature encoding output by the feature generator of the second target network model and the standard Gaussian distribution vector and the difference between the output results of the two label classifiers; fix the label classifier of the second target network model, and update the feature generator of the second target network model according to the third loss function; until the weighted sum of the first loss function, the second loss function, and the third loss function is the smallest, obtain the trained final network model; Monitoring result prediction module, which is used to input the current vibration data of the compressor to be measured into the final network model and output the vibration monitoring result of the compressor to be measured.