Rotating machine fault diagnosis method in open-set cross-domain scene, terminal and medium
By converting one-dimensional vibration signals of rotating machinery into two-dimensional time-frequency images, a cross-domain fault diagnosis model is constructed, which enables the correct classification of known fault modes and the identification of unknown fault modes under varying operating conditions. This solves the problems of data scarcity and non-stationary signals in rotating machinery fault diagnosis, and improves the accuracy and adaptability of diagnosis.
Patent Information
- Application Number
- CN202510875909.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-27
- Publication Date
- 2025-11-21
AI Technical Summary
Existing fault diagnosis methods for rotating machinery are not accurate enough when faced with scarce data and non-stationary signals, and traditional methods are difficult to deal with unknown fault modes. Open set cross-domain fault diagnosis methods have limited adaptability and flexibility in cross-domain tasks.
One-dimensional vibration signals are converted into two-dimensional time-frequency images to construct a fault diagnosis model that includes a feature extractor, classifier, domain discriminator, and weight calculation module. Cross-domain adversarial training is used to align the features of the source domain and the target domain, and the target domain alignment weights are dynamically adjusted. The ResNet18 shared weight network structure is used, and the model is trained by combining classification loss, domain discriminant loss, and weight alignment loss.
Under varying operating conditions, it correctly classifies known fault modes and identifies unknown fault modes, improving diagnostic accuracy, reducing negative transfer caused by feature alignment of unknown classes, omitting the process of manually removing unknown samples in the target domain, and making full use of the advantages of neural network feature extraction.
Smart Images

