A method and system for diagnosing a turn-to-turn short circuit fault of a permanent magnet synchronous motor

CN122983758APending Publication Date: 2026-10-27NORTHWESTERN POLYTECHNICAL UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611118665.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-27
Publication Date
2026-10-27

AI Technical Summary

Technical Problem

[0012]本发明的目的在于克服上述现有技术的缺点,提供一种永磁同步电机匝间短路故障诊断方法及系统,主要用于解决现有诊断方法在早期微弱故障特征提取能力不足、预处理计算复杂度高且易导致特征失真、以及未能充分利用多源信号互补信息导致诊断鲁棒性较差的技术问题

Benefits of technology

[0072]1、本发明通过同步采集三相定子电流信号与振动加速度信号,构建四通道一维时间序列,并在特征层面实现多源信号的早期融合,即将升采样后的三相电流信号与振动加速度信号拼接为四通道融合矩阵后,直接作为改进的Transformer网络模型的输入。该网络模型利用多头自注意力机制,通过计算序列中任意两个位置之间的相关性实现全局依赖建模,打破了CNN受限于卷积核局部感受野的瓶颈,使网络模型能够直接捕获信号在多个电气周期内的长程全局依赖关系,有效提取早期微弱故障特征。同时,自注意力机制能够直接建模电流信号与振动信号之间的跨模态耦合关系,在注意力权重分配过程中,某一时刻的电流畸变特征与同一时刻的振动响应特征被映射至同一特征空间,由多头注意力的不同头分别关注电气域和机械域的特征模式,并通过注意力权重矩阵建立两者之间的直接关联,使网络模型能够充分利用匝间短路故障在电气域和机械域的双重响应特性。相比现有技术中单一信号诊断或不同信号分别提取特征后再进行后期融合的方法,本发明显著提高了故障诊断的准确性和鲁棒性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122983758A_ABST
    Figure CN122983758A_ABST
Patent Text Reader

Abstract

The application discloses a kind of permanent magnet synchronous motor interturn short circuit fault diagnosis method and system, belong to motor fault detection and intelligent diagnosis technical field.The method synchronously collects three-phase stator current and vibration acceleration signal, and after alignment by cubic spline interpolation, sub-sequence sample is divided by sliding window;Improved Transform network model is constructed, including multiscale parallel one-dimensional convolution layer, channel attention module, position coding injection layer, Transform encoder and classification output layer;After sub-sequence sample is convolved by multiscale, channel recalibration and position coding, the fault classification result is output by multi-head self-attention mechanism fusion;Model is trained with fault category as label, for the signal diagnosis to be measured.The application directly processes one-dimensional original signal, without complex time-frequency image conversion, and realizes high-precision, high-robustness diagnosis to early weak interturn short circuit fault through early fusion of multiple source signals.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of motor fault detection and intelligent diagnosis technology, specifically relating to a method and system for diagnosing inter-turn short-circuit faults in permanent magnet synchronous motors. Background Technology

[0002] Permanent magnet synchronous motors (PMSMs), with their advantages of high power density, excellent efficiency, and wide speed range, have been widely used in high-end equipment fields such as electric vehicles, aerospace, CNC machine tools, and wind power generation. However, PMSMs operate under harsh conditions such as high temperature, high frequency, and high load for extended periods, making their stator winding insulation prone to aging and damage, leading to inter-turn short circuit (ITSC) faults. ITSC is one of the most destructive faults in PMSMs, accounting for over 20% of all motor fault types. If not detected promptly, the sudden increase in circulating current within the short-circuit loop will generate severe localized heating, causing localized demagnetization of the motor and potentially evolving into more serious destructive faults such as phase-to-phase short circuits, or even burning out the motor, thus triggering a system-wide safety accident. Therefore, rapid and accurate diagnosis of PMSM ITSC faults, especially the detection of early, subtle faults, is crucial for ensuring the safe and reliable operation of motor systems.

[0003] Currently, PMSM (Motor-Mounted Simulator) inter-turn short-circuit fault diagnosis methods are mainly divided into three categories: analytical model-based methods, signal processing-based methods, and artificial intelligence-based methods. Among them, analytical model-based methods establish an accurate mathematical model of the PMSM and utilize state estimation or parameter estimation strategies to diagnose inter-turn short-circuit faults. Existing technologies include methods such as using extended Kalman filters to estimate short-circuit current and the number of short-circuit turns, comparing these with a set threshold to determine if an inter-turn short-circuit fault has occurred. Other studies establish motor voltage equations and short-circuit circuit equations under inter-turn short-circuit fault conditions, setting fault indicators based on the relationship of residual current for fault diagnosis. Furthermore, some existing technologies extract characteristics of inter-turn short circuits and non-uniform demagnetization coupling faults using negative sequence current methods and flux linkage observation methods. However, these methods are highly dependent on the precise physical parameters of the motor (such as resistance, inductance, flux linkage, etc.), which are difficult to accurately obtain during actual operation due to factors such as temperature changes, magnetic circuit saturation, and parameter drift. In addition, model-based methods typically require parameter calibration for specific motor models, exhibiting poor generalization ability under different power levels and load conditions, making it difficult to meet the needs of practical engineering applications.

[0004] Unlike analytical model-based methods, signal processing-based methods do not rely on precise mathematical models of the motor. Instead, they directly extract fault features from measured current, voltage, and other signals of the motor, performing fault diagnosis in the time, frequency, or time-frequency domains. In existing technologies, some researchers have proposed using inverse coordinate transformation to convert high-frequency negative-sequence components containing inter-turn short-circuit fault information into voltage signals with a frequency twice the switching frequency, using their amplitude as the basis for fault diagnosis. Other studies employ biorthogonal phase-locked loop (PLL) methods to extract inter-turn short-circuit fault features, distinguishing between short-circuit resistance, the number of short-circuit turns, and fault location. Still other techniques combine improved wavelet packet transform algorithms with fast Fourier transforms, fusing the spectral characteristics of stator current and vibration signals to achieve inter-turn short-circuit fault detection. However, signal processing-based methods generally have the following limitations: First, traditional signal processing techniques such as FFT and wavelet transform usually require rich expert prior knowledge to select appropriate basis functions and parameters, making it difficult to adaptively process non-stationary signals; Second, lumped parameter information extracted based on port voltage and current is easily affected by factors such as motor winding structure and pole-slot coordination, resulting in problems such as the submergence of effective fault signals and small information dimensions, leading to low detection signal-to-noise ratio and poor dynamic performance.

[0005] With the development of deep learning technology, artificial intelligence-based inter-turn short-circuit fault diagnosis methods have attracted widespread attention. These methods can automatically extract high-order fault features from large amounts of preprocessed data, overcoming to some extent the reliance on precise physical models and expert prior knowledge. Among existing technologies, some scholars have proposed inter-turn short-circuit fault diagnosis methods based on one-dimensional convolutional neural networks (1D-CNN), utilizing 1D-CNN to automatically extract features from the original signal and perform fault detection and classification. Other studies combine convolutional neural networks (CNN) and bidirectional gated recurrent units (BiGRU), fully utilizing the advantages of CNN in feature extraction and the modeling capabilities of BiGRU for temporal information. Furthermore, some existing technologies combine CNN with Long Short-Term Memory (LSTM) networks, with CNN responsible for feature extraction and LSTM responsible for learning temporal features and classifying the data.

