Air conditioner indoor unit abnormal sound detection method and system based on variational auto-encoder model
Through the variational autoencoder model, the sound data of the air conditioner internal unit is converted into two-dimensional time-frequency characteristics. Combined with abnormal detection and fault classification, the error judgment and low accuracy of air conditioner abnormal sound detection is solved, and fast and accurate automatic detection is achieved.
Patent Information
- Application Number
- CN202510826448.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-19
- Publication Date
- 2025-08-15
- Estimated Expiration
- 2045-06-19
AI Technical Summary
The existing air-conditioning antonal detection technology relies on manual listening, which poses a risk of misjudgment and is difficult to adapt to the needs of large-scale production. The automation solution lacks adaptability and accuracy, so it is impossible to effectively distinguish subtle antonal characteristics.
The variational autoencoder model is adopted to convert the sound data of the air conditioner internal unit into two-dimensional time-frequency characteristics. Through abnormal detection and fault classification models, the unknown fault probability is calculated in combination with entropy to realize automated abnormal sound detection.
It realizes fast and accurate detection of the noise of the air conditioner internal unit, reduces the defective product rate and detection cost, and improves detection accuracy and adaptability.
Smart Images

Figure CN120496576A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the technical field of air conditioner indoor unit detection, and more specifically, to a method and system for detecting abnormal sounds in an air conditioner indoor unit based on a variational autoencoder model. Background Art
[0002] In the air conditioning manufacturing industry, one of the key steps in ensuring product quality before leaving the factory is the accurate detection of operating sounds. Abnormal noises in air conditioners are often caused by faults such as abnormal compressor wear, fan imbalance, air duct obstruction, or abnormal refrigeration system pressure. Traditional testing relies on manual listening, with professionals judging abnormal noises based on experience. However, this has significant drawbacks: 1) Differences in judgment standards among different personnel can easily lead to misjudgments, potentially causing hazardous products to enter the market or normal products to be misdetected, affecting quality control efficiency; 2) The human ear is easily fatigued, and long-term high-intensity testing leads to a decrease in accuracy; 3) Manual efficiency is difficult to match the needs of large-scale production, becoming a bottleneck for companies to improve production capacity and quality.
[0003] To overcome these limitations, there's an urgent need to advance automated and intelligent detection. However, current mainstream automated solutions primarily focus on identifying abnormal sound volume and location, relying on fixed thresholds and basic signal processing (such as spectrum analysis). These solutions suffer from significant drawbacks: 1) the algorithms lack the ability to adaptively learn new fault types or sound changes under complex operating conditions, leading to missed or false detections; 2) excessive reliance on preset parameters makes it difficult to accurately distinguish subtle abnormal sound characteristics; and 3) the equipment is bulky, deployment costs are high, and it's unable to uncover deep correlations in sound signals (such as the relationship between time-frequency characteristics and non-steady-state faults). Therefore, it's imperative to establish reliable noise detection models and standardized processes to reduce human interference and subjective errors, thereby achieving high-precision detection of abnormal air conditioner sounds. Summary of the Invention
[0004] In response to the shortcomings of the existing technology, the purpose of this application is to provide a method and system for detecting abnormal sounds in air conditioner indoor units based on a variational autoencoder model, aiming to solve the problem of poor efficiency and low accuracy in detecting abnormal sounds in air conditioners.
[0005] To achieve the above objectives, in a first aspect, the present application provides a method for detecting abnormal noise in an air conditioner indoor unit based on a variational autoencoder model, comprising: S1 converts the real-time collected sound data of the air conditioner indoor unit from a one-dimensional original sound signal into a two-dimensional time-frequency feature, and normalizes the two-dimensional time-frequency feature to obtain standardized data; S2 inputs the normalized data into the anomaly detection model, outputs the reconstruction error to construct an anomaly score, and determines whether the anomaly score is less than a preset threshold: if so, the detection result is normal and the detection stops; if not, 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 a 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 a final fault score, and outputs the maximum value of the final fault score as the air conditioner indoor unit abnormal sound fault result; wherein, the anomaly detection model and the fault classification model are both variational autoencoder models.
[0006] Furthermore, in step S1, the method of converting the sound data from a one-dimensional original sound signal into a two-dimensional time-frequency feature includes: S101 performs pre-emphasis processing on the sound data through a first-order high-pass filter; S102 performs framing and windowing on the pre-emphasized sound data; S103 performs a fast Fourier transform on each frame of the windowed signal to obtain a frequency spectrum of each frame of the signal, and uses the frequency spectrum to calculate a 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 converting the one-dimensional original sound signal into a two-dimensional time-frequency feature. The output of each filter is expressed as:
[0007] in, For the i The output of the filter, P ( k ) is the power spectrum, For the i The frequency response of a filter is M is the number of filters, N is the frame length; S105 calculates the mean and standard deviation of the two-dimensional time-frequency feature, and then uses the mean and standard deviation to standardize and normalize the two-dimensional time-frequency feature.
[0008] Furthermore, in step S102, the window function during windowing is a Hamming window, which is expressed as the following formula:
[0009] in, w ( n ) is the window function at position ( n ), ( 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 normalized two-dimensional time-frequency features into a probability distribution in a latent space; Sample a noise vector in , and then the latent variable is obtained by the following formula z :
[0011] in, μ is the mean, log ( σ 2 ) is the logarithmic variance; S202 from latent variables z The original input sequence is reconstructed, a 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 unknown fault probability based on entropy using the known fault score includes: S301 normalizes the known fault score; S302 uses the entropy calculation formula to calculate the entropy of the unknown fault probability. The entropy calculation formula is:
[0013] Among them, H(e) is the entropy of unknown fault probability, a, b, c are the fault classification probabilities of three types of faults, and satisfy a + b + c= 1, e is an unknown failure probability, and .
[0014] Furthermore, the step of acquiring the anomaly detection model includes: S211 constructs an anomaly detection network module, the anomaly detection network module 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: inputting normal sound data of the air conditioner indoor unit into the anomaly detection network module to train the first encoder and the first decoder, and performing backpropagation on the first encoder and the first decoder; S213 repeats 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 is the mean square error, LossKL for KL Divergence loss, β To balance the reconstruction loss and KL Hyperparameters for the weights of the divergence loss.
[0017] Furthermore, the step of acquiring the fault classification model includes: S301 constructs a fault classification network module, which includes a second decoder, a second encoder, and a classifier; constructs a second reconstruction loss function, a second variational loss function, and a second total loss function; S302: inputting abnormal sound data of the air conditioner indoor unit into the fault classification network module to train the second decoder, the second encoder, and the classifier, and performing backpropagation on the second encoder, the second decoder, and the classifier; S303 repeats 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 is the mean square error of reconstruction loss, LossKL for KL Divergence loss, β To balance the reconstruction loss and KL The hyperparameters of the weights of the divergence loss, LossCEL is the cross entropy loss of the classifier.
[0020] In a second aspect, a system for implementing the aforementioned method for detecting abnormal noise in an air conditioner indoor unit based on a variational autoencoder model is provided, the system comprising: A data preprocessing module is used to convert the sound data of the air conditioner indoor unit collected in real time from a one-dimensional original sound signal into a two-dimensional time-frequency feature, and standardize the two-dimensional time-frequency feature to obtain standardized data; A fault detection module is configured to input the standardized data into an anomaly detection model for detection, output a reconstruction error as an anomaly score, and determine whether the anomaly score is less than a preset threshold: if so, the detection result is normal and detection is stopped; if not, the detection result is abnormal and the anomaly detection result is transmitted to a fault classification module; A fault classification module is configured to input the anomaly detection result into a fault classification model, output a known fault score, and use the known fault score to calculate the unknown fault probability based on entropy; combine the known fault score and the unknown fault probability into a final fault score, and use the maximum value of the final fault score as the abnormal noise fault result of the air conditioner indoor unit.
[0021] It can be understood that the beneficial effects of the second aspect mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here.
[0022] In general, the above technical solutions conceived by this application have the following beneficial effects compared with the existing technologies: (1) The method for detecting abnormal sound from an air conditioner indoor unit based on a variational autoencoder model provided in this application obtains operating sound data from an air conditioner indoor unit in a running test production line, and determines whether its operating status is abnormal and the possible type of fault based on the sound features converted from the sound data of the air conditioner indoor unit. Compared with manual auscultation in the original production line, the method for detecting abnormal sound from an air conditioner indoor unit based on a 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, thereby reducing the defective rate of the air conditioner indoor unit leaving the factory and reducing the detection cost of the abnormal sound detection station in the production line.
[0023] (2) The air conditioner abnormal sound detection method provided in this application can perform in-depth analysis of sound signals. By combining the time and frequency domains, it can 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 processes sound using a Mel frequency filter bank. 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 abnormal sound detection method provided in this application processes the sound data of the air conditioner indoor unit through pre-emphasis processing, framing, windowing and fast Fourier transform. The pre-emphasis processing can enhance the energy of the high-frequency part and make the spectrum of the signal flatter, thereby improving the resolution of the high-frequency part, reducing the numerical error in the 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 to a short-time stationary signal through framing. Windowing is used to reduce spectrum leakage during the framing process, so that the signal of each frame is smoother in the frequency domain and can more accurately reflect the spectrum characteristics of the sound. Then, a 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 spectrum 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 group processing. Finally, a Mel-frequency filter bank is used to simulate the human ear's perception of sounds of different frequencies. 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, facilitating subsequent calculations and processing, and finally obtaining the filter bank (FBank) features. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] Figure 1 This is a flow chart of a method for detecting abnormal noise in an air conditioner indoor unit based on a variational autoencoder model provided in an embodiment of the present application; Figure 2 Schematic diagram of the training process of the air conditioner indoor unit abnormal sound detection model based on the variational autoencoder model provided in an embodiment of the present application; Figure 3 This is a schematic diagram of the structure of the air conditioner indoor unit operation sound collection system provided in an embodiment of the present application; Figure 4 This is a characteristic effect diagram of the normal sound data FBank of the air conditioner indoor unit provided in the embodiment of the present application; Figure 5 This is a characteristic effect diagram of the abnormal sound data FBank of the air conditioner indoor unit provided in the embodiment of the present application; Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0026] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.
[0027] The term "and / or" as used herein describes an association between related objects, indicating that three possible relationships exist. For example, "A and / or B" can represent: A exists alone, A and B exist simultaneously, or B exists alone. The symbol " / " as used herein indicates that the related objects are in an "or" relationship, for example, A / B means either A or B.
[0028] The terms "first" and "second" in this specification and claims are used to distinguish different objects rather than to describe a specific order of objects. For example, "first response message" and "second response message" are used to distinguish different response messages rather than to describe a specific order of response messages.
[0029] In the embodiments of this application, words such as "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of this application should not be interpreted as being preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.
[0030] In the description of the embodiments of the present application, unless otherwise specified, "multiple" means two or more, for example, multiple processing units means two or more processing units, etc.; multiple elements means two or more elements, etc.
[0031] The embodiments of the present application are described below in conjunction with the drawings in the embodiments of the present application.
[0032] This application provides a method for detecting abnormal sound in an air conditioner based on a variational autoencoder model. Figure 1 As shown, the following steps are included: S1 converts the real-time collected sound data of the air conditioner indoor unit from a one-dimensional original sound signal into a two-dimensional time-frequency feature, and normalizes 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 the preset threshold. If so, the test result is normal and the test stops. If not, the test 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; 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 a final fault score, and uses the largest value in the final fault score as the abnormal noise fault result of the air conditioner indoor unit; among them, the anomaly detection model and the fault classification model are both variational autoencoder models.
[0033] The sound data from the aforementioned air conditioner indoor units is collected during the operation of the air conditioner production line. Specifically, a soundproof room is set up at the abnormal sound detection station on the production line, and a sound sensor and photoelectric module are installed in the soundproof room for detection. The photoelectric module consists of an STM32 chip and a photoelectric sensor. The photoelectric sensor is located in front of the sound sensor along the direction of production line movement, and the sound sensor is located above the air conditioner indoor unit's impeller. When the air conditioner indoor unit approaches the photoelectric sensor and the sound sensor, the photoelectric module triggers a signal and sends the set command to the computer via the serial port. The sound sensor collects the sound data of the running air conditioner indoor unit and sends it to the computer. The computer converts the one-dimensional raw sound signal into a two-dimensional filter bank (FBank) time-frequency feature, namely the FBank feature.
[0034] In step S1, the method for converting the sound data from a one-dimensional original sound signal into a two-dimensional time-frequency feature includes the following steps: pre-emphasis, framing, windowing, fast Fourier transform, power spectrum calculation, filter bank filtering and logarithm taking. The specific steps are: S101 pre-emphasizes the sound data through a first-order high-pass filter, and passes the sound signal through a first-order high-pass filter, whose transfer function is , in is the pre-emphasis factor, which is 0.97 in this example.
[0035] S102 performs framing and windowing on the pre-emphasized sound data. In this embodiment, the window function is a Hamming window, which is expressed as the following formula:
[0036] in, w ( n ) is the window function at position n The value at 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 overlapping part is 0.5.
[0037] The traditional Hanning Window coefficients are 0.5 and 0.5, and the coefficients of the Hamming Window formed by the coefficient adjustment in this application are 0.54 and 0.46 respectively. The advantages after 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 energy of the signal can be better retained within the main lobe range. In this way, in the subsequent spectrum analysis, the main frequency components of the signal can be more accurately focused, which is conducive to improving the frequency resolution and more clearly capturing the key frequency information in the air conditioner indoor unit sound signal. (2) In terms of energy distribution, the value of the Hanning Window at both ends of the window is 0, while the value of the Hamming Window at both ends of the window is not 0. When the frame is divided and windowed, the energy distribution of the signal after windowing can be made more uniform. This characteristic makes the energy transition between adjacent frames smoother and more continuous. In FBank feature extraction, continuous energy distribution helps to reduce feature errors caused by inter-frame mutations, making the extracted features more able to reflect the true characteristics of the speech signal and improving the stability and reliability of the features.
[0038] S103 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. The calculation formula for the power spectrum is:
[0039] in, P ( k ) is the power spectrum, N is the frame length, X ( k ) is the k Spectrum of the frame signal.
[0040] S104 then converts the frequency axis from a linear scale to a mel-scale. The mel-scale is based on the perceptual judgment of pitch by listeners with equal distances from each other. A filter bank is designed based on the mel-scale to filter the power spectrum, thereby converting the one-dimensional original sound signal into a two-dimensional time-frequency feature. The output of each filter is expressed as:
[0041] in, It is i The frequency response of the filter is M is the number of filters, which is 40 in this embodiment, and converts the one-dimensional original sound data with a length of 48000 into a two-dimensional time-frequency feature of [241,40]; Indicates the i The output of a filter, which represents the frequency range (given by the i The energy information of the sound signal within the filter is determined by multiple The values of together constitute a dimension (frequency dimension) of the two-dimensional time-frequency feature; P ( k ) is the power spectrum, reflecting each frame signal at different frequencies k The energy distribution on is the result of fast Fourier transform and calculation of each frame signal after windowing in the early stage. The calculation formula is: , N is the frame length, X ( k ) indicates a signal; It is i The frequency response of each filter reflects the selection characteristics of signals of different frequencies; M is the number of filters. When calculating, for each filter i , traverse P ( k ) all frequency points, P ( k )and Hi ( k ) and then multiply and add, we get Yi , multiple filter outputs are combined into two-dimensional time-frequency features, providing data features for subsequent detection and classification.
[0042] S105 calculates the mean and standard deviation of the two-dimensional time-frequency features in order to eliminate data scale differences. The specific selection is based on the algorithm requirements and data characteristics, and then the mean and standard deviation are used to standardize and normalize the two-dimensional time-frequency features.
[0043] In the aforementioned step S2, the 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 in , and then the latent variable is obtained by the following formula z :
[0044] in, μ is the mean, log(σ 2 ) is the logarithmic variance.
[0045] Specifically, the anomaly detection module is based on a variational autoencoder model, which consists of two parts: an encoder and a decoder, connected by a latent space. The sound data passes through two LSTM layers to obtain the latent state of the last time step. h n and cell status c n , its hidden state h n Input two fully connected networks to get latent variables z The 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 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 then constructed based on the reconstruction error. For example, the 97th percentile value of the reconstruction error set for the training data is set as 0.8, and the 100th percentile value is set as 1. Interpolation functions are used to connect the values in between. 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 figure below shows a training flow chart for an air conditioner indoor unit abnormal sound detection model based on a variational autoencoder model. Due to data heterogeneity, there will be a large amount of normal data and a small amount of known abnormal data, making it difficult to train both normal and abnormal data together. Therefore, normal unlabeled data (i.e., normal data) and abnormal labeled data (i.e., abnormal data) are fed into two separate network models for training. The steps for building and training the anomaly detection model in step S2 above include: S211 constructs the anomaly detection network module, which includes a first decoder and a first encoder. It constructs the first reconstruction loss function, the first variational loss function, and the first total loss function. The anomaly detection module is an unsupervised learning module. For each time step, the LSTM updates the hidden state using a calculation method similar 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 the KL (KL Divergence Loss) divergence loss is introduced to make the distribution of the latent variable as close to the standard normal distribution as possible. Therefore, the first total loss function is expressed as:
[0049] in, 1 is the mean square error, LossKL for KL Divergence loss, β To balance the reconstruction loss and KL The hyperparameter of the weight of the divergence loss usually takes a value between 0 and 1. In this case, β It is 0.33.
[0050] S212 inputs the normal sound data of the air conditioner indoor unit 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. Specifically, a backpropagation algorithm based on the total loss function is used to calculate the gradient of the anomaly detection network module parameters, and the parameters of the encoder and decoder are updated through 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 capabilities of the input sequence.
[0051] S213 repeats step S212 until the anomaly detection network module converges to obtain an anomaly detection model.
[0052] In step S3, the fault classification model is also based on a variational autoencoder. The difference is that after encoding, the mean and log-variance of the variational autoencoder's latent variable z are input into a classifier, which consists of a fully connected layer and a softmax function. The fully connected layer's input is the size of z, and its output is the number of classes to be classified, which in this example is three. The fault classification model ultimately outputs a fault classification probability vector, which represents the probability that a given fault score represents a particular fault in that data segment.
[0053] Specifically, the known fault scores are used to calculate the unknown fault probability based on the entropy method. f 1 、f 2 、f 3. Calculate the fault classification probability of the three types of faults a, b, c , first of all, the fault score needs to be normalized. The purpose of normalization is to convert the fault score into a probability value so that the sum of the probabilities of all fault types is 1. The normalization formula is:
[0054] in, a, b, c Represent the probability of occurrence of three types of failures, and satisfy a + b + c =1.
[0055] Then use the entropy calculation formula to calculate the entropy of the unknown fault probability H(e) For a discrete random variable with three possible states (corresponding to three known faults), the entropy is calculated as:
[0056] in, H(e) is the entropy of the unknown failure probability, e is an unknown failure probability, and .
[0057] Finally, the known fault scores and unknown fault probabilities are combined to obtain the final fault score, and the maximum value in the final fault score is taken as the abnormal noise fault result of the air conditioner indoor unit.
[0058] The steps of constructing and training the fault classification model in the aforementioned step S3 include: S301 constructs a fault classification network module, which includes a second decoder, a second encoder, and a classifier; constructs a second reconstruction loss function, a second variational loss function, and a second total loss function, where the second total loss function is expressed as:
[0059] in, LossMSE2 is the mean square error of reconstruction loss, LossKL for KL Divergence loss, β To balance the reconstruction loss and KL The hyperparameters of the weights of the divergence loss, LossCEL is the cross entropy loss of the classifier.
[0060] S302 inputs abnormal sound data from the air conditioner's indoor unit into the fault classification network module to train the second decoder, second encoder, and classifier. A backpropagation algorithm based on a total loss function is used for the second encoder, second decoder, and classifier to calculate the gradients of the model parameters. The encoder and decoder parameters are then updated using an optimizer (such as Adam) to minimize the second total loss function, enabling the fault classification network module to learn effective feature representations and reconstruction capabilities for the input sequence. Specifically, the fault classification module employs supervised learning. Each abnormal data point has a fault type label. This label is converted to a one-hot [0, 1, 0] label and then input into the fault classification network module. During training, the fault classification network module often uses the cross-entropy loss between the label and the predicted label to train the classifier.
[0061] S303 repeats step S302 until the fault classification network module converges to obtain a fault classification model.
[0062] like Figure 3 As shown, it is a schematic diagram of the acquisition system of the abnormal sound detection method of the indoor unit of the air conditioner of the variational autoencoder model provided in this embodiment. The indoor unit of the air conditioner is placed on a moving conveyor belt in the detection production line, and the sound sensor and the photoelectric module are located in a quiet room at the abnormal sound detection station in the detection production line. The photoelectric module is composed of an stm32 chip and a photoelectric sensor. Along the moving direction of the detection 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 indoor unit of the air conditioner. Before sampling, a fixed sampling frequency and acquisition duration are set. In one embodiment of the present application, the sampling frequency fs The data rate is set to 16 kHz, the acquisition duration is set to 3 seconds, the number of channels is set to 1, and the number of data sampling points is set to 48,000. During sampling, when the air conditioner indoor unit moves along the production line into the silent room and approaches the photoelectric sensor and sound sensor, the photoelectric module triggers a signal and sends the configured command to the computer via the serial port. The computer reads the command from the photoelectric module through the serial port and reads the output of the sound sensor using the Python soundcard library.
[0063] like Figure 4 As shown in FIG, the FBank characteristic effect diagram of normal data provided by this embodiment is as follows: Figure 5Figure 2 shows the FBank feature rendering of abnormal data provided by this embodiment. As can be seen from the figure, normal data conforms to the typical spectral regularity of speech signals, while abnormal data may break this regularity due to content or noise interference, specifically manifesting as high-frequency anomalies, harmonic discontinuity, and uneven energy distribution.
[0064] The method for detecting abnormal noise from air conditioner indoor units, based on a variational autoencoder model, provided in this application, acquires operating sound data from air conditioner indoor units on a real-time testing production line. Based on the sound characteristics converted from the sound data, the method determines whether the operating status of the air conditioner indoor units is abnormal and the type of possible fault. Compared to manual auscultation in the original production line, the method for detecting abnormal noise from air conditioner indoor units, based on a variational autoencoder model, provided in this application enables fast, contactless, real-time detection of the operating status of air conditioner indoor units within the production line, reducing the defective rate of air conditioner indoor units leaving the factory and reducing the detection costs of abnormal noise detection stations within the production line.
[0065] In another embodiment, a system for implementing the aforementioned method for detecting abnormal noise in an air conditioner indoor unit based on a variational autoencoder model is provided, the system comprising: The data preprocessing module is used to convert the real-time collected sound data of the air conditioner indoor unit from the one-dimensional original sound signal into a two-dimensional time-frequency feature, and 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 and output the reconstruction error as the anomaly score. It determines whether the anomaly score is less than the preset threshold. If so, the detection result is normal and the detection stops. If not, 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 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 a final fault score, and uses the largest value in the final fault score as the abnormal noise fault result of the air conditioner indoor unit.
[0066] It is understandable that the detailed functional implementation of each of the above units / modules can be found in the introduction of the aforementioned method embodiment, and will not be repeated here.
[0067] It should be understood that the above-mentioned device is used to execute the method in the above-mentioned embodiment. The implementation principle and technical effect of the corresponding program module in the device are similar to those described in the above-mentioned method. The working process of the device can refer to the corresponding process in the above-mentioned method and will not be repeated here.
[0068] Based on the method in the above embodiment, Figure 6As shown, an embodiment of the present application provides an electronic device, which may include: a processor (Processor) 610, a communication interface (Communications Interface) 620, a memory (Memory) 630 and a communication bus 640, wherein the processor 610, the communication interface 620, and the memory 630 communicate with each other via the communication bus 640. The processor 610 can call the logic instructions in the memory 630 to execute the method in the above embodiment.
[0069] In addition, the logic instructions in the aforementioned memory 630 can be implemented in the form of a software functional unit and, when sold or used as an independent product, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the portion that contributes to the prior art, or the portion of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a number of instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application.
[0070] Based on the method in the above embodiment, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program runs on a processor, the processor executes the method in the above embodiment.
[0071] Based on the method in the above embodiment, an embodiment of the present application provides a computer program product. When the computer program product runs on a processor, the processor executes the method in the above embodiment.
[0072] It is understood that the processor in the embodiments of the present application may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field programmable gate arrays (FPGA), other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. The general-purpose processor may be a microprocessor or any conventional processor.
[0073] The method steps in the embodiments of the present application can be implemented by hardware or by a processor executing software instructions. The software instructions can be composed 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, mobile hard disks, CD-ROMs, or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be an integral part of the processor. The processor and storage medium can be located in an ASIC.
[0074] The above embodiments can be implemented in whole or in part using software, hardware, firmware, or any combination thereof. When implemented using software, they can be implemented in whole or in part in the form of a computer program product. The computer program product comprises one or more computer instructions. When loaded and executed on a computer, the computer program instructions fully or partially produce the processes or functions described in the embodiments of this application. 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 via 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, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible by a computer or a data storage device such as a server or data center that integrates one or more available media. The available medium can be magnetic media (e.g., floppy disk, hard disk, tape), optical media (e.g., DVD), or semiconductor media (e.g., solid-state drive (SSD)).
[0075] It will be understood that the various numerical numbers involved in the embodiments of the present application are merely distinctions for the convenience of description and are not intended to limit the scope of the embodiments of the present application.
[0076] It is easy for those skilled in the art to understand that the above is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present application should be included in the scope of protection of the present application.
Claims
1. The method for detecting abnormal noise in the indoor unit of an air conditioner based on a variational autoencoder model is characterized by: include: S1 converts the real-time collected sound data of the air conditioner indoor unit from a one-dimensional original sound signal into a two-dimensional time-frequency feature, and normalizes the two-dimensional time-frequency feature to obtain standardized data; S2 inputs the normalized data into the anomaly detection model, outputs the reconstruction error to construct an anomaly score, and determines whether the anomaly score is less than a preset threshold: if so, the detection result is normal and the detection stops; if not, 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 a 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 a final fault score, and outputs the maximum value of the final fault score as the air conditioner indoor unit abnormal sound fault result; wherein, the anomaly detection model and the fault classification model are both variational autoencoder models.
2. The method for detecting abnormal sound in an air conditioner indoor unit based on a variational autoencoder model according to claim 1, wherein: In step S1, the method of converting the sound data from a one-dimensional original sound signal into a two-dimensional time-frequency feature includes: S101 performs pre-emphasis processing on the sound data through a first-order high-pass filter; S102 performs framing and windowing on the pre-emphasized sound data; S103 performs a fast Fourier transform on each frame of the windowed signal to obtain a frequency spectrum of each frame of the signal, and uses the frequency spectrum to calculate a 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 converting the one-dimensional original sound signal into a two-dimensional time-frequency feature. The output of each filter is expressed as: in, For the i The output of the filter, P ( k ) is the power spectrum, For the i The frequency response of a filter is M is the number of filters, N is the frame length; S105 calculates the mean and standard deviation of the two-dimensional time-frequency feature, and then uses the mean and standard deviation to standardize and normalize the two-dimensional time-frequency feature.
3. The method for detecting abnormal sound in an air conditioner indoor unit based on a variational autoencoder model according to claim 2, wherein: In step S102, the window function during windowing is a Hamming window, which is expressed as the following formula: 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.
4. The method for detecting abnormal sound in an air conditioner indoor unit based on a variational autoencoder model according to claim 1, wherein: In step S2, the step of inputting the standardized data into the anomaly detection model for detection includes: S201 encodes the normalized two-dimensional time-frequency features into a probability distribution in a latent space; Sample a noise vector in , and then the latent variable is obtained by the following formula z : in, μ is the mean, log ( σ 2 ) is the logarithmic variance; S202 from latent variables z The original input sequence is reconstructed, a 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 sound in an air conditioner indoor unit based on a variational autoencoder model according to claim 1, wherein: In step S3, the step of calculating the unknown fault probability based on entropy using the known fault score includes: S301 normalizes the known fault score; S302 uses the entropy calculation formula to calculate the entropy of the unknown fault probability. The entropy calculation formula is: Among them, H(e) is the entropy of unknown fault probability, a, b, c are the fault classification probabilities of three types of faults, and satisfy a + b + c = 1, e is an unknown failure probability, and .
6. The method for detecting abnormal noise in an air conditioner indoor unit based on a variational autoencoder model according to claim 1, wherein: The step of acquiring the anomaly detection model includes: S211 constructs an anomaly detection network module, the anomaly detection network module 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: inputting normal sound data of the air conditioner indoor unit into the anomaly detection network module to train the first encoder and the first decoder, and performing backpropagation on the first encoder and the first decoder; S213 repeats step S212 until the anomaly detection network module converges to obtain the anomaly detection model.
7. The method for detecting abnormal noise in an air conditioner indoor unit based on a variational autoencoder model according to claim 6, wherein: In step S211, the first total loss function is expressed as: in, 1 is the mean square error, LossKL for KL Divergence loss, β To balance the reconstruction loss and KL Hyperparameters for the weights of the divergence loss.
8. The method for detecting abnormal noise in an air conditioner indoor unit based on a variational autoencoder model according to claim 1, wherein: The step of acquiring the fault classification model includes: S301 constructs a fault classification network module, which includes a second decoder, a second encoder, and a classifier; constructs a second reconstruction loss function, a second variational loss function, and a second total loss function; S302: inputting abnormal sound data of the air conditioner indoor unit into the fault classification network module to train the second decoder, the second encoder, and the classifier, and performing backpropagation on the second encoder, the second decoder, and the classifier; S303 repeats step S302 until the fault classification network module converges to obtain the fault classification model.
9. The method for detecting abnormal noise in an air conditioner indoor unit based on a variational autoencoder model according to claim 8, wherein: In step S301, the second total loss function is expressed as: in, LossMSE 2 is the mean square error of reconstruction loss, LossKL for KL Divergence loss, β To balance the reconstruction loss and KL The hyperparameters of the weights of the divergence loss, LossCEL is the cross entropy loss of the classifier.
10. 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 to 9, characterized in that: The system comprises: A data preprocessing module is used to convert the sound data of the air conditioner indoor unit collected in real time from a one-dimensional original sound signal into a two-dimensional time-frequency feature, and standardize the two-dimensional time-frequency feature to obtain standardized data; A fault detection module is configured to input the standardized data into an anomaly detection model for detection, output a reconstruction error as an anomaly score, and determine whether the anomaly score is less than a preset threshold: if so, the detection result is normal and detection is stopped; if not, the detection result is abnormal and the anomaly detection result is transmitted to a fault classification module; A fault classification module is configured to input the anomaly detection result into a fault classification model, output a known fault score, and use the known fault score to calculate the unknown fault probability based on entropy; combine the known fault score and the unknown fault probability into a final fault score, and use the maximum value of the final fault score as the abnormal noise fault result of the air conditioner indoor unit.
Citation Information
Patent Citations
Method and device for realizing vocoder based on variational auto-encoder
CN111724809A
Mechanical fault intelligent diagnosis method based on multi-sensor information fusion
CN113792602A
Bearing fault diagnosis method based on migration component analysis under multi-feature fusion
CN115452380A
Attribute coding-based zero sample rotating machinery fault diagnosis method
CN115855502A
Water chilling unit unknown fault diagnosis method based on semi-supervised adversarial variational automatic coding
CN116089894A
Cited By
Air conditioner fault detection method, device and system and air conditioner
CN122487028A