Diesel engine fault diagnosis method and device for sample imbalance, medium and equipment
By performing wavelet packet noise compression sensing sample enhancement and continuous wavelet transformation on the target vibration signal of marine diesel engines, combined with edge detection algorithm, the problem of sample imbalance in diesel engine fault diagnosis is solved, the diagnostic accuracy and efficiency are improved, and the safe navigation of the ship and the long-term use of equipment are ensured.
Patent Information
- Application Number
- CN202510067520.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-16
- Publication Date
- 2025-05-13
- Estimated Expiration
- 2045-01-16
AI Technical Summary
Marine diesel engines operate in harsh marine environments, resulting in frequent failures. The existing fault diagnosis methods are inaccurate in construction of fault models due to unbalanced data samples, making it difficult to detect faults in a timely manner, affecting navigation efficiency and possibly causing safety accidents.
By obtaining the target vibration signal of the diesel engine, the wavelet packet noise compression sensing sample enhancement process is performed, the enhanced signal sample is obtained, and the continuous wavelet transformation is performed to generate a time frequency diagram. The edge detection algorithm is used to perform grayscale and edge density calculations, and the edge density vector and threshold are constructed, and the edge density of the signal to be detected is compared to determine the state of the diesel engine.
It improves the sample balance and fault diagnosis capabilities of marine diesel engines, ensures the safe navigation of the ship, reduces operating costs, and extends the service life of the equipment.
Smart Images

