Vehicle power system permanent magnet synchronous motor temperature prediction method and system

By combining Mahalanobis distance clustering and deep learning models, a dynamic update method for predicting motor temperature is developed, which solves the problem of temperature prediction for permanent magnet synchronous motors under complex operating conditions and achieves high-precision and real-time temperature monitoring.

CN121502718APending Publication Date: 2026-02-10XI AN JIAOTONG UNIV +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511618985.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-06
Publication Date
2026-02-10

AI Technical Summary

Technical Problem

Existing technologies for predicting the thermal load of permanent magnet synchronous motors suffer from problems such as poor adaptability to dynamic operating conditions, difficulty in decoupling coupled interference from multiple disturbance factors, lag in the cooling system, and difficulty in balancing real-time performance and accuracy. In particular, the model error is large under extreme operating conditions, making it difficult to achieve high-precision temperature prediction.

Method used

The Mahalanobis distance clustering algorithm is used to detect the motor operating conditions. An LSTM and Transformer autoregressive model is constructed, and combined with a real-time sliding window and incremental ridge regression layer, the automatic identification of new operating conditions and the updating of model parameters are realized, so as to dynamically adapt to changing operating conditions.

Benefits of technology

It achieves high-precision motor temperature prediction under complex and variable operating conditions, improves the adaptability and real-time performance of the model, reduces the lag response time of the cooling system, and improves the accuracy and stability of the prediction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121502718A_ABST
    Figure CN121502718A_ABST
Patent Text Reader

Abstract

The invention provides a vehicle power system permanent magnet synchronous motor temperature prediction method and system, and the method comprises the steps: collecting the operation data of a motor, and determining the characteristics affecting the temperature change of the motor; detecting and dividing motor operation conditions through a Mahalanobis distance clustering algorithm; an LSTM autoregression model and a Transform autoregression model are constructed, and the temperature of a single working condition is predicted; building a Mahalanobis distance working condition classifier by using a real-time sliding window to realize automatic identification of a new working condition, and training a model by using a new working condition sample point through a strategy of freezing basic model parameters and fusing incremental ridge regression layer combination to complete a model parameter updating process; the temperature prediction of the permanent magnet synchronous motor under the variable working condition is realized by using the composite model after parameter updating, the model has the dynamic parameter updating capability aiming at the variable working condition, the motor operation temperature under the complex variable working condition can be accurately predicted, and a basis is established for constructing a high-reliability permanent magnet synchronous motor temperature monitoring system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of motor thermal condition monitoring and prediction technology, specifically relating to a method and system for predicting the temperature of a permanent magnet synchronous motor in a vehicle power system. Background Technology

[0002] Permanent magnet synchronous motors (PMSMs) typically employ closed-loop cooling systems for heat management. Typical heat dissipation components include cylinder block cooling channels, a coolant circulation pump, an oil cooler, a water-cooled intercooler, and a radiator module. During actual operation, heat is transferred from high-temperature components (such as cylinder liners, cylinder heads, and turbochargers) to the coolant, and then carried away by a heat exchanger. The coolant flow rate is regulated by the water pump, and the radiator's heat exchange efficiency is significantly affected by fan speed and ambient temperature. The cooling process can be considered a typical multivariable process involving heat conduction and convection coupling. Due to sudden changes in heat load (such as acceleration and heavy load) and external environmental disturbances (such as sandstorms, low pressure, and large ambient temperature differences) during actual operation, the purpose of PMSM heat load prediction is to predict in advance the changes in the heat generation rate and temperature of key components of the motor in the future. The goal is to achieve aligned on-demand cooling, provide a basis for active control of the cooling system, and avoid the energy waste and lag problems of traditional passive cooling. Currently, the mainstream prediction technologies include: traditional mechanistic models that establish heat balance equations based on physical laws such as the law of heat conduction; empirical models that fit formulas through experimental data; and data-driven models that rely on real-time sensor data and use algorithms such as BP neural networks and LSTM to capture heat load patterns. Among these, hybrid driving models that combine mechanistic constraints and data fitting capabilities are currently a research hotspot. The complete prediction process requires three core steps: data acquisition and preprocessing, feature engineering, and model training and optimization, to ensure that the prediction error is controlled within industrial-grade requirements.

