Time-frequency dual-robust filtering method for demagnetization diagnosis of permanent magnet motor

By employing a time-frequency dual robust filtering method, combined with adaptive Hampel filtering and weighted spectral subtraction of Gaussian process regression, the problems of noise and pulse interference in the demagnetization fault diagnosis of permanent magnet synchronous motors are solved, achieving efficient fault feature extraction and improved diagnostic accuracy.

CN122019995APending Publication Date: 2026-05-12SHANDONG UNIV +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHANDONG UNIV
Filing Date
2026-01-21
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

Existing technologies struggle to effectively address both strong background noise and impulsive abnormal disturbances when diagnosing demagnetization faults in permanent magnet synchronous motors, leading to decreased diagnostic accuracy and information loss.

Method used

A time-frequency robust filtering method is adopted. The time domain is preprocessed by an adaptive Hampel filter to remove sudden outliers and impulse interference. The frequency domain is then reduced by weighted spectral subtraction based on Gaussian process regression, and the frequency weights are dynamically generated to enhance the signal.

Benefits of technology

It effectively suppresses background noise, preserves fault-related features, improves the reliability and accuracy of diagnosis, is suitable for non-invasive monitoring, and enhances the accuracy and generalization ability of intelligent diagnostic models.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122019995A_ABST
    Figure CN122019995A_ABST
Patent Text Reader

Abstract

The invention relates to a time-frequency dual-robust filtering method for demagnetization diagnosis of a permanent magnet motor, which belongs to the field of fault diagnosis of the permanent magnet motor, and comprises the following steps: loading an original signal of the permanent magnet motor, and carrying out time-domain filtering through a self-adaptive Hampel filter; framing windowing processing: converting the signal after time domain filtering into a frequency domain signal; training a Gaussian process regression model by using a normal sample; calculating a reference noise spectrum; performing frequency domain depth noise reduction by adopting a weighted spectral subtraction method; and reconstructing the filtered signal. According to the invention, sudden abnormal values and pulse interference can be effectively eliminated; and frequency domain deep noise reduction is carried out through weight spectrum subtraction, so that deep suppression can be carried out in a strong noise frequency band, and weak suppression or reservation can be carried out in a weak noise frequency band and a frequency band possibly containing fault characteristics. According to the method, weak characteristic components related to demagnetization faults can be reserved and even enhanced while background noise is restrained to the maximum extent, loss of diagnosis information is fundamentally avoided, and the diagnosis reliability is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to a time-frequency dual robust filtering method for demagnetization diagnosis of permanent magnet motors, belonging to the field of permanent magnet motor fault diagnosis technology. Background Technology

[0002] Permanent magnet synchronous motors (PMSMs) are widely used in new energy vehicles, industrial drives, and other fields due to their high power density, high efficiency, and excellent control performance. However, irreversible demagnetization faults can occur during the operation of PMSMs, which is one of their most significant failure modes. Demagnetization of the permanent magnets leads to weakened magnetic flux, increased torque ripple, and decreased efficiency. In severe cases, it can even cause motor runaway, resulting in huge economic losses and safety accidents. Therefore, early, accurate, and reliable demagnetization fault diagnosis of PMSMs has extremely important engineering value and economic significance. Currently, fault diagnosis based on signal processing is one of the main technical means for detecting demagnetization in PMSMs. Its basic principle is that demagnetization faults change the air gap magnetic field of the motor, thereby introducing specific fault characteristic frequency components into signals such as stator current, vibration, and noise. By collecting and analyzing these signals, fault diagnosis and identification can be achieved.

[0003] However, in practical engineering applications, using the collected motor noise signals for demagnetization fault diagnosis mainly faces the following two challenges: First, there is strong background noise and interference. Motors typically operate in complex industrial environments, and their monitoring signals are highly susceptible to contamination from switching noise of power electronic devices, coupled vibrations from other mechanical equipment, transmission line interference, and the noise of the sensor itself. This strong background noise can mask subtle early fault characteristics, especially specific frequency components related to the fault, making feature extraction difficult and reducing diagnostic accuracy. Second, there are impulsive abnormal disturbances. During motor operation, sudden load changes, momentary poor contact in the circuit, or external impacts can introduce non-Gaussian, impulsive outliers into the monitoring signal. These outliers are not periodic but have high energy, severely distorting the statistical characteristics of the signal and interfering with the judgment of the signal's true characteristics.

