Lightweight online residual life prediction method, apparatus and device, and medium
By using multi-wavelet-based wavelet packet transformation and deep convolutional neural network in the remaining life prediction of bearings, combined with knowledge distillation technology, lightweight student models are designed, and the problems of poor high-frequency noise and adaptability in the existing technology are solved, and efficient and interpretable online prediction is achieved.
Patent Information
- Application Number
- CN202510158698.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-13
- Publication Date
- 2025-06-13
AI Technical Summary
The prior art has high-frequency noise problems in the prediction of bearing residual life, the noise reduction method has poor adaptability, and the deep learning model training time is long and lacks interpretability.
A deep convolutional neural network model is constructed based on multi-wavelet basis wavelet package transformation, and a lightweight student model is designed in combination with knowledge distillation to realize online residual life prediction.
The interpretability and training speed of the model are improved, and a lightweight student model is obtained, suitable for online prediction needs, while enhancing the ability to extract frequency domain features.
Smart Images

Figure CN120144947A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of bearing remaining life prediction, and particularly to a lightweight online remaining life prediction method, device, equipment and medium. Background Art
[0002] Remaining useful life (RUL) prediction is the core of predictive maintenance (PDM), which aims to estimate how long a machine or equipment can still operate before it needs repair or replacement. Prognostics and Health Management (PHM) technology is an important technical means to achieve condition-based maintenance, improve system reliability and reduce maintenance costs. It involves two aspects of fault prediction and health management, including real-time status monitoring, fault discrimination, health prediction, auxiliary decision-making and resource management, etc.
[0003] However, the vibration data obtained by sensors itself contains a large amount of high-frequency noise, which needs to be preprocessed by noise reduction before training. Traditional noise reduction methods such as Fourier transform and wavelet threshold denoising rely on prior knowledge as support and have poor adaptability. If the method of training a deep learning model is adopted, on the one hand, existing prediction methods need to learn a large number of parameters and the prediction time is long, which cannot meet the requirements of online implementation of prediction; on the other hand, the neural network selects parameters in a black box manner and lacks interpretability. Summary of the Invention
[0004] To solve at least one of the technical problems existing in the prior art to a certain extent, the purpose of the present invention is to provide an interpretable lightweight online remaining life prediction method, device, equipment and medium.
[0005] The first technical solution adopted by the present invention is as follows:
[0006] A lightweight online remaining life prediction method includes the following steps:
[0007] Based on wavelet packet transform with multi-wavelet bases, construct and train a teacher model for extracting RUL information of data in different time-frequency domains;
[0008] Based on knowledge distillation, design a lightweight student model of the same type as the teacher model for facilitating knowledge transfer;
[0009] Conduct knowledge distillation in stages, transfer the feature extraction ability obtained by training the teacher model to the student model of the same type, and obtain a lightweight student model for online remaining life prediction.
[0010] Further, the teacher model includes a frequency domain feature extractor, a time domain feature extractor and a non-linear fully connected layer, and its working mode is:
[0011] The vibration signals obtained from the industrial production process are intercepted into horizontal and vibration signals of the same length through the sliding window sampling method, and are successively sent into three modules: a frequency domain feature extractor, a time domain feature extractor, and a non-linear fully connected layer, and the RUL prediction value is calculated;
[0012] Among them, the frequency domain feature extractor is based on the principle of wavelet packet transform, uses multi-wavelet bases to perform in-depth feature extraction on the signal, adaptively selects appropriate wavelet bases for feature extraction to improve the expression ability of the frequency domain feature extractor, and at the same time can also eliminate the operations of manually selecting wavelet bases and data denoising preprocessing.
[0013] Furthermore, the frequency domain feature extractor is implemented by using a deep convolutional neural network module based on wavelet packet decomposition with multi-wavelet bases, and a convolutional module is constructed in the way of grouped convolution to avoid the mutual interference of information between each frequency domain channel and affect the interpretability of the model;
[0014] The time domain feature extractor is implemented by using a time series feature extraction module based on spatio-temporal double cell states.
[0015] Furthermore, the working mode of the deep convolutional neural network module is as follows:
[0016] The two-channel vibration signals containing horizontal and vertical information are respectively convolved one-dimensionally with four filters to obtain information of two groups of 4 channels in horizontal and vertical directions; the four filters are the high-frequency and low-frequency filters of db6 and the high-frequency and low-frequency filters of sym6;
[0017] Adjust the channel order to obtain two groups of one-dimensional information of 4 channels based on two wavelet bases of db6 and sym6, and convert them into two-channel two-dimensional pictures;
[0018] Construct the high-frequency and low-frequency convolution kernels of db6 and the high-frequency and low-frequency convolution kernels of sym6 in the way of stacking one-dimensional convolution kernels, and respectively perform two-dimensional convolution with the channels obtained from the previous convolution to obtain two-dimensional pictures of four channels, and recombine them to obtain two-dimensional pictures of db6 and sym6 dual channels;
[0019] Extend the convolution kernel to have the same height as the picture, and repeat the convolution operation to achieve deep convolution.
[0020] Furthermore, the student model is constructed in the mode of frequency domain feature extractor + time domain feature extractor + non-linear fully connected layer, and has the same or similar dimensional output as the intermediate layer of the teacher model to ensure the smooth progress of knowledge distillation between models, and at the same time make the student model more interpretable.
[0021] Further, based on knowledge distillation, a lightweight student model of the same type as the teacher model is designed, including:
[0022] Pruning the teacher model based on knowledge distillation to obtain an interpretable lightweight student model:
[0023] Combining the gradient descent algorithm to implement the knowledge distillation operation. First, the confidence of the teacher model is calculated, and the calculation formula is as follows:
[0024] Square error range:
[0025] η=max{(P i -R i ) 2}-min{(P i -R i ) 2}
[0026] Confidence of the current teacher model output (batch):
[0027]
[0028] Among them, P i and R i respectively represent the predicted value and the true value of the i-th output; P and R represent the predicted value and the true value of the current input;
[0029] By calculating the confidence, the degree of certainty of the model for the current output is obtained. For the output of the intermediate layer, the mean squared error loss (MSE) is used to calculate the distribution difference between the output of the teacher model and the student model, and the gradient descent algorithm is adopted to narrow the distribution difference to achieve knowledge distillation:
[0030] Mean squared error calculation formula:
[0031]
[0032] In the formula, T i represents the intermediate layer output of the teacher model, and S i represents the corresponding intermediate layer output of the student model; N is the output dimension of the intermediate layer;
[0033] Intermediate layer loss function:
[0034]
[0035] Since the intermediate layer outputs of the teacher model and the student model are not exactly the same, zero padding is used for the output of the student model; for the output of the last layer of the student model, in addition to fitting the predicted value of the teacher model, the true value also needs to be fitted. Therefore, the loss function of this layer consists of two parts:
[0036] Loss of the student model with respect to the teacher model (soft label loss):
[0037]
[0038] Wherein, TP i is the prediction value of the teacher model, and SP i is the prediction value of the student model;
[0039] Loss of the student model with respect to the true value (hard label loss):
[0040] Loss hard =(SP i -R i ) 2
[0041] Wherein, R i represents the true RUL value;
[0042] Loss function of the last layer:
[0043] Loss last =εLoss soft +(1 - ε)Loss hard
[0044] Wherein, ε is a coefficient.
[0045] Furthermore, the knowledge distillation is carried out in stages to transfer the feature extraction ability obtained by training the teacher model to a student model of the same type, including:
[0046] Through knowledge distillation in three stages: the frequency domain feature extractor fitting stage, the time series feature extractor fitting stage, and the global parameter fine-tuning stage, the student model learns the frequency domain feature extraction ability, the time domain feature extraction ability, and the ability to integrate and summarize the extracted features of the teacher model respectively.
[0047] The second technical solution adopted by the present invention is:
[0048] A lightweight online remaining useful life prediction device, comprising:
[0049] A teacher model construction module, configured to construct and train a teacher model based on wavelet packet transform with multi-wavelet bases for extracting RUL information of data in different time-frequency domains;
[0050] A student model construction module, configured to design a lightweight student model of the same type as the teacher model based on knowledge distillation for facilitating knowledge transfer;
[0051] A segmented knowledge distillation module, which is used to perform knowledge distillation in stages, transfer the feature extraction ability obtained by training the teacher model to a student model of the same type, and obtain a lightweight student model for online remaining useful life prediction.
[0052] The third technical solution adopted by the present invention is:
[0053] An electronic device, the electronic device includes a processor and a memory, and at least one instruction, at least one program, a code set or an instruction set is stored in the memory, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement the above-mentioned lightweight online remaining useful life prediction method.
[0054] The fourth technical solution adopted by the present invention is:
[0055] A computer-readable storage medium, and at least one instruction, at least one program, a code set or an instruction set is stored in the storage medium, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by a processor to implement the above-mentioned lightweight online remaining useful life prediction method.
[0056] The fifth technical solution adopted by the present invention is:
[0057] A computer program product or a computer program, the computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. The processor of the computer device can read the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions to enable the computer device to execute the above method.
[0058] Compared with the prior art, the present invention has the following beneficial effects:
[0059] (1) The present invention constructs a deep convolutional neural network module based on wavelet packet transform with multiple wavelet bases, making the model more interpretable, and there is no need to select wavelet bases with prior knowledge. The model can adaptively select appropriate wavelet bases for feature extraction, simplifies the model training process, and at the same time enables the model to extract richer frequency domain features.
[0060] (2) The present invention uses the knowledge distillation algorithm to distill the knowledge of the teacher model to the student model. On the one hand, the homogeneous model structure and the existing wavelet theory support make the distilled student model more interpretable; on the other hand, the model is more lightweight after effective pruning, and the training and prediction speeds are significantly improved, which better meets the requirements of online RUL prediction. Description of the Drawings
[0061] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following introduces the accompanying drawings of the relevant technical solutions in the embodiments of the present invention or the prior art. It should be understood that the accompanying drawings in the following introduction are only for clearly expressing some embodiments of the technical solutions in the present invention for convenience. For those skilled in the art, without creative efforts, other accompanying drawings can also be obtained based on these drawings.
[0062] Figure 1 is the flowchart of the steps of a lightweight online remaining useful life prediction method in an embodiment of the present invention;
[0063] Figure 2 is the overall view of offline and online RUL prediction in an embodiment of the present invention;
[0064] Figure 3 is the prediction flowchart of a lightweight online remaining useful life prediction method in an embodiment of the present invention;
[0065] Figure 4 is the schematic diagram of the horizontal vibration signal and the vertical vibration signal in an embodiment of the present invention;
[0066] Figure 5 is the graph of the loss decline result of training the teacher model in an embodiment of the present invention;
[0067] Figure 6 is the schematic diagram of the prediction result of the teacher model in an embodiment of the present invention;
[0068] Figure 7 is the schematic diagram of the prediction result of the student model in an embodiment of the present invention. Detailed Embodiment
[0069] The following details the embodiments of the present invention. The examples of the embodiments are shown in the accompanying drawings, where the same or similar reference numerals represent the same or similar elements or elements with the same or similar functions from beginning to end. The embodiments described below by referring to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as a limitation to the present invention. For the step numbers in the following embodiments, they are only set for convenience of elaboration and explanation, and no limitation is imposed on the order between the steps. The execution order of each step in the embodiments can be adaptively adjusted according to the understanding of those skilled in the art.
[0070] In the description of the present invention, it should be understood that for the orientation description, such as the orientation or positional relationship indicated by up, down, front, back, left, right, etc., is based on the orientation or positional relationship shown in the accompanying drawings. It is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be construed as a limitation to the present invention.
[0071] In the description of the present invention, "several" means one or more, "multiple" means more than two, and understandings such as "greater than", "less than", "exceeding", etc. do not include the present number, and understandings such as "above", "below", "within", etc. include the present number. If "first" and "second" are described, they are only for the purpose of distinguishing technical features and cannot be understood as indicating or implying relative importance or implicitly indicating the quantity of the indicated technical features or implicitly indicating the sequence relationship of the indicated technical features.
[0072] In the description of the present invention, unless otherwise clearly defined, words such as "set", "install", "connect", etc. should be understood in a broad sense, and those skilled in the art can reasonably determine the specific meanings of the above words in the present invention in combination with the specific content of the technical solution.
[0073] Term Explanation:
[0074] RUL: Abbreviation of Remaining Useful Life, remaining useful life.
[0075] Aiming at the existing technical problems, based on wavelet packet transform and combined with the method of knowledge distillation, the present invention proposes a lightweight online remaining useful life prediction scheme. 1) Use a deep convolutional neural network based on multi-wavelet basis to replace traditional wavelet denoising and participate in constructing a teacher model to extract information of data in different time-frequency domains; 2) Through knowledge distillation, integrate wavelet packet transform into knowledge distillation and design isomorphic teacher and student models to facilitate knowledge transfer; 3) Conduct knowledge distillation in stages, transfer the feature extraction ability obtained by training the teacher model to the isomorphic student model, ensure that each module of the student model can fully learn the knowledge of the teacher model, and improve the interpretability of the model. This scheme can effectively improve the interpretability of the model and obtain a lightweight student model at the same time, which is suitable for online remaining useful life prediction.
[0076] Embodiment 1
[0077] As Figure 1 、 Figure 2 and Figure 3 shown, this embodiment provides a lightweight online remaining useful life prediction method, which uses a deep convolutional neural network based on multi-wavelet basis to extract frequency domain features and uses knowledge distillation to distill the feature extraction ability into the student model. On the one hand, it speeds up the feature extraction speed in the frequency domain, and on the other hand, makes the student model more interpretable. While solving the problem of insufficient computing power, it realizes timely calculation feedback and provides a solution for fast RUL online prediction. The method specifically includes the following steps:
[0078] S1. Based on wavelet packet transform of multi-wavelet basis, construct and train a teacher model for extracting RUL information of data in different time-frequency domains.
[0079] The teacher model is implemented by a deep convolutional neural network based on multi-wavelet basis wavelet packet transform. The teacher model uses the method of time-frequency domain feature extraction to analyze and represent the dual features of the signal in the time and frequency domains, and then calculates the RUL value through the fully connected layer. The frequency domain feature extractor is based on the principle of wavelet packet transform, uses multi-wavelet basis to perform deep feature extraction on the signal, and adaptively selects the appropriate wavelet basis for feature extraction, which can improve the expression ability of the frequency domain feature extractor, and at the same time save the operation of manually selecting wavelet basis and data denoising preprocessing. The teacher model provides a basis for the online prediction of the student model through the training of a large number of parameters.
[0080] A CNN network (i.e., deep convolutional neural network module) based on multi-wavelet basis wavelet packet transform proposed in the present embodiment uses high-pass and low-pass filter coefficients of multiple wavelet bases (such as db6, sym6) as convolution kernels to achieve frequency domain feature extraction with interpretability. In the subsequent training of the model, according to the gradient descent algorithm, the model will adaptively fuse various frequency domain information to improve the accuracy of prediction. In addition, this module has scalability and can be extended to more wavelet bases when implemented. Since the final prediction task is carried out in the student model, this expansion will not have much impact on the speed of use of the actual model.
[0081] In some embodiments, the deep convolutional neural network module works as follows:
[0082] The dual-channel vibration signal containing horizontal and vertical information is convolved in one dimension with filters of different wavelet bases to obtain information of two groups of four channels, horizontal and vertical; the filters are exemplified by the high-frequency and low-frequency filters of db6 and the high-frequency and low-frequency filters of sym6;
[0083] Adjust the channel order to obtain two groups of 4-channel one-dimensional information based on the two wavelet bases db6 and sym6, and convert them into two-channel two-dimensional images;
[0084] The high-frequency and low-frequency convolution kernels of db6 and the high-frequency and low-frequency convolution kernels of sym6 are constructed by stacking one-dimensional convolution kernels, and two-dimensional convolution is performed with the channels obtained by the previous convolution to obtain two-dimensional images of four channels, which are then recombined to obtain two-dimensional images of the db6 and sym6 dual channels;
[0085] Extend the convolution kernel so that it has the same height as the image, and repeat the convolution operation to achieve deep convolution.
[0086] It should be noted that in addition to using the high-frequency and low-frequency filters of db6 and the high-frequency and low-frequency filters of sym6, you can also choose filters based on other wavelet bases, but the length of the filter coefficients must be consistent; the number of wavelet bases can also be appropriately expanded, and the same method can be used to expand the image channel to N dimensions, and the number of types of N-dimensional wavelet bases can be sufficient.
[0087] S2. Design a lightweight student model with the same architecture as the teacher model based on knowledge distillation for facilitating knowledge transfer.
[0088] Based on knowledge distillation, design a lightweight student model with the same architecture as the teacher model. The student model also adopts the mode of time-frequency domain feature extractor + fully connected layer, and at the same time has the same / approximate dimensional output as the intermediate layer of the teacher model, ensuring the smooth progress of knowledge distillation between models and making the student model more interpretable. In addition, the number of layers of each module in the student model is relatively shallow and the computational complexity is also low, meeting the requirements of lightweight online deployment.
[0089] The student model adopts the same model architecture as the teacher model, making the process of knowledge distillation smoother and more interpretable. Verified by experiments, the training speed and prediction inference speed of the student model are significantly higher than those of the teacher model, and it can achieve the prediction accuracy of the teacher model, meeting the lightweight requirements of online prediction. The student model adopts a multi-channel fusion CNN structure in the frequency domain feature extraction layer, and the depths of the time series feature extraction layer and the fully connected layer are lower than those of the teacher model, while maintaining the same or approximate dimensional output as the teacher model.
[0090] S3. Conduct knowledge distillation in stages to transfer the feature extraction ability obtained from training the teacher model to the student model with the same architecture, and obtain a lightweight student model for online remaining useful life prediction.
[0091] Based on the above-mentioned model design structure of frequency domain feature extractor + time domain feature extractor + fully connected layer, propose a staged knowledge distillation method. Through three stages of knowledge distillation, the student model can learn the frequency domain feature extraction ability, time domain feature extraction ability, and the ability to integrate and summarize the extracted features of the teacher model respectively. During the training process of the student model, the prediction results of the teacher model will also participate in the calculation of the loss function, rather than simply relying on the input data, which reduces the possibility of overfitting to a certain extent.
[0092] Specifically, the three stages include: the frequency-domain feature extractor fitting stage, the time-series feature extractor fitting stage, and the global parameter fine-tuning stage. In the first two stages, the method of fitting the output of the intermediate layer is adopted. In the third stage, a loss function is designed based on the gap between the predicted values of the student model, the predicted values of the teacher model, and the true RUL value. In the first stage, the parameters of the last two layers are fixed, and only the parameters of the first layer are updated; in the second stage, the parameters of the last layer are fixed, and the parameters of the first two layers are updated; in the third stage, all parameters are updated. In the loss function, the error of the predicted result of the student model relative to the true value (hard error) and the error relative to the predicted result of the teacher model (soft error) are calculated simultaneously, and the weights of the two are set according to the confidence of the teacher model. While improving the prediction accuracy of the student model, it can also effectively improve its generalization ability and reduce the occurrence of overfitting.
[0093] The method of this embodiment will be described in detail below in conjunction with specific embodiments.
[0094] This embodiment provides a lightweight online remaining useful life prediction method, including the following steps:
[0095] Step 1: Construct a teacher model based on wavelet packet transform with multiple wavelet bases.
[0096] The teacher model of this embodiment consists of three parts: a deep convolutional neural network module based on wavelet packet decomposition with multiple wavelet bases, a time-series feature extraction module based on spatio-temporal double cell states (ST-DCSN), and a non-linear fully connected layer. The vibration signals obtained from the industrial production process are intercepted into horizontal and vibration signals of the same length through the sliding window sampling method and fed into the above three modules in sequence, and the RUL prediction value can be calculated.
[0097] The existing wavelet theory is derived from the Fourier transform. Compared with the Fourier transform, wavelet transform can extract local frequency-domain features, that is, it retains the time-domain features and is more conducive to signal analysis. The transformation formulas of the two are as follows:
[0098] Fourier transform:
[0099] F(ω) = ∫f(x)e -iωx d
[0100] Continuous wavelet transform (CWT):
[0101] Wavelet function:
[0102]
[0103] Continuous wavelet transform:
[0104]
[0105] Among them, a is the scaling factor and b is the displacement factor, which respectively control the frequency domain and time domain of the wavelet function to obtain the time-frequency domain information of the signal; denote the conjugate of
[0106] The continuous wavelet transform can obtain the information of a continuous signal in the continuous frequency domain. However, the signals processed by a computer are discrete signals. To improve the operation speed, the discrete wavelet transform (DWT) was proposed by predecessors. Here, the Haar wavelet basis is taken as an example:
[0107] Haar wavelet basis:
[0108] Scaling function:
[0109]
[0110] Detail function:
[0111]
[0112] Discretize the scale coefficient values of the wavelet function into an exponential form with base 2:
[0113] Scaling function:
[0114]
[0115] Detail function:
[0116]
[0117] After discretizing the wavelet function, convolve it with the original signal to obtain the wavelet coefficients:
[0118] Approximation coefficients:
[0119] x j,k = ∑f(t)φ j,k (t)
[0120] Detail coefficients:
[0121] d j,k = ∑f(t)ψ j,k (t)
[0122] Since the frequency values are powers of two, there is a recurrence relationship in the linear spaces spanned by the two functions of high and low frequencies:
[0123] Approximation subspace:
[0124]
[0125] Detail subspace:
[0126]
[0127] Recursive relationship:
[0128]
[0129] Therefore, after performing n-level discrete wavelet decomposition on the signal, the following relationship can be obtained:
[0130] f(t) = ∑ k a 0,k φ 0,k +∑ j ∑ k d j,k ψ j,k
[0131] In the actual processing process, a fixed convolution kernel and downsampling are often used. Starting from the highest frequency, the approximate information and detail information of the signal are obtained, and then the approximate information is recursively decomposed to achieve the same effect:
[0132] Discretization of the Haar wavelet basis approximation function (father wavelet, low-pass filter):
[0133]
[0134] Discretization of the Haar wavelet basis detail function (mother wavelet, high-pass filter):
[0135]
[0136] Using the Haar wavelet coefficients as the convolution kernel to process the original signal (X) gives:
[0137] Approximate component:
[0138]
[0139]
[0140] Detail component:
[0141]
[0142] Decomposing level by level can obtain the wavelet coefficients of each frequency band, thus realizing wavelet transform.
[0143] In the wavelet packet transform (WPT), in addition to the approximate component being recursively decomposed, the detail component is also recursively decomposed, which has higher flexibility and can generate more detailed frequency domain information, playing an important role in application scenarios such as signal feature extraction, noise reduction, and data compression.
[0144] This embodiment continues the idea of wavelet packet transform, further decomposes the detail components, and integrates the wavelet packet transform into the convolutional neural network. The high-pass filter and low-pass filter obtained by discretizing the wavelet function are used as convolutional kernels, and the stride is set to implement the downsampling operation. To improve the adaptive ability of the model, the model is allowed to select multiple wavelet bases to participate in the wavelet packet transform to extract richer frequency domain information. In addition, this embodiment constructs the convolutional module in the way of grouped convolution to avoid the interference of information between each frequency domain channel and affect the interpretability of the model.
[0145] The conventional convolution operation is to convolve each channel with the convolutional kernel and then sum them. However, doing so will mix the information of each channel, and the result obtained is not the frequency domain information generated by wavelet packet decomposition, so it lacks interpretability. Therefore, grouped convolution is needed. A convolutional kernel is designed separately for each channel, and the problem of information mixing will not occur. With the help of grouped convolution, the convolutional module of the present invention is designed as follows: First, the two-channel vibration signals containing horizontal and vertical information are respectively convolved one-dimensionally with four filters (high-frequency and low-frequency filters of db6 and sym6), and the information of two groups of 4 channels, horizontal and vertical, can be obtained. By adjusting the channel order, two groups of 4-channel one-dimensional information based on two wavelet bases, db6 and sym6, can be obtained and converted into a two-channel two-dimensional picture. Then, the high-frequency and low-frequency convolutional kernels of db6 and the high-frequency and low-frequency convolutional kernels of sym6 are constructed by stacking one-dimensional convolutional kernels, and are respectively convolved two-dimensionally with the channels obtained from the previous convolution to obtain four-channel two-dimensional pictures. Recombining them can obtain a two-channel two-dimensional picture of db6 and sym6. Extend the convolutional kernel to have the same height as the picture, and repeat the operation of the second convolution to achieve deep convolution.
[0146] Step 2: Based on the theory of knowledge distillation, construct a student model with the same architecture as the teacher model.
[0147] When the student model and the teacher model have the same architecture, the layers and blocks between them can directly correspond, and knowledge can be distilled more directly, and the intermediate layer features and parameter knowledge can be transferred more effectively.
[0148] In addition, the same architecture can make the transfer of knowledge more stable, enabling the student model to "take fewer detours" during the training process, so that it can learn truly useful knowledge points faster.
[0149] The teacher model of the same architecture has already possessed a certain anti-noise ability through a large amount of training. During the training process, the student model not only directly learns the original noisy labels, but also learns the soft labels provided by the teacher, which improves the anti-noise ability of the student model to a certain extent and reduces the possibility of overfitting of the student model.
[0150] Step 3: Prune the teacher model based on knowledge distillation to obtain an interpretable lightweight student model.
[0151] Knowledge distillation is a common model pruning operation. By constructing a homogeneous lightweight model and using the gradient descent algorithm for adaptive pruning, it can maintain the good performance of the teacher model, improve the generalization ability, enhance the computational efficiency, and is more conducive to deployment on hardware devices with limited computing resources or high real-time requirements.
[0152] In this embodiment, the knowledge distillation operation is implemented in combination with the gradient descent algorithm. First, the confidence of the teacher model is calculated, and the calculation formula is as follows:
[0153] Square error range:
[0154]
[0155] Confidence of the current teacher model output (batch):
[0156]
[0157] where P i and R i represent the predicted value and the true value of the i-th output respectively, and P and R represent the predicted value and the true value of the current input. Through the above calculation, the confidence can be ensured The higher this value is, the more confident the teacher model is in the current output, and the lower it is, the less confident it is.
[0158] By calculating the confidence, the degree of certainty of the model for the current output can be obtained. For the output of the intermediate layer, in this embodiment, the mean squared error loss (MSE) is used to calculate the distribution difference between the output of the teacher model and the student model, and the gradient descent algorithm is adopted to narrow the distribution difference to achieve knowledge distillation.
[0159] Mean squared error calculation formula:
[0160]
[0161] where T i represents the intermediate layer output of the teacher model, and S i represents the corresponding intermediate layer output of the student model.
[0162] Intermediate layer loss function:
[0163]
[0164] Since the intermediate layer outputs of the teacher model and the student model may not be exactly the same, zero-padding (Padding) is required for the outputs. In the present invention, the output dimension of the teacher model is slightly larger than that of the student model. Zero-padding is applied to the output of the student model, that is, a small part of the output of the teacher model is discarded, which can achieve the pruning operation and will not have too much impact on the performance of the student model.
[0165] For the output of the last layer of the student model, in addition to fitting the predicted value of the teacher model, it also needs to fit the true value. Therefore, the loss function of this layer consists of two parts:
[0166] Loss of the student model with respect to the teacher model (soft label loss):
[0167]
[0168] where TP i is the predicted value of the teacher model, and SP i is the predicted value of the student model.
[0169] Loss of the student model with respect to the true value (hard label loss):
[0170] Loss hard =(SP i -R i ) 2
[0171] where R i represents the true RUL value.
[0172] Loss function of the last layer:
[0173] Loss last =εLoss soft +(1 - ε)Loss hard
[0174] The importance of the two loss functions is controlled by the coefficient ε. This coefficient can be obtained through experimental comparison or by machine learning methods.
[0175] The student model and the teacher model in this embodiment are both composed of three modules. Module 1 extracts frequency domain information based on wavelet packet transform with multi-wavelet bases. Module 2 is a time series information extraction layer. The first two models use the intermediate layer loss function. Module 3 is a non-linear fully connected layer, which uses a loss function combining soft and hard labels. The knowledge distillation process is carried out in three stages. In stage 1, the parameters of Module 2 and 3 are frozen, and only the parameters of Module 1 are updated. In stage 2, only the parameters of Model 1 and 2 are updated. In stage 3, all parameters are unfrozen for global parameter search.
[0176] The above method is further described below in conjunction with the accompanying drawings and specific examples.
[0177] (1) Data preparation
[0178] In this embodiment, the dataset for the remaining useful life prediction of bearings provided by the IEEE PHM 2012 Data Challenge is used to perform the remaining useful life prediction under operating condition 1 (load 4000N, rotational speed 1800rpm). The sampling frequency of this dataset is 25.6kHz, and it is sampled once every 10s, that is, 2560 points are sampled each time, carrying horizontal and vibration signals, as well as temperature signals. Here, only the vibration signal is used as the input. Through sliding window sampling, the sample points are uniformly subdivided into horizontal and vibration signals containing 512 points, that is, the dimension is (2, 512). In addition, in order to verify the noise resistance ability of the model itself, the vibration signal is directly input into the model for training without noise reduction processing. The two groups of vibration signals under operating condition 1 are as follows Figure 4 shown.
[0179] (2) Construction and training of the teacher model
[0180] The frequency domain feature extraction layer of the teacher model uses a three-layer convolutional neural network. Using two groups of wavelet bases, db6 and sym6, as convolution kernels, grouped convolution is performed to obtain the frequency domain information of each frequency band under two different wavelet bases, a total of 64 frequency bands, and the information of each frequency band is a 32-dimensional feature vector. Then, through a three-layer spatio-temporal double-cell time domain feature extraction layer and three fully connected layers, the RUL prediction value is obtained. As Figure 5 shown,[[]] Figure 5 is the loss decline result graph of the teacher model trained for 100 rounds.
[0181] See Figure 6 , Figure 6 for the prediction results of the teacher model, where Bearing1_1, 1_2, 1_5 are the training sets, and the rest are the test sets. The pink line is the predicted value, the sky blue line is the predicted value after smoothing, and the red line is the true RUL value. It can be found that the loss value of the teacher model drops steadily during the training process, and can drop to a relatively low value and tend to be stable around 60 rounds. The model does not show serious overfitting after training and has good generalization.
[0182] (3) Construction and training of the student model
[0183] The student model uses a three-layer convolutional neural network, performs multi-channel fusion, outputs 64 32-dimensional vectors, then extracts temporal features through three layers of LSTM, and finally inputs them into the fully connected layer to predict the RUL value. Figure 7For the prediction results of the student model, where Bearing1_1, 1_2, and 1_5 are the training sets, and the rest are the test sets. The pink line represents the predicted value, the sky-blue line represents the predicted value after smoothing, and the red line represents the true RUL value. Experiments have found that after knowledge distillation, the model performs evenly on each dataset, its generalization ability is greatly improved, and the model is faster in inference speed, meeting the requirements of lightweight online prediction.
[0184] Embodiment 2
[0185] This embodiment provides a lightweight online remaining useful life prediction device, including:
[0186] A teacher model construction module, which is used to construct and train a teacher model based on wavelet packet transform with multi-wavelet bases for extracting RUL information of data in different time-frequency domains;
[0187] A student model construction module, which is used to design a lightweight student model of the same type as the teacher model based on knowledge distillation for facilitating the transfer of knowledge;
[0188] A segmented knowledge distillation module, which is used to perform knowledge distillation in stages, transfer the feature extraction ability obtained by training the teacher model to the student model of the same type, and obtain a lightweight student model for online remaining useful life prediction.
[0189] Since this device is a lightweight online remaining useful life prediction device of an embodiment of the present invention, and the principle of solving problems by this device is similar to that of this method, the implementation of this device can refer to the implementation process of the above method embodiment, and the repeated parts will not be elaborated.
[0190] Embodiment 3
[0191] The invention embodiment also provides an electronic device, which includes a processor and a memory. At least one instruction, at least one program, a code set or an instruction set is stored in the memory, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement Figure 1 A lightweight online remaining useful life prediction method as shown.
[0192] It can be understood that the memory may include a Random Access Memory (RAM), or may also include a Read-Only Memory. Optionally, the memory includes a non-transitory computer-readable storage medium. The memory can be used to store instructions, programs, code, code sets or instruction sets. The memory may include a program storage area and a data storage area. Among them, the program storage area can store instructions for implementing the operating system, instructions for at least one function, instructions for implementing the above various method embodiments, etc.; the data storage area can store data created according to the use of the server, etc.
[0193] The processor may include one or more processing cores. The processor uses various interfaces and lines to connect various parts within the entire server, and by running or executing instructions, programs, code sets or instruction sets stored in the memory, and by calling data stored in the memory, it executes various functions of the server and processes data. Optionally, the processor may be implemented in at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). The processor may integrate a combination of one or several of a Central Processing Unit (CPU) and a modem, etc. Among them, the CPU mainly processes the operating system and application programs, etc.; the modem is used to process wireless communications. It can be understood that the above modem may not be integrated into the processor and can be implemented separately by a single chip.
[0194] Since this electronic device is an electronic device corresponding to a lightweight online remaining useful life prediction method according to an embodiment of the present invention, and the principle by which this electronic device solves problems is similar to that of this method, the implementation of this electronic device can refer to the implementation process of the above method embodiment, and the repeated parts will not be elaborated.
[0195] Embodiment 4
[0196] An embodiment of the present invention further provides a computer-readable storage medium, in which at least one instruction, at least one segment of program, code set or instruction set is stored, and the at least one instruction, the at least one segment of program, the code set or instruction set is loaded and executed by a processor to implement Figure 1 a lightweight online remaining useful life prediction method as shown.
[0197] Those of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing relevant hardware through a program. This program can be stored in a computer-readable storage medium, which includes read-only memory (ROM), random access memory (RAM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), one-time programmable read-only memory (OTPROM), electrically-erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disc memories, magnetic disc memories, tape memories, or any other computer-readable medium capable of carrying or storing data.
[0198] Since this storage medium is the storage medium corresponding to a lightweight online remaining useful life prediction method of an embodiment of the present invention, and the principle of solving problems by this storage medium is similar to that of this method, the implementation of this storage medium can refer to the implementation process of the above method embodiment, and the repeated parts will not be described again.
[0199] Embodiment 5
[0200] In some possible implementation manners, various aspects of the method of the embodiment of the present invention can also be implemented in the form of a program product, which includes program code. When the program product runs on a computer device, the program code is used to cause the computer device to execute the steps of a lightweight online remaining useful life prediction method according to various exemplary implementation manners described above in this specification. Among them, the executable computer program code or "code" for executing each embodiment can be written in a high-level programming language such as C, C++, C#, Smalltalk, Java, JavaScript, Visual Basic, structured query language (e.g., Transact-SQL), Perl, or in various other programming languages.
[0201] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, any one or a combination of the following techniques well known in the art can be used: discrete logic circuits with logic gate circuits for implementing logical functions on data signals, application specific integrated circuits with appropriate combinational logic gate circuits, programmable gate arrays (PGAs), field programmable gate arrays (FPGAs), and the like.
[0202] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples", etc. means that the specific features, structures, materials, or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described can be combined in any one or more embodiments or examples in a suitable manner. In addition, without contradiction, those skilled in the art can combine and combine the different embodiments or examples described in this specification and the features of different embodiments or examples.
[0203] The above embodiments are only for illustrating the technical concept and features of the present invention, and the purpose is to enable those of ordinary skill in the art to understand the content of the present invention and implement it accordingly, and cannot be used to limit the protection scope of the present invention. All equivalent changes or modifications made according to the essence of the content of the present invention should be covered by the protection scope of the present invention.
Claims
1. A lightweight online remaining life prediction method, characterized in that: The following steps are involved: Based on the wavelet packet transform of multi-wavelet basis, the teacher model is constructed and trained to extract the RUL information of the data in different time and frequency domains; Based on knowledge distillation, a lightweight student model of the same type as the teacher model is designed to facilitate knowledge transfer; Knowledge distillation is performed in stages to transfer the feature extraction capabilities obtained by training the teacher model to a student model of the same type, thus obtaining a lightweight student model for online remaining life prediction.
2. A lightweight online remaining life prediction method according to claim 1, characterized in that: The teacher model includes a frequency domain feature extractor, a time domain feature extractor and a nonlinear fully connected layer, and its working method is as follows: The vibration signals obtained from the industrial production process are cut into horizontal and vibration signals of the same length by the sliding window sampling method, and are sent to the frequency domain feature extractor, time domain feature extractor and nonlinear fully connected layer modules in sequence to calculate the RUL prediction value; Among them, the frequency domain feature extractor is based on the principle of wavelet packet transform, uses multiple wavelet bases to perform in-depth feature extraction on the signal, and adaptively selects appropriate wavelet bases for feature extraction to improve the expression ability of the frequency domain feature extractor. At the same time, it can also save the operations of manual selection of wavelet bases and data denoising preprocessing.
3. A lightweight online remaining life prediction method according to claim 2, characterized in that: The frequency domain feature extractor is implemented by a deep convolutional neural network module based on wavelet packet decomposition of multi-wavelet basis, and a convolution module is constructed by grouped convolution to avoid mutual interference of information between frequency domain channels and affect the interpretability of the model; The time domain feature extractor is implemented by using a time series feature extraction module based on spatiotemporal dual cell states.
4. A lightweight online remaining life prediction method according to claim 3, characterized in that: The deep convolutional neural network module works as follows: The dual-channel vibration signal containing horizontal and vertical information is convolved with four filters in one dimension respectively to obtain information of two groups of four channels, horizontal and vertical; the four filters are high-frequency and low-frequency filters of db6 and high-frequency and low-frequency filters of sym6; Adjust the channel order to obtain two groups of 4-channel one-dimensional information based on the two wavelet bases db6 and sym6, and convert them into two-channel two-dimensional images; The high-frequency and low-frequency convolution kernels of db6 and the high-frequency and low-frequency convolution kernels of sym6 are constructed by stacking one-dimensional convolution kernels, and two-dimensional convolution is performed with the channels obtained by the previous convolution to obtain two-dimensional images of four channels, which are then recombined to obtain two-dimensional images of the db6 and sym6 dual channels; Extend the convolution kernel so that it has the same height as the image, and repeat the convolution operation to achieve deep convolution.
5. A lightweight online remaining life prediction method according to claim 1, characterized in that: The student model is constructed using a frequency domain feature extractor + time domain feature extractor + nonlinear fully connected layer pattern, and has outputs of the same or similar dimensions as the middle layer of the teacher model to ensure smooth knowledge distillation between models and make the student model more interpretable.
6. A lightweight online remaining life prediction method according to claim 1, characterized in that: Based on knowledge distillation, a lightweight student model similar to the teacher model is designed, including: Based on knowledge distillation, the teacher model is pruned to obtain a lightweight student model with interpretability: Combined with the gradient descent algorithm to implement knowledge distillation, the confidence of the teacher model is first calculated. The calculation formula is as follows: Squared error range: η=max{(P i -R i ) 2 }-min{(P i -R i ) 2 } Confidence of the current teacher model output: Among them, P i and R i Respectively represent the predicted value and true value of the i-th output; P and R represent the predicted value and true value of the current input; By calculating the confidence, we can get the degree of confidence of the model on the current output. For the output of the middle layer, we use the mean square error loss to calculate the distribution difference between the output of the teacher model and the student model, and use the gradient descent algorithm to narrow the distribution difference and realize the distillation of knowledge: Mean square error calculation formula: Where, T i represents the intermediate layer output of the teacher model, S i Represents the intermediate layer output corresponding to the student model; N is the dimension of the intermediate layer output; Intermediate layer loss function: Since the outputs of the middle layers of the teacher model and the student model are not completely consistent, the output of the student model is padded with zeros; for the output of the last layer of the student model, in addition to fitting the predicted values of the teacher model, it is also necessary to fit the true values, so the loss function of this layer consists of two parts: The loss of the student model to the teacher model: Where TP i is the predicted value of the teacher model, SP i is the predicted value of the student model; The loss of the student model to the true value: Loss hard =(SP i -R i ) 2 In the formula, R i Indicates the real RUL value; The loss function of the last layer is: Loss last =εLoss soft +(1-ε)Loss hard In the formula, ε is the coefficient.
7. A lightweight online remaining life prediction method according to claim 1, characterized in that: The staged knowledge distillation transfers the feature extraction capability obtained by the teacher model training to the student model of the same type, including: Through the knowledge distillation of three stages: frequency domain feature extractor fitting stage, time series feature extractor fitting stage, and global parameter fine-tuning stage, the student model can learn the teacher model's frequency domain feature extraction ability, time domain feature extraction ability, and the ability to integrate and summarize the extracted features.
8. A lightweight online remaining life prediction device, characterized in that: include: The teacher model building module is used to build and train the teacher model based on wavelet packet transform based on multi-wavelet basis, which is used to extract the RUL information of the data in different time and frequency domains; The student model building module is used to design a lightweight student model of the same type as the teacher model based on knowledge distillation to facilitate knowledge transfer; The segmented knowledge distillation module is used to perform knowledge distillation in stages, transfer the feature extraction capability obtained by teacher model training to the student model of the same type, and obtain a lightweight student model for online remaining life prediction.
9. An electronic device, characterized in that: The electronic device includes a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement the method described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The storage medium stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement the method according to any one of claims 1 to 7.
Citation Information
Cited By
Tooth-shaped chain sound quality prediction method based on adaptive fuzzy distillation
CN120579034A
A method for predicting the acoustic quality of toothed chains based on adaptive fuzzy distillation
CN120579034B