Fault diagnosis model training method, fault diagnosis method, fault diagnosis system and electronic equipment
By obtaining equipment operation signals with different frequency domain resolutions and using the fault diagnosis model to extract and parameter adjustment, the problem of low accuracy of traditional fault diagnosis models is solved, and the accuracy and robustness of fault diagnosis are improved.
Patent Information
- Application Number
- CN202411993180.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-04-29
AI Technical Summary
The traditional fault diagnosis model in the prior art has poor accuracy in equipment fault diagnosis, making it difficult to effectively capture and extract key features.
By obtaining equipment operation signals with different frequency domain resolutions, using the fault diagnosis model for feature extraction, and building a loss function based on the information entropy and prediction results, and adjusting the model parameters to improve diagnostic accuracy.
The identification accuracy and robustness of the fault diagnosis model are improved, ensuring that the extracted features can better reflect the true status of the device's operating signal.
Smart Images

Figure CN119903315A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence, and in particular to a fault diagnosis model training method, a diagnosis method, a system and an electronic device. Background Art
[0002] With the rapid development and continuous iteration of artificial intelligence technology, diagnosing machine equipment failures based on artificial intelligence technology has become one of the hottest research directions today. However, due to the complexity of the equipment's operating data, the current fault diagnosis model is difficult to effectively capture and extract key features, which leads to poor accuracy of the fault diagnosis model. Therefore, the fault diagnosis model still needs to be optimized. Summary of the invention
[0003] The technical problem to be solved by the present disclosure is to overcome the defect of poor diagnostic accuracy of traditional fault diagnosis models in the prior art, and to provide a training method, a diagnosis method, a system and an electronic device for a fault diagnosis model.
[0004] The present invention solves the above technical problems through the following technical solutions:
[0005] In a first aspect, a method for training a fault diagnosis model is provided, the training method comprising:
[0006] Acquire training samples, wherein the training samples include device operation signals with different frequency domain resolutions; wherein the device operation signals of each frequency domain resolution are annotated with fault annotation results;
[0007] Input the training samples into the fault diagnosis model, so that the fault diagnosis model can extract features of the equipment operation signals of each frequency domain resolution, obtain first frequency domain features corresponding to each frequency domain resolution, and output fault prediction results according to the first frequency domain features;
[0008] Calculate the first information entropy between the device operation signal of each frequency domain resolution and its corresponding first frequency domain feature respectively;
[0009] A loss function is constructed according to the first information entropy, the fault labeling result, and the fault prediction result, and model parameters of the fault diagnosis model are adjusted based on the loss function until an iteration stop condition is met.
[0010] Optionally, the step of obtaining training samples includes:
[0011] Obtain equipment operation data;
[0012] Performing multi-resolution analysis on the operation data based on wavelet basis functions and / or scaling functions to obtain the equipment operation signals with different frequency domain resolutions;
[0013] The training samples are constructed according to the device operation signals with different frequency domain resolutions.
[0014] Optionally, the step of obtaining training samples includes:
[0015] The performing multi-resolution analysis on the operation data based on the wavelet basis function and / or the scaling function to obtain the device operation signals with different frequency domain resolutions comprises:
[0016] Calculate and obtain first wavelet coefficients of a first frequency domain resolution according to the operating data and the wavelet basis function;
[0017] Obtaining a device operation signal with the first frequency domain resolution by calculation according to the first wavelet coefficient and the scaling function;
[0018] and / or;
[0019] Calculate the second wavelet coefficients of the second frequency domain resolution according to the operating data and the scaling function;
[0020] Calculate the device operation signal of the second frequency domain resolution according to the second wavelet coefficient and the scaling function;
[0021] The minimum value of the first frequency domain resolution is greater than or equal to the maximum value of the second frequency domain resolution.
[0022] Optionally, the fault diagnosis model includes a feature extraction layer, a first normalization layer, an activation layer, and a pooling layer; the feature extraction layer includes a plurality of different receptive fields; the convolution kernels of the different receptive fields have different sizes; and the inputting of the training samples into the fault diagnosis model so that the fault diagnosis model performs feature extraction on the equipment operation signals of each frequency domain resolution includes:
[0023] The training sample is input into a receptive field that matches the frequency domain resolution of the training sample to obtain the second frequency domain features of each frequency domain resolution; the convolution kernel size of the receptive field is positively correlated with the frequency domain resolution of the training sample; the scale difference of the second frequency domain features of each frequency domain resolution is greater than the first frequency domain features of each frequency domain resolution;
[0024] Inputting the second frequency domain feature into the first normalization layer to normalize the second frequency domain feature to obtain a third frequency domain feature;
[0025] Inputting the third frequency domain feature into the activation layer to perform nonlinear processing on the third frequency domain feature to obtain a fourth frequency domain feature;
[0026] The fourth frequency domain feature is input into a pooling layer to perform dimension reduction processing on the fourth frequency domain feature to obtain the first frequency domain feature.
[0027] Optionally, the fault diagnosis model includes a feature fusion layer, a fully connected layer, and a second normalization layer, and outputting a fault prediction result according to the first frequency domain feature includes:
[0028] Inputting each of the first frequency domain features into a feature fusion layer for feature fusion to obtain a fused feature vector;
[0029] The fused feature vector is sequentially input into the fully connected layer and the second normalization layer for processing to obtain the fault prediction result; wherein the fully connected layer and the second normalization layer perform dimensionality reduction and normalization processing on the fused feature vector respectively.
[0030] Optionally, adjusting the model parameters of the fault diagnosis model based on the loss function until an iteration stop condition is satisfied includes:
[0031] The model parameters of the fault diagnosis model are adjusted according to the loss function and the back propagation algorithm until an iteration stop condition is met.
[0032] In a second aspect, a diagnostic method of a fault diagnosis model is provided, the diagnostic method comprising:
[0033] The device operation signals of the device to be detected with different frequency domain resolutions are input into the fault diagnosis model to obtain the fault diagnosis result of the device to be detected; wherein the fault diagnosis model is trained by any of the fault diagnosis model training methods described above.
[0034] In a third aspect, a training system for a fault diagnosis model is provided, wherein the training system comprises:
[0035] A first acquisition module is used to acquire training samples, wherein the training samples include equipment operation signals with different frequency domain resolutions; wherein the equipment operation signals of each frequency domain resolution are annotated with fault annotation results;
[0036] An extraction module, used for inputting training samples into the fault diagnosis model, so that the fault diagnosis model performs feature extraction on the equipment operation signal of each frequency domain resolution, obtains a first frequency domain feature corresponding to each frequency domain resolution, and outputs a fault prediction result according to the first frequency domain feature;
[0037] A calculation module, used to respectively calculate the first information entropy between the device operation signal of each frequency domain resolution and its corresponding first frequency domain feature;
[0038] An adjustment module is used to construct a loss function according to the first information entropy, the fault labeling result, and the fault prediction result, and adjust the model parameters of the fault diagnosis model based on the loss function until an iteration stop condition is met.
[0039] Optionally, the first acquisition module includes:
[0040] A first acquisition unit, used to acquire operation data of a device;
[0041] An analysis unit, configured to perform multi-resolution analysis on the operation data based on a wavelet basis function and / or a scaling function to obtain the device operation signals with different frequency domain resolutions;
[0042] A construction unit is used to construct the training samples according to the device operation signals with different frequency domain resolutions.
[0043] Optionally, the analysis unit comprises:
[0044] A first calculation component, used for calculating a first wavelet coefficient of a first frequency domain resolution according to the operating data and the wavelet basis function;
[0045] A second calculation component is used to calculate the device operation signal of the first frequency domain resolution according to the first wavelet coefficient and the scaling function;
[0046] and / or;
[0047] A third calculation component, configured to calculate a second wavelet coefficient of a second frequency domain resolution according to the operating data and the scale function;
[0048] a fourth calculation component, configured to calculate the device operation signal of the second frequency domain resolution according to the second wavelet coefficients and the scaling function;
[0049] The minimum value of the first frequency domain resolution is greater than or equal to the maximum value of the second frequency domain resolution.
[0050] Optionally, the fault diagnosis model includes a feature extraction layer, a first normalization layer, an activation layer and a pooling layer; the feature extraction layer includes a plurality of different receptive fields; the extraction module includes:
[0051] A first input unit is used to input the training sample into a receptive field that matches the frequency domain resolution of the training sample to obtain the second frequency domain features of each frequency domain resolution; the convolution kernel size of the receptive field is positively correlated with the frequency domain resolution of the training sample; the scale difference of the second frequency domain features of each frequency domain resolution is greater than the first frequency domain features of each frequency domain resolution;
[0052] a second input unit, configured to input the second frequency domain feature into the first normalization layer to perform normalization processing on the second frequency domain feature to obtain a third frequency domain feature;
[0053] A third input unit, used for inputting the third frequency domain feature into the activation layer to perform nonlinear processing on the third frequency domain feature to obtain a fourth frequency domain feature;
[0054] The fourth input unit is used to input the fourth frequency domain feature into the pooling layer to perform dimensionality reduction processing on the fourth frequency domain feature to obtain the first frequency domain feature.
[0055] Optionally, the extraction module further includes:
[0056] A fusion unit, used for inputting each of the first frequency domain features into a feature fusion layer for feature fusion to obtain a fused feature vector;
[0057] A processing unit is used to input the fused feature vector into a fully connected layer and a second normalization layer in sequence for processing to obtain the fault prediction result; wherein the fully connected layer and the second normalization layer perform dimensionality reduction and normalization processing on the fused feature vector respectively.
[0058] Optionally, the adjustment module includes:
[0059] An adjustment unit is used to adjust the model parameters of the fault diagnosis model according to the loss function and the back propagation algorithm until an iteration stop condition is met.
[0060] In a fourth aspect, a fault diagnosis model diagnosis system is provided, the fault diagnosis system comprising:
[0061] A diagnostic module is used to input device operation signals of different frequency domain resolutions of the device to be detected into the fault diagnosis model to obtain the fault diagnosis results of the device to be detected; wherein, the fault diagnosis model is trained by the training method of the fault diagnosis model described in any one of the above.
[0062] In a fifth aspect, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and used to run on the processor, characterized in that when the processor executes the computer program, it implements the above-mentioned training method of the fault diagnosis model or the above-mentioned diagnosis method of the fault diagnosis model.
[0063] On the basis of being in accordance with the common sense in the art, the above-mentioned preferred conditions can be arbitrarily combined to obtain the preferred embodiments of the present disclosure.
[0064] The positive progress of the present disclosure is that the first information entropy obtained by respectively calculating the device operation signal of each frequency domain resolution and its corresponding first frequency domain feature can better measure the correlation between the first frequency domain feature and the device operation signal of its corresponding frequency domain resolution, thereby ensuring that the extracted first frequency domain feature can reflect the true status of the device operation signal of its corresponding frequency domain resolution to the greatest extent. Therefore, the loss function constructed based on the first information entropy, fault labeling results and fault prediction results is more accurate, and the fault diagnosis model adjusted based on the loss function has higher recognition accuracy and robustness. BRIEF DESCRIPTION OF THE DRAWINGS
[0065] Figure 1 A flowchart of a method for training a fault diagnosis model provided in Example 1 of the present disclosure;
[0066] Figure 2 An algorithm framework diagram of a fault diagnosis model training method provided in Example 1 of the present disclosure;
[0067] Figure 3 A comparison diagram of a fault diagnosis model obtained by a fault diagnosis model training method provided in Example 1 of the present disclosure and other models;
[0068] Figure 4 A module diagram of a method for training a fault diagnosis model provided in Embodiment 3 of the present disclosure;
[0069] Figure 5 This is a schematic diagram of the structure of an electronic device shown in Embodiment 5 of the present disclosure. DETAILED DESCRIPTION
[0070] The present disclosure is further described below by way of examples, but the present disclosure is not limited to the scope of the examples.
[0071] Prefixes such as "first" and "second" are used in the embodiments of the present disclosure only to distinguish different description objects, and have no limiting effect on the position, order, priority, quantity or content of the described objects. The use of prefixes such as ordinal numbers to distinguish description objects in the embodiments of the present disclosure does not constitute a limitation on the described objects. For the statement of the described objects, please refer to the description in the context of the claims or embodiments, and no unnecessary limitation should be constituted due to the use of such prefixes. In addition, in the description of the present embodiment, unless otherwise specified, the meaning of "plurality" is two or more.
[0072] Example 1
[0073] In order to improve the recognition accuracy and robustness of the fault diagnosis model, the present disclosure provides a training method for a fault diagnosis model. Figure 1A flowchart of a method for training a fault diagnosis model provided in Embodiment 1 of the present disclosure, wherein the method for training a fault diagnosis model comprises:
[0074] Step 101: Obtain training samples.
[0075] The training samples include equipment operation signals of different frequency domain resolutions, wherein the equipment operation signals of each frequency domain resolution are annotated with fault annotation results.
[0076] Step 102: input the training samples into the fault diagnosis model so that the fault diagnosis model can extract features of the equipment operation signals of each frequency domain resolution, obtain first frequency domain features corresponding to each frequency domain resolution, and output fault prediction results according to the first frequency domain features.
[0077] Step 103: Calculate the first information entropy between the device operation signal of each frequency domain resolution and its corresponding first frequency domain feature.
[0078] The first information entropy is used to represent the mutual information between the device operation signal and its corresponding first frequency domain feature, and the value of the mutual information is usually non-negative. The larger the mutual information, the more information about the device operation signal contained in the first frequency domain feature, but there may be a large amount of redundant information in this information. Therefore, the redundant information in the first frequency domain feature can be effectively eliminated by minimizing the first information entropy, thereby significantly improving the expression ability of the first frequency domain feature.
[0079] The specific calculation steps are:
[0080]
[0081] Among them: X i represents the equipment operation signal under the i-th frequency domain resolution distribution; Z i Yes X i The corresponding first frequency domain feature; Yes X i The normalized result of the Gram matrix; It's Z i The normalized result of the Gram matrix; yes Entropy of yes Entropy of Yes X i With Z i Entropy of I α (X i ; Z i ) is X i With Z iThe first information entropy; α∈(0,1)∪(1,∞); α is the parameter of the first information entropy. Specifically, different α values correspond to different entropy definitions: when α approaches 1, the information entropy approaches von Neumann entropy (the quantum version of information entropy); when α=0, the maximum entropy is obtained. When α=2, the collision entropy is obtained, which is a commonly used entropy form and has important applications in cryptography. For α>1, as α increases, it is more sensitive to low-probability events.
[0082] calculate The specific steps are:
[0083]
[0084] Among them: X i represents the equipment operation signal under the i-th frequency domain resolution distribution; Z i Yes X i The corresponding first frequency domain feature; Yes X i The normalized result of the Gram matrix; It's Z i The normalized result of the Gram matrix; yes Entropy of yes Entropy of Yes X i With Z i Entropy of; α∈(0,1)∪(1,∞); is to ask The rank of ; · represents the Hadamard product.
[0085] calculate and calculation The formula is the same as that for calculating For example:
[0086]
[0087] Among them; α∈(0,1)∪(1,∞); yes rank; X i represents the equipment operation signal under the i-th frequency domain resolution distribution, Yes X i The normalized result of the Gram matrix; yes The entropy of .
[0088] Step 104: construct a loss function according to the first information entropy, the fault labeling result, and the fault prediction result, and adjust the model parameters of the fault diagnosis model based on the loss function until an iteration stop condition is met.
[0089] In this embodiment, the first information entropy obtained by respectively calculating the device operation signal of each frequency domain resolution and its corresponding first frequency domain feature can better measure the correlation between the first frequency domain feature and the device operation signal of its corresponding frequency domain resolution. Furthermore, the redundant information in the first frequency domain feature can be effectively eliminated by minimizing the first information entropy to improve the expression ability of the first frequency domain feature, thereby ensuring that the extracted first frequency domain feature can reflect the true condition of the device operation signal of its corresponding frequency domain resolution to the greatest extent. Therefore, the loss function constructed according to the first information entropy, fault labeling results and fault prediction results is more accurate, and the fault diagnosis model adjusted based on the loss function has higher recognition accuracy and robustness.
[0090] In one embodiment, the cross entropy between the fault labeling result and the fault prediction result may also be obtained, and then a loss function is constructed according to the cross entropy and the first information entropy.
[0091] In one embodiment, the step of obtaining training samples includes:
[0092] S1: Get the operation data of the device.
[0093] For example, the operating data may be vibration signals of key components of the rotating machinery (such as bearings or gears) collected using a high-precision acceleration sensor.
[0094] S2: Perform multi-resolution analysis on the operation data based on wavelet basis functions and / or scaling functions to obtain equipment operation signals with different frequency domain resolutions.
[0095] Taking the case where the operating data of the equipment is the vibration signal of the equipment: multi-resolution analysis of the vibration signal based on wavelet basis functions and / or scaling functions can obtain a low-frequency vibration signal with a frequency domain resolution between [0 Hz, 1250 Hz], a first high-frequency vibration signal with a frequency domain resolution between [1250 Hz, 2500 Hz], a second high-frequency vibration signal with a frequency domain resolution between [2500 Hz, 5000 Hz], and a third high-frequency vibration signal with a frequency domain resolution between [5000 Hz, 10000 Hz].
[0096] S3: Construct the training samples according to the device operation signals with different frequency domain resolutions.
[0097] In this embodiment, multi-resolution analysis of the operating data is performed based on wavelet basis functions and / or scaling functions, which can more accurately divide the operating data into equipment operating signals with different frequency domain resolutions according to the frequency domain resolution of the operating data. Then, the training samples constructed based on the equipment operating signals with different frequency domain resolutions have a better training effect on the fault diagnosis model.
[0098] In one embodiment, before performing multi-resolution analysis on the operating data, the operating data may be standardized first.
[0099] Taking the vibration signal as an example, a method for standardizing the operation signal of the equipment is introduced.
[0100] The vibration signal is divided into n sample signals, where n is a positive integer. The maximum sample signal with the largest fluctuation amplitude and the minimum sample signal with the smallest fluctuation amplitude are obtained from the n sample signals, and the vibration signal is standardized according to each sample signal, the maximum sample signal and the minimum sample signal. The specific formula is:
[0101]
[0102] Among them, x i represents the i-th sample signal and i∈[1,n]; x min is the minimum sample signal; x max is the maximum sample signal, and x is the standardized vibration signal.
[0103] In one embodiment, performing multi-resolution analysis on the operation data based on the wavelet basis function and / or the scaling function to obtain the device operation signals with different frequency domain resolutions includes:
[0104] S1: Calculate and obtain first wavelet coefficients of a first frequency domain resolution according to the operating data and the wavelet basis function.
[0105] Take the vibration signal of the equipment as an example: the calculation formula is:
[0106] d j,k =∫p i ψ j,k (i)d i
[0107] Among them, j is the wavelet scale; k is the time shift parameter; p i is the vibration signal of the equipment; j,k (i) is the wavelet basis function; d j,k is the first wavelet coefficient; i represents the length of the vibration signal of the equipment.
[0108] S2: Obtaining a device operation signal with a first frequency domain resolution by calculation according to the first wavelet coefficient and the scaling function.
[0109] Take the vibration signal of the equipment as an example: the calculation formula is:
[0110]
[0111] Among them, D j(i) is a device operation signal of a first frequency domain resolution; i is the vibration signal of the equipment; φ j,k (i) is the scale function; d j,k is the first wavelet coefficient; i represents the length of the vibration signal of the equipment.
[0112] In this embodiment, multi-resolution analysis based on wavelet basis functions and scaling functions can more accurately capture the device operation signal of the first frequency domain resolution in the operation data and can better capture the details in the operation data. In addition, it can also ensure that the lengths of the device operation signals with different frequency domain resolutions obtained by decomposition are the same. Therefore, multi-resolution analysis based on wavelet basis functions and scaling functions can better decompose the operation data.
[0113] In one embodiment, performing multi-resolution analysis on the operation data based on the wavelet basis function and / or the scaling function to obtain the device operation signals with different frequency domain resolutions includes:
[0114] S1: Calculate and obtain second wavelet coefficients of a second frequency domain resolution according to the operating data and the scaling function.
[0115] Take the vibration signal of the equipment as an example: the calculation formula is:
[0116] s j,k =∫p i φ j,k d
[0117] Among them, j is the wavelet scale; k is the time shift parameter; p i is the vibration signal; φ j,k is the scale function; s j,k is the second wavelet coefficient; i represents the length of the vibration signal.
[0118] S2: Calculate the device operation signal with a second frequency domain resolution according to the second wavelet coefficients and the scaling function.
[0119] The minimum value of the first frequency domain resolution is greater than or equal to the maximum value of the second frequency domain resolution. For example, the multi-band frequency domain resolution in the first frequency domain resolution is generally [1250Hz, 2500Hz], [2500Hz, 5000Hz] and [5000Hz, 10000Hz], and the second frequency domain resolution is generally [0Hz, 1250Hz].
[0120] Take the vibration signal of the equipment as an example: the calculation formula is:
[0121]
[0122] Among them, D j(i) is a device operation signal of a first frequency domain resolution; i is the vibration signal of the equipment; φ j,k (i) is the scale function; d j,k is the first wavelet coefficient; i represents the length of the vibration signal of the equipment.
[0123] In this embodiment, multi-resolution analysis based on the scaling function can more accurately capture the device operation signal of the second frequency domain resolution in the operation data and can better capture the approximate part of the operation data. In addition, it can ensure that the lengths of the device operation signals with different frequency domain resolutions obtained by decomposition are the same. Therefore, multi-resolution analysis based on the scaling function can better decompose the operation data.
[0124] In one embodiment, the fault diagnosis model includes a feature extraction layer, a first normalization layer, an activation layer, and a pooling layer. The feature extraction layer includes a plurality of different receptive fields. The convolution kernels of the different receptive fields have different sizes. The training samples are input into the fault diagnosis model so that the fault diagnosis model performs feature extraction on the device operation signals of each frequency domain resolution, including:
[0125] S1: Input the training sample into a receptive field that matches the frequency domain resolution of the training sample to obtain the second frequency domain features of each frequency domain resolution. The convolution kernel size of the receptive field is negatively correlated with the frequency domain resolution of the training sample. The scale difference of the second frequency domain features of each frequency domain resolution is greater than the first frequency domain features of each frequency domain resolution.
[0126] Taking the vibration signal of the equipment as an example, when it is a low-frequency vibration signal with a frequency domain resolution between [0Hz, 1250Hz], the corresponding convolution kernel size can be 65; when it is a first high-frequency vibration signal with a frequency domain resolution between [1250Hz, 2500Hz], the corresponding convolution kernel size is 55; when it is a second high-frequency vibration signal with a frequency domain resolution between [2500Hz, 5000Hz], the corresponding convolution kernel size is 45; when it is a third high-frequency vibration signal with a frequency domain resolution between [5000Hz, 10000Hz], the corresponding convolution kernel size is 35.
[0127] Different receptive fields capture different characteristic components. Smaller receptive fields (for example, the receptive field with a convolution kernel size of 35 to 55 in the above-mentioned medium) are mainly used to capture the transient characteristics and harmonic components of the first high-frequency vibration signal, the second high-frequency vibration signal, or the third high-frequency vibration signal (that is, the equipment operation signal of the first frequency domain resolution), while larger receptive fields (for example, the receptive field with a convolution kernel size of 65 in the above-mentioned medium) focus on identifying the fundamental frequency characteristics or overall pattern characteristics of the low-frequency vibration signal (that is, the equipment operation signal of the second frequency domain resolution).
[0128] Specifically, the feature extraction layer can be implemented based on a variable convolution function (i.e., DeformConv1d()). DeformConv1d() can be expressed as:
[0129] DeformConv1d(kernel size ,x)=∑w·x(p0+p n +Δp n )
[0130] Among them, x is the training sample with different frequency domain resolution, kernel size is the size of the convolution kernel, w is the convolution kernel, p n is the basic offset of the convolution kernel; Δp n is the additional offset of the convolution kernel; p0 is the center position of the convolution kernel.
[0131] S2: Input the second frequency domain feature to the first normalization layer to normalize the second frequency domain feature to obtain a third frequency domain feature.
[0132] Specifically, the first normalization layer can be implemented based on a normalization function (ie, Batch_Normalization()).
[0133] S3: Input the third frequency domain feature to the activation layer to perform nonlinear processing on the third frequency domain feature to obtain a fourth frequency domain feature.
[0134] Specifically, the activation layer can be implemented based on an activation function (ie, ReLU()).
[0135] S4: Input the fourth frequency domain feature to a pooling layer to perform dimensionality reduction processing on the fourth frequency domain feature to obtain the first frequency domain feature.
[0136] Specifically, the pooling layer can be implemented based on the maximum pooling function (ie, MaxPool()).
[0137] Take four training samples with different frequency domain resolutions as an example, specifically d1 with a frequency domain resolution between [5000Hz, 10000Hz]; d2 with a frequency domain resolution between [2500Hz, 5000Hz]; d3 with a frequency domain resolution between [1250Hz, 2500Hz] and a1 with a frequency domain resolution between [0HZ, 1225HZ]. For four different training samples with different frequency domain resolutions, the calculation formulas of steps S1 to S4 can be:
[0138] y1=DeformConv1d(L1,d1)
[0139] z1=MaxPool(ReLU(BN(y1)))
[0140] y2=DeformConv1d(L2,d2)
[0141] z2=MaxPool(ReLU(BN(y2)))
[0142] y3=DeformConv1d(L3,d3)
[0143] z3 = MaxaPool(ReLU(BN(y3)))
[0144] y4=DeformConv1d(L4,a1)
[0145] z4 = MaxPool(ReLU(BN(y4)))
[0146] Among them, L1 is the convolution kernel size of the receptive field matching d1 and the preferred value is 35; L2 is the convolution kernel size of the receptive field matching d2 and the preferred value is 45; L3 is the convolution kernel size of the receptive field matching d3 and the preferred value is 55; L4 is the convolution kernel size of the receptive field matching a1 and the preferred value is 65; y1 is the second frequency domain feature of d1; y2 is the second frequency domain feature of d2; y3 is the second frequency domain feature of d3; y4 is the second frequency domain feature of a1; z1 is the second frequency domain feature of d1; z2 is the second frequency domain feature of d2; z3 is the second frequency domain feature of d3; z4 is the second frequency domain feature of a1; DeformConv1d() represents the feature extraction layer mentioned above; BN() represents the first normalization layer mentioned above; ReLU() represents the activation layer mentioned above; MaxPool() represents the pooling layer mentioned above.
[0147] In this embodiment, multiple different receptive fields, first normalization layers, activation layers, and pooling layers can be used to process device operation signals of various frequency resolutions in parallel, and can simultaneously focus on device operation signals of various frequency resolutions. This parallel mechanism can not only focus on the local details of the operation data in each frequency domain resolution, but also can focus on the global structure of the operation data as a whole based on the results of each parallel output. Therefore, the trained fault diagnosis model can have higher adaptability and recognition ability to the first frequency domain features at each frequency domain resolution, thereby providing more powerful and flexible technical support for fault diagnosis.
[0148] In one embodiment, the fault diagnosis model includes a feature fusion layer, a fully connected layer, and a second normalization layer, and outputs a fault prediction result according to the first frequency domain feature, including:
[0149] S1: Input each first frequency domain feature into the feature fusion layer for feature fusion to obtain a fused feature vector.
[0150] S2: The fused feature vector is sequentially input into the fully connected layer and the second normalization layer for processing to obtain a fault prediction result, wherein the fully connected layer and the second normalization layer perform dimensionality reduction and normalization processing on the fused feature vector respectively.
[0151] Specifically, the fully connected layer can be implemented based on a multi-layer perceptron (MLP). The second normalization layer can be implemented based on softmax()
[0152] In this embodiment, the first frequency domain features are fused together through the feature fusion layer to form a more comprehensive feature representation, which helps the fault diagnosis model capture the complex patterns and relationships of the first frequency domain features. The fully connected layer can reduce the dimensionality of the fused feature vector, reduce the number of features, and reduce the complexity of the model, while retaining the most important information as much as possible, thereby improving the generalization ability of the fault diagnosis model. The second normalization layer normalizes the fused feature vector so that the eigenvalues are on the same scale, which helps to optimize the convergence speed of the fault diagnosis model.
[0153] In one embodiment, adjusting the model parameters of the fault diagnosis model based on the loss function until the iteration stop condition is met includes: adjusting the model parameters of the fault diagnosis model according to the loss function and the back propagation algorithm until the iteration stop condition is met.
[0154] The fault diagnosis model can use the back propagation (BP) algorithm to correct the size of the parameters in the initial fault diagnosis model during the training process, so that the reconstruction error loss of the fault diagnosis model becomes smaller and smaller. Specifically, taking the vibration signal of the equipment as the operating data, the vibration signal inputs the fault diagnosis model until the fault diagnosis model is output, which will generate error loss. The parameters in the initial fault diagnosis model are updated by back propagating the error loss information, so that the error loss converges. The back propagation algorithm is a back propagation movement dominated by error loss, aiming to obtain the optimal parameters of the fault diagnosis model.
[0155] For example, if 10 first frequency domain features are extracted now, their initial weights are all 0.1. After the back propagation algorithm and the fault diagnosis model adjusted by the loss function, different weights will be assigned according to the importance of the 10 first frequency domain features after subsequent calculations, so that the fault diagnosis model can identify the first frequency domain feature with the highest weight (more important).
[0156] In this embodiment, adjusting the model parameters of the fault diagnosis model according to the loss function and the back propagation algorithm can make the recognition ability of the fault diagnosis model stronger, thereby improving the accuracy of the fault diagnosis model.
[0157] In one embodiment, the model parameters of the fault diagnosis model can also be adjusted according to back propagation, learning rate scheduling strategy and loss function to improve the convergence speed and stability of the fault diagnosis model.
[0158] In one embodiment, Figure 2 An algorithm framework diagram of a fault diagnosis model training method provided in Example 1 of the present disclosure; Figure 3 This is an experimental comparison diagram of a training method for a fault diagnosis model provided in Example 1 of the present disclosure; combined with Figure 2 and Figure 3 The training method of the fault diagnosis model and the fault diagnosis model obtained by training are analyzed.
[0159] S1: Collect vibration signals of various fault states of rotating machinery ( Figure 2 The one in is 1*2048Y), and the sampling frequency is 20kHz.
[0160] S2: The collected vibration signal is first normalized, and then multi-resolution analysis is performed to decompose the collected vibration signal into vibration signals with different frequency domain resolutions ( Figure 2 1*2048X1; 1*2048X2; 1*2048X3; 1*2048X4).
[0161] S3: The vibration signals with different frequency domain resolutions are cut into samples of 2048 points to randomly classify the vibration signals with different frequency domain resolutions, with 70% of the data used as training samples and 30% of the data used as test samples.
[0162] S4: Send training samples to Figure 2 The fault diagnosis model in is trained and passes through the DeformConv1d layer ( Figure 2 DeformConv1d() in the batch_normalization layer ( Figure 2 BatchNorm(3) in the ReLU layer( Figure 2 ReLU() in the MaxPool layer (( Figure 2 The MaxPool(2,2) in is processed and repeated three times to obtain the first frequency domain features with different frequency domain resolutions ( Figure 2 Z1, Z2, Z3, Z4).
[0163] S5, feature fusion of vibration signals of various frequency domain resolutions ( Figure 2 The fused vector is passed through the fully connected layer ( Figure 2Fully connected layer) and softmax( Figure 2 The Softmax layer in ( ) is used to process the fault prediction result;
[0164] S6: Calculate the first information entropy (( Figure 2 I α (X1, Z1), I α (X2, Z2), I α (X3, Z3), I α (X4, Z4));
[0165] S7: According to the first information entropy ( Figure 2 The information entropy in the fault annotation result ( Figure 2 Labels in), the fault prediction results ( Figure 2 Output in ) to construct a loss function to calculate the total loss, and adjust the model parameters of the fault diagnosis model based on the total loss until the iteration stop condition is met to obtain the trained fault diagnosis model. It can also be based on the fault labeling results ( Figure 2 Labels in), the fault prediction results ( Figure 2 Output) calculates the cross entropy ( Figure 2 The cross entropy in ), and then according to the first information entropy ( Figure 2 Information entropy in ) and cross entropy ( Figure 2 The total loss is calculated using the cross entropy in .
[0166] In order to further illustrate the performance superiority of the fault diagnosis model obtained by the training method of the fault diagnosis model based on the present disclosure, the present disclosure selected four models including CNN (convolutional neural network), DWT-CNN (discrete wavelet transform signal processing + convolutional neural network), MSCNN (multi-scale convolutional neural network) and RWKDCAE (residual wide kernel deep convolutional autoencoder) for comparison. These four models all use the same training set and test set as the fault diagnosis model of the present disclosure. These four models all have 5 layers of convolutional neural network, and the last Level 3 and Level 4 represent the decomposition level of multi-resolution analysis. The five network models all passed 10 random experiments, and the results were averaged. The fault diagnosis results are shown in the figure. Figure 2 As shown. Figure 3 It can be seen from the data that the present invention is superior to the four compared models in a strong noise environment. When the decomposition level in the table is 3 or 4, the data of the fault diagnosis model of the present invention is lower than the other four data, indicating that when the decomposition level is 3 or 4, the key features in the vibration signal have been decomposed and are relatively easy to be extracted by the fault diagnosis model.
[0167] Example 2
[0168] In order to better apply the fault diagnosis model trained in the fault diagnosis model training method of Example 1, the present disclosure provides a fault diagnosis model diagnosis method. The fault diagnosis model diagnosis method includes:
[0169] The device operation signals of the device to be detected with different frequency domain resolutions are input into the fault diagnosis model to obtain the fault diagnosis result of the device to be detected; wherein, the fault diagnosis model is trained by the training method of the fault diagnosis model in Example 1.
[0170] In this embodiment, the device operation signals of the device to be detected with different frequency domain resolutions are input into the fault diagnosis model trained by the training method of the fault diagnosis model, so that the fault diagnosis result of the device to be detected can be obtained more accurately.
[0171] Example 3
[0172] Corresponding to the above-mentioned embodiments of the method for training a fault diagnosis model, the present disclosure also provides embodiments of a system for training a fault diagnosis model. Figure 4 A module diagram of a fault diagnosis model training system provided in Embodiment 3 of the present disclosure. The fault diagnosis model training system includes:
[0173] The first acquisition module 41 is used to acquire training samples, wherein the training samples include equipment operation signals of different frequency domain resolutions, wherein the equipment operation signals of each frequency domain resolution are annotated with fault annotation results.
[0174] The extraction module 42 is used to input the training samples into the fault diagnosis model so that the fault diagnosis model can perform feature extraction on the equipment operation signal of each frequency domain resolution, obtain the first frequency domain features corresponding to each frequency domain resolution, and output the fault prediction result according to the first frequency domain features.
[0175] The calculation module 43 is used to respectively calculate the first information entropy between the device operation signal of each frequency domain resolution and its corresponding first frequency domain feature.
[0176] The adjustment module 44 is used to construct a loss function according to the first information entropy, the fault labeling result, and the fault prediction result, and adjust the model parameters of the fault diagnosis model based on the loss function until an iteration stop condition is met.
[0177] Optionally, the first acquisition module 41 includes:
[0178] A first calculation unit, configured to calculate a first wavelet coefficient of a first frequency domain resolution according to the operating data and the wavelet basis function;
[0179] A second calculation unit, configured to calculate a device operation signal with the first frequency domain resolution according to the first wavelet coefficient and the scaling function;
[0180] and / or;
[0181] A third calculation unit, configured to calculate a second wavelet coefficient of a second frequency domain resolution according to the operating data and the scaling function;
[0182] a fourth calculation unit, configured to calculate the device operation signal of the second frequency domain resolution according to the second wavelet coefficient and the scaling function;
[0183] The minimum value of the first frequency domain resolution is greater than or equal to the maximum value of the second frequency domain resolution.
[0184] Optionally, the first acquisition module 41 includes:
[0185] An analysis unit, configured to perform multi-resolution analysis on the operation data based on a wavelet basis function and / or a scaling function to obtain the device operation signals with different frequency domain resolutions;
[0186] A construction unit is used to construct the training samples according to the device operation signals with different frequency domain resolutions.
[0187] Optionally, the analysis unit comprises:
[0188] A first calculation component, used for calculating a first wavelet coefficient of a first frequency domain resolution according to the operating data and the wavelet basis function;
[0189] A second calculation component is used to calculate the device operation signal of the first frequency domain resolution according to the first wavelet coefficient and the scaling function;
[0190] and / or;
[0191] A third calculation component, configured to calculate a second wavelet coefficient of a second frequency domain resolution according to the operating data and the scale function;
[0192] a fourth calculation component, configured to calculate the device operation signal of the second frequency domain resolution according to the second wavelet coefficients and the scaling function;
[0193] The minimum value of the first frequency domain resolution is greater than or equal to the maximum value of the second frequency domain resolution.
[0194] Optionally, the fault diagnosis model includes a feature extraction layer, a first normalization layer, an activation layer and a pooling layer. The feature extraction layer includes a plurality of different receptive fields. The extraction module 42 includes:
[0195] A first input unit is used to input the training sample into a receptive field that matches the frequency domain resolution of the training sample to obtain the second frequency domain features of each frequency domain resolution. The convolution kernel size of the receptive field is negatively correlated with the frequency domain resolution of the training sample. The scale difference of the second frequency domain features of each frequency domain resolution is greater than the first frequency domain features of each frequency domain resolution.
[0196] The second input unit is used to input the second frequency domain feature to the first normalization layer to normalize the second frequency domain feature to obtain a third frequency domain feature.
[0197] The third input unit is used to input the third frequency domain feature into the activation layer to perform nonlinear processing on the third frequency domain feature to obtain a fourth frequency domain feature.
[0198] The fourth input unit is used to input the fourth frequency domain feature into the pooling layer to perform dimensionality reduction processing on the fourth frequency domain feature to obtain the first frequency domain feature.
[0199] Optionally, the extraction module 42 further includes:
[0200] The fusion unit is used to input each of the first frequency domain features into the feature fusion layer for feature fusion to obtain a fused feature vector.
[0201] A processing unit is used to input the fused feature vector into the fully connected layer and the second normalization layer in sequence for processing to obtain the fault prediction result. The fully connected layer and the second normalization layer perform dimensionality reduction and normalization processing on the fused feature vector respectively.
[0202] Optionally, the adjustment module 44 includes:
[0203] An adjustment unit is used to adjust the model parameters of the fault diagnosis model according to the loss function and the back propagation algorithm until an iteration stop condition is met.
[0204] Example 4
[0205] Corresponding to the embodiment of the diagnostic method of the aforementioned fault diagnosis model, the present disclosure also provides an embodiment of a diagnostic system of the fault diagnosis model. The diagnostic system of the fault diagnosis model includes:
[0206] A diagnostic module is used to input device operation signals of different frequency domain resolutions of the device to be detected into the fault diagnosis model to obtain the fault diagnosis results of the device to be detected; wherein, the fault diagnosis model is trained by the training method of the fault diagnosis model described in any one of the above.
[0207] As for the system embodiment, since it basically corresponds to the method embodiment, the relevant parts can refer to the partial description of the method embodiment. The system embodiment described above is only illustrative, wherein the units described as separate components may or may not be physically separated, and the components as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the disclosed solution.
[0208] Example 5
[0209] Figure 5 This is a structural schematic diagram of an electronic device shown in Example 5 of the present disclosure, wherein the electronic device includes a memory, a processor, and a computer program stored in the memory and used to run on the processor, and when the processor executes the computer program, it implements the training method of the fault diagnosis model provided in Example 1 or the diagnosis method of the fault diagnosis model provided in Example 2. Figure 5 The electronic device 50 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0210] like Figure 5 As shown, the electronic device 50 may be in the form of a general-purpose computing device, for example, it may be a server device. The components of the electronic device 50 may include, but are not limited to: at least one processor 51, at least one memory 52, and a bus 53 connecting different system components (including the memory 52 and the processor 51).
[0211] The bus 53 includes a data bus, an address bus, and a control bus.
[0212] The memory 52 may include a volatile memory, such as a random access memory (RAM) 521 and / or a cache memory 522 , and may further include a read-only memory (ROM) 523 .
[0213] The memory 52 may also include a program tool 525 (or utility) having a set (at least one) of program modules 524, such program modules 524 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of which may include the implementation of a network environment.
[0214] The processor 51 executes various functional applications and data processing by running the computer program stored in the memory 52, such as the training method of the fault diagnosis model provided in Example 1 or the diagnosis method of the fault diagnosis model provided in Example 2.
[0215] The electronic device 50 may also communicate with one or more external devices 54 (e.g., keyboards, pointing devices, etc.). Such communication may be performed via an input / output (I / O) interface 55. Furthermore, the electronic device 50 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter 56. As shown, the network adapter 56 communicates with other modules of the electronic device 50 via a bus 53. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 50, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID (disk array) systems, tape drives, and data backup storage systems, etc.
[0216] It should be noted that although several units / modules or sub-units / modules of the electronic device are mentioned in the above detailed description, this division is merely exemplary and not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more units / modules described above can be embodied in one unit / module. Conversely, the features and functions of one unit / module described above can be further divided into multiple units / modules to be embodied.
[0217] Although the specific embodiments of the present disclosure are described above, those skilled in the art should understand that this is only an example, and the protection scope of the present disclosure is defined by the appended claims. Those skilled in the art may make various changes or modifications to these embodiments without departing from the principles and essence of the present disclosure, but these changes and modifications all fall within the protection scope of the present disclosure.
Claims
1. A method for training a fault diagnosis model, characterized in that: The training method comprises: Acquire training samples, wherein the training samples include device operation signals with different frequency domain resolutions; wherein the device operation signals of each frequency domain resolution are annotated with fault annotation results; Input the training samples into the fault diagnosis model, so that the fault diagnosis model can extract features of the equipment operation signals of each frequency domain resolution, obtain first frequency domain features corresponding to each frequency domain resolution, and output fault prediction results according to the first frequency domain features; Calculate the first information entropy between the device operation signal of each frequency domain resolution and its corresponding first frequency domain feature respectively; A loss function is constructed according to the first information entropy, the fault labeling result, and the fault prediction result, and model parameters of the fault diagnosis model are adjusted based on the loss function until an iteration stop condition is met.
2. The training method according to claim 1, characterized in that: The step of obtaining training samples comprises: Obtain equipment operation data; Performing multi-resolution analysis on the operation data based on wavelet basis functions and / or scaling functions to obtain the equipment operation signals with different frequency domain resolutions; The training samples are constructed according to the device operation signals with different frequency domain resolutions.
3. The training method according to claim 2, characterized in that: The performing multi-resolution analysis on the operation data based on the wavelet basis function and / or the scaling function to obtain the device operation signals with different frequency domain resolutions comprises: Calculate and obtain first wavelet coefficients of a first frequency domain resolution according to the operating data and the wavelet basis function; Obtaining a device operation signal with the first frequency domain resolution by calculation according to the first wavelet coefficient and the scaling function; and / or; Calculate the second wavelet coefficients of the second frequency domain resolution according to the operating data and the scaling function; Calculate the device operation signal of the second frequency domain resolution according to the second wavelet coefficient and the scaling function; The minimum value of the first frequency domain resolution is greater than or equal to the maximum value of the second frequency domain resolution.
4. The training method according to claim 1, characterized in that: The fault diagnosis model includes a feature extraction layer, a first normalization layer, an activation layer, and a pooling layer; the feature extraction layer includes a plurality of different receptive fields; the convolution kernels of the different receptive fields have different sizes; the training samples are input into the fault diagnosis model so that the fault diagnosis model extracts features from the equipment operation signals of each frequency domain resolution, including: The training sample is input into a receptive field that matches the frequency domain resolution of the training sample to obtain the second frequency domain features of each frequency domain resolution; the convolution kernel size of the receptive field is positively correlated with the frequency domain resolution of the training sample; the scale difference of the second frequency domain features of each frequency domain resolution is greater than the first frequency domain features of each frequency domain resolution; Inputting the second frequency domain feature into the first normalization layer to normalize the second frequency domain feature to obtain a third frequency domain feature; Inputting the third frequency domain feature into the activation layer to perform nonlinear processing on the third frequency domain feature to obtain a fourth frequency domain feature; The fourth frequency domain feature is input into a pooling layer to perform dimension reduction processing on the fourth frequency domain feature to obtain the first frequency domain feature.
5. The training method according to any one of claims 1 to 4, characterized in that: The fault diagnosis model includes a feature fusion layer, a fully connected layer, and a second normalization layer. The outputting of the fault prediction result according to the first frequency domain feature includes: Inputting each of the first frequency domain features into a feature fusion layer for feature fusion to obtain a fused feature vector; The fused feature vector is sequentially input into the fully connected layer and the second normalization layer for processing to obtain the fault prediction result; wherein the fully connected layer and the second normalization layer perform dimensionality reduction and normalization processing on the fused feature vector respectively.
6. The training method according to claim 1, characterized in that: The adjusting the model parameters of the fault diagnosis model based on the loss function until an iteration stop condition is met includes: The model parameters of the fault diagnosis model are adjusted according to the loss function and the back propagation algorithm until an iteration stop condition is met.
7. A diagnostic method for a fault diagnosis model, characterized in that: The diagnostic method comprises: The device operation signals of the device to be detected with different frequency domain resolutions are input into the fault diagnosis model to obtain the fault diagnosis result of the device to be detected; wherein the fault diagnosis model is trained by the training method of the fault diagnosis model described in any one of claims 1-6.
8. A training system for a fault diagnosis model, characterized in that: The training system comprises: A first acquisition module is used to acquire training samples, wherein the training samples include equipment operation signals with different frequency domain resolutions; wherein the equipment operation signals of each frequency domain resolution are annotated with fault annotation results; An extraction module, used for inputting training samples into the fault diagnosis model, so that the fault diagnosis model performs feature extraction on the equipment operation signal of each frequency domain resolution, obtains a first frequency domain feature corresponding to each frequency domain resolution, and outputs a fault prediction result according to the first frequency domain feature; A calculation module, used to respectively calculate the first information entropy between the device operation signal of each frequency domain resolution and its corresponding first frequency domain feature; An adjustment module is used to construct a loss function according to the first information entropy, the fault labeling result, and the fault prediction result, and adjust the model parameters of the fault diagnosis model based on the loss function until an iteration stop condition is met.
9. A diagnostic system for a fault diagnosis model, characterized in that: The fault diagnosis system comprises: A diagnostic module, used to input device operation signals of different frequency domain resolutions of the device to be detected into the fault diagnosis model to obtain the fault diagnosis results of the device to be detected; wherein the fault diagnosis model is trained by the training method of the fault diagnosis model described in any one of claims 1-6.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and used to run on the processor, characterized in that: When the processor executes the computer program, the training method of the fault diagnosis model described in any one of claims 1 to 6 or the diagnosis method of the fault diagnosis model described in claim 7 is implemented.