[0004] To address these challenges, existing technologies mainly include spectral subtraction and various filtering techniques, but all have significant limitations. Traditional spectral subtraction achieves noise reduction by subtracting the estimated noise power spectrum from the power spectrum of the noisy signal. While simple and effective, its core drawback lies in the need to manually set fixed spectral subtraction coefficients. In the complex operating conditions of motors in reality, noise is not stationary, and fixed coefficients can lead to residual environmental noise or signal distortion caused by over-suppression, making it difficult to achieve optimal noise reduction globally. Traditional filtering techniques, such as Wiener filtering or Kalman filtering, either rely on accurate system models that are difficult to establish in practice or assume that the noise follows a specific distribution similar to a Gaussian distribution, thus exhibiting poor robustness to impulsive abnormal disturbances. Furthermore, while standard median filtering can suppress impulse noise, it over-smooths the signal, losing a large amount of useful fault details. Model-based optimal filters, on the other hand, experience a sharp deterioration in performance when encountering non-Gaussian impulse disturbances. In summary, a significant problem with existing technologies is the lack of a comprehensive solution that can synergistically handle sudden impulse noise and strong background noise.

[0005] Therefore, a new technical solution is urgently needed to effectively solve the problem of demagnetization fault diagnosis of permanent magnet motors in environments with strong noise and pulse interference. Summary of the Invention

[0006] To address the shortcomings of existing technologies, this invention provides a time-frequency dual robust filtering method for demagnetization diagnosis of permanent magnet motors. It employs a dual robustness enhancement strategy involving serial coordination in both the time and frequency domains. First, an adaptive Hampel filter is proposed to preprocess the original signal in the time domain, effectively eliminating sudden outliers and impulse interference. Then, a weighted spectral subtraction method based on Gaussian process regression (GPR) is designed for deep noise reduction in the frequency domain. This method achieves deep suppression in strong noise bands and weak suppression or preservation in weak noise bands and bands that may contain fault characteristics. This precise noise reduction strategy, matched to the signal characteristics, can maximally suppress background noise while preserving or even enhancing weak feature components related to demagnetization faults, fundamentally avoiding the loss of diagnostic information and improving diagnostic reliability.

[0007] The present invention adopts the following technical solution: A time-frequency dual robust filtering method for demagnetization diagnosis of permanent magnet motors includes the following steps: S1, Load the original signal of the permanent magnet motor, and perform time-domain filtering on the original signal of the permanent magnet motor through an adaptive Hampel filter; S2, load the time-domain filtered data, perform frame-by-frame windowing processing, and convert the time-domain filtered signal into a frequency-domain signal; S3, using normal samples to train a Gaussian process regression model; S4, Calculate the reference noise spectrum; S5 generates frequency weights based on a Gaussian process regression model and performs deep frequency domain noise reduction using weighted spectral subtraction. S6, Reconstruct the filtered signal.

[0008] Preferably, in step S1, the original signal of the permanent magnet motor is first extracted, and the process is as follows: The data matrix storing the original signal of the permanent magnet motor is denoted as D, with a dimension of n×m, where n is 2048 rows representing signal data and m is the number of columns, with each column representing an independent signal. An additional 2049 rows are added at the bottom of the 2048 rows to serve as label rows, forming the data matrix D'. The permanent magnet motor is a 6-slot, 4-pole surface-mount permanent magnet motor. There are 6 types of labels: Label 0 indicates that the motor does not demagnetize; Label 1 indicates that a single magnetic pole of the motor has demagnetized; Label 2 indicates that two adjacent magnetic poles of the motor have demagnetized; Label 3 indicates that two magnetic poles in opposite positions have demagnetized; Label 4 indicates that three magnetic poles have demagnetized; Label 5 indicates that all four magnetic poles of the motor have demagnetized. Decompose the data matrix D' into signal data X and label data L, where X = D'(1:2048,:) represents all columns from row 1 to row 2048 of the data matrix D', and label data L = D'(2049,:) represents all columns from row 2049 of the data matrix D'. Initialize a zero matrix Y with the same dimensions as the signal data X, and use it as the data storage matrix for subsequent processing.

[0009] Preferably, in step S1, for each independent signal x in the signal data X, the improved adaptive weighted Hampel filtering function is called sequentially to obtain the filtered signal y. The filtered signal y is then stored column by column in the corresponding position of matrix Y. Finally, the original label data L is added to the end of the filtered signal matrix Y to form a new matrix. =[Y;L], and save the result as a new data file to complete the entire filtering and data reconstruction process.

[0010] The preferred, improved adaptive weighted Hampel filter function includes the following filtering process: S12, iterate through each point i in the independent signal x, calculate the left boundary of the window l=max(1,ih), and simultaneously calculate the right boundary of the window r=min(n,i+h), where h is the half-width, h=0.5*( -1), Indicates the sliding window size; extracts window data. The actual window length N = r - l + 1; S13, Extract the median of the window data Calculate the absolute deviation of each data window point from the median. :