[0003] Despite advancements in heat load prediction technology, several challenges remain in practical applications. First, it suffers from poor adaptability to dynamic conditions. In scenarios involving sudden heat load changes such as rapid motor acceleration, traditional mechanistic models suffer from solution delays, and datasets not covering highly dynamic conditions lead to significant prediction errors. Second, decoupling multiple coupled disturbances is difficult. Internal factors like motor aging and coolant deterioration, combined with external factors such as ambient temperature fluctuations and dust clogging radiators, make it difficult for existing models to accurately separate their influences, resulting in a significant decrease in accuracy under complex environments. Third, the physical and control lag of the cooling system makes existing models ill-suited for scenarios with long time lags and overlapping dynamic conditions, leading to delayed cooling responses. Furthermore, there is a trade-off between data quality and model generalization ability. Extreme condition data is difficult to obtain, and data for routine conditions is unevenly distributed, causing model errors to double under new conditions. Finally, balancing real-time performance and accuracy is challenging. High-precision models involve large computational loads, causing prediction time to exceed the controller's control cycle, while simplifying the model sacrifices accuracy. Traditional threshold judgments or empirical models cannot accurately reflect the complex thermal response behavior; therefore, there is an urgent need to construct data-driven prediction models to capture temperature rise trends and the lag characteristics of the cooling system. Summary of the Invention

[0004] To address the problems existing in the prior art, this invention provides a method for predicting the temperature of a permanent magnet synchronous motor (PMSM) in a vehicle powertrain system. This method first collects motor operating data based on the internal heat transfer principle of the PMSM to determine the main characteristics affecting motor temperature changes, and then uses a Mahalanobis distance clustering algorithm to detect and classify the motor's operating conditions. Second, it constructs a long short-term memory (LSTM) network autoregressive model and a Transformer autoregressive model to perform high-precision temperature prediction for individual operating conditions. Finally, it utilizes a real-time sliding window to construct a Mahalanobis distance operating condition classifier to automatically identify new operating conditions. By freezing the basic model parameters and incorporating an incremental ridge regression layer, the model is rapidly trained using sample points from new operating conditions to complete the parameter update process, ultimately achieving temperature prediction of the PMSM under varying operating conditions.

[0005] To achieve the above objectives, in a first aspect, the present invention provides a method for predicting the temperature of a permanent magnet synchronous motor in a vehicle powertrain system, comprising the following steps: Collect motor operating data to determine the characteristics affecting motor temperature changes; The operating conditions of motors are detected and classified using Mahalanobis distance clustering algorithm; An LSTM autoregressive model and a Transformer autoregressive model are constructed to predict the temperature for a single operating condition. A Mahalanobis distance classifier is built using a real-time sliding window to automatically identify new operating conditions. By freezing the basic model parameters and combining them with an incremental ridge regression layer, the model is trained with sample points from the new operating conditions to complete the parameter update process. The composite model with updated parameters is used to predict the temperature of a permanent magnet synchronous motor under varying operating conditions.

[0006] Furthermore, when collecting motor operating data and determining the characteristics affecting motor temperature changes, the direct-axis current, quadrature-axis current, direct-axis voltage, and quadrature-axis voltage during motor operation directly reflect the excitation and load conditions of the motor. Similarly, motor speed and motor torque reflect the motor load conditions and directly determine the heat generated during motor operation. The q-axis voltage, d-axis voltage, q-axis current, d-axis current, coolant temperature, ambient temperature, and motor speed are determined as the characteristics affecting motor temperature changes, and the motor temperature at the previous moment is used as a derived input feature.

[0007] Furthermore, when using the Mahalanobis distance clustering algorithm to detect and classify motor operating conditions, a sliding window strategy is adopted, including: The sliding window data sampled every minute is classified, and the Mahalanobis distance of the data is calculated to determine whether the current working condition is a known working condition; Automatic detection of new operating conditions: when data cannot be classified into any known operating condition, the operating condition is marked as a potential new operating condition. The working condition database is dynamically updated, and newly confirmed working conditions are added to the known working condition database as the basis for working condition detection and identification. Statistical features are calculated for the data within each window, and these features are matched with all currently known operating conditions using Mahalanobis distance. When the minimum Mahalanobis distance of a certain window is greater than a set threshold, and the distance difference between it and the next closest operating condition exceeds a set fuzzy boundary, the data in that window is identified as a potential new operating condition.

