Motor parameter online identification method based on attention-gru

CN122740686APending Publication Date: 2026-09-11QUANZHOU INST OF EQUIP MFG +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611224683.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-13
Publication Date
2026-09-11

AI Technical Summary

Technical Problem

[0006]常规神经网络辨识方法,将各个时刻的输入视为独立同分布样本,完全忽略了电机参数因热惯性、磁状态变化所呈现的时序连续性,从而导致辨识结果波动大、出现毛刺和跳变,不够平滑

Benefits of technology

[0015] With the above structure, the present invention has the following beneficial effects: A single-layer gated recurrent unit (GRU) is used to extract features from the timing data of motor operation. An attention mechanism is embedded at the output of the GRU to focus on the weighting of hidden states at different time steps within the sliding time window. This allows short-term information rich in key dynamic features to receive higher weight, effectively avoiding the dilution of key features by low-value steady-state information, and ultimately achieving high-precision online identification of motor parameters. Compared with existing technologies, this method fully utilizes the temporal continuity of motor parameter changes while automatically focusing on key dynamic features, suppressing fluctuations and jumps in identification results, improving identification accuracy and dynamic tracking capability. It can provide accurate parameter support for high-precision vector control of permanent magnet synchronous motors, effectively improving the dynamic and static performance of the control system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122740686A_ABST
    Figure CN122740686A_ABST
Patent Text Reader

Abstract

This invention discloses an online method for identifying motor parameters based on Attention-GRU. First, the parameters of a permanent magnet synchronous motor are acquired. Then, parameter identification is performed based on an Attention-GRU network model. Specifically, a sliding time window is established, and the input features at each time step within the sliding time window are defined according to each parameter. Next, the hidden states corresponding to each input feature are calculated in the GRU, outputting a complete temporal feature sequence. Then, an attention mechanism is embedded at the output of the GRU, and the complete temporal feature sequence is processed using the attention mechanism to obtain a context vector that integrates features from all time steps. c Then output from GRU c The parameters are mapped to physical parameters and then restored to their corresponding values. This method utilizes the temporal continuity of motor parameter changes to automatically focus on key dynamic features, suppress fluctuations and jumps in the identification results, and improve identification accuracy and dynamic tracking capability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of motor control, and more specifically to an online motor parameter identification method based on Attention-GRU. Background Technology

[0002] Permanent magnet synchronous motors (PMSMs) are widely used in new energy vehicles, industrial servo systems, and high-end CNC machine tools due to their advantages such as high power density and high efficiency. To achieve high-precision vector control and field weakening speed regulation, it is crucial to identify the motor's core parameters (such as stator resistance, dq-axis inductance, and rotor flux linkage) in real time and accurately. The accuracy of these parameters directly determines the dynamic and static performance and efficiency of the control system.

[0003] In the existing technology, online identification of motor parameters mainly adopts two types of methods: identification methods based on traditional mathematical models and identification methods based on data-driven neural networks. However, these two types of identification methods have the following problems.

[0004] First, identification methods based on traditional mathematical models, such as Extended Kalman Filter (EKF) and Model Reference Adaptive System (MRAS), are highly dependent on initial parameters. Tuning the covariance matrix or adaptive gain is extremely difficult, and the generalization ability is poor under all operating conditions.

[0005] Second, data-driven neural network identification methods are divided into conventional neural network identification methods (such as BP) and ordinary recurrent neural network identification methods (such as RNN, GRU, LSTM).

[0006] Conventional neural network identification methods treat the input at each time step as independent and identically distributed samples, completely ignoring the temporal continuity of motor parameters due to changes in thermal inertia and magnetic state. This results in large fluctuations, spikes, and jumps in the identification results, making them less smooth.

[0007] While conventional recurrent neural network (RNN, GRU, LSTM) has the ability to model time series, it usually only takes the hidden state of the last time step for output, or treats all time steps the same. However, in actual operation of permanent magnet synchronous motors, the information in the stable constant speed and constant load stage is redundant and of low value, while the brief high-frequency dynamic stage is the richest in the key dynamic features required for parameter identification. Therefore, conventional recurrent neural networks cannot explicitly distinguish the importance of information at different times. A large amount of steady-state low-value information dilutes the key dynamic features, limiting the further improvement of identification accuracy and dynamic tracking capability.