[0011] in It is a data window The first in One element; S14, based on absolute deviation Calculate the weights and introduce the weight decay coefficient. α , α It is a positive constant;

[0012] in, It is the first The weight of each point; S15, for window data Sort by value in ascending order to get the sorted values. For all Normalization is performed to obtain the normalized weights. ; Calculate the cumulative weights:

[0013] in, For the front The cumulative weights of each sorting point are then used to find the median position. ,satisfy:

[0014] in, This represents the cumulative weight value at the median position. ; Let the weighted median , This indicates the first element in the sorted data sequence. The value of each point; S16, Calculate the absolute deviation based on the weighted median:

[0015] in It is the first The absolute deviation of each point from the weighted median; right Sort in ascending order to get The corresponding normalized weights after sorting Then, the cumulative weights are calculated:

[0016] Find the final weighted median position ,satisfy:

[0017] This represents the cumulative weight value when the cumulative weight reaches or exceeds half of the sum of all weights in the sorted absolute deviation sequence. Let the final weighted median mad weighted for: ; S17, Check for abnormal conditions; when the condition is met... At that time, then order Otherwise keep ;in, Let i be the i-th point in x. y i It is the i-th point of y. This is the MAD threshold coefficient.

[0018] Preferably, in step S2, the result after time-domain filtering is... =[Y;L] as input, let D filtered =Y, storing the time-domain filtered data in matrix D. filtered In the context, the dimension is N×M, and the initial augmented data matrix Y is... enhanced A zero matrix; D is divided into six categories of labels filtered The data column yields the first... The set of data column indexes corresponding to class labels ; Define a Hamming window function to reduce spectral leakage caused by framing:

[0019] in It is the Hamming window function at the discrete-time index point n The value at that location, L 1 indicates frame length; Perform FFT calculations on the windowed and framed frames to convert the time-domain signal into a frequency-domain complex sequence.

[0020] Preferably, the windowed framing and FFT calculation process is as follows: First, take D. filtered The column is a signal frame For signal frames Add a window:

[0021] in This is the signal after windowing; The FFT transformation formula is:

[0022] in, It is the first in the frequency domain The complex representation of each frequency component is the complex spectrum. j It is the imaginary unit.

[0023] Preferably, the specific process of step S3 is as follows: S31, collect the power spectral characteristics of the normal sample data corresponding to the undemagnetized prototype (i.e., label 0), denoted as... Specifically: Forward One sample ( ) Perform frame segmentation: Each sample is divided into frame, T =( M -1- L 1) / H +1 frame, H Indicates frame shift; the signal of the t-th frame is denoted as Add a window: , indicating that the signal of frame t is multiplied element-wise by the Hamming window; Calculate the power spectrum:

[0024] in, It is the FFT result of the t-th frame signal. The power spectrum of the t-th frame; Calculate the average power spectrum:

[0025] in, For the first k The average power spectrum of each sample; S32, Construct the training dataset Normalized frequency points:

[0026] in, This represents the normalized frequency point, and j represents the index. Construct the input feature matrix:

[0027] in Represents the Kronecker product. Indicates a by K A row vector consisting of 1s; the output vector is ; S33, Train the Gaussian process regression model, the formula is as follows:

[0028] Here, GPR represents the optimal Gaussian process regression model found through the optimization process. It is a squared exponential kernel function. i This is a hyperparameter.

[0029] Preferably, in step S4, a reference noise spectrum is calculated for all normal samples as a global estimate of the noise power spectrum. .

[0030] Preferably, the implementation process of step S5 is as follows: S51, for the current sample ct is set to 0, 1, 2, 3, 4, or 5 for frame division and windowing. 'frame' represents the framing function; then the short-time spectrum is calculated. and power spectrum F() represents the Discrete Fourier Transform; F c ( )express The Fourier transform result (i.e., short-time spectrum) of the short-time signal; oh , t () represents coordinates on the frequency-time plane, used to index the time and frequency dimensions of the short-time spectrum; S52, Predicted Frequency Weights: This indicates the frequency point. oh As input, these values ​​are substituted into the pre-trained Gaussian process regression model to obtain the initial predicted weights for that frequency point. These weights are then normalized to obtain the normalized frequency weights. :

[0031] min( W ( oh ))express W ( oh The minimum value of ), max( W ( oh ))express W ( oh The maximum value of ). S53, use the following formula for weighted spectral subtraction:

[0032] in These are noise suppression parameters used to control the amplitude before noise suppression; Achieve frequency adaptation; β Indicates the minimum power threshold; This represents the enhanced signal power spectrum after weighted spectral subtraction.