[0008] Furthermore, when detecting and classifying motor operating conditions using the Mahalanobis distance clustering algorithm, a continuous window confirmation mechanism is introduced. By default, a new operating condition is only confirmed as a true new operating condition when three consecutive windows are judged as such. The mean and covariance matrix of the new operating condition are automatically calculated, and a unique number is assigned to it. The new operating condition is stored in a local file and updated in the operating condition model dictionary.

[0009] Furthermore, for existing clustered working conditions, each known working condition requires an initial training model as the basis for prediction and is stored in a dictionary. This allows a new set of data to be processed by the working condition detection module. If it is determined to be an old working condition, the model of the corresponding existing working condition can be used directly for prediction. If it is determined to be a new working condition, the parameters are updated using the existing working condition that is closest to it after calculation of the Mahalanobis distance.

[0010] Furthermore, constructing an LSTM autoregressive model to predict temperature for a single operating condition involves: inputting data into two stacked LSTM layers to learn complex deep temporal dynamic patterns in the data; the output of the first LSTM layer is used as the input to the second LSTM layer; each LSTM layer contains 128 neurons; dropout is set to 0.2; during training, 20% of neuron connections are randomly dropped; when constructing a Transformer autoregressive model to predict temperature for a single operating condition: the encoder of the Transformer autoregressive model consists of four identical sub-layers stacked together; each layer contains a self-attention mechanism and a feedforward neural network; the self-attention mechanism uses eight attention heads, each head independently calculates attention weights, captures different semantic information, and finally concatenates the results.

[0011] Furthermore, the final layer of the composite model is a ridge regression layer. An L2 regularization term is added to the loss function of the standard linear regression. Assuming a linear relationship between the input variable and the temperature under the new operating condition, the ridge regression layer is calculated as follows:

[0012] in, For the predicted value, for the first... n The weights of each input. For the first n There are two input values, b is the bias. The optimization objective of the ridge regression layer during the optimization process is:

[0013] in, This is the actual value. The hyperparameters used to control the regularization strength.

[0014] Secondly, the present invention provides a temperature prediction system for a permanent magnet synchronous motor in a vehicle power system, including a feature determination module, a working condition division module, and a prediction module. The feature determination module is used to collect motor operating data and determine the features that affect the motor temperature change; The operating condition segmentation module is used to detect and segment the operating conditions of the motor using the Mahalanobis distance clustering algorithm; The prediction module predicts temperature for individual operating conditions based on LSTM and Transformer autoregressive models. It uses a Mahalanobis distance classifier built with a real-time sliding window to automatically identify new operating conditions. By freezing the basic model parameters and combining them with an incremental ridge regression layer, the model is trained with sample points from new operating conditions to complete the parameter update process. The composite model with updated parameters is used to predict the temperature of the permanent magnet synchronous motor under varying operating conditions.

[0015] Thirdly, the present invention provides a computer device, including a processor and a memory, wherein the memory is used to store a computer executable program, the processor reads part or all of the computer executable program from the memory and executes it, and the processor can realize the above-mentioned method for predicting the temperature of a permanent magnet synchronous motor in a vehicle power system when executing part or all of the executable program.

[0016] Finally, a computer-readable storage medium may also be provided, which stores a computer program that, when executed by a processor, enables the implementation of the aforementioned method for predicting the temperature of a permanent magnet synchronous motor in a vehicle powertrain system.

[0017] Compared with existing technologies, the present invention has at least the following beneficial effects: The dynamic dictionary-enhanced permanent magnet synchronous motor temperature prediction method proposed in this invention first collects permanent magnet synchronous motor operating data and detects and classifies the motor operating conditions based on the Mahalanobis distance clustering algorithm; secondly, it constructs an LSTM autoregressive model and a Transformer autoregressive model to predict the motor temperature for a single operating condition; finally, it uses a real-time sliding window to construct a Mahalanobis distance operating condition classifier to achieve automatic identification of new operating conditions. By freezing the basic model parameters and fusing an incremental ridge regression layer into the basic model, it achieves dynamic updating of model parameters under varying operating conditions, effectively making up for the deficiency of traditional deep neural network models in accurately predicting motor operating temperatures under complex and variable operating conditions. This enables the model to have the ability to dynamically update parameters under varying operating conditions, laying the foundation for further construction of a high-reliability permanent magnet synchronous motor temperature monitoring system. Attached Figure Description

[0018] Figure 1 This is a schematic diagram of an implementable method of this application.