[0008] In view of this, this application has conducted in-depth research on this basis, resulting in this case. Summary of the Invention

[0009] The purpose of this invention is to provide an online identification method for motor parameters based on Attention-GRU, which can fully mine key dynamic information of permanent magnet synchronous motor operation and identify it online with high accuracy, thereby enhancing robustness and steady-state control accuracy.

[0010] To achieve the above objectives, the solution of the present invention is: an online motor parameter identification method based on Attention-GRU, comprising the following steps: Step 1: Obtain the parameters; obtain the permanent magnet synchronous motor in the synchronous rotating coordinate system. , , as well as ,in, The first One cycle d , q Shaft current sampling value, The first -1 cycle d , q Shaft stator voltage sampling value, For the first Rotor mechanical angular velocity per cycle; Step 2: Parameter identification of the Attention-GRU network model; First, a sliding time window is established, and the input features at each moment in the sliding time window are defined according to the parameters described in step 1. Then, each input feature is used in a gated recurrent unit to calculate the corresponding hidden state time-by-time using a gating mechanism calculation formula to output a complete time-series feature sequence. Then, an attention mechanism is embedded at the output of the gated recurrent unit to process the complete time-series feature sequence. The processing procedure is as follows: first, the importance score of each hidden state in the complete time-series feature sequence is calculated, and then each importance score is converted into a probability distribution that sums to 1 to obtain the attention weight of each time step. Then, the attention weights of all hidden states are weighted and summed to obtain a context vector that integrates the features of all time steps. Then, the context vector output by the gated recurrent unit is mapped to physical parameters, and then the physical parameters are restored to stator resistance. , Shaft inductor , Shaft inductor and rotor flux .

[0011] In step 1, the three-phase current and rotor mechanical angular velocity of the permanent magnet synchronous motor are collected in real time, and then... Clarke / Park Transformation dq Rotating coordinate system , as well as .

[0012] Step 2 includes the following steps; Step 2-1: Establish the sliding time window, wherein the sliding time window is: In the formula, = To input them sequentially in chronological order. = ... k , For the current moment, Let the length be ; where the input feature at each time step is defined as: Then, all the input features are subjected to online Min-Max normalization and mapped to [-1,1]. Step 2-2: Input each of the normalized input features in the sliding time window is sequentially input into a single-layer gated recurrent unit. The hidden state corresponding to each input feature is calculated using the gating mechanism calculation formula, so that the gated recurrent unit obtains and outputs the complete temporal feature sequence. The gating mechanism calculation formula is as follows: , , , ; In the formula, This is the current iteration time step for processing the gated cyclic unit sequence, and its value is... ; For the first The reset gate output vector of the time step is used to control the proportion of previous hidden state information retained; Use the Sigmoid activation function to implement the soft-switching logic of the gate; , Both are trainable weight matrices for the reset gate, respectively, for the input of the current iteration time step. and the preceding hidden state Perform a linear transformation; It is a trainable bias vector; For the first Input features at each time step; For the first The update gate output vector at each time step is used to balance the retention ratio of previous hidden states with the update ratio of current new information. , Both are trainable weight matrices for updating the gate; For the first The hidden state of a time step; For the first The candidate hidden state vectors at each time step are combined with the current input and the historical information after the reset to generate new features; , All are trainable weight matrices for candidate hidden states; For Hadamard product operations, implement historical state filtering under reset gating; For the first The hidden state vector of the gated recurrent unit at each time step is used to achieve a weighted fusion of the previous historical state and the current candidate state by updating the weight allocation of the gate, thus obtaining the temporal context features.

[0013] Steps 2-3: An attention mechanism is embedded at the output of the gated recurrent unit. This attention mechanism automatically focuses on the time step of the identification parameters to obtain a context vector that integrates features from all time steps. The calculation formula for the attention mechanism is as follows: ), , ; In the formula, For the current time step Importance score of the lower hidden state. The hyperbolic tangent activation function is used. For trainable parameters of MLP, This is the transpose of the trainable weight vector. Attention weights for each time step; This is a time-series traversal index, and its value range is... Integers between; For the gated loop unit in the first... The hidden states output at each time step For the first time window within the sliding time window The importance score of the hidden state corresponding to each time step; This is the result obtained after normalization using the Softmax function, representing the first [unit / time] within the sliding time window. Adaptive attention weight index for each time step; This is a context vector that incorporates features from all time steps.

