A Method and System for Detecting Abnormal Noise from Air Conditioner Indoor Units Based on Variational Autoencoder Model
By using a variational autoencoder model to perform in-depth analysis of the sound of the air conditioner indoor unit, the problems of misjudgment and low efficiency in air conditioner noise detection are solved, and high-precision, low-cost air conditioner indoor unit noise detection is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HUAZHONG UNIV OF SCI & TECH
- Filing Date
- 2025-06-19
- Publication Date
- 2026-07-31
AI Technical Summary
Existing air conditioner noise detection technology relies on manual listening, which carries the risk of misjudgment and is difficult to adapt to the needs of large-scale production. Furthermore, automated solutions lack adaptability and accuracy, and cannot effectively distinguish subtle noise characteristics.
A variational autoencoder model is used to convert the sound data of the indoor unit of the air conditioner into two-dimensional time-frequency features. Through anomaly detection and fault classification models, the probability of unknown faults is calculated using entropy. Combined with Mel frequency filter banks to process the sound signal, in-depth analysis and accurate detection are achieved.
It enables rapid real-time detection of the operating status of the indoor unit of the air conditioner, reduces the defect rate, improves the accuracy and efficiency of detection, reduces detection costs, and can accurately capture time-frequency changes and fault characteristics.
Smart Images