[0019] Figure 2 This is a schematic diagram showing the details of the working condition testing process.

[0020] Figure 3 The results of the training set's working condition classification.

[0021] Figure 4 This is for the test set of operating condition classification results.

[0022] Figure 5 This is a schematic diagram of the working condition database update process.

[0023] Figure 6 This is a schematic diagram of the motor temperature prediction process.

[0024] Figure 7 This is a heatmap showing the correlation between variables.

[0025] Figure 8 This is a schematic diagram of the LSTM autoregressive modeling process.

[0026] Figure 9 The results are the predictions of the LSTM autoregressive model, where (a) is the prediction result without autoregression (condition 0), (b) is the prediction result with hysteresis of 1, and (c) is the prediction result with condition 14 added.

[0027] Figure 10 This represents the prediction results from the Transformer autoregressive model.

[0028] Figure 11 The results are the prediction results of the Transformer autoregressive model; where (a) is the predicted temperature of the stator winding under operating condition 0, (b) is the predicted temperature of the stator winding under operating condition 14, (c) is the predicted temperature of the stator winding under operating condition 3, and (d) is the predicted temperature of the stator winding under operating condition 10.

[0029] Figure 12 This is a schematic diagram of the model update.

[0030] Figure 13 To update prediction results for operating condition switching and model parameter updates. Detailed Implementation

[0031] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0032] The purpose of this invention is to provide a method for predicting the temperature of a permanent magnet synchronous motor (PMSM) in a vehicle powertrain system. This method first collects motor operating data based on the internal heat transfer principle of the PMSM to determine the main characteristics affecting motor temperature changes. Then, it uses a Mahalanobis distance clustering algorithm to detect and classify the motor's operating conditions. Next, it constructs a Long Short-Term Memory (LSTM) autoregressive model and a Transformer autoregressive model to perform high-precision temperature prediction for individual operating conditions. Finally, it uses a real-time sliding window to construct a Mahalanobis distance operating condition classifier to automatically identify new operating conditions. By freezing the basic model parameters and incorporating an incremental ridge regression layer, the model is rapidly trained using 120 new operating condition sample points to complete the parameter update process. Ultimately, this method achieves temperature prediction of the PMSM under varying operating conditions. The process is as follows: Figure 1 As shown. The specific implementation includes the following steps: Step 1: Determine the dataset and select features The method provided in this invention is based on a permanent magnet synchronous motor (PMSM) temperature dataset published by the Electrical and Drive Laboratory at the University of Paderborn, Germany. This dataset includes sensor data of the PMSM under different operating conditions, specifically including PMSM torque, direct-axis (d-axis) current, quadrature-axis (q-axis) current, direct-axis (d-axis) voltage, quadrature-axis (q-axis) voltage, power, ambient temperature, coolant temperature, rotational speed, stator winding temperature, stator tooth temperature, stator yoke temperature, permanent magnet temperature, and operating condition number information. The operating data for each condition represents an independent combination of load mode and specific environment. Given that the motor's thermal field is a large inertial system, the temperature changes of various motor components exhibit significant time dependence.

[0033] Based on the internal heat generation and dissipation principles of motors, ambient temperature and coolant temperature are environmental factors affecting the motor's heat dissipation capacity. Their changes directly influence the temperature accumulation and transmission path of various motor components. The heat generated during motor operation primarily originates from changes in current and voltage. Therefore, the direct-axis (d-axis) current, quadrature-axis (q-axis) current, direct-axis (d-axis) voltage, and quadrature-axis (q-axis) voltage directly reflect the excitation and load conditions of the motor. Motor speed and torque also reflect the motor's load conditions and directly determine the heat generated during operation. Based on variable correlation analysis, the variable correlation heatmap is shown below. Figure 7 As shown, the identified features are: q-axis voltage, d-axis voltage, q-axis current, d-axis current, coolant temperature, ambient temperature, and motor speed. Torque is entirely determined by the q-axis current, so it is removed. By selecting these features, the model's predictive and generalization abilities are improved, while avoiding a reduction in feature representation capabilities.

[0034] In order to predict the temperature changes of various components of the motor based on the motor's operating state parameters and to characterize the temporal evolution of the motor temperature, this invention uses the motor temperature at the previous moment as a derived input feature and utilizes the autoregressive logic of time series modeling. This helps the model capture the dynamic trend and variational inertia of the motor temperature changes, thereby improving the continuity and stability of the prediction.

