Permanent magnet synchronous motor temperature estimation method based on physical information neural network
Patent Information
- Application Number
- CN202611095620.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-23
- Publication Date
- 2026-09-22
- Estimated Expiration
- 2046-07-23
AI Technical Summary
[0005]本发明的目的是针对现有永磁同步电机温度估计方法中,物理模型高度依赖精确参数、纯数据驱动模型缺乏解释性且泛化能力差的问题,提供一种基于物理信息神经网络的永磁同步电机温度估计方法
[0007]本发明的有益效果:针对现有永磁同步电机温度估计方法中,物理模型高度依赖精确参数、纯数据驱动模型缺乏解释性且泛化能力差的问题,提出一种基于物理信息神经网络的永磁同步电机温度估计方法。该方法将多节点集总参数热网络模型的数学方程深度嵌入至Transformer架构中,并针对性地引入了物理损失自适应权重计算机制与可学习对数方差参数。通过上述方案,本发明的温度估计结果不仅实现了高精度的“运行工况-关键部件温度”数据映射,同时遵循了热力学能量守恒定律。此外,发明所提出的方法能够在实现电机热动力学参数透明化提取的同时,有效提升改进Transformer网络在未见极端变载工况下的估计精度与泛化能力。
Smart Images

Figure CN122616602B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of motor temperature estimation and thermal management technology, and relates to a method for estimating the temperature of a permanent magnet synchronous motor based on a physical information neural network. Background Technology
[0002] Permanent magnet synchronous motors (PMSMs) have gained widespread application in electric vehicles, industrial automation, and renewable energy systems due to their high efficiency, high power density, and compact design. However, during operation, the temperature of various components rises. Excessive temperatures accelerate the aging of insulation materials, cause irreversible demagnetization of permanent magnets, and can even lead to system failures. Furthermore, operating temperature is a core parameter affecting performance, reliability, and lifespan. Therefore, accurate temperature monitoring is of significant theoretical and practical value for achieving safe operation and optimized control of motors.
[0003] Traditional temperature monitoring primarily relies on built-in sensors. However, the internal structure of motors is typically quite compact, making it difficult to measure the temperature of some critical components in real time using temperature sensors. Furthermore, installation can damage the motor's internal structure, affecting its normal operation and increasing the cost and complexity of the drive system. To address this issue, researchers have proposed several sensorless temperature estimation methods. These methods can be categorized as follows: One category is based on electrical models, which indirectly estimate motor temperature based on electrical parameters, such as winding temperature through winding resistance or permanent magnet temperature through permanent magnet flux linkage or magnetic saturation. However, this method only reflects the average temperature, making it difficult to track hot spots, and even small parameter estimation deviations can significantly affect temperature estimation. Another category is based on physical models, which divide the main components of the motor into temperature units according to their structure and heat dissipation, and obtain the unit temperature by solving for it. This method has good interpretability and versatility, but its performance is highly dependent on accurate model thermal parameters and the heating power of the temperature units, which are often difficult to obtain in practical applications. A third category is based on data-driven methods, which utilize a large amount of operational data for offline training to establish a mapping relationship between motor operating variables and internal temperature. This method can achieve high-precision temperature estimation without requiring relevant professional knowledge or motor information, but due to the lack of physical constraints, these models have limited generalization ability under unseen operating conditions, and also possess "black box" properties, making it difficult to interpret the physical meaning of the estimation results, and requiring high-quality and large-scale training samples.
[0004] In summary, existing single temperature estimation methods struggle to simultaneously achieve high accuracy, strong generalization ability, and clear physical interpretability. Therefore, to reduce the dependence of pure physical models on prior thermal parameters and to address the "black box" nature and poor robustness of pure data-driven models under unseen complex operating conditions, a novel temperature estimation technique that integrates the advantages of both is urgently needed. This is a core technical challenge that urgently needs to be overcome in the field of motor thermal management and safety monitoring. Summary of the Invention
[0005] The purpose of this invention is to address the problems in existing permanent magnet synchronous motor (PMSM) temperature estimation methods, such as the high dependence of physical models on precise parameters, the lack of interpretability in purely data-driven models, and poor generalization ability. This invention aims to provide a PMSM temperature estimation method based on a physical information neural network. By deeply integrating the thermodynamic mechanism of the motor with a deep learning architecture, this invention achieves high-precision, robust, and physically interpretable temperature estimation of key internal nodes of the motor.
[0006] The technical solution of the present invention: A method for estimating the temperature of a permanent magnet synchronous motor based on a physical information neural network includes the following steps: Step 1: Construct a multi-node lumped parameter thermal network model that includes water-cooled nodes, environmental nodes, winding nodes, stator nodes, and rotor nodes; In the multi-node lumped parameter thermal network model, water-cooled nodes are connected to stator nodes, stator nodes to winding nodes, stator nodes to rotor nodes, and rotor nodes to environmental nodes via thermal resistance. Winding nodes are connected in series with winding heat capacity and winding input heat source, respectively. Stator nodes are connected in series with stator heat capacity and stator input heat source, respectively. Rotor nodes are connected in series with rotor heat capacity and rotor input heat source, respectively. Winding heat capacity and winding input heat source are connected in parallel. Stator heat capacity and stator input heat source are connected in parallel. Rotor heat capacity and rotor input heat source are connected in parallel. The mathematical equations of the multi-node lumped parameter thermal network model are expressed in differential form as follows: (1) in, T, A, B, and u represent the temperature differential state vector, temperature state vector, system state matrix, input control matrix, and input excitation vector, respectively, obtained from the following equation: (2) in, t Indicates transpose. T w , T s , T r , T cool andT amb These represent the winding temperature, stator temperature, rotor temperature, water cooling temperature, and ambient temperature, respectively, with C representing the heat capacity matrix. C w , C s and C r These represent the winding heat capacity, stator heat capacity, and rotor heat capacity, respectively. G sw , G sr , G cs and G ram These represent the thermal conductance between the stator node and the winding node, the thermal conductance between the stator node and the rotor node, the thermal conductance between the water-cooled node and the stator node, and the thermal conductance between the rotor node and the ambient node, respectively. P w , P s and P r The heat sources at the winding input, stator input, and rotor input are respectively represented as: (3) in, R s,20 This represents the stator phase resistance value at 20℃. This indicates the temperature coefficient of resistance of copper. k skin , k h , k c , k r,eddy and k r,wind These represent the winding skin effect coefficient, stator hysteresis loss coefficient, stator eddy current loss coefficient, rotor high-frequency eddy current loss coefficient, and rotor wind-induced heat generation coefficient, respectively. n Indicates rotational speed. i s The stator current is represented by the following equation, which is calculated from it: (4) in, i d and i q These represent permanent magnet synchronous motors. d shaft current and q shaft current; Step 2: Discretize the mathematical equations of the multi-node lumped parameter thermal network model using the Euler method: (5) Among them, T( k +1) and T( k ) respectively represent k +1 and k The temperature state vector at time t, where I represents the identity matrix. T st Indicates the sampling time; Step 3: Construct an improved Transformer network that can simultaneously achieve temperature estimation and physical parameter identification of multi-node lumped parameter thermal network models; The physical parameters of the multi-node lumped parameter thermal network model include winding heat capacity, stator heat capacity, rotor heat capacity, thermal conduction between stator nodes and winding nodes, thermal conduction between stator nodes and rotor nodes, thermal conduction between water-cooled nodes and stator nodes, thermal conduction between rotor nodes and environmental nodes, winding skin effect coefficient, stator hysteresis loss coefficient, stator eddy current loss coefficient, rotor high-frequency eddy current loss coefficient, and rotor wind friction heating coefficient. The improved Transformer network is based on the Transformer network architecture, with the addition of a physical head module and a temperature head module after the encoder layer and decoder layer, respectively. Both the physical head module and the temperature head module adopt a lightweight multi-layer fully connected feedforward structure, which includes two linear mapping layers and a Mish activation function. The expression for the Mish activation function is: (6) The physical head module outputs Represented as: (7) in, W is the mean of the high-dimensional sequence features extracted by the encoder layer over the time dimension. p1 W p2 It is the weight of the two linear mapping layers of the physical head module, b p1 and b p2 It is the bias of the two linear mapping layers of the physical head module; The temperature head module outputs Represented as: (8) in, W is the fused high-dimensional feature matrix output from the last layer of the decoder layer. T1 W T2 The weights of the two linear mapping layers in the temperature head module are b. T1 and b T2 It is the bias of the two linear mapping layers of the temperature head module; The improved Transformer network operates as follows: the encoder input is mapped to the hidden layer dimension through a linear layer and then input into the encoder layer after position encoding; subsequently, the high-dimensional sequence features extracted by the encoder layer are averaged over the time dimension and input into the physical head module, which maps them into physical parameters of a multi-node lumped parameter thermal network model; then, the physical parameters of the multi-node lumped parameter thermal network model output by the physical head module are tensor-concatenated with the decoder input, and after linear mapping and position encoding, they are used as target features, which are fed into the decoder layer together with the high-dimensional memory features output by the encoder layer for attention interaction; finally, the estimated temperatures of the winding nodes, stator nodes, and rotor nodes are output by the temperature head module. Step 4: Construct a data loss function that includes data residuals, data smoothing, and initial conditions. , is represented as: (9) in, , and These represent the data residual term, the data smoothing term, and the initial condition term, respectively. and These represent the coefficients of the data smoothing term and the coefficients of the initial condition term, respectively. To avoid gradient imbalance during multi-task optimization, a learnable log-variance parameter is introduced into the data residual term. s w , s s and s r The error weights of the winding nodes, stator nodes, and rotor nodes are dynamically adjusted, and the corresponding data residual terms are represented as follows: (10) Subscript j for w , s or r , w , s , r These correspond to the winding nodes, stator nodes, and rotor nodes, respectively. MSE j For the first j The mean square error between the estimated temperature and the actual temperature output by the improved Transformer network with 1 node. s j To improve the log-variance parameter of the Transformer network during backpropagation; To prevent the neural network output from producing violent oscillations that do not conform to thermodynamic laws and to avoid gradient explosion, the data smoothing term applies an absolute value penalty to the first and second derivatives of the estimated temperature in the improved Transformer network output. The corresponding data smoothing term is expressed as: (11) in, N This represents the total number of steps in the time series. To improve the estimated temperature of node j in the Transformer network output; The initial condition term is used to ensure the continuity and starting point accuracy of the time series extrapolation, and extracts the first-step estimated temperature of the winding nodes, stator nodes, and rotor nodes from the output of the improved Transformer network. The corresponding actual initial temperature The mean square error is calculated, and the corresponding initial condition term is expressed as follows: (12) Step 5: Substitute the estimated temperature of the improved Transformer network and the identified physical parameters of the multi-node lumped parameter thermal network model into the mathematical equations of the established multi-node lumped parameter thermal network model, calculate the energy conservation residuals of the winding nodes, stator nodes, and rotor nodes respectively, and construct the physical loss function: (13) in, P rated This is the rated power of the motor, used to prevent gradient collapse caused by excessively large absolute values of the physical term residuals. Res j The energy imbalance at node j at the current moment is calculated by the following formula: (14) Step 6: Construct a multi-objective composite loss function that includes a data loss function and a physical loss function: (15) in, These are adaptive weights for physical loss, used to ensure that the gradient of the physical loss function is consistent in magnitude with the maximum impact of the gradient of the data loss function; To calculate the adaptive weights for the physical loss, we first need to select a shared layer in the improved Transformer network that is simultaneously affected by both the data loss function and the physical loss function, denoted by its network parameters. ; Secondly, independent backpropagation is performed on the data loss function and the physical loss function to obtain their gradient matrices on the shared layer network parameters, and the true gradient is restored by combining the automatic mixed precision mechanism with the gradient amplification factor of the current iteration step: (16) in, and These represent the gradient matrices of the data loss function and the physical loss function on the shared layer, respectively. G data and G phy These are the restored real data gradient matrix and the real physical gradient matrix, respectively. S amp The gradient amplification factor for the automatic mixed precision mechanism in the current iteration step; After obtaining the independent gradients, extract the maximum absolute value from the real data gradient matrix and the average absolute value from the real physical gradient matrix, and calculate the target penalty ratio for the current iteration step. : (17) Where max(|·|) and mean(|·|) represent the operations of finding the maximum absolute value and the average absolute value of the matrix elements, respectively; To prevent constants with zero denominators, and to enhance the stability of numerical calculations; Finally, to prevent drastic changes in the physical loss adaptive weights between adjacent batches, an exponential moving average strategy is used to adjust the physical loss adaptive weights. Perform a smooth update: (18) in, and These are the physical weights for the current iteration step and the previous iteration step, respectively. m The moving average momentum coefficient is... The maximum weight; Step 7: Collect the AC and DC axis currents, AC and DC axis voltages, and speeds of the permanent magnet synchronous motor under different speed and torque conditions, as well as the temperatures of the water-cooled nodes, environmental nodes, winding nodes, stator nodes, and rotor nodes to form a time series dataset; Step 8: Perform data preprocessing on the time series dataset; Data preprocessing includes: downsampling the time series dataset and dividing it into training, validation, and test sets; normalizing the training set data using the maximum-minimum normalization method to map it uniformly to the numerical range of [-1, 1]; and simultaneously scaling the validation and test set data using the maximum and minimum parameters of the corresponding data in the training set. Step 9: Use a multi-objective composite loss function and train an improved Transformer network using the training set; Step 10: Validate the improved temperature estimation performance of the Transformer network using test set data.
[0007] The beneficial effects of this invention are as follows: Addressing the problems of existing permanent magnet synchronous motor (PMSM) temperature estimation methods, such as the high dependence of physical models on precise parameters, the lack of interpretability in purely data-driven models, and poor generalization ability, this invention proposes a PMSM temperature estimation method based on a physical information neural network. This method deeply embeds the mathematical equations of a multi-node lumped parameter thermal network model into a Transformer architecture and specifically introduces an adaptive weight calculation mechanism for physical losses and a learnable log-variance parameter. Through this approach, the temperature estimation results of this invention not only achieve high-precision mapping between "operating condition - key component temperature" data but also comply with the thermodynamic law of conservation of energy. Furthermore, the proposed method can effectively improve the estimation accuracy and generalization ability of the Transformer network under unseen extreme load conditions while achieving transparent extraction of motor thermodynamic parameters. Attached Figure Description
[0008] Figure 1 This is a flowchart of a temperature estimation method for permanent magnet synchronous motors based on physical information neural networks proposed in this invention. Figure 2 This is a schematic diagram of the multi-node lumped parameter thermal network model of the permanent magnet synchronous motor proposed in this invention; Figure 3 This is a schematic diagram of the improved Transformer network structure proposed in this invention; Figure 4 The thermal parameters and loss coefficients extracted by the improved Transformer network provided in this embodiment of the invention are applied to a multi-node lumped parameter thermal network model. The comparison chart between the winding estimated temperature output by the multi-node lumped parameter thermal network model and its corresponding actual temperature is shown. Figure 5 The thermal parameters and loss coefficients extracted by the improved Transformer network provided in this embodiment of the invention are applied to a multi-node lumped parameter thermal network model. The comparison chart between the stator estimated temperature output by the multi-node lumped parameter thermal network model and its corresponding actual temperature is shown. Figure 6 The thermal parameters and loss coefficients extracted by the improved Transformer network provided in this embodiment of the invention are applied to a multi-node lumped parameter thermal network model. The comparison chart between the rotor estimated temperature output by the multi-node lumped parameter thermal network model and its corresponding actual temperature is shown. Figure 7A comparison diagram of the estimated winding temperature output by the improved Transformer network and its corresponding actual temperature provided in an embodiment of the present invention; Figure 8 A comparison diagram of the stator estimated temperature output by the improved Transformer network and its corresponding actual temperature provided in an embodiment of the present invention; Figure 9 A comparison chart of the rotor estimated temperature output by the improved Transformer network provided in this embodiment of the invention and its corresponding actual temperature. Detailed Implementation
[0009] The specific embodiments of the present invention will be further described below with reference to the accompanying drawings and technical solutions.
[0010] like Figure 1 As shown, this invention proposes a temperature estimation method for permanent magnet synchronous motors based on a physical information neural network. By deeply embedding the mathematical equations of a multi-node lumped parameter thermal network model into the Transformer architecture, and specifically introducing an adaptive weight calculation mechanism for physical loss and a learnable logarithmic variance parameter, the prediction accuracy and generalization ability of the Transformer network under extreme load conditions are effectively improved. The method includes the following steps: Step 1: Construct as follows Figure 2 The figure shows a multi-node lumped parameter thermal network model that includes water-cooled nodes, environmental nodes, winding nodes, stator nodes, and rotor nodes. In the multi-node lumped parameter thermal network model, the water-cooled nodes are connected to the stator nodes, the stator nodes to the winding nodes, the stator nodes to the rotor nodes, and the rotor nodes to the environmental nodes through thermal resistance. The winding nodes are connected in series with the winding heat capacity and the winding input heat source, respectively. The stator nodes are connected in series with the stator heat capacity and the stator input heat source, respectively. The rotor nodes are connected in series with the rotor heat capacity and the rotor input heat source, respectively. The winding heat capacity and the winding input heat source are connected in parallel. The stator heat capacity and the stator input heat source are connected in parallel. The rotor heat capacity and the rotor input heat source are connected in parallel. The mathematical equations of the multi-node lumped parameter thermal network model can be expressed in differential form as follows: (1) in, , T , A , B and u The temperature differential state vector, temperature state vector, system state matrix, input control matrix, and input excitation vector are respectively represented by the following equation: (2) in, tIndicates transpose. T w , T s , T r , T cool and T amb These represent the winding temperature, stator temperature, rotor temperature, water cooling temperature, and ambient temperature, respectively, with C representing the heat capacity matrix. C w , C s and C r These represent the winding heat capacity, stator heat capacity, and rotor heat capacity, respectively. G sw , G sr , G cs and G ram These represent the thermal conductance between the stator node and the winding node, the thermal conductance between the stator node and the rotor node, the thermal conductance between the water-cooled node and the stator node, and the thermal conductance between the rotor node and the ambient node, respectively. P w , P s and P r The heat sources at the winding input, stator input, and rotor input, respectively, can be represented as: (3) in, R s,20 This represents the stator phase resistance value at 20℃. This indicates the temperature coefficient of resistance of copper. k skin , k h , k c , k r,eddy and k r,wind These represent the winding skin effect coefficient, stator hysteresis loss coefficient, stator eddy current loss coefficient, rotor high-frequency eddy current loss coefficient, and rotor wind-induced heat generation coefficient, respectively. n Indicates rotational speed. i s The stator current is represented by the following equation, which is calculated from it: (4) in, i d and iq These represent permanent magnet synchronous motors. d shaft current and q shaft current; Step 2: Discretize the mathematical equations of the multi-node lumped parameter thermal network model using the Euler method: (5) Among them, T( k +1) and T( k ) respectively represent k +1 and k The temperature state vector at time t, where I represents the identity matrix. T st This indicates the sampling time, which is 5 seconds in this embodiment; Step 3: Construct as follows Figure 3 The improved Transformer network shown can simultaneously achieve temperature estimation and physical parameter identification of multi-node lumped parameter thermal network models; The physical parameters of the multi-node lumped parameter thermal network model refer to 12 parameters, including winding heat capacity, stator heat capacity, rotor heat capacity, thermal conduction between stator nodes and winding nodes, thermal conduction between stator nodes and rotor nodes, thermal conduction between water-cooled nodes and stator nodes, thermal conduction between rotor nodes and environmental nodes, winding skin effect coefficient, stator hysteresis loss coefficient, stator eddy current loss coefficient, rotor high-frequency eddy current loss coefficient, and rotor wind friction heating coefficient. The improved Transformer network is based on the Transformer network architecture, with the addition of a physical head module and a temperature head module after the encoder layer and decoder layer, respectively. Both the physical head module and the temperature head module adopt a lightweight multi-layer fully connected feedforward structure, which includes two linear mapping layers and a Mish activation function. The expression for the Mish activation function is: (6) The physical head module outputs It can be represented as: (7) in, W is the mean of the high-dimensional sequence features extracted by the encoder layer over the time dimension. p1 W p2 It is the weight of the linear mapping layer of the physical head module, b p1 and b p2 It is the bias of the linear mapping layer of the physical head module; The temperature head module outputs It can be represented as: (8) in, W is the fused high-dimensional feature matrix output from the last layer of the decoder layer. T1 W T2 It is the weight of the linear mapping layer of the temperature head module, b T1 and b T2 It is the bias of the linear mapping layer of the temperature head module; The improved Transformer network operates as follows: the encoder input is mapped to the hidden layer dimension through a linear layer and then input into the encoder layer after position encoding; subsequently, the high-dimensional sequence features extracted by the encoder layer are averaged over the time dimension and input into the physical head module, which maps them into physical parameters of a multi-node lumped parameter thermal network model; then, the physical parameters of the multi-node lumped parameter thermal network model output by the physical head module are tensor-concatenated with the decoder input, and after linear mapping and position encoding, they are used as target features, which are fed into the decoder layer together with the high-dimensional memory features output by the encoder layer for attention interaction; finally, the estimated temperatures of the winding nodes, stator nodes, and rotor nodes are output by the temperature head module. In this embodiment, the improved Transformer network has 2 layers in both the encoder and decoder, 2 heads in the multi-head attention mechanism, 64 hidden layer neurons in each encoder and decoder, and 32 hidden layer neurons in both the physical head and temperature head modules. It is trained using the Adam algorithm with a learning rate of 0.0003 and a maximum number of learning epochs of 1000. Step 4: Construct a data term loss function that includes data residuals, data smoothing, and initial conditions. , can be represented as: (9) in, , and These represent the data residual term, the data smoothing term, and the initial condition term, respectively. and These represent the data smoothing term coefficient and the initial condition term coefficient, respectively, in this embodiment. and The values are 0.01 and 2 respectively; To avoid gradient imbalance during multi-task optimization, a learnable log-variance parameter is introduced into the data residual term. s w , s s and s r The error weights of the winding nodes, stator nodes, and rotor nodes are dynamically adjusted, and the corresponding data residual terms are represented as follows: (10) Subscript j for w , s or r , w , s , r These correspond to the winding nodes, stator nodes, and rotor nodes, respectively. MSE j For the first j Each node improves the mean square error between the estimated temperature and the actual temperature output by the Transformer network. s j To improve the log-variance parameter of the Transformer network during backpropagation; The data smoothing term, to prevent the neural network output from producing violent oscillations that do not conform to thermodynamic physical laws and to avoid gradient explosion, applies an absolute value penalty to the first and second derivatives of the temperature estimate in the improved Transformer network output. The corresponding data smoothing term formula can be expressed as: (11) in, N The total number of steps in the time series is shown in this embodiment. N The value is 83600. To improve the estimated temperature of node j in the Transformer network output; The initial condition term is used to ensure the continuity and starting point accuracy of the time series extrapolation, and extracts the first-step estimated temperature of the winding nodes, stator nodes, and rotor nodes from the output of the improved Transformer network. The corresponding actual initial temperature The mean square error is calculated, and the corresponding initial condition term is expressed as follows: (12) Step 5: Substitute the estimated temperature output from the improved Transformer network and the identified physical parameters of the multi-node lumped parameter thermal network model into the mathematical equations of the established multi-node lumped parameter thermal network model, calculate the energy conservation residuals of the winding nodes, stator nodes, and rotor nodes respectively, and construct the physical loss function: (13) in, P rated The rated power of the motor is used to prevent gradient collapse caused by excessively large absolute values of physical term residuals. In this embodiment... P rated The value is 52000W. Res jLet be the energy imbalance at node j at the current moment, which can be expressed as: (14) Step 6: Construct a multi-objective composite loss function that includes data loss terms and physical loss terms: (15) in, These are adaptive weights for physical loss, used to ensure that the gradient of the physical loss function is consistent in magnitude with the maximum impact of the gradient of the data loss function; To calculate the adaptive weights for the physical loss, it is first necessary to select a shared layer in the Transformer network that is simultaneously affected by both the data loss function and the physical loss function. In this embodiment, the last layer of the decoder layer, the feedforward neural network linear mapping layer, is selected, and its network parameters are denoted as follows. ; Secondly, independent backpropagation is performed on the data loss function and the physical loss function to obtain their gradient matrices on the shared layer network parameters, and the true gradient is restored by combining the automatic mixed precision mechanism with the gradient amplification factor of the current iteration step: (16) in, and These represent the gradient matrices of data loss and physical loss on the shared layer, respectively. G data and G phy These are the restored real data gradient matrix and the real physical gradient matrix, respectively. S amp The gradient amplification factor for the automatic mixed precision mechanism in the current iteration step; After obtaining the independent gradients, extract the maximum absolute value from the real data gradient matrix and the average absolute value from the real physical gradient matrix, and calculate the target penalty ratio for the current iteration step. : (17) Where max(|·|) and mean(|·|) represent the operations of finding the maximum absolute value and the average absolute value of the matrix elements, respectively; To prevent the use of tiny constants with a denominator of zero, and to enhance the stability of numerical calculations, this embodiment takes the value of 0.0000001. Finally, to prevent drastic changes in the physical loss adaptive weights between adjacent batches, an exponential moving average strategy is used to adjust the physical adaptive weights. Perform a smooth update: (18) in, and These are the physical weights for the current iteration step and the previous iteration step, respectively. m The moving average momentum coefficient is... In this embodiment, the maximum weight is used. m and Take values of 0.9 and 10 respectively; Step 7: Collect the AC and DC axis currents, AC and DC axis voltages, and speeds of the permanent magnet synchronous motor under different speed and torque conditions, as well as the temperatures of the water-cooled nodes, environmental nodes, winding nodes, stator nodes, and rotor nodes to form a time series dataset; In this embodiment, as a specific application example, the time series dataset is a publicly available dataset with a sampling frequency of 2Hz provided by the Department of Power Electronics and Electrical Drives at the University of Paderborn, Germany. Step 8: Perform data preprocessing on the time series dataset; The data preprocessing includes: downsampling the time series dataset and dividing it into training, validation, and test sets; normalizing the training set data using the maximum-minimum normalization method to uniformly map it to the numerical range of [-1, 1]; and simultaneously scaling the validation and test set data using the maximum and minimum parameters of the corresponding data in the training set. In this embodiment, the downsampling factor is 10; In the data preprocessing stage of this embodiment, the arithmetic mean of the temperature measurements of the stator teeth and stator yoke is taken as the equivalent temperature label of the entire stator node, and the temperature measurement of the permanent magnet is taken as the equivalent temperature label of the rotor node. Step 9: Use the composite loss function and the training set data to train the improved Transformer network; Step 10: Validate the improved temperature estimation performance of the Transformer network using test set data.
[0011] Figure 4-6 The physical parameters extracted by the improved Transformer network provided in this embodiment of the invention are applied to a multi-node lumped parameter thermal network model. A comparison chart of the estimated winding, stator, and rotor temperatures output by the multi-node lumped parameter thermal network model and their corresponding actual temperatures is then generated. Figure 4-6 The waveform results show that the multi-node lumped parameter thermal network model effectively captures the temperature change trend, and also proves the effectiveness of the physical parameters of the multi-node lumped parameter thermal network model extracted by the improved Transformer network.
[0012] Figure 7-9The diagram shows a comparison between the estimated winding, stator, and rotor temperatures output by the improved Transformer network provided in this embodiment of the invention and their corresponding actual temperatures. Based on the waveform results, it can be seen that the temperature curves output by the improved Transformer network are highly consistent with the measured temperatures in terms of overall trend. This accurately depicts the gradual evolution of temperature accumulation at each node over time, without any systematic drift over time, indicating that the improved Transformer network possesses good long-term memory capability and numerical stability. Especially during the abrupt changes in operating conditions caused by switching between different driving cycles, despite drastic changes in electromagnetic variables such as motor speed and current, the estimation results of the improved Transformer network remain smooth and continuous, without any obvious non-physical oscillations or jumps. This phenomenon demonstrates that by introducing the mathematical equations of the multi-node lumped-parameter thermal network model as physical constraints, the improved Transformer network can effectively suppress prediction fluctuations caused by data noise under transient operating conditions, thereby significantly improving dynamic robustness.
[0013] In summary, the proposed method for estimating the temperature of a permanent magnet synchronous motor based on a physical information neural network deeply embeds the mathematical equations of a multi-node lumped parameter thermal network model into the Transformer architecture. It also introduces a physical loss-based adaptive weight calculation mechanism and a learnable log-variance parameter. This method effectively improves the prediction accuracy and generalization ability of the Transformer network under extreme load conditions while achieving transparent extraction of the motor's thermodynamic parameters.
Claims
1. A method for estimating the temperature of a permanent magnet synchronous motor based on a physical information neural network, characterized in that, Includes the following steps: Step 1: Construct a multi-node lumped parameter thermal network model that includes water-cooled nodes, environmental nodes, winding nodes, stator nodes, and rotor nodes; Step 2: Discretize the mathematical equations of the multi-node lumped parameter thermal network model using the Euler method; Step 3: Construct an improved Transformer network that can simultaneously achieve temperature estimation and physical parameter identification of multi-node lumped parameter thermal network models; The specific implementation process of step 3 is as follows: The physical parameters of the multi-node lumped parameter thermal network model include winding heat capacity, stator heat capacity, rotor heat capacity, thermal conduction between stator nodes and winding nodes, thermal conduction between stator nodes and rotor nodes, thermal conduction between water-cooled nodes and stator nodes, thermal conduction between rotor nodes and environmental nodes, winding skin effect coefficient, stator hysteresis loss coefficient, stator eddy current loss coefficient, rotor high-frequency eddy current loss coefficient, and rotor wind friction heating coefficient. The improved Transformer network is based on the Transformer network architecture, with the addition of a physical head module and a temperature head module after the encoder layer and decoder layer, respectively. Both the physical head module and the temperature head module adopt a lightweight multi-layer fully connected feedforward structure, which includes two linear mapping layers and a Mish activation function. The expression for the Mish activation function is: Physical head module output Represented as: in, W is the mean of the high-dimensional sequence features extracted by the encoder layer over the time dimension. p1 W p2 It is the weight of the two linear mapping layers of the physical head module, b p1 and b p2 It is the bias of the two linear mapping layers of the physical head module; The temperature head module outputs Represented as: in, W is the fused high-dimensional feature matrix output from the last layer of the decoder layer. T1 W T2 The weights of the two linear mapping layers in the temperature head module are b. T1 and b T2 It is the bias of the two linear mapping layers of the temperature head module; The improved Transformer network operation mechanism is as follows: the encoder input is mapped to the hidden layer dimension through a linear layer and then input into the encoder layer after position encoding; subsequently, the high-dimensional sequence features extracted by the encoder layer are averaged in the time dimension and input into the physical head module, which maps them into physical parameters of a multi-node lumped parameter thermal network model; then, the physical parameters of the multi-node lumped parameter thermal network model output by the physical head module are tensor concatenated with the decoder input, and after linear mapping and position encoding, they are used as target features, which are fed into the decoder layer together with the high-dimensional memory features output by the encoder layer for attention interaction; finally, the estimated temperatures of the winding nodes, stator nodes, and rotor nodes are output by the temperature head module. Step 4: Construct a data loss function that includes data residuals, data smoothing, and initial conditions. ; Step 5: Substitute the estimated temperature of the improved Transformer network and the physical parameters of the identified multi-node lumped parameter thermal network model into the mathematical equations of the established multi-node lumped parameter thermal network model, calculate the energy conservation residuals of the winding nodes, stator nodes and rotor nodes respectively, and construct the physical loss function. Step 6: Construct a multi-objective composite loss function that includes a data loss function and a physical loss function; Step 7: Collect the AC and DC axis currents, AC and DC axis voltages, and speeds of the permanent magnet synchronous motor under different speed and torque conditions, as well as the temperatures of the water-cooled nodes, environmental nodes, winding nodes, stator nodes, and rotor nodes to form a time series dataset; Step 8: Perform data preprocessing on the time series dataset; Step 9: Use a multi-objective composite loss function and train an improved Transformer network using the training set; Step 10: Validate the improved temperature estimation performance of the Transformer network using test set data.
2. The method for estimating the temperature of a permanent magnet synchronous motor based on a physical information neural network according to claim 1, characterized in that, The specific implementation process of step 1 is as follows: In the multi-node lumped parameter thermal network model, water-cooled nodes are connected to stator nodes, stator nodes to winding nodes, stator nodes to rotor nodes, and rotor nodes to environmental nodes via thermal resistance. Winding nodes are connected in series with winding heat capacity and winding input heat source, respectively. Stator nodes are connected in series with stator heat capacity and stator input heat source, respectively. Rotor nodes are connected in series with rotor heat capacity and rotor input heat source, respectively. Winding heat capacity and winding input heat source are connected in parallel. Stator heat capacity and stator input heat source are connected in parallel. Rotor heat capacity and rotor input heat source are connected in parallel. The mathematical equations of the multi-node lumped parameter thermal network model are expressed in differential form as follows: in, T, A, B, and u represent the temperature differential state vector, temperature state vector, system state matrix, input control matrix, and input excitation vector, respectively, obtained from the following equation: in, t Indicates transpose. T w , T s , T r , T cool and T amb These represent the winding temperature, stator temperature, rotor temperature, water cooling temperature, and ambient temperature, respectively, with C representing the heat capacity matrix. C w , C s and C r These represent the winding heat capacity, stator heat capacity, and rotor heat capacity, respectively. G sw , G sr , G cs and G ram These represent the thermal conductance between the stator node and the winding node, the thermal conductance between the stator node and the rotor node, the thermal conductance between the water-cooled node and the stator node, and the thermal conductance between the rotor node and the ambient node, respectively. P w , P s and P r The heat sources at the winding input, stator input, and rotor input are respectively represented as: in, R s,20 This represents the stator phase resistance value at 20℃. This indicates the temperature coefficient of resistance of copper. k skin , k h , k c , k r,eddy and k r,wind These represent the winding skin effect coefficient, stator hysteresis loss coefficient, stator eddy current loss coefficient, rotor high-frequency eddy current loss coefficient, and rotor wind friction heat generation coefficient, respectively. n Indicates rotational speed. i s The stator current is represented by the following equation, which is calculated from it: in, i d and i q These represent permanent magnet synchronous motors. d shaft current and q Axis current.
3. The method for estimating the temperature of a permanent magnet synchronous motor based on a physical information neural network according to claim 2, characterized in that, The specific implementation process of step 2 is as follows: Among them, T( k +1) and T( k ) respectively represent k +1 and k The temperature state vector at time t, where I represents the identity matrix. T st Indicates the sampling time.
4. The method for estimating the temperature of a permanent magnet synchronous motor based on a physical information neural network according to claim 1, characterized in that, The specific implementation process of step 4 is as follows: The data loss function is as follows: in, , and These represent the data residual term, the data smoothing term, and the initial condition term, respectively. and These represent the coefficients of the data smoothing term and the coefficients of the initial condition term, respectively. To avoid gradient imbalance during multi-task optimization, a learnable log-variance parameter is introduced into the data residual term. s w , s s and s r The error weights of the winding nodes, stator nodes, and rotor nodes are dynamically adjusted, and the corresponding data residual terms are represented as follows: Subscript j for w , s or r , w , s , r These correspond to the winding nodes, stator nodes, and rotor nodes, respectively. MSE j For the first j The mean square error between the estimated temperature and the actual temperature output by the improved Transformer network with 1 node. s j To improve the log-variance parameter of the Transformer network during backpropagation; To prevent the neural network output from producing violent oscillations that do not conform to thermodynamic laws and to avoid gradient explosion, the data smoothing term applies an absolute value penalty to the first and second derivatives of the estimated temperature in the improved Transformer network output. The corresponding data smoothing term is expressed as: in, N This represents the total number of steps in the time series. To improve the estimated temperature of node j in the Transformer network output; The initial condition term, to ensure the continuity and starting point accuracy of the time series extrapolation, extracts the estimated temperature of the first step for the winding nodes, stator nodes, and rotor nodes from the improved Transformer network output. , and the initial actual temperature The mean square error is calculated, and the corresponding initial condition term is expressed as follows: 。 5. The method for estimating the temperature of a permanent magnet synchronous motor based on a physical information neural network according to claim 4, characterized in that, The specific implementation process of step 5 is as follows: Construct the physical loss function: in, P rated This is the rated power of the motor, used to prevent gradient collapse caused by excessively large absolute values of the physical term residuals. Res j The energy imbalance at node j at the current moment is calculated by the following formula: 。 6. The method for estimating the temperature of a permanent magnet synchronous motor based on a physical information neural network according to claim 5, characterized in that, The specific implementation process of step 6 is as follows: Multi-objective composite loss function: in, These are adaptive weights for physical loss, used to ensure that the gradient of the physical loss function is consistent in magnitude with the maximum impact of the data loss function; To calculate the adaptive weights for the physical loss, we first need to select a shared layer in the improved Transformer network that is simultaneously affected by both the data loss function and the physical loss function, denoted by its network parameters. ; Secondly, independent backpropagation is performed on the data loss function and the physical loss function to obtain their gradient matrices on the shared layer network parameters, and the true gradient is restored by combining the automatic mixed precision mechanism with the gradient amplification factor of the current iteration step: in, and These represent the gradient matrices of the data loss function and the physical loss function on the shared layer, respectively. G data and G phy These are the restored real data gradient matrix and the real physical gradient matrix, respectively. S amp The gradient amplification factor for the automatic mixed precision mechanism in the current iteration step; After obtaining the independent gradients, extract the maximum absolute value from the real data gradient matrix and the average absolute value from the real physical gradient matrix, and calculate the target penalty ratio for the current iteration step. : Where max(|·|) and mean(|·|) represent the operations of finding the maximum absolute value and the average absolute value of the matrix elements, respectively; To prevent constants with zero denominators, and to enhance the stability of numerical calculations; Finally, to prevent drastic changes in the physical loss adaptive weights between adjacent batches, an exponential moving average strategy is used to adjust the physical loss adaptive weights. Perform a smooth update: in, and These are the physical weights for the current iteration step and the previous iteration step, respectively. m The moving average momentum coefficient is... It has the highest weight.
7. The method for estimating the temperature of a permanent magnet synchronous motor based on a physical information neural network according to claim 6, characterized in that, The specific implementation process of step 8 is as follows: Data preprocessing includes: downsampling the time series dataset and dividing it into training, validation, and test sets; normalizing the training set data using the maximum-minimum normalization method to map it uniformly to the numerical range of [-1, 1]; and simultaneously scaling the validation and test set data using the maximum and minimum values of the corresponding data in the training set.
Citation Information
Patent Citations
Unmanned aerial vehicle power calculation method and system based on physical information neural network
CN122491003A