A switch cabinet voiceprint fault detection method based on feature transformation
Through randomly sized Gaussian windows and iterative adjustment technology, the problem of poor time-frequency matrix distinction ability caused by fixed window size in the prior art is solved, the stability and reliability of voiceprint features are improved, and more accurate fault detection is achieved.
Patent Information
- Application Number
- CN202311292303.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-08
- Publication Date
- 2024-11-15
- Estimated Expiration
- 2043-10-08
AI Technical Summary
In the existing voiceprint technology, the fixed window size leads to poor discrimination ability of the time frequency matrix and is unable to adapt, resulting in a lack of representativeness of feature extraction.
The voiceprint signal is divided into frames using a random size Gaussian window, and the time frequency matrix is generated through generalized S transformation, and the window size is adjusted according to the time frequency matrix correlation coefficient of adjacent frames, and the optimal Gaussian window is obtained through iteratively, and finally the dimension reduction is performed. Processing to improve the representativeness of the eigenvectors.
It improves the stability and reliability of voiceprint features, enhances the distinguishing ability of the time-frequency matrix, and ensures that the feature vector is representative in fault detection.
Smart Images

Figure CN117373484B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of power equipment fault analysis, and in particular to a switch cabinet voiceprint fault detection method based on feature transformation. Background Art
[0002] Switchgear is an important equipment in the power system, and the failure of the switchgear will affect the normal operation of the power system and the reliability of the equipment. In order to improve the efficiency and accuracy of fault detection, researchers have begun to pay attention to the application of voiceprint technology in switchgear fault detection.
[0003] Voiceprint technology is based on the characteristics of sound signals to identify and classify faults. It can detect faults in switch cabinets by analyzing and comparing parameters such as the frequency, amplitude, and harmonics of sound signals. Voiceprint technology is a non-invasive detection method that does not require destructive or contact detection of equipment. It can detect faults by simply collecting the sound signals generated by the equipment, which means that detection can be performed while the equipment is operating normally, without shutting down or disassembling the equipment. In addition, voiceprint technology can collect and analyze the sound signals of the equipment in real time, and can detect and diagnose switch cabinet faults before partial discharge and overheating occur, giving early warning of potential faults and avoiding production stops or accidents caused by equipment failures.
[0004] In existing voiceprint technology, voiceprint recognition usually includes the following steps: extracting features from the collected sound signal, and then using these extracted features for voiceprint recognition. Among them, generalized s transform is one of the feature extraction methods. When using generalized s transform, the sound signal is first divided into continuous frames, and the size of each frame is determined by the window function; then the signal in each frame is generalized s transform to generate the corresponding time-frequency matrix; based on this time-frequency matrix, further feature extraction operations are performed, and then the extracted features are used for voiceprint recognition.
[0005] However, in the above steps, the size of the window function is fixed after being set manually and cannot be adaptive. When the window size is too large, the frequency of the voiceprint information contained in a window may fluctuate greatly. The time-frequency matrix obtained based on the window contains multiple features and lacks the ability to distinguish, further causing the extracted features to be unrepresentative. On the contrary, if the window size is too small, the voiceprint information captured by multiple windows may be highly repeated, resulting in information redundancy. These redundant information may mask some subtle but important voiceprint features, thereby causing the time-frequency matrix obtained based on the window to lose its ability to distinguish, causing the extracted features to be unrepresentative. Summary of the invention
[0006] The present invention provides a switch cabinet voiceprint fault detection method based on feature transformation, which can solve the problem of poor distinguishing ability of a time-frequency matrix obtained according to a fixed-size window in the prior art.
[0007] The present invention provides a switch cabinet voiceprint fault detection method based on feature transformation, comprising:
[0008] Collect the observed voiceprint signal of the switch cabinet, initialize a Gaussian window of random size, and divide the observed voiceprint signal into multiple frames of fixed length through the Gaussian window;
[0009] According to the generalized S transform, the time-frequency matrix corresponding to all frames is obtained, and the correlation coefficient r(A T , B T );
[0010] If the time-frequency matrix correlation coefficient r(A T , B T ) is less than the first threshold, then the time-frequency matrix A corresponding to the current adjacent frames A and B is T , B T is the final time-frequency matrix;
[0011] If the time-frequency matrix correlation coefficient r(A T , B T ) is not less than the set first threshold, the lengths of adjacent frames A and B are adjusted by iterating the size of the current Gaussian window, and the integrated instantaneous frequencies of adjacent frames A and B after the length adjustment are calculated. When the difference between the integrated instantaneous frequency corresponding to the Gaussian window size of a certain iteration and the integrated instantaneous frequency corresponding to the Gaussian window size of the previous iteration is greater than the set second threshold, the iteration is stopped to obtain the optimal Gaussian window, and the final time-frequency matrix is obtained based on the optimal window;
[0012] The final time-frequency matrix is subjected to dimensionality reduction processing to obtain a feature vector, which is then input into a trained residual neural network for switch cabinet fault detection.
[0013] Furthermore, it also includes: performing noise reduction preprocessing on the collected observation voiceprint signal:
[0014] Use short-time Fourier transform to convert the observed voiceprint signal into the frequency domain and extract the spectrum of the observed voiceprint signal;
[0015] Perform spectrogram decomposition on the spectrum of the observed voiceprint signal:
[0016] F=WH (1)
[0017] in,
[0018] F is the frequency spectrum of the observed voiceprint signal;
[0019] W is the source spectrum non-negative matrix obtained by decomposing the spectrum of the observed voiceprint signal. Each column of W represents the energy distribution of a source signal in the frequency domain.
[0020] H is a non-negative matrix of mixing coefficients obtained by decomposing the spectrum of the observed voiceprint signal. Each row of H represents the mixing coefficient of a time period, which is used to describe the contribution of each source signal to the observed voiceprint signal.
[0021] Design the objective function, minimize the objective function by gradient descent method, and obtain the non-negative matrix of the target source spectrum and the target mixing coefficient non-negative matrix
[0022]
[0023] in,
[0024] argmin means finding the parameters that minimize the objective function;
[0025] ||F—WH|| 2 is the objective function;
[0026] They are the source spectrum non-negative matrix and the mixing coefficient non-negative matrix that minimize the objective function;
[0027] By multiplication inverse spectrum transformation, the target source spectrum non-negative matrix and the target mixing coefficient non-negative matrix Multiply them to get the spectrum of the switch cabinet voiceprint signal after noise separation:
[0028] The inverse short-time Fourier transform is performed on the spectrogram of the switch cabinet voiceprint signal after noise separation, and the spectrogram is converted into a time domain signal to obtain the observed voiceprint time domain signal after noise reduction.
[0029] Furthermore, the initializing of a Gaussian window of random size and dividing the observed voiceprint signal into a plurality of frames of fixed length by moving the Gaussian window includes:
[0030] The parameter value of the frame shift is manually set, and the frame shift is used to determine the time interval between adjacent frames A and B;
[0031] According to the parameter value of the frame shift, a Gaussian window of initialized random size is moved along the observed voiceprint signal, and the Gaussian window of initialized random size is multiplied by the observed voiceprint signal at the corresponding position to obtain multiple frames of fixed length:
[0032] x(n)=s(n)*g(n) (3)
[0033] Among them, s(n) is the observed voiceprint signal, g(n) is the Gaussian window, and x(n) is the obtained frame.
[0034] Furthermore, the step of obtaining the time-frequency matrix corresponding to all frames according to the generalized S transform includes:
[0035] Transform each frame using the generalized S-transform:
[0036]
[0037]
[0038] in,
[0039] GST k (t, f) is the energy value obtained by the generalized sigmoid transform at a given time t and frequency f from the observed voiceprint signal of the kth frame;
[0040] x k (u) is the observed voiceprint signal of the kth frame, and u is the independent variable of the integrand;
[0041] g(t,u) is the Gaussian window function, σ is the standard deviation corresponding to the Gaussian window function;
[0042] e -i2πfu is the frequency modulation term, i is the imaginary unit, and π is the circumference of a circle;
[0043] All energy values of each frame are integrated to form a time-frequency matrix of each frame, wherein the rows of the time-frequency matrix represent time, the columns represent frequency, and each element of the time-frequency matrix is the energy value at the corresponding time t and frequency f.
[0044] Furthermore, the calculation of the time-frequency matrix correlation coefficient r(A T , B T ),include:
[0045]
[0046] in,
[0047] r(A T , B T ) is the time-frequency matrix correlation coefficient corresponding to adjacent frames A and B;
[0048] A T , B T It is the time-frequency matrix corresponding to adjacent frames A and B;
[0049] cov(A T , B T ) represents the time-frequency matrix A corresponding to adjacent frames A and BT , B T The covariance of
[0050] std(A T )、std(B T ) are the time-frequency matrices A corresponding to the adjacent frames A and B respectively. T , B T The standard deviation of .
[0051] Furthermore, the adjusting the lengths of adjacent frames A and B by iterating the size of the current Gaussian window includes:
[0052] Iterate the current Gaussian window size with a step size of p. In each iteration, the Gaussian window size corresponding to frame A in adjacent frames A and B is enlarged by p lengths, and the Gaussian window size corresponding to frame B is reduced by p lengths.
[0053] In each iteration, the Gaussian window with the changed size is multiplied by the observed voiceprint signal at the corresponding position to obtain adjacent frames A and B with adjusted lengths.
[0054] Furthermore, the calculation of the integrated instantaneous frequency of the adjacent frames A and B after the length adjustment includes:
[0055]
[0056] in,
[0057] β ip It is the comprehensive instantaneous frequency obtained by expanding the Gaussian window corresponding to frame A by ip lengths and reducing the Gaussian window corresponding to frame B by ip lengths;
[0058] They are respectively the Gaussian window size corresponding to frame A after the length is enlarged by ip, and the Gaussian window size corresponding to frame B after the length is reduced by ip;
[0059] They are the instantaneous frequencies at each moment in frame A and frame B after adjusting their lengths.
[0060] Furthermore, the instantaneous frequency includes:
[0061] Perform short-time Fourier transform on adjacent frames A and B to obtain frequency spectrum representations of frames A and B;
[0062] Calculate the phase difference between adjacent frames A and B
[0063]
[0064] in, Respectively represent the phase of frame A and frame B with frequency index k in the spectrum;
[0065] Using phase difference Compute the local frequency estimate f_approx(k):
[0066]
[0067] Where Δt is the frame shift;
[0068] Linear time interpolation is performed on the local frequency estimation value f_approx(k) to obtain the instantaneous frequency of frame A and frame B at each moment.
[0069] Furthermore, when the difference between the integrated instantaneous frequency corresponding to the Gaussian window size of a certain iteration and the integrated instantaneous frequency corresponding to the Gaussian window size of the previous iteration is greater than the set second threshold, the iteration is stopped to obtain the optimal Gaussian window, including:
[0070] Determine the iteration stopping condition:
[0071] |β ip -β (i-1)p |>θ2 (10)
[0072] in,
[0073] β ip It is the comprehensive instantaneous frequency obtained by expanding the Gaussian window corresponding to frame A by ip lengths and reducing the Gaussian window corresponding to frame B by ip lengths;
[0074] β (i-1)p It is the comprehensive instantaneous frequency obtained by expanding the Gaussian window corresponding to frame A by (i-1)p lengths and reducing the Gaussian window corresponding to frame B by (i-1)p lengths;
[0075] θ2 is the second threshold value set;
[0076] The Gaussian window with an enlarged length of (i-1)p and the Gaussian window with a reduced length of (i-1)p are taken as the optimal Gaussian window.
[0077] Furthermore, the step of performing dimensionality reduction processing on the time-frequency matrix to obtain a feature vector includes:
[0078] Standardize each row of the time-frequency matrix so that its mean is 0 and its variance is 1;
[0079] Calculate the covariance matrix for the standardized time-frequency matrix;
[0080] By performing eigendecomposition on the covariance matrix, the eigenvalues and corresponding eigenvectors are obtained.
[0081] The embodiment of the present invention provides a switch cabinet voiceprint fault detection method based on feature transformation. Compared with the prior art, the beneficial effects thereof are as follows:
[0082] The present invention first divides a sound signal into frames through a Gaussian window function of a random size, performs a generalized s transform on the signal in each frame, generates a time-frequency matrix corresponding to each frame, and then calculates the correlation coefficient of the time-frequency matrices corresponding to adjacent frames. When the correlation coefficient of the time-frequency matrices corresponding to adjacent frames is greater than a set first threshold, the Gaussian window is adjusted. In the process of adjusting the size of the Gaussian window, an optimal Gaussian window is obtained through instantaneous frequency changes. A final time-frequency matrix is obtained according to the optimal Gaussian window, and a dimensionality reduction process is performed on the final time-frequency matrix to obtain a feature vector. The feature vector is input into a trained residual neural network for switch cabinet fault detection.
[0083] The present invention measures the similarity of adjacent frames by the correlation coefficient of the time-frequency matrix corresponding to the adjacent frames. When the adjacent frames are similar, by expanding the window size of the corresponding frame, a window can contain more similar voiceprint information, so that the time-frequency matrix obtained from the frame containing more similar voiceprint information is more distinguishable. Then, the window expansion range is accurately adjusted according to the instantaneous frequency change. When the instantaneous frequency changes greatly during the process of adjusting the window size, it may indicate an important spectrum change in the sound signal. By stopping the window adjustment, these important frequency components can be distinguished. The optimal window size is determined according to the instantaneous frequency change of the voiceprint signal. The time-frequency matrix obtained based on the window can more accurately reflect the spectrum characteristics of the voiceprint signal, so that the features obtained according to the time-frequency matrix are more representative, which helps to improve the stability and reliability of the voiceprint features. BRIEF DESCRIPTION OF THE DRAWINGS
[0084] The accompanying drawings are used to provide further understanding of the present invention and constitute a part of the specification. They are used to explain the present invention together with the embodiments of the present invention and do not constitute a limitation of the present invention.
[0085] In the attached picture:
[0086] Figure 1 It is a flow chart of a switch cabinet voiceprint fault detection method based on feature transformation proposed by the present invention;
[0087] Figure 2 It is a denoising process flow chart of a switch cabinet voiceprint fault detection method based on feature transformation proposed by the present invention;
[0088] Figure 3 It is a time-frequency matrix acquisition flow chart of a switch cabinet voiceprint fault detection method based on feature transformation proposed by the present invention;
[0089] Figure 4It is a framed schematic diagram of a switch cabinet voiceprint fault detection method based on feature transformation proposed by the present invention. DETAILED DESCRIPTION
[0090] The technical solutions in the embodiments of the present invention are clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention, but it should be understood that the protection scope of the present invention is not limited by the specific implementation methods.
[0091] A switch cabinet voiceprint fault detection method based on feature transformation specifically includes the following steps:
[0092] Step 1: Collect the observed voiceprint data of the switch cabinet, including the observed voiceprint data in normal and fault states, divide the continuous observed voiceprint data into voiceprint segments, classify different types of voiceprint segments, and construct the observed voiceprint data set of the switch cabinet, which specifically includes:
[0093] Step 1.1. Use high-quality recording equipment to record the continuous observation voiceprint data of the switch cabinet, including the observation voiceprint data of the switch cabinet in normal and fault states.
[0094] Step 1.2: Use the audio analysis tool Praat-Py to segment the continuous observed voiceprint data into voiceprint segments, and set normal and fault labels for different types of observed voiceprint data to divide them.
[0095] Step 1.3: Divide the collected data into training set, validation set and test set, with the division ratio being 70% training set, 15% validation set and 15% test set.
[0096] Step 2: Use the Mono nonlinear hybrid model to perform denoising operations on the collected observed voiceprint data to remove redundant information and interference.
[0097] Since the switchgear is a high-voltage device, there may be various noise sources around it, such as high-voltage arc noise, motor noise, mechanical vibration noise, air flow noise, environmental noise, etc. The spectral characteristics and time-varying properties of these noise sources may interfere with the sound generated by the switchgear in the working state and fault state. Therefore, the collected observation voiceprint data must be denoised first, including:
[0098] Step 2.1: Use short-time Fourier transform (STFT) to convert the observed voiceprint signal into the frequency domain and extract the spectrum of the observed voiceprint signal:
[0099] F=fft(E) (1)
[0100] in,
[0101] E is the observed voiceprint data of the switch cabinet voiceprint;
[0102] F is the frequency spectrum corresponding to the switch cabinet observed voiceprint data.
[0103] Step 2.2, perform spectrogram decomposition on the spectrum of the observed voiceprint signal. In the spectrogram decomposition method, it is assumed that the mixed audio can be approximately expressed as the product of the source spectrum and the mixing coefficient. The matrix W represents the source spectrum, and each column represents the energy distribution of a source signal in the frequency domain; the matrix H represents the mixing coefficient, and each row represents the mixing coefficient of a time period, which is used to describe the contribution of each source signal in the mixed audio. By performing spectrogram decomposition on the mixed audio, the mixed signal can be decomposed into spectra of different source signals, and the mixing coefficients describing the mixing process can be obtained, including:
[0104] F=WH (2)
[0105] in,
[0106] F is the frequency spectrum of the observed voiceprint signal;
[0107] W is the source spectrum non-negative matrix obtained by decomposing the spectrum of the observed voiceprint signal. Each column of W represents the energy distribution of a source signal in the frequency domain.
[0108] H is a non-negative matrix of mixing coefficients obtained by decomposing the spectrum of the observed voiceprint signal. Each row of H represents a mixing coefficient for a time period, which is used to describe the contribution of each source signal to the observed voiceprint signal.
[0109] Step 2.3: Randomly initialize the source spectrum non-negative matrix W and the mixing coefficient non-negative matrix H.
[0110] Step 2.4, design the objective function, and iteratively update the source spectrum non-negative matrix W and the mixing coefficient non-negative matrix H by minimizing the objective function until the preset number of iterations is reached or the termination condition is met, and the target source spectrum non-negative matrix is obtained. and the target mixing coefficient non-negative matrix
[0111]
[0112] in,
[0113] argmin means finding the parameters that minimize the objective function;
[0114] ||F-WH|| 2 is the objective function;
[0115] They are the source spectrum non-negative matrix and the mixing coefficient non-negative matrix that minimize the objective function;
[0116] ||·|| means finding the norm, which is the Euclidean norm here, which means the square root of the sum of the square elements of the matrix.
[0117] Step 2.5: Transform the target source spectrum into a non-negative matrix by multiplication inverse spectrum transformation and the target mixing coefficient non-negative matrix Perform product reconstruction to obtain the spectrum of the switch cabinet voiceprint signal after noise separation.
[0118] Step 2.6: Perform an inverse short-time Fourier transform on the spectrum of the switch cabinet voiceprint signal after noise separation, convert the spectrum into a time domain signal, and obtain the time domain signal of the observed voiceprint after noise reduction.
[0119] Step 3: Frame the denoised switch cabinet voiceprint time domain signal.
[0120] Framing is a common technique in voiceprint signal processing, which is used to divide continuous voiceprint signals into multiple frames of fixed length. Dividing voiceprint signals into frames allows us to focus on the voiceprint signal data within a certain time period when studying the voiceprint signal, without considering the long-term characteristics of the entire voiceprint signal. This can better describe the local changes and short-term characteristics of the voiceprint signal in time. After dividing the voiceprint signal into frames, the time-varying nature of the voiceprint signal can be better analyzed. Since the voiceprint signal may have different frequencies and amplitudes in different time periods, dividing the voiceprint signal into frames helps to extract and analyze the temporal variation pattern of the signal. Specifically, it includes:
[0121] Step 3.1, manually set the parameter value of the frame shift to determine the time interval between adjacent frames. In the process of framing the voiceprint signal, the frame shift (also called the frame step) is set to achieve overlap and continuity between adjacent frames in the time domain. The frame shift is the distance that the starting position of the frame moves relative to the position of the previous frame. If the frame shift is not performed, the edge between the frames will introduce an additional window effect, resulting in inaccurate voiceprint signal information at the boundary. By setting the frame shift, the boundary effect can be alleviated to a certain extent, making the transition between different frames smoother, and by setting the frame shift, more sampling points in time can be obtained, thereby improving the time domain resolution. When the frame shift is small, there is more overlap between frames, which can more accurately capture the rapid changes and instantaneous characteristics of the signal.
[0122] Step 3.2: According to the parameter value of the frame shift, a Gaussian window of initialized random size is moved along the observed voiceprint signal, and the Gaussian window of initialized random size is multiplied by the observed voiceprint signal at the corresponding position to obtain multiple frames of fixed length, each of which represents the local characteristics of the voiceprint signal over a period of time:
[0123] x(n)=s(n)*g(n) (4)
[0124] Among them, s(n) is the observed voiceprint signal, g(n) is the Gaussian window, and x(n) is the obtained frame. After dividing the observed voiceprint signal into frames through the window function, the resolution of the observed voiceprint signal in the frequency domain can be improved, the frequency leakage in the frequency domain can be reduced, and the resolution of the frequency band can be increased within the frame.
[0125] Step 4: Process the frame signal to obtain the final time-frequency matrix.
[0126] The time-frequency matrix (Time-Frequency Matrix) is a two-dimensional matrix that represents a signal in the time domain and frequency domain. It visualizes the information of the signal in time and frequency, and provides an intuitive way to analyze the time-frequency characteristics and time-frequency structure of the signal. The time-frequency matrix uses time as the horizontal axis and frequency as the vertical axis, and uses color or grayscale to represent the time-frequency energy or phase of the signal. It can clearly show the changes of the signal at different times and frequencies, as well as the dynamic characteristics of the spectrum. The time-frequency matrix is the basis of voiceprint signal processing and feature extraction. By further processing, analyzing and extracting features from the time-frequency matrix, the time-frequency features of the signal can be extracted. These time-frequency features can be used in application fields such as signal classification and fault diagnosis. The following steps are included:
[0127] Step 4.1: Transform each frame using the generalized S transform.
[0128] Generalized S Transform (GST) is one of the time-frequency analysis methods, which is used to describe the characteristics of signals in the time domain and frequency domain. In GST, the signal is weighted by convolving it with a window function and modulating it in the frequency domain to obtain the time-frequency analysis result. The generalized S transform can select the time-frequency features of interest for analysis by adjusting the shape, size and position of the window function, including:
[0129]
[0130]
[0131] in,
[0132] GST k (t, f) is the energy value obtained by the generalized sigmoid transform at a given time t and frequency f from the observed voiceprint signal of the kth frame;
[0133] x k (u) is the observed voiceprint signal of the kth frame, and u is the independent variable of the integrand;
[0134] g(t,u) is the Gaussian window function, σ is the standard deviation corresponding to the Gaussian window function;
[0135] e -i2πfuis the frequency modulation term, i is the imaginary unit, and π is the circumference of a circle.
[0136] Step 4.2: Integrate all energy values obtained from the transformed generalized S to form a time-frequency matrix, where the rows of the time-frequency matrix represent time and the columns represent frequency. Each element of the time-frequency matrix is the energy value at the corresponding time t and frequency f.
[0137] Step 4.3: Calculate the time-frequency matrix correlation coefficients corresponding to adjacent frames.
[0138] In the voiceprint signal, the correlation coefficient of the time-frequency matrices corresponding to adjacent frames indicates the degree of similarity between them. Specifically, if the time-frequency matrices corresponding to two adjacent frames have similar energy distribution and harmonic structure at the same frequency point, the correlation coefficient between them will be high, which means that they have similar characteristics in the frequency domain. Therefore, by calculating the correlation coefficient of the time-frequency matrices corresponding to consecutive frames, the similarity of the spectrum of the voiceprint signal at different time points can be evaluated. The correlation coefficient r(A) corresponding to the time-frequency matrices of adjacent frames A and B can be calculated. T , B T ) is as follows:
[0139]
[0140] Among them, r(A T , B T ) is the time-frequency matrix correlation coefficient corresponding to adjacent frames A and B; A T , B T is the time-frequency matrix corresponding to adjacent frames A and B; cov(A T , B T ) represents the time-frequency matrix A corresponding to adjacent frames A and B T , B T covariance; std(A T )、std(B T ) are the time-frequency matrices A corresponding to the adjacent frames A and B respectively. T , B T The standard deviation of .
[0141] Step 4.4: If the time-frequency matrix correlation coefficient r(A T , B T ) is less than the set first threshold, then the time-frequency matrix corresponding to the current adjacent frames A and B is the final time-frequency matrix; if the correlation coefficient r(A T , B T ) is not less than the set first threshold, execute step 4.5 and step 4.6.
[0142] If the time-frequency matrix correlation coefficient r(AT , B T ) is not less than the first threshold, indicating that the frequency matrix correlation coefficient r(A T , B T ) is larger, indicating that the two frames have similar energy distribution and harmonic structure at the same frequency point, which means that they have similar characteristics in the frequency domain. This further shows that the Gaussian window can be enlarged so that one window can contain more similar voiceprint information.
[0143] Step 4.5: Obtain the optimal Gaussian window according to the instantaneous frequency changes of adjacent frames A and B.
[0144] Adjusting the window size based on the correlation coefficient of the time-frequency matrix may result in information loss, because the correlation coefficient is an indirect quantity calculated by the signal frequency and is relatively insensitive to signal changes. Therefore, adjusting the window size by the instantaneous frequency can increase the sensitivity to signal changes.
[0145] If the window size of a certain frame is changed, but the corresponding instantaneous frequency does not change much, it means that the voiceprint signal may not have obvious frequency changes or drift of frequency components in the corresponding time period, indicating that the voiceprint signal itself remains stable in the corresponding time period. In this case, the window can be expanded so that a window contains more specific voiceprint signals with similar characteristics. However, if the instantaneous frequency changes significantly during the window expansion process, it means that there are components in the voiceprint signal with faster frequency changes in the corresponding time period. At this time, stop expanding the window. The specific steps include:
[0146] Step 4.5.1, enlarge the Gaussian window size corresponding to any one of the adjacent frames A and B with a fixed step size p, and reduce the Gaussian window size corresponding to the other frame with the same step size p;
[0147] Step 4.5.2: Each time the Gaussian window size corresponding to adjacent frames A and B is enlarged or reduced, the instantaneous frequency of all moments in the adjacent frames A and B after enlargement or reduction is calculated, including:
[0148] Perform short-time Fourier transform on adjacent frames A and B to obtain the frequency spectrum representation of frames A and B;
[0149] Calculate the phase difference between adjacent frames A and B
[0150]
[0151] in, Respectively represent the phase of frame A and frame B with frequency index k in the spectrum;
[0152] Using phase difference Compute the local frequency estimate f_approx(k):
[0153]
[0154] Where Δt is the frame shift;
[0155] Linear time interpolation is performed on the local frequency estimation value f_approx(k) to obtain the instantaneous frequency of frame A and frame B at each moment.
[0156] Step 4.5.3: Weight the sum of the instantaneous frequencies at all times in adjacent frames A and B according to the Gaussian window sizes corresponding to adjacent frames A and B to obtain the comprehensive instantaneous frequency:
[0157]
[0158]
[0159]
[0160] in,
[0161] β ip It is the comprehensive instantaneous frequency obtained by enlarging and reducing the Gaussian windows corresponding to adjacent frames A and B by ip lengths;
[0162] The Gaussian window sizes of adjacent frames A and B are enlarged and reduced by ip lengths respectively;
[0163] It is the instantaneous frequency at each moment in A and B after the Gaussian windows corresponding to adjacent frames A and B are enlarged and reduced by ip lengths;
[0164] It is the sum of the instantaneous frequencies at all times in A and B after the Gaussian windows corresponding to adjacent frames A and B are enlarged or reduced by ip lengths.
[0165] Step 4.5.4: When the integrated instantaneous frequency difference corresponding to adjacent step lengths is less than the set second threshold, stop expanding or reducing the size of the Gaussian window corresponding to adjacent frames A and B:
[0166] |β ip -β (i-1)p |<θ2 (13)
[0167] in,
[0168] β ip It is the comprehensive instantaneous frequency obtained by enlarging and reducing the Gaussian windows corresponding to adjacent frames A and B by ip lengths;
[0169] β (i-1)p The comprehensive instantaneous frequency obtained by expanding or reducing the Gaussian windows corresponding to adjacent frames A and B by (i-1)p lengths;
[0170] The Gaussian window with an enlarged length of (i-1)p and the Gaussian window with a reduced length of (i-1)p are taken as the optimal Gaussian window.
[0171] Step 4.6: Re-frame the voiceprint signal according to the optimal Gaussian window, and then use the generalized s transform based on the new adjacent frames to obtain the final time-frequency matrix.
[0172] Step 5: Use principal component analysis to extract the eigenvectors in the final time-frequency matrix, including:
[0173] Step 5.1: Standardize each row of the time-frequency matrix so that its mean is 0 and its variance is 1.
[0174] Step 5.2, calculate the covariance matrix of the standardized time-frequency matrix;
[0175] Step 5.3: Perform eigendecomposition on the covariance matrix to obtain the eigenvalues and corresponding eigenvectors.
[0176] Step 6: Build and train the residual neural network, including:
[0177] Step 6.1: Build a neural network architecture, including:
[0178] Input layer: used to receive the input voiceprint feature vector;
[0179] The residual module is used to extract features. The residual module is composed of several residual blocks connected in series. Each residual block contains a main path and a skip connection:
[0180] The main path is used to learn the features of the input data, including convolutional layers and activation functions;
[0181] Skip connections are used to transfer information across layers, bypassing the main path and connecting the input voiceprint feature vector directly to the output;
[0182] Pooling layers, used to downsample and reduce the dimension of feature maps;
[0183] A global average pooling layer, which is used to convert the output feature map of the last residual module into a feature vector of fixed length;
[0184] The fully connected layer is used to establish a mapping relationship between the feature vector of the global average pooling layer and the final output category;
[0185] The Softmax layer is used to output the category probability of the voiceprint feature vector.
[0186] Step 6.2: Input the switch cabinet voiceprint signal feature vector in the training set into the constructed residual neural network for training, use the cross entropy loss function and stochastic gradient descent method, and update the parameters of the residual neural network through the back propagation algorithm.
[0187] Step 6.3: Use the validation set to evaluate the performance of the trained residual neural network and calculate the evaluation indicators, including accuracy, precision, recall, and F1 value. Adjust and improve the model based on the evaluation results.
[0188] Step 7: After denoising and feature extraction of the 0 kV switch cabinet voiceprint to be detected, the extracted feature vector is input into the residual neural network for detection.
[0189] The above-mentioned embodiments only express several implementation methods of the present invention, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.
Claims
1. A switch cabinet voiceprint fault detection method based on feature transformation, characterized in that: include: Collect the observed voiceprint signal of the switch cabinet, initialize a Gaussian window of random size, and divide the observed voiceprint signal into multiple frames of fixed length through the Gaussian window; According to the generalized S transform, the time-frequency matrix corresponding to all frames is obtained, and the correlation coefficient r(A T ,B T ); If the time-frequency matrix correlation coefficient r(A T ,B T ) is less than the first threshold, then the time-frequency matrix A corresponding to the current adjacent frames A and B is T , B T is the final time-frequency matrix; If the time-frequency matrix correlation coefficient r(A T ,B T ) is not less than the set first threshold, the lengths of adjacent frames A and B are adjusted by iterating the size of the current Gaussian window, and the integrated instantaneous frequencies of adjacent frames A and B after the length adjustment are calculated. When the difference between the integrated instantaneous frequency corresponding to the Gaussian window size of a certain iteration and the integrated instantaneous frequency corresponding to the Gaussian window size of the previous iteration is greater than the set second threshold, the iteration is stopped to obtain the optimal Gaussian window, and the final time-frequency matrix is obtained based on the optimal window; The final time-frequency matrix is subjected to dimensionality reduction processing to obtain a feature vector, which is then input into a trained residual neural network for switch cabinet fault detection.
2. A switch cabinet voiceprint fault detection method based on feature transformation according to claim 1, characterized in that: It also includes: pre-processing the collected observation voiceprint signal to reduce noise: Use short-time Fourier transform to convert the observed voiceprint signal into the frequency domain and extract the spectrum of the observed voiceprint signal; Perform spectrogram decomposition on the spectrum of the observed voiceprint signal: F=WH (1) Where, F is the frequency spectrum of the observed voiceprint signal; W is the source spectrum non-negative matrix obtained by decomposing the spectrum of the observed voiceprint signal. Each column of W represents the energy distribution of a source signal in the frequency domain. H is a non-negative matrix of mixing coefficients obtained by decomposing the spectrum of the observed voiceprint signal. Each row of H represents the mixing coefficient of a time period, which is used to describe the contribution of each source signal to the observed voiceprint signal. Design the objective function, minimize the objective function by gradient descent method, and obtain the non-negative matrix of the target source spectrum and the target mixing coefficient non-negative matrix in, argmin means finding the parameters that minimize the objective function; ||F-WH|| 2 is the objective function; They are the source spectrum non-negative matrix and the mixing coefficient non-negative matrix that minimize the objective function; By multiplication inverse spectrum transformation, the target source spectrum non-negative matrix and the target mixing coefficient non-negative matrix Multiply them to get the spectrum of the switch cabinet voiceprint signal after noise separation: The inverse short-time Fourier transform is performed on the spectrogram of the switch cabinet voiceprint signal after noise separation, and the spectrogram is converted into a time domain signal to obtain the observed voiceprint time domain signal after noise reduction.
3. The switch cabinet voiceprint fault detection method based on feature transformation according to claim 1 is characterized in that: Initializing a Gaussian window of random size and dividing the observed voiceprint signal into multiple frames of fixed length by moving the Gaussian window includes: The parameter value of the frame shift is manually set, and the frame shift is used to determine the time interval between adjacent frames A and B; According to the parameter value of the frame shift, a Gaussian window of initialized random size is moved along the observed voiceprint signal, and the Gaussian window of initialized random size is multiplied by the observed voiceprint signal at the corresponding position to obtain multiple frames of fixed length: x(n)=s(n)*g(n) (3) Among them, s(n) is the observed voiceprint signal, g(n) is the Gaussian window, and x(n) is the obtained frame.
4. The switch cabinet voiceprint fault detection method based on feature transformation according to claim 1 is characterized in that: The step of obtaining the time-frequency matrix corresponding to all frames according to the generalized S transform includes: Transform each frame using the generalized S-transform: in, GST k (t,f) is the energy value obtained by the generalized sigmoid transform at a given time t and frequency f from the observed voiceprint signal of the kth frame; x k (u) is the observed voiceprint signal of the kth frame, and u is the independent variable of the integrand; g(t,u) is the Gaussian window function, σ is the standard deviation corresponding to the Gaussian window function; e -i2πfu is the frequency modulation term, i is the imaginary unit, and π is the circumference of a circle; All energy values of each frame are integrated to form a time-frequency matrix of each frame, wherein the rows of the time-frequency matrix represent time, the columns represent frequency, and each element of the time-frequency matrix is the energy value at the corresponding time t and frequency f.
5. The switch cabinet voiceprint fault detection method based on feature transformation according to claim 1 is characterized in that: The calculation of the time-frequency matrix correlation coefficient r(A) corresponding to adjacent frames A and B T ,B T ),include: in, r(A T ,B T ) is the time-frequency matrix correlation coefficient corresponding to adjacent frames A and B; A T , B T It is the time-frequency matrix corresponding to adjacent frames A and B; cov(A T ,B T ) represents the time-frequency matrix A corresponding to adjacent frames A and B T , B T The covariance of std(A T )、std(B T ) are the time-frequency matrices A corresponding to the adjacent frames A and B respectively. T , B T The standard deviation of .
6. The switch cabinet voiceprint fault detection method based on feature transformation according to claim 1 is characterized in that: The adjusting the lengths of adjacent frames A and B by iterating the size of the current Gaussian window includes: Iterate the current Gaussian window size with a step size of p. In each iteration, the Gaussian window size corresponding to frame A in adjacent frames A and B is enlarged by p lengths, and the Gaussian window size corresponding to frame B is reduced by p lengths. In each iteration, the Gaussian window with the changed size is multiplied by the observed voiceprint signal at the corresponding position to obtain adjacent frames A and B with adjusted lengths.
7. The switch cabinet voiceprint fault detection method based on feature transformation according to claim 1 is characterized in that: The calculating of the integrated instantaneous frequency of the adjacent frames A and B after the length adjustment includes: in, β ip It is the comprehensive instantaneous frequency obtained by expanding the Gaussian window corresponding to frame A by ip lengths and reducing the Gaussian window corresponding to frame B by ip lengths; They are respectively the Gaussian window size corresponding to frame A after the length is enlarged by ip, and the Gaussian window size corresponding to frame B after the length is reduced by ip; They are the instantaneous frequencies at each moment in frame A and frame B after adjusting their lengths.
8. The switch cabinet voiceprint fault detection method based on feature transformation according to claim 7 is characterized in that: The instantaneous frequency includes: Perform short-time Fourier transform on adjacent frames A and B to obtain frequency spectrum representations of frames A and B; Calculate the phase difference between adjacent frames A and B in, Respectively represent the phase of frame A and frame B with frequency index k in the spectrum; Using phase difference Compute the local frequency estimate f_approx(k): Where Δt is the frame shift; Linear time interpolation is performed on the local frequency estimation value f_approx(k) to obtain the instantaneous frequency of frame A and frame B at each moment.
9. The switch cabinet voiceprint fault detection method based on feature transformation according to claim 1 is characterized in that: When the difference between the integrated instantaneous frequency corresponding to the Gaussian window size of a certain iteration and the integrated instantaneous frequency corresponding to the Gaussian window size of the previous iteration is greater than the set second threshold, the iteration is stopped to obtain the optimal Gaussian window, including: Determine the iteration stopping condition: |b ip -b (i-1)p |>θ2 (10) in, β ip It is the comprehensive instantaneous frequency obtained by expanding the Gaussian window corresponding to frame A by ip lengths and reducing the Gaussian window corresponding to frame B by ip lengths; β (i-1)p It is the comprehensive instantaneous frequency obtained by expanding the Gaussian window corresponding to frame A by (i-1)p lengths and reducing the Gaussian window corresponding to frame B by (i-1)p lengths; θ2 is the second threshold value set; The Gaussian window with an enlarged length of (i-1)p and the Gaussian window with a reduced length of (i-1)p are taken as the optimal Gaussian window.
10. The switch cabinet voiceprint fault detection method based on feature transformation according to claim 1 is characterized in that: The step of performing dimensionality reduction processing on the final time-frequency matrix to obtain a eigenvector includes: Standardize each row of the time-frequency matrix so that its mean is 0 and its variance is 1; Calculate the covariance matrix for the standardized time-frequency matrix; By performing eigendecomposition on the covariance matrix, the eigenvalues and corresponding eigenvectors are obtained.
Citation Information
Cited By
Voiceprint fault analysis system
CN120183440A