[0014] Steps 2-4: In the fully connected layer network, the context vector c output by the attention mechanism is mapped into physical parameters using a calculation formula to obtain the recognition parameters. The calculation formula is as follows: ; In the formula, and These are the parameters of the trainable fully connected layer. For stator resistance, for Shaft inductor, for Shaft inductance and For rotor flux linkage.

[0015] With the above structure, the present invention has the following beneficial effects: A single-layer gated recurrent unit (GRU) is used to extract features from the timing data of motor operation. An attention mechanism is embedded at the output of the GRU to focus on the weighting of hidden states at different time steps within the sliding time window. This allows short-term information rich in key dynamic features to receive higher weight, effectively avoiding the dilution of key features by low-value steady-state information, and ultimately achieving high-precision online identification of motor parameters. Compared with existing technologies, this method fully utilizes the temporal continuity of motor parameter changes while automatically focusing on key dynamic features, suppressing fluctuations and jumps in identification results, improving identification accuracy and dynamic tracking capability. It can provide accurate parameter support for high-precision vector control of permanent magnet synchronous motors, effectively improving the dynamic and static performance of the control system. Attached Figure Description

[0016] Figure 1 This is a circuit topology diagram of the permanent magnet synchronous motor and inverter in this invention.

[0017] Figure 2 This is a block diagram of the predicted current control based on the Attention-GRU network model in this invention.

[0018] Figure 3 This is a schematic diagram of the Attention-GRU network model in this invention. Detailed Implementation

[0019] To further explain the technical solution of the present invention, the present invention will be described in detail below through specific embodiments.

[0020] An online identification method for motor parameters based on Attention-GRU is proposed. This method is based on the common control system of permanent magnet synchronous motors, and the permanent magnet synchronous motor can be an embedded permanent magnet synchronous motor.

[0021] like Figure 1 As shown, the control system includes an inverter, which is a conventional two-level three-phase inverter. The inverter includes three phase arms, which correspond to the following... Mutually, Harmony Each phase has two switching transistors, and the two switching transistors in each phase arm are located in the upper and lower arms respectively. For example: upper arm and lower bridge arm The on and off states of the switching transistors are represented by binary numbers "1" and "0" respectively. During operation, in order to prevent short circuits from burning out the inverter, the two switching transistors in each phase arm cannot be turned on at the same time.

[0022] Furthermore, the aforementioned permanent magnet synchronous motor serves as the output load of the inverter. The formula for calculating the input vector (i.e., the input voltage vector) in this inverter is as follows: In the formula, For output voltage, DC voltage , and In the inverter Mutually, Harmony The switching state of the upper bridge arm switch transistor. The imaginary unit, is the base of the natural logarithm in complex form; =0、 =0 and =0 represents the inverter's... Mutually, Harmony The upper bridge arm switch is turned off, and the lower bridge arm switch is turned on; =1、 =1 and =1 represents the inverter's... Mutually, Harmony The upper bridge arm switch is turned on, and the lower bridge arm switch is turned off.

[0023] Therefore, based on the switching states of the upper arm switches of the three phases in the inverter, a three-bit binary number is obtained. ,For example , In this embodiment, there are eight input vectors, numbered... =1~8 indicates that control input is used. As input vector, This represents the current state of the switch; for example, when... When, it indicates the upper bridge arm Switch cut off, upper bridge arm and All switching transistors are turned on; simultaneously, the switching transistors of each lower bridge arm are in the opposite state, i.e., the lower bridge arm... The switch is turned on, and the lower bridge arm is activated. and The switching transistor is off.

[0024] To elaborate further, such as Figure 2 As shown, the control system described above uses a conventional current prediction method, which includes the following steps.

[0025] Step S1-1, based on dq The mathematical model of the permanent magnet synchronous motor is established in the axis rotating coordinate system as follows: , , ; In the formula, v d , v q They are respectively dq Stator voltage in axial coordinate system i d , i q They are respectively dq Stator current in axial coordinate system This refers to the stator resistance of a permanent magnet synchronous motor. , It is the stator flux linkage. d Axial components, It is a permanent magnet flux linkage. For electromagnetic torque, , These are the stator inductors. d Axial components, This refers to the rotor mechanical angular velocity of the permanent magnet synchronous motor. θ For the rotor mechanical angle of the permanent magnet synchronous motor, This represents the number of pole pairs in a permanent magnet synchronous motor.