[0035] In constructing a time series prediction model for motor temperature, this invention uniformly mixes time series data under all operating conditions in the dataset and uses all time series data in the dataset as the analysis object for model training and model performance verification, rather than grouping and modeling according to the operating condition numbers in the dataset, and then training the model to learn the global motor temperature rise pattern across operating conditions.

[0036] Step 2: Working condition detection based on Mahalanobis distance clustering In order to accurately identify the changes in operating conditions during the operation of permanent magnet synchronous motors and enable the model to have dynamic expansion capabilities, an operating condition detection module based on Mahalanobis distance clustering is constructed. Specifically, (1) the sliding window data sampled every minute is classified, and the Mahalanobis distance of the data is calculated to determine whether the current operating condition is a known operating condition; (2) new operating conditions are automatically detected, that is, when the data cannot be classified into any known operating condition, the operating condition is marked as a potential new operating condition; (3) the operating condition library is dynamically updated, and continuously confirmed new operating conditions are included in the known operating condition library as the basic library for operating condition detection and identification.

[0037] In the modeling phase of the working condition detection module based on Mahalanobis distance clustering, a sliding window strategy is adopted. Each window has a length of 120 and a step size of 120. The system calculates statistical features, such as the mean, for the data within each window and matches them with all currently known working conditions. The matching method uses Mahalanobis distance, which measures the proximity of sample features to the centers of each working condition. When the minimum Mahalanobis distance of a window is greater than a set threshold, and the distance difference with the next closest working condition exceeds a set fuzzy boundary, the data in that window is identified as a potential new working condition.

[0038] To avoid boundary misjudgments, a continuous window confirmation mechanism is introduced. The default setting is that a new working condition is only confirmed as such when three consecutive windows are identified as such. Once confirmed, the mean and covariance matrix of the new working condition are automatically calculated, and a unique number (e.g., NEW_001) is assigned to it. Subsequently, the new working condition is saved to a local file and updated in the working condition model dictionary to ensure that subsequent windows can recognize it.

[0039] In addition, the system records the classification results of all windows during operation and generates statistical reports. Visualization features include the Mahalanobis distance over time and the growth trend of the operating condition library size over time. All window classification results are also saved as a "Window Classification Results" file for further analysis. Figure 2 The following shows the details of the working condition testing process.

[0040] like Figure 3 The model training results are based on publicly available datasets. Figure 3 It can be seen that the working condition detection module can accurately identify the 17 existing labeled working conditions, indicating that the currently set threshold and continuous confirmation mechanism can effectively avoid over-classification and suppress boundary misjudgment. When running on the test set, as... Figure 4 As shown, the system successfully detected and identified multiple new operating conditions. These new operating conditions were confirmed through a three-step consecutive judgment mechanism, assigned a number, and added to the operating condition database, thus implementing the database update process. Figure 5 As shown, the operating condition database dynamically grows as testing progresses, significantly enhancing the system's adaptability and coverage.

[0041] The working condition detection module implements a working condition identification system with real-time performance, robustness, and self-learning capabilities. By combining Mahalanobis distance metric, statistical modeling, and continuous verification mechanisms, the system effectively solves the problems of boundary ambiguity and identification of new working conditions, and has the ability to automatically expand the working condition database.

[0042] Step 3: Motor temperature prediction based on deep learning For the existing 20 clustered work conditions, each known work condition requires an initial trained model as the basis for prediction, which is stored in a dictionary. This allows a new set of data, after passing through the work condition detection module, to be predicted directly using the model of the corresponding existing work condition if it is identified as an old work condition; otherwise, the parameters are updated using the existing work condition with the closest calculated Mahalanobis distance to it. The process is as follows: Figure 6 As shown.

[0043] Based on LSTM autoregressive and Transformer autoregressive models respectively, model training and validation were performed on data from 20 existing clustered working conditions, namely working condition 0, working condition 14, working condition 3 and working condition 10.

[0044] (1) LSTM autoregressive model Due to its built-in forgetting gate, the LSTM model effectively avoids the gradient explosion problem of RNN models when dealing with time-series prediction problems, and can often capture memories of longer durations. Figure 8The network architecture shown establishes an LSTM autoregressive model: data is input into two stacked LSTM layers to learn complex deep temporal dynamic patterns in the data. The output of the first LSTM layer is used as the input of the second LSTM layer. Each LSTM layer contains 128 neurons. Dropout is set to 0.2. During training, 20% of the neuron connections are randomly dropped to prevent the model from overfitting.