[0006] However, the above-mentioned AI-based methods still have the following shortcomings:

[0007] First, their ability to model long-range dependencies is limited. Traditional CNN models are constrained by the local receptive field of the convolutional kernel. Without introducing extremely complex extension structures, they struggle to effectively capture the long-range global dependencies of signals over multiple electrical cycles, resulting in insufficient ability to extract early, weak fault features. While hybrid models such as CNN-LSTM introduce LSTM to process temporal information, the recursive structure of LSTM still suffers from gradient decay when processing long sequences, and its computational efficiency is low.

[0008] Second, preprocessing is computationally complex and prone to feature distortion. Existing deep learning methods (especially 2D CNNs) often require converting the one-dimensional original signal into a two-dimensional time-frequency image through complex techniques such as continuous wavelet transform (CWT). This not only greatly increases the computational load of the data preprocessing stage, but may also cause key temporal features in the original signal to be lost or amplified by noise during the transformation process, affecting the accuracy and real-time performance of the diagnosis.

[0009] Third, it neglects the coupling relationship of multi-physics field signals. Inter-turn short-circuit faults not only cause stator current distortion but also induce air gap magnetic field distortion, generating unbalanced magnetic pull (UMP), which in turn leads to abnormal mechanical vibration of the motor. However, existing methods mostly rely on a single current signal to reflect electrical asymmetry. A single signal has poor robustness under strong noise or complex operating conditions and is prone to missing early minor faults. Although some studies have attempted to fuse current and vibration signals for fault diagnosis, these methods usually input different signals into their respective sub-networks for feature extraction before subsequent fusion, failing to achieve deep coupling modeling of multi-physics field signals at the feature level.

[0010] In summary, existing PMSM inter-turn short-circuit fault diagnosis methods still have significant shortcomings in early weak fault feature extraction, multi-physics coupled modeling, and the balance between computational efficiency and diagnostic accuracy. A key technical problem to be solved is how to directly process the one-dimensional raw signal without complex time-frequency image conversion, and fully utilize the complementary information contained in multi-source signals to achieve high-precision and robust diagnosis of early weak inter-turn short-circuit faults under different motor power and operating conditions.

[0011] In view of this, the present invention is hereby proposed. Summary of the Invention

[0012] The purpose of this invention is to overcome the shortcomings of the prior art and provide a method and system for diagnosing inter-turn short-circuit faults in permanent magnet synchronous motors. It is mainly used to solve the technical problems of existing diagnostic methods, such as insufficient ability to extract early weak fault features, high preprocessing computational complexity leading to feature distortion, and poor diagnostic robustness due to failure to fully utilize complementary information from multiple sources.

[0013] The objective of this invention is achieved through the following technical solution:

[0014] On the one hand, the present invention provides a method for diagnosing inter-turn short-circuit faults in a permanent magnet synchronous motor, comprising the following steps:

[0015] Step 1, Data Acquisition: Synchronously acquire the three-phase stator current signal and vibration acceleration signal of the permanent magnet synchronous motor to form a multi-channel one-dimensional time series;

[0016] Step 2, Data Preprocessing: The acquired three-phase stator current signal and vibration acceleration signal are time-aligned by cubic spline interpolation to synchronize heterogeneous signals with different acquisition frequencies on a unified time axis; and the multi-channel one-dimensional time series is divided into several sub-sequence samples by a sliding window of fixed length and overlapping sampling.

[0017] Step 3: Build and train the improved Transformer network model:

[0018] The improved Transformer network model includes a multi-scale parallel one-dimensional convolutional layer, a channel attention module, a positional encoding injection layer, a Transformer encoder, and a classification output layer connected in sequence. The Transformer encoder adopts a layer pre-normalization structure.

[0019] The sub-sequence samples obtained in step 2 are divided into training and validation sets. The sub-sequence samples in the training set are used as input to the improved Transformer network model. They are sequentially passed through the multi-scale parallel one-dimensional convolutional layer for token extraction, and the output features are mapped to the embedding dimension required by the Transformer encoder. The channel attention module performs channel feature recalibration. The position encoding injection layer fuses the position encoding with the mapped feature sequence, and then inputs it into the Transformer encoder. A multi-head self-attention mechanism is used for global dependency modeling, achieving cross-channel time-series fusion of the three-phase stator current signal and vibration acceleration signal, outputting high-dimensional features. The classification output layer maps the high-dimensional features to a probability distribution of the severity category of inter-turn short-circuit faults.

[0020] Using the severity category of inter-turn short-circuit faults in permanent magnet synchronous motors as labels, the improved Transformer network model is trained using the training set, and the network model is validated using the validation set during the training process until the network converges.

[0021] Step 4, Fault Diagnosis Output: After processing the multi-channel one-dimensional time series of the permanent magnet synchronous motor under test in Step 2, input it into the improved Transformer network model trained in Step 3, and output the inter-turn short circuit fault diagnosis result of the permanent magnet synchronous motor.

[0022] Furthermore, in step 2, the specific process of time alignment using cubic spline interpolation includes:

[0023] The sampling frequency of the three-phase stator current signal is different from the sampling frequency of the vibration acceleration signal, and the upsampling frequency ratio is:

[0024]

[0025] In the formula, The upsampling frequency ratio, The sampling frequency of the three-phase stator current signal is . The sampling frequency of the vibration signal;

[0026] Cubic splines approximate the true signal using a cubic polynomial over each subinterval. , Construct the following cubic polynomial:

[0027]

[0028] Interpolation conditions are met:

[0029]

[0030] And the continuity condition of the first derivative:

[0031]

[0032] The continuity condition for the second derivative:

[0033]

[0034] Introducing the second derivative From continuity, we obtain the tridiagonal equation:

[0035]

[0036] In the formula, For the sampling time point, For sampling point index; This represents the total number of sampling points for the original current signal. The sampling time interval for the original current signal data. For the original current signal, the first The amplitude of each sampling point; solve The boundary conditions are taken from natural splines. For any target time ,make The interpolation result is:

[0037]

[0038] The three-phase stator current signals of phases A, B, and C are resampled using the cubic spline interpolation method described above. The upsampled three-phase current signals are then concatenated with the vibration acceleration signal to form the following four-channel fusion matrix:

[0039]

[0040] In the formula, , , The data are the interpolated three-phase currents of phases A, B, and C. This is vibration signal data.

[0041] Further, in step 3, the multi-scale parallel one-dimensional convolutional layer includes:

[0042] The first convolutional branch consists of a first one-dimensional convolutional layer, a first batch of normalization layers, and a first activation function layer. The first one-dimensional convolutional layer uses a convolutional kernel of the first size to extract the peak harmonic features caused by high-frequency impacts and short circuits.

[0043] The second convolutional branch consists of a second one-dimensional convolutional layer, a second batch normalization layer, and a second activation function layer. The second one-dimensional convolutional layer uses a convolutional kernel of a second size to extract features of the transition state impact and decay process. The second size is larger than the first size.