[0033] Preferably, the process of reconstructing the signal is as follows: The enhanced spectrum is obtained using the following formula:

[0034] e The symbol representing the natural base; The spectrum will then be enhanced. Perform an inverse Fourier transform (IFFT) to obtain the enhanced time-domain frame signal. The complete time-domain signal is synthesized using the overlapadd function:

[0035] H Indicates frame shift, M Indicates the length of the output signal; Finally, reconstruct the complete data matrix: .

[0036] For any details not covered in this invention, please refer to the prior art.

[0037] The beneficial effects of this invention are as follows: 1. This invention employs a dual robustness enhancement strategy for signals, combining time-domain and frequency-domain sequential collaboration. First, an adaptive Hampel filter is proposed to preprocess the original signal in the time domain, effectively eliminating sudden outliers and impulse interference. Then, a weighted spectral subtraction method based on Gaussian process regression (GPR) is designed for deep noise reduction in the frequency domain.

[0038] 2. In this invention, the time-domain filtering stage uses weighted median (MAD) and weighted adaptive methods to identify and replace outliers, which is superior to traditional fixed threshold methods. The frequency-domain denoising stage utilizes the GPR model to autonomously learn the statistical characteristics and frequency distribution of noise from normal samples, dynamically generating frequency-related weights, thus achieving frequency-specific intelligent spectral reduction.

[0039] 3. This invention uses GPR to predict frequency weights, enabling deep suppression in high-noise frequency bands and weak suppression or preservation in low-noise frequency bands and those potentially containing fault characteristics. This precise noise reduction strategy, matched to signal characteristics, can suppress background noise to the maximum extent while preserving or even enhancing weak characteristic components related to demagnetization faults, fundamentally avoiding the loss of diagnostic information and improving diagnostic reliability.

[0040] 4. This invention directly processes the noise signal during motor operation, which can be collected through a non-contact microphone without requiring any modification to the motor or installation of expensive internal sensors, thus achieving non-invasive monitoring.

[0041] 5. As a front-end signal preprocessing module in the fault diagnosis process, this invention can provide high-quality preprocessed data for back-end intelligent diagnostic algorithms based on deep learning and other methods, which can significantly improve the accuracy and generalization ability of intelligent diagnostic models and solve the industry pain point of poor quality of raw noise data leading to performance bottleneck of intelligent algorithms. Attached Figure Description

[0042] The accompanying drawings, which form part of this application, are used to provide a further understanding of this application. The illustrative embodiments of this application and their descriptions are used to explain this application and do not constitute an undue limitation of this application.

[0043] Figure 1 This is a flowchart of the time-frequency dual robust filtering method for demagnetization diagnosis of permanent magnet motors according to the present invention; Figure 2 The image shows a comparison of the results obtained by classifying unfiltered data and data filtered using the filtering method of the present invention, where (a) is unfiltered data and (b) is data filtered using the filtering method of the present invention. Detailed Implementation

[0044] To enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this invention will be clearly and completely described below with reference to the accompanying drawings. However, this is not the only description; all aspects not described in detail herein are based on conventional techniques in the art.

[0045] Example 1 A time-frequency dual robust filtering method for demagnetization diagnosis of permanent magnet motors includes the following steps: S1, Load the original signal of the permanent magnet motor, and perform time-domain filtering on the original signal of the permanent magnet motor through an adaptive Hampel filter; S2, load the time-domain filtered data, perform frame-by-frame windowing processing, and convert the time-domain filtered signal into a frequency-domain signal; S3, using normal samples to train a Gaussian process regression model; S4, Calculate the reference noise spectrum; S5 generates frequency weights based on a Gaussian process regression model and performs deep frequency domain noise reduction using weighted spectral subtraction. S6, Reconstruct the filtered signal.

[0046] Example 2 A time-frequency dual robust filtering method for demagnetization diagnosis of permanent magnet motors, as described in Example 1, differs in that, in step S1, the original signal of the permanent magnet motor is first extracted, the process of which is as follows: The data matrix storing the original signal of the permanent magnet motor is denoted as D, with a dimension of n×m, where n is 2048 rows representing signal data and m is the number of columns, with each column representing an independent signal. An additional 2049 rows are added at the bottom of the 2048 rows to serve as label rows, forming the data matrix D'. The permanent magnet motor is a 6-slot, 4-pole surface-mount permanent magnet motor. There are 6 types of labels: Label 0 indicates that the motor does not demagnetize; Label 1 indicates that a single magnetic pole of the motor has demagnetized; Label 2 indicates that two adjacent magnetic poles of the motor have demagnetized; Label 3 indicates that two magnetic poles in opposite positions have demagnetized; Label 4 indicates that three magnetic poles have demagnetized; Label 5 indicates that all four magnetic poles of the motor have demagnetized. Decompose the data matrix D' into signal data X and label data L, where X = D'(1:2048,:) represents all columns from row 1 to row 2048 of the data matrix D', and label data L = D'(2049,:) represents all columns from row 2049 of the data matrix D'. Initialize a zero matrix Y with the same dimensions as the signal data X, and use it as the data storage matrix for subsequent processing.