Figure CN120496576B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of air conditioner indoor unit testing technology, and more specifically, relates to an air conditioner indoor unit abnormal noise detection method and system based on a variational autoencoder model. Background Technology
[0002] In the air conditioning manufacturing industry, one of the key aspects of ensuring product quality is the accurate detection of operating noise. Abnormal noises in air conditioners are often caused by malfunctions such as abnormal compressor wear, fan imbalance, blocked air ducts, or abnormal pressure in the refrigeration system. Traditional detection relies on manual listening, with professionals judging abnormal noises based on experience. However, this method has significant drawbacks: 1) Differences in judgment standards among different personnel can easily lead to misjudgments, potentially allowing defective products to enter the market or causing normal products to be misidentified, affecting quality control efficiency; 2) Human ears are susceptible to fatigue, and long-term, high-intensity testing leads to a decrease in accuracy; 3) Manual efficiency is difficult to match the demands of large-scale production, becoming a bottleneck for companies to improve both capacity and quality.
[0003] To overcome these limitations, there is an urgent need to promote the automation and intelligence of detection. However, current mainstream automation solutions mostly focus on identifying the intensity and location of abnormal sounds, relying on fixed thresholds and basic signal processing (such as spectrum analysis), which has significant drawbacks: 1) The algorithms lack adaptive learning capabilities for sound changes under new fault types or complex operating conditions, leading to missed detections / false detections; 2) Over-reliance on preset parameters makes it difficult to accurately distinguish subtle abnormal sound features; 3) The equipment is bulky, has high deployment costs, and cannot uncover deep correlations in sound signals (such as the relationship between time-frequency characteristics and non-steady-state faults). Therefore, it is urgent to establish reliable noise detection models and standardized processes to reduce human interference and subjective errors, in order to achieve high-precision detection of abnormal air conditioner sounds. Summary of the Invention
[0004] In view of the shortcomings of the existing technology, the purpose of this application is to provide a method and system for detecting abnormal noises in air conditioner indoor units based on a variational autoencoder model, which aims to solve the problems of poor efficiency and low accuracy in detecting abnormal air conditioner sounds.
[0005] To achieve the above objectives, in a first aspect, this application provides a method for detecting abnormal noise in an air conditioner indoor unit based on a variational autoencoder model, including: S1 converts the real-time collected sound data of the indoor unit of the air conditioner from a one-dimensional raw sound signal into a two-dimensional time-frequency feature, and then standardizes the two-dimensional time-frequency feature to obtain standardized data; S2 inputs the standardized data into the anomaly detection model and outputs the reconstruction error to construct an anomaly score. It then determines whether the anomaly score is less than a preset threshold: if yes, the detection result is normal and the detection stops; if no, the detection result is abnormal and step S3 needs to be executed. S3 inputs the anomaly detection result into the fault classification model and outputs the known fault score; uses the known fault score to calculate the unknown fault probability based on entropy; combines the known fault score and the unknown fault probability into the final fault score, and outputs the largest value in the final fault score as the abnormal noise fault result of the air conditioner indoor unit; wherein, the anomaly detection model and the fault classification model are both variational autoencoder models.
[0006] Furthermore, in step S1, the method for converting the sound data from a one-dimensional original sound signal into two-dimensional time-frequency features includes: S101 pre-emphasizes the sound data using a first-order high-pass filter; S102 performs frame segmentation and windowing on the pre-emphasized audio data; S103 then performs a fast Fourier transform on each frame of the windowed signal to obtain the spectrum of each frame of the signal, and uses the spectrum to calculate the corresponding power spectrum. S104 then converts the frequency axis from a linear scale to a Mel scale, and designs a filter bank based on the Mel scale to filter the power spectrum, thereby transforming the one-dimensional original sound signal into a two-dimensional time-frequency characteristic. The output of each filter is expressed as:
[0007] in, For the first i The output of each filter P ( k () represents the power spectrum. For the first i The frequency response of each filter M Where N is the number of filters and N is the frame length; S105 calculates the mean and standard deviation of the two-dimensional time-frequency features, and then uses the mean and standard deviation to standardize and normalize the two-dimensional time-frequency features.
[0008] Furthermore, in step S102, the window function used in the windowing process is a Hamming window, expressed as follows:
[0009] in, w ( n ) is the window function at position ( n The value at () n ) is the sample index point in the window, and N is the frame length.
[0010] Furthermore, in step S2, the step of inputting the standardized data into the anomaly detection model for detection includes: S201 encodes the standardized two-dimensional time-frequency features into a probability distribution in the latent space; from the standard normal distribution... Sample a noise vector Then, the latent variables are obtained using the following formula. z :
[0011] in, μ The mean, log ( σ 2 () represents the logarithmic variance; S202 from latent variables z The original input sequence is reconstructed, the reconstruction error is calculated based on the original input sequence, and the anomaly score is constructed based on the reconstruction error.
[0012] Furthermore, in step S3, the step of calculating the probability of an unknown fault based on entropy using the known fault scores includes: S301 normalizes the known fault scores; S302 uses the entropy calculation formula to calculate the entropy of the unknown fault probability. The entropy calculation formula is:
[0013] Where H(e) is the entropy of the unknown fault probability, and a, b, c are the fault classification probabilities of the three types of faults, respectively, and satisfy the following conditions: a + b + c= 1, e The probability of failure is unknown, and .
[0014] Furthermore, the steps for obtaining the anomaly detection model include: S211 Constructs an anomaly detection network module, which includes a first decoder and a first encoder; constructs a first reconstruction loss function, a first variational loss function, and a first total loss function; S212 inputs the normal sound data of the indoor unit of the air conditioner into the anomaly detection network module to train the first encoder and the first decoder, and performs backpropagation on the first encoder and the first decoder. S213 Repeat step S212 until the anomaly detection network module converges to obtain the anomaly detection model.
[0015] Furthermore, in step S211, the first total loss function is expressed as:
[0016] in, 1 represents the mean square error. LossKL for KL Divergence loss, β To balance reconstruction loss and KL Hyperparameters of the weights in the divergence loss.
[0017] Furthermore, the steps for obtaining the fault classification model include: S301 constructs a fault classification network module, which includes a second decoder, a second encoder, and a classifier; and constructs a second reconstruction loss function, a second variational loss function, and a second total loss function. S302 inputs the abnormal sound data of the indoor unit of the air conditioner into the fault classification network module to train the second decoder, the second encoder and the classifier, and performs backpropagation on the second encoder, the second decoder and the classifier; S303 Repeat step S302 until the fault classification network module converges to obtain the fault classification network model.
[0018] Furthermore, in step S301, the second total loss function is expressed as:
[0019] in, LossMSE 2 represents the mean square error of the reconstruction loss. LossKL for KL Divergence loss, β To balance reconstruction loss and KL The hyperparameters of the weights in the divergence loss. LossCEL The cross-entropy loss of the classifier.
[0020] Secondly, a system is provided for implementing the air conditioner indoor unit noise detection method based on the variational autoencoder model as described above, the system comprising: The data preprocessing module is used to convert the real-time collected sound data of the indoor unit of the air conditioner from a one-dimensional raw sound signal into a two-dimensional time-frequency feature, and to standardize the two-dimensional time-frequency feature to obtain standardized data. The fault detection module is used to input the standardized data into the anomaly detection model for detection, output the reconstruction error as the anomaly score, and determine whether the anomaly score is less than a preset threshold: if yes, the detection result is normal and the detection stops; if no, the detection result is abnormal and the anomaly detection result is transmitted to the fault classification module. The fault classification module is used to input the anomaly detection results into the fault classification model, output known fault scores, and use the known fault scores to calculate the probability of unknown faults based on entropy; the known fault scores and the probability of unknown faults are combined into a final fault score, and the largest value in the final fault score is taken as the result of abnormal noise fault in the indoor unit of the air conditioner.
[0021] It is understandable that the beneficial effects of the second aspect mentioned above can be found in the relevant descriptions in the first aspect mentioned above, and will not be repeated here.
[0022] Overall, the technical solutions conceived in this application have the following beneficial effects compared with the prior art: (1) The air conditioner indoor unit noise detection method based on the variational autoencoder model provided in this application acquires the operating sound data of the air conditioner indoor unit in the production line, and determines whether there is any abnormality in its operating status and the possible types of faults based on the sound characteristics converted from the sound data of the air conditioner indoor unit. Compared with the manual listening in the original production line, the air conditioner indoor unit noise detection method based on the variational autoencoder model provided in this application can perform non-contact, rapid and real-time detection of the operating status of the air conditioner indoor unit in the production line, reduce the defect rate of the air conditioner indoor unit leaving the factory, and reduce the detection cost of the noise detection station in the production line.
[0023] (2) The air conditioner noise detection method provided in this application can perform in-depth analysis of sound signals, combining time and frequency domains to accurately capture the time-frequency changes of the signal and locate the time and frequency characteristics of the fault. FBank, as a time-frequency domain feature, simulates human ear perception and uses Mel frequency filter bank to process the sound. It can accurately capture fault frequency information that the human ear is sensitive to, has good robustness to amplitude changes, and can also reduce noise interference, providing reliable input for fault diagnosis and improving the accuracy of air conditioner sound detection.
[0024] (3) The air conditioner noise detection method provided in this application processes the sound data of the indoor unit of the air conditioner through pre-emphasis processing, framing, windowing, and fast Fourier transform. Pre-emphasis processing can enhance the energy of the high-frequency part, making the signal spectrum flatter, thereby improving the resolution of the high-frequency part, reducing numerical errors in subsequent processing, and better reflecting the resonance characteristics of the sound channel. Since the sound signal is a time-varying non-stationary signal, this application approximates it as a short-time stationary signal by framing. Windowing is used to reduce spectral leakage during the framing process, making the signal of each frame smoother in the frequency domain and more accurately reflecting the spectral characteristics of the sound. Then, fast Fourier transform (FFT) is performed on the signal of each frame to convert the time domain signal into a frequency domain signal in order to analyze the spectral characteristics of the signal. In order to obtain the energy distribution of the signal at each frequency, the power spectrum of the spectrum obtained by FFT is calculated to provide a basis for subsequent filter bank processing. Finally, a Mel frequency filter bank is used to simulate the human ear's perception of different frequencies of sound. The power spectrum is filtered through a set of filters to obtain energy information of different frequency bands. The output of the filter bank is then logarithmically compressed. On the one hand, this makes the features more consistent with the human ear's perception of sound intensity. On the other hand, it can reduce the dynamic range of the data, which is convenient for subsequent calculations and processing. Finally, the filter bank (FBank) features are obtained. Attached Figure Description
[0025] Figure 1 This is a flowchart of the air conditioner indoor unit noise detection method based on the variational autoencoder model provided in the embodiments of this application; Figure 2 This is a schematic diagram of the training process of the abnormal noise detection model of the air conditioner indoor unit based on the variational autoencoder model provided in the embodiments of this application; Figure 3 This is a schematic diagram of the structure of the air conditioner indoor unit operation sound acquisition system provided in this application embodiment; Figure 4 This is a rendering of the FBank features of normal sound data from an air conditioner indoor unit provided in this application embodiment; Figure 5 This is a rendering of the FBank features of abnormal sound data from an air conditioner indoor unit provided in this application embodiment; Figure 6 This is a schematic diagram of an electronic device structure provided in an embodiment of this application. Detailed Implementation
[0026] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0027] In this article, the term "and / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. The symbol " / " in this article indicates that the related objects are in an "or" relationship; for example, A / B means A or B.
[0028] The terms "first" and "second," etc., used in the specification and claims herein are used to distinguish different objects, not to describe a specific order of objects. For example, "first response message" and "second response message," etc., are used to distinguish different response messages, not to describe a specific order of response messages.
[0029] In the embodiments of this application, the terms "exemplary" or "for example" are used to indicate that something is an example, illustration, or description. Any embodiment or design that is described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design. Specifically, the use of the terms "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.
[0030] In the description of the embodiments of this application, unless otherwise stated, "multiple" means two or more, for example, multiple processing units means two or more processing units, multiple elements means two or more elements, etc.
[0031] The embodiments of this application are described below with reference to the accompanying drawings.
[0032] This application provides a method for detecting abnormal noise in an air conditioner indoor unit based on a variational autoencoder model, such as... Figure 1 As shown, it includes the following steps: S1 transforms the real-time collected sound data from the indoor unit of the air conditioner into a two-dimensional time-frequency feature from a one-dimensional raw sound signal, and then standardizes the two-dimensional time-frequency feature to obtain standardized data. S2 inputs standardized data into the anomaly detection model and outputs the reconstruction error to construct an anomaly score. It then determines whether the anomaly score is less than a preset threshold: if yes, the detection result is normal and the detection stops; otherwise, the detection result is abnormal and S3 needs to be executed. S3 inputs the anomaly detection results into the fault classification model and outputs the known fault score; it uses the known fault score to calculate the unknown fault probability based on entropy; it combines the known fault score and the unknown fault probability into the final fault score, and takes the largest value in the final fault score as the result of the abnormal noise fault of the indoor unit of the air conditioner; where the anomaly detection model and the fault classification model are both variational autoencoder models.
[0033] The aforementioned sound data from the indoor air conditioner unit was collected during operation on the air conditioner production line. Specifically, a soundproof room was set up at the noise detection station on the production line, and sound sensors and photoelectric modules were installed inside the room for detection. The photoelectric module consists of an STM32 chip and a photoelectric sensor. The photoelectric sensor is positioned in front of the sound sensor along the direction of production line movement, while the sound sensor is located above the fan wheel of the indoor air conditioner unit. When the indoor air conditioner unit approaches the photoelectric sensor and the sound sensor, the photoelectric module triggers a signal and sends a pre-set command to the computer via a serial port. After the sound sensor collects the sound data from the running indoor air conditioner unit, it sends it to the computer. The computer then converts the one-dimensional raw sound signal into two-dimensional filter bank (FBank) time-frequency characteristics, i.e., FBank features.
[0034] In step S1, the method for converting the sound data from a one-dimensional original sound signal into two-dimensional time-frequency features includes the following steps: pre-emphasis, framing, windowing, fast Fourier transform, power spectrum calculation, filter bank filtering, and logarithmic calculation. The specific steps are as follows: S101 pre-emphasizes the audio data using a first-order high-pass filter, passing the audio signal through a first-order high-pass filter whose transfer function is... , in It is the pre-emphasis coefficient, which is 0.97 in this example.
[0035] S102 performs framing and windowing on the pre-emphasized audio data; in this embodiment, the window function is selected as the Hamming window, which is expressed by the following formula:
[0036] in, w ( n ) is the window function at position n The value at that location, n is the sample index point in the window, N is the frame length. In this embodiment, the frame length N is 400, the frame shift is 200, that is, the overlap is 0.5.
[0037] The traditional Hanning window coefficients are 0.5 and 0.5, while the Hamming window coefficients formed by adjusting the coefficients in this application are 0.54 and 0.46, respectively. The advantages of the adjustment are: (1) In terms of spectral characteristics, compared with the traditional Hanning window, the Hamming window achieves a better balance between the main lobe width and the side lobe amplitude. Although its side lobe amplitude is higher than that of the Hanning window, its main lobe energy is relatively more concentrated. The concentration of the main lobe means that most of the signal energy can be better preserved within the main lobe range. In this way, in subsequent spectral analysis, the main frequency components of the signal can be more accurately focused, which is conducive to improving the frequency resolution and capturing the key frequency information in the sound signal of the air conditioner indoor unit more clearly. (2) In terms of energy distribution, the value of the Hanning window is 0 at both ends of the window, while the value of the Hamming window is not 0 at both ends of the window. When adding windows for frame division, the energy distribution of the signal after windowing can be more uniform. This characteristic makes the energy transition between adjacent frames smoother and more continuous. In FBank feature extraction, the continuous energy distribution helps reduce feature errors caused by inter-frame abrupt changes, making the extracted features more reflective of the true characteristics of the speech signal and improving the stability and reliability of the features.
[0038] S103 then performs a Fast Fourier Transform on each windowed frame of signal to obtain the spectrum of each frame. The power spectrum is then calculated using this spectrum. The formula for calculating the power spectrum is:
[0039] in, P ( k () represents the power spectrum. N For frame length, X ( k ) is the first k The spectrum of the frame signal.
[0040] S104 then converts the frequency axis from a linear scale to a mel-scale, which is a scale based on the subjective judgment of pitch by listeners at equal distances. A filter bank is then designed based on the mel-scale to filter the power spectrum, thus transforming the one-dimensional original sound signal into a two-dimensional time-frequency characteristic. The output of each filter is represented as follows:
[0041] in, It is the first i The frequency response of each filter, M The number of filters is 40 in this embodiment, which transforms the one-dimensional original sound data of length 48000 into a two-dimensional time-frequency feature of [241,40]. Indicates the first i The output of the filter represents the frequency range (by the filter number 1). i Each filter determines the energy information of the sound signal within the filter, ultimately resulting in multiple... The values together constitute one dimension (frequency dimension) of the two-dimensional time-frequency feature; P ( k () is the power spectrum, which reflects the signal of each frame at different frequencies. k The energy distribution on the image is the result of performing a Fast Fourier Transform on each frame of the windowed signal and calculating it. The calculation formula is as follows: , N For frame length, X ( k ) represents a signal; It is the first i The frequency response of each filter reflects its selectivity for signals of different frequencies. M The number of filters is used for calculation. i traversal P ( k All frequency points, will P ( k )and Hi ( k Multiply and then sum them to get Yi The outputs of multiple filters are combined to form two-dimensional time-frequency features, providing data features for subsequent detection and classification.
[0042] S105 calculates the mean and standard deviation of two-dimensional time-frequency features to eliminate data scale differences. The specific selection depends on the algorithm requirements and data characteristics. Then, the mean and standard deviation are used to standardize and normalize the two-dimensional time-frequency features.
[0043] In step S2 above, standardized data is input into the anomaly detection model for detection. The specific detection steps include: S201 encodes the standardized two-dimensional time-frequency features into a probability distribution in the latent space; from the standard normal distribution... Sample a noise vector Then, the latent variables are obtained using the following formula. z :
[0044] in, μ For the mean, log(σ) 2 ) represents the logarithmic variance.
[0045] Specifically, the anomaly detection module is based on a variational autoencoder model, which consists of two main parts: an encoder and a decoder, connected by a latent space. The audio data passes through two LSTM layers to obtain the hidden state of its last time step. h n and cell state c n to its hidden state h n Input two fully connected networks to obtain latent variables z mean and logarithmic variance log(σ) 2 In this example, the hidden layer size is 128, and the dropout rate is set to 0.1 to prevent the model from overfitting.
[0046] S202 from latent variables z The original input sequence is reconstructed, the reconstruction error is calculated based on the original input sequence, and the anomaly score is constructed based on the reconstruction error.
[0047] The decoder is also built on LSTM, and its purpose is to extract latent variables. The original input sequence (i.e., the normalized FBank frequency domain features of the air conditioner indoor unit) is reconstructed, and the reconstruction error is calculated as the output. An anomaly score is constructed based on the reconstruction error. For example, 97% of the reconstruction error set of the training data is taken as 0.8, and 100% of the values are taken as 1. An interpolation function is used to connect them. Then, a reconstruction error greater than 97% corresponds to an anomaly score greater than 0.8, and the system will judge it as unqualified.
[0048] like Figure 2The diagram shows the training flowchart for an air conditioner indoor unit noise detection model based on a variational autoencoder model. Due to the unevenness of the data, there will be a large amount of normal data and a small amount of known abnormal data, making it difficult to train normal and abnormal data together. Therefore, normal unlabeled data (i.e., normal data) and abnormal labeled data (i.e., abnormal data) are input into two separate network models for training. The construction and training steps of the anomaly detection model in step S2 include: S211 constructs an anomaly detection network module, which includes a first decoder and a first encoder. It constructs a first reconstruction loss function, a first variational loss function, and a first total loss function. The anomaly detection module employs unsupervised learning. For each time step, the LSTM updates the hidden state in a similar computational manner to the encoder, and obtains the probability distribution of the output sequence through a fully connected layer and a softmax activation function. The mean squared error (MSE) loss function is used to measure the difference between the reconstructed sequence and the original input sequence, and a KL (KL Divergence Loss) loss is introduced to make the distribution of the latent variables as close as possible to a standard normal distribution. Therefore, the first total loss function is expressed as:
[0049] in, 1 represents the mean square error. LossKL for KL Divergence loss, β To balance reconstruction loss and KL The hyperparameters of the divergence loss weights typically take values between 0 and 1; in this example, we select... β It is 0.33.
[0050] S212 inputs the normal sound data of the indoor unit of the air conditioner into the anomaly detection network module to train the first encoder and the first decoder. Backpropagation is performed on the first encoder and the first decoder. Specifically, a backpropagation algorithm based on the total loss function is used to calculate the gradient of the parameters of the anomaly detection network module. The parameters of the encoder and decoder are updated by an optimizer (such as Adam) to minimize the first total loss function, so that the anomaly model can learn the effective feature representation and reconstruction capability of the input sequence.
[0051] S213 Repeat step S212 until the anomaly detection network module converges, and the anomaly detection model is obtained.
[0052] In step S3 above, the fault classification model is also based on a variational autoencoder. The difference is that after encoding, the mean and log-variance of the latent variable z from the variational autoencoder are input into the classifier, which consists of a fully connected layer and a softmax layer. The fully connected layer takes z as its input and outputs the number of data points to be classified; in this embodiment, this is three. The fault classification model ultimately outputs a fault classification probability vector, where the known fault score represents the probability that the data segment represents a certain type of fault.
[0053] Specifically, the probability of unknown faults is calculated using an entropy-based method based on known fault scores. The known fault scores are then used... f 1 、f 2 、f 3. Calculate the fault classification probability for the three types of faults. a, b, c First, the fault scores need to be normalized. The purpose of normalization is to convert the fault scores into probability values, such that the sum of the probabilities of all fault types is 1. The normalization formula is:
[0054] in, a, b, c Let represent the probabilities of the three types of faults occurring, and satisfy . a + b + c =1.
[0055] Then, the entropy formula is used to calculate the entropy of the unknown failure probability. H(e) For a discrete random variable with three possible states (corresponding to three known types of faults), its entropy is calculated using the following formula:
[0056] in, H(e) Entropy is the probability of an unknown failure. e The probability of failure is unknown, and .
[0057] Finally, the known fault scores and unknown fault probabilities are combined to obtain the final fault score, and the largest value in the final fault score is taken as the result of abnormal noise fault in the indoor unit of the air conditioner.
[0058] The steps for constructing and training the fault classification model in step S3 above include: S301 constructs a fault classification network module, which includes a second decoder, a second encoder, and a classifier; it also constructs a second reconstruction loss function, a second variational loss function, and a second total loss function, the second total loss function being expressed as:
[0059] in, LossMSE2 represents the mean square error of the reconstruction loss. LossKL for KL Divergence loss, β To balance reconstruction loss and KL The hyperparameters of the weights in the divergence loss. LossCEL The cross-entropy loss of the classifier.
[0060] S302 inputs abnormal sound data from the indoor unit of the air conditioner into the fault classification network module to train the second decoder, second encoder, and classifier. A backpropagation algorithm based on the total loss function is used on the second encoder, second decoder, and classifier to calculate the gradient of the model parameters. An optimizer (such as Adam) is then used to update the parameters of the encoder and decoder to minimize the second total loss function, enabling the fault classification network module to learn effective feature representations and reconstruction capabilities from the input sequence. Specifically, the fault classification module uses supervised learning. Each abnormal data point has a fault type label, which is one-hot encoded into a [0,1,0] denoted list before being input into the fault classification network module. During training, the fault classification network module primarily uses the cross-entropy loss between the labels and predicted labels to train the classifier.
[0061] S303 Repeat step S302 until the fault classification network module converges to obtain the fault classification model.
[0062] like Figure 3 The diagram shows a data acquisition system for an air conditioner indoor unit noise detection method based on a variational autoencoder model provided in this embodiment. The air conditioner indoor unit is placed on a moving conveyor belt in the inspection production line. The sound sensor and photoelectric module are located in a quiet room at the noise detection station in the production line. The photoelectric module consists of an STM32 chip and a photoelectric sensor. Along the movement direction of the inspection production line, the photoelectric sensor is located in front of the sound sensor, and the sound sensor is located above the fan wheel of the air conditioner indoor unit. Before sampling, a fixed sampling frequency and acquisition duration are set. In one embodiment of this application, the sampling frequency... fs The system was configured with a frequency of 16kHz, a sampling duration of 3 seconds, 1 channel, and 48k data sampling points. During sampling, when the indoor unit of the air conditioner moves along the production line into the soundproof room and approaches the photoelectric sensor and the sound sensor, the photoelectric module triggers a signal and sends the pre-set instructions to the computer via the serial port. The computer reads the instructions from the photoelectric module via the serial port and reads the output of the sound sensor using the Python soundcard library.
[0063] like Figure 4 As shown, this is a rendering of the FBank features of normal data provided in this embodiment. Figure 5The figure shows the FBank feature effect diagram of abnormal data provided in this embodiment. As can be seen from the figure, normal data conforms to the typical spectral pattern of speech signals, while abnormal data may break this pattern due to content or noise interference, specifically manifested as high-frequency anomalies, harmonic breaks, and uneven energy distribution.
[0064] This application provides a method for detecting abnormal noise in air conditioner indoor units based on a variational autoencoder model. This method acquires real-time operating sound data of air conditioner indoor units on a production line and determines whether there are any abnormalities in their operating status and the possible types of faults based on the sound characteristics converted from this data. Compared to manual listening on the original production line, this method allows for rapid, non-contact, real-time detection of the operating status of air conditioner indoor units on the production line, reducing the defect rate of air conditioner indoor units leaving the factory and lowering the detection cost of the noise detection station on the production line.
[0065] In another embodiment, a system is provided for implementing the aforementioned method for detecting abnormal noise in an air conditioner indoor unit based on a variational autoencoder model. The system includes: The data preprocessing module is used to convert the real-time collected sound data of the indoor unit of the air conditioner from a one-dimensional raw sound signal into a two-dimensional time-frequency feature, and to standardize the two-dimensional time-frequency feature to obtain standardized data. The fault detection module is used to input standardized data into the anomaly detection model for detection and output reconstruction error as an anomaly score; it determines whether the anomaly score is less than a preset threshold: if yes, the detection result is normal and the detection stops; if no, the detection result is abnormal and the anomaly detection result is input into the fault classification module. The fault classification module inputs the anomaly detection results into the fault classification model and outputs known fault scores; it uses the known fault scores to calculate the unknown fault probability based on entropy; it combines the known fault scores and the unknown fault probabilities into a final fault score, and takes the largest value in the final fault score as the result of abnormal noise fault in the indoor unit of the air conditioner.
[0066] It is understood that the detailed functional implementation of each of the above units / modules can be found in the description in the aforementioned method embodiments, and will not be repeated here.
[0067] It should be understood that the above-described device is used to execute the methods in the above embodiments. The implementation principle and technical effect of the corresponding program modules in the device are similar to those described in the above methods. The working process of the device can be referred to the corresponding process in the above methods, and will not be repeated here.
[0068] Based on the methods in the above embodiments, such as Figure 6As shown in the illustration, this application provides an electronic device that may include a processor 610, a communications interface 620, a memory 630, and a communication bus 640. The processor 610, communications interface 620, and memory 630 communicate with each other via the communication bus 640. The processor 610 can call logical instructions stored in the memory 630 to execute the methods described in the above embodiments.
[0069] Furthermore, the logical instructions in the aforementioned memory 630 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application.
[0070] Based on the methods in the above embodiments, this application provides a computer-readable storage medium storing a computer program that, when run on a processor, causes the processor to execute the methods in the above embodiments.
[0071] Based on the methods in the above embodiments, this application provides a computer program product that, when run on a processor, causes the processor to execute the methods in the above embodiments.
[0072] It is understood that the processor in the embodiments of this application can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. A general-purpose processor can be a microprocessor or any conventional processor.
[0073] The method steps in this application embodiment can be implemented in hardware or by a processor executing software instructions. The software instructions can consist of corresponding software modules, which can be stored in random access memory (RAM), flash memory, read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), registers, hard disks, portable hard disks, CD-ROMs, or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor, enabling the processor to read information from and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can reside in an ASIC.
[0074] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially as a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted through the computer-readable storage medium. The computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state disk (SSD)).
[0075] It is understood that the various numerical designations used in the embodiments of this application are merely for the convenience of description and are not intended to limit the scope of the embodiments of this application.
[0076] Those skilled in the art will readily understand that the above description is merely a preferred embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this application should be included within the scope of protection of this application.
Claims
1. A method for detecting abnormal sound of an indoor unit of an air conditioner based on a variational autoencoder model, characterized in that, include: S1 converts the real-time collected sound data of the indoor unit of the air conditioner from a one-dimensional raw sound signal into a two-dimensional time-frequency feature, and then standardizes the two-dimensional time-frequency feature to obtain standardized data; S2 inputs the standardized data into the anomaly detection model and outputs the reconstruction error to construct an anomaly score. It then determines whether the anomaly score is less than a preset threshold: if yes, the detection result is normal and the detection stops; if no, the detection result is abnormal and step S3 needs to be executed. S3 inputs the anomaly detection results into the fault classification model and outputs known fault scores; it then uses the known fault scores to calculate the probability of unknown faults based on entropy; finally, it combines the known fault scores and the probability of unknown faults into a final fault score, and outputs the largest value in the final fault scores as the result of abnormal noise from the indoor unit of the air conditioner; wherein, both the anomaly detection model and the fault classification model are variational autoencoder models; the step of using the known fault scores to calculate the probability of unknown faults based on entropy includes: S301 normalizes the known fault scores; S302 uses the entropy calculation formula to calculate the entropy of the unknown fault probability. The entropy calculation formula is: Wherein, H(e) is the entropy of unknown failure probability, a, b, c are respectively the failure classification probability of three types of faults, and satisfy a + b + c = 1, e is the unknown failure probability, and . 2.The air conditioner indoor unit abnormal sound detection method based on a variational autoencoder model of claim 1, wherein, In step S1, the method for converting the sound data from a one-dimensional original sound signal into two-dimensional time-frequency features includes: S101 pre-emphasizes the sound data using a first-order high-pass filter; S102 performs frame segmentation and windowing on the pre-emphasized audio data; S103 then performs a fast Fourier transform on each windowed frame signal to obtain the spectrum of each frame signal, and uses the spectrum to calculate the corresponding power spectrum. S104 then converts the frequency axis from a linear scale to a Mel scale, and designs a filter bank based on the Mel scale to filter the power spectrum, thereby transforming the one-dimensional original sound signal into a two-dimensional time-frequency characteristic. The output of each filter is expressed as: in, For the first i The output of each filter P ( k () represents the power spectrum. For the first i The frequency response of each filter M Where N is the number of filters and N is the frame length; S105 calculates the mean and standard deviation of the two-dimensional time-frequency features, and then uses the mean and standard deviation to standardize and normalize the two-dimensional time-frequency features.
3. The method for detecting abnormal noise in an air conditioner indoor unit based on a variational autoencoder model as described in claim 2, characterized in that, In step S102, the window function used in the windowing process is a Hamming window, expressed as follows: in, w ( n ) is the window function at position n The value at that location, n is the sample index point in the window, and N is the frame length.
4. The method for detecting abnormal noise in an air conditioner indoor unit based on a variational autoencoder model as described in claim 1, characterized in that, Step S2, the step of inputting the standardized data into the anomaly detection model for detection, includes: S201 encodes the standardized two-dimensional time-frequency features into a probability distribution in the latent space; from the standard normal distribution... Sample a noise vector Then, the latent variables are obtained using the following formula. z : in, μ The mean, log ( σ 2 () represents the logarithmic variance; S202 from latent variables z The original input sequence is reconstructed, the reconstruction error is calculated based on the original input sequence, and the anomaly score is constructed based on the reconstruction error.
5. The method for detecting abnormal noise in an air conditioner indoor unit based on a variational autoencoder model as described in claim 1, characterized in that, The steps for obtaining the anomaly detection model include: S211 Constructs an anomaly detection network module, which includes a first decoder and a first encoder; constructs a first reconstruction loss function, a first variational loss function, and a first total loss function; S212 inputs the normal sound data of the indoor unit of the air conditioner into the anomaly detection network module to train the first encoder and the first decoder, and performs backpropagation on the first encoder and the first decoder. S213 Repeat step S212 until the anomaly detection network module converges to obtain the anomaly detection model.
6. The method for detecting abnormal noise in an air conditioner indoor unit based on a variational autoencoder model as described in claim 5, characterized in that, In step S211, the first total loss function is expressed as: in, 1 represents the mean square error. LossKL for KL Divergence loss, β To balance reconstruction loss and KL Hyperparameters of the weights in the divergence loss.
7. The method for detecting abnormal noise in an air conditioner indoor unit based on a variational autoencoder model as described in claim 1, characterized in that, The steps for obtaining the fault classification model include: S301 constructs a fault classification network module, which includes a second decoder, a second encoder, and a classifier; and constructs a second reconstruction loss function, a second variational loss function, and a second total loss function. S302 inputs the abnormal sound data of the indoor unit of the air conditioner into the fault classification network module to train the second decoder, the second encoder and the classifier, and performs backpropagation on the second encoder, the second decoder and the classifier; S303 Repeat step S302 until the fault classification network module converges to obtain the fault classification model.
8. The method for detecting abnormal noise in an air conditioner indoor unit based on a variational autoencoder model as described in claim 7, characterized in that, In step S301, the second total loss function is expressed as: in, LossMSE 2 represents the mean square error of the reconstruction loss. LossKL for KL Divergence loss, β To balance reconstruction loss and KL The hyperparameters of the weights in the divergence loss. LossCEL The cross-entropy loss of the classifier.
9. A system for implementing the method for detecting abnormal noise in an air conditioner indoor unit based on a variational autoencoder model as described in any one of claims 1-8, characterized in that, The system includes: The data preprocessing module is used to convert the real-time collected sound data of the indoor unit of the air conditioner from a one-dimensional raw sound signal into a two-dimensional time-frequency feature, and to standardize the two-dimensional time-frequency feature to obtain standardized data. The fault detection module is used to input the standardized data into the anomaly detection model for detection, output the reconstruction error as the anomaly score, and determine whether the anomaly score is less than a preset threshold: if yes, the detection result is normal and the detection stops; if no, the detection result is abnormal and the anomaly detection result is transmitted to the fault classification module. The fault classification module is used to input the anomaly detection results into the fault classification model, output known fault scores, and use the known fault scores to calculate the probability of unknown faults based on entropy; the known fault scores and the probability of unknown faults are combined into a final fault score, and the largest value in the final fault score is taken as the result of abnormal noise fault in the indoor unit of the air conditioner.