Electrical fault diagnosis method for PMSM under different working conditions and noise environments
By building a multi-resolution network and collecting zero-sequence voltage and stator three-phase current, the problem of difficulty in diagnosing electrical faults in permanent magnet synchronous motors under different working conditions and noise environments is solved, and the fault diagnosis effect with high accuracy and robustness is achieved.
Patent Information
- Application Number
- CN202311730313.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-15
- Publication Date
- 2025-02-28
- Estimated Expiration
- 2043-12-15
AI Technical Summary
It is difficult to accurately diagnose electrical faults in different working conditions and noise environments, especially between turns short circuits and open circuit faults, which can easily lead to demagnetization and mechanical vibrations, affecting the normal operation of the motor.
By building simulation and real data sets of permanent magnet synchronous motors, zero-sequence voltage components and stator three-phase currents are collected, multi-resolution networks are built to extract multi-scale features, and fault diagnosis is achieved through feature weighting and classification layers.
It realizes accurate fault diagnosis in different working conditions and noise environments, maintains high accuracy and robustness, can be deployed on embedded platforms, and is suitable for electrical fault diagnosis of permanent magnet synchronous motors.
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of state detection and fault diagnosis of permanent magnet synchronous motors, and relates to an electrical fault diagnosis method of a permanent magnet synchronous motor (PMSM) under different working conditions and different noise environments. Background Art
[0002] Motors play an important role in modern industrial fields and mechanical systems. With the rapid development of power electronics and permanent magnet materials, permanent magnet synchronous motors have been widely used in electric vehicles, aerospace, medical and other fields due to their advantages such as high efficiency, high precision, compactness, robustness and high reliability. As automatic loading systems become more and more complex and intelligent, permanent magnet synchronous motors have also been widely used.
[0003] The electrical faults of permanent magnet synchronous motors are generally divided into winding short circuit faults, winding open circuit faults and voltage source inverter faults. Due to the complex operating environment, permanent magnet synchronous motors are prone to inter-turn short circuit faults. If not handled in time, the short-circuited coil will induce the generator to lose magnetism, seriously affecting the normal operation of the motor. The voltage source inverter consists of six power switches that can convert DC voltage into AC voltage and drive the motor. Due to the fragility of the inverter circuit and the frequent switching of the on / off state of the power tube by the gate signal, these power tubes become high-risk components for failure in the inverter system. Generally, when an open circuit fault occurs, it will cause large electromagnetic torque pulsation and severe mechanical vibration. If no remedial measures are taken, the continuous operation of the permanent magnet synchronous motor may cause secondary damage to the entire system, or even catastrophic failure. Therefore, the development of a fast and accurate permanent magnet synchronous motor electrical fault diagnosis method is of great significance for ensuring the safe and reliable operation of the motor and improving efficiency.
[0004] Under different working conditions, the fault characteristics of the motor may be annihilated, and the operation of the motor itself and the working environment will generate some noise, which will interfere with the fault characteristics. Therefore, a method for electrical fault diagnosis of permanent magnet synchronous motors under different working conditions and different noise environments is studied. Summary of the invention
[0005] The purpose of the present invention is to provide an electrical fault diagnosis method for a PMSM under different working conditions and different noise environments, so as to overcome the deficiencies mentioned in the background technology.
[0006] The technical solution to achieve the purpose of the present invention is: a method for diagnosing electrical faults of a PMSM under different working conditions and different noise environments, comprising the following steps:
[0007] Step 1: Use simulation software to build normal, turn-to-turn short-circuit and open-circuit fault models of permanent magnet synchronous motors. Under different speeds and loads, collect zero-sequence voltage components and stator three-phase currents for 34 states, construct a simulation data set, and divide it into simulation training set, simulation verification set and simulation test set.
[0008] Step 2: By building a permanent magnet synchronous motor fault test bench, the zero-sequence voltage components and stator three-phase currents are collected for 34 states at different speeds and loads, a real data set is constructed, and the data set is divided into a real training set, a real verification set, and a real test set.
[0009] Step 3, performing Z-score normalization preprocessing on both the simulation data set and the real data set to effectively reduce the interference of noise, enhance the ability to extract fault features, and obtain a normalized data set after preprocessing;
[0010] Step 4: Build a multi-resolution network:
[0011] The multi-resolution network includes a feature extraction layer, a feature weighting layer and a classification layer;
[0012] First, a feature extraction layer of a multi-resolution network is built. The feature extraction layer adopts a multi-scale convolution kernel strategy to construct two similar stages. In each stage, multi-scale features can be extracted from the input in parallel, where the convolution kernels of different branches have different sizes. For different convolution kernels, convolution extracts information of different scales from the original signal. Afterwards, the convolution outputs of different branches are spliced to obtain complementary information of different time scales. In order to comprehensively utilize this complementary information, features of different scales are convolved to output comprehensive features.
[0013] Secondly, build a feature weighting layer of the multi-resolution network. The feature weighting layer can not only make the network focus on important features and improve the network's representation ability, but also change the network's output size, thereby reducing the model input of the classifier and reducing the amount of computation of the entire model; the feature weighting layer is divided into two modules, one is the spatial attention module, and the other is the channel attention module, which outputs weighted features after feature weighting.
[0014] Finally, build a classification layer of the multi-resolution network; the above classification layer consists of a fully connected layer and a Softmax function. After the weighted features are input into the classification layer, the classification probability of each state is output to achieve fault identification.
[0015] Step 5: Set the hyperparameters of the multi-resolution network, select the appropriate learning rate, batch size, optimization algorithm, and loss function, and prepare for training the multi-resolution network model using a normalized dataset.
[0016] Step 6, use the preprocessed normalized simulation training set and test set to train the multi-resolution network to obtain a trained multi-resolution network model, input the preprocessed normalized simulation verification set into the trained multi-resolution network model, test the accuracy of the trained multi-resolution network model, and verify the feasibility of using zero-sequence voltage components and stator three-phase current to diagnose the normal state and 33 fault states of the permanent magnet synchronous motor.
[0017] Step 7, use the preprocessed normalized true training set and test set to train the multi-resolution network to obtain a trained multi-resolution network model, input the preprocessed normalized true verification set into the trained multi-resolution network model, test the accuracy of the trained multi-resolution network model, and verify the effectiveness of using zero-sequence voltage components and stator three-phase current to diagnose the normal state and 33 fault states of the permanent magnet synchronous motor.
[0018] Step 8: Add Gaussian noise and Laplace noise of different intensities to the normalized true validation set to verify the robustness of the multi-resolution network model.
[0019] Compared with the prior art, the present invention has the following significant advantages:
[0020] (1) The present invention realizes for the first time the accurate diagnosis of normal state and 33 electrical fault states by using zero-sequence voltage and stator three-phase current as discrimination criteria, opening up a new idea for electrical fault diagnosis of permanent magnet synchronous motors.
[0021] (2) The present invention designs a new multi-resolution network, introduces the idea of multi-scale convolution, can extract multi-resolution features from the original data, has better feature extraction capability, and does not require additional signal processing of the original signal. It can also maintain high accuracy while maintaining good robustness.
[0022] (3) The present invention reduces the running time of the network by introducing group convolution and splicing structure, ensuring that the network has good real-time performance, while reducing the computing power requirements, so that the network model can be deployed on an embedded platform.
[0023] (4) The present invention can maintain good robustness while maintaining a high accuracy, and the robustness of the network is verified by Laplace noise and Gaussian noise. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 It is a flowchart of the specific implementation method of electrical fault diagnosis of permanent magnet synchronous motor under variable working conditions and strong noise environment;
[0025] Figure 2 is a relationship diagram among the zero-sequence voltage, the inverter and the stator winding in the present invention;
[0026] Figure 3 It is a schematic diagram of the multi-resolution network structure in the present invention;
[0027] Figure 4 It is a schematic diagram of the structure of the multi-resolution network feature weighting layer in the present invention; DETAILED DESCRIPTION
[0028] The specific embodiments of the present invention are described below in conjunction with the accompanying drawings so that those skilled in the art can better understand the present invention. It should be noted that in the following description, when the detailed description of known functions and designs may dilute the main content of the present invention, these descriptions will be omitted here. Figure 1 , Figure 2 , Figure 3 as well as Figure 4 , the electrical fault diagnosis method of permanent magnet synchronous motor under variable working conditions and strong noise environment, the specific steps are:
[0029] Step 1: Use simulation software to build normal, turn-to-turn short-circuit and open-circuit fault models of permanent magnet synchronous motors. Under different speeds and loads, collect zero-sequence voltage components and stator three-phase currents for 34 states, construct a simulation data set, and divide it into simulation training set, simulation verification set and simulation test set.
[0030] like Figure 2 The relationship diagram of zero-sequence voltage, inverter and stator winding with added resistor network is shown:
[0031] The electrical faults of permanent magnet synchronous motors can be divided into 34 states as shown in Figure 1, including healthy states and 33 electrical fault states. Among them, the stator winding open circuit and the upper and lower switch failures of the same bridge arm in the inverter double switch failure have the same fault characteristics in the three-phase stator current. Therefore, the zero-sequence voltage component used in the present invention is used as an additional discrimination criterion to discriminate the above faults.
[0032] Table 1 Types of electrical faults in permanent magnet synchronous motors
[0033]
[0034] The normal model and open circuit fault model are constructed according to the permanent magnet synchronous motor voltage equation:
[0035] The normal modeling equation of three-phase permanent magnet synchronous motor is:
[0036] Mechanical equation of motion:
[0037]
[0038]
[0039] The voltage equation in the natural coordinate system is:
[0040]
[0041] Where J is the moment of inertia, T e is the electromagnetic torque, T L is the load torque, ω m represents the motor speed, t is the time, B is the motor damping coefficient, i a 、i b 、i c Represents the motor stator winding current, e a 、e b 、e c Represents the flux linkage of the three-phase winding of the motor, R s Indicates the stator winding resistance, L s represents stator leakage inductance, M represents stator mutual inductance, V a 、V b 、V c Indicates the phase voltage of phases A, B, and C. V0 indicates the zero-sequence voltage.
[0042] The expression of zero-sequence voltage V0 can be expressed as:
[0043]
[0044] Where v is an integer and θ is the electrical angle. PM,v is the amplitude of the vth harmonic of the magnetic flux, θ v It is the angle between the fundamental wave of magnetic flux and the vth harmonic.
[0045] Considering:
[0046]
[0047] Among them, V 0,c Represents the neutral point voltage of the resistor network, V 0,m Indicates the voltage between the neutral point of the stator winding and the DC midpoint of the inverter.
[0048] Therefore, the zero-sequence voltage component V can be obtained 0,m The expression is:
[0049]
[0050] It can be seen from formula (10) that the zero-sequence voltage component V 0,m It is composed only of the third harmonic component of magnetic flux and odd multiples of the third harmonic component, without interference from the inverter phase voltage.
[0051] Permanent magnet synchronous motor stator open circuit fault modeling equation:
[0052] Taking the stator winding A phase open circuit fault as an example, the voltage equation at this time is:
[0053]
[0054] Among them, λ PM,b , PM,c is the permanent magnet flux ψ f The magnetic flux generated on the ABC three-phase stator winding.
[0055] The open circuit fault causes the three-phase current to be no longer symmetrical, and the current of phase A is i a ≈0, BC two-phase current satisfies i b +i c =0, so the zero-sequence voltage V0 is:
[0056]
[0057] Substituting formula (9) into the equation, we can see that the zero-sequence voltage component V 0,m The expression is:
[0058]
[0059] The modeling equation for the open circuit fault of the upper and lower power tubes in the same bridge arm of the permanent magnet synchronous motor drive system inverter is:
[0060] Take T12 open circuit fault as an example for analysis. The voltage equation at this time is:
[0061]
[0062] The open circuit fault causes the three-phase current to be no longer symmetrical, and the current of phase A is i a ≈0, BC two-phase current satisfies i b +i c =0, so the zero-sequence voltage V0 is:
[0063]
[0064] It can be seen that when T12 open circuit fault occurs, the zero sequence voltage V0 is consistent with the normal state of the permanent magnet synchronous motor. 0,m The expression is also consistent with that of the permanent magnet synchronous motor in normal state, that is:
[0065]
[0066] Therefore, the zero-sequence voltage component can be used to distinguish between an open-circuit fault in the stator winding and an open-circuit fault in the upper and lower switches in the same bridge arm of the inverter.
[0067] The modeling equation for the inter-turn short-circuit fault of a three-phase permanent magnet synchronous motor is:
[0068] Voltage equation:
[0069]
[0070] Mechanical equation of motion:
[0071]
[0072]
[0073] Among them, V a 、V b 、V c Represents the three-phase stator voltage of the permanent magnet synchronous motor, R s Represents the stator winding resistance, R f represents the resistance of the faulty part, μ represents the fault degree (the ratio of the short-circuited part of the stator to the total length), i a 、i b 、i c represents the stator winding current, i f Indicates the fault part current, e a 、e b 、e c represents the three-phase winding flux, e f Indicates the faulty magnetic flux, L s represents stator leakage inductance, M represents stator mutual inductance, J represents moment of inertia, T e is the electromagnetic torque, T L is the load torque, ω m represents the motor speed, and B is the motor damping coefficient.
[0074] After building the normal model, turn-to-turn short circuit and open circuit fault models of the motor, simulation data under 34 conditions were collected. For each fault, 450 data samples (200 training sets, 50 validation sets, and 200 test sets) were obtained under the conditions of speed of 200, 300, 500, 800, and 1000 rpm and load of 0.2 and 1Nm, for a total of 15,300 samples. Each sample consists of 4×128 data.
[0075] Step 2: By building a permanent magnet synchronous motor fault test bench, real data under 34 conditions are collected. For each fault, 450 data samples (200 training sets, 50 validation sets, and 200 test sets) are obtained under the conditions of speed of 200, 300, 500, 800, and 1000 rpm and load of 0.2 and 1 Nm, for a total of 15,300 samples. Each sample consists of 4×128 data.
[0076] Step 3: Perform Z-score normalization preprocessing on both the simulation and real data sets to effectively reduce the interference of noise, enhance the ability to extract fault features, and obtain the preprocessed normalized data set.
[0077] Step 4: Build a multi-resolution network; the multi-resolution network includes a feature extraction layer, a feature weighting layer, and a classification layer.
[0078] a) Construct the feature extraction layer of the multi-resolution network, such as Figure 3 As shown. The feature extraction layer is divided into two stages. The two stages have similar network structures, but the parameters of the network are different, which can ensure that the network has good scalability. Each stage can extract multi-scale features from the input signal in parallel. The convolution kernel sizes of different branches are different, namely 3, 5, and 7. For different convolution kernels, convolution can extract information of different resolutions from the original signal. Each branch first extracts features through a one-dimensional group convolution with the same convolution kernel (the group size of the group convolution is set to 2), and then performs a splicing operation to splice the output signals of the three branches to form an output signal containing multi-scale information. The new output signal is then feature-fused through a one-dimensional convolution with a convolution kernel size of 3 and a step size of 1 to highlight the fault features.
[0079] Build a basic convolutional neural network module as follows:
[0080]
[0081] Where W represents the weight matrix, Represents the convolution operation, x represents the input of the convolution, b represents the bias, BN represents the batch normalization operation; y represents the output feature after the convolution operation, s represents the normalized output feature, h represents the output feature of the convolution operation after batch normalization and activation function, and ReLU represents the ReLU activation function;
[0082] The output features of a single branch at each stage are expressed as:
[0083]
[0084] F represents the output features of a single branch at each stage, Basic represents the basic convolution operation; x represents the input features of a single branch at each stage, and h′ represents the output features after the basic convolution operation.
[0085] The multi-scale features output on multiple branches are expressed as:
[0086] F′=cat(F1,F2,F3) (18)
[0087] Where cat represents the concatenation operation, F′ represents the multi-scale features after concatenating different branches, and F1, F2, and F3 represent the output features of different branches respectively;
[0088] The fused feature F″ after the multi-scale features are fused by one-dimensional convolution with a convolution kernel size of 3 and a step size of 1 is expressed as:
[0089] F″=Basic(F′) (19)
[0090] In order to ensure the long-range dependency of the signal and retain as many features of the original signal as possible, a residual structure is also designed in the feature extraction layer. First, the input signal is upgraded through one-dimensional point-by-point convolution to ensure that the number of channels is consistent with the output signal after multi-scale convolution. Then, the maximum pooling operation is used to ensure that the residual structure output signal is consistent in length with the output signal after multi-scale convolution. Finally, the "+" operation is used to achieve the fusion of the two output signals.
[0091] The output feature F″′ of the input signal after passing through the residual structure is expressed as:
[0092] F″′=MaxPool(T) (20)
[0093] MaxPool represents the maximum pooling operation, and T represents the dimension-enhanced features after point-by-point convolution.
[0094] Comprehensive features of each stage output It is expressed by the following formula:
[0095]
[0096] in Represents the comprehensive features of the output of each stage.
[0097] b) Construct feature weighted layers of multi-resolution networks, such as Figure 4 As shown in the figure. The proposed feature weighting layer can not only make the network focus on important features and improve the network's representation ability, but also change the network's output size, thereby reducing the model input of the classifier and reducing the amount of computation of the entire model. The feature weighting layer is divided into two modules, one is the spatial attention module and the other is the channel attention module.
[0098] Given the input of the feature weighting layer is Then the proposed spatial attention input is The channel attention input is The whole process can be summarized as:
[0099]
[0100] in represents element-by-element multiplication, F′ represents the output feature after the spatial attention network, F″ represents the final output result, B represents the batch data size, C represents the number of channels, and L represents the data length;
[0101] In order to effectively calculate spatial attention, the channel dimension of the feature map is compressed and the channel information is aggregated. The currently more common maximum pooling method is used. In order to save computing time and calculation amount, the average pooling and maximum pooling method are not combined. After the spatial information of the feature map is aggregated by the maximum pooling operation, Represents the maximum pooling feature. The spatial attention network is composed of a multi-layer perceptron (MLP) with one hidden layer. In order to reduce the computational complexity of the model, the activation size of the hidden layer is set to Where r represents the reduction ratio. The calculation of spatial attention can be expressed as:
[0102]
[0103] Where σ represents the sigmoid activation function, is the input feature of the multilayer perceptron,
[0104] is the output feature of the multilayer perceptron;
[0105] In order to effectively calculate channel attention, reduce the model input of the classifier, and avoid introducing too many redundant features, a combination of global average pooling and global maximum pooling is used. The spatial information of the feature map is aggregated by two pooling operations, which can be used and To represent. And set two trainable weights w1 and w2. The calculation of channel attention can be expressed as:
[0106]
[0107] c) Construct the fault classification layer of the multi-resolution network. The proposed classifier is composed of a fully connected layer and a Softmax function, such as Figure 3 As shown. Given the input of the fully connected layer is After a fully connected layer, the output is Each output passes through a softmax function Mapped to a probability, it can be defined as:
[0108]
[0109] Among them, H is the input feature of the fully connected layer, C out dimensional probability vector, indicating C out The probability distribution of the case, in the present invention, C out =34.
[0110] Step 5: After building the multi-resolution network, set the hyperparameters of the multi-resolution network. The loss function uses the cross entropy loss to represent the error between the network output label and the expected target label. The Adam optimization algorithm is selected for back propagation to continuously modify the weights between nodes in each layer and the bias of each layer to reduce the error. The parameters are continuously updated in repeated iterations to obtain the state with the lowest error. The batch size is set to 5, training is performed for 60 rounds, and the basic learning rate is 3×10 -3 .
[0111] The expression of the cross entropy loss function is:
[0112]
[0113] Where p(x i ) is the probability distribution of the real data label, q(x i ) is the fitting label probability distribution, m is the total number of samples, i represents the i-th sample, Loss represents the loss function, H(p(x i ),q(x i )) represents the cross entropy loss function.
[0114] Step 6: Input simulation data to train the network. To ensure the reliability of the results, the multi-resolution network and all comparison models are trained with the same hyperparameters. The comparison model used in this paper is the baseline model of the multi-resolution network, which is a one-dimensional convolutional network with the same depth and width as the multi-resolution network. Considering the randomness of model parameter initialization and optimization, all models are trained 10 times. After training, they are tested on the test set. All test results are shown in Table 2.
[0115] Table 2 Performance test results of multi-resolution network and baseline network on simulation datasets 10 times
[0116]
[0117]
[0118] As can be seen from Table 2, the multi-resolution network shows excellent performance with an average accuracy of 99.98%, which is significantly higher than the average accuracy of the baseline model of 92.36%, by 7.62%. At the same time, the test results show the feasibility of the proposed method based on zero-sequence voltage component and three-phase stator current as the 34 state discrimination indicators for diagnosing permanent magnet synchronous motors.
[0119] In step 7, real data is input to train the network. To ensure the reliability of the results, the training method used is consistent with that used for training with simulated data. Considering that multiple tools are involved in the construction of the multi-resolution network, in order to explore the specific impact of different tools on model performance, an ablation experiment is conducted on the multi-resolution network. The results are shown in Table 3.
[0120] Table 3 Results of ablation experiments on multi-resolution networks
[0121]
[0122] Obviously, compared with other tools, multi-scale (average accuracy increased by 8.12% compared with the baseline model) has the most significant performance improvement. The main reason for this phenomenon is that the introduced multi-scale convolution can fuse information of different resolutions in the same layer, improving the robustness, so that the model can still effectively extract fault features under the interference of various noises in actual working conditions.
[0123] In addition, normalization (average accuracy increased by 6.64%) and residual connections (average accuracy increased by 4.52%) also significantly improved performance, proving the rationality and effectiveness of introducing these two tools into multi-resolution networks. By using Z-score normalization to eliminate scale and range differences in input data, it is easier for the optimization algorithm to find the global optimal solution, thereby improving the performance of the model. At the same time, the noise in the data can be effectively standardized, reducing the impact of outliers and noise on the model and enhancing the robustness of the model. The effectiveness of the residual structure benefits from the introduction of the jump connection structure. The jump connection structure is regarded as introducing feature information with a receptive field fixed to 1 into the feature stream of the model, which is conducive to the fusion of different information (deep and shallow features) and improves accuracy.
[0124] Step 8. The previous experimental results prove the effectiveness of the proposed method. However, since permanent magnet synchronous motors are often in strong impact and vibration environments in industrial systems, noise interference has a greater impact on real data. Therefore, Gaussian noise and Laplace noise of different intensities are added to the collected signal to verify the robustness of the model. The experimental results are shown in Table 4.
[0125] Table 4 Comparison results between multi-resolution network and baseline network in different noise intensity environments
[0126]
[0127] Obviously, under the same noisy environment, the multi-resolution network is more competitive and its accuracy is significantly higher than the baseline model.
[0128] It can be seen from the above experimental process and experimental results that the present invention aims at the problem that it is difficult to distinguish the electrical faults of permanent magnet synchronous motors under different working conditions and noise environments. By constructing a new multi-resolution network and introducing a normalization method to eliminate the scale and range differences of the input data, the optimization algorithm can more easily find the global optimal solution. A new feature extraction layer and feature weighting layer are designed so that the network can extract multi-resolution information, mine deep-level features, assign higher weights to features near the feature frequency, and achieve more accurate classification.
[0129] The present invention uses the zero-sequence voltage component and the three-phase current as the input of the deep neural network for the first time, and can accurately classify 34 states. At the same time, it can still show good robustness under the interference of Gaussian noise and Laplace noise of different intensities. The inventive method can realize high-precision fault diagnosis and has broad application prospects in the field of motor and other simulated mechanical fault diagnosis. It also provides a new method for fault diagnosis technology based on deep learning.
Claims
1. A method for diagnosing electrical faults of PMSM under different working conditions and different noise environments, characterized in that: The steps include: Step 1: Use simulation software to build normal, turn-to-turn short-circuit and open-circuit fault models of permanent magnet synchronous motors, collect zero-sequence voltage components and stator three-phase currents for 34 states at different speeds and loads, construct a simulation data set, and divide it into a simulation training set, a simulation verification set, and a simulation test set; Step 2: By building a permanent magnet synchronous motor fault test bench, the zero-sequence voltage component and stator three-phase current are collected for 34 states at different speeds and loads, a real data set is constructed, and the data set is divided into a real training set, a real verification set, and a real test set; Step 3, performing Z-score normalization preprocessing on both the simulation data set and the real data set to effectively reduce the interference of noise, enhance the ability to extract fault features, and obtain a normalized data set after preprocessing; Step 4: Build a multi-resolution network: The multi-resolution network includes a feature extraction layer, a feature weighting layer and a classification layer; First, a feature extraction layer of a multi-resolution network is built. The feature extraction layer adopts a multi-scale convolution kernel strategy to construct two similar stages. In each stage, multi-scale features can be extracted from the input in parallel. The convolution kernels of different branches have different sizes. For different convolution kernels, convolution extracts information of different scales from the original signal. After that, the convolution outputs of different branches are spliced to obtain complementary information of different time scales. In order to comprehensively utilize this complementary information, features of different scales are convolved to output comprehensive features. Secondly, build a feature weighting layer of the multi-resolution network. The feature weighting layer can not only make the network focus on important features and improve the network's representation ability, but also change the network's output size, thereby reducing the model input of the classifier and reducing the amount of computation of the entire model; the feature weighting layer is divided into two modules, one is the spatial attention module, and the other is the channel attention module, which outputs weighted features after feature weighting; Finally, build a classification layer of the multi-resolution network; the above classification layer consists of a fully connected layer and a Softmax function. After the weighted features are input into the classification layer, the classification probability of each state is output to achieve fault identification; Step 5: Set the hyperparameters of the multi-resolution network, select the appropriate learning rate, batch size, optimization algorithm, and loss function, and prepare for training the multi-resolution network model using the normalized dataset. Step 6, using the preprocessed normalized simulation training set and test set to train the multi-resolution network to obtain a trained multi-resolution network model, inputting the preprocessed normalized simulation verification set into the trained multi-resolution network model, testing the accuracy of the trained multi-resolution network model, and verifying the feasibility of using zero-sequence voltage components and stator three-phase currents to diagnose the normal state and 33 fault states of the permanent magnet synchronous motor; Step 7, using the preprocessed normalized true training set and test set to train the multi-resolution network to obtain a trained multi-resolution network model, inputting the preprocessed normalized true verification set into the trained multi-resolution network model, testing the accuracy of the trained multi-resolution network model, and verifying the effectiveness of using zero-sequence voltage components and stator three-phase currents to diagnose the normal state and 33 fault states of the permanent magnet synchronous motor; Step 8: Add Gaussian noise and Laplace noise of different intensities to the normalized true validation set to verify the robustness of the multi-resolution network model.
2. The electrical fault diagnosis method of PMSM under different working conditions and different noise environments according to claim 1 is characterized in that: In step 1, the 34 states include normal states and 33 fault states. The simulation data set contains 20s of three-phase stator current and zero-sequence voltage component data collected at a sampling frequency of 500 Hz under 10 different working conditions. The sample ratios of the training set, validation set, and test set are 200:50:
200.
3. The electrical fault diagnosis method of PMSM under different working conditions and different noise environments according to claim 1 is characterized in that: In step 2, the 34 states include normal states and 33 fault states. The real data set contains 20s of three-phase stator current and zero-sequence voltage component data collected at a sampling frequency of 500 Hz under 10 different working conditions. The sample ratios of the training set, validation set, and test set are 200:50:
200.
4. The electrical fault diagnosis method of PMSM under different working conditions and different noise environments according to claim 1 is characterized in that: The Z-score normalization preprocessing in step 3 is expressed as: where x i is the i-th sample of the input, is the sample x i The average value in is the sample x i The standard deviation in , N is the total number of samples.
5. The electrical fault diagnosis method of PMSM under different working conditions and different noise environments according to claim 1 is characterized in that: In step 4, the feature extraction layer adopts the strategy of multi-scale convolution kernels to construct two similar stages. In each stage, multi-scale features can be extracted from the input in parallel, where the convolution kernels of different branches have different sizes. For different convolution kernels, convolution extracts information of different scales from the original signal. After that, the convolution outputs of different branches are spliced to obtain complementary information of different time scales. In order to comprehensively utilize this complementary information, features of different scales are convolved to output comprehensive features. The details are as follows: The two stages have similar network structures, but the parameters of the networks are different, which ensures that the network has good scalability. Each stage can extract multi-scale features from the input signal in parallel. The convolution kernel sizes of different branches are different, namely 3, 5, and 7. For different convolution kernels, convolution can extract information of different resolutions from the original signal. Each branch first extracts features through a one-dimensional group convolution with the same convolution kernel, and then performs a splicing operation to splice the output signals of the three branches to form an output signal containing multi-scale information. The new output signal is then subjected to feature fusion through a one-dimensional convolution with a convolution kernel size of 3 and a step size of 1 to highlight the fault features. Build a basic convolutional neural network module as follows: s=BN(y) h = ReLU(s) Where W represents the weight matrix, Represents the convolution operation, x represents the input of the convolution, b represents the bias, BN represents the batch normalization operation; y represents the output feature after the convolution operation, s represents the normalized output feature, h represents the output feature of the convolution operation after batch normalization and activation function, and ReLU represents the ReLU activation function; The output features of a single branch at each stage are expressed as: h′=Basic(x) F=Basic(h′) F represents the output features of a single branch at each stage, Basic represents the basic convolution operation, x represents the input features of a single branch at each stage, and h′ represents the output features after the basic convolution operation; The multi-scale features output on multiple branches are expressed as: F′=cat(F1,F2,F3) Where cat represents the concatenation operation, F′ represents the multi-scale features after concatenating different branches, and F1, F2, and F3 represent the output features of different branches respectively; The fused feature F″ after the multi-scale features are fused by one-dimensional convolution with a convolution kernel size of 3 and a step size of 1 is expressed as: F″=Basic(F′) In order to ensure the long-range dependency of the signal and retain as many features of the original signal as possible, a residual structure is also designed in the feature extraction layer. First, the input signal is upgraded through one-dimensional point-by-point convolution to ensure that the number of channels is consistent with the output signal after multi-scale convolution. Then, the maximum pooling operation is performed to ensure that the residual structure output signal is consistent with the fusion feature after multi-scale convolution in length and width. Finally, the "+" operation is performed to achieve the fusion of the two output signals. The output feature F″′ of the input signal after passing through the residual structure is expressed as: F″′=MaxPool(T) Among them, MaxPool represents the maximum pooling operation, and T represents the dimension-enhanced features after dimension-enhanced point-by-point convolution; Comprehensive features of each stage output It is expressed by the following formula: Batch Normalization Expression for: where μ B,j is the batch data mean, is the variance of the batch data, ε is a small positive value to prevent division by 0, x i,j Represents batch input data.
6. The electrical fault diagnosis method of PMSM under different working conditions and different noise environments according to claim 5 is characterized in that: In step 4, the feature weighting layer is divided into two modules, one is the spatial attention module and the other is the channel attention module, which outputs the weighted features after feature weighting, as follows: The feature weighting layer contains two networks: a spatial attention network and a channel attention network. The maximum pooling method is used to calculate the spatial attention. The global average pooling and global maximum pooling are combined, and two trainable weights w1 and w2 are set to calculate the channel attention. Given the input of the feature weighting layer is Then the proposed spatial attention input is The channel attention input is The whole process can be summarized as follows: in represents element-by-element multiplication, F′ represents the output feature after the spatial attention network, F″ represents the final output result, B represents the batch data size, C represents the number of channels, and L represents the data length; When calculating spatial attention, after aggregating the spatial information of the feature map through the maximum pooling operation, Represents the maximum pooling feature; the spatial attention network is composed of a hidden layer of multi-layer perceptron MLP. In order to reduce the computational complexity of the model, the activation size of the hidden layer is set to Where r represents the reduction ratio; spatial attention M s (F) is expressed as: Where σ represents the sigmoid activation function, is the input feature of the multilayer perceptron, is the output feature of the multilayer perceptron; When calculating channel attention, the spatial information of the feature map is aggregated through two pooling operations, using and To represent; and set two trainable weights w1 and w2; channel attention M c (F′) is expressed as:
7. The electrical fault diagnosis method of PMSM under different working conditions and different noise environments according to claim 1 is characterized in that: In step 4, the classification layer consists of a fully connected layer and a Softmax function. After the weighted features are input into the classification layer, the classification probability of each state is output to achieve fault identification. The expression of the Softmax function is: Among them, H is the input feature of the fully connected layer, C out dimensional probability vector, indicating C out The probability distribution in this case.
8. The electrical fault diagnosis method of PMSM under different working conditions and different noise environments according to claim 1 is characterized in that: In step 5, set the hyperparameters of the multi-resolution network and select the appropriate learning rate, batch size, optimization algorithm, and loss function as follows: The loss function Loss expression is: Among them, p(x i ) is the probability distribution of the real data label, q(x i ) is the fitting label probability distribution, m is the total number of samples, H(p(x i ),q(x i )) represents the cross entropy loss function.
9. The electrical fault diagnosis method of PMSM under different working conditions and different noise environments according to claim 1 is characterized in that: In step 8, noises of different intensities are represented by signal-to-noise ratio SNR; The expression of SNR is as follows: Where P signal is the power of the signal, P noise is the power of the noise.