[0026] Step S1-2: Discretize the mathematical model using forward Euler discretization, i.e. Then, by simplification, we obtain the permanent magnet synchronous motor in... dq The formula for current prediction in the axial coordinate system is as follows.

[0027] , ; In the formula, Indicates the first In each sampling period d , q Predicted shaft current value Indicates the first One cycle d ,q Shaft current sampling value, This is the time interval of the sampling period.

[0028] Furthermore, in the current prediction formula, , The calculation process is as follows: Based on the relationship between the inverter's switching state and the three-phase voltage of the permanent magnet synchronous motor, the three-phase voltage is obtained, and then... Clarke Transformation and Park Transformation from three-phase voltage abc Transformation to three-phase natural coordinate system dq In a two-phase synchronous rotating coordinate system.

[0029] To elaborate, the relationship between the switching state of the inverter and the three-phase voltage is as follows: , , In the formula, , , They represent Phase voltage, Phase voltage, Phase voltage.

[0030] in, Clarke Transformed into: In the formula, , They are respectively Stator voltage in axial coordinate system.

[0031] Park Transformed into: In the formula, , They are respectively dq Stator voltage in axial coordinate system θ This refers to the rotor mechanical angle of the permanent magnet synchronous motor.

[0032] Step S1-3: Construct the cost function for model predictive control. The cost function is as follows: , In the formula, λ As weighting parameters, to balance dq The magnitude difference between the currents of the two axes.

[0033] It is worth mentioning that, in this embodiment, based on Control strategy and torque reference value You can get The reference value (i.e.) It is 0.

[0034] Furthermore, the online motor parameter identification method based on Attention-GRU of this invention outputs the identification parameter, namely the stator resistance, online in each control cycle. , d Shaft inductor , q Shaft inductor and permanent magnet flux The identified parameters output online are injected into step S1-1 of the current prediction method described above in real time, thereby realizing the adaptive adjustment of control parameters, improving the performance degradation problem of traditional model predictive control when motor parameters drift, and realizing adaptive robust model predictive control.

[0035] This embodiment presents an online motor parameter identification method based on Attention-GRU. The specific process is as follows: First, obtain the permanent magnet synchronous motor parameters in the synchronous rotating coordinate system. , as well as ,in, The first One cycle d , q Shaft current sampling value, The first -1 cycle d , q Shaft stator voltage sampling value, For the first Rotor mechanical angular velocity per cycle.

[0036] Then, a sliding time window is established, and the input features at each time step within the sliding time window are defined according to the parameters mentioned above. Next, each input feature is used in a single-layer gated recurrent unit (GRU) to calculate the corresponding hidden state time-by-time using a gating mechanism, outputting a complete temporal feature sequence. Then, an attention mechanism is embedded at the output of the single-layer GRU to process the complete temporal feature sequence. The processing involves: first, calculating the importance score of each hidden state in the complete temporal feature sequence; then, converting each importance score into a probability distribution summing to 1 to obtain the attention weight for each time step; then, weighted summing of the attention weights of all hidden states to obtain a context vector that integrates features from all time steps; finally, mapping the context vector output by the single-layer GRU to physical parameters, and then restoring the physical parameters to stator resistance. , d Shaft inductor , q Shaft inductor and permanent magnet flux .

[0037] Specifically, such as Figures 2-3As shown, the online identification method for motor parameters includes the following steps.

[0038] Step 1: Use a current sensor to collect the three-phase current of the permanent magnet synchronous motor in real time, and use an encoder to collect the rotor mechanical angular velocity of the permanent magnet synchronous motor. Then through Clarke / Park Transformation dq Rotating coordinate system , as well as .

[0039] To elaborate, the above The inverter switching command is obtained from the optimal voltage vector of the previous cycle in the current predictive control.

[0040] Furthermore, the aforementioned current sensor and encoder are commercially available current sensors and encoders, respectively. The current sensor and encoder are installed on the permanent magnet synchronous motor to collect the corresponding parameters, which is a standard operation and will not be described in detail here.