Figure CN120994958A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of rotating machinery fault diagnosis technology, specifically a rotating machinery fault diagnosis method in an open-set cross-domain scenario, as well as a computer terminal and computer-readable storage medium for applying this method. Background Technology
[0002] In the current field of rotating machinery maintenance, deep learning-based fault diagnosis methods are widely used. These methods typically require a large amount of labeled data for training, and under certain fault modes, data scarcity can occur, resulting in insufficient historical data for effective training. Furthermore, the signal characteristics of rotating machinery faults often exhibit non-stationary signals, while traditional methods rely heavily on static statistical features, making it difficult to effectively capture the instantaneous features of non-stationary fault signals, thus affecting diagnostic accuracy. More importantly, traditional fault diagnosis methods are primarily trained on known fault modes, usually assuming fixed fault types. When faced with unknown fault modes, they are prone to misjudgment or omission, leading to fault diagnosis failure. Against this backdrop, open-set fault diagnosis technology has emerged, aiming to identify known fault modes while also addressing unknown fault modes.
[0003] Most existing open-set fault diagnosis methods assume that the feature distributions of training and test data are relatively consistent, focusing on identifying known and unknown classes within the same domain. When implementing open-set cross-domain fault diagnosis tasks, it is necessary to manually select known fault modes from the target domain and adapt them to the source domain. This design limits their ability to handle cross-domain tasks and reduces their adaptability and flexibility in practical applications, thus requiring urgent solutions. Summary of the Invention
[0004] To address the technical problems existing in the prior art, this invention provides a method, terminal, and medium for diagnosing rotating machinery faults in open-set cross-domain scenarios. This method can correctly classify known fault modes and identify fault modes that have not appeared during the training phase in variable operating conditions.
[0005] To achieve the above objectives, the present invention provides the following technical solution:
[0006] This invention discloses a method for diagnosing faults in rotating machinery in open-set cross-domain scenarios, comprising the following steps:
[0007] S1. Acquire one-dimensional vibration signals of rotating machinery, and convert them into two-dimensional time-frequency images after preprocessing;
[0008] S2. Construct a fault diagnosis model, including:
[0009] The feature extractor module is used to extract domain-invariant features from source and target domain data.
[0010] The classifier module is used to output |C s +1|dimensional probability vector, first|C s The first dimension represents the probability that a sample belongs to each known class, and the last dimension represents the probability that a sample belongs to an unknown class.
[0011] The domain discriminator module distinguishes between source and target domain samples through adversarial training and optimizes the feature extractor to generate domain-invariant features.
[0012] The weight calculation module dynamically calculates alignment weights based on the distance between the target domain sample and the source domain category center.
[0013] S3. By conducting cross-domain adversarial training, and combining classification loss, domain discrimination loss, and weight alignment loss, the source domain and target domain features are aligned, thereby completing the training of the fault diagnosis model.
[0014] S4. Input the two-dimensional time-frequency image into the trained fault diagnosis model and output the fault type and fault probability.
[0015] As a further improvement to the above scheme, the feature extractor module adopts the shared weight network structure of ResNet18, and the feature extractor weights of the source domain and the target domain are shared.
[0016] As a further improvement to the above scheme, the formula for calculating the alignment weight by the weight calculation module is as follows:
[0017] w = 1 / (distances + ε)
[0018] In the formula, w is the alignment weight; distances is the distance between the target domain sample and the source domain class center; ε is the stability factor to prevent division by zero errors.
[0019] As a further improvement to the above scheme, in step S1, the preprocessing includes the following steps:
[0020] A bandpass filter is used to remove high-frequency noise or low-frequency environmental interference in order to preserve key vibration characteristics; then, a two-dimensional time-frequency image is obtained by continuous wavelet transform of the filtered vibration signal.
[0021] As a further improvement to the above scheme, during the preprocessing process, an overlapping sampling method is used to select 1024 consecutive data points from the vibration signal for continuous wavelet transform.
[0022] As a further improvement to the above scheme, the expression formula for the continuous wavelet transform is as follows:
[0023]
[0024] In the formula, a is the scaling factor controlling the width of the wavelet function, b is the translation factor determining the position of the wavelet function on the time axis, and W f (a,b) represents the continuous wavelet transform values of signal f(τ) at scale a and position b; ψ * (τ) is the complex conjugate of the mother wavelet ψ(τ); τ is the time variable.
[0025] As a further improvement to the above scheme, in step S4, fault alarm information is generated based on the output fault type and fault probability, and the fault alarm information is sent to an interactive terminal.
[0026] As a further improvement to the above scheme, during the training process of the domain discriminator module, the binary cross-entropy loss function is used to calculate the domain discriminant loss, and the calculation formula is as follows:
[0027]
[0028] In the formula, For the domain discrimination loss; N is the total number of samples, d i The true domain label for sample i; The probability value output by the domain discriminator represents the probability that a sample is classified as belonging to the source domain. Through adversarial training, the domain discriminator attempts to maximize the domain discrimination loss, while the feature extractor attempts to minimize the domain discrimination loss, thereby generating domain-invariant features.
[0029] The present invention also discloses a computer terminal, including a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, when the processor executes the computer program, it implements the steps of the rotating machinery fault diagnosis method in the open set cross-domain scenario as described above.
[0030] The present invention also discloses a computer-readable storage medium having a computer program stored thereon, wherein when the program is executed by a processor, it implements the steps of the method for diagnosing rotating machinery faults in an open-set cross-domain scenario as described above.
[0031] Compared with the prior art, the beneficial effects of the present invention are:
[0032] 1. The open-set cross-domain scenario fault diagnosis method for rotating machinery disclosed in this invention dynamically adjusts the alignment weights in the target domain by constructing a weight calculation module, reducing negative transfer caused by the alignment of unknown class features with source domain features. Simultaneously, it can deeply extract discriminative features of known fault modes under different operating conditions, thereby correctly classifying known fault modes. Furthermore, unlike previous open-set cross-domain methods, this invention eliminates the need for manual removal of unknown samples in the target domain used for training.
[0033] 2. This invention converts one-dimensional vibration data into two-dimensional images as input to the model. While solving the problem of non-stationary signals and filtering noise, it can make full use of the advantages of neural networks in feature extraction.
[0034] 3. The computer terminal and computer-readable storage medium disclosed in this invention can produce the same beneficial effects as the above methods by applying the above methods, and will not be described in detail here. Attached Figure Description
[0035] Figure 1 This is a flowchart of the method for diagnosing rotating machinery faults in an open-set cross-domain scenario according to Embodiment 1 of the present invention.
[0036] Figure 2 This is an architecture diagram of the fault diagnosis model in Embodiment 1 of the present invention.
[0037] Figure 3 This is a schematic diagram of the structure of the computer terminal in Embodiment 2 of the present invention. Detailed Implementation
[0038] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0039] Example 1
[0040] Please see Figure 1 This embodiment provides a method for diagnosing faults in rotating machinery in an open-set cross-domain scenario, including the following steps:
[0041] S1. Acquire one-dimensional vibration signals of rotating machinery, and convert them into two-dimensional time-frequency images after preprocessing.
[0042] In this embodiment, an accelerometer can be installed on the rotating mechanical housing or nearby structure, a higher sampling frequency can be set to capture high-frequency vibration characteristics, and an appropriate acquisition time and storage format can be configured to save the complete vibration signal.
[0043] In step S1, the preprocessing includes the following steps:
[0044] A bandpass filter is used to remove high-frequency noise or low-frequency environmental interference to preserve key vibration characteristics. Then, an overlap sampling method is used to select 1024 consecutive data points from the vibration signal for continuous wavelet transform (CWT) to obtain a two-dimensional time-frequency image. This image data can provide the operating status of the device at different times, providing basic data for subsequent model training. The formula for the continuous wavelet transform is as follows:
[0045]
[0046] In the formula, a is the scaling factor controlling the width of the wavelet function, b is the translation factor determining the position of the wavelet function on the time axis, and W f (a,b) represents the continuous wavelet transform values of signal f(τ) at scale a and position b; ψ * (τ) is the complex conjugate of the mother wavelet ψ(τ); τ is the time variable.
[0047] S2. Construct a fault diagnosis model, which includes four parts: feature extractor module, classifier module, domain discriminator module, and weight calculation module.
[0048] Feature extractor module: Used to extract domain-invariant features from the source and target domain data, with shared weights between the feature extractors for the source and target domains. In this embodiment, the feature extractor module can adopt a shared weight network structure of ResNet18. In some embodiments, the feature extractor module can also adopt VGG19, DenseNet-121, AlexNet, etc.
[0049] Classifier module: used to output |C s +1|dimensional probability vector, first|C s The first dimension represents the probability that a sample belongs to each of the known classes, and the last dimension represents the probability that a sample belongs to an unknown class.
[0050] Domain Discriminator Module: The structure of the domain discriminator module is similar to that of the classifier module. Its output is a probability value between 0 and 1, used to distinguish the probability that a sample comes from the source domain and the target domain. The feature extractor module and the domain discriminator module are optimized through adversarial training to learn domain-invariant features.
[0051] During the training process of the domain discriminator module, the binary cross-entropy loss function is used to calculate the domain discrimination loss. The calculation formula is as follows:
[0052]
[0053] In the formula, For the domain discrimination loss; N is the total number of samples, d iThe true domain label for sample i; The probability value output by the domain discriminator represents the probability that a sample is classified as belonging to the source domain. Through adversarial training, the domain discriminator attempts to maximize the domain discrimination loss, while the feature extractor attempts to minimize the domain discrimination loss, thereby generating domain-invariant features.
[0054] Weight Calculation Module: While performing cross-domain feature alignment between the source and target domains, clustering is performed on the source domain samples. After a certain number of clustering operations on the source domain samples, the alignment weight between the target and source domains is calculated based on the distance of the target domain samples from the center of the source domain clusters. The calculation formula is as follows:
[0055] w = 1 / (distances + ε)
[0056] In the formula, w is the alignment weight; distances is the distance between the target domain sample and the source domain class center; ε is the stability factor to prevent division by zero errors.
[0057] S3. Through cross-domain adversarial training, combining classification loss, domain discrimination loss, and weight alignment loss, the backpropagation algorithm is used to update the parameters of the feature extractor, domain discriminator, and classifier, minimizing the above losses. After a certain number of iterations of training, the source domain and target domain features are aligned, and a converged fault diagnosis model is obtained.
[0058] S4. Input the two-dimensional time-frequency image into the trained fault diagnosis model and output the fault type and fault probability.
[0059] In step S4, fault alarm information is generated based on the output fault type and fault probability, and the fault alarm information is sent to an interactive terminal.
[0060] In some embodiments, the interactive terminal can be a mobile terminal such as a mobile phone / tablet, which provides fault alarms to relevant decision-makers through voice and / or text information to help operators handle equipment faults in a timely manner.
[0061] Example 2
[0062] The present invention also discloses a computer terminal, including a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, when the processor executes the computer program, it implements the steps of the rotating machinery fault diagnosis method in the open set cross-domain scenario as described in Embodiment 1.
[0063] like Figure 3 As shown, the computer terminal provided in this embodiment includes: at least one processor 101, and a memory 102 connected to at least one processor 101. This embodiment does not limit the specific connection medium between the processor 101 and the memory 102. Figure 3 The example shown is the connection between processor 101 and memory 102 via bus 100. Bus 100 is... Figure 3 The connections between other components are shown in bold lines and are for illustrative purposes only, not as limiting information. Bus 100 can be divided into address bus, data bus, control bus, etc., for ease of representation. Figure 3 The bus is represented by a single thick line, but this does not indicate that there is only one bus or one type of bus. Alternatively, the processor 101 may also be called a controller; there is no restriction on the name.
[0064] In this embodiment, the memory 102 stores instructions that can be executed by at least one processor 101. The at least one processor 101 can execute the aforementioned method by executing the instructions stored in the memory 102.
[0065] The processor 101 is the control center of the device. It can connect to various parts of the control device through various interfaces and lines. By running or executing instructions stored in memory 102 and calling data stored in memory 102, the processor can perform various functions and process data, thereby monitoring the device as a whole.
[0066] In one possible design, processor 101 may include one or more processing units. Processor 101 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and applications, and the modem processor mainly handles wireless communication. It is understood that the modem processor may also not be integrated into processor 101. In some embodiments, processor 101 and memory 102 may be implemented on the same chip; in some embodiments, they may also be implemented on separate chips.
[0067] Processor 101 can be a general-purpose processor, such as a central processing unit (CPU), digital signal processor, application-specific integrated circuit, field-programmable gate array or other programmable logic device, discrete gate or transistor logic device, or discrete hardware component, capable of implementing or executing the methods, steps, and logic block diagrams disclosed in Embodiment 1. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the fault diagnosis method disclosed in Embodiment 1 can be directly manifested as execution by a hardware processor, or execution by a combination of hardware and software modules in processor 101.
[0068] Memory 102, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules. Memory 102 may include at least one type of storage medium, such as flash memory, hard disk, multimedia card, card-type memory, random access memory (RAM), static random access memory (SRAM), programmable read-only memory (PROM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), magnetic storage, magnetic disk, optical disk, etc. Memory 102 can be any other medium capable of carrying or storing desired program code in the form of instructions or data structures that can be accessed by a computer, but is not limited thereto. In this embodiment, memory 102 can also be a circuit or any other device capable of implementing storage functions for storing program instructions and / or data.
[0069] By designing and programming the processor 101, the code corresponding to the fault diagnosis method described in the foregoing embodiments can be embedded into the chip, thereby enabling the chip to execute the code during operation. Figure 1 The steps of the fault diagnosis method in the illustrated embodiment are as follows. How to design and program the processor 101 is a technique well-known to those skilled in the art and will not be described further here.
[0070] Example 3
[0071] The present invention also discloses a computer-readable storage medium having a computer program stored thereon, wherein when the program is executed by a processor, it implements the steps of the method for diagnosing rotating machinery faults in an open-set cross-domain scenario as described in Embodiment 1.
[0072] The computer-readable storage medium may include flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the storage medium may be an internal storage unit of a computer device, such as the hard disk or memory of the computer device. In other embodiments, the storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., provided on the computer device. Of course, the storage medium may include both internal storage units and external storage devices of the computer device. In this embodiment, the memory is typically used to store the operating system and various application software installed on the computer device. In addition, the memory can also be used to temporarily store various types of data that have been output or will be output.
[0073] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. A method for diagnosing faults in rotating machinery in open-set cross-domain scenarios, characterized in that, Includes the following steps: S1. Acquire one-dimensional vibration signals of rotating machinery, and convert them into two-dimensional time-frequency images after preprocessing; S2. Construct a fault diagnosis model, including: The feature extractor module is used to extract domain-invariant features from source and target domain data. The classifier module is used to output |C s +1|dimensional probability vector, first|C s The first dimension represents the probability that a sample belongs to each known class, and the last dimension represents the probability that a sample belongs to an unknown class. The domain discriminator module distinguishes between source and target domain samples through adversarial training and optimizes the feature extractor to generate domain-invariant features. The weight calculation module dynamically calculates alignment weights based on the distance between the target domain sample and the source domain category center. S3. Through cross-domain adversarial training, combining classification loss, domain discrimination loss and alignment weight loss, feature alignment between the source domain and the target domain is achieved, thereby completing the training of the fault diagnosis model; S4. Input the two-dimensional time-frequency image into the trained fault diagnosis model and output the fault type and fault probability.
2. The method for diagnosing rotating machinery faults in open-set cross-domain scenarios according to claim 1, characterized in that, The feature extractor module adopts a ResNet18 shared weight network structure, with the feature extractor weights of the source domain and the target domain being shared.
3. The method for diagnosing rotating machinery faults in open-set cross-domain scenarios according to claim 1, characterized in that, The formula for calculating the alignment weight by the weight calculation module is as follows: w = 1 / (distances + ε) In the formula, w is the alignment weight; distances is the distance between the target domain sample and the center of the source domain category; ε is a stability factor to prevent division by zero errors.
4. The method for diagnosing rotating machinery faults in open-set cross-domain scenarios according to claim 1, characterized in that, In step S1, the preprocessing includes the following steps: Bandpass filters are used to remove high-frequency noise or low-frequency environmental interference in order to preserve key vibration characteristics; Then, a two-dimensional time-frequency image is obtained by performing continuous wavelet transform on the filtered vibration signal.
5. The method for diagnosing rotating machinery faults in open-set cross-domain scenarios according to claim 4, characterized in that, During the preprocessing process, 1024 consecutive data points were selected from the vibration signal using the overlapping sampling method for continuous wavelet transform.
6. The method for diagnosing rotating machinery faults in open-set cross-domain scenarios according to claim 4, characterized in that, The formula for the continuous wavelet transform is as follows: In the formula, a is the scaling factor controlling the width of the wavelet function, b is the translation factor determining the position of the wavelet function on the time axis, and W f (a,b) represents the continuous wavelet transform values of signal f(τ) at scale a and position b; ψ * (τ) is the complex conjugate of the mother wavelet ψ(τ); τ is the time variable.
7. The method for diagnosing rotating machinery faults in open-set cross-domain scenarios according to claim 1, characterized in that, In step S4, fault alarm information is generated based on the output fault type and fault probability, and the fault alarm information is sent to an interactive terminal.
8. The method for diagnosing rotating machinery faults in open-set cross-domain scenarios according to claim 1, characterized in that, During the training process of the domain discriminator module, the binary cross-entropy loss function is used to calculate the domain discrimination loss. The calculation formula is as follows: In the formula, For the domain discrimination loss; N is the total number of samples, d i The true domain label for sample i; The probability value output by the domain discriminator represents the probability that a sample is classified as belonging to the source domain. Through adversarial training, the domain discriminator attempts to maximize the domain discrimination loss, while the feature extractor attempts to minimize the domain discrimination loss, thereby generating domain-invariant features.
9. A computer terminal, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method for diagnosing rotating machinery faults in an open set cross-domain scenario as described in any one of claims 1 to 8.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the steps of the method for diagnosing rotating machinery faults in open set cross-domain scenarios as described in any one of claims 1 to 8.
Citation Information
Cited By
Crane rotating part fault diagnosis method, device and equipment and storage medium
CN121256576A
Methods, devices, equipment and storage media for diagnosing faults in rotating components of cranes
CN121256576B