[0045] Adding a sliding window during the data processing stage to capture information within 10 steps is beneficial for time series prediction. Simultaneously, time series derived features are constructed, using the electronic winding temperature from the previous moment as a derived feature, which is then merged with the seven original input features from the current moment to jointly predict the stator winding temperature at the next moment.

[0046] In LSTM, the output of each time step contains all the historical information up to that moment. Therefore, the output at the end of the sequence can completely describe the evolution of the motor temperature state. The final model encodes the sequence information of all past time steps.

[0047] like Figure 9 As shown, the model was first trained using data from operating condition 0. By comparing the prediction of stator winding temperature under operating condition 0 with and without autoregression, and with hysteresis features of 1, 2, and 5, it can be seen that without autoregression, the predicted data still exhibits slight fluctuations, and the error is greater than that of the model with hysteresis features. By comparing the error structure, it can be seen that the model performs best when the number of hysteresis features is 1. However, when the next consecutive operating condition 14 is added, the overall prediction level of the model decreases due to the standardized differences, requiring parameter updates. The prediction results under different hysteresis conditions and the prediction results after adding operating condition 14 are shown in Table 1. When the hysteresis is 1, the model was trained using operating conditions 0, 14, 3, and 10 respectively, and the prediction results are shown in Table 2.

[0048] Table 1. Prediction results of the LSTM autoregressive model for operating condition 0.

[0049] Table 2. Prediction results of the LSTM autoregressive model (hysteresis = 1) for various operating conditions.

[0050] (2) Transformer Autoregressive Model Due to its excellent self-attention mechanism, the Transformer also has certain advantages in solving time series prediction problems. Figure 10The network architecture shown establishes a Transformer autoregressive model with a sliding window length of 10 and a hysteresis feature count of 1. The encoder consists of four identical sublayers stacked together. Each layer typically contains a self-attention mechanism and a feed-forward network. The self-attention mechanism uses eight attention heads, each of which independently calculates attention weights, captures different semantic information, and finally concatenates the results.

[0051] The prediction results for operating conditions 0, 14, 3, and 10 are shown in Table 3. The prediction results for each operating condition are visualized as follows. Figure 11 .

[0052] Table 3. Prediction results of the Transformer autoregressive model (hysteresis = 1) for various operating conditions.

[0053] Step 4: Model Update under New Operating Conditions When the existing model is unable to complete the training task for the new operating condition, parameter updates are required. First, all parameters of the original model are frozen, and the predicted value of the motor winding temperature is directly output. Second, the seven physical features of the original model are concatenated and input into the ridge regression model to form a composite model. During the model parameter update process, the composite model is trained using the first 120 data points of the new operating condition, thereby enabling the model to quickly adapt to the new operating condition and completing the construction of a prediction model for the new operating condition. A schematic diagram of the model parameter update is shown below. Figure 12 As shown, Figure 12 In the composite model, the last layer is a ridge regression layer, which adds an L2 regularization term to the loss function of the standard linear regression. The purpose is to penalize excessive model weights and prevent the model from overfitting. In this process, it is assumed that there is a linear relationship between the input variables and the temperature under the new operating conditions.

[0054] The formula for calculating the ridge regression layer is as follows:

[0055] in, For the predicted value, for the first... n The weights of each input. For the first n There are 1 input value, and b is the bias.

[0056] In the optimization process of ridge regression layers, not only are the predicted values ​​required to be as close as possible to the actual values, but all weights are also required to be... w The goal is to minimize the sum of squares of the elements, with the following optimization objective:

[0057] in This is the actual value. To control the hyperparameters of regularization strength, The larger the value, the closer the weight is to 0, the simpler the model, and the stronger the model's ability to prevent overfitting.

[0058] To verify the effectiveness of the model parameter update mechanism, prediction processes were conducted for operating conditions 0 and 14. First, the model for operating condition 0 was used to make predictions within the operating condition 0 range. Then, the operating condition was switched to 14. Based on the model parameter update mechanism, a prediction model for the new operating condition was established, and predictions were made based on this model. The prediction results are as follows: Figure 13 As shown.