[0041] Step 2: Use the Attention-GRU network model for parameter identification, which includes the following steps.

[0042] Step 2-1: Create a sliding time window.

[0043] To capture the temporal dynamics of the parameters, a sliding time window is established. The sliding time window is: In the formula, = for , = ... k ; Let be the length; where the input feature at each time step is defined as: Then, all input features are processed online using Min-Max normalization and mapped to [-1,1] to eliminate the influence of different physical dimensions (current, voltage, and rotational speed have large differences in numerical range).

[0044] It is worth mentioning that the reason for mapping to the [-1,1] interval in this embodiment is to correspond with the internal structure of the single-layer GRU (i.e., the single-layer GRU temporal feature extraction layer) described below. The activation function achieves seamless numerical domain matching, ensuring that the input features and hidden state features are centrally symmetrically distributed. This maximizes the gradient gain in the early stages of network training, eliminates the risk of gradient vanishing under dynamic excitation, and significantly improves the generalization tracking accuracy of the network under complex conditions.

[0045] Furthermore, in order to consider the real-time performance issues in embedded devices, this embodiment... It is set to 3. It should be noted that... The value can be set according to the actual situation and needs, and is not limited to the values ​​mentioned above.

[0046] Furthermore, in this embodiment, the voltage uses the command value from the previous cycle to ensure that the causal relationship provides the GRU with richer operating condition characteristics.

[0047] Step 2-2: Single-layer GRU temporal feature extraction.

[0048] The normalized sliding time window from step 2-1 The input features at each time step are sequentially fed into a single-layer GRU. Then, a gating mechanism is used to calculate the hidden state corresponding to each input feature, thus obtaining the complete temporal feature sequence. The gating mechanism calculation formula is as follows: (1), (2), (3), (4); In formula (1), This is the current iteration time step for processing the gated cyclic unit sequence, and its value is... ; For the first The reset gate output vector of the time step is used to control the proportion of previous hidden state information retained; Use a Sigmoid activation function to implement the soft-switching logic of the gate; , Both are trainable weight matrices for the reset gate, respectively, for the input of the current iteration time step. and the preceding hidden state Perform a linear transformation; It is a trainable bias vector; For the first Input features at time steps.

[0049] In formula (2), For the first The update gate output vector at each time step is used to balance the retention ratio of previous hidden states with the update ratio of current new information. , Both are trainable weight matrices for updating the gate; For the first The hidden state of a time step.

[0050] In formula (3), For the first The candidate hidden state vectors at each time step are combined with the current input and the historical information after the reset to generate new features; , All are trainable weight matrices for candidate hidden states; This is used for Hadamard product operations to filter historical states under a reset gating system.

[0051] In formula (4) For the first The hidden state vector of the gated recurrent unit at each time step is used to achieve a weighted fusion of the previous historical state and the current candidate state by updating the weight allocation of the gate, thus obtaining the temporal context features.

[0052] Steps 2-3: Adaptively focus on the time step of the identification parameters using an attention mechanism.

[0053] The complete temporal feature sequence is output through the single-layer GRU in step 2-2, and then a context vector that fuses features from all time steps is obtained using the attention calculation formula in the attention mechanism. The formula for calculating the attention mechanism is as follows: (5), (6), (7); In the formula, For the current time step The importance score of the lower hidden state, its absolute value directly reflects the current time step. The key contribution of electromagnetic characteristics to motor parameter identification; The hyperbolic tangent activation function is used. For trainable parameters of MLP, This is the transpose of the trainable weight vector. Attention weights for each time step.

[0054] in, This is a time-series traversal index, and its value range is... An integer between [0, 1] and [0, 2] is used to iterate through each discrete sampling moment within the sliding time window; For a single-layer GRU in the first... The hidden states output at each time step For the first time window within the sliding time window The importance score of the hidden state corresponding to each time step. This is the result obtained after normalization using the Softmax function, representing the first [unit / time] within the sliding time window. Adaptive attention weight index for each time step; This is a context vector that incorporates features from all time steps.

