A permanent magnet synchronous motor control method based on clustering enhanced multi-scale convolution-long short-term memory network
By employing a multi-scale convolutional-long short-term memory network (CE-MCNN-LSTM) control method enhanced by operating condition clustering, combined with a traditional speed loop PI controller, the dynamic response and steady-state control problems of PMSM under multiple speeds, multiple loads, and strong disturbances were solved, achieving better dynamic response and disturbance rejection performance.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-04-29
- Publication Date
- 2026-07-21
AI Technical Summary
Existing PMSM drive systems struggle to simultaneously achieve dynamic response speed, steady-state accuracy, and disturbance rejection performance under multiple speeds, multiple loads, and strong disturbances.
A multi-scale convolutional long short-term memory network (CE-MCNN-LSTM) control method based on working condition clustering enhancement is adopted. By extracting working condition features, performing cluster analysis, extracting multi-scale convolutional features, and performing time series modeling, a working condition distance vector is constructed. Combined with a traditional velocity loop PI controller, a control compensation quantity is generated to improve dynamic response performance and steady-state control accuracy.
The PMSM has improved dynamic response performance, steady-state control accuracy and disturbance rejection capability under complex operating conditions, exhibiting smaller speed drop and faster recovery process, as well as smoother electromagnetic torque response.
Smart Images

