Fault diagnosis method and system of permanent magnet motor for electric vehicle
By using finite element simulation models and data enhancement technology in the fault diagnosis of permanent magnet motors for electric vehicles, we generate diverse and accurate simulation signal samples and train the neighborhood clustering domain adaptation network, the problem of missing industrial data samples in permanent magnet motors for electric vehicles is solved, and efficient and accurate fault diagnosis is achieved.
Patent Information
- Application Number
- CN202510111011.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-23
- Publication Date
- 2025-06-17
AI Technical Summary
The prior art is difficult to missing industrial data samples and permanent magnet motor fault diagnosis under small samples in practical applications of electric vehicles, especially in complex operating conditions, and lacks effective methods to generate diverse and accurate fault samples.
Simulation signal samples of multiple demagnetization states are generated by a finite element simulation model of permanent magnet motors, and data augmentation is performed to amplify the samples. Then, the simulation signal sample is converted into a two-dimensional frequency domain image, and the neighborhood clustering domain adaptation network is trained in combination with some label-free actual signal samples to eliminate the domain deviation between the simulation signal and the actual signal.
The fault diagnosis of permanent magnet motors of electric vehicles is achieved in the absence of industrial data samples and small samples, which improves the accuracy and efficiency of diagnosis and reduces the cost of fault signal acquisition.
Smart Images