[0059] Example 2, based on the technical concept of the method described in this invention, can also provide a method for predicting the temperature of a permanent magnet synchronous motor in a vehicle power system, including a feature determination module, a working condition division module, and a prediction module; The feature determination module is used to collect motor operating data and determine the features that affect the motor temperature change; The operating condition segmentation module is used to detect and segment the operating conditions of the motor using the Mahalanobis distance clustering algorithm; The prediction module predicts temperature for individual operating conditions based on LSTM and Transformer autoregressive models. It uses a Mahalanobis distance classifier built with a real-time sliding window to automatically identify new operating conditions. By freezing the basic model parameters and combining them with an incremental ridge regression layer, the model is trained with sample points from new operating conditions to complete the parameter update process. The composite model with updated parameters is used to predict the temperature of the permanent magnet synchronous motor under varying operating conditions.

[0060] The method proposed in this invention can overcome the problem of predicting failure of traditional static models under new operating conditions, and realize the stable temperature prediction process of the model under the background of frequent changes in operating conditions of motor in actual operation. It provides a reliable and efficient solution for real-time monitoring of motor temperature status and research on motor thermal protection control strategies.

[0061] In addition, the present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, can implement the method for predicting the temperature of a permanent magnet synchronous motor in a vehicle power system as described in the present invention.

[0062] The present invention can also provide a computer device, including a processor and a memory, wherein the memory is used to store a computer executable program, the processor reads the computer executable program from the memory and executes it, and the processor can implement the temperature prediction method for a permanent magnet synchronous motor in a vehicle power system as described in the present invention when executing the computer executable program.

[0063] The computer device may be a laptop, a desktop computer, or a workstation.

[0064] The processor can be a central processing unit (CPU), a graphics processing unit (GPU), a digital signal processor (DSP), an application-specific integrated circuit (ASIC), or an off-the-shelf programmable gate array (FPGA).

[0065] The memory described in this invention can be an internal storage unit of a laptop, desktop computer, or workstation, such as memory or hard disk; or it can be an external storage unit, such as a portable hard disk or flash memory card.

[0066] Computer-readable storage media can include computer storage media and communication media. Computer storage media includes volatile and non-volatile, removable and non-removable media implemented using any method or technology for storing information such as computer-readable instructions, data structures, program modules, or other data. Computer-readable storage media can include: read-only memory (ROM), random access memory (RAM), solid-state drives (SSDs), or optical discs, etc. Random access memory can include resistive random access memory (ReRAM) and dynamic random access memory (DRAM).

[0067] The above content is only for illustrating the technical concept of the present invention and should not be construed as limiting the scope of protection of the present invention. Any modifications made to the technical solution based on the technical concept proposed in this invention shall fall within the scope of protection of the claims of this invention.

Claims

1. A method for predicting the temperature of a permanent magnet synchronous motor in a vehicle powertrain system, characterized in that, Includes the following steps: Collect motor operating data to determine the characteristics affecting motor temperature changes; The operating conditions of motors are detected and classified using Mahalanobis distance clustering algorithm; Construct LSTM autoregressive model and Transformer autoregressive model to predict temperature for a single operating condition; A Mahalanobis distance classifier is constructed using a real-time sliding window to achieve automatic identification of new working conditions. By freezing the basic model parameters and combining the incremental ridge regression layer strategy, the model is trained with sample points of new working conditions to complete the parameter update process. Temperature prediction of permanent magnet synchronous motor under varying operating conditions is achieved using a composite model with updated parameters.

2. The method for predicting the temperature of a permanent magnet synchronous motor in a vehicle powertrain according to claim 1, characterized in that, When collecting motor operating data and determining the characteristics affecting motor temperature changes, the direct-axis current, quadrature-axis current, direct-axis voltage, and quadrature-axis voltage during motor operation directly reflect the excitation and load conditions of the motor. The motor speed and motor torque also reflect the motor load conditions and directly determine the heat generated during motor operation. The q-axis voltage, d-axis voltage, q-axis current, d-axis current, coolant temperature, ambient temperature, and motor speed are determined as the characteristics affecting motor temperature changes, and the motor temperature at the previous moment is used as a derived input feature.