[0044] The third convolutional branch consists of a third one-dimensional convolutional layer, a third batch normalization layer, and a third activation function layer. The third one-dimensional convolutional layer uses a convolutional kernel of a third size to extract the low-frequency, large-period signal features of the stator. The third size is larger than the second size.

[0045] Residual connection branches are used to directly transmit the input signal to the output.

[0046] The splicing layer is used to splice the outputs of the first convolutional branch, the second convolutional branch, the third convolutional branch, and the residual connection branch in the channel dimension;

[0047] A fusion layer is used to perform feature fusion on the output of the splicing layer;

[0048] The output convolutional layer is used to perform convolution processing on the output of the fusion layer, adjust the number of output channels, and serve as the final output of the multi-scale parallel one-dimensional convolutional layer.

[0049] Furthermore, in step 3, the channel attention module is a Squeeze-and-Excitation module, which includes a Squeeze operation and an Excitation operation. The Squeeze operation compresses the spatial features of each channel into a global descriptor through global average pooling. The Excitation operation learns the activation weights of each channel through a gating mechanism and performs adaptive recalibration on the feature channels to enhance useful features and suppress irrelevant features.

[0050] Furthermore, in step 3, the position encoding injection layer adopts a sine / cosine form of position encoding, the calculation formula of which is:

[0051]

[0052] In the formula, For dimensional indexing, For the embedded dimension; Representing positions respectively The first and the Encoding of dimensions;

[0053] The location encoding injection layer adds the location encoding to the embedding sequence output by the multi-scale parallel one-dimensional convolutional layer to obtain an input sequence with fused location information.

[0054] Further, in step 3, the processing procedure of the Transformer encoder is expressed as follows:

[0055]

[0056] In the formula, For encoder layer index, This represents the total number of layers in the encoder. For the first The input of the layer encoder, For the first The high-dimensional features output by the layer encoder, and the input of the first layer encoder is the sequence after injection position encoding;

[0057] Each layer of the Transformer encoder contains a multi-head self-attention mechanism and a feedforward neural network module.

[0058] Furthermore, the multi-head self-attention mechanism captures diverse fault modes in different feature subspaces by running multiple attention heads in parallel. The outputs of each attention head are concatenated and used as the output of the Transformer encoder. The calculation of a single attention head is achieved using the following formula:

[0059]

[0060] In the formula, For querying the matrix, The key matrix, For value matrices, Scaling factor, superscript This indicates the matrix transpose.

[0061] Furthermore, in step 3, the severity of the fault is classified according to the degree of inter-turn short-circuit fault. The classification output layer uses the Softmax activation function, and the formula for calculating the degree of inter-turn short-circuit fault is:

[0062]

[0063] In the formula, The degree of inter-turn short circuit fault, This represents the bypass resistance value for an inter-turn short-circuit fault. This is the stator resistance value.

[0064] On the other hand, the present invention also provides a fault diagnosis system for inter-turn short circuits in permanent magnet synchronous motors, comprising:

[0065] The power module is used to supply power to the system;

[0066] Motors and their drive equipment serve as the main components for fault detection;

[0067] The signal acquisition module includes a current sensor installed on the motor power supply line and a vibration acceleration sensor installed on the motor housing, which are used to synchronously acquire three-phase stator current signals and vibration acceleration signals, respectively.

[0068] The data acquisition and processing unit includes a data acquisition card and a processor. The data acquisition card is used to perform analog-to-digital conversion on the acquired signals, and the processor is used to execute the method described above. The processor is equipped with the improved Transformer network model.

[0069] The control and output module is used to receive the output results of the processor and execute corresponding control actions based on the output results.

[0070] Furthermore, the control and output module includes a display device and an alarm device; when the degree of inter-turn short circuit fault output by the processor exceeds a preset safety threshold, the control and output module cuts off the power supply to the motor inverter and triggers the alarm device.

[0071] Compared with the prior art, the present invention has the following beneficial effects:

[0072] 1. This invention constructs a four-channel one-dimensional time series by synchronously acquiring three-phase stator current signals and vibration acceleration signals, and achieves early fusion of multi-source signals at the feature level. Specifically, the upsampled three-phase current signals and vibration acceleration signals are concatenated into a four-channel fusion matrix, which is then directly used as input to an improved Transformer network model. This network model utilizes a multi-head self-attention mechanism to achieve global dependency modeling by calculating the correlation between any two positions in the sequence. This breaks the bottleneck of CNNs being limited by the local receptive field of the convolutional kernel, enabling the network model to directly capture the long-range global dependencies of signals over multiple electrical cycles and effectively extract early weak fault features. Simultaneously, the self-attention mechanism can directly model the cross-modal coupling relationship between current and vibration signals. During attention weight allocation, the current distortion characteristics at a certain moment and the vibration response characteristics at the same moment are mapped to the same feature space. Different heads of the multi-head attention focus on the feature patterns in the electrical and mechanical domains respectively, and a direct correlation is established between the two through the attention weight matrix. This allows the network model to fully utilize the dual response characteristics of inter-turn short-circuit faults in both the electrical and mechanical domains. Compared with existing technologies that use single-signal diagnosis or extract features from different signals separately and then fuse them, this invention significantly improves the accuracy and robustness of fault diagnosis.

[0073] 2. This invention abandons the traditional preprocessing method that converts one-dimensional signals into two-dimensional time-frequency images through complex means such as continuous wavelet transform, and directly processes the original one-dimensional time-series signal. First, cubic spline interpolation is used to achieve precise synchronization of heterogeneous sensor signals on a unified time axis, ensuring strict temporal alignment between current and vibration signals. Then, a fixed-length sliding window with overlapping sampling is used to divide the multi-channel one-dimensional time series into several sub-sequence samples, which serve as direct input to the improved Transformer network model. The entire process does not require any time-frequency transformation, significantly reducing the computational and storage overhead of the data preprocessing stage, while avoiding the risk of losing or amplifying key temporal features during the transformation process, which is beneficial for real-time fault diagnosis on edge computing devices.

[0074] 3. This invention employs a pre-LN (Pre-LN) Transformer encoder structure, placing layer normalization before residual connections. This allows the gradient flow to directly reach shallow layers during backpropagation, effectively solving the training accuracy bottleneck caused by gradient dispersion in traditional post-LN normalization on small sample data. This makes the model training process more stable and converges faster. Simultaneously, the Transformer encoder does not rely on the recursive structure of LSTM, allowing computation at each time step to be performed in parallel, significantly improving the computational efficiency of training and inference. Furthermore, multi-scale parallel one-dimensional convolutional layers utilize convolutional kernels of different sizes to capture high-frequency impact features, transition state features, and low-frequency periodic features respectively. Combined with residual connection branches, this preserves the original signal information, effectively solving the problem that a single-scale convolutional kernel cannot simultaneously capture ultra-high-frequency weak pulses and low-frequency periodic fundamental waves. Validation results on motor datasets with three different rated power ratings of 1.0kW, 1.5kW, and 3.0kW show that this invention maintains a diagnostic accuracy of over 98%, demonstrating good cross-platform generalization ability and promising engineering application prospects. Attached Figure Description

[0075] The accompanying drawings are incorporated in and form part of this specification, and together with the description serve to explain the principles of the invention.