[0047] For each independent signal x in the signal data X, the improved adaptive weighted Hampel filter function is called sequentially to obtain the filtered signal y. The filtered signal y is then stored column by column in the corresponding position of matrix Y. Finally, the original label data L is appended to the end of the filtered signal matrix Y to form a new matrix. =[Y;L], and save the result as a new data file to complete the entire filtering and data reconstruction process.

[0048] Example 3 A time-frequency dual robust filtering method for demagnetization diagnosis of permanent magnet motors, as described in Example 2, differs in that the filtering process of the improved adaptive weighted Hampel filter function includes: S12, iterate through each point i (index i=1,2,…,n) in the independent signal x (a column in the original signal X of the permanent magnet motor), calculate the left boundary of the window l=max(1,ih), ensuring it is not less than 1, and simultaneously calculate the right boundary of the window r=min(n,i+h), where r should not be greater than n; h is the half-width, h=0.5*( -1), to ensure window symmetry. This represents the size of the sliding window; this value must be an odd number and is used to determine the range of the local neighborhood. In this embodiment, it is set to 201. Extract window data. The actual window length N = r - l + 1, which means extracting a continuous data segment from index l (left boundary) to index r (right boundary) from the input signal vector x, constitutes the window data for the current processing. .

[0049] S13, Extract the median of the window data This is used to provide robust center estimation, and the specific steps are: processing window data... Sort: Sort window data All elements are arranged in ascending or descending order. The median is the middle element in the sorted sequence, with an index of (N+1) / 2.

[0050] Calculate the absolute deviation of each data window point from the median. :

[0051] in It is a data window The first in One element; S14, based on absolute deviation Calculate the weights and introduce the weight decay coefficient. α , α It is a positive constant. α The larger the value, the stronger the suppression effect of the deviation on the weight. In this embodiment, it is set to 0.1.

[0052] in, It is the first Weight of each point; weight Negative correlation with absolute deviation That is, the larger the absolute deviation, the smaller the weight.

[0053] S15, for window data Sort by value in ascending order to get the sorted values. For all Normalization is performed to obtain the normalized weights. ; Calculate the cumulative weights:

[0054] in, For the front The cumulative weights of each sorting point are then used to find the median position. ,satisfy:

[0055] in, This represents the cumulative weight value at the median position. ; Let the weighted median , This indicates the first element in the sorted data sequence. The value of each point; S16, Calculate the absolute deviation based on the weighted median:

[0056] in It is the first The absolute deviation of each point from the weighted median; right Sort in ascending order to get The corresponding normalized weights after sorting Then, the cumulative weights are calculated:

[0057] Find the final weighted median position ,satisfy:

[0058] This represents the cumulative weight value when the cumulative weight reaches or exceeds half of the sum of all weights in the sorted absolute deviation sequence. Let the final weighted median mad weighted for: ; S17, Check for abnormal conditions; when the condition is met... At that time, then order Otherwise keep ;in, Let i be the i-th point in x. y i It is the i-th point of y. The MAD threshold coefficient, ranging from 3 to 4.5, serves as the threshold for outlier detection.

[0059] Example 4 A time-frequency dual robust filtering method for demagnetization diagnosis of permanent magnet motors, as described in Example 3, differs in that, in step S2, the result after time-domain filtering is... =[Y;L] as input, let D filtered =Y, which means storing the time-domain filtered data in matrix D. filtered In the middle, the dimension is ,in (number of rows), (Number of columns), initialize the enhanced data matrix Y enhanced A zero matrix; Parameter settings: Frame length Frame shift Spectral reduction coefficient Minimum power threshold The GPR kernel function type is the squared exponential kernel (SE kernel function).

[0060] D is divided into six categories of labels filtered The data columns have 200 records for each data category:

[0061] Get the first The set of data column indexes corresponding to class labels ; Define a Hamming window function to reduce spectral leakage caused by framing:

[0062] in It is the Hamming window function at the discrete-time index point n The value at that location, L 1 indicates frame length; Perform FFT calculations on the windowed and framed frames to convert the time-domain signal into a frequency-domain complex sequence.

[0063] The windowing and framing process and the FFT calculation process are as follows: First, take D. filtered The column is a signal frame For signal frames Add a window:

[0064] in This is the signal after windowing; The FFT transformation formula is:

[0065] in, It is the first in the frequency domain The complex representation of each frequency component is the complex spectrum. j It is the imaginary unit.

[0066] Example 5 A time-frequency dual robust filtering method for demagnetization diagnosis of permanent magnet motors, as described in Example 4, differs in that the specific process of step S3 is as follows: S31, collect the power spectral characteristics of the normal sample data corresponding to the undemagnetized prototype (i.e., label 0), denoted as... Specifically: Forward One sample ( ) Perform frame segmentation: Each sample is divided into frame, T =( M -1- L 1) / H +1 frame, H Indicates frame shift; the signal of the t-th frame is denoted as Add a window: , indicating that the signal of frame t is multiplied element-wise by the Hamming window; Calculate the power spectrum:

[0067] in, It is the FFT result of the t-th frame signal. The power spectrum of the t-th frame; Calculate the average power spectrum:

[0068] in, For the first k The average power spectrum of each sample; S32, Construct the training dataset Normalized frequency points:

[0069] in, This represents the normalized frequency point, and j represents the index. Construct the input feature matrix:

[0070] in Represents the Kronecker product. Indicates a by K A row vector consisting of 1s; the output vector is ; S33, Train the Gaussian process regression model, the formula is as follows:

[0071] Here, GPR represents the optimal Gaussian process regression model found through the optimization process. It is a squared exponential kernel function. i This is a hyperparameter that is not preset by humans, but is automatically learned from the training data by maximizing the log marginal likelihood.

[0072] Example 6 A time-frequency dual robust filtering method for demagnetization diagnosis of permanent magnet motors, as described in Example 5, differs in that, in step S4, a reference noise spectrum is calculated for all normal samples as a global estimate of the noise power spectrum. .

[0073] Example 7 A time-frequency dual robust filtering method for demagnetization diagnosis of permanent magnet motors, as described in Example 6, differs in that the implementation process of step S5 is as follows: S51, for the current sample ct is set to 0, 1, 2, 3, 4, or 5 for frame division and windowing. 'frame' represents the framing function; then the short-time spectrum is calculated. and power spectrum F() represents the Discrete Fourier Transform; F c ( )express The Fourier transform result (i.e., short-time spectrum) of the short-time signal; oh , t () represents coordinates on the frequency-time plane, used to index the time and frequency dimensions of the short-time spectrum; S52, Predicted Frequency Weights: This indicates the frequency point. oh As input, these values ​​are substituted into the pre-trained Gaussian process regression model to obtain the initial predicted weights for that frequency point. These weights are then normalized to obtain the normalized frequency weights. :

[0074] min( W ( oh ))express W ( oh The minimum value of ), max( W ( oh ))express W ( oh The maximum value of ). S53, use the following formula for weighted spectral subtraction:

[0075] in These are noise suppression parameters used to control the amplitude before noise suppression; Achieve frequency adaptation; β Indicates the minimum power threshold; This represents the enhanced signal power spectrum after weighted spectral subtraction.

[0076] This invention introduces Gaussian process regression (GPR) into the spectral subtraction framework, and generates a frequency-related weight function through training with normal samples to achieve dynamic noise suppression.

[0077] Example 8 A time-frequency dual robust filtering method for demagnetization diagnosis of permanent magnet motors, as described in Example 7, differs in that the signal reconstruction process is as follows: The enhanced spectrum is obtained using the following formula:

[0078] e The symbol representing the natural base; The spectrum will then be enhanced. Perform an inverse Fourier transform (IFFT) to obtain the enhanced time-domain frame signal. The complete time-domain signal is synthesized using the overlapadd function:

[0079] H Indicates frame shift, M Indicates the length of the output signal; Finally, reconstruct the complete data matrix: .

[0080] The effect was verified by comparing the processed data from Example 8 with the unfiltered data. The process is as follows: Transforming a one-dimensional time series using continuous wavelet transform (CWT) Converting the signal to a two-dimensional time-frequency image effectively preserves its non-stationary characteristics, providing rich time-frequency features for subsequent hybrid neural networks. Then, a parallel architecture of 1D GRU and 2D CNN is used for feature extraction and classification.

[0081] Using complex Morlet wavelets As the mother wavelet, its mathematical expression is:

[0082] Where t represents time. Indicates the center angular frequency; The mathematical expression for the Continuous Wavelet Transform (CWT) is:

[0083] scale parameter a Controlling frequency resolution, The complex conjugate of the mother wavelet, and the translation parameter b Control the time position, here a The value is a logarithmic interval, taking 1025 points in the range [1, 300]. b The value is 20.