[0055] Specifically, each hidden state is calculated using formula (5). Importance score: the higher the score, the more crucial the input feature at that moment is to parameter identification; then, the importance score for all time steps is calculated using formula (6). Softmax normalization is performed to transform the importance scores into a probability distribution that sums to 1, thus obtaining the attention weights at each time step. Among them, the larger the weight, the more the model focuses on the features at this moment; finally, formula (7) is used to sort all hidden states according to attention weights. Weighted summation yields a context vector that incorporates features from all time steps. c The context vector here c It highlights information at critical moments, which is equivalent to refining the information of a single-layer GRU feature.

[0056] It is worth mentioning that, unlike the traditional Attention-GRU network model which directly takes the last hidden state, this embodiment uses an attention mechanism embedded at the output of a single-layer GRU. This is because features at key moments in long sequences are easily submerged. Therefore, embedding an attention mechanism at the output of a single-layer GRU in this embodiment allows the model to automatically focus on the time steps that are more important for parameter identification, that is, to weight the hidden states of different time steps in the sliding time window.

[0057] Furthermore, unlike the general Attention-GRU mechanism which is typically used for weight allocation of general sequences, the attention mechanism in this embodiment focuses on motor operating condition features. On the one hand, this attention mechanism adopts a single-layer GRU structure to optimize the temporal feature complexity of permanent magnet synchronous motor parameter identification. This avoids the problem of overfitting small sample motor data by multi-layer GRUs and effectively extracts the temporal dependencies of current, voltage, and speed. On the other hand, the attention mechanism does not simply weight the hidden states, but automatically weights and amplifies the temporal features of key operating conditions to meet the needs of permanent magnet synchronous motor parameter identification, suppressing noise and interference from non-key operating conditions. This solves the problem of poor robustness of traditional parameter identification under complex operating conditions.

[0058] Steps 2-4: Output physical parameters in the fully connected layer network.

[0059] The attention mechanism in steps 2-3 outputs a context vector. c The network is mapped to a fully connected layer and then mapped to physical parameters using a calculation formula, finally yielding the identification parameters. The calculation formula is as follows: ; In the formula, and These are the parameters of a trainable fully connected layer.

[0060] Steps 2-5: The standardized output of the fully connected layer will then undergo inverse normalization to restore the stator resistance in the true physical sense. , Shaft inductor , Shaft inductor and rotor flux .

[0061] In this embodiment, the output layer not only fixes the number of parameters to be identified that match the output dimension, but also designs an inverse normalization process based on the physical meaning of the motor parameters to ensure that the output results conform to physical constraints. At the same time, the training phase adopts a loss function for parameter identification and supervises training with real motor parameters as labels, rather than the loss function of general time-series tasks, thus achieving deep adaptation between the network and the identification target.

[0062] This embodiment presents an online motor parameter identification method based on Attention-GRU, integrated into the aforementioned control system. Through dynamic updates of the sliding time window, real-time online parameter identification is achieved. The identification results can be directly fed back to the aforementioned predictive control method, enabling adaptive adjustment of control parameters and solving the performance degradation problem of traditional fixed parameter control when motor parameters drift.

[0063] Furthermore, in this embodiment, a trainable attention vector is introduced at the output of a single-layer GRU to adaptively score the importance of the hidden states at each time point within the sliding time window. Subsequently, differentiated weight indices are generated and weighted summation is performed, so that the network automatically receives high attention at highly dynamic moments rich in parameter information, such as sudden torque changes and speed jumps, and reduces weights at stable and redundant moments, thereby achieving adaptive and accurate capture of parameter change characteristics under different operating conditions.

[0064] Furthermore, in this embodiment, the identification parameters are input into the predictive control method in real time during each control cycle to form an online adaptive robust control closed loop, thus ensuring the identification accuracy.

[0065] The above description is only a preferred embodiment of this invention. Any equivalent changes and modifications made within the scope of the claims of this invention shall fall within the scope of the claims of this invention.

Claims