[0076] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0077] Figure 1 This is a flowchart of the inter-turn short-circuit fault diagnosis method for permanent magnet synchronous motors according to the present invention;

[0078] Figure 2 This is a diagram showing the overall structure of the improved Transformer network model of this invention.

[0079] Figure 3 This is a diagram of the multi-scale parallel one-dimensional convolutional layer network structure in this invention;

[0080] Figure 4 This is a schematic diagram of the overall architecture of the multi-head attention mechanism in this invention;

[0081] Figure 5 This is a schematic diagram of the attention head calculation process in the multi-head attention mechanism of the present invention;

[0082] Figure 6 This is a schematic diagram of a confusion matrix for classifying the severity of faults in a 1.0kW permanent magnet synchronous motor according to an embodiment of the present invention.

[0083] Figure 7 This is a schematic diagram of a confusion matrix for classifying the severity of faults in a 1.5kW permanent magnet synchronous motor according to an embodiment of the present invention.

[0084] Figure 8 This is a schematic diagram of the confusion matrix for classifying the severity of faults in a 3.0kW permanent magnet synchronous motor according to an embodiment of the present invention;

[0085] Figure 9 The diagram shows the curves of the loss function changing with the number of training iterations when the improved Transformer network model in this embodiment of the invention is trained on fault datasets of 1.0kW, 1.5kW, and 3.0kW permanent magnet synchronous motors, respectively.

[0086] Figure 10 This is a schematic diagram showing the change in classification accuracy of the improved Transformer network model in this embodiment of the invention with the number of training iterations when trained on fault datasets of 1.0kW, 1.5kW, and 3.0kW permanent magnet synchronous motors, respectively.

[0087] Figure 11 This is a scatter plot of the T-SNE dimension reduction of various inter-turn short-circuit fault characteristics of a 1.0kW permanent magnet synchronous motor in an embodiment of the present invention.

[0088] Figure 12 This is a scatter plot of the T-SNE dimension reduction of various inter-turn short-circuit fault characteristics of a 1.5kW permanent magnet synchronous motor in an embodiment of the present invention.

[0089] Figure 13 This is a scatter plot of the T-SNE dimension reduction of various inter-turn short-circuit fault characteristics of a 3.0kW permanent magnet synchronous motor in an embodiment of the present invention.

[0090] Figure 14 This is a schematic diagram of the loss curves in the ablation experiment of this invention.

[0091] Figure 15 This is a schematic diagram of the ablation experiment training accuracy iteration curve of the present invention;

[0092] Figure 16 This is a schematic diagram showing the accuracy comparison curves of the method of the present invention with other traditional deep learning methods (1D-CNN, CNN-LSTM, 1D-ResNet);

[0093] Figure 17 This is a schematic diagram showing the comparison of training loss curves between the method of this invention and other traditional deep learning methods (1D-CNN, CNN-LSTM, 1D-ResNet);

[0094] Figure 18 This is a schematic diagram of the connection of the inter-turn short circuit fault diagnosis system for permanent magnet synchronous motor of the present invention. Detailed Implementation

[0095] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples consistent with some aspects of the invention as detailed in the appended claims.

[0096] To enable those skilled in the art to better understand the technical solutions of the present invention, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments.

[0097] Example 1

[0098] Please see Figures 1 to 17 This invention provides a method for diagnosing inter-turn short-circuit faults in permanent magnet synchronous motors, such as... Figure 1 As shown, the method includes the following steps:

[0099] Step 1, Data Acquisition: Synchronously acquire the three-phase stator current signal and body vibration acceleration signal of the permanent magnet synchronous motor to form a multi-channel one-dimensional time series.

[0100] Specifically, current sensors are installed on the power supply line of the permanent magnet synchronous motor to collect the stator current signals of phases A, B, and C. , , A vibration acceleration sensor is installed on the motor housing to collect the vibration acceleration signal of the machine body. In a preferred embodiment, the sampling frequency of the three-phase stator current signal is 10kHz, the sampling frequency of the vibration acceleration signal is 25.6kHz, and all sensors acquire data through synchronous triggering to ensure that the signals of each channel are consistent in time.

[0101] Step 2, Data Preprocessing: The acquired three-phase stator current signal and vibration acceleration signal are time-aligned by cubic spline interpolation to synchronize heterogeneous signals with different acquisition frequencies on a unified time axis; and the multi-channel one-dimensional time series is divided into several sub-sequence samples by a sliding window with fixed length and overlapping sampling.

[0102] Alignment Processing: Due to the different sampling frequencies of the current sensor and the vibration accelerometer (10kHz for the current signal and 25.6kHz for the vibration signal), to ensure strict synchronization of different modal signal data on a unified time axis and to achieve "frame alignment" of the two physical signals in terms of timestamps, it is necessary to align the three-phase current signals... Resampling to the vibration signal using cubic spline interpolation For the same sampling frequency, the upsampling frequency ratio is:

[0103]

[0104] In the formula, The upsampling frequency ratio, The sampling frequency of the three-phase stator current signal is . The sampling frequency of the vibration signal;

[0105] Cubic splines approximate the true signal using a cubic polynomial over each subinterval. , Construct the following cubic polynomial:

[0106]

[0107] Interpolation conditions are met:

[0108]

[0109] And the continuity condition of the first derivative:

[0110]

[0111] The continuity condition for the second derivative:

[0112]

[0113] Introducing the second derivative From continuity, we obtain the tridiagonal equation:

[0114]

[0115] In the formula, For the sampling time point, For sampling point index; This represents the total number of sampling points for the original current signal. The sampling time interval for the original current signal data. For the original current signal, the first The amplitude of each sampling point; solve The boundary conditions are taken from natural splines. For any target time ,make The interpolation result is:

[0116]

[0117] The three-phase stator current signals of phases A, B, and C are resampled using the cubic spline interpolation method described above. The upsampled three-phase current signals are then concatenated with the vibration acceleration signal to form the following four-channel fusion matrix:

[0118]

[0119] In the formula, Y A (t), Y B (t), Y C V(t) represents the interpolated three-phase current data of A, B, and C, and V(t) represents the vibration signal data.

[0120] Sliding window segmentation: After time alignment, the four-channel fusion matrix This constitutes a complete multi-channel one-dimensional time series, due to the total length of the series. The sequence length is much larger than that that deep learning models can directly process, so it needs to be cut into short sequence samples of fixed length.

[0121] Set window length to That is, each subsequence sample contains Data at each time step, with a sliding step size of [number] times. The overlap length between two adjacent windows is The four channels (phase A current, phase B current, phase C current, and vibration acceleration) are simultaneously segmented using sliding windows. Each window fully preserves the information from all four channels. The dimension of each subsequence sample obtained after segmentation is [dimension missing]. .

[0122] After being segmented by the sliding window, a total of Subsequence samples, and , , The relationship between them is:

[0123]

[0124] When using non-overlapping sampling, the step size ,but ,Right now .

[0125] When using overlap sampling, the step size The overlap between adjacent samples is beneficial in several ways: it preserves the temporal continuity between samples and prevents the loss of fault features due to fixed window segmentation, which may cause them to fall precisely at the window boundaries; it also expands the number of training samples. The significant increase is beneficial for the full training of deep learning models and improves their generalization ability.