[0084] Save the transformation result as a CWT image with a size of 1025×1025 pixels.

[0085] The 1D GRU-2D CNN hybrid neural network architecture achieves high-precision fault classification and simultaneously processes time-series signals and time-frequency images generated by CWT. Its network parameters are shown in Table 1.

[0086] Table 1 Network Parameter Table

[0087] The classification confusion matrix based on this classifier is as follows: Figure 2 As shown, (a) represents unfiltered data, and (b) represents the filtering method of this embodiment. The numbers 0 to 5 represent category labels. The pink box represents a classification error, the green box represents a classification correctness, and the gray box represents the classification accuracy.

[0088] pass Figure 2 It can be seen that the accuracy rate of directly using the original data is 91.7%, while the accuracy rate is improved to 98.3% after applying the method proposed in this embodiment.

[0089] The above description represents the preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. A time-frequency dual robust filtering method for demagnetization diagnosis of permanent magnet motors, characterized in that, Includes the following steps: S1, Load the original signal of the permanent magnet motor, and perform time-domain filtering on the original signal of the permanent magnet motor through an adaptive Hampel filter; S2, load the time-domain filtered data, perform frame-by-frame windowing processing, and convert the time-domain filtered signal into a frequency-domain signal; S3, using normal samples to train a Gaussian process regression model; S4, Calculate the reference noise spectrum; S5 generates frequency weights based on a Gaussian process regression model and performs deep frequency domain noise reduction using weighted spectral subtraction. S6, Reconstruct the filtered signal.

2. The time-frequency dual robust filtering method for demagnetization diagnosis of permanent magnet motors according to claim 1, characterized in that, In step S1, the original signal of the permanent magnet motor is first extracted, and the process is as follows: The data matrix storing the original signal of the permanent magnet motor is denoted as D, with a dimension of n×m, where n is 2048 rows representing signal data and m is the number of columns, with each column representing an independent signal. An additional 2049 rows are added at the bottom of the 2048 rows to serve as label rows, forming the data matrix D'. The permanent magnet motor is a 6-slot, 4-pole surface-mount permanent magnet motor. There are 6 types of labels: Label 0 indicates that the motor does not demagnetize; Label 1 indicates that a single magnetic pole of the motor has demagnetized; Label 2 indicates that two adjacent magnetic poles of the motor have demagnetized; Label 3 indicates that two magnetic poles in opposite positions have demagnetized; Label 4 indicates that three magnetic poles have demagnetized; Label 5 indicates that all four magnetic poles of the motor have demagnetized. Decompose the data matrix D' into signal data X and label data L, where X = D'(1:2048,:) represents all columns from row 1 to row 2048 of the data matrix D', and label data L = D'(2049,:) represents all columns from row 2049 of the data matrix D'. Initialize a zero matrix Y with the same dimensions as the signal data X, and use it as the data storage matrix for subsequent processing.

3. The time-frequency dual robust filtering method for demagnetization diagnosis of permanent magnet motors according to claim 2, characterized in that, In step S1, for each independent signal x in the signal data X, the improved adaptive weighted Hampel filtering function is called sequentially to obtain the filtered signal y. The filtered signal y is then stored column by column in the corresponding position of matrix Y. Finally, the original label data L is added to the end of the filtered signal matrix Y to form a new matrix. =[Y;L], and save the result as a new data file to complete the entire filtering and data reconstruction process.

4. The time-frequency dual robust filtering method for demagnetization diagnosis of permanent magnet motors according to claim 3, characterized in that, The filtering process of the improved adaptive weighted Hampel filter function includes: S12, iterate through each point i in the independent signal x, calculate the left boundary of the window l=max(1,ih), and simultaneously calculate the right boundary of the window r=min(n,i+h), where h is the half-width, h=0.5*( -1), Indicates the sliding window size; extracts window data. The actual window length N = r - l + 1; S13, Extract the median of the window data Calculate the absolute deviation of each data window point from the median. : in It is a data window The first in One element; S14, based on absolute deviation Calculate the weights and introduce a weight decay coefficient. α , α It is a positive constant; in, It is the first The weight of each point; S15, for window data Sort by value in ascending order to get the sorted values. For all Normalization is performed to obtain the normalized weights. ; Calculate the cumulative weights: in, For the front The cumulative weights of each sorting point are then used to find the median position. ,satisfy: in, This represents the cumulative weight value at the median position. ; Let the weighted median , This indicates the first element in the sorted data sequence. The value of each point; S16, Calculate the absolute deviation based on the weighted median: in It is the first The absolute deviation of each point from the weighted median; right Sort in ascending order to get The corresponding normalized weights after sorting Then, the cumulative weights are calculated: Find the final weighted median position ,satisfy: This represents the cumulative weight value when the cumulative weight reaches or exceeds half of the sum of all weights in the sorted absolute deviation sequence. Let the final weighted median mad weighted for: ; S17, Check for abnormal conditions; when the condition is met... At that time, then order Otherwise keep ;in, Let i be the i-th point in x. y i It is the i-th point of y. This is the MAD threshold coefficient.

