Ship vibration anomaly detection method and system
By using the GAN-DAE-One-Class SVM model in the ship's power system, the problem of difficulty in performing effective fault detection when only normal data or fault data is scarce is solved, and efficient and accurate vibration abnormality detection is achieved.
Patent Information
- Application Number
- CN202411738647.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-28
- Publication Date
- 2025-04-11
- Estimated Expiration
- 2044-11-28
AI Technical Summary
The prior art is difficult to perform effective vibration fault detection when only normal data or fault data are scarce in the ship's power system.
The ship vibration anomaly detection method based on the Generative Adversarial Network (GAN), Deep Autoencoder (DAE) and One-Class SVM model is used to process the original vibration data of the ship's diesel engine through specific calculation methods to achieve abnormal detection.
When only normal data or fault data are scarce, it can effectively detect vibration abnormalities in the ship's diesel engine, which improves the accuracy and stability of detection and reduces the waste of computing resources.
Smart Images

Figure CN119807868A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of ship fault diagnosis, and in particular to a method and system for detecting abnormal ship vibration. Background Art
[0002] Ship power systems are important equipment in the fields of shipping, marine engineering, etc. Their working environment is complex and prone to failure. Once abnormal vibration occurs, it may lead to serious economic losses. Therefore, it is very important to carry out online health status monitoring and abnormality detection of ship vibration. It can monitor the operating status of the ship in real time, detect faults early, and avoid serious faults, thereby significantly improving the operating safety and reliability of the ship, while greatly reducing maintenance costs. The high-load components in the ship power system operate for a long time in a high-stress environment, and the working conditions are particularly harsh, which makes it easy to fail. Therefore, the research on abnormality detection based on vibration phenomena is of great significance.
[0003] At present, the research on abnormality detection and fault diagnosis of ship power systems can be divided into two categories: model-based methods and data-based methods. Model-based methods rely on accurate mathematical models, but in practical applications, it is often challenging to establish accurate models. In contrast, data-based methods only need to use historical data of ships without the need to establish complex mathematical models, so they have received widespread attention. Although these fault diagnosis methods have achieved certain results in vibration fault detection and diagnosis, most of the current research focuses on the case where vibration fault data is sufficient. However, in the actual operation of ship power systems, vibration fault data is usually scarce. For newly commissioned ship power systems, there is usually only normal data but no fault data in the early stage of operation. Therefore, how to detect ship vibration faults with only normal data remains a challenge that needs to be solved. Summary of the invention
[0004] In order to solve the problem that the current ship vibration fault detection is mostly carried out when the vibration fault data is relatively sufficient, but cannot be carried out when the vibration fault data is scarce or only normal data is available, the present invention provides a ship vibration anomaly detection method, which is based on the original vibration data of the ship diesel engine, through the generative adversarial network (GAN network), deep autoencoder (DAE) and One-Class SVM model and adopts a specific calculation method to realize the abnormal detection of ship vibration, and can effectively detect the vibration anomaly of the ship diesel engine when only normal data or fault data are scarce. The present invention also relates to a ship vibration anomaly detection system.
[0005] The technical solution of the present invention is as follows:
[0006] A method for detecting abnormal vibration of a ship, characterized in that it comprises the following steps:
[0007] Data acquisition and root mean square calculation steps: acquiring the original vibration data of the ship diesel engine, normalizing the original vibration data, and calculating the root mean square based on the normalized original vibration data;
[0008] Correlation coefficient calculation and determination steps: extract time domain and frequency domain features from the normalized original vibration data to obtain time domain feature parameters and frequency domain feature parameters; calculate the correlation coefficient between each feature parameter and the root mean square in the time domain feature parameters and the frequency domain feature parameters using the Pearson correlation coefficient, and then compare each calculated correlation coefficient with a preset coefficient threshold, and retain the feature parameters corresponding to the correlation coefficient greater than the preset coefficient threshold;
[0009] The training steps of the deep autoencoder model are as follows: the retained feature parameters are respectively input into the generative adversarial network for data enhancement, and the feature parameters after data enhancement are obtained and used as input data; the input data is then compressed by the encoder, and the compressed input data is reconstructed by the decoder to obtain reconstructed data, and then the mean square error between the input data and the reconstructed data is calculated, and the mean square error is used as the loss function to train the deep autoencoder model;
[0010] One-Class SVM model training steps: input each input data into the trained deep autoencoder model, and obtain the reconstruction error between each input data and the corresponding reconstructed data; then divide all the reconstruction errors into a training set and a test set according to a preset ratio, and use the training set to train the One-Class SVM model to obtain a trained One-Class SVM model;
[0011] Ship vibration anomaly detection steps: artificially generate multiple abnormal data, and merge the abnormal data with the test set to generate a new test set, input each sample in the new test set into the trained deep autoencoder model, and obtain the new reconstruction error between each sample and the corresponding reconstructed data, and then input the new reconstruction error into the trained One-Class SVM model, and output the predicted label of each sample to complete the abnormal detection of ship vibration.
[0012] Preferably, in the deep autoencoder model training step, the generative adversarial network includes a generator and a discriminator, and the generator and the discriminator both include multiple building blocks and a final block. The building block of the generator consists of multiple one-dimensional convolutional layers, batch normalization layers and ReLU activation functions; the building block of the discriminator consists of multiple one-dimensional convolutional layers, batch normalization layers, Leaky ReLU activation functions and Dropout layers; the final blocks of the generator and the discriminator both include convolutional layers, flattening layers, fully connected layers and Tanh activation functions.
[0013] Preferably, in the ship vibration anomaly detection step, after obtaining the predicted label of each sample, an evaluation index is calculated according to the predicted label and the true label of each sample, and the performance of the trained One-Class SVM model is evaluated by the evaluation index, and the evaluation index includes precision, recall rate and F1 score.
[0014] Preferably, in the deep autoencoder model training step, a binary cross entropy loss function is used to train the generator and the discriminator respectively, and an Adam optimizer is used to optimize the parameters of the generator and the discriminator during the training process to obtain the trained generator and the discriminator respectively, so as to measure the performance of the generator and the discriminator.
[0015] Preferably, in the correlation coefficient calculation and determination step, the feature parameters with a correlation coefficient greater than 0.5 are retained as input to the deep autoencoder model training step, and the retained feature parameters include root mean square, peak-to-peak value, peak factor, waveform factor, kurtosis of spectrum amplitude, centroid frequency, fourth root frequency, ratio of frequency mean square deviation to centroid frequency, and frequency kurtosis.
[0016] A ship vibration anomaly detection system, characterized by comprising a data acquisition and root mean square calculation module, a correlation coefficient calculation and determination module, a deep autoencoder model training module, a One-Class SVM model training module and a ship vibration anomaly detection module connected in sequence,
[0017] The data acquisition and root mean square calculation module acquires the original vibration data of the ship diesel engine, normalizes the original vibration data, and calculates the root mean square based on the normalized original vibration data;
[0018] The correlation coefficient calculation and determination module extracts time domain and frequency domain features from the normalized original vibration data to obtain time domain feature parameters and frequency domain feature parameters; and uses the Pearson correlation coefficient to calculate the correlation coefficient between each feature parameter in the time domain feature parameters and the frequency domain feature parameters and the root mean square, and then compares each calculated correlation coefficient with a preset coefficient threshold, and retains the feature parameters corresponding to the correlation coefficient greater than the preset coefficient threshold;
[0019] The deep autoencoder model training module inputs the retained feature parameters into the generative adversarial network for data enhancement, obtains the feature parameters after data enhancement and uses them as input data; then compresses the input data through the encoder, and reconstructs the compressed input data through the decoder to obtain reconstructed data, and then calculates the mean square error between the input data and the reconstructed data, and uses the mean square error as the loss function to train the deep autoencoder model;
[0020] The One-Class SVM model training module inputs each input data into the trained deep autoencoder model to obtain the reconstruction error between each input data and the corresponding reconstructed data; then divides all the reconstruction errors into a training set and a test set according to a preset ratio, and uses the training set to train the One-Class SVM model to obtain a trained One-Class SVM model;
[0021] The ship vibration anomaly detection module artificially generates multiple abnormal data, and combines the abnormal data with the test set to generate a new test set, and inputs each sample in the new test set into the trained deep autoencoder model to obtain a new reconstruction error between each sample and the corresponding reconstructed data, and then inputs the new reconstruction error into the trained One-Class SVM model, and outputs the predicted label of each sample to complete the abnormal detection of ship vibration.
[0022] Preferably, in the deep autoencoder model training module, the generative adversarial network includes a generator and a discriminator, and the generator and the discriminator each include multiple building blocks and a final block, the building block of the generator consists of multiple one-dimensional convolutional layers, batch normalization layers and ReLU activation functions; the building block of the discriminator consists of multiple one-dimensional convolutional layers, batch normalization layers, Leaky ReLU activation functions and Dropout layers; the final blocks of the generator and the discriminator each include a convolutional layer, a flattening layer, a fully connected layer and a Tanh activation function.
[0023] Preferably, in the ship vibration anomaly detection module, after obtaining the predicted label of each sample, an evaluation index is calculated according to the predicted label and the true label of each sample, and the performance of the trained One-Class SVM model is evaluated by the evaluation index, and the evaluation index includes precision, recall rate and F1 score.
[0024] Preferably, in the deep autoencoder model training module, a binary cross entropy loss function is used to train the generator and the discriminator respectively, and an Adam optimizer is used during the training process to optimize the parameters of the generator and the discriminator to obtain the trained generator and the discriminator respectively, so as to measure the performance of the generator and the discriminator.
[0025] Preferably, the retained characteristic parameters include root mean square, peak-to-peak value, peak factor, shape factor, kurtosis of spectrum amplitude, centroid frequency, fourth root frequency, ratio of frequency mean square deviation to centroid frequency, and frequency kurtosis.
[0026] The beneficial effects of the present invention are:
[0027] The present invention provides a ship vibration anomaly detection method. First, the acquired original vibration data of the ship diesel engine is normalized to eliminate the differences in dimensions and orders of magnitude between the diagnostic parameters, thereby avoiding the influence of these factors on the diagnostic result; then, the normalized original vibration data is subjected to time domain and frequency domain feature extraction to obtain time domain feature parameters and frequency domain feature parameters, and the Pearson correlation coefficient is used to calculate the correlation coefficient between each feature parameter in the time domain feature parameters and the frequency domain feature parameters and the root mean square, and then the calculated correlation coefficients are compared with the preset coefficient threshold, and the feature parameters corresponding to the correlation coefficients greater than the preset coefficient threshold are retained. The method has strong adaptability and can effectively screen out strongly correlated features that are highly correlated with anomaly detection by introducing the Pearson correlation coefficient for feature selection, thereby reducing the feature dimension, reducing the waste of computing resources, and improving the accuracy and stability of detection, so that the model can achieve efficient anomaly detection at a lower computing cost. Then, when the amount of data after feature extraction is small, the generative adversarial network (GAN) is used to enhance the retained feature parameters, which can generate more training data, expand the dimension and diversity of the data, not only improve the accuracy of the model, but also improve the training quality, so that the model can better learn the potential patterns and abnormal features of the data, with the advantages of high efficiency and accuracy. Then the real-time performance is good, and the online data processing and real-time detection method is adopted, that is, the feature parameters after data enhancement are compressed and reconstructed by the encoder and decoder, and then the deep autoencoder (DAE) model is trained, and the reconstruction error is calculated for training a class of support vector machine (One-Class SVM) model. This process ensures the accurate detection of the root mean square feature and can generate abnormal data in time for verification. The present invention has strong applicability, and can still effectively train the model when the fault data is scarce or there is no fault data at all. Through sensitive processing of health data and fault data, it is ensured that accurate abnormality detection can still be performed in the absence of fault samples.
[0028] In general, the ship vibration anomaly detection method based on GAN-DAE-One Class SVM proposed by the present invention performs well in the automatic prediction of ship diesel engine vibration faults. This method can not only quickly alert the crew to potential problems and reduce the dependence on expert experience, but also has excellent applicability, efficiency, adaptability and real-time performance, making it widely popularized in the field of ship engine engineering.
[0029] The present invention also relates to a ship vibration anomaly detection system, which corresponds to the above-mentioned ship vibration anomaly detection method, and can be understood as a system for implementing the above-mentioned ship vibration anomaly detection method, including a data acquisition and root mean square calculation module, a correlation coefficient calculation and judgment module, a deep autoencoder model training module, a One-Class SVM model training module and a ship vibration anomaly detection module connected in sequence. The modules work together to realize ship vibration anomaly detection based on the original vibration data of the ship diesel engine through a generative adversarial network (GAN network), a deep autoencoder (DAE) and a One-Class SVM model and a specific calculation method. It can effectively detect the vibration anomaly of the ship diesel engine when there is only normal data or scarce fault data. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] Figure 1 It is a flow chart of the ship vibration abnormality detection method of the present invention.
[0031] Figure 2 This is the GAN principle diagram of the present invention.
[0032] Figure 3 It is the GAN iterative loss graph of the present invention.
[0033] Figure 4 It is the DAE iterative loss graph of the present invention.
[0034] Figure 5 Schematic diagram of the training set reconstruction error of the present invention.
[0035] Figure 6 It is a schematic diagram of the test set reconstruction error of the present invention.
[0036] Figure 7 It is a schematic diagram of the reconstruction error of the new test set of the present invention.
[0037] Figure 8 It is a schematic diagram of the decision function value of the present invention. DETAILED DESCRIPTION
[0038] The present invention will be described below in conjunction with the accompanying drawings.
[0039] The present invention relates to a ship vibration anomaly detection method, which can be understood as a ship vibration anomaly detection based on GAN-DAE-One ClassSVM, that is, a ship vibration anomaly detection method based on a generative adversarial network (GAN), a deep autoencoder (DAE) and a one-class support vector machine (One-Class SVM). The method first extracts time domain and frequency domain features from the original data collected from the main diesel engine in normal operation, analyzes these features using the Pearson coefficient, and selects the features with a Pearson coefficient greater than a preset coefficient threshold and the root mean square value for joint selection; since the amount of data after feature extraction is small, a generative adversarial network (GAN) is then used to generate more feature data; the generated data is then input into a deep autoencoder (DAE) for data compression and reconstruction, and the reconstruction error is calculated, and the reconstruction error is used to train a one-class support vector machine (One-Class SVM) to perform anomaly detection; finally, the reliability of the algorithm is verified by normal data and generated abnormal data. The method provides effective support for vibration anomaly detection of ship diesel engines when fault data is scarce or lacking. That is, the model can still be effectively trained when there is little or no fault data. Through sensitive processing of healthy data and fault data, accurate anomaly detection can be ensured in the absence of fault samples. The flowchart of this method is as follows Figure 1 As shown, the following steps are included in sequence:
[0040] 1. Data acquisition and RMS calculation steps: The original vibration data (or original vibration operation data) of the ship diesel engine is obtained, and the original vibration data is normalized, and the RMS is calculated based on the normalized original vibration data. This step is to eliminate the influence of the order of magnitude and dimension of each diagnostic parameter to ensure the consistency and comparability of the data.
[0041] Specifically, three sets of original vibration data of the diesel engine of the new teaching and training dual-purpose ship "Xinhongzhuan" were first collected, with a sampling frequency of 4000Hz, and tested under five load conditions of 25%, 50%, 75%, 85% and 100%. The test was carried out at the following eight measuring points: 1# cylinder head (i.e. the head of the first cylinder), 8# cylinder head (i.e. the head of the eighth cylinder), supercharger, body side (engine body side, located between the seventh and eighth cylinders), body side (engine body side, located between the first and second cylinders), base (engine base, close to the first cylinder), base (engine base, close to the eighth cylinder), generator bearing cover (non-drive end) for collection. The data under the 85% load condition were mainly analyzed. In the first set of data, each measuring point recorded 20,000 data points, with a total duration of 5 seconds; in the second and third sets of data, each measuring point recorded 16,000 data points, with a total duration of 4 seconds.
[0042] In addition, in order to eliminate the influence of different diagnostic parameters and magnitudes on the diagnostic results, the three groups of original vibration data are normalized respectively, as shown in the following formula:
[0043]
[0044] Among them, X norm is the linear normalized data; X is the original vibration data; X max and X min are the maximum and minimum values of a feature in the original vibration data respectively. And the root mean square of all features in the original vibration data is calculated based on the normalized original vibration data.
[0045] 2. Correlation coefficient calculation and determination steps: The normalized original vibration data is subjected to time domain and frequency domain feature extraction to obtain time domain feature parameters and frequency domain feature parameters, and the Pearson correlation coefficient is used to calculate the correlation coefficient between each feature parameter and the root mean square in the time domain feature parameters and the frequency domain feature parameters, and then each calculated correlation coefficient is compared with the preset coefficient threshold, and the feature parameters corresponding to the correlation coefficient greater than the preset coefficient threshold are retained. This step extracts features and selects strongly correlated features based on the Pearson coefficient, extracts multiple features such as time domain and frequency domain from the original vibration data, and screens out strongly correlated features with a correlation coefficient greater than, for example, 0.5 with the abnormal value to be detected (or target abnormal value, such as the root mean square value). These features will be used as input data for the deep autoencoder (DAE) for subsequent analysis and modeling.
[0046] Specifically, in the Python script file, the pd.read-csv command under the pands library is first used to read the normalized preprocessed data set csv file into the algorithm. There are three groups of original vibration data, the first group is 20,000 groups of 8-dimensional data, and the second and third groups are 16,000 groups of 8-dimensional data. And 23 features such as time domain and frequency domain are extracted from the normalized original vibration data to obtain time domain feature parameters and frequency domain feature parameters. These selected features will be used as input data for the deep autoencoder (DAE) to ensure that the model focuses on the features most relevant to anomaly detection. The time domain feature parameters and frequency domain feature parameters are shown in Table 1.
[0047] Table 1
[0048]
[0049]
[0050] Then, the Pearson correlation coefficient is used to calculate the correlation coefficient between each characteristic parameter in the time domain characteristic parameter and the frequency domain characteristic parameter and the root mean square. The Pearson correlation coefficient is a statistic that measures the strength and direction of the linear relationship between two variables. The Pearson correlation coefficient formula is as follows:
[0051]
[0052] In the above formula, X i and Y i are the i-th observation values of variables X and Y, respectively. and are the means of variables X and Y respectively.
[0053] The calculated Pearson correlation coefficients are shown in Table 2.
[0054] Table 2
[0055]
[0056]
[0057] Then compare the calculated correlation coefficients with the preset coefficient thresholds, and retain the characteristic parameters corresponding to the correlation coefficients greater than the preset coefficient thresholds. Among them, in the Pearson correlation coefficient, the correlation coefficient is 0.4-0.6, which is relevant, so the characteristic parameters corresponding to the correlation coefficient greater than the preset coefficient threshold are selected for retention, that is, the characteristic parameters with a correlation coefficient greater than 0.5 are selected for retention and used as inputs for subsequent algorithms, that is, the root mean square, peak-to-peak value, peak factor, waveform factor, kurtosis of spectrum amplitude, centroid frequency, fourth root frequency, ratio of frequency mean square error to centroid frequency, and frequency kurtosis are used as inputs of features, so as to complete the process of feature dimensionality reduction, thereby avoiding the phenomenon of long calculation time and waste of computing resources.
[0058] 3. Deep autoencoder model training steps: input the retained feature parameters into the generative adversarial network for data enhancement, obtain the feature parameters after data enhancement and use them as input data; then compress the input data through the encoder, and reconstruct the compressed input data through the decoder to obtain reconstructed data, and then calculate the mean square error between the input data and the reconstructed data, and use the mean square error as the loss function to train the deep autoencoder model. This step actually includes data enhancement, data compression and reconstruction, and deep autoencoder (DAE) model training.
[0059] Specifically, after feature extraction, the amount of feature data is relatively small. In order to increase the amount of data and improve the training quality, a generative adversarial network (GAN network) is used to enhance the retained feature parameters, obtain the enhanced feature parameters and use them as input data. GAN can generate additional training data, expand the sample size by generating additional training data, and thus expand the data set, helping the model to better learn the distribution characteristics of the data, enhance the generalization ability of the model, and thus improve the training quality. Figure 2 As shown in the figure, the GAN network consists of two parts: the generator (also called the generative model) and the discriminator (also called the discriminative model). The generator learns to fit the probability distribution of the target data so that the learned probability distribution can be sufficiently close to the probability distribution of the target data. The discriminator is used to determine whether the data generated by the generator conforms to the probability distribution of the target data (it can also be understood as determining whether the data generated by the generator is true or false). During the training process of the model, the generator and the discriminator compete with each other, and the practice data is enhanced through continuous optimization.
[0060] The generator includes multiple building blocks and a final block. The building blocks consist of multiple one-dimensional convolutional layers, batch normalization layers, and ReLU activation functions. The kernel size of the convolutional layer is 3, the stride is 1, and the padding is 1, so that the length of the input and output can be kept consistent. The batch normalization layer is used to standardize the output of the convolutional layer to accelerate training and improve the stability of the model. The ReLU activation function introduces nonlinearity, enabling the model to learn complex features. The final block uses a convolutional layer to reduce the number of channels to 32, and then flattens the output of the convolutional layer into one-dimensional data through a flattening layer for input to the fully connected layer. The fully connected layer maps the flattened data to the target dimension and scales the output value to the range of [-1,1] through the Tanh activation function. During the forward propagation process, the generator accepts random noise as input, and after processing by these layers, generates fake data that matches the dimension of the target data.
[0061] The discriminator also includes multiple building blocks and a final block. The building blocks consist of multiple one-dimensional convolutional layers, batch normalization layers, leaky ReLU activation functions, and dropout layers. The kernel size of the convolutional layer is 3, the stride is 1, and the padding is 1 to keep the input and output lengths consistent. The batch normalization layer normalizes the output of the convolutional layer to improve the stability of training and accelerate convergence. The leaky ReLU activation function allows negative values to pass with a small slope, thereby avoiding the dead neuron problem of the ReLU activation function. The dropout layer prevents the model from overfitting by randomly discarding some neurons. The final block includes a convolutional layer that reduces the number of channels to 32, and then the convolution output is flattened into one-dimensional data through a flattening layer for input to the fully connected layer. The fully connected layer maps the flattened data to the output dimension 1, which represents the score of the authenticity of the input data. Finally, the Tanh activation function is used to scale the output value to the range [-1,1]. During the forward propagation process, the discriminator accepts input data, processes it through these layers, and generates a score for the authenticity of the data to distinguish between real data and generated data.
[0062] Preferably, the binary cross entropy loss function is used to train the generator and discriminator respectively, and the Adam optimizer is used to optimize the parameters of the generator and discriminator during the training process to obtain the trained generator and discriminator respectively to measure the performance of the generator and discriminator. The training times are 1000 times and 5000 data are generated. Figure 3 From the iterative process, we can see that the loss curve loss_G of the generator and the loss curve loss_D of the discriminator gradually stabilize during the training process, indicating that the model gradually reaches a relatively balanced state.
[0063] Then the data is compressed and reconstructed: the enhanced data is input into the deep autoencoder (DAE) for encoding and decoding, thereby achieving data compression and reconstruction. Specifically, the input data is input into the encoder, which compresses the input data to a smaller dimension through a fully connected layer and introduces a nonlinear transformation through the ReLU activation function; and the compressed input data is input into the decoder, which reconstructs the compressed data back to the original data dimension through another fully connected layer to obtain the reconstructed data, and normalizes the output reconstructed data through the Sigmoid activation function. The mean square error (MSE) between the input data and the reconstructed data is calculated based on the input data and the reconstructed data, and the mean square error (MSE) is used as the loss function to train the deep autoencoder model. During the training process, the Adam optimizer is used for parameter optimization, and the model is iterated 1000 times to obtain the trained deep autoencoder model (DAE).
[0064] 4. One-Class SVM model training steps: Input each input data into the trained deep autoencoder model respectively, and obtain the reconstruction error between each input data and the corresponding reconstructed data. The reconstruction error is used to measure the reconstruction quality of the data, reflecting whether the data is consistent with the normal mode learned by the model (evaluating whether the data conforms to the normal operation mode); then divide all reconstruction errors into training sets and test sets according to a preset ratio, and use the training set to train the One-Class SVM model to obtain a trained One-Class SVM model. The calculated reconstruction error is used to train a one-class support vector machine (One-Class SVM) model, and the corresponding threshold is set. The One-Class SVM model identifies abnormal samples that are significantly different from the normal mode by learning the distribution characteristics of normal data.
[0065] Specifically, after the deep autoencoder model (DAE) training is completed, each input data is input into the trained deep autoencoder model, and the reconstruction error (i.e., root mean square error RMSE) between each input data and the corresponding reconstructed data is calculated, and then all reconstruction errors are divided into training sets and test sets according to a preset ratio, i.e., 80% of the reconstruction error data is used for training, and 20% of the reconstruction error data is used for testing. The training set is used to train the One-Class SVM model, and the threshold of the decision function (a measure used to evaluate whether each sample point in the One-Class SVM model is a normal value or an outlier) is set. The threshold is based on the 5% quantile calculated based on the reconstruction error of the training set. For example, the threshold is calculated to be 1.61, and a trained One-Class SVM model is obtained.
[0066] 5. Ship vibration anomaly detection steps: artificially generate multiple abnormal data, and merge the abnormal data with the test set to generate a new test set, input each sample in the new test set into the trained deep autoencoder model, and obtain the new reconstruction error between each sample and the corresponding reconstructed data, and then input the new reconstruction error into the trained One-Class SVM model, and output the predicted label of each sample to complete the abnormal detection of ship vibration.
[0067] Specifically, in order to evaluate the performance of the model in practical applications, 200 synthetic abnormal data are first generated artificially, and the abnormal data and the test set are combined to generate a new test set. Then, each sample in the new test set is input into the trained deep autoencoder model, and the new reconstruction error between each sample and the corresponding reconstructed data is calculated. It is then applied to the trained One-Class SVM model for anomaly detection, that is, the new reconstruction error is input into the trained One-Class SVM model, and the predicted label of each sample is output to complete the anomaly detection of ship vibration. Among them, Figure 4 The iterative loss of the deep autoencoder (DAE) during training is shown. It can be seen that as the training progresses, the training loss curve gradually stabilizes, indicating that the model has gradually reached a relatively balanced state and the training process has converged well. Figure 5 and Figure 6 The reconstruction error distribution of healthy data on the training set and test set is shown in Figure 2. It can be clearly seen from the figure that most of the reconstruction error values are below the set threshold, which shows that the model can better identify normal data and show stable performance in both training and testing stages. Figure 7 The reconstruction error of the model on the generated abnormal data is shown. Since the characteristics of abnormal data are significantly different from those of normal data, the reconstruction error of abnormal data is significantly larger, and most of the reconstruction error values exceed the threshold. This shows that the model has a good effect in identifying abnormal data and can effectively distinguish abnormal states from normal states. Figure 8 The relationship between the model's decision function value and the reconstruction error is shown in the figure. As can be seen from the figure, most of the decision function values of normal data are below the threshold line, while most of the decision function values of abnormal data exceed the threshold line. This further verifies the high accuracy of the model in distinguishing normal and abnormal data.
[0068] In summary, the model based on DAE-One Class SVM performs well in processing ship vibration anomaly detection tasks. It can not only accurately identify normal data, but also effectively detect abnormal data, and has high practicality and reliability. The iterative loss of the model tends to be stable, the reconstruction error distribution is clear, and the decision function value clearly distinguishes normal and abnormal data, which further proves the advantages and potential of this method in practical applications.
[0069] Preferably, after obtaining the predicted label of each sample, an evaluation index is calculated based on the predicted label and the true label of each sample. The evaluation index includes precision, recall rate and F1 score. The performance of the trained One-Class SVM model is evaluated by the evaluation index, that is, the detection effect is evaluated by calculating the precision, recall rate and F1-score of the One-Class SVM model. These evaluation indicators help measure the performance and accuracy of the One-Class SVM model in practical applications, as shown in Table 3.
[0070] Table 3
[0071]
[0072] As can be seen from the table, the DAE-One Class SVM algorithm performs well in the detection of normal data and abnormal data. The three key indicators (precision, recall and F1-score) all show that the algorithm has high performance in processing these two types of data. Specifically, the model has a Precision of 0.88, a Recall of 0.97, and an F1-score of 0.92 when detecting normal data (Normal). This shows that although the Precision of the algorithm is slightly lower when identifying normal data, the Recall is higher, which means that the model can effectively reduce the occurrence of missed detection when detecting normal data, thereby ensuring that most normal data can be correctly identified. For abnormal data (Anomal), the model performs even better, with a Precision of 0.99, a Recall of 0.95, and an F1-score of 0.97. These indicators show that the model can not only accurately identify most abnormal data, but also effectively avoid misjudgment and ensure the accuracy of anomaly detection. This high Precision shows that in practical applications, the model can minimize false alarms, thereby improving the credibility of fault warnings. Overall, the accuracy of the model is as high as 0.96, indicating that the DAE-One Class SVM algorithm performs very well on the overall data set. The algorithm not only performs well in the recognition of normal data, but also shows significant advantages in the detection of abnormal data. This balance of performance makes the algorithm have broad application prospects in the field of ship vibration anomaly detection, and can effectively improve the safety and reliability of ship operation. Therefore, through an in-depth analysis of the model performance, the following conclusions can be drawn: the DAE-One Class SVM algorithm combines the powerful feature extraction ability of the deep autoencoder and the anomaly detection advantage of the One-Class SVM, and can still maintain efficient anomaly recognition capabilities when data is scarce. The method of the present invention can not only effectively detect the vibration anomaly of the ship diesel engine, but also provide reliable anomaly detection support through data enhancement and deep learning technology when fault data is scarce, which makes it extremely valuable in complex industrial environments such as ship power systems, especially in early anomaly detection and preventive maintenance. It plays an important role, can timely warn of potential problems, reduce dependence on expert experience, and is superior to traditional methods in detection accuracy, and has broad application prospects.
[0073] The present invention also relates to a ship vibration anomaly detection system, which corresponds to the above-mentioned ship vibration anomaly detection method and can be understood as a system for implementing the above-mentioned method. The system includes a data acquisition and root mean square calculation module, a correlation coefficient calculation and determination module, a deep autoencoder model training module, a One-Class SVM model training module and a ship vibration anomaly detection module connected in sequence. Specifically,
[0074] The data acquisition and root mean square calculation module acquires the original vibration data of the ship diesel engine, normalizes the original vibration data, and calculates the root mean square based on the normalized original vibration data;
[0075] The correlation coefficient calculation and determination module extracts time domain and frequency domain features from the normalized original vibration data to obtain time domain feature parameters and frequency domain feature parameters; and uses the Pearson correlation coefficient to calculate the correlation coefficient between each feature parameter in the time domain feature parameters and the frequency domain feature parameters and the root mean square, and then compares each calculated correlation coefficient with a preset coefficient threshold, and retains the feature parameters corresponding to the correlation coefficient greater than the preset coefficient threshold;
[0076] The deep autoencoder model training module inputs the retained feature parameters into the generative adversarial network for data enhancement, obtains the feature parameters after data enhancement and uses them as input data; then compresses the input data through the encoder, and reconstructs the compressed input data through the decoder to obtain reconstructed data, and then calculates the mean square error between the input data and the reconstructed data, and uses the mean square error as the loss function to train the deep autoencoder model;
[0077] The One-Class SVM model training module inputs each input data into the trained deep autoencoder model to obtain the reconstruction error between each input data and the corresponding reconstructed data; then divides all the reconstruction errors into a training set and a test set according to a preset ratio, and uses the training set to train the One-Class SVM model to obtain a trained One-Class SVM model;
[0078] The ship vibration anomaly detection module artificially generates multiple abnormal data, and combines the abnormal data with the test set to generate a new test set, and inputs each sample in the new test set into the trained deep autoencoder model to obtain a new reconstruction error between each sample and the corresponding reconstructed data, and then inputs the new reconstruction error into the trained One-Class SVM model, and outputs the predicted label of each sample to complete the abnormal detection of ship vibration.
[0079] Preferably, in the deep autoencoder model training module, the generative adversarial network includes a generator and a discriminator, and the generator and the discriminator each include multiple building blocks and a final block, the building block of the generator consists of multiple one-dimensional convolutional layers, batch normalization layers and ReLU activation functions; the building block of the discriminator consists of multiple one-dimensional convolutional layers, batch normalization layers, Leaky ReLU activation functions and Dropout layers; the final blocks of the generator and the discriminator each include a convolutional layer, a flattening layer, a fully connected layer and a Tanh activation function.
[0080] Preferably, in the ship vibration anomaly detection module, after obtaining the predicted label of each sample, an evaluation index is calculated according to the predicted label and the true label of each sample, and the performance of the trained One-Class SVM model is evaluated by the evaluation index, and the evaluation index includes precision, recall rate and F1 score.
[0081] Preferably, in the deep autoencoder model training module, a binary cross entropy loss function is used to train the generator and the discriminator respectively, and an Adam optimizer is used during the training process to optimize the parameters of the generator and the discriminator to obtain the trained generator and the discriminator respectively, so as to measure the performance of the generator and the discriminator.
[0082] Preferably, the characteristic parameters retained include root mean square, peak-to-peak value, peak factor, shape factor, kurtosis of spectrum amplitude, centroid frequency, fourth root frequency, ratio of frequency mean square deviation to centroid frequency, and frequency kurtosis.
[0083] The present invention provides an objective and scientific ship vibration anomaly detection method and system. Based on the original vibration data of the ship diesel engine, the ship vibration anomaly detection is realized by generative adversarial network (GAN network), deep autoencoder (DAE) and One-Class SVM model and a specific calculation method is adopted. The ship vibration anomaly can be effectively detected when there is only normal data or scarce fault data.
[0084] It should be noted that the above-described specific implementations can enable those skilled in the art to more fully understand the invention, but do not limit the invention in any way. Therefore, although this specification has described the invention in detail with reference to the drawings and embodiments, those skilled in the art should understand that the invention can still be modified or replaced by equivalents. In short, all technical solutions and improvements that do not deviate from the spirit and scope of the invention should be included in the protection scope of the patent for the invention.
Claims
1. A method for detecting abnormal vibration of a ship, characterized in that: The following steps are involved: Data acquisition and root mean square calculation steps: acquiring the original vibration data of the ship diesel engine, normalizing the original vibration data, and calculating the root mean square based on the normalized original vibration data; Correlation coefficient calculation and determination steps: extract time domain and frequency domain features from the normalized original vibration data to obtain time domain feature parameters and frequency domain feature parameters; calculate the correlation coefficient between each feature parameter and the root mean square in the time domain feature parameters and the frequency domain feature parameters using the Pearson correlation coefficient, and then compare each calculated correlation coefficient with a preset coefficient threshold, and retain the feature parameters corresponding to the correlation coefficient greater than the preset coefficient threshold; The training steps of the deep autoencoder model are as follows: the retained feature parameters are respectively input into the generative adversarial network for data enhancement, and the feature parameters after data enhancement are obtained and used as input data; the input data is then compressed by the encoder, and the compressed input data is reconstructed by the decoder to obtain reconstructed data, and then the mean square error between the input data and the reconstructed data is calculated, and the mean square error is used as the loss function to train the deep autoencoder model; One-Class SVM model training steps: Input each input data into the trained deep autoencoder model to obtain the reconstruction error between each input data and the corresponding reconstructed data; Then all reconstruction errors are divided into a training set and a test set according to a preset ratio, and the One-Class SVM model is trained using the training set to obtain a trained One-Class SVM model; Ship vibration anomaly detection steps: artificially generate multiple abnormal data, and merge the abnormal data with the test set to generate a new test set, input each sample in the new test set into the trained deep autoencoder model, and obtain the new reconstruction error between each sample and the corresponding reconstructed data, and then input the new reconstruction error into the trained One-Class SVM model, and output the predicted label of each sample to complete the abnormal detection of ship vibration.
2. The ship vibration abnormality detection method according to claim 1, characterized in that: In the deep autoencoder model training step, the generative adversarial network includes a generator and a discriminator, and the generator and the discriminator both include multiple building blocks and a final block. The building block of the generator consists of multiple one-dimensional convolutional layers, batch normalization layers and ReLU activation functions; the building block of the discriminator consists of multiple one-dimensional convolutional layers, batch normalization layers, Leaky ReLU activation functions and Dropout layers; the final blocks of the generator and the discriminator both include convolutional layers, flattening layers, fully connected layers and Tanh activation functions.
3. The ship vibration abnormality detection method according to claim 1, characterized in that: In the ship vibration anomaly detection step, after obtaining the predicted label of each sample, an evaluation index is calculated according to the predicted label and the true label of each sample, and the performance of the trained One-Class SVM model is evaluated by the evaluation index, and the evaluation index includes precision, recall rate and F1 score.
4. The ship vibration abnormality detection method according to claim 2, characterized in that: In the deep autoencoder model training step, a binary cross entropy loss function is used to train the generator and the discriminator respectively, and an Adam optimizer is used to optimize the parameters of the generator and the discriminator during the training process to obtain the trained generator and the discriminator respectively to measure the performance of the generator and the discriminator.
5. The ship vibration abnormality detection method according to claim 1, characterized in that: In the correlation coefficient calculation and determination step, the feature parameters with a correlation coefficient greater than 0.5 are retained as input to the deep autoencoder model training step, and the retained feature parameters include root mean square, peak-to-peak value, peak factor, waveform factor, kurtosis of spectrum amplitude, centroid frequency, fourth root frequency, ratio of frequency mean square error to centroid frequency, and frequency kurtosis.
6. A ship vibration abnormality detection system, characterized in that: It includes a data acquisition and RMS calculation module, a correlation coefficient calculation and determination module, a deep autoencoder model training module, a One-Class SVM model training module and a ship vibration anomaly detection module, which are connected in sequence. The data acquisition and root mean square calculation module acquires the original vibration data of the ship diesel engine, normalizes the original vibration data, and calculates the root mean square based on the normalized original vibration data; The correlation coefficient calculation and determination module extracts time domain and frequency domain features from the normalized original vibration data to obtain time domain feature parameters and frequency domain feature parameters; and uses the Pearson correlation coefficient to calculate the correlation coefficient between each feature parameter in the time domain feature parameters and the frequency domain feature parameters and the root mean square, and then compares each calculated correlation coefficient with a preset coefficient threshold, and retains the feature parameters corresponding to the correlation coefficient greater than the preset coefficient threshold; The deep autoencoder model training module inputs the retained feature parameters into the generative adversarial network for data enhancement, obtains the feature parameters after data enhancement and uses them as input data; then compresses the input data through the encoder, and reconstructs the compressed input data through the decoder to obtain reconstructed data, and then calculates the mean square error between the input data and the reconstructed data, and uses the mean square error as the loss function to train the deep autoencoder model; The One-Class SVM model training module inputs each input data into the trained deep autoencoder model to obtain the reconstruction error between each input data and the corresponding reconstructed data; then divides all the reconstruction errors into a training set and a test set according to a preset ratio, and uses the training set to train the One-Class SVM model to obtain a trained One-Class SVM model; The ship vibration anomaly detection module artificially generates multiple abnormal data, and combines the abnormal data with the test set to generate a new test set, and inputs each sample in the new test set into the trained deep autoencoder model to obtain a new reconstruction error between each sample and the corresponding reconstructed data, and then inputs the new reconstruction error into the trained One-Class SVM model, and outputs the predicted label of each sample to complete the abnormal detection of ship vibration.
7. The ship vibration abnormality detection system according to claim 6, characterized in that: In the deep autoencoder model training module, the generative adversarial network includes a generator and a discriminator, and the generator and the discriminator each include multiple building blocks and a final block. The building block of the generator consists of multiple one-dimensional convolutional layers, batch normalization layers, and ReLU activation functions; the building block of the discriminator consists of multiple one-dimensional convolutional layers, batch normalization layers, Leaky ReLU activation functions, and Dropout layers; the final blocks of the generator and the discriminator each include a convolutional layer, a flattening layer, a fully connected layer, and a Tanh activation function.
8. The ship vibration abnormality detection system according to claim 6, characterized in that: In the ship vibration anomaly detection module, after obtaining the predicted label of each sample, an evaluation index is calculated according to the predicted label and the true label of each sample, and the performance of the trained One-Class SVM model is evaluated by the evaluation index, and the evaluation index includes precision, recall rate and F1 score.
9. The ship vibration abnormality detection system according to claim 7, characterized in that: In the deep autoencoder model training module, a binary cross entropy loss function is used to train the generator and the discriminator respectively, and an Adam optimizer is used during the training process to optimize the parameters of the generator and the discriminator to obtain the trained generator and the discriminator respectively, so as to measure the performance of the generator and the discriminator.
10. The ship vibration abnormality detection system according to claim 6, characterized in that: The retained characteristic parameters include root mean square, peak-to-peak value, peak factor, shape factor, kurtosis of spectrum amplitude, centroid frequency, fourth root frequency, ratio of frequency mean square deviation to centroid frequency, and frequency kurtosis.
Citation Information
Patent Citations
Method for identifying fault signal of mechanical equipment based on classroom generative adversarial network model
CN112308038A
Fault diagnosis method based on generative adversarial network and auto-encoder
CN115238747A
Fault prediction method and device for ship multi-level fusion model, and electronic equipment
CN116484168A
GAN-based ship engine anomaly detection method
CN118535952A
Marine diesel engine thermal fault diagnosis method and device based on PCA-BO-SVM
CN119023276A
Cited By
Anomaly detection method of foundation pit horizontal displacement monitoring data based on unsupervised deep learning
CN121278585A