[0126] In a preferred embodiment, the window length is set. sliding step size The overlap rate is 50%. Thus, the original multi-channel one-dimensional time series is divided into multiple fixed-length subsequence samples, each with a dimension of 4×1024, which can be used as independent inputs to the subsequently improved Transformer network model.

[0127] Step 3: Construct and train the improved Transformer network model.

[0128] This step first constructs an improved Transformer network model (referred to as 1D-SNN-Transformer). The classic Transformer model uses only a single linear embedding layer at the input, mapping the input sequence to the hidden dimension through a single linear transformation. This process does not include convolution operations or explicit multi-scale feature extraction. To overcome these limitations, the 1D-SNN-Transformer network model provided in this invention uses a composite projection structure consisting of multi-scale parallel one-dimensional convolutional layers and channel attention modules as the input embedding layer. The multi-scale parallel one-dimensional convolutional layers contain three convolutional branches of different sizes and one residual connection branch: the small convolutional kernel branch has high temporal local resolution, used to capture very early weak discharges and transient short-circuit spikes; the medium convolutional kernel branch is used to capture the transitional impact and damping attenuation process of mechanical vibration waves; the large convolutional kernel branch is used to capture the periodic fundamental sinusoidal envelope of the stator current, determining the operating benchmark; and the residual connection branch ensures that the original high-fidelity signal is not diluted by the deep network. The channel attention module performs global average pooling on the spatial dimensions through a "squeeze" operation, and then dynamically calculates and calibrates the weights of each physical channel through an "excitation" nonlinear mapping. This reduces the weights of useless channels containing a large amount of spurious environmental interference, and focuses on amplifying feature channels containing fault-sensitive frequency bands, achieving adaptive recalibration of features in noisy environments. Through the above composite projection structure, this invention performs multi-channel reconstruction of the traditional single-channel timing Transformer in terms of topology, enabling the Transformer, which can only process a single signal sequence, to process parallel multi-channel physical signal inputs.

[0129] Based on this, the Transformer encoder of this invention adopts a pre-LN structure, that is, the layer normalization is placed in front of the input side of the residual branch of the self-attention mechanism and the feedforward network, so that the gradient flow reaches the shallow layer directly during backpropagation, ensuring that the diagnostic network has extremely high numerical stability and convergence speed.

[0130] like Figure 2 As shown, the improved Transformer network model includes a multi-scale parallel one-dimensional convolutional layer, a channel attention module, a positional encoding injection layer, a Transformer encoder, and a classification output layer connected in sequence. The Transformer encoder adopts a pre-LN structure.

[0131] Specifically, such as Figure 3 As shown, the multi-scale parallel one-dimensional convolutional layer (Multi-Scale 1D-CNN, MSCNN) in this invention includes the following four parallel branches and subsequent processing layers:

[0132] The first convolutional branch (small convolutional kernel branch) consists of a first one-dimensional convolutional layer, a first batch of normalization layers, and a first activation function layer. The first one-dimensional convolutional layer uses a convolutional kernel of a first size (e.g., kernel size 3 or 5) to extract the spike harmonic features caused by high-frequency impulses and short circuits. When an inter-turn short circuit fault occurs, instantaneous current spikes and voltage pulses are generated within the short-circuit loop. These signal components have high frequency and short duration, and the small convolutional kernel can sensitively capture these local detail changes.

[0133] The second convolutional branch (middle convolutional kernel branch) consists of a second one-dimensional convolutional layer, a second batch normalization layer, and a second activation function layer. The second one-dimensional convolutional layer uses a convolutional kernel of a second size (e.g., kernel size 7 or 9), which is larger than the first size. It is used to extract features of the transition state impact and decay process. The receptive field of the middle convolutional kernel is moderate and can cover the complete process of fault signal from occurrence to decay.

[0134] The third convolutional branch (large convolutional kernel branch) consists of a third one-dimensional convolutional layer, a third batch normalization layer, and a third activation function layer. The third one-dimensional convolutional layer uses a third-sized convolutional kernel (e.g., kernel size 15 or 31), which is larger than the second size, and is used to extract low-frequency, long-cycle signal features from the stator. The large convolutional kernel has a large receptive field, capable of covering signal changes across multiple electrical cycles of the motor, and capturing the low-frequency fundamental component generated by the stator's rotating magnetic flux.

[0135] Residual connection branches: These are used to directly transmit the input signal to the output, allowing the input signal to bypass the convolutional layer without loss. This ensures that shallow features that may be diluted in the convolutional layer (such as the original amplitude information) can still be transmitted to subsequent networks.

[0136] The outputs of each branch are concatenated in the channel dimension by a concatenation layer (Concat), then sequentially processed by a fusion layer (Fuse_layer) for feature fusion, and finally convolved by an output convolutional layer to adjust the number of output channels, serving as the final output of the multi-scale parallel one-dimensional convolutional layer. In a preferred embodiment, the activation function layer of each convolutional branch uses the GELU activation function, which has smooth non-linear characteristics and helps to alleviate the gradient vanishing problem.

[0137] The channel attention module of this invention is a Squeeze-and-Excitation (SE) module, which includes a Squeeze operation and an Excitation operation. The Squeeze operation compresses the spatial features of each channel into a global descriptor through global average pooling. The Excitation operation learns the activation weights of each channel through a gating mechanism and adaptively recalibrates the feature channels to enhance useful features and suppress irrelevant features.

[0138] Specifically, the Squeeze operation performs global average pooling on the input feature map in the spatial dimension to generate a global descriptor vector with the same number of channels; the Excitation operation generates activation weights for each channel through two fully connected layers (first reducing the dimension and then increasing the dimension) and the Sigmoid activation function, and then multiplies the activation weights with the original feature map channel by channel to achieve adaptive recalibration of the features.

[0139] The position coding injection layer of this invention uses a sine and cosine form of position coding, and its calculation formula is as follows:

[0140]

[0141] In the formula, For dimensional indexing, For the embedded dimension; Representing positions respectively The first and the The encoding method ensures that the relative positional information between different positions can be perceived by the model, and at the same time enables the model to better handle the sequential relationships in the sequence.

[0142] The location encoding injection layer adds the location encoding to the embedding sequence output by the multi-scale parallel one-dimensional convolutional layer to obtain an input sequence with fused location information.

[0143]

[0144] In the formula, The embedded sequence is the output of a multi-scale parallel one-dimensional convolutional layer. For sine and cosine position encoding, The input sequence is the result of fusing position information. Due to the strong periodicity of the motor signal (fundamental frequency and multiple harmonics), the sine and cosine position codes are added to the embedded sequence before being input to the Transformer encoder, enabling the network model to perceive the absolute time sequence of the signal, thereby effectively utilizing the periodic characteristics of the motor rotation signal.

[0145] This invention's Transformer encoder employs a pre-layer normalization (Pre-LN) structure. The Pre-LN structure places layer normalization before the residual connections. Traditional post-layer normalization (Post-LN) Transformers exhibit severe gradient dispersion in small-sample, fixed-frequency signals, causing training accuracy to be stuck at around 80%. Pre-layer normalization ensures that the gradient flow during backpropagation reaches shallow layers directly, thereby enabling the high-dimensional attention operator to converge quickly and monotonically, eliminating diagnostic accuracy fluctuations.