Figure CN120162691A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of permanent magnet motor fault diagnosis for electric vehicles, and particularly relates to a fault diagnosis method and system for a permanent magnet motor for electric vehicles. Background Art
[0002] With the continuous improvement of the intelligence and integration of electric vehicles, their internal structures have become increasingly complex. In the past two years, the number of safety accidents of electric vehicles has shown an increasing trend. The industry has gradually shifted from "range anxiety" to "safety anxiety", and safety issues have become one of the core problems that need to be solved in the development of electric vehicles. Most of the power of electric vehicles is provided by permanent magnet motors. The operating quality of permanent magnet motors to a certain extent determines the safety, reliability and efficiency of the overall equipment. Once a permanent magnet motor fails, serious vibrations, noises and performance degradation will occur, and at the same time, the efficiency, stability and safety of the application equipment will be reduced, and in severe cases, a large amount of economic losses and safety accidents will be caused. Therefore, the fault diagnosis of permanent magnet motors for electric vehicles has important practical significance.
[0003] The fault diagnosis method based on data driving has been gradually applied to the research of electric vehicle fault diagnosis because it does not require a complex signal processing process. Among them, the method based on deep learning can automatically learn fault features, so good diagnostic effects can be obtained. These diagnostic models based on deep learning require a large number of training samples and a sufficient number of sample types, and the diagnostic models cannot be generalized to new working conditions. However, in actual applications, permanent magnet motors for electric vehicles usually work under complex working conditions such as variable speed, variable load, frequent start and stop, etc. At the same time, due to the fact that permanent magnet motors for electric vehicles are in a normal state for a long time, the occurrence of faults is accidental and random, and the motor cannot run for a long time after a fault occurs. Therefore, it is difficult to collect actual fault signals in different states under all working conditions, and there is a situation where there are no industrial samples. There is little existing research on the fault diagnosis of permanent magnet motors for electric vehicles in the absence of industrial samples, especially fewer diagnostic methods for actual applications. To carry out relevant research, only the small-sample fault diagnosis of permanent magnet motors without considering the application field can be referred to. A series of achievements have been made in the existing small-sample permanent magnet motor fault diagnosis methods. For example, a generative adversarial network is used to generate fault samples with the same distribution as the original samples. However, these methods based on generative adversarial networks can only expand the number of samples and cannot generate the missing samples. In addition, a few methods use physical-based numerical simulation models to generate fault samples missing in industry, without considering the domain deviation between the simulation signals and the actual signals, and the generated samples lack diversity. Due to factors such as production process, sensor calibration, wear, external interference, etc., the domain deviation inevitably exists. Therefore, it is urgent to study a permanent magnet motor fault diagnosis technology considering the missing industrial data samples and small samples in the actual application of electric vehicles. Summary of the Invention
[0004] Technical problem to be solved by the present invention: Aiming at the above problems of the prior art, a fault diagnosis method and system for a permanent magnet motor used in an electric vehicle are provided. The present invention aims to realize the fault diagnosis of a permanent magnet motor under the condition of lack of industrial data samples and small samples in the actual application of an electric vehicle, and has the advantages of high training efficiency of the neighborhood clustering domain adaptation network and high detection accuracy.
[0005] In order to solve the above technical problems, the technical solution adopted by the present invention is as follows: A fault diagnosis method for a permanent magnet motor used in an electric vehicle, comprising: S101, generating simulation signal samples of various demagnetization states of the permanent magnet motor based on a finite element simulation model of the permanent magnet motor; S102, performing data augmentation on the simulation signal samples to achieve sample expansion; S103, converting the simulation signal samples into two-dimensional frequency domain images, and attaching labels to generate a simulation signal database; S104, according to the simulation signal database, combining a small batch of samples of the actual signal samples of some unlabeled permanent magnet motors used in electric vehicles to train a neighborhood clustering domain adaptation network to eliminate the domain shift between the simulation signal samples and the actual signal samples. The neighborhood clustering domain adaptation network includes two convolutional neural networks, a feature extractor G and a classifier C, which are connected in sequence; S105, converting the actual signal to be detected of the permanent magnet motor used in the electric vehicle into a two-dimensional frequency domain image and inputting it into the trained neighborhood clustering domain adaptation network, so as to obtain the fault diagnosis result of the permanent magnet motor used in the electric vehicle.
[0006] Optionally, when training the neighborhood clustering domain adaptation network by combining a small batch of samples of the actual signal samples of some unlabeled permanent magnet motors used in electric vehicles in step S104, it includes adding the two-dimensional frequency domain images of some of the actual signal samples in the small batch of samples to the actual sample set M during each iteration, and using the two-dimensional frequency domain images of the actual signal samples in the actual sample set M and the two-dimensional frequency domain images of the simulation signal samples in the simulation signal database to calculate the loss function, and using the loss function to update the network parameters of the two convolutional neural networks, the feature extractor G and the classifier C. The function expression of the adopted loss function is: , In the above formula, is the total loss function, is the classification loss function of the classifier C, is the neighborhood clustering loss function, is the target clustering loss function, and is a weight parameter, and there are: , , , In the above formula, and are the mathematical expectation and the cross - entropy loss function respectively, is the prediction result of the simulation signal sample ; is the simulation signal database, is the simulation signal sample 's label; is the number of actual signal samples in the actual sample set M ; is the i th feature of the actual signal sample belonging to the feature set M of the actual sample set F in the j th feature probability, m is the number of actual signal samples of the part added during iteration, K is the number of fault categories, is the weight of the sample pair ; is the KL divergence of the sample pair .
[0007] Optionally, in step S104, the processing of the input two - dimensional frequency - domain image by the feature extractor G includes: the input two - dimensional frequency - domain image passes through a two - dimensional convolutional layer, batch normalization, two - dimensional max - pooling layer, activation function, two - dimensional convolutional layer, batch normalization, two - dimensional max - pooling layer, and activation function in sequence to obtain the output features; the processing of the features input from the feature extractor G by the classifier C includes: the input features pass through a fully - connected layer, batch normalization, activation function, fully - connected layer, batch normalization, activation function, and fully - connected layer in sequence to obtain the final fault category.
[0008] Optionally, when generating the simulation signal samples of multiple demagnetization states of the permanent - magnet motor based on the permanent - magnet motor finite - element simulation model in step S101, it includes establishing a corresponding permanent - magnet motor finite - element simulation model using finite - element software according to the performance parameters of the actual permanent - magnet motor for electric vehicles, applying a current - source excitation to the permanent - magnet motor finite - element simulation model, and simulating different demagnetization degrees of the permanent - magnet motor by modifying the residual magnetic induction intensity of the permanent magnets in the permanent - magnet motor finite - element simulation model according to the demagnetization property of the permanent magnet material to generate the simulation signal samples of multiple demagnetization states of the permanent - magnet motor.
[0009] Optionally, when performing data augmentation on the simulation signal samples in step S102 to achieve sample expansion, the data augmentation on the simulation signal samples includes at least one of a data augmentation method based on window bending, a data augmentation method based on time bending, a data augmentation method based on noise addition, and a data augmentation method based on amplitude bending. Among them, the data augmentation methods based on time bending and window bending stretch or compress the signals of the one-dimensional time series in the time axis direction, and the data augmentation methods based on noise addition and amplitude bending stretch or compress the signals of the one-dimensional time series in the amplitude direction.
[0010] Optionally, the data augmentation on the simulation signal samples in step S102 to achieve sample expansion includes: S201, randomly selecting 5% of the simulation signal samples, then compressing them by 0.75 times or stretching them by 1.25 times, and finally resampling the signals to the original length to generate augmented samples based on window bending; S202, randomly shuffling the time dimension of the simulation signal using a random smooth distortion curve to generate augmented samples based on time bending; S203, randomly adding Gaussian noise with an average of 0 and a standard deviation of 0.01 to the simulation signal to generate augmented samples based on noise addition; S204, randomly shuffling the amplitude dimension of the simulation signal using a random smooth distortion curve to generate augmented samples based on amplitude bending.
[0011] Optionally, converting the simulation signal samples into two-dimensional frequency domain images in step S103 means converting them into diffraction spectrograms through a diffraction spectrum transformation method.
[0012] Optionally, the conversion into diffraction spectrograms through the diffraction spectrum transformation method includes: S301, using the largest square matrix constructed by arranging the motor fault signals with more than one cycle in row order as the image matrix D ; S302, generating a diffraction matrix from the image matrix D according to the following formula: , In the above formula, d i and d j are the number of rows and columns of the image matrix D respectively, R is the hole radius, h is the total number of rows of the image matrix D , is the element in the D m th row and the d i th column of the diffraction matrix d j , andD In the d i row and the d j column elements; S303, generating a diffraction spectrum diagram from the diffraction matrix according to the following formula: , In the above formula, represents the generated diffraction spectrum diagram, j is the imaginary unit, u and v respectively represent the number of rows and columns of the diffraction spectrum diagram, and u = 1, 2, …, h ; v = 1, 2, …, h .
[0013] In addition, the present invention also provides a fault diagnosis system for a permanent magnet motor used in an electric vehicle, including a microprocessor and a memory connected to each other, and the microprocessor is programmed or configured to execute the fault diagnosis method for the permanent magnet motor used in the electric vehicle.
[0014] In addition, the present invention also provides a computer-readable storage medium, in which a computer program is stored, and the computer program is used to be programmed or configured by a microprocessor to execute the fault diagnosis method for the permanent magnet motor used in the electric vehicle.
[0015] Compared with the prior art, the present invention mainly has the following advantages: 1. The present invention includes generating simulation signal samples of various demagnetization states of a permanent magnet motor based on a finite element simulation model of the permanent magnet motor, performing data augmentation on the simulation signal samples to achieve sample expansion, greatly reducing the cost of obtaining fault signals, realizing fault diagnosis of the permanent magnet motor in the absence of industrial data samples and small samples in the actual application of electric vehicles, and improving the efficiency of the training process of the neighborhood clustering domain adaptation network.
[0016] 2. The present invention includes training a neighborhood clustering domain adaptation network according to a simulation signal database in combination with a small batch of samples of actual signal samples of some unlabeled permanent magnet motors used in electric vehicles, transferring the knowledge learned from the migration simulation signals to actual applications, and labeling the actual measurement signals, reducing the huge workload of manual marking, and improving the accuracy of fault diagnosis of the permanent magnet motor used in the electric vehicle by eliminating the domain shift between the simulation signal samples and the actual signal samples, and having the advantage of high detection accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 is a schematic diagram of the basic process of the method according to the embodiment of the present invention.
[0018] Figure 2 This is a schematic diagram of the electrical system structure of the permanent magnet motor for electric vehicles in the embodiment of the present invention.
[0019] Figure 3 This is a schematic diagram of the structure of the neighborhood clustering domain adaptation network in the embodiment of the present invention.
[0020] Figure 4 This is the scatter spectrum diagram of the simulation signal samples and the actual signal samples in the embodiment of the present invention. Detailed implementation manners
[0021] As Figure 1 shown, the fault diagnosis method of the permanent magnet motor for electric vehicles in this embodiment includes: S101, generating simulation signal samples of various demagnetization states of the permanent magnet motor based on the finite element simulation model of the permanent magnet motor; S102, performing data augmentation on the simulation signal samples to achieve sample expansion; S103, converting the simulation signal samples into two-dimensional frequency domain images, and attaching labels to generate a simulation signal database; S104, according to the simulation signal database, combining a small batch of samples of the actual signal samples of some unlabeled permanent magnet motors for electric vehicles to train the neighborhood clustering domain adaptation network to eliminate the domain shift between the simulation signal samples and the actual signal samples. The neighborhood clustering domain adaptation network includes two convolutional neural networks, a feature extractor G and a classifier C, which are connected in sequence; S105, converting the actual signal to be detected of the permanent magnet motor for electric vehicles into a two-dimensional frequency domain image and inputting it into the trained neighborhood clustering domain adaptation network, so as to obtain the fault diagnosis result of the permanent magnet motor for electric vehicles.
[0022] Figure 2This is a schematic diagram of the electrical system structure of a permanent magnet motor for an electric vehicle in this embodiment. The electrical system of the permanent magnet motor for an electric vehicle includes: the vehicle main control system issues control instructions to the drive control system through Ethernet communication, and the drive control system controls the permanent magnet motor to make the electric vehicle run. For fault diagnosis, the vehicle main control system integrates the display of fault diagnosis results, and all algorithms and operation processes of fault diagnosis are in the drive control system. An alternating magnetic field sensor is used to measure the leakage magnetic flux density signal on the surface of the permanent magnet motor and transmit the signal to the drive control system. The drive control system applies the fault diagnosis method of the permanent magnet motor for an electric vehicle in this embodiment to realize the fault diagnosis of the motor, and displays the diagnosis result to the user in the vehicle main control system. It should be noted that the steps of training the neighborhood clustering domain adaptation network in S101 - S104 are generally pre-training methods. After pre-training, the trained neighborhood clustering domain adaptation network needs to be saved to the drive control system. It should be noted that the simulation signal samples, actual signal samples, and actual signals to be detected are all leakage magnetic flux density signals on the surface of the permanent magnet motor. The magnetic field signal is a direct manifestation of the demagnetization fault of the permanent magnet motor. Therefore, the fault of different demagnetization degrees of the permanent magnet motor is diagnosed by simulating the leakage magnetic flux density on the motor surface as the fault signal.
[0023] Due to the inconsistent distributions between the simulation signal samples and the actual signal samples, it is necessary to eliminate the domain shift between the simulation signal samples and the actual signal samples. For this purpose, the domain shift is eliminated through the neighborhood clustering domain adaptation network. When training the neighborhood clustering domain adaptation network by combining a small batch of samples of the actual signal samples of some unlabeled permanent magnet motors for electric vehicles in step S104 of this embodiment, it includes adding the two-dimensional frequency domain images of some actual signal samples in the small batch of samples to the actual sample set M in each iteration, and calculating the loss function using the two-dimensional frequency domain images of the actual signal samples in the actual sample set M and the two-dimensional frequency domain images of the simulation signal samples in the simulation signal database, and updating the network parameters of the two convolutional neural networks, namely the feature extractor G and the classifier C, using the loss function. The functional expression of the loss function used is: , In the above formula, is the total loss function, is the classification loss function of the classifier C, is the neighborhood clustering loss function, is the target clustering loss function, and are weight parameters, and there are: , , , In the above formula, and are the mathematical expectation and the cross-entropy loss function respectively, is the simulation signal sample of the prediction result, is the simulation signal database, is the simulation signal sample of the label; is the actual sample set M in the number of actual signal samples, is the i th actual signal sample feature belongs to the actual sample set M of the feature set F in the j th feature of the probability, m is the number of actual signal samples added during iteration, K is the number of fault categories, is the sample pair of the weight, is the sample pair of the KL divergence. Among them: , where, is a hyperparameter used to control the distribution concentration. The KL divergence is used to calculate the actual sample and between the probability distribution distance, and respectively follow the distribution and , and between the distance, that is, the sample pair of the KL divergence The calculation formula of is as follows:
[0024] where, is the use of approximate of the KL divergence, is the use of approximate of the KL divergence.
[0025] The loss of the neighborhood clustering domain adaptation network consists of the classification loss of the classifier C, the neighborhood clustering loss, and the target clustering loss. After calculating the total loss, the stochastic gradient descent algorithm is used to optimize the total loss to obtain the optimized neighborhood clustering domain adaptation network. The unlabeled actual samples are input into the neighborhood clustering domain adaptation network for fault diagnosis. The neighborhood clustering domain adaptation network consists of a feature extractor G and a classifier C. Both the feature extractor G and the classifier C use a convolutional neural network as the basic framework to extract features. The scattered frequency spectrograms of the simulation and actual samples are input into the feature extractor G and the classifier C. The cross-entropy loss function is used to reduce the classification error of the simulation samples, and at the same time, the simulation class prototypes are constructed. The storage module M stores the features of all actual samples and updates them under each mini-batch of samples. Then, the neighborhood clustering loss between all actual samples and the prototypes is calculated, and each actual sample is aligned to the actual neighborhood or a simulation class prototype by reducing the neighborhood clustering loss. The target clustering loss function between actual samples is calculated, and the actual samples with the same label are aligned by reducing the target clustering loss function.
[0026] As Figure 3 shown, the processing of the input two-dimensional frequency domain image by the feature extractor G in step S104 includes: the input two-dimensional frequency domain image is successively passed through a two-dimensional convolutional layer, batch normalization, a two-dimensional max pooling layer, an activation function, a two-dimensional convolutional layer, batch normalization, a two-dimensional max pooling layer, and an activation function to obtain the output features; the processing of the features input from the feature extractor G by the classifier C includes: the input features are successively passed through a fully connected layer, batch normalization, an activation function, a fully connected layer, batch normalization, an activation function, and a fully connected layer to obtain the final fault category. It should be noted that the layers or modules involved in the above convolutional neural network are all well-known methods, so their implementation details will not be elaborated here. In this embodiment, the weight vector of the last fully connected layer of the classifier C is defined as , where K represents the number of fault categories in the simulation library. Define , where is the feature of the actual samples saved in the actual sample set M , and at the same time, the weight vector W is aggregated. m is the number of actual signal samples in the part added during iteration, K is the number of fault categories. In each iteration, M the features of the samples in are updated with mini-batch features.
[0027] When generating simulation signal samples of various demagnetization states of the permanent magnet motor in step S101 of this embodiment, it includes establishing a corresponding permanent magnet motor finite element simulation model using finite element software according to the performance parameters of the actual permanent magnet motor for electric vehicles, using a current source excitation for the permanent magnet motor finite element simulation model to enable the calculation results to converge quickly, and simulating different demagnetization degrees of the permanent magnet motor by modifying the residual magnetic induction intensity of the permanent magnet in the permanent magnet motor finite element simulation model according to the demagnetization attribute of the permanent magnet material, so as to generate simulation signal samples of various demagnetization states of the permanent magnet motor. For example, as an optional implementation manner, in this embodiment, simulation signal samples of three states, namely a normal motor, a demagnetization fault 1 with 30% single-pole demagnetization, and a demagnetization fault 2 with 100% single-pole demagnetization, are respectively established and simulated.
[0028] Data augmentation of samples to achieve sample expansion is a common practice in small sample detection. As an optional implementation manner, in order to improve the target line of data augmentation to improve the detection accuracy, when performing data augmentation on the simulation signal samples in step S102 to achieve sample expansion, the data augmentation of the simulation signal samples includes at least one of a data augmentation method based on window bending, a data augmentation method based on time bending, a data augmentation method based on noise addition, and a data augmentation method based on amplitude bending. Among them, the data augmentation methods based on time bending and window bending stretch or compress the signal of the one-dimensional time series in the time axis direction, and the data augmentation methods based on noise addition and amplitude bending stretch or compress the signal of the one-dimensional time series in the amplitude direction. Specifically, in step S102 of this embodiment, the data augmentation of the simulation signal samples to achieve sample expansion includes: S201, randomly selecting 5% of the simulation signal samples, then compressing by 0.75 times or stretching by 1.25 times, and finally resampling the signal to the original length to generate an augmented sample based on window bending; S202, randomly scrambling the time dimension of the simulation signal using a random smooth distortion curve to generate an augmented sample based on time bending; S203, randomly adding Gaussian noise with an average value of 0 and a standard deviation of 0.01 to the simulation signal to generate an augmented sample based on noise addition; S204, randomly scrambling the amplitude dimension of the simulation signal using a random smooth distortion curve to generate an augmented sample based on amplitude bending.
[0029] Due to differences in manufacturing processes, materials, operating environments and working conditions, etc., it is difficult for simulation data to be completely consistent with actual data, and problems such as amplitude and frequency ratio differences generally exist. In order to eliminate the difference in amplitude between the simulation signal and the actual signal, converting the simulation signal samples into two-dimensional frequency domain images in step S103 of this embodiment means converting them into diffraction spectrograms through the diffraction spectrum transformation method. Specifically, the conversion into diffraction spectrograms through the diffraction spectrum transformation method in this embodiment includes: S301. Take the largest square matrix constructed from the motor fault signals over more than one period in row order as the image matrix. D ; Under the condition of meeting the Nyquist sampling theorem, take the motor fault signals over more than one period The largest square matrix constructed in row order as the image matrix D , which can be expressed as:
[0030] where, where H represents the total number of signal points, h represents the total number of rows of the image matrix, , that is, take the integer after taking the square root of H ; S302. Generate a diffraction matrix from the image matrix D According to the following formula: , In the above formula, d i and d j are the number of rows and columns of the image matrix D respectively, R is the hole radius, h is the total number of rows of the image matrix D , is the element in the D m th row and d i th column of the diffraction matrix d j , is the element in the D th row and d i th column of the image matrix d j ; There is no specific physical object corresponding to the image matrix, and the image still has problems such as complex shape and unclear features. Based on image analysis theory, the image is similar to a one-dimensional signal in the frequency domain space and can be decomposed into the sum of several complex plane waves, that is, the image can also be considered as a plane wave. To simplify the image and highlight the fault features, simulate the diffraction phenomenon of a plane wave passing through a small hole. The diffraction spectrum diagram of the image matrix D can be generated through the above function expression, that is: the diffraction matrix.
[0031] S303. Generate a diffraction spectrum diagram from the diffraction matrix according to the following formula: , In the above formula, represents the generated diffraction spectrum diagram, j is the imaginary unit,u and v represent the number of rows and columns of the diffraction spectrum diagram respectively, and u = 1, 2, …, h ; v = 1, 2, …, h . That is, a two-dimensional fast Fourier transform is used to transform into the frequency domain space, thereby generating a diffraction spectrum diagram.
[0032] According to Figure 2 the electrical system diagram of the electric vehicle in Figure 4 the two kinds of demagnetization faults in actuality are demagnetization fault 1 (single-pole demagnetization of 30%) and demagnetization fault 2 (single-pole demagnetization of 100%). Fault signal acquisition is carried out for three states (normal motor, demagnetization fault 1, and demagnetization fault 2) at the speed of 1500 r / min of the permanent magnet motor of the electric vehicle and under no-load of the load, and a non-contact alternating magnetic field sensor is used to measure the leakage magnetic flux density signal on the surface of the motor. The simulation fault data and the actual fault data are both converted into diffraction spectrum diagrams through the diffraction spectrum transformation method.
[0033] To sum up, the fault diagnosis method for the permanent magnet motor of the electric vehicle in this embodiment includes generating simulation signal samples of various demagnetization states of the permanent magnet motor based on the finite element simulation model of the permanent magnet motor, performing data enhancement on the simulation signal samples to achieve sample expansion, greatly reducing the cost of obtaining fault signals, realizing the fault diagnosis of the permanent magnet motor under the lack of industrial data samples and small samples in the actual application of electric vehicles, and improving the training efficiency of the neighborhood clustering domain adaptation network. The fault diagnosis method for the permanent magnet motor of the electric vehicle in this embodiment includes training the neighborhood clustering domain adaptation network according to the simulation signal database in combination with a small batch of samples of the actual signal samples of some unlabeled permanent magnet motors of electric vehicles, transferring the knowledge learned from the migration simulation signals to the actual application, and labeling the actual measurement signals, reducing the huge workload of manual marking, and improving the accuracy of the fault diagnosis of the permanent magnet motor of the electric vehicle by eliminating the domain shift between the simulation signal samples and the actual signal samples, having the advantage of high detection accuracy.
[0034] In addition, this embodiment also provides a fault diagnosis system for the permanent magnet motor of an electric vehicle, including a microprocessor and a memory connected to each other, and the microprocessor is programmed or configured to execute the fault diagnosis method for the permanent magnet motor of the electric vehicle. This embodiment also provides a computer-readable storage medium, and a computer program is stored in the computer-readable storage medium, and the computer program is used to be programmed or configured by the microprocessor to execute the fault diagnosis method for the permanent magnet motor of the electric vehicle.
[0035] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-readable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code. The present application is described with reference to the flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each flow and / or block in the flowchart and / or block diagram, as well as the combination of flows and / or blocks in the flowchart and / or block diagram, can be realized by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, such that the instructions executed by the processor of the computer or other programmable data processing devices generate a device for realizing the functions specified in the flow Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks
[0036] The above are only the preferred embodiments of the present invention, and the protection scope of the present invention is not limited to the above embodiments. All technical solutions falling within the idea of the present invention belong to the protection scope of the present invention. It should be noted that for those of ordinary skill in the art, without departing from the principle of the present invention, several improvements and refinements should also be regarded as within the protection scope of the present invention.
Claims
1. A fault diagnosis method for a permanent magnet motor for an electric vehicle, characterized in that: include: S101, generating simulation signal samples of various demagnetization states of the permanent magnet motor based on a finite element simulation model of the permanent magnet motor; S102, performing data enhancement on the simulation signal samples to achieve sample expansion; S103, converting the simulated signal samples into two-dimensional frequency domain images, adding labels to generate a simulated signal database; S104, training a neighborhood clustering domain adaptation network based on the simulation signal database and a small batch of actual signal samples of some unlabeled permanent magnet motors for electric vehicles to eliminate domain offsets between the simulation signal samples and the actual signal samples, wherein the neighborhood clustering domain adaptation network includes two convolutional neural networks, a feature extractor G and a classifier C, which are connected in sequence; S105, converting the actual signal to be detected of the permanent magnet motor for electric vehicles into a two-dimensional frequency domain image and inputting the image into a trained neighborhood clustering domain adaptation network, thereby obtaining a fault diagnosis result of the permanent magnet motor for electric vehicles.
2. The fault diagnosis method for a permanent magnet motor for an electric vehicle according to claim 1, characterized in that: In step S104, when the neighborhood clustering domain adaptation network is trained by combining the small batch samples of the actual signal samples of the permanent magnet motor of the electric vehicle without labels, the two-dimensional frequency domain images of the actual signal samples of the small batch samples are added to the actual sample set at each iteration. M and using the actual sample set M The loss function is calculated based on the two-dimensional frequency domain image of the actual signal sample and the two-dimensional frequency domain image of the simulated signal sample in the simulated signal database, and the loss function is used to update the network parameters of the two convolutional neural networks of the feature extractor G and the classifier C, and the function expression of the loss function used is: , In the above formula, is the total loss function, is the classification loss function of classifier C, is the neighborhood clustering loss function, is the target clustering loss function, and is the weight parameter, and: , , , In the above formula, and They are mathematical expectation and cross entropy loss functions, For the simulation signal sample The prediction results, is the simulation signal database, For the simulation signal sample Labels; The actual sample set M The actual number of signal samples in For the i The characteristics of the actual signal samples Belongs to the actual sample set M The feature set F The j Features The probability of m is the number of actual signal samples added during the iteration, K is the number of fault categories, For sample pairs The weight of For sample pairs The KL divergence of .
3. The fault diagnosis method for a permanent magnet motor for an electric vehicle according to claim 1, characterized in that: In step S104, the feature extractor G processes the input two-dimensional frequency domain image, including: the input two-dimensional frequency domain image sequentially passes through a two-dimensional convolution layer, batch normalization, a two-dimensional maximum pooling layer, an activation function, a two-dimensional convolution layer, batch normalization, a two-dimensional maximum pooling layer, and an activation function to obtain output features; the classifier C processes the features input from the feature extractor G, including: the input features sequentially pass through a fully connected layer, batch normalization, an activation function, a fully connected layer, batch normalization, an activation function, and a fully connected layer to obtain a final fault category.
4. The fault diagnosis method for a permanent magnet motor for an electric vehicle according to claim 1, characterized in that: When generating simulation signal samples of various demagnetization states of the permanent magnet motor based on the permanent magnet motor finite element simulation model in step S101, it includes establishing a corresponding permanent magnet motor finite element simulation model using finite element software according to the performance parameters of the permanent magnet motor for an actual electric vehicle, using a current source to excite the permanent magnet motor finite element simulation model, and simulating different demagnetization degrees of the permanent magnet motor by modifying the residual magnetic induction intensity of the permanent magnet of the permanent magnet motor finite element simulation model according to the demagnetization properties of the permanent magnet material, so as to generate simulation signal samples of various demagnetization states of the permanent magnet motor.
5. The fault diagnosis method for a permanent magnet motor for an electric vehicle according to claim 1, characterized in that: When data enhancement is performed on the simulation signal samples to achieve sample expansion in step S102, the data enhancement of the simulation signal samples includes at least one of a data enhancement method based on window bending, a data enhancement method based on time bending, an enhancement method based on noise addition, and an enhancement method based on amplitude bending, wherein the data enhancement method based on time bending and window bending is to stretch or compress the signal of a one-dimensional time series in the direction of the time axis, and the data enhancement method based on noise addition and amplitude bending is to stretch or compress the signal of a one-dimensional time series in the amplitude direction.
6. The fault diagnosis method for a permanent magnet motor for an electric vehicle according to claim 5, characterized in that: In step S102, data enhancement is performed on the simulation signal samples to achieve sample expansion, including: S201, randomly selecting 5% of the simulation signal samples, and then compressing them by 0.75 times or stretching them by 1.25 times, and finally resampling the signal to its original length to generate enhanced samples based on window bending; S202, randomly disrupting the time dimension of the simulation signal using a random smooth distorted curve to generate enhanced samples based on time bending; S203, randomly adding Gaussian noise with a mean value of 0 and a standard deviation of 0.01 to the simulation signal to generate enhanced samples based on noise addition; S204, randomly disrupting the amplitude dimension of the simulation signal using a random smooth distorted curve to generate enhanced samples based on amplitude bending.
7. The fault diagnosis method for a permanent magnet motor for an electric vehicle according to claim 1, characterized in that: Converting the simulation signal sample into a two-dimensional frequency domain image in step S103 refers to converting the sample into a diffraction spectrum diagram by a diffraction spectrum transformation method.
8. The fault diagnosis method for a permanent magnet motor for an electric vehicle according to claim 7, characterized in that: The conversion into a diffraction spectrum diagram by a diffraction spectrum conversion method comprises: S301, using the maximum square matrix constructed in row order from the motor fault signal greater than one cycle as an image matrix D ; S302, the image matrix D The diffraction matrix is generated according to the following formula: , In the above formula, d i and d j The image matrix D The number of rows and columns, R is the hole radius, h is the image matrix D The total number of rows, is the diffraction matrix D m Middle d i Row, No. d j Column elements, is the image matrix D Middle d i Row, No. d j Column elements; S303, generating a diffraction spectrum diagram from the diffraction matrix according to the following formula: , In the above formula, represents the generated diffraction spectrum, j is an imaginary unit, u and v denote the number of rows and columns of the diffraction spectrum, respectively, and u =1,2,…, h ; v =1,2,…, h .
9. A fault diagnosis system for a permanent magnet motor for an electric vehicle, comprising a microprocessor and a memory connected to each other, characterized in that: The microprocessor is programmed or configured to execute the fault diagnosis method for the permanent magnet motor for electric vehicles as described in any one of claims 1 to 8.
10. A computer-readable storage medium having a computer program stored therein, characterized in that: The computer program is used to be programmed or configured by a microprocessor to execute the fault diagnosis method for a permanent magnet motor for an electric vehicle as claimed in any one of claims 1 to 8.