Figure FT_1 
Figure FT_2 
Figure FT_3
Abstract
Description
Technical Field
[0001] This invention belongs to the field of permanent magnet synchronous motor (PMSM) control technology, specifically relating to a PMSM control method based on clustering-enhanced multi-scale convolutional-long short-term memory network (CE-MCNN-LSTM). Background Technology
[0002] PMSMs, due to their advantages of high power density, high efficiency, wide speed range, and good dynamic performance, have been widely used in new energy vehicles, industrial servo systems, and high-performance electric drive systems. Existing PMSM drive systems mostly employ a vector control framework based on field-oriented control, using PI controllers for regulation. However, under complex operating conditions such as multiple speeds, multiple loads, and strong disturbances, traditional control methods struggle to simultaneously achieve fast dynamic response, steady-state accuracy, and disturbance rejection performance. In recent years, data-driven methods such as convolutional neural networks and long short-term memory networks have been increasingly applied to PMSM control; however, the utilization of differences in data distribution under different operating conditions remains insufficient, and research on the direct mapping of control compensation quantities under multiple operating conditions is still limited. Therefore, it is necessary to propose a PMSM control method capable of characterizing differences across multiple operating conditions while also considering local dynamic feature extraction and time-dependent modeling capabilities. Summary of the Invention
[0003] This invention proposes a PMSM control method based on CE-MCNN-LSTM, consisting of a working condition clustering enhancement network and a traditional speed loop PI controller. The working condition clustering enhancement network includes working condition feature construction, K-means clustering analysis, multi-scale convolutional feature extraction, and long short-term memory network time-series modeling. This method extracts features from the speed, d-axis current, and q-axis current signals during PMSM operation to construct a working condition feature vector. It then uses K-means clustering to obtain multiple typical working condition centers and constructs a working condition distance vector based on the distance between the current sample and each cluster center. The time-series input composed of signals is fed into the multi-scale convolutional-long short-term memory network, and the control compensation amount is output in conjunction with the working condition distance vector. Finally, the control compensation amount is superimposed with the output of the speed loop PI controller and, after saturation constraints, generates the final control input, thereby improving the dynamic response performance, steady-state control accuracy, and disturbance rejection capability of the PMSM under complex working conditions.
[0004] The operating condition feature vector includes the speed signal, d-axis current signal, and q-axis current signal within the sliding time window. The mean, standard deviation, and fluctuation coefficient within the input sample include frequency domain features extracted from the current signal; the operating condition feature vector is used to characterize the operating state corresponding to the current input sample.
[0005] Before performing K-means clustering, the working condition feature vector is normalized. K-means clustering uses the squared Euclidean distance between the sample and the cluster center as the metric, and determines the number of clusters by comparing the changing trend of the sum of squared errors within the cluster (SSE) under different numbers of clusters. The constructed working condition distance vector is used to characterize the degree of proximity between the current input sample and each typical working condition.
[0006] MCNN consists of three parallel one-dimensional convolutional branches with kernel lengths of 3, 5, and 7 respectively, and a stride of 1 for each branch. The same length padding is used to ensure that the output length of each branch is consistent in the time dimension. The outputs of each convolutional branch are concatenated in the channel dimension and then fused and compressed by a one-dimensional convolution with a kernel length of 1 to obtain the output features of MCNN.
[0007] The output features of MCNN are concatenated with the working condition distance vector to form a fused feature sequence, which is then input into an LSTM network. The LSTM network recursively models the fused feature sequence through a forget gate, an input gate, and an output gate, and maps the hidden state at the last moment to a control compensation quantity through a fully connected output layer. This is then fused with the output of the speed loop PI controller to form the final control input.
[0008] Compared with the prior art, the present invention has the following beneficial effects: by introducing operating condition clustering information and constructing operating condition distance vectors, the differences between different operating states are represented; by combining MCNN and LSTM, joint modeling of local dynamic features and time-dependent features is achieved; by fusing control compensation quantity with speed loop PI output, the speed tracking performance, disturbance recovery capability and torque fluctuation suppression capability of PMSM under multiple operating conditions such as no-load, load change and continuous load are improved. Attached Figure Description
[0009] Figure 1 This is a schematic diagram of the MCNN-LSTM fusion structure for working condition perception in this invention.
[0010] Figure 2 This is a diagram of the overall framework of cluster-enhanced MCNN-LSTM composite control in this invention.
[0011] Figure 3 The speed response curves of different control methods under the conditions of sudden addition of 10 N·m at 0.4 s and sudden removal of 10 N·m load at 0.6 s are shown.
[0012] Figure 4 The electromagnetic torque response curves are shown for different control methods under the conditions of a sudden application of 10 N·m of load at 0.4 s and a sudden removal of 10 N·m of load at 0.6 s. Detailed Implementation
[0013] The specific embodiments of the present invention will be further described below with reference to the accompanying drawings. Those skilled in the art should understand that various modifications or equivalent substitutions can be made to the specific embodiments of the present invention without departing from the spirit and essence of the invention, and all such modifications or substitutions should fall within the protection scope of the present invention.
[0014] like Figure 1 As shown, the output features of MCNN are concatenated with the operating condition distance vector to form a fused feature sequence, which is then input into the LSTM network. The LSTM network learns the temporal evolution of the control process under different operating conditions through recursive modeling, and maps the hidden state at the last moment to the control compensation quantity through the fully connected output layer.
[0015] like Figure 2 As shown, the present invention proposes a PMSM composite control method based on CE-MCNN–LSTM, which includes a working condition feature extraction module, a cluster analysis module, a multi-scale feature extraction module, a time series modeling module, a control compensation output module, and a traditional speed loop PI controller.
[0016] In this embodiment, the rotational speed signal, d-axis current signal, and q-axis current signal are first acquired during PMSM operation, and a time-series input sequence is constructed. To improve the model's ability to represent differences in operating conditions, a sequence with a length of [missing information] is used. A sliding time window is used to extract statistical features such as mean, standard deviation, and fluctuation coefficient from the signal, and further extract the frequency domain features of the current signal to form a working condition feature vector. The operating condition characteristics are not directly composed of instantaneous sampled values at a single moment, but rather are window-level operating state descriptions extracted by a sliding time window.
[0017] After obtaining the operating condition feature vector, the features of each dimension are normalized, and then the K-means algorithm is used to perform unsupervised classification on the operating condition feature vector. The number of clusters is determined by the elbow method, that is, comparing the changing trend of the sum of squared errors within clusters under different numbers of clusters, and selecting the final number of clusters based on the separability of the clustering results. For the current sample, an operating condition distance vector is constructed based on the distance between its operating condition feature vector and each cluster center, which serves as the conditional information input for the subsequent neural network. The operating condition distance vector is defined as: ,in, for The working condition feature vector corresponding to each input sample; For the first Cluster centers; It is used to characterize the degree of similarity between the current input sample and each typical operating condition.
[0018] In this embodiment, MCNN includes three parallel one-dimensional convolutional branches with kernel lengths of 3, 5, and 7, respectively, and a stride of 1 for each branch. Padding of the same length is used to maintain consistent output length across the time dimension. Each convolutional branch performs a one-dimensional convolution operation on the input temporal signal to obtain local features at different scales. Subsequently, the outputs of each branch are concatenated along the channel dimension, and then fused and compressed using a one-dimensional convolution with a kernel length of 1 to obtain the MCNN output features. ,in, and These represent the weights and bias parameters of the convolutional layer, respectively.
[0019] In this embodiment, the operating condition distance vector is used as the condition information input network; the MCNN output features are concatenated with the operating condition distance vector to form a fused feature sequence, which is then input into the LSTM network for recursive modeling to obtain the control compensation quantity; the control compensation quantity is superimposed on the output of the traditional speed loop PI controller, and after saturation constraint, the final control input is obtained. The fused time-series input is defined as: ,in, For the first Characteristics at any given moment. The control compensation quantity is defined as: ,in, The hidden state at the last moment of the LSTM; This represents the control compensation amount output by the model; and These are the output layer weights and biases, respectively. The final control input is defined as: ,in, This indicates that the traditional speed loop PI controller is at time... The output; This represents the control compensation amount generated by the CE-MCNN–LSTM model; This represents a saturation constraint function, avoiding problems such as control saturation, increased oscillation, or practical unrealizability caused by excessively large compensation commands; This indicates the final control input.
[0020] In one embodiment, the model is implemented using an offline training and online deployment approach. During the offline training phase, data collected by the PMSM under typical operating conditions such as no-load, sudden load changes, and continuous load are used to train the model. During the online control phase, the trained model is used to generate control compensation quantities in real time.
[0021] In one embodiment, the main parameters of the permanent magnet synchronous motor can be set as: d-axis inductance. The q-axis inductance is 1.597 mH. The stator resistance is 2.059 mH. 0.12 Ω, number of pole pairs The permanent magnet flux is 4. The moment of inertia is 0.176 Wb. The viscous damping coefficient is 0.02 kg·m². The value is 0.002 N·m·s / rad, and the reference speed can be set to 1000 r / min.
[0022] like Figure 3 and Figure 4 As shown, under the conditions of a sudden increase of 10 N·m in 0.4 s and a sudden decrease of 10 N·m in 0.6 s, the proposed method exhibits a smaller speed drop, a faster recovery process, and a smoother electromagnetic torque response, indicating that the method can improve the disturbance rejection performance and dynamic control quality of PMSM under sudden load conditions.
[0023] The above embodiments are for illustrative purposes only and are not intended to limit the scope of the invention. Various modifications and improvements made by those skilled in the art without departing from the spirit and scope defined by the claims should fall within the protection scope of the invention.
Claims
1. A control method for permanent magnet synchronous motors (PMSMs) based on clustering-enhanced multi-scale convolutional-long short-term memory networks (CE-MCNN-LSTM), characterized in that, Includes the following steps: S1: Acquire the speed signal, d-axis current signal and q-axis current signal during PMSM operation, and construct the corresponding timing input sequence; S2: Based on a length of Using a sliding time window, statistical and frequency domain features are extracted from the above signals to construct a working condition feature vector, wherein the statistical features include at least the mean, standard deviation, and fluctuation coefficient. S3: Perform K-means clustering on the working condition feature vector obtained in step S2 to obtain the cluster centers, and construct the working condition distance vector based on the distance between the working condition feature vector corresponding to the current sample and each cluster center. S4: Input the temporal input sequence obtained in step S1 into a multi-scale convolutional neural network (MCNN) to extract multi-scale local dynamic features. The MCNN includes three parallel one-dimensional convolutional branches with kernel lengths of 3, 5, and 7 respectively, and a stride of 1 for each branch. The same length padding method is used to ensure that the output length of each branch is consistent in the time dimension. After the outputs of each convolutional branch are concatenated in the channel dimension, they are fused and channel compressed by a one-dimensional convolution with a kernel length of 1 to obtain the MCNN output features. S5: The MCNN output features obtained in step S4 are concatenated with the working condition distance vector obtained in step S3 to form a fused feature sequence, and then input into a Long Short-Term Memory (LSTM) network for recursive modeling and output control compensation amount. The LSTM network recursively models the fused feature sequence through forget gate, input gate and output gate, and maps the hidden state at the last moment to the control compensation amount through a fully connected output layer. S6: The control compensation output from step S5 is superimposed with the output of the traditional speed loop PI controller, and the amplitude is limited by the saturation constraint function to obtain the final control input; Among them, the working condition distance vector in step S3 The expression is: , in, for The working condition feature vector corresponding to each input sample; For the first Cluster centers; Used to characterize the degree of similarity between the current input sample and various typical operating conditions; The fused timing input in step S5 is defined as follows: , in, For the first Characteristics of a moment; The control compensation amount in step S5 is defined as follows: , in, The hidden state at the last moment of the LSTM; This represents the control compensation amount output by the model; and These are the output layer weights and biases, respectively. The final control input in step S6 is defined as follows: , in, This indicates that the traditional speed loop PI controller is at time... The output; This represents the control compensation amount generated by the CE-MCNN–LSTM model; This represents a saturation constraint function, avoiding problems such as control saturation, increased oscillation, or practical unrealizability caused by excessively large compensation commands; This indicates the final control input.