Fault Diagnosis Methods and Systems for Marine Engine Transmission Reducer Gearboxes
By combining multi-scale convolutional embedding and Mamba feature extractor with hybrid supervised learning, the problem of unstable feature extraction in small-sample cross-operating-condition fault diagnosis of ship engine transmission reducer gearbox is solved, and efficient fault identification in non-stationary vibration signals is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHANGHAI JIAOTONG UNIV
- Filing Date
- 2026-03-19
- Publication Date
- 2026-07-10
Smart Images

Figure CN122365041A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of fault diagnosis technology, specifically to a fault diagnosis method and system for a marine engine transmission reducer gearbox, particularly a small-sample cross-operating-condition fault diagnosis method and system for a marine engine transmission reducer gearbox, and especially a fault diagnosis method and system for a marine engine transmission reducer gearbox based on a multi-scale self-supervised Mamba network using hybrid supervised learning. Background Technology
[0002] Marine engines, due to their high thermal efficiency, long service life, and good fuel economy, have long been the main power system for various types of ships and the core of modern ship propulsion systems. However, due to harsh operating environments and inevitable component wear, the problem of engine transmission component failures during navigation has always been a significant concern. As a crucial transmission link between the main engine and the propeller, the gearbox operates for extended periods under harsh conditions such as high load, high temperature, and sealing lubrication, making its internal meshing state and wear evolution difficult to monitor directly. Once its operating condition deviates from its healthy state, it may trigger a series of failures, from surface pitting and scratches to shaft asymmetry and bearing wear, ultimately evolving into serious failures such as overheating, excessive vibration, gear breakage, and even loss of propulsion. These failures pose a significant threat to navigational safety and lead to substantial economic losses. Therefore, accurately extracting the subtle characteristics of early damage from non-stationary and high-noise gearbox vibration signals is crucial for ensuring the reliable operation of marine engines.
[0003] Patent document CN113723491B describes a semi-supervised contrastive transfer method for gearbox fault diagnosis, including: acquiring multi-condition / multi-state vibration signals of source domain components and a small number of labeled vibration signals of target domain components; performing short-time Fourier transform on the source and target domain vibration signals to construct a two-dimensional time-frequency image dataset; constructing a diagnostic model based on an improved VGG-16, first pre-training the source domain model parameters using the SAdam optimization algorithm; then transferring the pre-trained parameters to the target domain model, introducing the SimCLR self-supervised contrastive learning framework in the target domain, adaptively updating the network parameters through contrastive loss, and replacing ReLU with Swish in the projection head to improve representation learning ability; simultaneously employing a stepwise unfreezing and fine-tuning strategy to retain the feature transfer capability of convolutional layers and adding a fully connected classification layer in the target domain, using a small number of labeled samples in the target domain to complete the final classifier training, thereby outputting the fault diagnosis results of the target component. Patent document CN118861792A describes a self-supervised domain adaptive fault diagnosis method for rotating machinery under varying operating conditions. The method includes: acquiring vibration acceleration signals from the rotating machinery under different operating conditions and extracting segments to construct samples, forming labeled source domain datasets and unlabeled target domain datasets; performing time-domain / frequency-domain data augmentation on the source and target domain samples to construct positive and negative sample pairs; constructing a fault diagnosis model based on "self-supervised contrastive learning + dynamic distribution adaptation," the model including a time-domain / frequency-domain feature encoder Gq and a momentum encoder Gk (Gk does not participate in gradient backpropagation), a time-domain / frequency-domain projection head, a time-frequency consistency projection head RT, RF, and a classifier Cf; and combining the labeled source domain data with... The target domain unlabeled data and its augmented data are input into the model. Advanced momentum contrastive learning extracts time-domain and frequency-domain features respectively. Then, feature fusion is performed in the time-frequency consistency contrastive learning module to reduce the differences of similar faults. Subsequently, instance-level dynamic distribution adaptation is performed on the fused source / target domain features (while taking into account the dynamic trade-off between marginal and conditional distribution differences), and the device health status is output through the classifier Cf. During training, the momentum contrastive loss, time-frequency consistency contrastive loss, dynamic distribution adaptation loss and source domain classification loss are combined for backpropagation to update parameters. Finally, in the testing phase, the trained feature extractor and classifier are used to identify the health status of target domain samples and output diagnostic results. Compared with existing technologies, this invention has significant differences and advantages in terms of method mechanism, data utilization, and applicability to small sample engineering: Compared with the patent document with publication number CN113723491B, its core approach uses STFT to visualize vibration signals and transfer learning based on VGG-16, then introduces SimCLR for contrastive learning and step-by-step unfreezing fine-tuning to complete small-sample diagnosis. This approach has two key limitations: First, the "time-frequency visualization + visual CNN" path is sensitive to parameters such as STFT window length and step size, as well as image enhancement strategies. When faced with non-stationary impacts, frequency drifts, and strong noise interference under various gearbox operating conditions, it is prone to time-frequency artifacts or dilution of key information, reducing transfer robustness. Second, SimCLR mainly performs instance-level contrastive constraints and lacks targeted modeling of the multi-scale temporal structure where "transient impact - long-period modulation" coexists in gearbox faults. Furthermore, VGG-16 has limited ability to characterize long-range dependencies, making it difficult to stably learn consistent discriminative features across operating conditions under small-sample conditions. In contrast, this invention directly constructs an end-to-end model for one-dimensional vibration sequences, generating semantically consistent multi-view samples through multi-scale convolutional embedding and random temporal masking, thus avoiding the parameter sensitivity of image preprocessing. Simultaneously, it employs a multi-scale Mamba (state-space model) to model long sequence dependencies with linear complexity, enabling the simultaneous capture of short-term impact and slowly varying modulation features under different receptive fields, better aligning with the multi-scale dynamic characteristics of gearboxes across load and speed conditions. Furthermore, this invention mines unlabeled structures through a hybrid self-supervised contrastive learning approach at the instance and time step levels, and combines cross-entropy loss and center loss to enhance intra-class compactness and inter-class separability, thereby improving the discriminativeness and stability of small-sample scenarios from a mechanistic perspective.
[0004] Compared with the patent document with publication number CN118861792A, its core adopts "time-domain / frequency-domain dual-branch momentum comparison learning + time-frequency consistency constraint", and superimposes dynamic distribution adaptation (dynamically balancing the difference between marginal distribution and conditional distribution) to achieve adaptation to the variable working condition domain. This method has engineering and optimization limitations: First, the training link includes multiple modules such as time-frequency dual-domain enhancement, momentum encoder, time-frequency consistency comparison and distribution alignment, etc., with more loss terms and hyperparameters. When the target domain samples are scarce or the noise is strong, it is more likely to have optimization instability or sensitivity to enhancement strategies. Second, this method mainly uses statistical distance distribution alignment and emphasizes "inter-domain alignment". However, its ability to model long sequence key segments in gearbox faults, where the decisive information is often concentrated in a few key time slices (impact transients, modulation peaks, etc.), still relies heavily on CNN features and subsequent alignment term compensation. When there is strong drift across working conditions, the discrimination structure may not be stable enough. In contrast, this invention does not require the explicit introduction of complex distribution alignment modules. Instead, it achieves cross-condition generalization through "multi-scale long sequence representation + structured self-supervised task": it uses multi-scale Mamba to characterize long-range dependencies and slow-varying modulation at the sequence level, and time-step contrastive learning driven by time mask to strengthen the consistent representation of key time slices; at the same time, it uses center loss to constrain intra-class aggregation, so that the feature space remains stable and separable under small sample conditions, thereby achieving higher transfer efficiency and diagnostic robustness in engineering scenarios with varying conditions and few annotations. Summary of the Invention
[0005] In view of the deficiencies in the prior art, the purpose of this invention is to provide a fault diagnosis method and system for a marine engine transmission reducer gearbox.
[0006] A fault diagnosis method for a marine engine transmission reducer gearbox provided by the present invention includes the following steps: Step S1: Collect vibration signals of the ship engine transmission reducer gearbox online under preset ship operating conditions; the vibration signals include labeled vibration signals and unlabeled vibration signals, the labeled vibration signals correspond to known fault types and operating conditions, and the unlabeled vibration signals correspond to unknown fault types and operating conditions; Step S2: For the vibration signal collected in step S1, construct a fault diagnosis network adapted to the vibration signal; the fault diagnosis network includes a multi-scale time-series signal embedding module, a Mamba feature extractor and a fault classifier, used to preprocess the vibration signal, extract features and identify faults. Step S3: Based on the vibration signal collected in step S1 and the fault diagnosis network constructed in step S2, a hybrid supervised learning strategy integrating self-supervised learning and supervised learning is designed; in the self-supervised learning, the feature extraction part of the fault diagnosis network is pre-trained using the unlabeled vibration signal; in the supervised learning, the fault diagnosis network is adjusted using the labeled vibration signal, and the signal domain difference under different working conditions is reduced by domain adversarial loss. Step S4: Based on the fault diagnosis network constructed in Step S2 and the hybrid supervised learning strategy designed in Step S3, a fault diagnosis model of the ship engine transmission reducer gearbox is built using the nn package under the PyTorch framework, and the fault diagnosis model is trained. After training, the vibration signal collected in Step S1 is input into the trained fault diagnosis model to obtain the diagnosis result. The model performance is evaluated by comparing the diagnosis result with the actual fault situation. If the performance evaluation does not meet the standard, the process returns to Step S2 to adjust the network structure or Step S3 to optimize the learning strategy, and the subsequent steps are repeated until the model performance meets the preset requirements.
[0007] Preferably, in step S1, the preset ship operating conditions cover different load conditions, different speed conditions, different acceleration and deceleration conditions, and start-stop conditions, and also cover different operating rhythms, preset time operation, and impact load operation states of the ship's lifting mechanism gearbox.
[0008] Preferably, in step S2, the specific working process of the multi-scale temporal signal embedding module is as follows: First, the noisy vibration signal is input into the residual network structure, and the noise features in the vibration signal are learned through the residual network structure, and the denoised vibration signal is automatically output; then, feature extraction is performed on the denoised vibration signal at different time scales, and the one-dimensional temporal vibration signal is upgraded to obtain a multi-dimensional temporal embedding that retains all the information of the original vibration signal, has different receptive field information, and is adapted to the learning of the Mamba feature extractor; finally, the multi-dimensional temporal embedding is processed by random time masking to obtain enhanced views with different information, and the enhanced views are used for the design of positive and negative samples in the contrastive learning of the hybrid supervised learning strategy.
[0009] Preferably, in step S2, the Mamba feature extractor is an improved Mamba feature extractor, which is constructed by combining the attention mechanism of the transformer with the state space model; The improved Mamba feature extractor can perform overall modeling of long-sequence vibration signals generated during the actual operation of the gearbox of a ship engine transmission reducer, and can adaptively focus on short-time impact features and long-time frequency modulation features in the vibration signal according to the actual characteristics of the vibration signal.
[0010] Preferably, in step S3, the hybrid supervised learning strategy is implemented as follows: First, the vibration signal collected in step S1 is divided into three parts: source domain data with labels, source domain data without labels, and target domain data without labels. In the self-supervised learning process, unlabeled source domain data and unlabeled target domain data are used for comparative learning. Feature extraction is constrained by designing instance-contrast loss and temporal-contrast loss: instance-contrast loss treats different augmented views of the same sample as positive sample pairs and different samples as negative sample pairs; temporal-contrast loss treats the same time step of different augmented views of the same sample as positive sample pairs and different time steps of different augmented views of the same sample as negative sample pairs, so that the feature extraction part of the fault diagnosis network can understand the temporal characteristics of the sample itself. During supervised learning, labeled source domain data is used to adjust the model. By designing a pyramid pooling module, the feature signals are converted into feature structures that are adapted to the classification of the fault classifier. At the same time, cross-entropy loss and center loss are used to process the feature signals to enhance the inter-class separability and intra-class compactness of the features, and to constrain the feature extraction part to extract features that are adapted to the classification task.
[0011] Preferably, the fault diagnosis model for the ship engine transmission reducer gearbox built in step S4 integrates the multi-scale temporal signal embedding module, the Mamba feature extractor, and the hybrid supervised learning strategy in step S3, and is specifically implemented as follows: First, the multi-scale time-series signal embedding module automatically performs signal denoising on the input vibration signal and extracts the multi-dimensional time information of the signal to obtain a time embedding suitable for encoder modeling. Finally, time masking is added to obtain different enhanced views of the signal, which is adapted to the signal preprocessing requirements of the vibration signal with preset vibration information under the preset operating conditions of the ship engine. Secondly, the Mamba feature extractor automatically learns the information of vibration signals at different time scales and assigns attention to features that are suitable for fault classification, diagnosis and migration with a preset threshold, thus adapting to the fault feature extraction requirements of time-series signals under preset working conditions. Finally, a hybrid supervised learning strategy is adopted. When the number of labeled samples of ship engine vibration signals is within a preset threshold, positive and negative sample pairs are constructed and comparative learning is carried out through self-supervised comparative learning to autonomously learn the characteristics of the vibration signals. At the same time, the source domain sample labels are used to constrain the sample space obtained by the feature extractor in self-supervised learning through a supervised learning method that combines cross-entropy loss and center loss. In the hybrid supervised learning strategy, GradNorm is introduced to dynamically balance the weights of multiple loss terms, which is used to suppress gradient conflicts and gradient imbalances during multi-task training and to achieve cross-condition transfer learning.
[0012] Preferably, in step S2, the feature extraction part of the fault diagnosis network adopts a multi-scale Mamba encoder; the multi-scale Mamba encoder dynamically adjusts the modeling size of the time scale in the spatial state model, adaptively focuses on the local and global temporal features in the vibration signal and completes global temporal modeling, thereby realizing feature extraction of vibration signals of the gearbox of the ship engine transmission reducer under different working conditions.
[0013] Preferably, in step S3, the hybrid supervised learning strategy is specifically as follows: in the self-supervised learning stage, instance comparison learning and time comparison learning are used to pre-train the temporal features of the source domain data and the target domain samples themselves; in the supervised learning stage, cross-entropy loss and center loss are used to constrain the feature space to enhance the intra-class compactness and inter-class separability of the features. The loss function used in self-supervised learning is:
[0014]
[0015]
[0016] in, Let N represent the instance-contrast loss, and N represent the number of samples in a single training iteration during self-supervised learning. Different enhanced views of the same sample, which serve as positive sample pairs. Different enhanced views of different samples, which serve as negative sample pairs; Indicates the temperature coefficient; This represents the temporal contrast loss, where T represents the number of time steps in a single sample augmented view. For the same time step of different augmented views of the same sample, it is considered as a positive sample pair. Different time steps of different augmented views of the same sample, which serve as negative sample pairs; L ssl This represents the total loss in self-supervised learning. These represent the loss weights for instance-to-instance comparison loss and time-to-time comparison loss, respectively. The loss function used in supervised learning is:
[0017]
[0018]
[0019] in, Let M represent the cross-entropy loss, where M is the number of labeled source domain samples and K is the number of fault types. Let the i-th sample be the true label corresponding to the k-th fault type. Let be the predicted probability of the fault category k corresponding to the i-th sample; Indicates the loss at the center. This represents the feature vector obtained after feature extraction of the i-th input sample by the model; each category center For the first The mean of all sample feature vectors for each fault type is dynamically updated during training based on the average feature distribution of that category. The loss weight represents the central loss.
[0020] This invention also provides a fault diagnosis system for a marine engine transmission reducer gearbox, comprising the following modules: Module M1: Online acquisition of vibration signals of the ship engine transmission reducer gearbox under preset ship operating conditions; the vibration signals include labeled vibration signals and unlabeled vibration signals, the labeled vibration signals correspond to known fault types and operating conditions, and the unlabeled vibration signals correspond to unknown fault types and operating conditions; Module M2: Constructs a fault diagnosis network adapted to the vibration signals collected by module M1; the fault diagnosis network includes a multi-scale time-series signal embedding module, a Mamba feature extractor, and a fault classifier, used for preprocessing, feature extraction, and fault identification of the vibration signals; Module M3: For the vibration signals collected by module M1 and the fault diagnosis network constructed by module M2, a hybrid supervised learning strategy integrating self-supervised learning and supervised learning is designed; in the self-supervised learning, the feature extraction part of the fault diagnosis network is pre-trained using the unlabeled vibration signals; in the supervised learning, the fault diagnosis network is adjusted using the labeled vibration signals, and the signal domain differences under different working conditions are reduced by domain adversarial loss. Module M4: Based on the fault diagnosis network built in Module M2 and the hybrid supervised learning strategy designed in Module M3, a fault diagnosis model of the gearbox of the marine engine transmission reducer is built using the nn package under the PyTorch framework, and the fault diagnosis model is trained. After training, the vibration signal collected by Module M1 is input into the trained fault diagnosis model to obtain the diagnosis result. The model performance is evaluated by comparing the diagnosis result with the actual fault situation. If the performance evaluation does not meet the standard, the process returns to Module M2 to adjust the network structure or Module M3 to optimize the learning strategy, and subsequent modules are re-executed until the model performance meets the preset requirements.
[0021] Preferably, in module M1, the preset ship operating conditions cover different load conditions, different speed conditions, different acceleration and deceleration conditions, and start-stop conditions, and also cover different operating rhythms, preset time operation, and impact load operation states of the ship's lifting mechanism gearbox. In module M2, the specific working process of the multi-scale temporal signal embedding module is as follows: First, the noisy vibration signal is input into the residual network structure, and the noise features in the vibration signal are learned through the residual network structure, and the denoised vibration signal is automatically output; then, feature extraction is performed on the denoised vibration signal at different time scales, and the one-dimensional temporal vibration signal is upgraded to obtain a multi-dimensional temporal embedding that retains all the information of the original vibration signal, has different receptive field information, and is adapted to the learning of the Mamba feature extractor; finally, the multi-dimensional temporal embedding is processed by random time masking to obtain enhanced views with different information. The enhanced views are used for the design of positive and negative samples in the contrastive learning of the hybrid supervised learning strategy. In module M2, the Mamba feature extractor is an improved Mamba feature extractor, which is constructed by combining the attention mechanism of transformer with the state space model. The improved Mamba feature extractor can perform overall modeling of long-sequence vibration signals generated during the actual operation of the gearbox of the ship engine transmission reducer, and can adaptively focus on short-time impact features and long-time frequency modulation features in the vibration signal according to the actual characteristics of the vibration signal. In module M3, the specific implementation of the hybrid supervised learning strategy is as follows: First, the vibration signal collected by module M1 is divided into three parts: source domain data with labels, source domain data without labels, and target domain data without labels. In the self-supervised learning process, unlabeled source domain data and unlabeled target domain data are used for comparative learning. Feature extraction is constrained by designing instance-contrast loss and temporal-contrast loss: instance-contrast loss treats different augmented views of the same sample as positive sample pairs and different samples as negative sample pairs; temporal-contrast loss treats the same time step of different augmented views of the same sample as positive sample pairs and different time steps of different augmented views of the same sample as negative sample pairs, so that the feature extraction part of the fault diagnosis network can understand the temporal characteristics of the sample itself. During supervised learning, labeled source domain data is used to adjust the model. By designing a pyramid pooling module, the feature signals are converted into feature structures that are adapted to the fault classifier. At the same time, cross-entropy loss and center loss are used to process the feature signals to enhance the inter-class separability and intra-class compactness of the features, and to constrain the feature extraction part to extract features that are adapted to the classification task. The fault diagnosis model for the marine engine transmission reducer gearbox built in module M4 integrates the multi-scale temporal signal embedding module and Mamba feature extractor in module M2 with the hybrid supervised learning strategy in module M3. The specific implementation is as follows: First, the multi-scale time-series signal embedding module automatically performs signal denoising on the input vibration signal and extracts the multi-dimensional time information of the signal to obtain a time embedding suitable for encoder modeling. Finally, time masking is added to obtain different enhanced views of the signal, which is adapted to the signal preprocessing requirements of the vibration signal with preset vibration information under the preset operating conditions of the ship engine. Secondly, the Mamba feature extractor automatically learns the information of vibration signals at different time scales and assigns attention to features that are suitable for fault classification, diagnosis and migration with a preset threshold, thus adapting to the fault feature extraction requirements of time-series signals under preset working conditions. Finally, a hybrid supervised learning strategy is adopted. When the number of labeled samples of ship engine vibration signals is within a preset threshold, positive and negative sample pairs are constructed and comparative learning is carried out through self-supervised comparative learning to autonomously learn the characteristics of the vibration signals. At the same time, the source domain sample labels are used to constrain the sample space obtained by the feature extractor in self-supervised learning through a supervised learning method that combines cross-entropy loss and center loss. In the hybrid supervised learning strategy, GradNorm is introduced to dynamically balance the weights of multiple loss terms, which is used to suppress gradient conflicts and gradient imbalances in the multi-task training process and realize cross-condition transfer learning. In module M2, the feature extraction part of the fault diagnosis network adopts a multi-scale Mamba encoder. The multi-scale Mamba encoder dynamically adjusts the modeling size of the time scale in the spatial state model, adaptively focuses on the local and global temporal features in the vibration signal, and completes global temporal modeling to realize feature extraction of vibration signals of ship engine transmission reducer gearbox under different working conditions. In module M3, the hybrid supervised learning strategy is specifically as follows: in the self-supervised learning stage, instance comparison learning and time comparison learning are used to pre-train the temporal features of the source domain data and the target domain samples themselves; in the supervised learning stage, cross-entropy loss and center loss are used to constrain the feature space to enhance the intra-class compactness and inter-class separability of the features. The loss function used in self-supervised learning is:
[0022]
[0023]
[0024] in, Let N represent the instance-contrast loss, and N represent the number of samples in a single training iteration during self-supervised learning. Different enhanced views of the same sample, which serve as positive sample pairs. Different enhanced views of different samples, which serve as negative sample pairs; Indicates the temperature coefficient; This represents the temporal contrast loss, where T represents the number of time steps in a single sample augmented view. For the same time step of different augmented views of the same sample, it is considered as a positive sample pair. Different time steps of different augmented views of the same sample, which serve as negative sample pairs; L ssl This represents the total loss in self-supervised learning. These represent the loss weights for instance-to-instance comparison loss and time-to-time comparison loss, respectively. The loss function used in supervised learning is:
[0025]
[0026]
[0027] in, Let M represent the cross-entropy loss, where M is the number of labeled source domain samples and K is the number of fault types. Let the i-th sample be the true label corresponding to the k-th fault type. Let be the predicted probability of the fault category k corresponding to the i-th sample; Indicates the loss at the center. This represents the feature vector obtained after feature extraction of the i-th input sample by the model; each category center For the first The mean of all sample feature vectors for each fault type is dynamically updated during training based on the average feature distribution of that category. The loss weight represents the central loss.
[0028] Compared with the prior art, the present invention has the following beneficial effects: 1. This invention introduces residual denoising and multi-scale convolutional embedding at the input end to perform hierarchical encoding of one-dimensional vibration sequences. This can simultaneously retain the local transient information of fault impact and the slowly varying modulation information caused by changes in operating conditions, effectively suppressing noise interference and enhancing the ability to express non-stationary vibration features such as those across speed and load, thereby improving the robustness and generalization of feature extraction.
[0029] 2. This invention uses a multi-scale Mamba (state space model) as the core feature extractor. Through state space modeling at multiple different scales and an adaptive step size mechanism, it captures long-range dependencies with low computational overhead. This enables the model to simultaneously characterize short-term shocks and long-period modulation patterns in long-term sequences, overcoming the problems of traditional CNNs inadequate characterization of long-range dependencies and unstable features under strong operating conditions.
[0030] 3. This invention constructs multi-view sequences by using random time masks and combines instance-level contrastive loss with time-step-level contrastive loss to mine the intrinsic structural information of unlabeled data without the need for a large number of annotations, strengthens the consistency representation of key time slices, and significantly improves the representation learning efficiency and cross-domain generalization ability under small sample conditions.
[0031] 4. This invention jointly optimizes cross-entropy loss and center loss, making similar samples more compact in the feature space and the intervals between different categories clearer, thereby improving the accuracy and stability of fault classification; at the same time, GradNorm is introduced to dynamically balance multi-objective loss, alleviate gradient conflict and imbalance problems in multi-task training, and improve overall convergence stability and diagnostic robustness. Attached Figure Description
[0032] Other features, objects, and advantages of the present invention will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings: Figure 1 A flowchart illustrating the implementation of a fault diagnosis method for a marine engine transmission reducer gearbox; Figures 1A-1F for Figure 1 A partial subgraph; Figure 2 Partial flowchart of a fault diagnosis method for marine engine transmission reduction gearboxes Figure 1 ; Figure 3 Flowchart for the implementation of the multi-scale Mamba feature extractor; Figure 4 Partial flowchart of a fault diagnosis method for marine engine transmission reduction gearboxes Figure 2 ; Figures 4A-4C for Figure 4 A partial subgraph. Detailed Implementation
[0033] The present invention will now be described in detail with reference to specific embodiments. These embodiments will help those skilled in the art to further understand the present invention, but do not limit the invention in any way. It should be noted that those skilled in the art can make several changes and improvements without departing from the concept of the present invention. These all fall within the protection scope of the present invention.
[0034] Example 1 As Figure 1 , Figures 1A-1F , Figure 2 , Figure 3 , Figure 4 , Figures 4A-4C shown, this embodiment discloses a fault diagnosis method for the gearbox of a marine engine transmission reducer, which is applicable to the gearboxes of the engine transmission reducers of various ocean-going and offshore ships (including but not limited to the gearboxes supporting the ship lifting mechanism and the main propulsion system gearbox), and can accurately identify various faults of the gearbox under different operating conditions (such as tooth surface wear, tooth root crack, bearing damage, shafting asymmetry, and abnormal gear meshing, etc.), especially suitable for the actual ship operation scenarios with scarce labeled samples and variable operating conditions. The specific implementation steps are as follows: Step S1: Online acquisition of vibration signals.
[0035] Online acquisition of the vibration signals of the gearbox of the marine engine transmission reducer under the preset ship operating conditions. The acquisition process relies on the existing vibration monitoring sensors on the ship (which can be piezoelectric acceleration sensors, with the sampling frequency set at 10 kHz - 50 kHz and the sampling duration at 10 s - 60 s, which can be flexibly adjusted according to the actual operation rhythm of the ship). The sensors are fixedly installed at the vibration-sensitive parts of the gearbox housing (such as the input end bearing seat, the output end bearing seat, and the housing surface corresponding to the gear meshing area) to ensure that the acquired vibration signals can truly reflect the operating state of the gearbox.
[0036] The vibration signals include labeled vibration signals and unlabeled vibration signals, where: the labeled vibration signals correspond to known fault types and operating conditions, and the fault types (such as mild wear, moderate wear, severe wear, tooth root crack, outer ring wear of the bearing, etc.) and the corresponding operating conditions are determined by professional technicians through manual inspection and fault simulation tests (such as artificially setting fault parameters such as tooth surface wear amount and tooth root crack size), and the signals are manually labeled; the unlabeled vibration signals correspond to unknown fault types and operating conditions, which are the signals collected in real time during the normal operation of the ship and have not been manually labeled, without the need for additional fault simulation, reducing the labeling cost.
[0037] Furthermore, the preset ship operating conditions cover different load conditions (the load range can be 30%-120% of the gearbox's rated load, divided into different load levels in 10% increments, covering actual operating loads such as no-load, light-load, rated load, and overload), different speed conditions (the speed range can be 50%-110% of the gearbox's rated speed, adapting to different navigation states such as low-speed navigation, constant-speed navigation, and high-speed navigation), and different acceleration and deceleration conditions (acceleration rate can be 0.5r / s²-2r / s², and deceleration rate is 0.3r / s²-1.5r / s², covering ship acceleration at start-up and deceleration at dock). The system records the vibration signals under various operating conditions, including start-up and stop conditions (recording complete signals from the moment of start-up to when the speed stabilizes and then decreases to stop, with each duration not less than 5 seconds). Simultaneously, the preset operating conditions cover different operating rhythms of the ship's lifting mechanism gearbox (such as alternating rhythms of lifting, lowering, and pausing, with intervals of 30 seconds to 5 minutes), preset time operation (preset duration of 1 hour to 24 hours, covering gearbox operation during short-term and long-term continuous voyages), and impact load operation (impact load is 1.2 to 1.5 times the rated load, simulating the gearbox stress state under sudden scenarios such as wind, waves, and cargo loading impacts). The collected vibration signals undergo preliminary noise reduction (using mean filtering to remove sensor noise, with a filter window size of 5-15) to avoid invalid noise signals affecting subsequent diagnostic accuracy. After collection, the signals are stored in the ship monitoring system's database for later retrieval.
[0038] Step S2: Fault diagnosis network construction.
[0039] For the vibration signal (one-dimensional time-series signal, the signal length can be determined according to the sampling frequency and sampling duration, such as 100,000 data points when the sampling frequency is 10kHz and the sampling duration is 10s), a fault diagnosis network adapted to the vibration signal is constructed. The fault diagnosis network adopts a deep learning network architecture and is deployed on the edge computing node or backend server of the ship monitoring system. It can realize real-time preprocessing of signals, feature extraction and fault identification, with an overall response time of no more than 1s, meeting the real-time fault diagnosis requirements of ships. The fault diagnosis network specifically includes a multi-scale time-series signal embedding module, a Mamba feature extractor and a fault classifier. The modules work together, and their specific structure and working process are as follows: 2.1 Multi-scale time-series signal embedding module.
[0040] The multi-scale temporal signal embedding module is used to preprocess and transform the dimensions of the acquired vibration signal to adapt to the input requirements of the subsequent feature extraction module. Its specific working process is as follows: First, the noisy vibration signal acquired in step S1 (which still contains a small amount of equipment noise and environmental noise after preliminary mean filtering) is input into a residual network structure (a ResNet18 architecture can be used, removing fully connected layers and retaining convolutional layers and residual connections; the convolutional kernel size is set to 3×1, 5×1, or 7×1, with a stride of 1 and padding of 1-3 to ensure no signal length loss). The residual network's convolutional layers learn the noise features in the vibration signal (the frequency and amplitude characteristics of the noise signal differ from those of the effective vibration signal; the residual network, through multiple rounds of convolution and activation operations, can accurately separate noise features from effective signal features), automatically outputting the denoised vibration signal. The signal-to-noise ratio of the denoised signal is improved to over 30dB. Subsequently, feature extraction is performed on the denoised vibration signal at different time scales by setting three convolutional branches at different scales (e.g., small scale: time window of 5-10 data points). The process involves extracting high-frequency short-time features corresponding to gear meshing impact signals; at a medium scale (time window of 20-50 data points), extracting mid-frequency features corresponding to bearing operation signals; and at a large scale (time window of 100-200 data points), extracting low-frequency long-time features corresponding to shaft system operation signals. Convolution operations are performed on the denoised one-dimensional temporal vibration signals to increase their dimensionality, resulting in a multi-dimensional temporal embedding that retains all information of the original vibration signal while possessing different receptive field information and adapting to the Mamba feature extractor (the embedding dimension can be set to 64-256, preferably 128, and can be adjusted according to signal complexity). Finally, the multi-dimensional temporal embedding is processed by random time masking, with a mask ratio set to 5%-15% (randomly obscuring the embedding features of some time steps to simulate local signal loss and interference scenarios during ship signal transmission), resulting in enhanced views with different information (2-4 enhanced views can be generated for each sample, preferably 2). These enhanced views are used for positive and negative sample design in the comparative learning of the hybrid supervised learning strategy, enhancing the model's anti-interference ability and generalization ability.
[0041] 2.2 Mamba Feature Extractor.
[0042] The Mamba feature extractor, as the core feature extraction part of the fault diagnosis network, is used to extract fault features (such as the characteristic frequency, amplitude change, and temporal correlation corresponding to the fault) in the vibration signal. The Mamba feature extractor is an improved Mamba feature extractor, which is constructed by combining the attention mechanism of the transformer with the state space model (SSM). It solves the problems of low efficiency and inaccurate feature extraction of the traditional Mamba model for long sequence signals, while making up for the defects of the transformer model, such as large computational load and unsuitability for edge computing.
[0043] The specific structure of the improved Mamba feature extractor is as follows: the input layer receives the multi-dimensional temporal embedding output from the multi-scale temporal signal embedding module, which then passes sequentially through an attention enhancement layer (which can employ a multi-head attention mechanism, with 4-8 heads, preferably 6 heads, and an attention dropout probability of 0.1), a state space model layer (which can employ selective scanning SSM, with a state dimension of 64-128, preferably 96 dimensions, and a scanning window size of 16-32), an activation layer (which can employ the GELU activation function), and a normalization layer (LayerNorm), outputting the extracted fault feature vector (with the same dimensionality as the multi-dimensional temporal embedding, which is 128 dimensions). Its operation... Its features include: the ability to perform overall modeling of long-sequence vibration signals (length ≥ 10,000 data points) generated during the actual operation of marine engine transmission reducer gearboxes, without the need for signal segmentation, thus avoiding feature loss caused by segmentation; and the ability to adaptively adjust attention weights based on the actual characteristics of the vibration signals (such as the frequency, amplitude, and duration of fault signals), focusing on short-term impact features (such as instantaneous impact signals caused by gear cracks, which have short duration and large amplitude) and long-term frequency modulation features (such as slowly changing frequency signals caused by bearing wear, which have long duration and stable amplitude), accurately extracting core features related to the fault and eliminating irrelevant interference features.
[0044] Furthermore, the feature extraction part of the fault diagnosis network adopts a multi-scale Mamba encoder as the core module, which is integrated after the state space model layer of the improved Mamba feature extractor to further optimize the feature extraction effect. The multi-scale Mamba encoder dynamically adjusts the modeling size of the time scale in the spatial state model (for example, the modeling time scale range is 10-200 data points, corresponding to the time window of the multi-scale time series signal embedding module), adaptively focusing on local time series features (such as short-term impact and instantaneous interference) and global time series features (such as the overall trend of the signal and the long-term fault evolution law) in the vibration signal and completing global time series modeling. This enables efficient feature extraction of vibration signals of ship engine transmission reducer gearbox under different working conditions, with the feature extraction accuracy improved to over 90%. Compared with the traditional Mamba model, the feature extraction efficiency is improved by more than 30%, the computational load is reduced by more than 25%, and it adapts to the resource constraints of ship edge computing nodes.
[0045] 2.3 Fault Classifier.
[0046] The fault classifier is used to classify and identify the fault feature vectors output by the Mamba feature extractor to determine the fault type of the gearbox. It adopts a fully connected network architecture, specifically including two fully connected layers and one output layer: the first fully connected layer maps the 128-dimensional feature vector to 64 dimensions, the second fully connected layer maps it to 32 dimensions, and the output layer uses the Softmax activation function. The output dimension is consistent with the number of fault types K in the gearbox (e.g., K=5, corresponding to five fault types: light wear, moderate wear, heavy wear, tooth root crack, and bearing damage). It outputs the predicted probability of each fault type, and the fault type with the highest predicted probability is the preliminary diagnosis result. The dropout probability of the fault classifier is set to 0.2 to avoid model overfitting and ensure classification stability under different operating conditions.
[0047] Step S3: Design of hybrid supervised learning strategy.
[0048] For the vibration signals collected in step S1 (e.g., labeled signals account for 10%-30%, and unlabeled signals account for 70%-90%, adapting to the problem of scarce labeled samples in actual ship scenarios) and the fault diagnosis network constructed in step S2, a hybrid supervised learning strategy integrating self-supervised learning and supervised learning is designed. This strategy balances the utilization rate of unlabeled signals and the guiding role of labeled signals, while also addressing the problem of decreased diagnostic accuracy caused by differences in signal domains under different operating conditions. The hybrid supervised learning strategy is deployed in the model training environment and trained collaboratively with the fault diagnosis network. The specific implementation method is as follows: 3.1 Vibration signal classification.
[0049] First, the vibration signals collected in step S1 are divided into three parts: labeled source domain data, unlabeled source domain data, and unlabeled target domain data. The source domain data consists of vibration signals collected from the ship's gearbox under common operating conditions (such as rated load, rated speed, and constant speed navigation) (accounting for 60%-70% of the total signal volume), including labeled and unlabeled data. Labeled source domain data is used for supervised learning, while unlabeled source domain data is used for self-supervised learning pre-training. The target domain data consists of vibration signals collected from the ship's gearbox under special operating conditions (such as overload, low speed, and impact load) (accounting for 30%-40% of the total signal volume), all of which are unlabeled data. This data is used for self-supervised learning pre-training to simulate scenarios where special operating conditions are difficult to label in actual ship operations. During the division process, it is ensured that the fault type coverage of the source domain data and the target domain data is consistent to avoid insufficient model generalization ability due to data division deviations.
[0050] 3.2 Self-supervised learning process.
[0051] In the self-supervised learning process, unlabeled source domain data and unlabeled target domain data are used for comparative learning. By designing instance contrast loss (Linst) and temporal contrast loss (Ltemp) to constrain feature extraction, no manual labeling is required, and the temporal features in the vibration signal are learned autonomously. Specifically, the instance contrast loss uses different augmented views of the same sample (the two augmented views generated in step S2) as positive sample pairs and augmented views of different samples (samples of any two different gearbox operating states) as negative sample pairs. By calculating the similarity between positive and negative sample pairs, the feature vector output by the feature extractor is constrained, making the features of different augmented views of the same sample more similar and the features of different samples more distinguishable. The temporal contrast loss uses the same time step (corresponding to the vibration signal features at the same moment) of different augmented views of the same sample as positive sample pairs and different time steps (corresponding to the vibration signal features at different moments) of different augmented views of the same sample as negative sample pairs. This constrains the feature extractor to focus on the temporal correlation of the vibration signal, so that the feature vector can reflect the temporal evolution law of the signal, thereby enabling the feature extraction part of the fault diagnosis network to understand the temporal features of the sample itself and obtain more robust features.
[0052] Furthermore, the specific definition and parameter description of the loss function used in self-supervised learning are as follows to ensure the feasibility and rationality of the loss function: Example comparison loss:
[0053] Time comparison loss:
[0054] Total loss in self-supervised learning:
[0055] in, denoted as instance contrast loss, where N represents the number of samples (batch size, which can be set to 32-128, preferably 64) in a single training session during self-supervised learning. The feature vectors of two different augmented views of the i-th sample after feature extraction are used as positive sample pairs. is the feature vector (j≠i) obtained after feature extraction from the first enhanced view of the i-th sample and the second enhanced view of the j-th sample, which is used as a negative sample pair; sim(·,·) represents the similarity calculation function of the feature vectors, which uses cosine similarity calculation, that is, the dot product of the two feature vectors divided by the product of the magnitudes of the two feature vectors; τ represents the temperature coefficient, which is used to adjust the weight of similarity, set to 0.05-0.2, preferably 0.1, to avoid gradient vanishing or gradient explosion.
[0056] The time-contrast loss is represented by T, which represents the number of time steps in a single sample augmented view (consistent with the length of the multidimensional temporal embedding, set to 100-500, preferably 200). The feature vector at time step t in two different augmented views of the same sample is used as a positive sample pair. The feature vectors (t≠t') at time step t and time step t' in two different augmented views of the same sample are used as negative sample pairs.
[0057] These represent the loss weights for instance-to-instance comparison loss and time-to-time comparison loss, respectively, both of which are positive numbers and satisfy the following condition: + =1, adjusted based on actual training results, optimal. =0.6、 =0.4, ensuring balanced learning of instance features and temporal features; L ssl This represents the total loss of self-supervised learning, used to update the parameters of the feature extraction part (multi-scale temporal signal embedding module, Mamba feature extractor) in the fault diagnosis network. The number of self-supervised learning pre-training rounds is set to 50-100 rounds, preferably 80 rounds, and the pre-training learning rate is set to 1e-4. The Adam optimizer is used to ensure stable convergence during the pre-training process.
[0058] In summary, the core of the self-supervised learning stage is to use instance-based comparative learning and time-based comparative learning to pre-train the temporal features of the source domain data and target domain samples, mine effective information in unlabeled signals, improve the feature representation capability of the feature extractor, and lay the foundation for subsequent supervised learning.
[0059] 3.3 Supervise the learning process.
[0060] In the supervised learning process, labeled source domain data is used to adjust the model, further optimize the parameters of the fault diagnosis network, and improve the fault classification accuracy. Specifically, the following steps are taken: First, a pyramid pooling module (PPM) is designed to input the 128-dimensional feature vector output by the Mamba feature extractor into the pyramid pooling module. Four pooling scales (1×1, 2×2, 4×4, 8×8) are set to perform multi-scale pooling operations on the feature vectors. The pooled features of different scales are concatenated and fused to convert them into a feature structure (32-dimensional feature vector, consistent with the input dimension of the fault classifier) that is suitable for the classification of the fault classifier. At the same time, cross-entropy loss (LCE) and center loss (Lcenter) are used to process the feature signals. Cross-entropy loss is used to enhance the inter-class separability of features, making the feature vectors of different fault types more distinguishable. Center loss is used to enhance the intra-class compactness of features, making the feature vectors of different samples of the same fault type more concentrated, and constraining the feature extraction part to extract features suitable for the classification task.
[0061] Furthermore, the specific definition and parameter description of the loss function used in supervised learning are as follows to ensure the feasibility and rationality of the loss function: Cross-entropy loss:
[0062] Central loss:
[0063] Total Loss in Supervised Learning:
[0064] in, The cross-entropy loss is represented by M, which is the number of labeled source domain samples (batch size for a single training session, set to 32-64, preferably 32), and K is the number of fault types (determined based on the types of faults that may occur in the actual gearbox, such as K=5-10, preferably 6 types, covering common faults of gears, bearings, and shafts). Let the true label of the i-th sample correspond to the k-th fault type be represented using one-hot encoding (if the i-th sample is the k-th fault, then...). =1, other fault types =0); The predicted probability of the fault category k corresponding to the i-th sample is output by the fault classifier.
[0065] Indicates the loss at the center. This represents the feature vector (128-dimensional) obtained after feature extraction of the i-th input sample by the model, with each category center... For the first The mean of the feature vectors of all samples for each fault type is dynamically updated during training based on the average feature distribution of that category (the category center is updated once after each round of training). This represents the L2 norm, used to calculate the Euclidean distance between the feature vector and the class center.
[0066] The total loss function for the entire supervised learning task is represented by β, which represents the weight of the center loss. It is set to 0.01-0.1, preferably 0.05, to balance the influence of cross-entropy loss and center loss, avoiding excessive weight of the center loss leading to model overfitting, or insufficient weight to exert the intra-class compactness constraint. The number of supervised learning training rounds is set to 100-200, preferably 150, and the learning rate is set to 5e-5. The Adam optimizer is used, and the learning rate decays every 20 rounds (decay coefficient is 0.8) to ensure convergence of the training process.
[0067] Furthermore, during supervised learning, Domain Adversarial Loss is used to reduce signal domain differences under different operating conditions, addressing the issue of varying vibration signal distributions and decreased diagnostic accuracy caused by different ship operating conditions (such as load and speed changes). The Domain Adversarial Loss is implemented using a Gradient Reversal Layer (GRL), which inputs the feature vector output by the feature extractor into the domain classifier (two fully connected layers with an output dimension of 2, corresponding to the source and target domains). The gradient reversal layer reverses the gradient update direction of the feature extractor, enabling the feature extractor to learn general features independent of operating conditions. The weight of the Domain Adversarial Loss is set to 0.1-0.3, preferably 0.2, and is fused with the total loss of supervised learning to jointly update all parameters of the fault diagnosis network (feature extraction part + fault classifier).
[0068] Step S4: Fault diagnosis model building, training and performance evaluation.
[0069] Based on the fault diagnosis network constructed in step S2 and the hybrid supervised learning strategy designed in step S3, a fault diagnosis model for the gearbox of a ship engine transmission reducer is built using the nn package under the PyTorch framework (version 1.10.0 and above, adapted to the relevant functions of the nn package). The model is built using modular programming, and each module (multi-scale time series signal embedding module, Mamba feature extractor, fault classifier, pyramid pooling module, gradient inversion layer, etc.) is implemented through the nn.Module class of PyTorch, which allows for flexible adjustment of module parameters and facilitates subsequent maintenance and optimization. After the model is built, it is deployed on the backend server or edge computing node of the ship monitoring system. The edge computing node uses NVIDIA Jetson Xavier NX to ensure the real-time running performance of the model. The model occupies no more than 4GB of memory, which meets the resource constraints of ship equipment.
[0070] 4.1 Specific implementation of the fault diagnosis model.
[0071] The fault diagnosis model for the marine engine transmission reducer gearbox built in step S4 integrates the multi-scale temporal signal embedding module and Mamba feature extractor from step S2 with the hybrid supervised learning strategy from step S3 to achieve accurate fault diagnosis under complex working conditions. The specific implementation process is as follows: First, the multi-scale temporal signal embedding module automatically performs signal denoising processing on the input vibration signal (the original vibration signal collected in step S1, which does not require additional preprocessing, only mean filtering to remove sensor noise) (achieved through a residual network), and extracts the multi-dimensional temporal information of the signal (multi-scale convolutional branch) to obtain a temporal embedding (128-dimensional) suitable for encoder (multi-scale Mamba encoder) modeling. Finally, time masking processing (masking ratio 10%) is added to obtain different enhanced views of the signal (2 enhanced views for each sample), which is adapted to the signal preprocessing requirements of the vibration signal with preset vibration information (complex, multi-interference, and strong temporal sequence) under the preset operating conditions of ship engines, ensuring the effectiveness of the input features.
[0072] Secondly, the Mamba feature extractor (improved version) automatically learns the information of vibration signals at different time scales (short-term impact, long-term frequency modulation features), and assigns attention to features that are suitable for fault classification diagnosis and migration with a preset threshold (the attention weight threshold is set to 0.5, and features with a weight higher than 0.5 are core fault features and are given priority for classification), adapting to the fault feature extraction requirements of time-series signals under preset working conditions, accurately extracting fault-related features, and eliminating working condition interference.
[0073] Finally, a hybrid supervised learning strategy is adopted. When the number of labeled samples of ship engine vibration signals is within a preset threshold (labeled samples account for 10% of the total sample size, i.e., the preset threshold is 10%, which can be adjusted according to the actual labeling cost), positive and negative sample pairs are constructed and comparative learning is carried out through self-supervised comparative learning (instance comparison + time comparison) to autonomously learn the characteristics of vibration signals. At the same time, by using source domain sample labels, a supervised learning method combining cross-entropy loss and center loss is used to constrain the sample space obtained by the feature extractor in self-supervised learning, making the feature vector more discriminative and generalizable.
[0074] Furthermore, in the hybrid supervised learning strategy, GradNorm (gradient normalization) is introduced to dynamically balance the weights of various loss terms (total loss of self-supervised learning, total loss of supervised learning, and domain adversarial loss). This is used to suppress gradient conflicts (opposite gradient directions of different loss terms) and gradient imbalances (excessive gradient magnitude of a certain loss term, leading to excessive updates of dominant parameters) during multi-task training, ensuring that each loss term plays a balanced role. GradNorm dynamically adjusts the weights of each loss term by normalizing its gradient magnitude, ensuring stable convergence of the model training process, thereby achieving efficient cross-condition transfer learning and enabling the model to maintain high diagnostic accuracy under different loads, speeds, impact loads, and other conditions.
[0075] 4.2 Model Training.
[0076] The fault diagnosis model was trained in two stages: the first stage was a self-supervised pre-training stage, in which only the feature extraction part of the fault diagnosis network (multi-scale temporal signal embedding module, Mamba feature extractor) was trained. Unlabeled source domain data and target domain data were input, and the parameters were updated using the self-supervised learning total loss (LSSL). The training lasted for 80 epochs with a learning rate of 1e-4, an Adam optimizer, and a batch size of 64. The second stage was a supervised fine-tuning stage, in which all parameters of the fault diagnosis network (feature extraction part + fault classifier) were trained. Labeled source domain data and unlabeled target domain data were input, and the parameters were updated using the total loss fused with the supervised learning total loss (LSup) and domain adversarial loss. The training lasted for 150 epochs with a learning rate of 5e-5, an Adam optimizer, and a batch size of 32. The learning rate was decayed every 20 epochs, and the model performance was verified every 10 epochs.
[0077] During training, an early stopping strategy is used to prevent model overfitting. If the diagnostic accuracy of the validation set does not improve after 15 consecutive rounds and the validation set loss continues to rise, training is stopped and the current optimal model parameters (the model with the highest validation set accuracy and the smallest loss) are saved. At the same time, various training metrics of the model (training set loss, validation set loss, training set accuracy, and validation set accuracy) are recorded during training to facilitate subsequent model optimization and performance analysis.
[0078] 4.3 Performance evaluation and optimization.
[0079] After training, the vibration signals collected in step S1 (the divided test set, accounting for 20% of the total signal, covering all working conditions and fault types, and not involved in model training) are input into the trained fault diagnosis model to obtain the diagnosis results (predicted probabilities and final fault types for each fault type). The model performance is evaluated by comparing the diagnosis results with actual fault conditions (real fault types determined by manual detection and fault simulation). The evaluation indicators include diagnostic accuracy, recall, precision, F1 score, and runtime response time. Diagnostic accuracy is the ratio of the number of correctly predicted samples to the total number of samples in the test set; recall is the ratio of the number of correctly predicted samples of a certain type of fault to the total number of samples of that type of fault; precision is the ratio of the number of correctly predicted samples of a certain type of fault to the total number of samples predicted as that type of fault; and the F1 score is the harmonic mean of precision and recall.
[0080] Preset model performance evaluation criteria: diagnostic accuracy ≥ 95%, recall rate ≥ 93% and precision rate ≥ 93% for various faults, F1 score ≥ 93%, and runtime response time ≤ 1s. If the performance evaluation fails to meet the criteria (any one of the indicators fails to meet the preset criteria), analyze the reasons for the failure: if the feature extraction is inaccurate, return to step S2 to adjust the network structure (such as adjusting the time window of the multi-scale convolutional branch, the state dimension of the Mamba feature extractor, the number of attention heads, etc.); if the training effect is not good, return to step S3 to optimize the learning strategy (such as adjusting the weights of each loss term, the temperature coefficient τ, the number of training epochs, the learning rate, etc.); after the adjustment is completed, re-execute the subsequent steps (step S3 or S4) until the model performance meets the preset requirements.
[0081] Once the model's performance meets the standards, it is deployed in actual ship operation scenarios to collect vibration signals from the gearbox in real time. These signals are then input into the model for fault diagnosis, and the diagnosis results are fed back to the terminal interface of the ship's monitoring system in real time. If a fault is diagnosed, an alarm signal (audio-visual alarm) is immediately issued, and the fault type, fault probability, and possible fault location are displayed. This provides ship maintenance personnel with accurate maintenance guidance, reduces downtime due to faults, and improves the safety and reliability of ship navigation.
[0082] Example 2 To address the current issues of relying on large amounts of labeled data and insufficient model generalization ability in fault diagnosis of marine engine transmission reducer gearboxes under cross-operating conditions, this embodiment provides a hybrid supervised learning method for small-sample cross-operating-condition fault diagnosis of marine engine transmission reducer gearboxes that integrates a multi-scale temporal signal embedding module and an improved Mamba feature extractor.
[0083] The fault diagnosis method for the marine engine transmission reducer gearbox provided in this embodiment includes the following steps: Step S1: Collect vibration signals of the ship engine transmission reducer gearbox under typical ship operating conditions online.
[0084] In step S1, the collected operating conditions cover different loads, speeds, accelerations and decelerations, and start-stops, covering different operating rhythms of the ship's hoisting mechanism gearbox as well as typical operating states under long-term operation and impact loads; only fault signals need to be collected.
[0085] Step S2: Construct a diagnostic network employing a multi-scale temporal signal embedding module, an improved Mamba feature extractor, and a fault classifier.
[0086] In step S2, the multi-scale temporal signal embedding module first learns the noise features of the noisy temporal signal through a residual network structure to automatically obtain the denoised vibration signal. Based on the feature extraction at different time scales of the signal, the one-dimensional temporal signal is upgraded to a multi-dimensional temporal embedding with different receptive field information while maintaining the original signal information, which is suitable for encoder learning. In order to improve the feature extractor's attention to the temporal signal in the time dimension, different enhanced views of information are obtained through random time masks for the design of positive and negative samples for comparative learning.
[0087] The improved Mamba feature extractor combines the attention mechanism of the transformer with the state space model construction, enabling the model to achieve overall modeling of long-sequence signals in the actual operation of the gearbox of the ship engine transmission reducer. Furthermore, it can adaptively pay attention to the short-term impact and long-term frequency modulation signal characteristics of the vibration signal based on the actual signal characteristics, thereby improving the robustness of feature extraction.
[0088] Step S3: Design a hybrid supervised learning strategy that integrates self-supervised learning and supervised learning.
[0089] In step S3, the input signal is divided into three parts: source domain data with labels, source domain data without labels, and target domain data without labels.
[0090] In self-supervised learning, unlabeled source and target domain data are used for contrastive learning. Through the designed instance contrastive loss, different augmented views of the same sample are treated as positive sample pairs, and different samples are treated as negative sample pairs. Through the designed temporal contrastive loss, the same time step of different augmented views of the same sample is treated as positive sample pairs, and different time steps of different augmented views of the same sample are treated as negative sample pairs. This allows the feature extractor to understand the temporal features of the sample itself and obtain relatively robust features.
[0091] In supervised learning, labeled source domain data is used, and the feature signals are transformed into feature structures suitable for classifier classification through a designed pyramid pooling module. Cross-entropy loss is used to enhance inter-class separability, and center loss is used to enhance intra-class compactness, thereby constraining the feature extractor to extract features that are more suitable for classification, thus realizing domain-adaptive fault diagnosis across working conditions.
[0092] Step S4: Build and train a fault diagnosis model for the gearbox of a marine engine transmission reducer using the nn package in the PyTorch framework, and evaluate the model performance by comparing the diagnosis results with the actual situation.
[0093] In step S4, the fault diagnosis model of the ship engine transmission reducer gearbox integrates a multi-scale time-series signal embedding module, an improved Mamba feature extractor, and hybrid supervised learning, which effectively improves the model's cross-operating condition fault diagnosis capability under limited labeled samples.
[0094] First, the multi-scale time-series signal embedding module automatically performs signal denoising based on the input signal and extracts multi-dimensional time information of the signal to obtain a time embedding suitable for encoder modeling. Finally, a time mask is added to obtain different enhanced views of the signal, which is naturally suitable for signal preprocessing of vibration signals with complex vibration information under complex operating conditions of ship engines.
[0095] Secondly, the Mamba feature extractor is improved to automatically learn information of signals at different time scales, and more attention is added to features suitable for classification diagnosis and transfer, making it suitable for fault feature extraction of time-series signals under complex working conditions.
[0096] Finally, a hybrid supervised learning strategy is adopted. Given the limited number of labeled samples for ship engines, self-supervised contrastive learning is employed. This involves constructing positive and negative sample pairs for comparative learning, autonomously learning the inherent characteristics of the vibration signal. Furthermore, source domain sample labels are used to constrain the sample space obtained by the feature extractor through a combination of cross-entropy loss and center loss, resulting in more robust features that are easier to transfer and classify. Simultaneously, GradNorm is introduced to dynamically balance the weights of various loss terms, suppressing gradient conflicts and imbalances in multi-task training, and improving the convergence stability and robustness of the overall training process, thereby achieving efficient cross-operating-condition transfer learning. In summary, the proposed model realizes intelligent fault diagnosis of the transmission reducer gearbox under complex operating conditions of ship engines.
[0097] Furthermore, in step S2, a multi-scale Mamba encoder is used as the core module of the feature extractor. By dynamically adjusting the modeling size of the time scale in the spatial state model, it adaptively pays attention to the local temporal features and global temporal modeling in the vibration signal, thereby achieving efficient feature extraction of the vibration signal of the gearbox of the ship engine transmission reducer under different working conditions.
[0098] Furthermore, in step S3, a hybrid supervised learning strategy is adopted. In self-supervised learning, instance contrastive learning and temporal contrastive learning are used to learn the temporal features of the source domain data and target domain samples themselves in the pre-training stage. In supervised learning, cross-entropy loss and center loss are used to constrain the feature space, enhance intra-class compactness and inter-class separability, thereby improving the feature representation ability and classification performance of the model in self-supervised learning. The loss function used in self-supervised learning is:
[0099]
[0100]
[0101] in, Indicates instance comparison loss. Different enhanced views of the same sample, which serve as positive sample pairs. Different enhanced views of different samples, which serve as negative sample pairs; Indicates the time-based loss. For the same time step of different augmented views of the same sample, it is considered as a positive sample pair. Different time steps of different augmented views of the same sample are used as negative sample pairs. Indicates the loss weight; The loss function used in supervised learning is:
[0102]
[0103]
[0104] in, Let M represent the cross-entropy loss, where M is the number of labeled source domain samples and K is the number of fault types. For real labels, The predicted probability for fault category k; This represents the central loss, with each category having a central value. During training, the feature distribution of the category will be dynamically updated. This represents the loss weight.
[0105] This embodiment provides a small-sample cross-operating-condition fault diagnosis method for a marine engine transmission reducer gearbox, which relates to the field of rotating machinery condition monitoring and intelligent fault diagnosis technology.
[0106] The method in this embodiment takes gearbox vibration signals as input. First, the acquired signals are preprocessed for denoising, and fault features at different time scales are encoded through a multi-scale time-series signal embedding module. Then, an improved Mamba feature extraction network is constructed to perform multi-scale modeling of long-sequence vibration signals to extract fault representations that are stable across operating conditions. In the training phase, a hybrid supervised learning strategy is adopted, multi-view samples are constructed based on random time masks, and instance-level contrastive loss and time-step-level contrastive loss are combined to mine unlabeled data structure information. Cross-entropy loss and center loss are combined to enhance intra-class compactness and inter-class separability. At the same time, a gradient normalization strategy is introduced to dynamically balance the weights of multiple loss terms to improve training stability and generalization ability. In the inference phase, the vibration signal to be tested is input into the trained diagnostic model, and the gearbox fault category and diagnostic results are output.
[0107] The method in this embodiment integrates a multi-scale temporal signal embedding module, an improved Mamba feature extractor, and hybrid supervised learning. It can still achieve high-precision and robust gearbox fault diagnosis under conditions of limited labeled samples and significant changes in operating conditions. It can be used for fault diagnosis of marine engine transmission reducer gearboxes under different speeds, torques, and operating states (acceleration and deceleration).
[0108] The proposed method was tested and evaluated, demonstrating good generalization performance in transfer tasks across different operating conditions. High diagnostic accuracy was achieved in multiple cross-condition scenarios. In a transfer learning fault diagnosis experiment on a marine engine transmission reducer gearbox with different speeds, torques, and operating states, the average fault diagnosis accuracy reached 98.52%, 97.54%, and 96.95% with a 12.5% label budget, respectively. This indicates that the proposed fault diagnosis method for marine engine transmission reducer gearboxes has strong adaptability in transfer tasks across different speeds, torques, and operating states (such as acceleration and deceleration), effectively addressing the feature shift problem caused by changes in operating conditions. These results demonstrate that the proposed method integrates a multi-scale temporal signal embedding module, an improved Mamba feature extractor, and hybrid supervised learning, significantly improving its diagnostic robustness and generalization ability under cross-condition conditions. It enables high-precision, low-label-dependency intelligent fault diagnosis, providing reliable technical support for online monitoring and intelligent operation and maintenance of industrial equipment.
[0109] The present invention also provides a fault diagnosis system for a marine engine transmission reducer gearbox. The fault diagnosis system for the marine engine transmission reducer gearbox can be implemented by executing the process steps of the fault diagnosis method for the marine engine transmission reducer gearbox. That is, those skilled in the art can understand the fault diagnosis method for the marine engine transmission reducer gearbox as a preferred embodiment of the fault diagnosis system for the marine engine transmission reducer gearbox.
[0110] Example 3 To address the current issues of relying on large amounts of labeled data and insufficient model generalization ability in fault diagnosis of marine engine transmission reducer gearboxes under cross-operating conditions, this embodiment provides a hybrid supervised learning system for small-sample cross-operating-condition fault diagnosis of marine engine transmission reducer gearboxes, which integrates a multi-scale temporal signal embedding module and an improved Mamba feature extractor.
[0111] The fault diagnosis system for the marine engine transmission reducer gearbox provided in this embodiment includes the following modules: Module M1: Online acquisition of vibration signals of the gearbox of the marine engine transmission reducer under typical marine engine operating conditions.
[0112] In module M1, the collected operating conditions cover different loads, speeds, accelerations and decelerations, and start-stop cycles, encompassing different operating rhythms of the ship engine transmission reducer gearbox, as well as typical operating conditions under long-term operation and impact loads. Fault signals only need to be collected.
[0113] Module M2: Constructs a diagnostic network that employs a multi-scale temporal signal embedding module, an improved Mamba feature extractor, and a fault classifier.
[0114] In module M2, the multi-scale temporal signal embedding module first learns the noise features of the noisy temporal signal through a residual network structure to automatically obtain the denoised vibration signal. Based on the feature extraction at different time scales of the signal, the one-dimensional temporal signal is upgraded to a multi-dimensional temporal embedding with different receptive field information while maintaining the original signal information, which is suitable for encoder learning. In order to improve the feature extractor's attention to the temporal signal in the time dimension, different enhanced views of information are obtained through random time masks, which are used for the design of positive and negative samples for comparative learning.
[0115] The improved Mamba feature extractor combines the attention mechanism of the transformer with the state space model construction, enabling the model to achieve overall modeling of long-sequence signals in the actual operation of the gearbox of the ship engine transmission reducer. Furthermore, it can adaptively pay attention to the short-term impact and long-term frequency modulation signal characteristics of the vibration signal based on the actual signal characteristics, thereby improving the robustness of feature extraction.
[0116] Module M3: Design a hybrid supervised learning strategy that integrates self-supervised learning and supervised learning.
[0117] In module M3, the input signal is divided into three parts: source domain data with labels, source domain data without labels, and target domain data without labels.
[0118] In self-supervised learning, unlabeled source and target domain data are used for contrastive learning. Through the designed instance contrastive loss, different augmented views of the same sample are treated as positive sample pairs, and different samples are treated as negative sample pairs. Through the designed temporal contrastive loss, the same time step of different augmented views of the same sample is treated as positive sample pairs, and different time steps of different augmented views of the same sample are treated as negative sample pairs. This allows the feature extractor to understand the temporal features of the sample itself and obtain relatively robust features.
[0119] In supervised learning, labeled source domain data is used, and the feature signals are transformed into feature structures suitable for classifier classification through a designed pyramid pooling module. Cross-entropy loss is used to enhance inter-class separability, and center loss is used to enhance intra-class compactness, thereby constraining the feature extractor to extract features that are more suitable for classification, thus realizing domain-adaptive fault diagnosis across working conditions.
[0120] Module M4: Utilizes the nn package under the PyTorch framework to build and train a fault diagnosis model for a marine engine transmission reducer gearbox, and evaluates the model performance based on the diagnostic results compared with actual conditions.
[0121] In module M4, the fault diagnosis model for the ship engine transmission reducer gearbox integrates a multi-scale time-series signal embedding module, an improved Mamba feature extractor, and hybrid supervised learning, effectively enhancing the model's cross-condition fault diagnosis capability under limited labeled samples.
[0122] First, the multi-scale time-series signal embedding module automatically performs signal denoising based on the input signal and extracts multi-dimensional time information of the signal to obtain a time embedding suitable for encoder modeling. Finally, a time mask is added to obtain different enhanced views of the signal, which is naturally suitable for signal preprocessing of vibration signals with complex vibration information under complex operating conditions of ship engines.
[0123] Secondly, the Mamba feature extractor is improved to automatically learn information of signals at different time scales, and more attention is added to features suitable for classification diagnosis and transfer, making it suitable for fault feature extraction of time-series signals under complex working conditions.
[0124] Finally, a hybrid supervised learning strategy is adopted. Given the limited number of labeled samples for ship engines, self-supervised contrastive learning is employed. This involves constructing positive and negative sample pairs for comparative learning, autonomously learning the inherent characteristics of the vibration signal. Furthermore, source domain sample labels are used to constrain the sample space obtained by the feature extractor through a combination of cross-entropy loss and center loss, resulting in more robust features that are easier to transfer and classify. Simultaneously, GradNorm is introduced to dynamically balance the weights of various loss terms, suppressing gradient conflicts and imbalances in multi-task training, and improving the convergence stability and robustness of the overall training process, thereby achieving efficient cross-operating-condition transfer learning. In summary, the proposed model realizes intelligent fault diagnosis of the transmission reducer gearbox under complex operating conditions of ship engines.
[0125] Furthermore, in module M2, a multi-scale Mamba encoder is used as the core module of the feature extractor. By dynamically adjusting the modeling size of the time scale in the spatial state model, it adaptively pays attention to the local temporal features and global temporal modeling in the vibration signal, thereby achieving efficient feature extraction of vibration signals of the gearbox of the ship engine transmission reducer under different working conditions.
[0126] Furthermore, in module M3, a hybrid supervised learning strategy is adopted. In the self-supervised learning, instance contrastive learning and temporal contrastive learning are used to learn the temporal features of the source domain data and the target domain samples themselves in the pre-training stage. In the supervised learning, cross-entropy loss and center loss are used to constrain the feature space, enhance intra-class compactness and inter-class separability, thereby improving the model's feature representation ability and classification performance in self-supervised learning. The loss function used in self-supervised learning is:
[0127]
[0128]
[0129] in, Indicates instance comparison loss. Different enhanced views of the same sample, which serve as positive sample pairs. Different enhanced views of different samples, which serve as negative sample pairs; Indicates the time-based loss. For the same time step of different augmented views of the same sample, it is considered as a positive sample pair. Different time steps of different augmented views of the same sample are used as negative sample pairs. Indicates the loss weight; The loss function used in supervised learning is:
[0130]
[0131]
[0132] in, Let M represent the cross-entropy loss, where M is the number of labeled source domain samples and K is the number of fault types. For real labels, The predicted probability for fault category k; This represents the central loss, with each category having a central value. During training, the feature distribution of the category will be dynamically updated. This represents the loss weight.
[0133] The proposed system was tested and evaluated, demonstrating good generalization performance in transfer tasks across different operating conditions. High diagnostic accuracy was achieved in multiple cross-condition scenarios. In a transfer learning fault diagnosis experiment on a marine engine transmission gearbox under different speeds, torques, and operating states, with a 12.5% label budget, the average fault diagnosis accuracy reached 98.52%, 97.54%, and 96.95%, respectively. This indicates that the proposed marine engine transmission gearbox fault diagnosis system has strong adaptability in transfer tasks across different speeds, torques, and operating states (such as acceleration and deceleration), effectively addressing the feature shift problem caused by changes in operating conditions. These results demonstrate that the proposed system integrates a multi-scale temporal signal embedding module, an improved Mamba feature extractor, and hybrid supervised learning, significantly improving the system's diagnostic robustness and generalization ability under cross-condition conditions. It can achieve high-precision, low-label-dependency intelligent fault diagnosis, providing reliable technical support for online monitoring and intelligent operation and maintenance of industrial equipment.
[0134] To address the shortcomings of existing technologies, the present invention aims to provide a hybrid supervised learning method and system for fault diagnosis of small-sample cross-operating-condition faults in marine engine transmission reducer gearboxes, which integrates a multi-scale temporal signal embedding module and an improved Mamba feature extractor.
[0135] This invention relates to the field of fault diagnosis, specifically to a method and system for small-sample cross-operating-condition fault diagnosis of a marine engine transmission reducer gearbox, and more specifically to a method and system for small-sample cross-operating-condition fault diagnosis of a marine engine transmission reducer gearbox that integrates a multi-scale temporal signal embedding module, an improved Mamba feature extractor, and hybrid supervised learning.
[0136] The fault diagnosis method for marine engine transmission reducer gearbox of the present invention achieves efficient identification and cross-condition generalization of gearbox faults under the condition of limited labeled samples by integrating a multi-scale time-series signal embedding module, an improved Mamba feature extractor and a hybrid supervised learning strategy.
[0137] The method of this invention takes the one-dimensional vibration signal of the gearbox as input. First, a residual denoising module (DnCNN) is introduced to suppress noise and random interference under complex working conditions. Then, the original signal is hierarchically encoded by embedding multi-scale convolution under different time receptive fields. This simultaneously preserves the local transient information of impact-type faults and the slow-varying modulation information caused by changes in working conditions, which significantly improves the ability to characterize non-stationary vibration features.
[0138] The method of this invention uses random time masks to generate semantically consistent multi-view sequences, constructing a self-supervised learning task that is closer to the temporal structure of vibration signals, and providing a data foundation for robust representation learning under small sample conditions.
[0139] In the feature extraction stage, this invention uses a multi-scale Mamba encoder to model the embedded long sequence: through multi-head state space modeling at different scales and an adaptive step size mechanism, the model can capture long-range dependencies with low computational complexity. It can still stably extract the key fault mode of "short-time impact - long-period modulation" under the changing operating conditions such as cross-speed and cross-load, thus avoiding the problem of traditional convolutional networks failing to characterize long-range dependencies.
[0140] In terms of training mechanism, this invention adopts hybrid supervised learning to achieve the synergistic utilization of structural information of unlabeled samples and discriminative information of labeled samples: on the one hand, instance-level contrastive loss constrains different enhanced views of the same sample to maintain consistency in the feature space, enhancing the domain invariance of the representation; on the other hand, time-step-level contrastive loss further strengthens the consistency learning of key time slice features, improves the ability to capture transient fault impacts and local key segments, and thus can still mine the intrinsic structure of the data when the target domain label is scarce.
[0141] At the supervised optimization level, this invention combines cross-entropy loss and center loss for fault category learning, enabling similar samples to form more compact clusters in the feature space and maintaining clearer intervals between different categories, thereby improving separability and diagnostic stability under small sample conditions. At the same time, GradNorm is introduced to dynamically balance the weights of various loss terms, suppressing gradient conflicts and imbalances in multi-task training, and improving the convergence stability and robustness of the overall training process.
[0142] The method of this invention achieves intelligent and reliable fault diagnosis for small samples of gearboxes and across operating conditions without the need for additional multi-source sensors or physical simulation data.
[0143] Those skilled in the art will understand that, besides implementing the system and its various devices, modules, and units provided by this invention in the form of purely computer-readable program code, the same functions can be achieved entirely through logical programming of the method steps, making the system and its various devices, modules, and units of this invention function in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers. Therefore, the system and its various devices, modules, and units provided by this invention can be considered as a hardware component, and the devices, modules, and units included therein for implementing various functions can also be considered as structures within the hardware component; alternatively, the devices, modules, and units for implementing various functions can be considered as both software modules implementing the method and structures within the hardware component.
[0144] Specific embodiments of the present invention have been described above. It should be understood that the present invention is not limited to the specific embodiments described above, and those skilled in the art can make various changes or modifications within the scope of the claims, which do not affect the essence of the present invention. Unless otherwise specified, the embodiments and features described in this application can be arbitrarily combined with each other.
Claims
1. A fault diagnosis method for a marine engine transmission reducer gearbox, characterized in that, Includes the following steps: Step S1: Collect vibration signals of the ship engine transmission reducer gearbox online under preset ship operating conditions; the vibration signals include labeled vibration signals and unlabeled vibration signals, the labeled vibration signals correspond to known fault types and operating conditions, and the unlabeled vibration signals correspond to unknown fault types and operating conditions; Step S2: For the vibration signal collected in step S1, construct a fault diagnosis network adapted to the vibration signal; the fault diagnosis network includes a multi-scale time-series signal embedding module, a Mamba feature extractor and a fault classifier, used to preprocess the vibration signal, extract features and identify faults. Step S3: Based on the vibration signal collected in step S1 and the fault diagnosis network constructed in step S2, a hybrid supervised learning strategy integrating self-supervised learning and supervised learning is designed; in the self-supervised learning, the feature extraction part of the fault diagnosis network is pre-trained using the unlabeled vibration signal; in the supervised learning, the fault diagnosis network is adjusted using the labeled vibration signal, and the signal domain difference under different working conditions is reduced by domain adversarial loss. Step S4: Based on the fault diagnosis network constructed in Step S2 and the hybrid supervised learning strategy designed in Step S3, a fault diagnosis model of the ship engine transmission reducer gearbox is built using the nn package under the PyTorch framework, and the fault diagnosis model is trained. After training, the vibration signal collected in Step S1 is input into the trained fault diagnosis model to obtain the diagnosis result. The model performance is evaluated by comparing the diagnosis result with the actual fault situation. If the performance evaluation does not meet the standard, the process returns to Step S2 to adjust the network structure or Step S3 to optimize the learning strategy, and the subsequent steps are repeated until the model performance meets the preset requirements.
2. The fault diagnosis method for the gearbox of a marine engine transmission reducer according to claim 1, characterized in that, In step S1, the preset ship operating conditions cover different load conditions, different speed conditions, different acceleration and deceleration conditions, and start-stop conditions, and also cover different operating rhythms, preset time operation, and impact load operation states of the ship's lifting mechanism gearbox.
3. The fault diagnosis method for the gearbox of a marine engine transmission reducer according to claim 1, characterized in that, In step S2, the specific working process of the multi-scale temporal signal embedding module is as follows: First, the noisy vibration signal is input into the residual network structure, and the noise features in the vibration signal are learned through the residual network structure, and the denoised vibration signal is automatically output; then, feature extraction is performed on the denoised vibration signal at different time scales, and the one-dimensional temporal vibration signal is upgraded to obtain a multi-dimensional temporal embedding that retains all the information of the original vibration signal, has different receptive field information, and is adapted to the learning of the Mamba feature extractor; finally, the multi-dimensional temporal embedding is processed by random time masking to obtain enhanced views with different information. The enhanced views are used for the design of positive and negative samples in the contrastive learning of the hybrid supervised learning strategy.
4. The fault diagnosis method for the gearbox of a marine engine transmission reducer according to claim 3, characterized in that, In step S2, the Mamba feature extractor is an improved Mamba feature extractor, which is constructed by combining the attention mechanism of the transformer with the state space model. The improved Mamba feature extractor can perform overall modeling of long-sequence vibration signals generated during the actual operation of the gearbox of a ship engine transmission reducer, and can adaptively focus on short-time impact features and long-time frequency modulation features in the vibration signal according to the actual characteristics of the vibration signal.
5. The fault diagnosis method for the gearbox of a marine engine transmission reducer according to claim 1, characterized in that, In step S3, the specific implementation of the hybrid supervised learning strategy is as follows: First, the vibration signal collected in step S1 is divided into three parts: source domain data with labels, source domain data without labels, and target domain data without labels. In the self-supervised learning process, unlabeled source domain data and unlabeled target domain data are used for comparative learning. Feature extraction is constrained by designing instance-contrast loss and temporal-contrast loss: instance-contrast loss treats different augmented views of the same sample as positive sample pairs and different samples as negative sample pairs; temporal-contrast loss treats the same time step of different augmented views of the same sample as positive sample pairs and different time steps of different augmented views of the same sample as negative sample pairs, so that the feature extraction part of the fault diagnosis network can understand the temporal characteristics of the sample itself. During supervised learning, labeled source domain data is used to adjust the model. By designing a pyramid pooling module, the feature signals are converted into feature structures that are adapted to the classification of the fault classifier. At the same time, cross-entropy loss and center loss are used to process the feature signals to enhance the inter-class separability and intra-class compactness of the features, and to constrain the feature extraction part to extract features that are adapted to the classification task.
6. The fault diagnosis method for the gearbox of a marine engine transmission reducer according to claim 1, characterized in that, The fault diagnosis model for the ship engine transmission reducer gearbox built in step S4 integrates the multi-scale temporal signal embedding module and Mamba feature extractor from step S2 with the hybrid supervised learning strategy from step S3, and is specifically implemented as follows: First, the multi-scale time-series signal embedding module automatically performs signal denoising on the input vibration signal and extracts the multi-dimensional time information of the signal to obtain a time embedding suitable for encoder modeling. Finally, time masking is added to obtain different enhanced views of the signal, which is adapted to the signal preprocessing requirements of the vibration signal with preset vibration information under the preset operating conditions of the ship engine. Secondly, the Mamba feature extractor automatically learns the information of vibration signals at different time scales and assigns attention to features that are suitable for fault classification, diagnosis and migration with a preset threshold, thus adapting to the fault feature extraction requirements of time-series signals under preset working conditions. Finally, a hybrid supervised learning strategy is adopted. When the number of labeled samples of ship engine vibration signals is within a preset threshold, positive and negative sample pairs are constructed and comparative learning is carried out through self-supervised comparative learning to autonomously learn the characteristics of the vibration signals. At the same time, the source domain sample labels are used to constrain the sample space obtained by the feature extractor in self-supervised learning through a supervised learning method that combines cross-entropy loss and center loss. In the hybrid supervised learning strategy, GradNorm is introduced to dynamically balance the weights of multiple loss terms, which is used to suppress gradient conflicts and gradient imbalances during multi-task training and to achieve cross-condition transfer learning.
7. The fault diagnosis method for the gearbox of a marine engine transmission reducer according to claim 1, characterized in that, In step S2, the feature extraction part of the fault diagnosis network adopts a multi-scale Mamba encoder. The multi-scale Mamba encoder dynamically adjusts the modeling size of the time scale in the spatial state model, adaptively focuses on the local and global temporal features in the vibration signal, and completes global temporal modeling to realize feature extraction of vibration signals of ship engine transmission reducer gearbox under different working conditions.
8. The fault diagnosis method for the gearbox of a marine engine transmission reducer according to claim 1, characterized in that, In step S3, the hybrid supervised learning strategy is specifically adopted as follows: in the self-supervised learning stage, instance comparison learning and time comparison learning are used to pre-train the temporal features of the source domain data and the target domain samples themselves; in the supervised learning stage, cross-entropy loss and center loss are used to constrain the feature space to enhance the intra-class compactness and inter-class separability of the features. The loss function used in self-supervised learning is: in, Let N represent the instance-contrast loss, and N represent the number of samples in a single training iteration during self-supervised learning. Different enhanced views of the same sample, which serve as positive sample pairs. Different enhanced views of different samples, which serve as negative sample pairs; Indicates the temperature coefficient; This represents the temporal contrast loss, where T represents the number of time steps in a single sample augmented view. For the same time step of different augmented views of the same sample, it is considered as a positive sample pair. Different time steps of different augmented views of the same sample, which serve as negative sample pairs; L ssl This represents the total loss in self-supervised learning. These represent the loss weights for instance-to-instance comparison loss and time-to-time comparison loss, respectively. The loss function used in supervised learning is: in, Let M represent the cross-entropy loss, where M is the number of labeled source domain samples and K is the number of fault types. Let the i-th sample be the true label corresponding to the k-th fault type. Let be the predicted probability of the fault category k corresponding to the i-th sample; Indicates the loss at the center. This represents the feature vector obtained after feature extraction of the i-th input sample by the model; each category center For the first The mean of all sample feature vectors for each fault type is dynamically updated during training based on the average feature distribution of that category. The loss weight represents the central loss.
9. A fault diagnosis system for a marine engine transmission reducer gearbox, characterized in that, Includes the following modules: Module M1: Online acquisition of vibration signals of the ship engine transmission reducer gearbox under preset ship operating conditions; the vibration signals include labeled vibration signals and unlabeled vibration signals, the labeled vibration signals correspond to known fault types and operating conditions, and the unlabeled vibration signals correspond to unknown fault types and operating conditions; Module M2: Constructs a fault diagnosis network adapted to the vibration signals collected by module M1; the fault diagnosis network includes a multi-scale time-series signal embedding module, a Mamba feature extractor, and a fault classifier, used for preprocessing, feature extraction, and fault identification of the vibration signals; Module M3: For the vibration signals collected by module M1 and the fault diagnosis network constructed by module M2, a hybrid supervised learning strategy integrating self-supervised learning and supervised learning is designed; in the self-supervised learning, the feature extraction part of the fault diagnosis network is pre-trained using the unlabeled vibration signals; in the supervised learning, the fault diagnosis network is adjusted using the labeled vibration signals, and the signal domain differences under different working conditions are reduced by domain adversarial loss. Module M4: Based on the fault diagnosis network built in Module M2 and the hybrid supervised learning strategy designed in Module M3, a fault diagnosis model of the gearbox of the marine engine transmission reducer is built using the nn package under the PyTorch framework, and the fault diagnosis model is trained. After training, the vibration signal collected by Module M1 is input into the trained fault diagnosis model to obtain the diagnosis result. The model performance is evaluated by comparing the diagnosis result with the actual fault situation. If the performance evaluation does not meet the standard, the process returns to Module M2 to adjust the network structure or Module M3 to optimize the learning strategy, and subsequent modules are re-executed until the model performance meets the preset requirements.
10. The fault diagnosis system for the marine engine transmission reducer gearbox according to claim 9, characterized in that, In module M1, the preset ship operating conditions cover different load conditions, different speed conditions, different acceleration and deceleration conditions, and start-stop conditions, and also cover different operating rhythms, preset time operation, and impact load operation states of the ship's lifting mechanism gearbox. In module M2, the specific working process of the multi-scale temporal signal embedding module is as follows: First, the noisy vibration signal is input into the residual network structure, and the noise features in the vibration signal are learned through the residual network structure, and the denoised vibration signal is automatically output; then, feature extraction is performed on the denoised vibration signal at different time scales, and the one-dimensional temporal vibration signal is upgraded to obtain a multi-dimensional temporal embedding that retains all the information of the original vibration signal, has different receptive field information, and is adapted to the learning of the Mamba feature extractor; finally, the multi-dimensional temporal embedding is processed by random time masking to obtain enhanced views with different information. The enhanced views are used for the design of positive and negative samples in the contrastive learning of the hybrid supervised learning strategy. In module M2, the Mamba feature extractor is an improved Mamba feature extractor, which is constructed by combining the attention mechanism of transformer with the state space model. The improved Mamba feature extractor can perform overall modeling of long-sequence vibration signals generated during the actual operation of the gearbox of the ship engine transmission reducer, and can adaptively focus on short-time impact features and long-time frequency modulation features in the vibration signal according to the actual characteristics of the vibration signal. In module M3, the specific implementation of the hybrid supervised learning strategy is as follows: First, the vibration signal collected by module M1 is divided into three parts: source domain data with labels, source domain data without labels, and target domain data without labels. In the self-supervised learning process, unlabeled source domain data and unlabeled target domain data are used for comparative learning. Feature extraction is constrained by designing instance-contrast loss and temporal-contrast loss: instance-contrast loss treats different augmented views of the same sample as positive sample pairs and different samples as negative sample pairs; temporal-contrast loss treats the same time step of different augmented views of the same sample as positive sample pairs and different time steps of different augmented views of the same sample as negative sample pairs, so that the feature extraction part of the fault diagnosis network can understand the temporal characteristics of the sample itself. During supervised learning, labeled source domain data is used to adjust the model. By designing a pyramid pooling module, the feature signals are converted into feature structures that are adapted to the fault classifier. At the same time, cross-entropy loss and center loss are used to process the feature signals to enhance the inter-class separability and intra-class compactness of the features, and to constrain the feature extraction part to extract features that are adapted to the classification task. The fault diagnosis model for the marine engine transmission reducer gearbox built in module M4 integrates the multi-scale temporal signal embedding module and Mamba feature extractor in module M2 with the hybrid supervised learning strategy in module M3. The specific implementation is as follows: First, the multi-scale time-series signal embedding module automatically performs signal denoising on the input vibration signal and extracts the multi-dimensional time information of the signal to obtain a time embedding suitable for encoder modeling. Finally, time masking is added to obtain different enhanced views of the signal, which is adapted to the signal preprocessing requirements of the vibration signal with preset vibration information under the preset operating conditions of the ship engine. Secondly, the Mamba feature extractor automatically learns the information of vibration signals at different time scales and assigns attention to features that are suitable for fault classification, diagnosis and migration with a preset threshold, thus adapting to the fault feature extraction requirements of time-series signals under preset working conditions. Finally, a hybrid supervised learning strategy is adopted. When the number of labeled samples of ship engine vibration signals is within a preset threshold, positive and negative sample pairs are constructed and comparative learning is carried out through self-supervised comparative learning to autonomously learn the characteristics of the vibration signals. At the same time, the source domain sample labels are used to constrain the sample space obtained by the feature extractor in self-supervised learning through a supervised learning method that combines cross-entropy loss and center loss. In the hybrid supervised learning strategy, GradNorm is introduced to dynamically balance the weights of multiple loss terms, which is used to suppress gradient conflicts and gradient imbalances in the multi-task training process and realize cross-condition transfer learning. In module M2, the feature extraction part of the fault diagnosis network adopts a multi-scale Mamba encoder. The multi-scale Mamba encoder dynamically adjusts the modeling size of the time scale in the spatial state model, adaptively focuses on the local and global temporal features in the vibration signal, and completes global temporal modeling to realize feature extraction of vibration signals of ship engine transmission reducer gearbox under different working conditions. In module M3, the hybrid supervised learning strategy is specifically as follows: in the self-supervised learning stage, instance comparison learning and time comparison learning are used to pre-train the temporal features of the source domain data and the target domain samples themselves; in the supervised learning stage, cross-entropy loss and center loss are used to constrain the feature space to enhance the intra-class compactness and inter-class separability of the features. The loss function used in self-supervised learning is: in, Let N represent the instance-contrast loss, and N represent the number of samples in a single training iteration during self-supervised learning. Different enhanced views of the same sample, which serve as positive sample pairs. Different enhanced views of different samples, which serve as negative sample pairs; Indicates the temperature coefficient; This represents the temporal contrast loss, where T represents the number of time steps in a single sample augmented view. For the same time step of different augmented views of the same sample, it is considered as a positive sample pair. Different time steps of different augmented views of the same sample, which serve as negative sample pairs; L ssl This represents the total loss in self-supervised learning. These represent the loss weights for instance-to-instance comparison loss and time-to-time comparison loss, respectively. The loss function used in supervised learning is: in, Let M represent the cross-entropy loss, where M is the number of labeled source domain samples and K is the number of fault types. Let the i-th sample be the true label corresponding to the k-th fault type. Let be the predicted probability of the fault category k corresponding to the i-th sample; Indicates the loss at the center. This represents the feature vector obtained after feature extraction of the i-th input sample by the model; each category center For the first The mean of all sample feature vectors for each fault type is dynamically updated during training based on the average feature distribution of that category. The loss weight represents the central loss.