Method for monitoring sound of machine equipment in strong noise environment
Technical Field
The invention relates to the field of sound signal processing, in particular to a machine equipment sound monitoring method in a strong noise environment.
Background
At present, the aging condition of machine equipment generally exists in a plurality of factories or enterprise production workshops, faults can occur at any time, the occurrence of the faults is difficult to predict, production interruption can be caused, or unqualified products can be produced, so that the operation state of the machine equipment needs to be monitored in real time, and the faults are warned in advance.
In a plurality of monitoring methods of machine equipment state, because the coverage of sound signals is wide, non-contact measurement can be adopted in the measurement process, the unification of data specifications can be realized, the online monitoring requirements of different machine working conditions are met, meanwhile, the cost of sound sensor equipment is low, and the post-processing analysis space of sound signal data is large, so that the machine equipment state monitoring or fault diagnosis technology based on the sound recognition technology becomes a hotspot of research.
Among the numerous methods for monitoring or diagnosing faults of machine equipment based on acoustic signals, two main problems exist:
on one hand: most of the methods are applied to monitoring key parts of machine equipment such as bearings, transformers or engines, are mainly used in specific places with few noise types, and have few monitoring on the operation state of large machine equipment in a production workshop. In mill or enterprise's workshop, when many machines move simultaneously, the noise is not only of the kind more around, and complicated various, and sound is great, and this sound collection and the discernment when moving a certain machine equipment cause great influence, makes the sound signal of gathering include a large amount of noises, and the SNR of effective signal is extremely low for current sound identification technique receives great influence under this kind of strong noise environment, and the discernment accuracy is generally lower.
On the other hand: in many sound signal identification methods, a large amount of sample data is needed to train a classifier model, some researchers adopt the currently disclosed sample data set, and some researchers simulate a fault signal by artificially damaging key components of a machine, so as to collect the sample data. The two types are ideal, when a plurality of large-scale machine equipment in a production workshop operate simultaneously, the fault types are various, the fault reasons are more complex, and meanwhile, sound generated when other machine equipment operates forms strong noise interference on a monitored machine, so that certain errors exist in sound signal monitoring, the scene is difficult to describe by the existing sample data, and the fault sample data cannot be completely collected in a short period.
Disclosure of Invention
In view of the above, the present invention provides a machine equipment sound monitoring method in a strong noise environment, which utilizes a self-adaptive noise cancellation technique to eliminate the influence of ambient noise to the maximum extent, and uses a Hidden Markov Model (HMM) to classify sound signals, so as to effectively separate the monitored sound and ambient noise from the strong noise environment, and lay a foundation for the subsequent research of machine equipment state monitoring based on a sound recognition technique.
In order to achieve the purpose, the technical scheme adopted by the invention comprises the following steps:
step S1: and collecting sample data. Collecting noise-containing sound and environmental noise; the noise-containing sound refers to sound emitted by a monitored machine in a noise environment during operation, and the sound is recorded as a signal source; the environmental noise refers to the mixed sound of the ambient environmental noise when the monitored machine is not operated and the sound emitted by other machine equipment when the monitored machine is operated.
Step S2: adaptive noise cancellation. And the self-adaptive noise canceller is adopted to perform self-adaptive cancellation on the collected noise-containing sound and the ambient noise, so that a pure sound signal when the monitored machine operates is separated.
The self-adaptive noise canceller comprises a self-adaptive filter, a self-adaptive algorithm and a subtracter;
the self-adaptive filter adopts a transverse filter structure to realize the filtering processing of the ambient noise;
the self-adaptive algorithm adopts a least mean square error (LMS) algorithm, and carries out prediction according to the first M input data, so that the output value of the self-adaptive filter approaches to the noise superposed on a signal source;
the subtracter carries out subtraction operation on the noisy sound signal and the output signal of the adaptive filter to obtain a pure sound signal, namely, the sound emitted by the monitored machine equipment during operation.
The filtering formula of the adaptive filter is as follows:
where y (n) is the output signal of the filter, wi(n) is the filter tap coefficient, n1(n) is the ambient noise signal, i.e. the input signal of the adaptive filter.
The output formula of the subtracter is as follows:
e(n)=s(n)+n0(n)-y(n) (2)
wherein s (n) is the sound signal of the monitored machine when running alone, i.e. the signal source, s (n) + n0(n) is a noisy sound, n0And (n) is uncorrelated noise superimposed on the signal source.
Step S3: and preprocessing sample data. And respectively preprocessing the noise-containing sound, the environmental sound and the self-adaptive noise cancellation output noise. The pre-processing includes filtering, a/D conversion, pre-emphasis, frame windowing, and endpoint detection.
The filtering adopts an FIR filter to filter out non-audio components in the signal, and the signal-to-noise ratio of the input signal is improved to the maximum extent;
the A/D conversion is to convert analog signals into digital signals;
the pre-emphasis is to emphasize the high-frequency part of the signal, enhance the high-frequency resolution of the sound signal and facilitate the subsequent spectral analysis; a first order FIR high-pass digital filter with a transfer function of H (z) 1-az is selected for pre-emphasis processing-1,0.9<a<1.0;
The framing windowing is to divide the sound signal into small time periods, namely frames, and then perform windowing on the framed sound signal, and mainly aims to keep the short-time stability of the sound signal and reduce the Gibbs effect, wherein the frame length is set to be 20ms, the frame length is 1/3 times, and the windowing adopts a Hamming window;
the end point detection is set in order to distinguish background noise from environmental noise in a sound signal and accurately judge a start point and an end point of the sound signal.
Step S4: and extracting sample data features. Respectively extracting characteristic parameters of noise-containing sound, environmental sound and output noise after self-adaptive noise cancellation, and adopting a Mel frequency cepstrum coefficient as the characteristic parameters of the sound.
Step S5: and training a hidden Markov model. And establishing a hidden Markov model, and training the HMM by adopting data extracted by the characteristics.
The HMM is used as a statistical analysis model to describe a markov process with unknown parameters, and the HMM can be described as:
λ=(N,M,π,A,B) (3)
n is the state number of a Markov chain in the model, M is the number of possible observed values corresponding to each state, and pi is an initial state probability distribution vector; a is a state transition probability matrix and B is an observation probability matrix.
Step S6: and collecting actual measurement sound. And a sensor is adopted to collect sound signals generated when the machine equipment runs.
Step S7: and (4) preprocessing. The sound collected in real time is preprocessed in a method consistent with the sample data preprocessing method in step S3.
Step S8: and (5) feature extraction. Extracting the characteristics of the sound acquired in real time, wherein the method is consistent with the method for extracting the characteristics of the sample data in the step S4; the real-time data is sent to a trained HMM after being preprocessed and feature extracted.
Step S9: and identifying a result. Through HMM prediction, collected sounds can be divided into signal source sounds and environmental noises.
The invention has the following beneficial effects and advantages:
(1) the method has the advantages that the sound of the monitored machine during operation and the ambient sound of the machine when not in operation are respectively collected, and sample data is conveniently, truly and effectively collected;
(2) by adopting the self-adaptive noise cancellation technology and the self-adaptive algorithm, the signal output by the self-adaptive filter can approach the noise signal to the maximum extent, so that the pure sound signal of the monitored machine equipment is obtained;
(3) the HMM has a rigorous data structure and reliable calculation performance, and can well describe the randomness and real-time performance of sound signals and surrounding noise generated when the machine equipment runs on the basis of monitoring the sound signals in real time.
Drawings
FIG. 1 is a flow chart of a method for monitoring sound of a machine under a strong noise environment according to the present invention;
FIG. 2 is a schematic diagram of an adaptive noise canceller used in the present invention;
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Examples
Referring to fig. 1, a method for monitoring sound of a machine device in a strong noise environment includes the following steps:
step S1: and collecting sample data. Collecting noise-containing sound and collecting environmental noise; the noise-containing sound refers to the sound emitted by the monitored machine in the noise environment during operation, and the sound is recorded as a signal source; the environmental noise refers to a mixed sound of ambient environmental noise when the monitored machine is not in operation and sound emitted by other machine equipment when the monitored machine is in operation.
Step S2: adaptive noise cancellation. And the self-adaptive noise canceller is adopted to perform self-adaptive cancellation on the collected noise-containing sound and the ambient noise, so that a pure sound signal when the monitored machine operates is separated.
The self-adaptive noise canceller comprises a self-adaptive filter, a self-adaptive algorithm and a subtracter;
the self-adaptive filter adopts a transverse filter structure to realize the filtering processing of the ambient noise;
the self-adaptive algorithm adopts a least mean square error (LMS) algorithm, and carries out prediction according to the first M input data, so that the output value of the self-adaptive filter approaches to the noise superposed on a signal source;
the subtracter carries out subtraction operation on the noisy sound signal and the output signal of the adaptive filter to obtain a pure sound signal, namely, the sound emitted by the monitored machine equipment during operation.
The filtering formula of the adaptive filter is as follows:
where y (n) is the output signal of the filter, wi(n) is the filter tap coefficient, n1(n) is the ambient noise signal, i.e. the input signal of the adaptive filter.
The output formula of the subtracter is as follows:
e(n)=s(n)+n0(n)-y(n) (5)
wherein s (n) is the sound signal of the monitored machine when running alone, i.e. the signal source, s (n) + n0(n) is a noisy sound, n0And (n) is uncorrelated noise superimposed on the signal source.
Step S3: and preprocessing sample data. And respectively preprocessing the noise-containing sound, the environmental sound and the noise output by the adaptive noise canceller. The pre-processing includes filtering, a/D conversion, pre-emphasis, frame windowing, and endpoint detection.
The filtering adopts an FIR filter to filter out non-audio components in the signal, and the signal-to-noise ratio of the input signal is improved to the maximum extent.
The a/D conversion is to convert an analog signal into a digital signal.
The pre-emphasis emphasizes the high-frequency part of the signal to enhance the high-frequency resolution of the sound signal, thereby facilitating the subsequent spectral analysis. A first order FIR high-pass digital filter with a transfer function of H (z) 1-az is selected for pre-emphasis processing-1,0.9<a<1.0。
The frame windowing divides the sound signal into small time periods, namely frames, and then performs windowing on the framed sound signal, and the main purpose is to keep the short-time stationarity of the sound signal and reduce the Gibbs effect. Wherein the frame length is set to 20ms, the frame is moved to 1/3 of the frame length, and the windowing adopts a Hamming window.
The end point detection is set in order to distinguish background noise from environmental noise in a sound signal and accurately judge a start point and an end point of the sound signal.
Step S4: and extracting sample data features. And respectively extracting characteristic parameters of noise-containing sound, environmental sound and output noise after self-adaptive noise cancellation. The invention adopts the Mel frequency cepstrum coefficient as the characteristic parameter of the sound.
Step S5: and training a hidden Markov model. And establishing a hidden Markov model, and training the HMM by adopting data extracted by the characteristics.
The HMM is used as a statistical analysis model to describe a markov process with unknown parameters, and the HMM can be described as:
λ=(N,M,π,A,B) (6)
n is the state number of a Markov chain in the model, M is the number of possible observed values corresponding to each state, and pi is an initial state probability distribution vector; a is a state transition probability matrix and B is an observation probability matrix.
In a specific embodiment, the step S3 includes the following steps:
step S31: evaluating the problem, namely determining the number N of states and the number M of possible observation values corresponding to each state by taking the observation time T as the time when the machine finishes a certain production process after running one cycle;
step S32: calculating the probability of the model lambda generating the observation value sequence, and determining B;
step S33: learning the problem, for a given observation sequence O, under the maximum likelihood criterion to obtain a model
λ=(N,M,π,A,B):max p{O|λ}。 (7)
In the above implementation, π takes an equal probability distribution.
The invention takes the feature vector as an observation sequence, can reserve the feature information of the sound signal to the maximum extent, and enables the sound identification to have higher precision.
Step S6: and (5) collecting the sound in real time. Collecting a sound signal when the machine equipment runs by adopting a sensor;
step S7: and (4) preprocessing. Preprocessing the sound acquired in real time, wherein the method is consistent with the sample data preprocessing method in the step S3;
step S8: and (5) feature extraction. Extracting the characteristics of the sound acquired in real time, wherein the method is consistent with the method for extracting the characteristics of the sample data in the step S4; real-time data are sent into a trained HMM after being preprocessed and feature extracted;
step S9: and identifying a result. Through HMM prediction, collected sounds can be divided into signal source sounds and environmental noises.
The machine equipment sound monitoring method under the strong noise environment provided by the invention separates the monitored sound from the strong noise environment by adopting the self-adaptive noise cancellation technology, reduces the influence of the ambient environment noise on the monitored sound to the maximum extent, and classifies the real-time sound signals by adopting the hidden Markov model, thereby having higher reliability and identification accuracy.
The above description is only a preferred embodiment of the present invention, and the above example is only a specific description of the present invention, but not limited thereto. Any changes or substitutions that may be easily conceived by one skilled in the art are intended to be included within the scope of the present invention.