3. The method for predicting the temperature of a permanent magnet synchronous motor in a vehicle powertrain according to claim 1, characterized in that, When using the Mahalanobis distance clustering algorithm to detect and classify motor operating conditions, a sliding window strategy is adopted, including: The sliding window data sampled every minute is classified, and the Mahalanobis distance of the data is calculated to determine whether the current working condition is a known working condition; Automatic detection of new operating conditions: when data cannot be classified into any known operating condition, the operating condition is marked as a potential new operating condition. The working condition database is dynamically updated, and newly confirmed working conditions are added to the known working condition database as the basis for working condition detection and identification. Statistical features are calculated for the data within each window, and these features are matched with all currently known operating conditions using Mahalanobis distance. When the minimum Mahalanobis distance of a certain window is greater than a set threshold, and the distance difference between it and the next closest operating condition exceeds a set fuzzy boundary, the data in that window is identified as a potential new operating condition.

4. The method for predicting the temperature of a permanent magnet synchronous motor in a vehicle powertrain according to claim 1, characterized in that, When using Mahalanobis distance clustering algorithm to detect and classify motor operating conditions, a continuous window confirmation mechanism is introduced. The default setting is that a new operating condition is only confirmed as a real new operating condition when three consecutive windows are judged as such. The mean and covariance matrix of the new operating condition are automatically calculated, and a unique number is assigned to it. The new operating condition is stored in a local file and updated in the operating condition model dictionary.

5. The method for predicting the temperature of a permanent magnet synchronous motor in a vehicle powertrain according to claim 1, characterized in that, For existing clustered working conditions, each known working condition requires an initial training model as the basis for prediction and is stored in a dictionary. This allows a new set of data to be detected by the working condition detection module. If the new working condition is identified as an old working condition, the model corresponding to the existing working condition can be used directly for prediction. If it is determined to be a new working condition, the parameters are updated using the existing working condition that is closest to it in terms of the calculated Mahalanobis distance.

6. The method for predicting the temperature of a permanent magnet synchronous motor in a vehicle powertrain according to claim 1, characterized in that, The process of constructing an LSTM autoregressive model to predict temperature for a single operating condition involves: inputting data into two stacked LSTM layers to learn complex deep temporal dynamic patterns in the data; the output of the first LSTM layer is used as the input to the second LSTM layer; each LSTM layer contains 128 neurons; dropout is set to 0.2; during training, 20% of the neuron connections are randomly dropped. When constructing a Transformer autoregressive model to predict temperature for a single operating condition, the encoder of the Transformer autoregressive model consists of four identical stacked sub-layers. Each layer contains a self-attention mechanism and a feedforward neural network. The self-attention mechanism uses eight attention heads, each independently calculating attention weights to capture different semantic information; finally, the results are concatenated.

7. The method for predicting the temperature of a permanent magnet synchronous motor in a vehicle powertrain system according to claim 1, characterized in that, The final layer of the composite model is a ridge regression layer. An L2 regularization term is added to the loss function of the standard linear regression. Assuming a linear relationship between the input variable and the temperature under the new operating condition, the ridge regression layer is calculated as follows: in, For the predicted value, for the first... n The weights of each input. For the first n There are two input values, b is the bias. The optimization objective of the ridge regression layer during the optimization process is: in, This is the actual value. The hyperparameters used to control the regularization strength.

8. A temperature prediction system for a permanent magnet synchronous motor in a vehicle powertrain, characterized in that, It includes a feature determination module, a working condition classification module, and a prediction module; The feature determination module is used to collect motor operating data and determine the features that affect the motor temperature change; The operating condition segmentation module is used to detect and segment the operating conditions of the motor using the Mahalanobis distance clustering algorithm; The prediction module predicts the temperature for each individual operating condition based on the LSTM autoregressive model and the Transformer autoregressive model. A Mahalanobis distance classifier is constructed using a real-time sliding window to achieve automatic identification of new working conditions. By freezing the basic model parameters and combining the incremental ridge regression layer strategy, the model is trained with sample points of new working conditions to complete the parameter update process. Temperature prediction of permanent magnet synchronous motor under varying operating conditions is achieved using a composite model with updated parameters.

9. A computer device, characterized in that, It includes a processor and a memory, the memory being used to store a computer-executable program, the processor reading part or all of the computer-executable program from the memory and executing it, and the processor executing part or all of the computer-executable program is able to implement the temperature prediction method for a permanent magnet synchronous motor in a vehicle power system as described in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, A computer-readable storage medium stores a computer program that, when executed by a processor, enables the implementation of a method for predicting the temperature of a permanent magnet synchronous motor in a vehicle power system as described in any one of claims 1-7.