1. A method for online identification of motor parameters based on Attention-GRU, characterized in that, Includes the following steps: Step 1: Obtain the parameters; obtain the permanent magnet synchronous motor in the synchronous rotating coordinate system. , , as well as ,in, The first One cycle d , q Shaft current sampling value, The first -1 cycle d , q Shaft stator voltage sampling value, For the first Rotor mechanical angular velocity per cycle; Step 2: Parameter identification of the Attention-GRU network model; First, a sliding time window is established, and the input features at each moment in the sliding time window are defined according to the parameters described in step 1. Then, each input feature is used in a gated recurrent unit to calculate the corresponding hidden state time-by-time using a gating mechanism calculation formula to output a complete time-series feature sequence. Then, an attention mechanism is embedded at the output of the gated recurrent unit to process the complete time-series feature sequence. The processing procedure is as follows: first, the importance score of each hidden state in the complete time-series feature sequence is calculated, and then each importance score is converted into a probability distribution that sums to 1 to obtain the attention weight of each time step. Then, the attention weights of all hidden states are weighted and summed to obtain a context vector that integrates the features of all time steps. Then, the context vector output by the gated recurrent unit is mapped to physical parameters, and then the physical parameters are restored to stator resistance. , Shaft inductor , Shaft inductor and rotor flux .

2. The online motor parameter identification method based on Attention-GRU according to claim 1, characterized in that: In step 1, the three-phase current and rotor mechanical angular velocity of the permanent magnet synchronous motor are collected in real time, and then... Clarke / Park Transformation dq Rotating coordinate system , as well as .

3. The online motor parameter identification method based on Attention-GRU according to claim 1 or 2, characterized in that: Step 2 includes the following steps; Step 2-1: Establish the sliding time window, wherein the sliding time window is: In the formula, = To input them sequentially in chronological order. = ... k , For the current moment, The length is given; where the input feature at each time step is defined as: Then, all the input features are subjected to online Min-Max normalization and mapped to [-1,1]. Step 2-2: Input each of the normalized input features in the sliding time window is sequentially input into a single-layer gated recurrent unit. The hidden state corresponding to each input feature is calculated using the gating mechanism calculation formula, so that the gated recurrent unit obtains and outputs the complete temporal feature sequence. The gating mechanism calculation formula is as follows: , , , ; In the formula, This is the current iteration time step for processing the gated cyclic unit sequence, and its value is... ; For the first The reset gate output vector of the time step is used to control the proportion of previous hidden state information retained; Use a Sigmoid activation function to implement the soft-switching logic of the gate; , Both are trainable weight matrices for the reset gate, respectively, for the input of the current iteration time step. and the preceding hidden state Perform a linear transformation; It is a trainable bias vector; For the first Input features at each time step; For the first The update gate output vector at each time step is used to balance the retention ratio of previous hidden states with the update ratio of current new information. , Both are trainable weight matrices for updating the gate; For the first The hidden state of a time step; For the first The candidate hidden state vectors at each time step are combined with the current input and the historical information after the reset to generate new features; , All are trainable weight matrices for candidate hidden states; For Hadamard product operations, implement historical state filtering under reset gating; For the first The hidden state vector of the gated recurrent unit at each time step is used to achieve a weighted fusion of the previous historical state and the current candidate state by updating the weight allocation of the gate, thus obtaining the temporal context features.

4. The online motor parameter identification method based on Attention-GRU according to claim 3, characterized in that: Steps 2-3: An attention mechanism is embedded at the output of the gated recurrent unit. This attention mechanism automatically focuses on the time step of the identification parameters to obtain a context vector that integrates features from all time steps. The calculation formula for the attention mechanism is as follows: ), , ; In the formula, For the current time step Importance score of the lower hidden state. The hyperbolic tangent activation function is used. For trainable parameters of MLP, This is the transpose of the trainable weight vector. Attention weights for each time step; This is a time-series traversal index, and its value range is... Integers between; For the gated loop unit in the first... The hidden state output at each time step For the first time window within the sliding time window The importance score of the hidden state corresponding to each time step; This is the result obtained after normalization using the Softmax function, representing the first [unit / time] within the sliding time window. An adaptive attention weight index for each time step; This is a context vector that incorporates features from all time steps.

5. The online motor parameter identification method based on Attention-GRU according to claim 4, characterized in that: Steps 2-4: In the fully connected layer network, the context vector c output by the attention mechanism is mapped into physical parameters using a calculation formula to obtain the recognition parameters. The calculation formula is as follows: ; In the formula, and These are the parameters of the trainable fully connected layer. For stator resistance, for Shaft inductor, for Shaft inductance and For rotor flux linkage.