[0146] Sequences containing location information The input is fed into a multi-layer Transformer encoder, and the processing procedure of the Transformer encoder is as follows:

[0147]

[0148] In the formula, For encoder layer index, This represents the total number of layers in the encoder. For the first The input of the layer encoder, For the first The high-dimensional features output by the layer encoder, and the input of the first layer encoder is the sequence encoded by the injection position.

[0149] Each layer of the Transformer encoder contains a multi-head self-attention mechanism and a feedforward neural network module.

[0150] like Figure 4 , Figure 5 As shown, the multi-head self-attention mechanism of the present invention captures diverse fault modes in different feature subspaces by running multiple attention heads in parallel, such as different fault modes in electromagnetic harmonic feature space and mechanical vibration feature space. The outputs of each attention head are concatenated and used as the output of the Transformer encoder.

[0151] The calculation of a single attention head is achieved through the following formula:

[0152]

[0153] In the formula, For querying the matrix, The key matrix, For value matrices, Scaling factor, superscript This represents the matrix transpose. For a given input sequence... First, the query matrix is ​​obtained through linear transformation. Key matrix Sum matrix ,in Learnable weight matrix; then calculate similarity score: by querying the matrix AND key matrix Multiply by the transpose and divide by the scaling factor The similarity score matrix is ​​obtained; then, the softmax function is applied to the similarity score matrix to obtain the normalized weight matrix; finally, the normalized weight matrix and the value matrix are compared. Multiplying them together yields the final self-attention representation.

[0154] In a preferred embodiment, the number of heads in the multi-head attention mechanism is set. Embedded Dimensions number of encoder layers .

[0155] The classification output layer of this invention maps the high-dimensional features output by the Transformer encoder to a probability distribution of the severity categories of inter-turn short-circuit faults. Specifically, after the high-dimensional features output by the encoder are processed by global average pooling or a fully connected layer, the probability distribution of each fault severity category is output through a Softmax activation function.

[0156] The severity of the fault is graded according to the degree of inter-turn short-circuit fault, and the calculation formula for the degree of inter-turn short-circuit fault is as follows:

[0157]

[0158] In the formula, The degree of inter-turn short circuit fault, This represents the bypass resistance value for an inter-turn short-circuit fault. This is the stator resistance value.

[0159] In a preferred embodiment (e.g., a 1.5kW motor), the severity of the fault is divided into multiple levels, such as healthy, 1.57%, 1.88%, 2.34%, 3.10%, 4.57%, 8.74%, and 16.08%, and the Softmax activation function of the classification output layer outputs the probability distribution of each level.

[0160] The subsequence samples obtained in step 2 are shuffled and divided into a training set and a validation set. Using the severity category of inter-turn short-circuit faults in permanent magnet synchronous motors as labels, the improved Transformer network model is trained using the training set, and the network model is validated using the validation set during the training process, until the network converges.

[0161] During training, the cross-entropy loss function is used as the optimization objective, and the Adam optimizer is used for parameter updates. Gradients are calculated using the backpropagation algorithm, and a Pre-LN structure ensures that the gradient flow reaches the shallow layers, achieving stable model convergence. The system monitors the accuracy curve of the validation set in real time. If the validation loss reaches a set ultra-low threshold, or the validation set classification accuracy stops increasing for 10 consecutive epochs, or the set maximum number of iterations (e.g., 100 epochs) is reached, it is considered "optimal". If the optimization result is negative, the training state is maintained, the network weights are adjusted, and forward propagation and backward differentiation continue for the next epoch. If the result is positive, the termination mechanism is triggered, the network weights with the highest validation set accuracy are saved, and the improved Transformer network model is obtained. In a preferred embodiment, the training set and validation set are divided in an 8:2 ratio, the batch size is set to 32, and the initial learning rate is set to 1×10⁻⁶. -4 The training rounds are 100.

[0162] Step 4, Fault Diagnosis Output: After processing the multi-channel one-dimensional time series of the permanent magnet synchronous motor under test in Step 2, input it into the improved Transformer network model trained in Step 3, and output the inter-turn short circuit fault diagnosis result of the permanent magnet synchronous motor.

[0163] When the output results indicate that the short circuit ratio exceeds the safety threshold, the industrial control computer issues a control command to cut off the power supply to the motor inverter and trigger the audible and visual alarm in the control room, thereby preventing the inter-turn short circuit from evolving into a more serious phase-to-phase short circuit that could burn out the motor.

[0164] Experimental verification

[0165] To verify the effectiveness of the method of this invention, this embodiment uses a publicly available ITSC fault dataset of three permanent magnet synchronous motors (PMSMs) with different rated power provided by the Korea Advanced Institute of Science and Technology (KAIST) for experimental verification. This dataset contains experimental data from three PMSMs with identical structures but different rated power (1.0kW, 1.5kW, and 3.0kW), covering normal conditions and various ITSC fault conditions. Different degrees of short circuits are simulated by short-circuiting at specific turns of the motor windings, thus achieving different fault severity levels. The fault severity classification for each motor is shown in Table 1 below, where 0.00% represents the normal state.

[0166] Table 1 Classification of Motor Fault Severity

[0167]

[0168] Figures 6 to 8 The diagrams show confusion matrices illustrating the severity classification of faults in 1.0kW, 1.5kW, and 3.0kW permanent magnet synchronous motors according to embodiments of the present invention. Figures 6 to 8 As shown, the motors of all three power levels achieved extremely high classification accuracy in each fault category.

[0169] Figure 9 and Figure 10 The figures show the curves illustrating the changes in loss function and classification accuracy with training iterations for the improved Transformer network model in this embodiment of the invention, trained on fault datasets of 1.0kW, 1.5kW, and 3.0kW permanent magnet synchronous motors, respectively. Figure 9 and Figure 10 As shown, the model converges quickly during training, the loss function decreases steadily, and the classification accuracy improves steadily.

[0170] Figures 11 to 13 These are scatter plots showing the visualization of various inter-turn short-circuit fault characteristics of 1.0kW, 1.5kW, and 3.0kW permanent magnet synchronous motors in embodiments of the present invention after dimensionality reduction using T-SNE. Figures 11 to 13 As shown, the features of different fault categories form a clear cluster distribution after dimensionality reduction, indicating that the features extracted by the model have good separability.

[0171] Figure 14 and Figure 15 The diagrams show the training loss curve and accuracy iteration training curve for the ablation experiment using the method of this invention on 1.5kW experimental group data. The complete model of this invention (1D-SNN-Transformer) combines multi-scale feature embedding and a Pre-LN structure, maintaining a classification accuracy of over 99.8% on all three types of power motors. Ablation variant I (w / o MSCNN+SE, retaining only Pre-LN): degenerates into a one-dimensional fully connected linear projection. Due to the lack of local multi-band frequency decoupling and channel weight calibration, early short-circuit high-frequency weak pulses are "flattened" by the fully connected structure in the wide attention, resulting in an accuracy drop to approximately 92%. Ablation variant II (w / o Pre-LN, retaining only MSCNN+SE): degenerates into Post-LN, with extremely slow training progress and accuracy stuck at a local optimum of around 81%. The baseline multi-channel Transformer (w / o Both): degenerates into a traditional 1D-Transformer, almost losing its ability to discriminate against extremely slight short circuits (<2%), with an overall accuracy of only about 75.8%.