5. The time-frequency dual robust filtering method for demagnetization diagnosis of permanent magnet motors according to claim 4, characterized in that, In step S2, the result after time-domain filtering is... =[Y;L] as input, let D filtered =Y, storing the time-domain filtered data in matrix D. filtered In the context, the dimension is N×M, and the initial augmented data matrix Y is... enhanced A zero matrix; D is divided into six categories of labels filtered The data column yields the first... The set of data column indexes corresponding to class labels ; Define a Hamming window function to reduce spectral leakage caused by framing: in It is the Hamming window function at the discrete-time index point n The value at that location, L 1 indicates frame length; Perform FFT calculations on the windowed and framed frames to convert the time-domain signal into a frequency-domain complex sequence.

6. The time-frequency dual robust filtering method for demagnetization diagnosis of permanent magnet motors according to claim 5, characterized in that, The windowing and framing process and the FFT calculation process are as follows: First, take D. filtered The column is a signal frame For signal frames Add a window: in This is the signal after windowing; The FFT transformation formula is: in, It is the first in the frequency domain The complex representation of each frequency component is the complex spectrum. j It is the imaginary unit.

7. The time-frequency dual robust filtering method for demagnetization diagnosis of permanent magnet motors according to claim 6, characterized in that, The specific process of step S3 is as follows: S31, collect the power spectrum characteristics of normal sample data corresponding to the undemagnetized prototype, denoted as... Specifically: Forward Each sample is divided into frames: each sample is divided into... frame, T =( M -1- L 1) / H +1 frame, H Indicates frame shift; the signal of frame t is denoted as Add a window: , indicating that the signal of frame t is multiplied element-wise by the Hamming window; Calculate the power spectrum: in, It is the FFT result of the t-th frame signal. The power spectrum of the t-th frame; Calculate the average power spectrum: in, For the first k The average power spectrum of each sample; S32, Construct the training dataset Normalized frequency points: in, This represents the normalized frequency point, and j represents the index. Construct the input feature matrix: in Represents the Kronecker product. Indicates a by K A row vector consisting of 1s; the output vector is ; S33, Train the Gaussian process regression model, the formula is as follows: Here, GPR represents the optimal Gaussian process regression model found through the optimization process. It is a squared exponential kernel function. θ This is a hyperparameter.

8. The time-frequency dual robust filtering method for demagnetization diagnosis of permanent magnet motors according to claim 7, characterized in that, In step S4, for all normal samples, the reference noise spectrum is calculated as a global estimate of the noise power spectrum: 。 9. The time-frequency dual robust filtering method for demagnetization diagnosis of permanent magnet motors according to claim 8, characterized in that, The implementation process of step S5 is as follows: S51, for the current sample ct is set to 0, 1, 2, 3, 4, or 5 for frame division and windowing. 'frame' represents the framing function; then the short-time spectrum is calculated. and power spectrum F() represents the Discrete Fourier Transform; F c ( )express The Fourier transform result (i.e., short-time spectrum) of the short-time signal; ω , t () represents coordinates on the frequency-time plane, used to index the time and frequency dimensions of the short-time spectrum; S52, Predicted Frequency Weights: This indicates the frequency point. ω As input, these values ​​are substituted into the pre-trained Gaussian process regression model to obtain the initial predicted weights for that frequency point. These weights are then normalized to obtain the normalized frequency weights. : min( W ( ω ))express W ( ω The minimum value of ), max( W ( ω ))express W ( ω The maximum value of ). S53, use the following formula for weighted spectral subtraction: in These are noise suppression parameters used to control the amplitude before noise suppression; Achieve frequency adaptation; β Indicates the minimum power threshold; This represents the enhanced signal power spectrum after weighted spectral subtraction.

10. The time-frequency dual robust filtering method for demagnetization diagnosis of permanent magnet motors according to claim 9, characterized in that, The process of reconstructing the signal is as follows: The enhanced spectrum is obtained using the following formula: e The symbol representing the natural base; The spectrum will then be enhanced. Perform inverse Fourier transform to obtain the enhanced time-domain frame signal The complete time-domain signal is synthesized using the overlapadd function: H Indicates frame shift, M Indicates the length of the output signal; Finally, reconstruct the complete data matrix: 。