Knowledge distillation-based lightweight convolutional neural network bearing fault diagnosis method
By optimizing a lightweight convolutional neural network through normalized knowledge distillation and one-dimensional pulsating array computation, the deployment challenge of the model on the FPGA platform is solved, achieving efficient, low-latency and low-latency bearing fault diagnosis, improving the diagnostic performance of the model on the FPGA platform, and making it suitable for edge computing environments.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-04
- Publication Date
- 2026-04-14
AI Technical Summary
Existing technologies, when deploying intelligent fault diagnosis systems, result in low efficiency of the model running on the FPGA platform and insufficient robustness in noisy environments, making it impossible to achieve efficient real-time diagnosis.
A lightweight convolutional neural network is optimized using normalized knowledge distillation technology. Combined with FPGA-specific 16-bit fixed-point quantization and one-dimensional pulsating array computation, an end-to-end fault diagnosis system is constructed, including data acquisition, accelerated inference, and result feedback.
It achieves efficient, low-latency, and low-power bearing fault diagnosis on the FPGA platform, maintaining diagnostic accuracy and improving model robustness, making it suitable for edge computing environments.
Smart Images

Figure CN121859956A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of intelligent fault diagnosis and is applicable to bearing fault diagnosis scenarios in the industrial sector. Specifically, it designs a fault diagnosis method based on a deployable lightweight convolutional neural network using normalized knowledge distillation. Background Technology
[0002] Rolling bearings are widely used in aerospace, light industry, and heavy industry. Because of their complex and variable operating environments, yet their crucial role in mechanical systems, maintaining a stable operating environment is paramount. If bearings are exposed to hazardous environments for extended periods without timely inspection, serious safety accidents can easily occur. Therefore, real-time monitoring and timely adjustment of bearings are of great significance in minimizing economic losses for businesses.
[0003] In the field of rolling bearing fault diagnosis, vibration signal analysis is a key technical means that can effectively reflect the bearing's operating status. This method provides a reliable basis for bearing condition assessment by analyzing the time-frequency characteristics of vibration signals, including key parameters such as rotational frequency components, fault characteristic frequencies, and their modulation phenomena. However, vibration signals collected in industrial fields are often affected by various interference factors, including environmental noise and mechanically coupled vibrations. These interferences can significantly reduce signal quality and increase the difficulty of fault feature extraction.
[0004] Traditional signal processing-based diagnostic methods rely on specialized knowledge and experience for feature engineering. This approach is not only computationally complex but also limited in its adaptability to different operating conditions. In contrast, deep learning-based intelligent diagnostic methods exhibit significant advantages. They automatically learn signal features through a data-driven approach, effectively overcoming the limitations of traditional methods. Among various deep learning methods, one-dimensional convolutional neural networks (CNNs) are particularly suitable for processing vibration signals due to their unique network structure. This network effectively extracts the temporal features of signals through multi-scale convolution operations, and achieves feature dimensionality reduction with pooling operations. The nonlinear transformation layer in the network can capture complex signal patterns, while normalization processing improves the model's training effect. Research results show that an appropriately optimized network structure can significantly reduce model complexity while maintaining diagnostic performance, providing feasibility for practical engineering applications. These technical characteristics make deep learning-based fault diagnosis methods promising for industrial practice.
[0005] Achieving efficient real-time inference of models is a key challenge when deploying intelligent fault diagnosis systems in industrial settings. While Field-Programmable Gate Arrays (FPGAs) offer advantages such as strong parallel computing capabilities, high real-time performance, and low power consumption, their limited hardware resources impose stringent requirements on the deployment of neural network models. To address this technical challenge, this invention proposes a complete model optimization scheme: firstly, pruning and quantization techniques effectively reduce model parameters and computational load; secondly, knowledge distillation and lightweight design improve model efficiency; and thirdly, considering the limited storage resources of FPGAs, parameter sharing and weight pruning techniques are innovatively combined to reduce storage requirements, along with a dedicated hardware accelerator design. Ultimately, this significantly improves the model's operating efficiency on the FPGA platform while maintaining diagnostic accuracy.
[0006] A search revealed application publication number CN119848662B, which discloses a lightweight bearing fault diagnosis method based on uniform quantization and adversarial distillation. This method employs knowledge distillation and adversarial learning, allowing a student model to acquire valuable information by learning soft labels provided by a teacher network. With the help of a well-learned teacher network, even a small student model can achieve diagnostic accuracy similar to deep networks. Simultaneously, combining uniform quantization with the distillation process significantly reduces the size of the student model. The method is computationally simple and yields effective results, making lightweight networks more suitable for practical devices with limited computing and storage resources. This enables real-time bearing fault diagnosis on smaller devices such as mobile phones and embedded devices.
[0007] This invention is based on an analysis of patent CN119848662B and systematically improves upon its shortcomings in industrial field deployment for FPGAs. While this existing technology achieves model lightweighting through adversarial distillation and uniform quantization, its distillation mechanism does not explicitly constrain the logic distribution of non-target categories, resulting in insufficient robustness in noisy environments. Its general quantization strategy is not deeply integrated with the storage and computational characteristics of FPGAs, affecting accuracy and efficiency. Its network structure is still not sufficiently streamlined for resource-constrained FPGAs and lacks a dedicated hardware architecture for one-dimensional vibration signals. Most importantly, it lacks a complete hardware-software co-operation system, failing to form an end-to-end edge solution.
[0008] To address these challenges, this invention introduces normalized knowledge distillation at the algorithm level to enhance noise robustness; designs a dedicated 16-bit fixed-point quantization and one-dimensional pulsating array computing core for FPGAs at the hardware level; and constructs a complete deployment scheme at the system level, encompassing data acquisition, accelerated inference, and result feedback. Ultimately, with only 1.95K parameters, it achieves industrial-grade fault diagnosis capabilities with higher reliability, lower latency, and lower power consumption. Summary of the Invention
[0009] This invention aims to solve the problems of the prior art. It proposes a lightweight convolutional neural network-based bearing fault diagnosis method based on knowledge distillation. The technical solution of this invention is as follows:
[0010] A lightweight convolutional neural network-based bearing fault diagnosis method based on knowledge distillation includes the following steps:
[0011] Step 1: First, collect the original vibration signal using an accelerometer installed near the rotating bearing. Then, perform a fast Fourier transform on the collected data to convert it from a time domain signal to a complex frequency domain signal, and then convert it to a real frequency domain signal, removing the redundant signal in the first half.
[0012] Step 2: Construct a one-dimensional ResNet18 with optimized residual structure as the teacher network. By changing the parameters of the residual architecture to adapt it to the classification of fault signals, and using one-dimensional convolutional layers, max pooling layers, activation layers, and fully connected layers to form a lightweight convolutional neural network with a weight parameter of 1.95K as the student network.
[0013] Step 3: Use normalized knowledge distillation to train the lightweight model, and add Gaussian white noise to the original signal for training the lightweight model;
[0014] Step 4: Convert the weight parameters of the trained model from 32-bit floating-point numbers to 16-bit fixed-point numbers and save them to the ROM of the onboard FPGA for inference in the accelerator.
[0015] Step 5: The accelerator uses a one-dimensional pulsating array as its core. For a single channel, multiple rows of one-dimensional pulsating arrays are used to form a computing block to accelerate single-channel inference, while simultaneously achieving accelerated inference for multiple channels.
[0016] Step 6: Build the inference system in the FPGA system. Transfer data from the host to DDR4 in the FPGA development board via PCIe. Then, transfer the data from DDR4 to the buffer system composed of ping-pong system segment by segment and use it for accelerator inference.
[0017] Furthermore, in step 1, a Fast Fourier Transform is performed on the original signal, which is then converted from the complex frequency domain to the real frequency domain to remove the redundant signal in the first half. The specific steps are as follows:
[0018] (1) Divide the entire data into multiple segments with a length of 2048 as the baseline, and perform a 2048-point Fast Fourier Transform on each segment:
[0019]
[0020] in The signal is in the complex frequency domain after Fourier transform. For signals in the time domain, This represents the number of sampling points; The imaginary unit, For frequency components;
[0021] (2) Then the complex frequency domain signal is converted into a real frequency domain signal and the latter half is truncated:
[0022]
[0023] in For real-valued frequency domain signals, It is a complex frequency domain signal.
[0024] Furthermore, the teacher network is constructed using a one-dimensional ResNet18 with optimized residual structure, and the residual architecture is modified as follows:
[0025]
[0026] in The residual function is BN, which is the normalization layer. For activation functions; This is the first convolutional layer;
[0027] The first convolutional layer is:
[0028]
[0029] The kernel size is the convolution kernel size. For filling, It is paranoia;
[0030] The second convolutional layer is:
[0031]
[0032] in This represents the computational results after the convolutional layer. For weight parameters, For bias;
[0033] By converting traditional small-sized convolution kernels into large-sized convolution kernels, more relationships between individual sample points of vibration signals can be obtained during a single convolution calculation.
[0034] Furthermore, the lightweight convolutional neural network architecture in step 2 is as follows:
[0035]
[0036] Where Y is a lightweight convolutional neural network. For the weights of the fully connected layer, Here, L represents the weights of the convolutional layer, and L represents the length of a sample. To flatten the dimensions, For the bias of the convolutional layer, Bias for fully connected layers;
[0037] Furthermore, step 3 utilizes normalized knowledge distillation to train the lightweight model, and adds Gaussian white noise to the original signal for lightweight model training. The specific steps are as follows:
[0038] (1) Add the data with added Gaussian white noise to the original data and perform sample segmentation:
[0039]
[0040] in For signal-to-noise ratio, For input signal, Input noise;
[0041] (2) The CrossEntropyLoss function was used as the training loss function for the teacher network, and the network was trained for 75 epochs:
[0042] in For real labels in category The probability of it, Predicting categories for the model The probability, Total number of categories;
[0043] (3) The training of the student network is divided into two parts. First, the original loss of the student network in the fault signal is calculated using the original cross-entropy loss function:
[0044]
[0045] in The tag value for each tag, Categorize and label students;
[0046] Secondly, the teacher target class probability is obtained by using the cross-entropy loss in the original distillation loss. Normalize the probability of the student's target category to α:
[0047]
[0048] in Categorize and label students. Classify and label teachers. , These are normalized classification labels for teachers and students;
[0049] Finally, the normalized knowledge distillation loss function of the student network is obtained by summing the two:
[0050]
[0051] in It is the normalized cross-entropy loss function. It is the original cross-entropy loss function. Let be the training loss function for the student network.
[0052] Furthermore, the data quantization in step 4 mainly involves converting the trained model weight data from 32-bit floating-point data to 16-bit fixed-point data, specifically:
[0053]
[0054] For stage functions, For the rounding function, The calculation process for the entire model is represented by 32-bit floating-point numbers, and the weight data is saved to the ROM of the onboard FPGA, where N is the number of bits in the mantissa.
[0055] Furthermore, the specific design steps for the accelerator in step 5 are as follows:
[0056] (1) The layers in the architecture of the convolutional neural network are fused into a fused neural layer separated by channels. This fused neural layer is a convolutional layer, a normalization layer and an activation layer fused into one layer. Its main design core is to improve the efficiency of the hardware accelerator.
[0057] (2) The traditional PE calculation block is redesigned into a PE (basic operation unit) calculation block that can transfer the cumulative sum, and a one-dimensional pulsation of a certain length is designed accordingly;
[0058] (3) Divide a single data channel based on the length of a one-dimensional pulsating array, and divide the input data and weight data to achieve parallel computation of a single channel, and use the computation of a single channel as a basis to perform computation of other channels.
[0059] Furthermore, the specific architecture of the FPGA inference system in step 4 is as follows:
[0060] (1) Connect the onboard FPGA accelerator to the PC host through the PCIE interface, and continuously transmit data to the DDR of the onboard FPGA through the PCIE interface;
[0061] (2) A ping-pong cache is designed between DDR4 and the accelerator to ensure that the data read time of the accelerator is reduced, and a separate channel design is made to supply the calculation of each channel of the accelerator.
[0062] (3) The calculation results are temporarily stored in FIFO, then saved to DDR4 and uploaded to the PC host computer via PCIE to display the accelerator's classification results, classification speed, computing performance, inference time parameters, and finally complete the FPGA deployment of the designed convolutional neural network and the transmission of related results.
[0063] An electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the program, implements the lightweight convolutional neural network bearing fault diagnosis method based on knowledge distillation as described in any one of the claims.
[0064] A non-transitory computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the lightweight convolutional neural network-based bearing fault diagnosis method as described in any one of the claims.
[0065] The advantages and beneficial effects of this invention are as follows:
[0066] This invention's bearing fault diagnosis method designs a lightweight convolutional neural network model with only 1.95K weight parameters. It utilizes a one-dimensional BesNet18 with optimized residual structure as the teacher network to guide the lightweight convolutional neural network for classification, and introduces a normalized knowledge distillation method. This method guides the training of shallow networks through deep networks, ensuring performance while maintaining simplicity. Compared to traditional methods, NKD's core improvement lies in optimizing the loss function: by normalizing the non-target class logits values, it constrains the consistency of the non-target class logits distribution between teacher and student models. Its loss function includes both target and non-target losses, and dual-path supervision alleviates the distribution shift caused by differences in model capacity. This allows the lightweight network to maintain inference accuracy comparable to complex models while compressing the number of parameters. Furthermore, by storing the weight parameters in onboard ROM through fixed-point quantization, and using a one-dimensional systolic array and PE computation blocks to construct the accelerator design for the entire model, it achieves faster inference speed and lower power consumption compared to CPUs and GPUs. Moreover, due to knowledge distillation, the designed model also exhibits good robustness.
[0067] The corresponding beneficial effects include:
[0068] 1. In bearing fault diagnosis, compared with the bulky architecture of traditional deep learning convolutional neural networks, the lightweight convolutional neural network proposed in this invention not only has a great advantage in terms of model size, but also has a relatively good effect in terms of robustness, ensuring that the network still has relatively good stability under complex working conditions.
[0069] 2. In terms of model deployment, the model we designed consists of traditional convolutional layers, pooling layers, and fully connected layers. The model parameter count of 1.95 ensures that its consumption of on-board RAM resources on the FPGA is very low. Furthermore, the accelerator is constructed using PE arrays and one-dimensional systolic arrays, which have good advantages in terms of inference speed and resource consumption.
[0070] 3. The lightweight neural network designed in this invention provides a new solution for edge-side deployment of bearing fault models, promoting the development and application of deployable lightweight convolutional neural networks;
[0071] The cleverness or difference lies in:
[0072] 1. Lightweight Model Design: Addressing the issues of large size and difficult edge deployment in traditional network models, this invention utilizes knowledge distillation of deep networks to guide the design of an ultra-lightweight student network with only 1.95K parameters. The training of this design employs the normalized knowledge distillation method claimed in claim 5, the core of which lies in the loss function defined in formula 47. This allows the minimalist model to maintain excellent classification performance while possessing superior edge deployment advantages.
[0073] 2. One-dimensional pulsating array computing block: To efficiently process one-dimensional vibration signals, this invention creatively employs a one-dimensional pulsating array as the core computing unit, the design of which is protected by claim 7. This design abandons the traditional complex topology, adopting a linear structure to enable orderly data transmission and high reuse along the pipeline, significantly reducing external storage access overhead. The multi-channel parallel computing block built on this core provides an efficient and dedicated hardware computing foundation for the aforementioned lightweight model;
[0074] 3. To achieve complete deployment from algorithm to chip, this invention constructs a hardware-software co-operated end-to-end diagnostic system. This system uses the quantization method protected in claim 6 to convert the model into fixed-point numbers and deploys it based on the complete FPGA inference system constructed in claim 8. This integrated solution seamlessly connects signal transmission, accelerated identification, and result feedback, realizing a highly efficient diagnostic process without human intervention and significantly improving overall performance. Attached Figure Description
[0075] Figure 1 This invention provides the structural framework and reasoning flow of the overall diagnostic system according to a preferred embodiment;
[0076] Figure 2 This invention presents the confusion matrix and T-SNE diagram of the teacher network, the clean student network, and the distilled student network in the CWRU dataset.
[0077] Figure 3 The architecture diagram of the designed FPGA accelerator;
[0078] Figure 4 A diagram showing the resource consumption percentage of the designed diagnostic system;
[0079] Figure 5 Compare the confusion matrix of the diagnostic results of the designed FPGA accelerator with the classification results in PyCharm. Detailed Implementation
[0080] The technical solutions of the embodiments of the present invention will be clearly and thoroughly described below with reference to the accompanying drawings. The described embodiments are merely some embodiments of the present invention.
[0081] The technical solution of the present invention to solve the above-mentioned technical problems is:
[0082] A fault diagnosis method based on a deployable lightweight convolutional neural network using normalized knowledge distillation includes the following steps:
[0083] Step 1: First, the original time-domain vibration signal is collected by an accelerometer installed near the rotating bearing; and the collected time-domain signal is divided into 2048 points for each sample, and finally divided into training set, validation set and test set in a ratio of 7:2:1.
[0084] Step 2: Add Gaussian white noise to the segmented samples and convert the signal from the time domain to the frequency domain using Fast Fourier Transform. Remove the redundant signal in the first half by truncating and retaining the second half of the time domain signal.
[0085] Step 3: Construct a one-dimensional ResNet18 with optimized residual structure as the teacher network. By changing the parameters of the residual architecture, it is made to better adapt to the classification of fault signals. A lightweight convolutional neural network with only 1.95K weight parameters is formed by using one-dimensional convolutional layers, max pooling layers, activation layers, and fully connected layers as the lightweight convolutional neural student network.
[0086] Step 4: Convert the weight parameters of the trained model from 32-bit floating-point numbers to 16-bit fixed-point numbers;
[0087] Step 5: Save the obtained 16-bit fixed-point number as a COE format file and store it in the ROM memory of the FPGA platform for FPGA model inference calculation;
[0088] Step 6: Using a one-dimensional systolic array as the computational core, a single 1×64 convolutional computation sample is summed using 16 1×4 one-dimensional systolic arrays. Only four cycles are needed to compute the convolutional result. Based on this computational core, parallel computation of four channels is constructed. Finally, the computational result of each channel of the convolutional layer is obtained by summing the multiple channels, and the sum is fed into the subsequent fully connected layer for further computation.
[0089] Step 7: The basic computation block of the fully connected layer is designed as a PE computation block that can continuously accumulate and pass computation sums. Through parallel computation of four channels, it takes 44 cycles to calculate the computation sum of each channel of the fully connected layer. Finally, the calculation result of the final single fully connected weight is obtained by accumulating and summing. Based on this, a parallel computation block of a 5-channel fully connected layer is constructed. Finally, it takes 88 cycles to calculate all the final results of 10 classification of a single convolutional sample.
[0090] Step 8: Connect the onboard FPGA accelerator to the host via the PCIe interface. Transfer the data to the onboard DDR memory block via PCIe. Design a ping-pong buffer between the DDR and the accelerator to reduce the accelerator's buffering time. Reassemble the input data and distribute it to each computing channel in the accelerator. Stor the results in a FIFO and finally transfer them to the PC via PCIe after transferring them through the DDR.
[0091] Furthermore, in the ResNet18 network with optimized residual structure described in step 3, the original residual structure consisting of two 1×3 one-dimensional convolutional layers is adjusted to a residual structure that is more suitable for large-size one-dimensional convolutional neural networks, consisting of a combination of 1×5 and 1×7 larger-size convolutional layers.
[0092] Furthermore, the lightweight convolutional neural network mentioned in step 3 consists of three layers. The first layer is a large-size one-dimensional convolutional layer with a kernel size of 64, padding of 28, and stride of 28, which can extract more correlation information between signals in a single convolutional sample. The second layer is a max pooling layer with a bias of 3 and a stride of 3. The last layer is a 10-class fully connected layer with an input of 168. The network contains a total of 1.95K weight parameters, which greatly reduces the difficulty of deploying it in edge computing devices.
[0093] like Figure 1 The research on a deployable lightweight convolutional neural network-based bearing fault diagnosis method based on knowledge distillation, specifically in the following examples:
[0094] Step 1: Collect vibration data and use non-overlapping sampling to divide the original time-domain vibration signal into multiple sub-samples with a length of 2048.
[0095] Step 2: Use Fast Fourier Transform to convert the subsample signal from Step 1 from vibration signal into frequency domain signal.
[0096] Step 3: Divide the frequency domain dataset obtained in Step 2 into training set, validation set and test set in a ratio of 7:2:1, and use SGD optimizer with learning rate adjusted to 0.1.
[0097] Step 4: First, train the teacher network for 75 rounds, then use knowledge distillation to train the student network for 75 rounds, and convert the trained model parameters from 32-bit floating-point to 16-bit fixed-point numbers, and save the resulting COE file to the FPGA onboard ROM block.
[0098] Step 5: Use Verilog HDL hardware language to build an FPGA accelerator using a one-dimensional systolic array and PE compute blocks, synthesize it into an RTL circuit, perform synthesis and routing, and optimize timing.
[0099] Step 6: Build a diagnostic system around the accelerator, using DDR and cache systems for data transfer and caching, and communicate with the host computer via PCIe to complete end-to-end diagnosis of fault signals.
[0100] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0101] In one embodiment of the present invention, a deployable lightweight convolutional neural network-based bearing fault diagnosis method based on knowledge distillation is verified. The following provides a possible embodiment and its specific implementation is described in a non-limiting manner.
[0102] The dataset used in this embodiment is the Open Bearings Database from Case Western Reserve University to verify the performance of the designed lightweight convolutional neural network.
[0103] The CWRU dataset acquisition system is driven by a three-phase induction motor and records the vibration signals of the faulty bearing using two accelerometers. The motor loads of the system are 0HP, 1HP, 2HP, and 3HP, with a speed of 1772 r / min, and data is collected at a sampling frequency of 12 kHz. The fault was caused by introducing single-point defects into the inner ring, outer ring, and rolling elements of the bearing using electrical discharge machining (EDM). The damage dimensions at each point were 7 inches, 14 inches, and 21 inches, respectively. Including the normal state, a total of 10 different state data samples were generated, as shown in Table 1.
[0104] Table 1. Fault types and sample size in the CWRU bearing dataset
[0105]
[0106] To verify the superiority of the proposed model, the impact of different graph structures on the diagnostic results under different models was compared and analyzed in both noise-free and noisy environments. The results under noise-free conditions are shown in Table 2. Under noise-free conditions, the accuracy of the models is close to 100%, demonstrating that the proposed model also possesses good robustness in noise-free environments. The signal-to-noise ratios (SNRs) set for each model were -6dB, -4dB, 2dB, and 0dB, where dB represents the unit of SNR, represents the signal power, and represents the noise power, as shown in the following formula:
[0107]
[0108] Figure 2 The confusion matrices and T-SNE diagrams for the teacher network, the pure student network, and the learned network after knowledge distillation are presented on the CWRU dataset under various noise conditions. Under the same conditions, our proposed model exhibits superior classification performance and robustness compared to other models.
[0109] Table 2. Validation results of the lightweight convolutional neural network designed under various noise conditions using CWRU.
[0110]
[0111] Figure 3 and Figure 4 The resource consumption of the designed FPGA acceleration architecture and the built diagnostic system are presented separately. Table 3 shows the comparison between our designed accelerator and the CPU and GPU used in the experiment under the same conditions, demonstrating that our designed accelerator has a significant advantage in both power consumption and inference time. Furthermore, to verify the accuracy of our designed diagnostic system, in... Figure 5 The diagram shows a comparison between the confusion matrix of our designed diagnostic system and the PyCharm classification in PC. It is easy to see from the results that the classification performance of the designed accelerator after quantization decreases by less than 0.7%, which is completely acceptable as a loss of the model deployed in edge devices.
[0112] The following is a specific embodiment of the present invention:
[0113] Example 1: Model classification result validation based on CWRU dataset and FPGA accelerator
[0114] Implementation Environment and Data Preparation
[0115] - Dataset source: This embodiment uses the Open Bearing Database of Case Western Reserve University (CWRU), which records bearing vibration signals under different fault conditions, including inner ring defects, outer ring defects, rolling element defects and normal conditions, with three different damage sizes for each condition.
[0116] - Hardware and software environment: The experiment was run on a server equipped with an NVIDIA GeForce RTX 3060 GPU, using the Python programming language and the PyTorch deep learning framework.
[0117] Implementation steps
[0118] 1. Data Acquisition and Preprocessing: Data was collected from the CWRU dataset at a sampling rate of 12kHz. The original vibration signal was then divided into subsamples of length 2048 using non-overlapping sampling, and the time-domain signal was converted into a frequency-domain signal using Fast Fourier Transform.
[0119] 2. Teacher Model Training:
[0120] - Model design: The two-layer 1×3 residual structure in the original ResNet18 model is transformed into a large-size residual structure of 1×5 and 1×7.
[0121] - Data partitioning: The dataset is divided into training set, validation set and test set in a ratio of 7:2:1.
[0122] - Model training: The teacher model is trained using the training set with the SGD optimizer, the learning rate is adjusted to 0.1, and the number of training epochs is 75.
[0123] 3. Student model training:
[0124] - Model design: A lightweight convolutional network with a weight parameter of 1.95K, consisting of large-size one-dimensional convolutional layers (convolutional kernel size of 1×64, bias of 28, stride of 8), max pooling layers (stride of 3, size of 3), and fully connected layers (input of 168, output of 10).
[0125] - Data partitioning: The dataset is divided into training set, validation set and test set in a ratio of 7:2:1.
[0126] - Model training: The teacher network guides the student model to train via knowledge distillation, using the SGD optimizer with a learning rate of 0.1 and 75 training epochs.
[0127] 4. Parameter Quantization
[0128] The trained model parameters are quantized using 16-bit fixed-point quantization and converted into a COE file, which is then saved to the block RAM of the FPGA for subsequent accelerator computation.
[0129] 5. Building the diagnostic system:
[0130] - Accelerator design: An FPGA accelerator was built using the Verilog HDL hardware language with a one-dimensional systolic array and PE compute blocks. It was synthesized into an RTL circuit and routed, and timing optimization was performed.
[0131] - Accelerator peripheral setup: Utilize DDR and cache systems for data relay and caching, and achieve communication with the host computer via PCIe to complete end-to-end diagnosis of fault signals.
[0132] 6. Performance Evaluation:
[0133] - Diagnostic performance of the student model in PyCharm: The model was tested under different noise levels (-6dB, -4dB, -2dB, 0dB). The performance and robustness of the model were evaluated by calculating classification accuracy, confusion matrix and T-SNE visualization analysis.
[0134] - Diagnostic performance of student models in FPGA: By using the same data as in PyCharm for classification, and utilizing confusion matrix and classification accuracy, the classification accuracy of the FPGA accelerator and the degree of accuracy degradation after quantization are verified.
[0135] Experimental results:
[0136] - It achieves an average F1 score of 97% in different noise conditions in PyCharm, surpassing other classification models and significantly outperforming them in terms of parameter count.
[0137] -In FPGA
[0138] The classification performance is less than 0.7% lower than that of PyCharm, and it shows a clear advantage in inference time and energy efficiency compared to both CPU and GPU.
[0139] The systems, devices, modules, or units described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions.
[0140] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0141] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0142] The above embodiments should be understood as illustrative only and not as limiting the scope of protection of the present invention. After reading the description of the present invention, those skilled in the art can make various alterations or modifications to the present invention, and these equivalent changes and modifications also fall within the scope defined by the claims of the present invention.
Claims
1. A lightweight convolutional neural network-based bearing fault diagnosis method based on knowledge distillation, characterized in that, Includes the following steps: Step 1: First, collect the original vibration signal using an accelerometer installed near the rotating bearing. Then, perform a fast Fourier transform on the collected data to convert it from a time domain signal to a complex frequency domain signal, and then convert it to a real frequency domain signal, removing the redundant signal in the first half. Step 2: Construct a one-dimensional ResNet18 with optimized residual structure as the teacher network. By changing the parameters of the residual architecture to adapt it to the classification of fault signals, and using one-dimensional convolutional layers, max pooling layers, activation layers, and fully connected layers to form a lightweight convolutional neural network with a weight parameter of 1.95K as the student network. Step 3: Use normalized knowledge distillation to train the lightweight model, and add Gaussian white noise to the original signal for training the lightweight model; Step 4: Convert the weight parameters of the trained model from 32-bit floating-point numbers to 16-bit fixed-point numbers and save them to the ROM of the onboard FPGA for inference in the accelerator. Step 5: The accelerator uses a one-dimensional pulsating array as its core. For a single channel, multiple rows of one-dimensional pulsating arrays are used to form a computing block to accelerate single-channel inference, while simultaneously achieving accelerated inference for multiple channels. Step 6: Build the inference system in the FPGA system. Transfer data from the host to DDR4 in the FPGA development board via PCIe. Then, transfer the data from DDR4 to the buffer system composed of ping-pong system segment by segment and use it for accelerator inference.
2. The lightweight convolutional neural network bearing fault diagnosis method based on knowledge distillation according to claim 1, characterized in that, In step 1, the original signal undergoes a Fast Fourier Transform, and then is converted from the complex frequency domain to the real frequency domain to remove the redundant signal in the first half. The specific steps are as follows: (1) Divide the entire data into multiple segments with a length of 2048 as the baseline, and perform a 2048-point Fast Fourier Transform on each segment: in The signal is in the complex frequency domain after Fourier transform. For signals in the time domain, The number of sampling points. The imaginary unit, For frequency components; (2) Then the complex frequency domain signal is converted into a real frequency domain signal and the latter half is truncated: in For real-valued frequency domain signals, It is a complex frequency domain signal.
3. The lightweight convolutional neural network bearing fault diagnosis method based on knowledge distillation according to claim 1, characterized in that, The teacher network is constructed using a one-dimensional ResNet18 with optimized residual structure, and the residual architecture is modified as follows: in The residual function is BN, which is the normalization layer. For activation functions; This is the first convolutional layer; The first convolutional layer is: The kernel size is the convolution kernel size. For filling, It is paranoia; The second convolutional layer is: in This represents the computational results after the convolutional layer. For weight parameters, For bias; By converting traditional small-sized convolution kernels into large-sized convolution kernels, more relationships between individual sample points of vibration signals can be obtained during a single convolution calculation.
4. The lightweight convolutional neural network bearing fault diagnosis method based on knowledge distillation according to claim 1, characterized in that, The lightweight convolutional neural network architecture in step 2 is as follows: Where Y is a lightweight convolutional neural network. For the weights of the fully connected layer, Here, L represents the weights of the convolutional layer, and L represents the length of a sample. To flatten the dimensions, For the bias of the convolutional layer, This is used for biasing the fully connected layer.
5. The lightweight convolutional neural network bearing fault diagnosis method based on knowledge distillation according to claim 1, characterized in that, Step 3 utilizes normalized knowledge distillation to train the lightweight model, and adds Gaussian white noise to the original signal for lightweight model training. The specific steps are as follows: (1) Add the data with added Gaussian white noise to the original data and perform sample segmentation: in For signal-to-noise ratio, For input signal, Input noise; (2) The CrossEntropyLoss function was used as the training loss function for the teacher network, and the network was trained for 75 epochs: in For real labels in category The probability of it, Predicting categories for the model The probability, Total number of categories; (3) The training of the student network is divided into two parts. First, the original loss of the student network in the fault signal is calculated using the original cross-entropy loss function: in The tag value for each tag, Categorize and label students; Secondly, the teacher target class probability is obtained by using the cross-entropy loss in the original distillation loss. Normalize the probability of the student's target category to α: in Categorize and label students. Classify and label teachers. , These are normalized classification labels for teachers and students; Finally, the normalized knowledge distillation loss function of the student network is obtained by summing the two: in It is the normalized cross-entropy loss function. It is the original cross-entropy loss function. Let be the training loss function for the student network.
6. The lightweight convolutional neural network bearing fault diagnosis method based on knowledge distillation according to claim 1, characterized in that, The data quantization in step 4 mainly involves converting the trained model weight data from 32-bit floating-point data to 16-bit fixed-point data. Specifically: For stage functions, For the rounding function, The calculation process for the entire model is represented by 32-bit floating-point numbers, and the weight data is saved to the ROM of the onboard FPGA, where N is the number of bits in the mantissa.
7. The lightweight convolutional neural network bearing fault diagnosis method based on knowledge distillation according to claim 1, characterized in that, The specific design steps for the accelerator in step 5 are as follows: (1) The layers in the convolutional neural network architecture are fused into a fused neural layer that is separated based on the channel. This fused neural layer combines convolutional layers, normalization layers, and activation layers into one layer. Its main design core is to improve the efficiency of hardware accelerators. (2) The traditional PE processing unit calculation block is redesigned into a PE processing unit calculation block that can transfer the cumulative sum, and a one-dimensional pulse of a certain length is designed accordingly; (3) Divide a single data channel based on the length of a one-dimensional pulsating array, and divide the input data and weight data to achieve parallel computation of a single channel, and use the computation of a single channel as a basis to perform computation of other channels.
8. The lightweight convolutional neural network bearing fault diagnosis method based on knowledge distillation according to claim 1, characterized in that, The specific architecture of the FPGA inference system in step 4 is as follows: (1) Connect the onboard FPGA accelerator to the PC host via the PCIE interface, and continuously transmit data to the DDR4 (dual-rate synchronous dynamic random access memory) storage unit of the onboard FPGA via PCIE (high-speed serial interface); (2) A ping-pong cache is designed between DDR4 and the accelerator to ensure that the data read time of the accelerator is reduced, and a separate channel design is made to supply the calculation of each channel of the accelerator. (3) The calculation results are temporarily stored in FIFO, then saved to DDR4 and uploaded to the PC host computer via PCIE to display the accelerator's classification results, classification speed, computing performance, inference time parameters, and finally complete the FPGA deployment of the designed convolutional neural network and the transmission of related results.
9. An electronic device, characterized in that, The method includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the program, implements the lightweight convolutional neural network bearing fault diagnosis method based on knowledge distillation as described in any one of claims 1 to 8.
10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the lightweight convolutional neural network bearing fault diagnosis method based on knowledge distillation as described in any one of claims 1 to 8.
Citation Information
Patent Citations
A lightweight bearing fault diagnosis method based on uniform quantization and counter-distillation
CN119848662B