[0172] Figure 16 and Figure 17 These are schematic diagrams comparing the accuracy and training loss of the method of this invention with other traditional deep learning methods (1D-CNN, CNN-LSTM, 1D-ResNet). Figure 16 and Figure 17 As shown, the method of the present invention has a faster convergence speed and a significantly better final classification accuracy than the comparative method.

[0173] Table 2. Comparison of diagnostic accuracy of various network models on different power motor datasets.

[0174]

[0175] Table 2 shows the experimental results:

[0176] (1) Effectiveness of multi-source signal fusion: On three motor datasets, the diagnostic accuracy of the current and vibration combined input scheme (Transformer-C / V) is better than that of the single current input scheme (Transformer-C). On a 1.5kW motor, the introduction of vibration signal improved the accuracy from 95.53% to 99.94%, an increase of about 4 percentage points. This proves that the present invention achieves time alignment of current and vibration signals through cubic spline interpolation and performs early fusion at the feature level, enabling the self-attention mechanism to effectively model the cross-modal coupling relationship between electrical and mechanical responses, which significantly improves the diagnostic accuracy, especially the ability to identify early and weak faults.

[0177] (2) Effectiveness of improving the Transformer network model structure: The network model (1D-SNN-Transformer-C / V) of this invention was compared with the standard Transformer (Transformer-C / V). The accuracy was improved by 0.9% to 1.72% on three datasets, respectively, which verified the effectiveness of multi-scale parallel one-dimensional convolutional layers and layer pre-normalization structure in improving diagnostic accuracy.

[0178] (3) Verification of generalization ability: The method of the present invention maintained a diagnostic accuracy of over 98% on motors with three different rated power of 1.0kW, 1.5kW and 3.0kW, with the highest reaching 99.81%, indicating that the method of the present invention has good cross-power generalization ability and engineering application prospects.

[0179] Example 2

[0180] like Figure 18As shown in the figure, this embodiment provides a fault diagnosis system for inter-turn short circuit of permanent magnet synchronous motor. The system includes: a power supply module, a motor and its drive equipment, a load, a signal acquisition module, a data acquisition and processing unit, and a control and output module.

[0181] Specifically, the power module supplies power to the entire system, providing a stable operating voltage and current. The motor and its drive unit, serving as the main components for fault detection, include the permanent magnet synchronous motor body and the motor driver. The motor driver ensures normal motor operation and responds to control commands to execute a shutdown action when a fault occurs. The load is coaxially connected to the permanent magnet synchronous motor body to simulate the actual operating load conditions of the motor.

[0182] In this embodiment of the invention, the signal acquisition module includes a current sensor installed on the motor power supply line and a vibration acceleration sensor installed on the motor housing. The current sensor is used to synchronously acquire three-phase stator current signals (phase A, phase B, and phase C), and the vibration acceleration sensor is used to synchronously acquire body vibration acceleration signals. The data acquisition and processing unit includes a data acquisition card and a processor. The data acquisition card is used to perform analog-to-digital conversion (A / D conversion) on the acquired analog signals, converting the analog signals output by the sensors into digital signals. The processor is equipped with a trained, improved Transformer network model for executing the method described in Embodiment 1. In a preferred embodiment, the processor uses an AI processor such as a GPU or NPU to accelerate the inference computation of the deep learning model, and the processor is deployed in a host computer.

[0183] In this embodiment of the invention, the control and output module is used to receive the output results of the processor and execute corresponding control actions based on the output results. The control and output module is integrated into a PC and includes a display device and an alarm device. When the inter-turn short-circuit fault level output by the processor exceeds a preset safety threshold, the control and output module cuts off the power supply to the motor inverter and triggers the alarm device.

[0184] In a preferred embodiment, the system workflow is as follows:

[0185] First, under the control of a synchronous trigger signal, the current sensor and the vibration acceleration sensor simultaneously acquire the three-phase stator current signal and vibration acceleration signal of the motor, and transmit the acquired analog signals to the data acquisition card.

[0186] Secondly, the data acquisition card performs analog-to-digital conversion on the analog signals and transmits the digitized multi-channel signals to the processor in the host computer.

[0187] Then, the processor executes the fault diagnosis method as described in Example 1: preprocessing the multi-channel signal by cubic spline interpolation time alignment and sliding window segmentation, inputting the preprocessed sub-sequence samples into the improved Transformer network model deployed in the processor for inference, and outputting the diagnostic results of the severity category of the inter-turn short circuit fault.

[0188] Finally, the control and output module receives the diagnostic results from the processor: when the diagnostic results show that the motor is in a healthy state or the fault level is below the safety threshold, the system continues to operate normally and monitor; when the diagnostic results show that the inter-turn short circuit fault level exceeds the preset safety threshold, the control and output module immediately cuts off the power supply to the motor inverter and issues an alarm through the audible and visual alarm device to prompt the operator to handle it in time.

[0189] This invention integrates data acquisition, signal processing, model inference, and control output into a single system, enabling online real-time monitoring and diagnosis of inter-turn short-circuit faults in permanent magnet synchronous motors. It boasts advantages such as high diagnostic accuracy, fast response speed, and strong robustness, and can be widely applied in health management systems for permanent magnet synchronous motors in fields such as electric vehicles, aerospace, CNC machine tools, and wind power generation.

[0190] The above description is merely a specific embodiment of the present invention, intended to enable those skilled in the art to understand and implement the present invention. Various modifications to these embodiments without creative effort will be readily apparent to those skilled in the art; the basic principles defined herein can be applied to other embodiments without departing from the spirit and scope of the present invention.

[0191] It should be understood that this invention is not limited to the specific content described above, and various equivalent modifications or substitutions can be made without departing from its scope of protection. The scope of protection of this invention is defined only by the appended claims.

Claims

1. A method for diagnosing inter-turn short-circuit faults in a permanent magnet synchronous motor, characterized in that, Includes the following steps: Step 1, Data Acquisition: Synchronously acquire the three-phase stator current signal and vibration acceleration signal of the permanent magnet synchronous motor to form a multi-channel one-dimensional time series; Step 2, Data Preprocessing: The acquired three-phase stator current signal and vibration acceleration signal are time-aligned by cubic spline interpolation to synchronize heterogeneous signals with different acquisition frequencies on a unified time axis; and the multi-channel one-dimensional time series is divided into several sub-sequence samples by a sliding window of fixed length and overlapping sampling. Step 3: Build and train the improved Transformer network model: The improved Transformer network model includes a multi-scale parallel one-dimensional convolutional layer, a channel attention module, a positional encoding injection layer, a Transformer encoder, and a classification output layer connected in sequence. The Transformer encoder adopts a layer pre-normalization structure. The sub-sequence samples obtained in step 2 are divided into training and validation sets. The sub-sequence samples in the training set are used as input to the improved Transformer network model. They are sequentially passed through the multi-scale parallel one-dimensional convolutional layer for token extraction, and the output features are mapped to the embedding dimension required by the Transformer encoder. The channel attention module performs channel feature recalibration. The position encoding injection layer fuses the position encoding with the mapped feature sequence, and then inputs it into the Transformer encoder. A multi-head self-attention mechanism is used for global dependency modeling, achieving cross-channel time-series fusion of the three-phase stator current signal and vibration acceleration signal, outputting high-dimensional features. The classification output layer maps the high-dimensional features to a probability distribution of the severity category of inter-turn short-circuit faults. Using the severity category of inter-turn short-circuit faults in permanent magnet synchronous motors as labels, the improved Transformer network model is trained using the training set, and the network model is validated using the validation set during the training process until the network converges. Step 4, Fault Diagnosis Output: After processing the multi-channel one-dimensional time series of the permanent magnet synchronous motor under test in Step 2, input it into the improved Transformer network model trained in Step 3, and output the inter-turn short circuit fault diagnosis result of the permanent magnet synchronous motor.