Figure CN119984833A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of diesel engine diagnosis, and in particular relates to a method, a device, a medium and equipment for diagnosing a diesel engine fault with an unbalanced sample. Background Art
[0002] As the core equipment of the ship power system, the marine diesel engine plays a vital role in the shipping industry. It is widely used in various large ships such as merchant ships, tankers, cargo ships, etc., providing powerful propulsion and stable power support. However, the marine diesel engine has been operating in harsh marine environments for a long time, facing many unfavorable factors such as high load, high temperature, and seawater corrosion. It is prone to various failures, and it is necessary to perform fault diagnosis of marine diesel engines. However, for the fault diagnosis method of marine diesel engines, a large amount of data is needed to adjust the model. The diesel engine is in a normal state for a large amount of time, and the data of the fault state is far less than the data of the normal state, resulting in the problem of unbalanced data samples, which leads to inaccurate construction of the fault model. As a result, the fault is difficult to be discovered in time, which affects the efficiency of navigation, and even causes serious damage to the equipment and safety accidents. Summary of the invention
[0003] The present invention proposes a method, device, medium and equipment for diagnosing diesel engine faults with unbalanced samples to solve the problems existing in the above-mentioned prior art.
[0004] To achieve the above object, the present invention provides a method for diagnosing a diesel engine fault with an unbalanced sample, comprising the following steps:
[0005] Acquire a target vibration signal of the diesel engine, wherein the target vibration signal includes a target vibration signal in a normal state and a target vibration signal in different fault states;
[0006] Performing wavelet packet noise compressed sensing sample enhancement processing on the target vibration signal to obtain an enhanced signal sample;
[0007] Performing continuous wavelet transform on the enhanced signal samples to obtain a time-frequency diagram;
[0008] Graying the time-frequency graph according to an edge detection algorithm, calculating edge density, and constructing an edge density vector according to a state of the target vibration signal;
[0009] Based on the edge density vector, edge density thresholds of different states are constructed, the edge density of the time-frequency graph of the signal to be detected is calculated and compared with the edge density threshold to obtain the state of the diesel engine.
[0010] Preferably, performing wavelet packet noise compressed sensing sample enhancement includes:
[0011] Performing wavelet packet decomposition on the target vibration signal to obtain a plurality of sub-signals;
[0012] A sub-signal is encoded by compressed sensing coding, and a Gaussian mixed noise is constructed to be superimposed on the encoded sub-signal;
[0013] Decoding the superimposed signal through a compressed sensing decoding operation to obtain an enhanced component;
[0014] The enhanced component is reconstructed with other non-enhanced components.
[0015] Preferably, the wavelet packet decomposition expression is:
[0016]
[0017] In the formula, x(t) represents the signal to be decomposed, J is the number of decomposition layers, 2 j is the number of sub-signals in each layer, d j,k is the kth sub-signal of the jth layer, φ j,k is the kth wavelet packet basis function of the jth layer.
[0018] Preferably, the expression for performing the encoding operation by compressed sensing encoding is:
[0019] y=Φd j,k ;
[0020] In the formula, Φ represents the measurement matrix, d j,k is the kth sub-signal of the jth layer.
[0021] Preferably, the expression of the Gaussian mixture noise is:
[0022]
[0023] In the formula, g represents the generated Gaussian mixed noise, z represents the number of Gaussian distributions, and w i represents the weight of the i-th Gaussian distribution, and η represents the weight of the i-th Gaussian distribution according to μ i With σ i The generated Gaussian noise, μ i represents the mean of the i-th Gaussian distribution, σ i represents the standard deviation of the ith Gaussian distribution.
[0024] Preferably, the expression of the continuous wavelet transform is:
[0025]
[0026] Where x(t) is a one-dimensional time domain signal, Ψ(*) is a wavelet basis function, t represents time, a is a scale parameter, and b is a transformed form of the translation parameter.
[0027] Preferably, calculating the edge density includes:
[0028] Graying the time-frequency graph by a brightness method and performing Gaussian filtering to remove image noise;
[0029] The image gradient is calculated by Sobel operator to obtain the image edge;
[0030] Calculate the edge pixel ratio and get the edge density.
[0031] The present invention also provides a computer device, comprising a memory, a processor and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the method.
[0032] The present invention also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the method are implemented.
[0033] The present invention also provides an electronic device, comprising: a memory and a processor; the memory is used to store a program; the processor is used to execute the program to implement each step of the method.
[0034] Compared with the prior art, the present invention has the following advantages and technical effects:
[0035] The present invention discloses a method for diagnosing diesel engine faults with sample imbalance, comprising: obtaining a target vibration signal of a diesel engine, wherein the target vibration signal includes a target vibration signal in a normal state and a target vibration signal in different fault states; performing wavelet packet noise compressed sensing sample enhancement processing on the target vibration signal to obtain an enhanced signal sample; performing continuous wavelet transform on the enhanced signal sample to obtain a time-frequency graph; graying the time-frequency graph according to an edge detection algorithm, and calculating the edge density, and constructing an edge density vector according to the state of the target vibration signal; constructing edge density thresholds of different states based on the edge density vector, calculating the edge density of the time-frequency graph of the signal to be detected and comparing it with the edge density threshold to obtain the diesel engine state. The present invention improves the sample balance and fault diagnosis capabilities of a marine diesel engine, and is of great significance for ensuring safe navigation of ships, reducing operating costs, and extending the service life of equipment. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] The drawings constituting a part of the present application are used to provide a further understanding of the present application. The illustrative embodiments and descriptions of the present application are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0037] Figure 1 is a flow chart of a method according to an embodiment of the present invention;
[0038] Figure 2 is a normal sample image of an embodiment of the present invention, wherein (a) is a normal sample enhancement effect image, and (b) is a normal sample original image;
[0039] Figure 3 : is an abnormal sample image according to an embodiment of the present invention, wherein (a) is an abnormal sample enhancement effect image, and (b) is an abnormal sample original image. DETAILED DESCRIPTION
[0040] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0041] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0042] The following is an introduction to the technologies involved:
[0043] Wavelet packet decomposition is a technique for multi-scale and multi-frequency analysis of signals. It recursively decomposes the signal into sub-signals containing different frequency components, so as to deeply explore the local characteristics of the signal. This decomposition method is very flexible and allows users to select different wavelet basis functions and decomposition depths as needed. It is particularly suitable for analyzing nonlinear and non-stationary complex signals. Wavelet packet decomposition has a wide range of applications in signal processing, image analysis, audio analysis, biomedical signal analysis and other fields. It helps us understand and process various signals more accurately by providing detailed frequency and time information of the signal.
[0044] Continuous wavelet transform is a powerful signal analysis tool that can reveal local features of a signal, such as discontinuities, mutation points, and spikes, by analyzing the signal at different scales and locations. This transform uses wavelet functions to detect signals, similar to using a magnifying glass with different magnifications to observe the details of a signal. CWT is particularly suitable for analyzing non-stationary signals, that is, signals whose statistical properties change over time. It can adapt to the nonlinearity and non-stationarity of the signal, and by selecting appropriate wavelet basis functions, it increases the flexibility of the analysis. Continuous wavelet transform has a wide range of applications in many fields such as signal processing, image analysis, seismology, and financial analysis. It has become a very valuable analysis tool because it can provide time-frequency information of the signal.
[0045] The Sobel operator identifies edges by calculating the gradient magnitude of each pixel in the image. This operator uses two 3x3 convolution kernels, one for detecting brightness changes in the horizontal direction and the other for detecting brightness changes in the vertical direction. Through the gradients in these two directions, the Sobel operator can determine the strength and direction of the edge. This method is particularly effective for horizontal and vertical edges in images, but has weaker detection capabilities for diagonal edges. The Sobel operator is widely used in practical applications because of its simplicity and effectiveness, especially when fast and relatively accurate edge detection is required.
[0046] Embodiment 1
[0047] like Figure 1 As shown, this embodiment provides a method for diagnosing a diesel engine fault with an unbalanced sample, comprising the following steps:
[0048] Acquire a target vibration signal of the diesel engine, wherein the target vibration signal includes a target vibration signal in a normal state and a target vibration signal in different fault states;
[0049] Perform wavelet packet noise compressed sensing sample enhancement processing on the target vibration signal to obtain an enhanced signal sample;
[0050] Perform continuous wavelet transform on the enhanced signal samples to obtain a time-frequency diagram;
[0051] Grayscale the time-frequency graph according to the edge detection algorithm, calculate the edge density, and construct the edge density vector according to the state of the target vibration signal;
[0052] Based on the edge density vector, the edge density thresholds of different states are constructed, the edge density of the time-frequency graph of the signal to be detected is calculated and compared with the edge density threshold to obtain the diesel engine state.
[0053] The specific steps are as follows:
[0054] 1. Wavelet packet noise compressed sensing sample enhancement:
[0055] The vibration signals S of different states collected by the acceleration sensor are often much longer in the normal state than in the abnormal state, resulting in the number of abnormal state samples being much less than the number of normal samples, which leads to the problem of data sample imbalance between samples of different states. Sample imbalance may lead to distortion of data evaluation indicators, which are affected by sample imbalance and tend to be biased towards the majority type, thus affecting the accuracy. In order to solve the sample imbalance problem, the wavelet packet noise compressed sensing sample enhancement method is used to enhance the data samples, thereby obtaining data balanced samples. The specific implementation method is as follows: a sample signal is decomposed into n sub-signals by wavelet packet decomposition, a sub-signal is selected, and compressed sensing coding is used to implement the encoding operation of the data, a Gaussian mixed noise is constructed and superimposed with the encoded signal, and the superimposed signal is decoded by compressed sensing to obtain the enhanced component. Finally, the component and other components are reconstructed to obtain a signal similar to the original signal, but not the same. Repeat the above operation n times to complete the enhancement of a sample signal. The implementation method of wavelet packet decomposition is shown in formula (1).
[0056]
[0057] In formula (1), x(t) represents the signal to be decomposed, J represents the number of decomposition layers, 2 j is the number of sub-signals in each layer, d j,k is the kth sub-signal of the jth layer. j,k is the kth wavelet packet basis function of the jth layer, which is the form of the mother wavelet after scaling and displacement. Through formula (1), multiple sub-signals can be obtained, and one of the sub-signals d is selected in the process. j,k Compressed sensing coding is performed. Compressed sensing considers that the signal d j,k is sparse, and in addition, the sub-signal d is measured by the matrix Φ j,k Perform compressed sampling, as shown in formula (2):
[0058] y=Φd j,k (2)
[0059] In the above process, the randomly generated matrix Φ is used for sampling to generate a measurement value y to realize the encoding of the signal and the sub-signal d j,k Effective reconstruction is achieved. On the basis of this coding, in order to achieve the differentiation of sample enhancement signals, Gaussian mixed noise (with different standard deviations) is added to the signal. The mathematical expression of Gaussian mixed noise is shown in formula (4). In order to ensure the consistency of signal quality after adding noise and control the same signal-to-noise ratio, it is necessary to calculate the signal standard deviation of Gaussian mixed noise, as shown in formula (3).
[0060]
[0061] Where σ represents the calculated Gaussian noise standard deviation, and N represents the signal d j,k The length of g represents the generated Gaussian noise, z represents the number of Gaussian distributions, and w i represents the weight of the i-th Gaussian distribution, μ i represents the mean of the i-th Gaussian distribution, σ i Represents the standard deviation of the i-th Gaussian distribution. A new signal y is obtained by superimposing the compressed sensing coded signal with the Gaussian mixed noise. noisy On this basis, the signal is subjected to compressed sensing decoding operation. The purpose of the decoding operation is to obtain sub-signals that are similar but not identical. The process is to reconstruct the original signal x through an optimization problem. The optimization process is as follows (5)
[0062]
[0063] The optimization goal of this process is to find an x that minimizes equation (5), where λ is the regularization parameter used to control sparsity, ||·||2 is the L2 norm, that is, the square root of the sum of squares, and ||·||1 is the L1 norm, that is, the sum of absolute values.
[0064] According to formula (1), the processed sub-signal is replaced with the atomic signal, and then the signal is reconstructed to obtain a signal sample that is similar to but different from the original sample, thereby enhancing the fault sample. Figure 2 and Figure 3 Schematic diagram of normal samples and abnormal samples generated by sample enhancement method.
[0065] 2. Time-frequency diagram drawing method:
[0066] Continuous wavelet transform is an effective tool for analyzing time domain and frequency domain signals simultaneously. It has the advantages of time-frequency localization and multi-scale analysis. It is mainly realized by performing continuous inner product on one-dimensional signal through equation (6) and using wavelet basis functions of different scales. In order to further extract fault feature information from the signal, continuous wavelet transform is used to generate time-frequency diagram.
[0067]
[0068] Where y(t) is a one-dimensional time domain signal, Ψ(*) is a wavelet basis function, a is a scale parameter, and b is a transformation of the translation parameter. In the continuous wavelet time-frequency diagram, the energy distribution in different frequency ranges can reflect different fault characteristics. Therefore, the continuous wavelet time-frequency diagram can extract fault characteristics through the energy distribution in different frequency ranges and the energy concentration area.
[0069] 3. Simple diagnostic method for edge detection:
[0070] In a two-dimensional image, by identifying the areas where the brightness of the image changes significantly, these areas correspond to important features in the image. For this reason, edge detection can be used to diagnose faulty two-dimensional images. To achieve edge detection, the image must first be grayed. Image graying can be achieved through the brightness method, as shown in formula (7).
[0071] I gray (x,y)=w R ×R(x,y)+w G ×G(x,y)+w B ×B(x,y) (7)
[0072] Among them I gray is a grayscale image, R(x,y), G(x,y), and I(x,y) are the pixel values of red, green, and blue respectively. R 、w G 、w B There are three different weights respectively. On this basis, Gaussian filtering is used to smooth the image and remove noise to reduce the interference factors in the detection process. The specific method is shown in formula (8).
[0073]
[0074] Where ρ represents the standard deviation of the Gaussian kernel, which controls the degree of smoothing. The smoothed image is obtained through the above process. The image gradient is calculated using the Sobel operator on the smoothed signal to calculate the gradient of the image in the x and y directions. The gradient calculation process is shown in equations (9) and (10), where the magnitude and direction of the gradient are calculated as shown in (11) and (12).
[0075]
[0076] θ(x,y)=atan2(G y (x,y),G x (x,y)) (12)
[0077] Among them G x is the horizontal gradient, G y is the vertical gradient, the gradient represents the edge strength of a point in the image, and θ is the gradient angle. To simplify the calculation process, the gradient direction is quantized to 0°, 45°, 90°, and 135°. In different gradient directions, if the gradient value of the current pixel is not the local maximum along the gradient direction, it is set to 0. If it is, the pixel point is retained to refine the edge. Dual threshold detection is used to distinguish three different types of edges: strong edges, weak edges, and non-edges. By setting the high threshold T high and low threshold T low The mathematical expression of dual threshold detection is shown in (13).
[0078]
[0079] After the above processing, in order to measure the density of edge information in the image signal and thus determine the number of fault components, the edge density is used to calculate the proportion of edge pixels. The specific implementation formula is shown in formula (14).
[0080]
[0081] Where W and H are the width and height of the image, respectively, and W×H is equal to the total number of pixels in the image. The edge density information of the fault time-frequency graphs of different states is calculated by the above method, and its standard deviation σ is calculated edge and mean μ edge According to the Gaussian distribution principle, 99.7% of the data is concentrated in the range of μ±3σ. For this purpose, the Gaussian distribution principle can be used to calculate the edge density of multiple images in different states and calculate their mean σ edge With standard deviation μ edge . Construct different state thresholds. As shown in formula (15).
[0082]
[0083] This embodiment improves the sample balance and fault diagnosis capabilities of the marine diesel engine, which is of great significance for ensuring safe navigation of the ship, reducing operating costs and extending the service life of the equipment.
[0084] This embodiment further provides a computer device, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the method.
[0085] This embodiment also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the method are implemented.
[0086] This embodiment further provides an electronic device, including: a memory and a processor; the memory is used to store a program; the processor is used to execute the program to implement each step of the method.
[0087] The above are only preferred specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A method for diagnosing diesel engine faults with unbalanced samples, characterized in that: The following steps are involved: Acquire a target vibration signal of the diesel engine, wherein the target vibration signal includes a target vibration signal in a normal state and a target vibration signal in different fault states; Performing wavelet packet noise compressed sensing sample enhancement processing on the target vibration signal to obtain an enhanced signal sample; Performing continuous wavelet transform on the enhanced signal samples to obtain a time-frequency diagram; Graying the time-frequency graph according to an edge detection algorithm, calculating edge density, and constructing an edge density vector according to a state of the target vibration signal; Based on the edge density vector, edge density thresholds of different states are constructed, the edge density of the time-frequency graph of the signal to be detected is calculated and compared with the edge density threshold to obtain the diesel engine state.
2. The method according to claim 1, characterized in that The wavelet packet noise compressed sensing sample enhancement includes: Performing wavelet packet decomposition on the target vibration signal to obtain a plurality of sub-signals; A sub-signal is encoded by compressed sensing coding, and a Gaussian mixed noise is constructed to be superimposed on the encoded sub-signal; Decoding the superimposed signal through a compressed sensing decoding operation to obtain an enhanced component; The enhanced component is reconstructed with other non-enhanced components.
3. The method according to claim 2, characterized in that The wavelet packet decomposition expression is: In the formula, x(t) represents the signal to be decomposed, J is the number of decomposition layers, 2 j is the number of sub-signals in each layer, d j,k is the kth sub-signal of the jth layer, φ j,k is the kth wavelet packet basis function of the jth layer.
4. The method according to claim 2, characterized in that: The expression for the encoding operation through compressed sensing coding is: and=Φd j,k ; In the formula, Φ represents the measurement matrix, d j,k is the kth sub-signal of the jth layer.
5. The method according to claim 2, characterized in that: The expression of the Gaussian mixture noise is: In the formula, g represents the generated Gaussian mixed noise, z represents the number of Gaussian distributions, and w i represents the weight of the i-th Gaussian distribution, and η represents the weight of the i-th Gaussian distribution according to μ i With σ i The generated Gaussian noise, μ i represents the mean of the i-th Gaussian distribution, σ i represents the standard deviation of the ith Gaussian distribution.
6. The method according to claim 1, characterized in that The expression of the continuous wavelet transform is: Where x(t) is a one-dimensional time domain signal, Ψ(*) is a wavelet basis function, t represents time, a is a scale parameter, and b is a transformed form of the translation parameter.
7. The method according to claim 1, characterized in that Calculating edge density involves: Graying the time-frequency graph by a brightness method and performing Gaussian filtering to remove image noise; The image gradient is calculated by Sobel operator to obtain the image edge; Calculate the edge pixel ratio and get the edge density.
8. A computer device comprising a memory, a processor and a computer program stored in the memory, characterized in that: The processor executes the computer program to implement the steps of the method according to any one of claims 1 to 7.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
10. An electronic device, characterized in that: include: Memory and processor; The memory is used to store programs; the processor is used to execute the programs to implement the various steps of the method as described in any one of claims 1-7.
Citation Information
Cited By
Method for fault diagnosis of diesel engine under sample imbalance, and apparatus, medium and device
WO2026153302A1