Fan abnormal sound detection method and device based on artificial intelligence neural network
By combining the improved EfficientNet and capsule networks, the problems of inconsistency between manual listening and high computational complexity of traditional methods in fan noise detection are solved, achieving efficient and accurate fan noise detection, which is suitable for resource-constrained industrial sites.
Patent Information
- Application Number
- CN202511357479.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-23
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2045-09-23
AI Technical Summary
Current technologies rely on manual listening for fan noise detection, which results in inconsistent detection results, low efficiency, and difficulty in meeting the needs of large-scale automated quality inspection in modern manufacturing. Furthermore, traditional deep learning methods have high computational complexity and insufficient feature representation.
A fan noise detection method based on a lightweight attention capsule network is adopted. Multi-scale feature extraction is performed through an improved EfficientNet, and an adaptive attention mechanism and a dynamic routing mechanism of the capsule network are introduced to dynamically select key feature blocks for fusion and classification.
It achieves efficient and accurate detection of abnormal fan noise, reduces the number of model parameters and computational complexity, is suitable for deployment in resource-constrained edge devices and industrial sites, and improves the robustness and consistency of detection.
Smart Images

Figure CN120853618A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of signal processing and deep learning, and in particular to a method and apparatus for detecting abnormal fan noise based on artificial intelligence neural networks. Background Technology
[0002] In fan manufacturing and quality control, abnormal noise detection is a crucial step in ensuring product performance stability and factory quality. Abnormal noises are typically caused by structural looseness, assembly errors, or material defects, and possess acoustic characteristics such as non-periodicity, non-steady-state behavior, and low energy, making their detection significantly more difficult than conventional noise assessment. Currently, traditional manual listening remains the mainstream method, with inspectors relying on experience to judge abnormal sounds during operation.
[0003] However, manual inspection has obvious limitations: on the one hand, the inspection results are highly dependent on the auditory sensitivity, professional experience and working conditions of the inspectors, and it is difficult to unify the judgment standards among different personnel, which can easily lead to subjective differences, missed detections or misjudgments; on the other hand, with the significant increase in fan production capacity, the low efficiency, low consistency and lack of traceability of manual inspection can no longer meet the needs of modern manufacturing for large-scale, automated and refined quality inspection.
[0004] To overcome the shortcomings of manual detection, academia and industry have gradually adopted deep learning-based acoustic anomaly detection methods in recent years. A typical process involves first converting the time-domain signal into a time-frequency graph using a short-time Fourier transform, and then performing image-level classification using a convolutional neural network. This approach has yielded positive results in improving the accuracy and automation of fan noise detection. However, traditional deep networks (such as ResNet) rely on a large number of samples, resulting in high computational complexity that is difficult to meet industrial needs. Furthermore, their ability to model spatial relationships between features is limited, leading to insufficient feature representation when dealing with complex or subtle anomalies. Summary of the Invention
[0005] This invention provides a method and apparatus for detecting abnormal fan noise based on artificial intelligence neural networks, aiming to solve at least one of the technical problems existing in the prior art.
[0006] The technical solution of this invention is a fan noise detection method based on artificial intelligence neural networks, comprising the following steps: S100. In the fan noise detection model based on lightweight attention capsule network, the time-frequency map is input into the improved efficiency network for multi-scale feature extraction. S200. An adaptive attention mechanism is introduced to perform weighted processing on feature blocks at multiple levels to obtain the normalized importance score of the feature blocks. S300. Arrange the normalized importance scores from high to low, and dynamically select the top three feature blocks in the normalized importance score ranking to obtain the output features of the three feature blocks. S400. The output features of the three feature blocks are fused to obtain fused features; S500. Input the fused features into the capsule network, and obtain the output vector of the higher-level capsule through the dynamic routing mechanism of the capsule network; S600. Input the output vector of the high-level capsule into a fully connected classifier and output the abnormal sound detection result.
[0007] According to some embodiments of the present invention, in step S200, The outputs of the feature blocks at multiple levels are linearly mapped to obtain a feature representation with a unified dimension. For each of the feature blocks, a corresponding attention weight parameter is set; The attention weight parameters are normalized using the Softmax function to obtain the normalized importance score of the feature block. The formula for calculating the normalized importance score of the feature block is as follows: , In the formula, α m The normalized importance score represents the feature block. a m Let be the attention weight parameter for the m-th feature block, N be the total number of feature blocks, and e be a natural constant.
[0008] According to some embodiments of the present invention, step S500 includes: S510. Input the fusion features into the lower capsules of the capsule network; S520. Input the output vector of the lower-level capsule into the dynamic routing mechanism of the capsule network to obtain the output vector of the higher-level capsule.
[0009] According to some embodiments of the present invention, in step S520, The output vector of the lower-level capsule is transformed by a weight matrix to generate a prediction vector, as follows: , In the formula, u j|i Represents the prediction vector, W ij The weight matrix is... u i The output vector of the lower capsule; Based on the current routing coefficients and the prediction vector, the input vector of the high-level capsule is calculated, as follows: , In the formula,c ij The current routing coefficient, S j Let be the input vector of the high-level capsule. For the natural constant e b ij Power of 1 b ij This indicates the affinity of the lower-layer capsule i for the higher-layer capsule j. For the natural constant e b ik Power of 1 b ik This indicates the affinity of the lower-level capsule i to the index k of the higher-level capsule; The input vector of the high-level capsule is scaled and compressed using the squash nonlinear activation function to obtain the output vector of the high-level capsule, as shown below: , In the formula, V j Let ‖•‖ be the output vector of the high-level capsule, and let ‖•‖ denote the modulus length. This represents the squash nonlinear activation function.
[0010] According to some embodiments of the present invention, the loss function during training of the fan noise detection model is expressed as follows: , In the formula, L is the loss function. y i For real category labels, p i The probability output by the model.
[0011] According to some embodiments of the present invention, the improved performance network consists of nine stages: the first stage includes a 3×3 Conv module; the second stage includes an MBConv1 module with 3×3 convolutional kernels; the third stage includes an MBConv6 module with 3×3 convolutional kernels; the fourth stage includes an MBConv6 module with 5×5 convolutional kernels; the fifth stage includes an MBConv6 module with 3×3 convolutional kernels; the sixth stage includes an MBConv6 module with 5×5 convolutional kernels; the seventh stage includes an MBConv6 module with 5×5 convolutional kernels; the eighth stage includes an MBConv6 module with 3×3 convolutional kernels; and the ninth stage includes a 1×1 Conv module and an FC module.
[0012] According to some embodiments of the present invention, before step S100, the fan noise detection method based on artificial intelligence neural network further includes: The fan speed pulse signal is recorded synchronously during the acquisition of the fan sound signal and the process of acquiring the fan sound signal. Convert the fan sound signal from an analog signal to a digital signal; The converted fan sound signal undergoes preprocessing. Based on the fan speed pulse signal, analyze the trend of speed change over time; Based on the trend of the rotation speed over time, the steady phase of fan operation is identified, and the steady phase sound signal is extracted from the preprocessed fan sound signal. The stable segment of the sound signal is subjected to A-weighting processing; A short-time Fourier transform is performed on the stationary segment of the sound signal after A-weighting to obtain the time-frequency diagram.
[0013] According to some embodiments of the present invention, A-weighting processing is performed on the stationary segment sound signal, as shown below: , In the formula, H A ( f ) represents the frequency response function of A-weighted frequency response. f The frequency of the audio signal; The definition of the short-time Fourier transform is expressed as follows: , In the formula, This represents the short-time Fourier transform. x ( t The original signal is the stationary segment of the sound signal after A-weighting processing. w ( t - τ () is a window function, representing the weighting of the signal around time t. τ The center time point of the window, e is the natural constant. = It represents the imaginary unit.
[0014] The present invention also relates to a computer device, including a memory and a processor, wherein the processor executes the method described above when executing a computer program stored in the memory.
[0015] The present invention also relates to a computer-readable storage medium having program instructions stored thereon, which, when executed by a processor, implement the method described above.
[0016] The beneficial effects of this invention include: converting the fan sound signal into a time-frequency graph; then, efficiently extracting multi-scale acoustic features using an improved efficiency network; subsequently, selecting and fusing feature blocks from multiple levels through an adaptive attention mechanism to retain key information. Next, the fused features are input into a capsule network, where the dynamic routing mechanism further models the spatial relationships and structural dependencies between features, thereby enhancing the model's expressive power and robustness to abnormal sound features. Finally, an abnormal sound detection result is output through a fully connected classifier, which facilitates accurate judgment of abnormal fan conditions.
[0017] An improved efficiency network is used as the backbone network for feature extraction. Unlike traditional complex deep network structures, it significantly reduces the number of model parameters and computational complexity. While ensuring feature representation capabilities, it is more suitable for deployment in resource-constrained edge devices or embedded systems in industrial settings.
[0018] By introducing capsule networks as a classification structure, which differs from traditional fully connected layer classifiers, the model captures the spatial structural relationships and hierarchical dependencies between features through a dynamic routing mechanism, significantly enhancing the model's understanding of the complex distribution characteristics of abnormal sounds in the spectrum and its robust modeling.
[0019] Furthermore, additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description
[0020] Figure 1 This is an optional flowchart of a fan noise detection method based on artificial intelligence neural networks in an embodiment of the present invention.
[0021] Figure 2 This is a schematic diagram of the abnormal sound detection test bench in an embodiment of the present invention.
[0022] Figure 3 This is a schematic diagram of a fan noise detection model based on a lightweight attention capsule network in an embodiment of the present invention.
[0023] Figure 4 This is a schematic diagram of the dynamic routing process in an embodiment of the present invention.
[0024] Figure 5 This is an optional flowchart of a fan noise detection method based on artificial intelligence neural networks in an embodiment of the present invention. Detailed Implementation
[0025] The following will provide a clear and complete description of the concept, specific structure, and technical effects of the present invention in conjunction with the embodiments and accompanying drawings, so as to fully understand the purpose, solution, and effects of the present invention. It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other.
[0026] It should be noted that, unless otherwise specified, when a feature is referred to as "fixed" or "connected" to another feature, it can be directly fixed or connected to the other feature, or indirectly fixed or connected to the other feature. Furthermore, the descriptions of "upper," "lower," "left," "right," "top," and "bottom" used in this invention are only relative to the relative positional relationships of the various components of the invention in the accompanying drawings.
[0027] Furthermore, unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art. The terminology used in this specification is for the purpose of describing particular embodiments only and not for limiting the invention. The term "and / or" as used herein includes any combination of one or more of the associated listed items.
[0028] It should be understood that although the terms first, second, third, etc., may be used to describe various elements in this invention, these elements should not be limited to these terms. These terms are only used to distinguish elements of the same type from each other. For example, a first element may also be referred to as a second element without departing from the scope of this invention, and similarly, a second element may also be referred to as a first element.
[0029] Reference Figures 1 to 5 In some embodiments, the fan noise detection method based on artificial intelligence neural networks of the present invention includes at least the following steps: S100. In the fan noise detection model based on lightweight attention capsule network, the time-frequency map is input into the improved efficiency network for multi-scale feature extraction. S200. An adaptive attention mechanism is introduced to perform weighted processing on feature blocks at multiple levels to obtain the normalized importance score of the feature blocks. S300: Arrange the normalized importance scores from high to low, dynamically select the top three feature blocks in the normalized importance score ranking, and obtain the output features of the three feature blocks. S400. The output features of the three feature blocks are fused to obtain the fused features; S500: Input the fused features into the capsule network, and obtain the output vector of the high-level capsule through the dynamic routing mechanism of the capsule network; S600: Input the output vector of the high-level capsule into the fully connected classifier and output the abnormal sound detection result.
[0030] Specifically, the efficient network is referred to as EfficientNet. EfficientNet is a high-efficiency convolutional neural network whose core idea is "compound scaling," which uses Neural Architecture Search (NAS) to jointly optimize the three dimensions of depth, width, and resolution at once, rather than scaling only one of them in the traditional way.
[0031] As can be seen, the fan sound signal is converted into a time-frequency image, and then multi-scale acoustic features are efficiently extracted using an improved efficiency network. Subsequently, an adaptive attention mechanism is used to select and fuse feature blocks from multiple levels to retain key information. The fused features are then input into a capsule network, where the dynamic routing mechanism further models the spatial relationships and structural dependencies between features, thereby enhancing the model's expressive power and robustness towards abnormal noise features. Finally, a fully connected classifier outputs the abnormal noise detection results, which is beneficial for accurately judging the abnormal state of the fan. The improved efficiency network used as the feature extraction backbone network differs from traditional complex deep network structures, significantly reducing the number of model parameters and computational complexity. While ensuring feature expressive power, it is more suitable for deployment in resource-constrained edge devices or embedded systems in industrial settings. The introduction of a capsule network as the classification structure differs from traditional fully connected layer classifiers. Through a dynamic routing mechanism, it captures the spatial structural relationships and hierarchical dependencies between features, significantly enhancing the model's understanding and robust modeling of the complex distribution characteristics of abnormal noise in the spectrum.
[0032] The specific implementation method of step S100 is as follows: In the fan noise detection model based on the Lightweight Attention Capsule Network (LACNet), the method of this invention inputs the time-frequency graph into an improved efficiency network for multi-scale feature extraction.
[0033] The high-efficiency network is EfficientNet. Specifically, EfficientNet is a highly efficient convolutional neural network based on a composite scaling strategy. Unlike traditional CNN models that simply increase the network size unilaterally, it introduces a composite scaling factor, adjusting the depth, width, and resolution simultaneously. This allows for a better balance between performance and efficiency under limited computational resources. This strategy has demonstrated significant efficiency advantages in practical industrial applications such as detecting abnormal noise in micro fans.
[0034] In some embodiments, the improved performance network consists of nine stages: the first stage includes a 3×3 Conv module; the second stage includes an MBConv1 module with 3×3 convolutional kernels; the third stage includes an MBConv6 module with 3×3 convolutional kernels; the fourth stage includes an MBConv6 module with 5×5 convolutional kernels; the fifth stage includes an MBConv6 module with 3×3 convolutional kernels; the sixth stage includes an MBConv6 module with 5×5 convolutional kernels; the seventh stage includes an MBConv6 module with 5×5 convolutional kernels; the eighth stage includes an MBConv6 module with 3×3 convolutional kernels; and the ninth stage includes a 1×1 Conv module and an FC module (fully connected layer).
[0035] See Table 1, which shows the EfficientNet structure before improvement. The improvement strategy for the efficiency network is to retain only the first MBConv6 module in Stages 3 to 7, and remove the remaining modules.
[0036] Table 1 EfficientNet Structure Stage Operator Resolution Channels Layers 1 Conv3×3 224 32 1 2 MBConv1, k3×3 112 16 1 3 MBConv6, k3×3 112 24 2 4 MBConv6, k5×5 56 40 2 5 MBConv6, k3×3 28 80 3 6 MBConv6, k5×5 14 112 3 7 MBConv6, k5×5 14 192 4 8 MBConv6, k3×3 7 320 1 9 Conv1×1, FC 7 1280 1 In a specific embodiment, standard convolutional layers are used to reduce the feature map size and extract initial low-level anomaly features; the initial low-level anomaly features are input into multiple stacked MBConv modules to extract deeper feature information layer by layer.
[0037] Specifically, the model's workflow is as follows: First, a standard convolutional layer is used to rapidly reduce the feature map size while extracting initial low-level anomaly features. Next, the main body consists of multiple stacked MBConv modules, used to extract feature information layer by layer. Finally, the model compresses the feature map using a global average pooling layer, and then completes the classification task through a fully connected layer. During this process, Dropout is added before the fully connected layer to enhance generalization ability and reduce the risk of overfitting.
[0038] The core unit of EfficientNet is the MBConv module, which consists of extended convolutions, depthwise separable convolutions, and pointwise convolutions, designed to achieve efficient extraction of heterophonic features and optimized computation. Furthermore, this module introduces the SE attention mechanism, which adaptively adjusts channel weights to enhance key information; it employs the Swish activation function to improve non-linear expressiveness; and it mitigates the vanishing gradient problem through skip connections.
[0039] In some embodiments, prior to step S100, the fan noise detection method based on an artificial intelligence neural network further includes: The fan speed pulse signal is recorded synchronously during the acquisition of the fan sound signal and the process of acquiring the fan sound signal. Convert the fan sound signal from an analog signal to a digital signal; The converted fan sound signal undergoes preprocessing. Analyze the trend of fan speed change over time based on the fan speed pulse signal; Based on the trend of fan speed change over time, the steady phase of fan operation is identified, and the steady phase sound signal is extracted from the pre-processed fan sound signal. A-weighting is applied to the audio signal during the steady-state segment; A short-time Fourier transform is performed on the stationary segment of the sound signal after A-weighting to obtain the time-frequency diagram.
[0040] In a specific embodiment, the preprocessing operations include filtering, transformation, and feature extraction operations.
[0041] In some embodiments, A-weighting is applied to the stationary segment of the audio signal, as shown below: , In the formula, H A ( f ) represents the frequency response function of A-weighted frequency response. f Audio signal frequency (unit: Hz); The definition of the short-time Fourier transform is expressed as follows: , In the formula, Represents the short-time Fourier transform. x ( t The original signal is the stationary segment of the sound signal after A-weighting processing. ( () is a window function, representing the weighting of the signal around time t. The center time point of the window, e is the natural constant. = It represents the imaginary unit.
[0042] It should be understood that, see Figure 2To reduce environmental noise interference and improve audio signal acquisition quality, this invention constructs a dedicated experimental platform within a high-performance soundproof enclosure for collecting fan noise detection data. The experimental platform consists of a power supply, sound card, high-sensitivity microphone, speed control module, and signal conditioner. The fan operates under simulated actual production conditions, with a power supply voltage of 12V and a constant speed of 3600rpm. The fan sound signal is acquired by a microphone installed 5cm directly above the center of the fan. This position effectively reduces environmental noise interference while preventing the fan airflow from directly impacting the microphone and generating additional noise. The audio sampling frequency is set to 48kHz to fully capture high-frequency components. All analog signals are converted to digital signals via a high-precision A / D conversion module to ensure data integrity and accuracy. Furthermore, to achieve precise alignment between the fan sound signal and the fan's mechanical state, fan speed pulse signals (two pulses per revolution) are recorded synchronously during acquisition, providing a timing reference for subsequent feature analysis. After acquisition, all data is transmitted to a preprocessing unit for subsequent filtering, transformation, and feature extraction operations.
[0043] Understandably, to improve data quality and ensure the stability of modeling samples, it is necessary to identify and extract effective signal segments from the collected raw fan sound signals, specifically those in a stable operating state. During fan startup and shutdown, the sound signal is easily affected by unstable factors such as starting current surges and speed fluctuations. Such signals are not representative and may introduce noise, impacting model performance. Therefore, fan speed pulse signals (two pulses per revolution) are recorded synchronously during acquisition, and a speed change curve is constructed based on this. By analyzing the speed change trend over time, the stable operating phase of the fan is identified, and the sound signal within this time period is extracted for subsequent processing. Compared to non-steady-state signals, stable segment data more accurately reflects the normal operating state of the fan and its potential abnormal noise characteristics, helping to improve the accuracy and robustness of the abnormal noise detection model.
[0044] Specifically, A-weighting is a weighting method used to simulate the human ear's perception of the loudness of sounds at different frequencies. By applying A-weighting to the extracted stationary segment of the sound signal, the processed signal can better match the human ear's subjective perception of sound loudness, thereby helping to extract more meaningful and relevant sound features.
[0045] A-weighting is a weighting method used to simulate the human ear's perception of loudness at different frequencies. Based on equal-loudness curves, it weights different frequency components of a sound signal in acoustic measurements to make the measurement results more closely match the subjective perception of the human ear. The main function of A-weighting is to attenuate low-frequency sounds to a certain extent while appropriately boosting high-frequency sounds, thereby reflecting the characteristics of the human ear in terms of loudness perception.
[0046] A-weighted frequency response functionH A ( f )for: , In the formula, f The frequency of the audio signal (unit: Hz).
[0047] It should be understood that many real-world sound signals are non-stationary, with their frequency components varying over time. To effectively analyze these non-stationary signals, this invention employs Short-Time Fourier Transform (STFT) for time-frequency analysis. This method transforms the signal from the time domain to the time-frequency domain, thereby obtaining the signal's distribution information in both time and frequency. It can simultaneously obtain the frequency characteristics of the signal at different time points, revealing the trend of the signal's spectrum changing over time. In this invention, a Short-Time Fourier Transform is performed on the A-weighted signal to ultimately obtain the time-frequency diagram.
[0048] Short-Time Fourier Transform (STFT) is a method for analyzing non-stationary signals. By transforming the signal from the time domain to the time-frequency domain, it can simultaneously acquire the frequency components of the signal at different points in time, thus showing the change of the signal's spectrum over time. The basic idea of STFT is to divide the signal into multiple short time intervals, apply a window function weighting to the signal, and then perform a Fourier transform within each short time interval to analyze its spectrum.
[0049] Assuming the original signal is x(t) and the window function is w(t), the definition of the short-time Fourier transform is: , In the formula, x ( t () represents the original signal. ( () is a window function, representing the weighting of the signal around time t. The center time point of the window represents the location of the spectral analysis, where e is the natural constant. = It represents the imaginary unit.
[0050] In the spectrum, the frequency resolution Δf = Fs / N = 5Hz, where Fs is the sampling frequency of 48kHz and N is the window length, i.e., the number of FFT points. The overlap ratio is 90%, and the Blackman-Harris window function is used.
[0051] The specific implementation methods of steps S200, S300 and S400 are as follows: The method of this invention introduces an adaptive attention mechanism to perform weighted processing on feature blocks at multiple levels to obtain normalized importance scores for the feature blocks; the normalized importance scores are arranged from high to low, and the top three feature blocks with the highest normalized importance scores are dynamically selected to obtain the output features of the three feature blocks; the output features of the three feature blocks are fused to obtain fused features.
[0052] In some embodiments, in step S200, The outputs of feature blocks at multiple levels are linearly mapped to obtain a feature representation with a unified dimension. Set a corresponding attention weight parameter for each feature block; The attention weight parameters are normalized using the Softmax function to obtain the normalized importance score of the feature block. The formula for calculating the normalized importance score of the feature block is as follows: , In the formula, α m The normalized importance score represents the feature block. a m Let be the attention weight parameter for the m-th feature block, N be the total number of feature blocks, and e be the natural constant.
[0053] Specifically, to enhance the model's ability to extract key features, an adaptive attention mechanism is introduced after the feature extraction network. By introducing trainable attention weights, the model can automatically learn and focus on the feature representations that contribute the most to the final classification task from multiple feature block outputs, thereby effectively improving the targeting and discriminativeness of feature selection.
[0054] Suppose there are N feature extraction blocks in the network, and the output of each block is a feature representation of a uniform dimension after linear mapping. For each block m∈{1, 2, 3, …, N}, define a trainable scalar attention parameter. a m Let the set of attention parameters for all Blocks be: , In the formula, a m Let m be the original attention score of the m-th block; then, the attention parameters are normalized using the Softmax function to obtain the normalized importance score of each block. a m The calculation formula is as follows: , In the formula, α mRepresents the normalized importance score of the feature block, where N is the total number of feature blocks and e is the natural constant; After normalization, the importance scores for each block are used as a basis. a m The top three highest-scoring blocks are selected as low-level capsules. These features are then fed into the dynamic routing module for further extraction and aggregation of high-level features.
[0055] With the help of a dynamic routing mechanism, low-level capsule features undergo information aggregation and abstraction in multiple iterations, thereby generating more discriminative high-level feature representations and providing more reliable support for the final classification task.
[0056] Specifically, the Softmax function is a normalized exponential function used to map any real vector to a probability distribution such that the output values are between 0 and 1 and sum to 1.
[0057] Specific implementation method of step S500: The method in this embodiment of the invention fuses features into a capsule network and obtains the output vector of the higher-level capsules through the dynamic routing mechanism of the capsule network.
[0058] In some embodiments, step S500 includes: S510. Input the fused features into the lower-level capsules of the capsule network; S520. Input the output vector of the lower-level capsule into the dynamic routing mechanism of the capsule network to obtain the output vector of the higher-level capsule.
[0059] In some embodiments, in step S520, The output vector of the lower-level capsule is transformed by a weight matrix to generate a prediction vector, as shown below: , In the formula, u j|i Represents the prediction vector. W ij This is the weight matrix. u i This is the output vector of the lower-level capsule; Based on the current routing coefficients and prediction vector, the input vector of the high-level capsule is calculated as follows: , In the formula, c ij The current routing coefficient, S j Let be the input vector of the high-level capsule. For the natural constant e b ijPower of 1 b ij This indicates the affinity of lower-layer capsule i for higher-layer capsule j. For the natural constant e b ik Power of 1 b ik This represents the affinity of lower-level capsule i to index k of higher-level capsule; Based on the squash nonlinear activation function, the input vector of the high-level capsule is scaled and compressed to obtain the output vector of the high-level capsule, as shown below: , In the formula, V j Let ‖•‖ be the output vector of the high-level capsule, and let ‖•‖ denote the modulus length. This represents the squash non-linear activation function.
[0060] Understandably, capsule networks emerged to address the shortcomings of traditional convolutional neural networks in modeling spatial hierarchical relationships (such as position, orientation, and pose). These networks replace traditional neurons with capsule units, each capsule containing a group of neurons whose output is a vector rather than a scalar. The vector length represents the probability of a feature's existence, while the orientation encodes its attribute information. The core of capsule networks is a dynamic routing mechanism, which allows the output of lower-level capsules to dynamically adjust its propagation path based on the responses of higher-level capsules, thus more effectively capturing the spatial hierarchical relationships between local features and the overall pattern. See also... Figure 4 The specific dynamic routing process is as follows: The output vector of the lower-level capsule is transformed by a weight matrix to generate a prediction vector: , In the formula, u j|i Represents the prediction vector. W ij This is the weight matrix. u i This is the output vector of the lower-level capsule; Based on the current routing coefficients, the input vector of the high-level capsule is calculated as follows: , In the formula, c ij The current routing coefficient, S j Let be the input vector of the high-level capsule. For the natural constant e b ij Power of 1 b ijThis indicates the affinity of lower-layer capsule i for higher-layer capsule j. For the natural constant e b ik Power of 1 b ik This represents the affinity of lower-level capsule i to index k of higher-level capsule; Based on the squash nonlinear activation function, the input vector of the high-level capsule is scaled and compressed so that the vector direction remains unchanged, but the magnitude is between (0, 1), as shown below: , In the formula, V j Let be the output vector of the high-level capsule, and ‖•‖ denote the modulus length.
[0061] In another implementation, the top three highest-scoring Blocks are selected as low-level capsules. These low-level capsule features are then input into a dynamic routing mechanism for the extraction and aggregation of high-level features, resulting in a high-level feature representation.
[0062] Specifically, the squash nonlinear activation function is a mapping designed specifically for vector neurons in Capsule Networks. Its core function is to compress the length of a vector to the range (0,1) without destroying its direction, thereby interpreting the magnitude of the vector as the "probability of the existence of an entity".
[0063] Specific implementation method of step S600: The method in this embodiment of the invention inputs the output vector of the high-level capsule into a fully connected classifier and outputs the abnormal sound detection result.
[0064] Specifically, the abnormal noise detection results include classification prediction results and anomaly determination probabilities. Among them, the classification prediction results include category 0 and category 1, where category 0 represents "abnormal noise fan" and category 1 represents "normal fan".
[0065] In some embodiments, the loss function for training the fan noise detection model is expressed as follows: , In the formula, L is the loss function. y i For real category labels, p i The probability output by the model.
[0066] See Figure 5It should be understood that model training is implemented based on the PyTorch framework. Before model training, the following operations are required: First, the generated time-frequency images are uniformly resized, scaling all images to 224×224 to meet the input requirements of the EfficientNet backbone network. Then, the images are standardized to improve numerical stability and convergence speed during training. Next, the standardized sample set is randomly shuffled, and the dataset is divided into training and test sets at a ratio of 80% and 20% respectively, ensuring the independence of the training and evaluation processes and preventing data leakage. The samples in the training set are used for feature learning and model parameter optimization, while the test set is used for performance evaluation and generalization validation. Image labels are assigned based on human listening results; "normal fan" is defined as category 1, and "abnormal fan" is defined as category 0.
[0067] During the training phase, the cross-entropy loss function is used as the optimization objective to measure the difference between the model output and the true label. Its formula is as follows: , In the formula, y i For real category labels, p i The probability output by the model.
[0068] An optimization algorithm is used to update the network weights. In this invention, the Adam optimizer is used, which has the characteristic of adaptive learning rate, which can accelerate convergence and prevent overfitting.
[0069] The learning rate is set to 0.001. The learning rate determines the step size for each update of the model parameters. A smaller learning rate ensures a smoother convergence process, but may result in longer training time.
[0070] The batch size is set to 32. This means that 32 samples are used to calculate the gradient and update the network parameters each time optimization is performed. Smaller batch sizes can lead to unstable training, but they are more computationally efficient.
[0071] The number of training epochs is set to 50.
[0072] The Dropout mechanism is introduced during training to improve the model's generalization ability and alleviate overfitting. This mechanism can effectively reduce the model's overfitting dependence on local features, thereby improving the model's robustness.
[0073] After model training is complete, the crucial step is testing and evaluating its performance. To comprehensively evaluate the performance of the detection model, this invention introduces accuracy, precision, recall, F1 score, and AUC based on the confusion matrix: , , , , In the formula, TP: the actual voice is abnormal, and the model also predicts it as abnormal; FN: the actual voice is abnormal, but the model predicts it as normal; FP: the actual voice is normal, but the model predicts it as abnormal; TN: the actual voice is normal, and the model also predicts it as normal. Acc is accuracy, Pre is precision, and Rec is recall.
[0074] It should be noted that, see Figure 3 To meet the demand for efficient detection of abnormal noise from micro fans under small sample conditions in industrial scenarios, this invention designs a detection model that integrates a lightweight backbone network and a capsule mechanism. First, to adapt to the actual needs of industrial applications, the original EfficientNet structure is optimized. Given that abnormal noise detection mainly relies on short-term or mid-level local anomaly features and has a weaker dependence on deep semantic abstraction features, and considering the feature redundancy and limited gain of the repeatedly stacked MBConv modules in Stages 3 to 7, only the first MBConv module in each stage is retained, and the remaining modules are removed. This strategy effectively reduces model complexity and computational overhead while maintaining the ability to extract the main discriminative features, improving training and inference efficiency. Second, since features at different scales have different representational capabilities, an adaptive attention mechanism is introduced to weight the multi-scale features output from each layer, dynamically selecting the most representative Top-3 features for subsequent analysis. This effectively suppresses redundant interference, highlights key regions, and improves the model's discriminative and generalization abilities. Finally, a dynamic routing mechanism of capsule networks is introduced in the feature fusion stage to enhance the spatial structure modeling capability between local details and global patterns, improve the structural integrity and semantic accuracy of feature representation, and optimize anomaly detection performance.
[0075] Understandably, after completing the model structure design and parameter training optimization, the intelligent fan noise detection model based on a lightweight backbone network and capsule mechanism will be permanently saved. This includes the backbone network structure, feature selection module, capsule network classifier, and the optimal weight parameters obtained during training. This model can be directly loaded and used in subsequent applications without retraining, thus significantly saving computing resources and deployment time.
[0076] In practical detection tasks, standardization preprocessing and feature transformation of newly acquired fan sound signals are the primary steps. The specific process is as follows: First, the sound signal during the stable operation phase of the fan is captured, avoiding interference from the start-up and shutdown phases. Second, the signal is processed using A-weighting to make it more consistent with human auditory perception. Then, a Short-Time Fourier Transform (STFT) is used to convert the one-dimensional time signal into a two-dimensional time-frequency graph, which serves as the input to the model. To ensure the consistency and accuracy of the prediction results, the entire preprocessing process must be strictly aligned with the data processing methods used in the training phase.
[0077] After time-frequency mapping, the data is input into the trained EfficientNet backbone network for multi-scale feature extraction. Next, an adaptive attention mechanism automatically selects multiple discriminative intermediate feature blocks and fuses them into a low-level capsule representation. This fused feature is then input into the capsule network, where a dynamic routing mechanism models spatial structural relationships and aggregates high-level semantic information. Finally, the model outputs a classification prediction result for the input sample and provides anomaly detection probabilities, thus enabling rapid and intelligent judgment of whether a fan has abnormal noise. This model ensures detection accuracy while possessing good lightweightness and deployability, making it suitable for large-scale abnormal noise detection tasks of fan products in industrial scenarios.
[0078] It should be understood that this invention uses an improved EfficientNet as the backbone network for feature extraction. Unlike traditional complex deep network structures, it significantly reduces the number of model parameters and computational complexity, making it more suitable for deployment in resource-constrained edge devices or embedded systems in industrial settings while ensuring feature representation capabilities.
[0079] This invention introduces capsule networks as a classification structure, which differs from traditional fully connected layer classifiers. Capsule networks utilize a dynamic routing mechanism to capture the spatial structural relationships and hierarchical dependencies between features, significantly enhancing the model's ability to understand the complex distribution characteristics of abnormal sounds in the spectrum and its robust modeling capabilities.
[0080] Compared to deep networks that rely on complex architectures and large numbers of samples, this invention has a more compact structure, good real-time performance and versatility, and is suitable for the needs of batch, efficient and automated detection of fan noise in actual production environments. It solves the problem that traditional manual listening and inefficient detection methods are difficult to adapt to modern industrial quality inspection processes.
[0081] By employing data preprocessing and STFT feature extraction technology, the impact of background noise can be significantly reduced, thereby ensuring the stability and reliability of the detection results.
[0082] Specifically, to verify the effectiveness of the proposed method, experiments were conducted on the publicly available MIMII dataset. The MIMII dataset covers the operating sounds of various industrial equipment, such as pumps, fans, sliding doors, and valves, under normal and abnormal conditions, and is widely used in the field of industrial noise detection and fault diagnosis. This experiment selected audio signals from the fan category in the MIMII dataset for verification, and fixed data samples with a specific signal-to-noise ratio. There were 400 normal and 400 abnormal noise samples, with a training set to test set sample ratio of 8:2.
[0083] To evaluate the performance of the proposed improved model in fan noise detection, this invention conducted a comparative analysis with several deep learning models. The parameter values for each model are shown in Table 2. All models were trained independently on the same training and test sets, and the experimental environment and training hyperparameters were kept consistent. Each model was trained five times, and the average value was used as the final result to ensure the comparability and statistical reliability of the experimental results. The experimental results are shown in Table 3.
[0084] Table 2 Parameter Quantities for Each Model Model EfficientNet ResNet50 MobileNetV2 DenseNet121 This article's model Model size (M) 27.5 89.9 8.72 27.1 7.96 Table 3 Comparison Experiment Results of MIMII Dataset Model Accuracy (%) Precision Recall F1 Score AUC EfficientNet 93.16 97.49 88.69 92.81 99.46 ResNet50 92.26 96.86 87.62 91.87 99.24 MobileNetV2 92.66 93.45 91.87 92.60 98.49 DenseNet121 93.69 93.22 94.29 93.73 98.33 LACNet 97.32 97.24 97.42 97.32 99.49 Overall, LACNet performs exceptionally well across all performance metrics. Its accuracy of 97.32% is higher than other comparative models. Precision is 97.24%, and recall is 97.42%, maintaining a good balance between the two. Its F1 score of 97.32% is the highest among all models, indicating that it maintains classification accuracy while also possessing strong outlier detection capabilities. Furthermore, its AUC value of 99.49% demonstrates strong classification and discriminative abilities.
[0085] Among the comparative models, EfficientNet achieved a high precision (97.49%), but its recall was relatively low (88.69%), indicating a risk of missed detections. MobileNetV2 had relatively balanced metrics, but its overall performance was slightly lower than LACNet. DenseNet121 achieved a precision close to LACNet, but its F1 score still lagged behind.
[0086] Comprehensive analysis shows that the proposed model (LACNet) effectively improves the detection capability of fan noise through multi-layer feature fusion and capsule structure design. In complex acoustic scenarios, the model exhibits stronger robustness and adaptability.
[0087] Specifically, to further verify the adaptability of the proposed model in real industrial application scenarios, this invention conducted application-level abnormal noise detection experiments using real fan data based on the aforementioned self-built experimental platform. The collected data originated from the natural operating state of fans during actual production processes, including complex background noise and diverse operating condition disturbances, which can realistically simulate the acoustic environment of industrial sites. Through testing on this dataset, the system evaluates the model's robustness, generalization ability, and practical usability under real operating conditions, thereby comprehensively verifying its deployment potential in industrial quality inspection scenarios.
[0088] A total of 409 samples were constructed for the acoustic dataset of miniature fans, including 212 normal samples and 197 abnormal noise samples, covering a variety of typical abnormal noise fault types, which have certain representativeness and engineering reference value. The experimental data are shown in Table 4.
[0089] Table 4 Comparison Experiment Results of Self-Built Dataset Model Accuracy (%) Precision Recall F1 Score AUC EfficientNet 92.62 89.94 97.87 93.70 96.01 ResNet50 91.19 87.54 98.30 92.59 94.42 MobileNetV2 92.38 91.88 94.89 93.27 94.25 DenseNet121 93.10 93.01 94.89 93.84 96.15 This article's model 96.13 93.97 99.47 96.64 97.11 The comparative experimental results on the self-built fan noise dataset are shown in Table 4. The model proposed in this invention achieves superior performance in all five evaluation metrics. The accuracy reaches 96.13%, a significant improvement over other models, reflecting higher discrimination ability. The precision and recall are 93.97% and 99.47% respectively, with a small difference between them, indicating that the model combines high accuracy and low false negative rate in anomaly sample identification. The F1 score is 96.64%, the highest among all models, demonstrating strong comprehensive recognition performance. The AUC value reaches 97.11%, indicating good stability and robustness in distinguishing between positive and negative samples. Compared to the MIMII dataset mentioned above, the accuracy of the model in fan noise detection decreases slightly, mainly due to interference from industrial environmental noise during audio signal acquisition, which affects the detection results. However, the overall results basically meet the requirements of actual industrial applications. In summary, the model of this invention combines advantages in accuracy and lightweight design, demonstrating good application prospects in actual industrial noise detection.
[0090] Specifically, after completing the training and optimization of the model, in order to further verify its generalization ability and practicality on unknown samples, this invention conducted two blind tests on the trained model. The blind test samples were not involved in the model training and testing process, and came from independently collected real fan operation data, which had a certain degree of sample diversity and environmental disturbance characteristics to ensure the scientificity and objectivity of the evaluation results.
[0091] In each blind test, the newly acquired fan sound data is first preprocessed, and a standardized time-frequency graph is generated based on the same parameter settings as during the training phase. Then, the optimal LACNet model weights, which have been trained and saved, are loaded, and the generated time-frequency graph is input into the model for inference and prediction. The blind test samples did not appear during model training and validation, ensuring the independence and objectivity of the evaluation. After prediction, the model output is compared one by one with the manually labeled real labels to evaluate the model's recognition performance in real-world industrial scenarios.
[0092] The results of the two blind tests are shown in Tables 5 and 6. The model's prediction accuracy remained at a high level throughout, and it was highly consistent with human listening judgment in each round. This result fully verifies the stability and robustness of the constructed model under different sample distributions and potential interference conditions. The successful implementation of the blind test process not only demonstrates the model's good generalization ability in practical applications, but also indirectly confirms the scientific nature and effectiveness of the feature extraction strategy and parameter configuration scheme, providing strong support for the engineering implementation of the model in the automatic detection of fan noise.
[0093] Table 5 Results of the first blind test Table 6 Results of the Second Blind Test This invention also provides a computer device including a memory and a processor, wherein the processor performs the above-described method when executing a computer program stored in the memory.
[0094] This invention also provides a computer-readable storage medium storing program instructions thereon, which, when executed by a processor, implement the method described above.
[0095] It should be understood that the method steps in the embodiments of the present invention can be implemented or carried out by computer hardware, a combination of hardware and software, or by computer instructions stored in a non-transitory computer-readable storage medium. The method can use standard programming techniques. Each program can be implemented in a high-level procedural or object-oriented programming language to communicate with the computer system. However, if necessary, the program can be implemented in assembly or machine language. In any case, the language can be a compiled or interpreted language. Furthermore, for this purpose, the program can run on a programmed application-specific integrated circuit (ASIC).
[0096] Furthermore, the procedures described herein may be performed in any suitable order unless otherwise indicated herein or otherwise clearly contradicted by the context. The procedures described herein (or variations and / or combinations thereof) may be executed under the control of one or more computer systems configured with executable instructions, and may be implemented by hardware or a combination thereof as code (e.g., executable instructions, one or more computer programs, or one or more applications) that commonly executes on one or more processors. The computer program comprises a plurality of instructions executable by one or more processors.
[0097] Furthermore, the method can be implemented in any suitable type of computing platform, including but not limited to personal computers, minicomputers, mainframes, workstations, networked or distributed computing environments, standalone or integrated computer platforms, or in communication with charged particle tools or other imaging devices, etc. Aspects of the invention can be implemented as machine-readable code stored on a non-transitory storage medium or device, whether removable or integrated into a computing platform, such as a hard disk, optical read and / or write storage medium, RAM, ROM, etc., such that it is readable by a programmable computer, and when the storage medium or device is read by the computer, it can be used to configure and operate the computer to perform the processes described herein. Furthermore, the machine-readable code, or portions thereof, can be transmitted via wired or wireless networks. The invention described herein includes these and other different types of non-transitory computer-readable storage media when such media comprises instructions or programs that implement the steps described above in conjunction with a microprocessor or other data processor. When programmed according to the methods and techniques described in the invention, the invention may also include the computer itself.
[0098] A computer program can be applied to input data to perform the functions described herein, thereby transforming the input data to generate output data stored in non-volatile memory. The output information can also be applied to one or more output devices, such as a display. In a preferred embodiment of the invention, the transformed data represents physical and tangible objects, including specific visual depictions of physical and tangible objects generated on the display.
[0099] The above description is merely a preferred embodiment of the present invention. The present invention is not limited to the above-described embodiments. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention, as long as they achieve the technical effects of the present invention by the same means, should be included within the scope of protection of the present invention. Within the scope of protection of the present invention, the technical solutions and / or implementation methods can have various modifications and variations.
Claims
1. A fan noise detection method based on artificial intelligence neural networks, characterized in that, Includes the following steps: S100. In the fan noise detection model based on lightweight attention capsule network, the time-frequency map is input into the improved efficiency network for multi-scale feature extraction. S200. An adaptive attention mechanism is introduced to perform weighted processing on feature blocks at multiple levels to obtain the normalized importance score of the feature blocks. S300. Arrange the normalized importance scores from high to low, and dynamically select the top three feature blocks in the normalized importance score ranking to obtain the output features of the three feature blocks. S400. The output features of the three feature blocks are fused to obtain fused features; S500. Input the fused features into the capsule network, and obtain the output vector of the higher-level capsule through the dynamic routing mechanism of the capsule network; S600. Input the output vector of the high-level capsule into a fully connected classifier and output the abnormal sound detection result.
2. The fan noise detection method based on artificial intelligence neural network according to claim 1, characterized in that, In step S200 The outputs of the feature blocks at multiple levels are linearly mapped to obtain a feature representation with a unified dimension. For each of the feature blocks, a corresponding attention weight parameter is set; The attention weight parameters are normalized using the Softmax function to obtain the normalized importance score of the feature block. The formula for calculating the normalized importance score of the feature block is as follows: , In the formula, α m The normalized importance score represents the feature block. a m Let be the attention weight parameter for the m-th feature block, N be the total number of feature blocks, and e be a natural constant.
3. The fan noise detection method based on artificial intelligence neural network according to claim 1, characterized in that, Step S500 includes: S510. Input the fusion features into the lower capsules of the capsule network; S520. Input the output vector of the lower-level capsule into the dynamic routing mechanism of the capsule network to obtain the output vector of the higher-level capsule.
4. The fan noise detection method based on artificial intelligence neural network according to claim 3, characterized in that, In step S520 The output vector of the lower-level capsule is transformed by a weight matrix to generate a prediction vector, as follows: , Where, u j|i Represents the prediction vector, W ij The weight matrix is... u i The output vector of the lower capsule; Based on the current routing coefficients and the prediction vector, the input vector of the high-level capsule is calculated, as follows: , In the formula, c ij The current routing coefficient, S j Let be the input vector of the high-level capsule. For the natural constant e b ij Power of 1 b ij This indicates the affinity of the lower-layer capsule i for the higher-layer capsule j. For the natural constant e b ik Power of 1 b ik This indicates the affinity of the lower-level capsule i to the index k of the higher-level capsule; The input vector of the high-level capsule is scaled and compressed using the squash nonlinear activation function to obtain the output vector of the high-level capsule, as shown below: , Where, V j Let ‖•‖ be the output vector of the high-level capsule, and let ‖•‖ denote the modulus length. This represents the squash nonlinear activation function.
5. The fan noise detection method based on artificial intelligence neural network according to claim 1, characterized in that, The loss function for training the fan noise detection model is expressed as follows: , In the formula, L is the loss function. y i For real category labels, p i The probability output by the model.
6. The fan noise detection method based on artificial intelligence neural network according to claim 1, characterized in that, The improved performance network consists of nine stages: the first stage includes a 3×3 Conv module; the second stage includes an MBConv1 module with 3×3 convolutional kernels; the third stage includes an MBConv6 module with 3×3 convolutional kernels; the fourth stage includes an MBConv6 module with 5×5 convolutional kernels; the fifth stage includes an MBConv6 module with 3×3 convolutional kernels; the sixth stage includes an MBConv6 module with 5×5 convolutional kernels; the seventh stage includes an MBConv6 module with 5×5 convolutional kernels; the eighth stage includes an MBConv6 module with 3×3 convolutional kernels; and the ninth stage includes a 1×1 Conv module and an FC module.
7. The fan noise detection method based on artificial intelligence neural network according to claim 1, characterized in that, Before step S100, the fan noise detection method based on artificial intelligence neural network further includes: The fan speed pulse signal is recorded synchronously during the acquisition of the fan sound signal and the process of acquiring the fan sound signal. Convert the fan sound signal from an analog signal to a digital signal; The converted fan sound signal undergoes preprocessing. Based on the fan speed pulse signal, analyze the trend of speed change over time; Based on the trend of the rotation speed over time, the steady phase of fan operation is identified, and the steady phase sound signal is extracted from the preprocessed fan sound signal. The stable segment of the sound signal is subjected to A-weighting processing; A short-time Fourier transform is performed on the stationary segment of the sound signal after A-weighting to obtain the time-frequency diagram.
8. The fan noise detection method based on artificial intelligence neural network according to claim 7, characterized in that, The A-weighted processing of the steady-state audio signal is represented as follows: , In the formula, H A ( f ) represents the frequency response function of A-weighted frequency response. f The frequency of the audio signal; The definition of the short-time Fourier transform is expressed as follows: , Where, This represents the short-time Fourier transform. x ( t The original signal is the stationary segment of the sound signal after A-weighting processing. ( () is a window function, representing the weighting of the signal around time t. The center time point of the window, e is the natural constant. = It represents the imaginary unit.
9. A computer device comprising a memory and a processor, characterized in that, When the processor executes a computer program stored in the memory, it performs the method as described in any one of claims 1 to 8.
Citation Information
Patent Citations
Bearing fault diagnosis method based on improved convolutional capsule network
CN113255882A
Intrusion detection method based on visual capsule network
CN116599701A
Micromotor abnormal sound classification method and device based on multi-scale feature fusion and attention mechanism
CN120048285A
Fan abnormal sound intelligent discrimination and detection method based on time-frequency diagram and deep learning
CN120108421A
Fan blade defect detection method and system based on improved SSD model
WO2023173598A1