2. The method for diagnosing inter-turn short-circuit faults in a permanent magnet synchronous motor according to claim 1, characterized in that, Step 2, the specific process of time alignment using cubic spline interpolation includes: The sampling frequency of the three-phase stator current signal is different from the sampling frequency of the vibration acceleration signal, and the upsampling frequency ratio is: In the formula, The upsampling frequency ratio, The sampling frequency of the three-phase stator current signal is . The sampling frequency of the vibration signal; Cubic splines approximate the true signal using a cubic polynomial over each subinterval. , Construct the following cubic polynomial: Interpolation conditions are met: And the continuity condition of the first derivative: The continuity condition for the second derivative: Introducing the second derivative From continuity, we obtain the tridiagonal equation: In the formula, For the sampling time point, For sampling point index; This represents the total number of sampling points for the original current signal. The sampling time interval for the original current signal data. For the original current signal, the first The amplitude of each sampling point; solve The boundary conditions are taken from natural splines. For any target time ,make The interpolation result is: The three-phase stator current signals of phases A, B, and C are resampled using the cubic spline interpolation method described above. The upsampled three-phase current signals are then concatenated with the vibration acceleration signal to form the following four-channel fusion matrix: In the formula, , , The data are the interpolated three-phase currents of phases A, B, and C. This is vibration signal data.

3. The method for diagnosing inter-turn short-circuit faults in a permanent magnet synchronous motor according to claim 1, characterized in that, In step 3, the multi-scale parallel one-dimensional convolutional layer includes: The first convolutional branch consists of a first one-dimensional convolutional layer, a first batch of normalization layers, and a first activation function layer. The first one-dimensional convolutional layer uses a convolutional kernel of the first size to extract the peak harmonic features caused by high-frequency impacts and short circuits. The second convolutional branch consists of a second one-dimensional convolutional layer, a second batch normalization layer, and a second activation function layer. The second one-dimensional convolutional layer uses a convolutional kernel of a second size to extract features of the transition state impact and decay process. The second size is larger than the first size. The third convolutional branch consists of a third one-dimensional convolutional layer, a third batch normalization layer, and a third activation function layer. The third one-dimensional convolutional layer uses a convolutional kernel of a third size to extract the low-frequency, large-period signal features of the stator. The third size is larger than the second size. Residual connection branches are used to directly transmit the input signal to the output. The splicing layer is used to splice the outputs of the first convolutional branch, the second convolutional branch, the third convolutional branch, and the residual connection branch in the channel dimension; A fusion layer is used to perform feature fusion on the output of the splicing layer; The output convolutional layer is used to perform convolution processing on the output of the fusion layer, adjust the number of output channels, and serve as the final output of the multi-scale parallel one-dimensional convolutional layer.

4. The method for diagnosing inter-turn short-circuit faults in a permanent magnet synchronous motor according to claim 1, characterized in that, In step 3, the channel attention module is a Squeeze-and-Excitation module, which includes a Squeeze operation and an Excitation operation. The Squeeze operation compresses the spatial features of each channel into a global descriptor through global average pooling. The Excitation operation learns the activation weights of each channel through a gating mechanism and performs adaptive recalibration on the feature channels to enhance useful features and suppress irrelevant features.

5. The method for diagnosing inter-turn short-circuit faults in a permanent magnet synchronous motor according to claim 1, characterized in that, In step 3, the position coding injection layer uses sine and cosine position coding, and its calculation formula is as follows: In the formula, For dimensional indexing, For the embedded dimension; Representing positions respectively The first and the Encoding of dimensions; The location encoding injection layer adds the location encoding to the embedding sequence output by the multi-scale parallel one-dimensional convolutional layer to obtain an input sequence with fused location information.

6. The method for diagnosing inter-turn short-circuit faults in a permanent magnet synchronous motor according to claim 1, characterized in that, In step 3, the processing procedure of the Transformer encoder is represented as follows: In the formula, For encoder layer index, This represents the total number of layers in the encoder. For the first The input of the layer encoder, For the first The high-dimensional features output by the layer encoder, and the input of the first layer encoder is the sequence after injection position encoding; Each layer of the Transformer encoder contains a multi-head self-attention mechanism and a feedforward neural network module.

7. The method for diagnosing inter-turn short-circuit faults in a permanent magnet synchronous motor according to claim 6, characterized in that, The multi-head self-attention mechanism captures diverse fault modes in different feature subspaces by running multiple attention heads in parallel. The outputs of each attention head are concatenated and used as the output of the Transformer encoder. The calculation of a single attention head is achieved using the following formula: In the formula, For querying the matrix, The key matrix, For value matrices, Scaling factor, superscript This indicates the matrix transpose.

8. The method for diagnosing inter-turn short-circuit faults in a permanent magnet synchronous motor according to claim 1, characterized in that, In step 3, the severity of the fault is classified according to the degree of inter-turn short-circuit fault. The classification output layer uses the Softmax activation function, and the formula for calculating the degree of inter-turn short-circuit fault is as follows: In the formula, The degree of inter-turn short circuit fault, This represents the bypass resistance value for an inter-turn short-circuit fault. This is the stator resistance value.

9. A fault diagnosis system for inter-turn short circuits in a permanent magnet synchronous motor, characterized in that, include: The power module is used to supply power to the system; Motors and their drive equipment serve as the main components for fault detection; The signal acquisition module includes a current sensor installed on the motor power supply line and a vibration acceleration sensor installed on the motor housing, which are used to synchronously acquire three-phase stator current signals and vibration acceleration signals, respectively. A data acquisition and processing unit includes a data acquisition card and a processor. The data acquisition card is used to perform analog-to-digital conversion on the acquired signals, and the processor is used to execute the method as described in any one of claims 1 to 8. The processor is equipped with the improved Transformer network model. The control and output module is used to receive the output results of the processor and execute corresponding control actions based on the output results.

10. The inter-turn short-circuit fault diagnosis system for permanent magnet synchronous motors according to claim 9, characterized in that, The control and output module includes a display device and an alarm device; when the degree of inter-turn short circuit fault output by the processor exceeds a preset safety threshold, the control and output module cuts off the power supply to the motor inverter and triggers the alarm device.