Parameter prediction method, device, equipment, medium, product and vehicle
By introducing a target model based on LSTM and attention mechanism in motor parameter prediction, the problems of low efficiency and poor accuracy of motor parameter prediction in the prior art are solved, and more efficient and accurate motor parameter prediction is achieved, and control effect and operation efficiency are improved.
Patent Information
- Application Number
- CN202510016509.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-06
- Publication Date
- 2025-04-08
AI Technical Summary
In the prior art, the prediction of permanent magnet synchronous motor parameters is low and the accuracy is poor.
The target model based on the long and short-term memory network LSTM and attention mechanism is adopted. By obtaining parameters such as stator voltage, stator current and rotor speed during motor operation, the weight of each parameter is determined, and the stator resistance, motor inductance and magnetic resonance of the motor is predicted through the model.
The efficiency and accuracy of predicting motor parameters are improved, and the motor parameters can be determined more accurately, thereby improving control effect and operating efficiency.
Smart Images

Figure CN119787902A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and specifically to a parameter prediction method, device, equipment, medium, product and vehicle. Background Art
[0002] With the rapid development and popularization of electric vehicles, in the field of new energy vehicles, permanent magnet synchronous motors (PMSM) have the characteristics of small size, high efficiency, high power factor, and stable speed regulation performance. However, to achieve high performance and high precision control of permanent magnet synchronous motors, it is necessary to accurately obtain the motor parameters of permanent magnet synchronous motors (such as stator resistance, d-axis inductance, q-axis inductance, permanent magnet flux, etc.).
[0003] In the related art, patent CN 114696704 A constructs an Attention-LSTM-RNN model and trains the Attention-LSTM-RNN model. Based on the acquired motor data, the Attention-LSTM-RNN model is used to identify the motor rotor resistance. This method trains the required model through the Attention Mechanism, Long Short-Term Memory (LSTM) and Recurrent Neural Network (RNN), and identifies the motor rotor resistance. The introduction of a large number of network models in this way will make the trained model more complex, resulting in lower efficiency and poor accuracy in parameter identification.
[0004] In another related technology, patent CN 112633317 A predicts the wind turbine data to be predicted by constructing a CNN-LSTM model, training the CNN-LSTM model, and introducing an attention mechanism to obtain the prediction result of the wind turbine failure. This method also introduces convolutional neural networks (CNN), which makes the complexity of the trained model higher. And it predicts the wind turbine data based on the CNN-LSTM model to predict the wind turbine failure, not the motor parameters. It is to ensure the safe operation of wind power generation equipment, and the wind turbine and the motor are two different devices.
[0005] In summary, in the current technical solutions for determining motor parameters, the efficiency of predicting motor parameters is low and the accuracy is poor. Summary of the invention
[0006] The present application provides a parameter prediction method, device, equipment, medium, product and vehicle. The purpose of the present application is to at least solve the technical problems of low efficiency and poor accuracy in predicting motor parameters in related technologies.
[0007] In order to achieve the above purpose, the technical solution adopted in this application is as follows:
[0008] According to the first aspect provided by the present application, a parameter prediction method is provided, the method comprising: obtaining a first parameter group when the motor is running, the first parameter group comprising: stator voltage, stator current and rotor speed; determining the weight of each parameter in the first parameter group based on a target model, the target model being a model trained based on a long short-term memory network LSTM and an attention mechanism; based on the first parameter group and the weight of each parameter in the first parameter group, predicting a second parameter group of the motor through the target model, the second parameter group comprising at least one of the following: stator resistance, motor inductance and magnetic flux.
[0009] According to the above technical means, the present application can obtain a first parameter group including stator voltage, stator current and rotor speed when the motor is running, and then determine the weight of each parameter in the first parameter group based on the target model obtained by training the long short-term memory network LSTM and the attention mechanism, thereby determining the weight of the stator voltage, the weight of the stator current and the weight of the rotor speed. In this way, based on the first parameter group and the weight of each parameter in the first parameter group, the stator resistance, motor inductance and magnetic flux of the motor can be predicted through the target model. In this way, the weight of each parameter can be determined through the attention mechanism in the target model, so that when predicting the stator resistance, motor inductance and magnetic flux of the motor through the target model, the weight of each parameter can be comprehensively considered, thereby improving the efficiency and accuracy of predicting the motor parameters.
[0010] In a possible implementation, the above-mentioned determination of the weight of each parameter in the first parameter group based on the target model includes: determining a first correlation parameter and a second correlation parameter based on the target model; the first correlation parameter is used to indicate the correlation between hidden states of the stator current at two moments, and the second correlation parameter is used to indicate the correlation between hidden states of the stator voltage at two moments; determining the weight of the stator current based on the first correlation parameter, and determining the weight of the stator voltage based on the second correlation parameter, the weight of the stator current is used to predict the stator resistance, and the weight of the stator voltage is used to predict the motor inductance.
[0011] According to the above technical means, the present application can determine the first correlation parameter between the hidden states of the stator current at two moments, and the second correlation parameter between the hidden states of the stator voltage at two moments, so as to determine the weight of the stator current based on the first correlation parameter to predict the stator resistance; and determine the weight of the stator voltage based on the second correlation parameter to predict the motor inductance. In this way, when determining the weight of the stator current and the weight of the stator voltage, according to the correlation between the hidden states of the stator current and the stator voltage at two moments, the weights at different times can be comprehensively considered, and the corresponding weights can be adjusted by autonomous learning, so that the weights of each parameter can be determined more accurately.
[0012] In one possible implementation, the target model is obtained by: obtaining multiple first parameter groups of the motor within a preset historical time length; sequentially inputting the multiple first parameter groups within the preset historical time length into an LSTM including an attention mechanism for training, adjusting the model parameters of the LSTM, and obtaining the target model.
[0013] According to the above technical means, the present application can train the LSTM including the attention mechanism through multiple first parameter groups of the motor within a preset historical time length to adjust the model parameters of the LSTM and obtain the target model. In this way, by introducing the attention mechanism in the LSTM, the weight of the parameter can be determined, thereby improving the accuracy of the predicted other parameters when predicting other parameters.
[0014] In a possible implementation, the above-mentioned acquisition of multiple first parameter groups of the motor within a preset historical time length includes: performing data normalization processing on the stator voltage, stator current and rotor speed of the motor acquired within the preset historical time length to obtain the stator voltage, stator current and rotor speed after data normalization; grouping the stator voltage, stator current and rotor speed after data normalization based on time sequence to obtain multiple first parameter groups, the preset historical time length is divided into multiple continuous historical sub-time lengths, and each first parameter group includes the normalized stator voltage, stator current and rotor speed corresponding to a historical sub-time length.
[0015] According to the above technical means, the present application can first perform data normalization processing on the stator voltage, stator current and rotor speed of the motor within the preset historical time length, and obtain the stator voltage, stator current and rotor speed after data normalization. In this way, when processing the data subsequently, the efficiency of data processing can be improved by the normalized data. In addition, by grouping the stator voltage, stator current and rotor speed after data normalization in chronological order, multiple first parameter groups are obtained. The LSTM including the attention mechanism can be trained by time series data to obtain a model with higher accuracy in predicting parameters.
[0016] In a possible implementation, the above-mentioned method of sequentially inputting multiple first parameter groups within a preset historical time length into an LSTM including an attention mechanism for training, adjusting the model parameters of the LSTM, and obtaining a target model includes: sequentially inputting multiple first parameter groups into an LSTM including an attention mechanism to obtain prediction parameters corresponding to each first parameter group; comparing the prediction parameters corresponding to each first parameter group with the actual parameters corresponding to each first parameter group to determine the error parameters corresponding to each first parameter group; when the error parameter is greater than or equal to a preset error value, adjusting the model parameters of the LSTM; when the error parameter is less than a preset error value, obtaining the target model.
[0017] According to the above technical means, the present application can sequentially input multiple first parameter groups into the LSTM including the attention mechanism to obtain the prediction parameters corresponding to each first parameter group. Then, the prediction parameters corresponding to each first parameter group are compared with the actual parameters corresponding to each first parameter group to determine the error parameters corresponding to each first parameter group. Thus, when the error parameter is greater than or equal to the preset error value, the model parameters of the LSTM are adjusted; and when the error parameter is less than the preset error value, the trained target model is obtained. In this way, according to the error between the prediction parameters and the actual parameters obtained when training the LSTM, the model parameters of the LSTM are adjusted to meet the preset requirements to train a target model with higher accuracy.
[0018] In a possible implementation, the above-mentioned inputting multiple first parameter groups into the LSTM including the attention mechanism in sequence to obtain the prediction parameters corresponding to each first parameter group includes: inputting multiple first parameter groups into the LSTM including the attention mechanism in sequence, and determining the weight corresponding to each first parameter group based on the attention mechanism; and determining the prediction parameters corresponding to each first parameter group based on the weight corresponding to each first parameter group.
[0019] According to the above-mentioned technical means, when training LSTM through multiple first parameter groups, the present application can combine the attention mechanism to determine the weight corresponding to each first parameter group, so that when training LSTM, the weight of each parameter is comprehensively considered to more accurately determine the prediction parameters corresponding to each first parameter group, thereby training a target model with higher accuracy.
[0020] In a possible implementation manner, the method further includes: controlling operating parameters of the motor based on the second parameter group to control the torque accuracy of the motor.
[0021] According to the above-mentioned technical means, after predicting the stator resistance, motor inductance and magnetic flux of the motor through the target model, the present application can control the operating parameters of the motor based on these parameters to control the torque accuracy of the motor, thereby improving the control effect of the motor and improving the operating efficiency of the motor.
[0022] According to the second aspect provided by the present application, a parameter prediction device is provided, and the parameter prediction device includes: an acquisition module and a processing module; the acquisition module is used to acquire a first parameter group when the motor is running, and the first parameter group includes: stator voltage, stator current and rotor speed; the processing module is used to determine the weight of each parameter in the first parameter group based on a target model, and the target model is a model trained based on a long short-term memory network LSTM and an attention mechanism; the processing module is also used to predict a second parameter group of the motor through a target model based on the first parameter group and the weight of each parameter in the first parameter group, and the second parameter group includes at least one of the following: stator resistance, motor inductance and magnetic flux.
[0023] In one possible implementation, a processing module is specifically used to determine a first correlation parameter and a second correlation parameter based on a target model; the first correlation parameter is used to indicate the correlation between hidden states of a stator current at two moments, and the second correlation parameter is used to indicate the correlation between hidden states of a stator voltage at two moments; the processing module is specifically used to determine a weight of a stator current based on the first correlation parameter, and to determine a weight of a stator voltage based on the second correlation parameter, the weight of the stator current is used to predict a stator resistance, and the weight of the stator voltage is used to predict a motor inductance.
[0024] In one possible implementation, the acquisition module is also used to obtain multiple first parameter groups of the motor within a preset historical time length; the processing module is also used to sequentially input the multiple first parameter groups within the preset historical time length into the LSTM including the attention mechanism for training, adjust the model parameters of the LSTM, and obtain the target model.
[0025] In one possible implementation, the processing module is also used to perform data normalization processing on the stator voltage, stator current and rotor speed of the motor acquired within a preset historical time length to obtain the stator voltage, stator current and rotor speed after data normalization; the processing module is also used to group the stator voltage, stator current and rotor speed after data normalization based on time sequence to obtain multiple first parameter groups, the preset historical time length is divided into multiple continuous historical sub-time lengths, and each first parameter group includes the stator voltage, stator current and rotor speed after data normalization corresponding to a historical sub-time length.
[0026] In one possible implementation, a processing module is specifically used to sequentially input multiple first parameter groups into an LSTM including an attention mechanism to obtain prediction parameters corresponding to each first parameter group; a processing module is specifically used to compare the prediction parameters corresponding to each first parameter group with the actual parameters corresponding to each first parameter group to determine the error parameters corresponding to each first parameter group; a processing module is specifically used to adjust the model parameters of the LSTM when the error parameter is greater than or equal to a preset error value; and a processing module is specifically used to obtain a target model when the error parameter is less than a preset error value.
[0027] In one possible implementation, the processing module is specifically used to sequentially input multiple first parameter groups into an LSTM including an attention mechanism, and determine the weight corresponding to each first parameter group based on the attention mechanism; the processing module is specifically used to determine the prediction parameter corresponding to each first parameter group based on the weight corresponding to each first parameter group.
[0028] In a possible implementation manner, the parameter prediction device further includes: a control module; and a control module configured to control the operating parameters of the motor based on the second parameter group to control the torque accuracy of the motor.
[0029] According to the third aspect provided by the present application, an electronic device is provided, comprising: a processor; a memory for storing processor executable instructions; wherein the processor is configured to execute instructions to implement the method of the above-mentioned first aspect and any possible implementation manner thereof.
[0030] According to the fourth aspect provided by the present application, a computer-readable storage medium is provided. When the instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device executes the method in the above-mentioned first aspect and any possible implementation method thereof.
[0031] According to the fifth aspect provided by the present application, a computer program product is provided, the computer program product comprising computer instructions, and when the computer instructions are executed on an electronic device, the electronic device executes the method of the above-mentioned first aspect and any possible implementation manner thereof.
[0032] According to a sixth aspect provided by the present application, a vehicle is provided, the vehicle comprising a parameter prediction device as in the second aspect, the vehicle being used to implement a method as in the first aspect and any possible implementation manner thereof.
[0033] Therefore, the above technical features of the present application have the following beneficial effects:
[0034] (1) The present application can obtain a first parameter group including stator voltage, stator current and rotor speed when the motor is running, and then determine the weight of each parameter in the first parameter group based on the target model obtained by training the long short-term memory network LSTM and the attention mechanism, thereby determining the weight of the stator voltage, the weight of the stator current and the weight of the rotor speed. In this way, based on the first parameter group and the weight of each parameter in the first parameter group, the stator resistance, motor inductance and magnetic flux of the motor can be predicted through the target model. In this way, the weight of each parameter can be determined through the attention mechanism in the target model, so that when predicting the stator resistance, motor inductance and magnetic flux of the motor through the target model, the weight of each parameter can be comprehensively considered, thereby improving the efficiency and accuracy of predicting the motor parameters.
[0035] (2) The present application can determine a first correlation parameter between the hidden states of the stator current at two moments, and a second correlation parameter between the hidden states of the stator voltage at two moments, thereby determining the weight of the stator current based on the first correlation parameter to predict the stator resistance; and determining the weight of the stator voltage based on the second correlation parameter to predict the motor inductance. In this way, when determining the weight of the stator current and the weight of the stator voltage, according to the correlation between the hidden states of the stator current and the stator voltage at two moments, the weights at different times can be comprehensively considered, and the corresponding weights can be adjusted by autonomous learning, so that the weights of each parameter can be determined more accurately.
[0036] (3) The present application can train an LSTM including an attention mechanism through multiple first parameter groups of the motor within a preset historical time length to adjust the model parameters of the LSTM to obtain a target model. In this way, by introducing the attention mechanism in the LSTM, the weight of the parameter can be determined, thereby improving the accuracy of the predicted other parameters when predicting other parameters.
[0037] (4) The present application can first perform data normalization processing on the stator voltage, stator current and rotor speed of the motor within the preset historical time length, and obtain the stator voltage, stator current and rotor speed after data normalization. In this way, when processing the data subsequently, the efficiency of data processing can be improved by using the normalized data. In addition, multiple first parameter groups are obtained by grouping the stator voltage, stator current and rotor speed after data normalization in chronological order. The LSTM including the attention mechanism can be trained by time series data to obtain a model with higher accuracy in predicting parameters.
[0038] (5) The present application can sequentially input multiple first parameter groups into an LSTM including an attention mechanism to obtain prediction parameters corresponding to each first parameter group. Then, the prediction parameters corresponding to each first parameter group are compared with the actual parameters corresponding to each first parameter group to determine the error parameters corresponding to each first parameter group. Thus, when the error parameter is greater than or equal to the preset error value, the model parameters of the LSTM are adjusted; and when the error parameter is less than the preset error value, the trained target model is obtained. In this way, according to the error between the prediction parameters and the actual parameters obtained when training the LSTM, the model parameters of the LSTM are adjusted to meet the preset requirements, so as to train a target model with higher accuracy.
[0039] (6) When training LSTM through multiple first parameter groups, the present application can combine the attention mechanism to determine the weight corresponding to each first parameter group, so that when training LSTM, the weight of each parameter is comprehensively considered to more accurately determine the prediction parameters corresponding to each first parameter group, thereby training a target model with higher accuracy.
[0040] (7) After predicting the stator resistance, motor inductance and magnetic flux of the motor through the target model, the present application can control the operating parameters of the motor based on these parameters to control the torque accuracy of the motor, thereby improving the control effect of the motor and improving the operating efficiency of the motor.
[0041] It should be noted that the technical effects brought about by any implementation method in the second to sixth aspects can refer to the technical effects brought about by the corresponding implementation method in the first aspect, and will not be repeated here.
[0042] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] The drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present application, and together with the specification are used to explain the principles of the present application, and do not constitute an improper limitation on the present application.
[0044] Figure 1 is a structural schematic diagram of a parameter prediction system according to an exemplary embodiment;
[0045] Figure 2 is a flow chart of a parameter prediction method according to an exemplary embodiment;
[0046] Figure 3 is a flow chart of another parameter prediction method according to an exemplary embodiment;
[0047] Figure 4is a flow chart of another parameter prediction method according to an exemplary embodiment;
[0048] Figure 5 is a flow chart of another parameter prediction method according to an exemplary embodiment;
[0049] Figure 6 is a structural schematic diagram of another parameter prediction system according to an exemplary embodiment;
[0050] Figure 7 is a block diagram of a parameter prediction device according to an exemplary embodiment;
[0051] Figure 8 It is a block diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION
[0052] In order to enable ordinary persons in the art to better understand the technical solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings.
[0053] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. On the contrary, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the attached claims.
[0054] At present, the methods for identifying the parameters of motors (such as PMSM) are divided into static identification methods and dynamic identification methods according to the running state of the motor. The static identification method includes the laboratory test method, and the dynamic identification method includes the recursive least squares method, the extended Kalman filter and the intelligent algorithm. However, these methods have many problems in practical applications. For example, although the laboratory test method has high identification results, it requires shutdown testing and is not suitable for online application; the recursive least squares method uses a recursive algorithm to update parameters in real time when the motor is online. Although the convergence speed is fast, it is sensitive to noise; the extended Kalman filter uses the state estimation method to identify parameters online, which has good noise resistance, but the computational complexity is high; the intelligent algorithm (such as neural network) uses the learning ability of the network to identify parameters, which can better handle complex nonlinear relationships, but requires a large amount of training data and computing resources. Therefore, how to further improve the accuracy, robustness and real-time performance of the identification algorithm is an urgent problem to be solved.
[0055] The parameter prediction method provided in the embodiment of the present application can be applied to a parameter prediction system. Figure 1 A schematic diagram of the structure of a parameter prediction system is shown. Figure 1 As shown, the parameter prediction system 10 includes: an electronic device 11 and a motor 12. The electronic device may be an electronic control unit (ECU) on a vehicle, or a processing device (such as a host computer, a computer, etc.) external to the vehicle.
[0056] The electronic device 11 can obtain a first parameter group when the motor 12 is running, and the first parameter group includes: stator voltage, stator current and rotor speed.
[0057] The electronic device 11 can also determine the weight of each parameter in the first parameter group based on a target model, where the target model is a model trained based on a long short-term memory network LSTM and an attention mechanism.
[0058] The electronic device 11 can also predict a second parameter group of the motor 12 through a target model based on the first parameter group and the weight of each parameter in the first parameter group, where the second parameter group includes at least one of the following: stator resistance, motor inductance, and flux linkage.
[0059] The parameter prediction method provided in the embodiment of the present application is used to predict parameters such as the stator resistance, motor inductance and magnetic flux of a motor, thereby solving the technical problems of low efficiency and poor accuracy in predicting motor parameters.
[0060] For ease of understanding, the parameter prediction method provided in this application is specifically introduced below with reference to the accompanying drawings.
[0061] Figure 2 is a flow chart of a parameter prediction method according to an exemplary embodiment. Figure 2 As shown, the method includes the following S201-S203:
[0062] S201, obtaining a first parameter group when the motor is running.
[0063] The first parameter group includes: stator voltage, stator current and rotor speed.
[0064] Optionally, during the operation of the motor, when it is necessary to determine parameters such as the stator resistance, motor inductance and magnetic flux of the motor, parameters such as the stator voltage, stator current and rotor speed of the motor can be obtained in real time, so as to predict parameters such as the stator resistance, motor inductance and magnetic flux of the motor through a pre-trained target model.
[0065] Optionally, the motor in the embodiment of the present application may be a permanent magnet synchronous motor (PMSM), or other types of motors, such as an asynchronous motor, a stepper motor, etc. The embodiment of the present application is described exemplarily by taking a permanent magnet synchronous motor (PMSM) as an example.
[0066] It should be noted that the motor inductance can be understood as the d-axis inductance and q-axis inductance corresponding to the motor, and the magnetic flux can be understood as the permanent magnet magnetic flux; the stator voltage can be understood as including the d-axis voltage and q-axis voltage corresponding to the stator, and the stator current can be understood as including the d-axis current and q-axis current corresponding to the stator.
[0067] It can be understood that the parameters included in the first parameter group can be understood as parameters that can be collected in real time by sensors, and the parameters included in the second parameter group described below can be understood as parameters that are not easy to be collected in real time by sensors.
[0068] S202: Determine the weight of each parameter in the first parameter group based on the target model.
[0069] Among them, the target model is a model trained based on the long short-term memory network LSTM and attention mechanism.
[0070] Optionally, the target model is a model obtained by training after the attention mechanism is introduced in advance into the LSTM. It can be understood that the target model is a model that includes various functions of both the LSTM and the attention mechanism. For the training process of the target model, please refer to the following description, which will not be repeated here.
[0071] Optionally, the weight of each parameter in the first parameter group may be determined based on an attention mechanism in the target model.
[0072] It should be noted that LSTM is good at processing a large amount of complex time series data. In the process of motor parameter identification, it is necessary to capture the dynamic changes of motor parameters during operation. LSTM can effectively capture and utilize long-term dependencies through its memory units to improve the accuracy of parameter identification. In addition, LSTM has a certain robustness to the noise in the motor input signal. It filters out some noise through the gating mechanism inside its network, thereby improving the stability and reliability of the identification results. Therefore, LSTM can be applied to the task of permanent magnet synchronous motor parameter identification.
[0073] Furthermore, by introducing the attention mechanism into LSTM and determining the weight of each parameter in the first parameter group (i.e., the attention weight), the motor input information (i.e., the parameters in the stator voltage, stator current, and rotor speed) that the target model focuses on at each time step (which can be understood as a unit time or time period) can be clearly determined, thereby improving the interpretability of the model. The LSTM with the attention mechanism can selectively capture key information (parameters), reduce the loss of feature information, and further enhance the overall efficiency and effect of the model.
[0074] In some embodiments, Figure 3 As shown, in a parameter prediction method provided in an embodiment of the present application, the above S202 may specifically include S301-S302:
[0075] S301. Determine a first correlation parameter and a second correlation parameter based on a target model.
[0076] The first correlation parameter is used to indicate the correlation between the hidden states of the stator current at two moments, and the second correlation parameter is used to indicate the correlation between the hidden states of the stator voltage at two moments.
[0077] Optionally, based on the attention mechanism in the target model, a first correlation parameter between the hidden states of the stator current at two moments and a second correlation parameter between the hidden states of the stator voltage at two moments can be determined.
[0078] Specifically, the attention mechanism can highlight key timing information by assigning different weights to data at different times, so as to better identify motor parameters. The first correlation parameter and the second correlation parameter can be determined by the following formula 1 (correlation function).
[0079]
[0080] Where: e t,t, represents the hidden state h of the stator current or stator voltage at time t t The hidden state h of the stator current or stator voltage at time t t, Correlation parameter between a is a learnable weight vector, W a is a learnable weight matrix, b a is a learnable bias vector, W a and b a are the model parameters in LSTM.
[0081] S302: Determine a weight of the stator current based on the first correlation parameter, and determine a weight of the stator voltage based on the second correlation parameter.
[0082] Among them, the weight of the stator current is used to predict the stator resistance, and the weight of the stator voltage is used to predict the motor inductance.
[0083] Furthermore, based on the first correlation parameter corresponding to the stator current and the second correlation parameter corresponding to the stator voltage determined by the above formula 1, the weight of the stator current can be determined based on the first correlation parameter, and the weight of the stator voltage can be determined based on the second correlation parameter through the following formula 2 (weight function).
[0084]
[0085] Among them, α t,t, Indicates the weight of the stator current or the weight of the stator voltage.
[0086] Thus, the present application introduces an attention mechanism, so that when the target model predicts the resistance parameter of the motor (i.e., the stator resistance), the target model pays more attention to the current input characteristics (i.e., the stator current, for example, i a ,i b ,i c ) is a first correlation parameter between the hidden state at time t and the hidden state at time t'. When the target model predicts the inductance parameter of the motor (i.e., the motor inductance), the target model pays more attention to the voltage input feature (i.e., the stator voltage, such as v a , v b , v c ) is the second correlation parameter between the hidden state at time t and the hidden state at time t'. In this way, the attention mechanism can automatically learn and adjust the weights of the input sequence at different times to better predict various parameters of the motor.
[0087] In an embodiment of the present application, the present application can determine a first correlation parameter between hidden states of the stator current at two moments, and a second correlation parameter between hidden states of the stator voltage at two moments, thereby determining the weight of the stator current based on the first correlation parameter to predict the stator resistance; and determining the weight of the stator voltage based on the second correlation parameter to predict the motor inductance. In this way, when determining the weight of the stator current and the weight of the stator voltage, according to the correlation between the hidden states of the stator current and the stator voltage at two moments, the weights at different times can be comprehensively considered, and the corresponding weights can be adjusted by autonomous learning, so that the weights of each parameter can be determined more accurately.
[0088] S203 . Predict a second parameter group of the motor using a target model based on the first parameter group and the weight of each parameter in the first parameter group.
[0089] The second parameter group includes at least one of the following: stator resistance, motor inductance and flux linkage.
[0090] Optionally, when predicting the second parameter group of the motor through the target model based on the first parameter group, the stator resistance, motor inductance and flux linkage can be determined according to the weight of each parameter in the first parameter group determined above.
[0091] It can be understood that the target model can dynamically adjust the weights of the input features (i.e., the parameters included in the first parameter group), significantly improving the accuracy and robustness of the predicted motor parameters (i.e., the parameters included in the second parameter group). And by determining the correlation parameters with the attention mechanism, the target model can automatically focus on the input features related to the motor parameters, thereby effectively optimizing the way information is used, which not only improves the performance of the model, but also provides more interpretability and credibility for explaining model decisions.
[0092] In an embodiment of the present application, the present application can obtain a first parameter group including stator voltage, stator current and rotor speed when the motor is running, and then determine the weight of each parameter in the first parameter group based on the target model obtained by training the long short-term memory network LSTM and the attention mechanism, thereby determining the weight of the stator voltage, the weight of the stator current and the weight of the rotor speed. In this way, based on the first parameter group and the weight of each parameter in the first parameter group, the stator resistance, motor inductance and magnetic flux of the motor can be predicted through the target model. In this way, the weight of each parameter can be determined through the attention mechanism in the target model, so that when predicting the stator resistance, motor inductance and magnetic flux of the motor through the target model, the weight of each parameter can be comprehensively considered, thereby improving the efficiency and accuracy of predicting the motor parameters.
[0093] In some embodiments, after the second parameter group is obtained through target model prediction, the operating parameters of the motor can be controlled based on the second parameter group to control the torque accuracy of the motor.
[0094] In this way, by embedding the attention mechanism in LSTM, not only can the key features of the motor input signal be effectively captured and the learning ability of the neural network be enhanced, but the accuracy of the motor parameter identification task can also be greatly improved. By accurately identifying the motor parameters, the PMSM can be controlled with high performance and more precision, so that the torque accuracy of the controlled PMSM is improved by about 10% and the motor efficiency is improved by about 0.1%. At the same time, after the target model is trained, the manual calibration work can be reduced, which greatly improves the work efficiency.
[0095] In an embodiment of the present application, after predicting the stator resistance, motor inductance and magnetic flux of the motor through the target model, the present application can control the operating parameters of the motor based on these parameters to control the torque accuracy of the motor, thereby improving the control effect on the motor and improving the operating efficiency of the motor.
[0096] In some embodiments, Figure 4 As shown, in a parameter prediction method provided in an embodiment of the present application, the target model can be obtained through S401-S402:
[0097] S401, obtaining a plurality of first parameter groups of a motor within a preset historical time period.
[0098] Optionally, the timing data of each sensor during the operation of the PMSM can be obtained, including the stator voltage (U d , U q ) time series data, stator current (i d ,i q ) timing data, rotor speed (n), etc.
[0099] Then, the obtained stator voltage (U d , U q ) time series data, stator current (i d ,i q )’s timing data and rotor speed (n) are processed to obtain a plurality of first parameter groups.
[0100] In some embodiments, obtaining multiple first parameter groups of the motor within a preset historical time length may specifically include: performing data normalization processing on the stator voltage, stator current, and rotor speed of the motor within the preset historical time length to obtain the stator voltage, stator current, and rotor speed after the data normalization. Then, the stator voltage, stator current, and rotor speed after the data normalization are grouped based on the time sequence to obtain multiple first parameter groups.
[0101] The preset historical duration is divided into a plurality of continuous historical sub-durations, and each first parameter group includes normalized stator voltage, stator current and rotor speed corresponding to a historical sub-duration.
[0102] Optionally, in order to improve the stability of the model during training and reduce the training time, the acquired data can be normalized using the following formula 3 to keep the data range between 0 and 1.
[0103]
[0104] Furthermore, the normalized stator voltage, stator current and rotor speed may be serialized to divide the time series data into multiple sample sequences, each with a length of T, thereby obtaining multiple first parameter groups, each of which is a first parameter group.
[0105] In an embodiment of the present application, the present application can first perform data normalization processing on the stator voltage, stator current and rotor speed of the motor within the preset historical time length, and obtain the stator voltage, stator current and rotor speed after data normalization. In this way, when processing data subsequently, the efficiency of data processing can be improved by the normalized data. In addition, by grouping the stator voltage, stator current and rotor speed after data normalization in chronological order, multiple first parameter groups are obtained. The LSTM including the attention mechanism can be trained by time series data to obtain a model with higher accuracy in predicting parameters.
[0106] S402. Input multiple first parameter groups within a preset historical time length into the LSTM including the attention mechanism for training in sequence, adjust the model parameters of the LSTM, and obtain the target model.
[0107] Optionally, LSTM is used to process time series data and can capture the temporal dependency of data. Its basic unit consists of a forget gate, an input gate, an output gate, and a memory unit. The following is the update formula of the LSTM basic unit: Forget gate: f t =σ(W f ·[h t-1 ,x t ]+b f ), input gate: i t =σ(W i ·[h t-1 ,x t ]+b i ), candidate memory cells: Memory unit: Output gate: o t =σ(W o ·[h t-1 ,x t ]+b o ), hidden state: h t =o t ⊙tanh(C t ).
[0108] Where: x t is the input data (including stator voltage, stator current, rotor speed, torque, etc.), h t-1 is the hidden state of LSTM at the previous moment, C t is the memory unit of LSTM, W f , W C , W i , W o is the weight matrix, b f 、b C 、b i 、b ois the bias vector, σ(■) is the sigmoid function, tanh(■) is the hyperbolic tangent function, and ⊙ represents element-by-element multiplication.
[0109] Furthermore, an attention mechanism is introduced into LSTM, so that the key timing information can be highlighted by assigning different weights to data at different time steps according to the correlation function (i.e., the above formula 1) and the weight function (i.e., the above formula 2) corresponding to the attention mechanism, so as to better identify the motor parameters.
[0110] Optionally, based on the weights of the parameters determined by the above formula 2, the context vector at time t can also be determined based on the following formula 4.
[0111]
[0112] Among them, α t,t, represents the weight of the stator current or the weight of the stator voltage, c t Represents the context vector at time t.
[0113] In some embodiments, Figure 5 As shown, in a parameter prediction method provided in an embodiment of the present application, the above step S402 may specifically include S501-S504:
[0114] S501. Input multiple first parameter groups into the LSTM including the attention mechanism in sequence to obtain the prediction parameters corresponding to each first parameter group.
[0115] Optionally, after obtaining the target model, the target model can be trained using historical data (i.e., multiple first parameter groups). During the training process, the output of the model can be defined. Thus, the prediction parameters corresponding to each first parameter group are obtained.
[0116] In some embodiments, multiple first parameter groups are sequentially input into an LSTM including an attention mechanism to obtain prediction parameters corresponding to each first parameter group, including: sequentially inputting multiple first parameter groups into an LSTM including an attention mechanism, and determining a weight corresponding to each first parameter group based on the attention mechanism; and determining a prediction parameter corresponding to each first parameter group based on the weight corresponding to each first parameter group.
[0117] Optionally, in the process of training the target model, the weight corresponding to each first parameter group can be determined based on the above formulas 1 and 2, so that the prediction parameters corresponding to each first parameter group can be output through the target model based on the weight corresponding to each first parameter group.
[0118] In an embodiment of the present application, when training LSTM through multiple first parameter groups, the present application can combine the attention mechanism to determine the weight corresponding to each first parameter group, so that when training LSTM, the weight of each parameter is comprehensively considered to more accurately determine the prediction parameters corresponding to each first parameter group, thereby training a target model with higher accuracy.
[0119] S502: Compare the predicted parameters corresponding to each first parameter group with the actual parameters corresponding to each first parameter group to determine the error parameters corresponding to each first parameter group.
[0120] Optionally, after obtaining the prediction parameters corresponding to each first parameter group, a loss function between the prediction parameters and the actual parameters can also be defined Thus, the predicted parameters corresponding to each first parameter group are compared with the actual parameters corresponding to each first parameter group through the loss function to determine the error parameters corresponding to each first parameter group.
[0121] S503: When the error parameter is greater than or equal to a preset error value, adjust the model parameters of the LSTM.
[0122] In this way, the prepared data of known motor parameters (i.e., each first parameter group) is input into the model as a verification data set to obtain the predicted parameters, and the predicted parameters are compared with the actual parameters corresponding to each first parameter group to calculate the error parameters. The error parameters are compared with the pre-set threshold (i.e., the preset error value). If the error parameter is greater than or equal to the preset error value, the parameters of the model need to be adjusted to optimize the weights.
[0123] Optionally, the optimizer may be an Adam optimizer, a Momentum optimizer, or an RMSProp optimizer.
[0124] S504: When the error parameter is less than a preset error value, a target model is obtained.
[0125] Optionally, if the error parameter is less than a preset error value, the identified motor parameters are reasonable and within a preset error range.
[0126] In an embodiment of the present application, the present application can sequentially input multiple first parameter groups into an LSTM including an attention mechanism to obtain prediction parameters corresponding to each first parameter group. Then, the prediction parameters corresponding to each first parameter group are compared with the actual parameters corresponding to each first parameter group to determine the error parameters corresponding to each first parameter group. Thus, when the error parameter is greater than or equal to the preset error value, the model parameters of the LSTM are adjusted; and when the error parameter is less than the preset error value, the trained target model is obtained. In this way, according to the error between the prediction parameters and the actual parameters obtained when training the LSTM, the model parameters of the LSTM are adjusted to meet the preset requirements to train a target model with higher accuracy.
[0127] In an embodiment of the present application, the present application can train an LSTM including an attention mechanism through multiple first parameter groups of the motor within a preset historical time length to adjust the model parameters of the LSTM to obtain a target model. In this way, by introducing the attention mechanism in the LSTM, the weight of the parameter can be determined, thereby improving the accuracy of the predicted other parameters when predicting other parameters.
[0128] The above mainly introduces the solution provided by the embodiment of the present application from the perspective of the method. In order to achieve the above functions, the parameter prediction device or electronic device includes a hardware structure and / or software module corresponding to the execution of each function. It should be easily appreciated by those skilled in the art that, in combination with the units and algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present application.
[0129] For example, Figure 6 As shown in the figure, after collecting the motor parameters of the PMSM, the electrical angular velocity can be converted through the encoder, and then the corresponding stator current (i d ,i q ). Further, the α-axis voltage (i.e., U α ) and β-axis voltage (i.e. U β ), and the α-axis voltage (i.e., U α ) and β-axis voltage (i.e. U β) is input into the space vector pulse width modulation (SVPWM), and then processed by the insulated gate bipolar transistor (IGBT) to obtain the processed stator current (e.g. i a ,i b ,i c ). Further Clark transformation is used to obtain the α-axis current (i.e. α ) and the β-axis current (i β ), and then the required stator current (i d ,i q ). After obtaining the α-axis voltage (i.e. U α ) and β-axis voltage (i.e. U β ) after that, it is also necessary to combine the obtained stator current (i d ,i q ) to reconstruct the voltage to obtain the stator voltage (U d , U q ). Thus, the obtained stator current (i d ,i q ) and stator voltage (U d , U q ) is input into the target model in the parameter prediction module to obtain parameters such as stator resistance, motor inductance and flux linkage.
[0130] The embodiment of the present application can divide the parameter prediction device or electronic device into functional modules according to the above method. For example, the parameter prediction device or electronic device can include various functional modules corresponding to the various functional divisions, or two or more functions can be integrated into one processing module. The above integrated modules can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiment of the present application is schematic and is only a logical functional division. There may be other division methods in actual implementation.
[0131] Figure 7 is a block diagram of a parameter prediction device according to an exemplary embodiment. Figure 7 The parameter prediction device 700 includes: an acquisition module 701 and a processing module 702.
[0132] The acquisition module 701 is used to acquire the first parameter group when the motor is running, and the first parameter group includes: stator voltage, stator current and rotor speed; the processing module 702 is used to determine the weight of each parameter in the first parameter group based on the target model, and the target model is a model trained based on the long short-term memory network LSTM and the attention mechanism; the processing module 702 is also used to predict the second parameter group of the motor through the target model based on the first parameter group and the weight of each parameter in the first parameter group, and the second parameter group includes at least one of the following: stator resistance, motor inductance and flux.
[0133] In one possible implementation, the processing module 702 is specifically used to determine a first correlation parameter and a second correlation parameter based on a target model; the first correlation parameter is used to indicate the correlation between hidden states of the stator current at two moments, and the second correlation parameter is used to indicate the correlation between hidden states of the stator voltage at two moments; the processing module 702 is specifically used to determine the weight of the stator current based on the first correlation parameter, and to determine the weight of the stator voltage based on the second correlation parameter, the weight of the stator current is used to predict the stator resistance, and the weight of the stator voltage is used to predict the motor inductance.
[0134] In one possible implementation, the acquisition module 701 is also used to obtain multiple first parameter groups of the motor within a preset historical time length; the processing module 702 is also used to sequentially input the multiple first parameter groups within the preset historical time length into the LSTM including the attention mechanism for training, adjust the model parameters of the LSTM, and obtain the target model.
[0135] In one possible implementation, the processing module 702 is also used to perform data normalization processing on the stator voltage, stator current and rotor speed of the motor acquired within a preset historical time length to obtain the stator voltage, stator current and rotor speed after data normalization; the processing module 702 is also used to group the stator voltage, stator current and rotor speed after data normalization based on time sequence to obtain multiple first parameter groups, and the preset historical time length is divided into multiple continuous historical sub-time lengths, and each first parameter group includes the stator voltage, stator current and rotor speed after data normalization corresponding to a historical sub-time length.
[0136] In one possible implementation, the processing module 702 is specifically used to sequentially input multiple first parameter groups into the LSTM including the attention mechanism to obtain prediction parameters corresponding to each first parameter group; the processing module 702 is specifically used to compare the prediction parameters corresponding to each first parameter group with the actual parameters corresponding to each first parameter group to determine the error parameters corresponding to each first parameter group; the processing module 702 is specifically used to adjust the model parameters of the LSTM when the error parameter is greater than or equal to a preset error value; the processing module 702 is specifically used to obtain the target model when the error parameter is less than a preset error value.
[0137] In one possible implementation, the processing module 702 is specifically used to sequentially input multiple first parameter groups into an LSTM including an attention mechanism, and determine the weight corresponding to each first parameter group based on the attention mechanism; the processing module 702 is specifically used to determine the prediction parameter corresponding to each first parameter group based on the weight corresponding to each first parameter group.
[0138] In one possible implementation, refer to Figure 7 The parameter prediction device 700 also includes: a control module 703; the control module 703 is used to control the operating parameters of the motor based on the second parameter group to control the torque accuracy of the motor.
[0139] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0140] Figure 8 FIG. 1 is a block diagram of an electronic device according to an exemplary embodiment. Figure 8 As shown, the electronic device 800 includes but is not limited to: a processor 801 and a memory 802 .
[0141] The memory 802 is used to store executable instructions of the processor 801. It can be understood that the processor 801 is configured to execute instructions to implement the parameter prediction method in the above embodiment.
[0142] It should be noted that those skilled in the art can understand that Figure 8 The electronic device structure shown in the figure does not constitute a limitation on the electronic device, and the electronic device may include Figure 8 More or fewer components may be shown, or certain components may be combined, or the components may be arranged differently.
[0143] The processor 801 is the control center of the electronic device. It uses various interfaces and lines to connect various parts of the entire electronic device. By running or executing software programs and / or modules stored in the memory 802, and calling data stored in the memory 802, it performs various functions of the electronic device and processes data, thereby monitoring the electronic device as a whole. The processor 801 may include one or more processing units. Optionally, the processor 801 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 801.
[0144] The memory 802 may be used to store software programs and various data. The memory 802 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required by at least one functional module (such as a processing module, etc.), etc. In addition, the memory 802 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0145] In an exemplary embodiment, a computer-readable storage medium including instructions is also provided, such as a memory 802 including instructions, and the above instructions can be executed by the processor 801 of the electronic device 800 to implement the parameter prediction method in the above embodiment.
[0146] In actual implementation, Figure 7 The functions of the acquisition module 701, the processing module 702 and the control module 703 in Figure 8 The processor 801 in the embodiment calls the computer program stored in the memory 802. The specific execution process can refer to the description of the parameter prediction method in the above embodiment, which will not be repeated here.
[0147] Optionally, the computer-readable storage medium may be a non-temporary computer-readable storage medium, for example, the non-temporary computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0148] In an exemplary embodiment, the present application also provides a computer program product including one or more instructions, and the one or more instructions can be executed by the processor 801 of the electronic device 800 to complete the parameter prediction method in the above embodiment.
[0149] It should be noted that when the instructions in the above-mentioned computer-readable storage medium or one or more instructions in the computer program product are executed by the processor of the electronic device, the various processes of the above-mentioned parameter prediction method embodiment are implemented, and the same technical effect as the above-mentioned parameter prediction method can be achieved. To avoid repetition, they will not be repeated here.
[0150] Through the description of the above implementation methods, technical personnel in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0151] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0152] The units described as separate components may or may not be physically separated, and the components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place or distributed in multiple different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0153] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0154] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or the full classification part or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium, including a number of instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to execute the full classification part or part of the steps of each embodiment method of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, ROM, RAM, disk or CD and other media that can store program code.
[0155] The above are only specific implementations of the present application, but the protection scope of the present application is not limited thereto, and any changes or substitutions within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A parameter prediction method, characterized in that: The method comprises: Acquire a first parameter group when the motor is running, the first parameter group including: stator voltage, stator current and rotor speed; Determine the weight of each parameter in the first parameter group based on a target model, wherein the target model is a model trained based on a long short-term memory network LSTM and an attention mechanism; Based on the first parameter group and the weight of each parameter in the first parameter group, a second parameter group of the motor is predicted by the target model, and the second parameter group includes at least one of the following: stator resistance, motor inductance and flux linkage.
2. The method according to claim 1, characterized in that The step of determining the weight of each parameter in the first parameter group based on the target model comprises: Determining a first correlation parameter and a second correlation parameter based on the target model; the first correlation parameter is used to indicate the correlation between hidden states of the stator current at two moments, and the second correlation parameter is used to indicate the correlation between hidden states of the stator voltage at the two moments; The weight of the stator current is determined based on the first correlation parameter, and the weight of the stator voltage is determined based on the second correlation parameter. The weight of the stator current is used to predict the stator resistance, and the weight of the stator voltage is used to predict the motor inductance.
3. The method according to claim 1 or 2, characterized in that: The target model is obtained by: Acquire a plurality of first parameter groups of the motor within a preset historical time period; The multiple first parameter groups within the preset historical time length are sequentially input into the LSTM including the attention mechanism for training, and the model parameters of the LSTM are adjusted to obtain the target model.
4. The method according to claim 3, characterized in that The step of obtaining a plurality of first parameter groups of the motor within a preset historical time period includes: Performing data normalization processing on the stator voltage, the stator current, and the rotor speed of the motor within the preset historical time length, to obtain the stator voltage, the stator current, and the rotor speed after data normalization; The stator voltage, the stator current and the rotor speed after data normalization are grouped based on the time sequence to obtain the multiple first parameter groups, the preset historical time length is divided into multiple continuous historical sub-time lengths, and each first parameter group includes the stator voltage, the stator current and the rotor speed after data normalization corresponding to a historical sub-time length.
5. The method according to claim 3, characterized in that: The step of sequentially inputting the plurality of first parameter groups within the preset historical duration into the LSTM including the attention mechanism for training, adjusting the model parameters of the LSTM, and obtaining the target model comprises: Inputting the plurality of first parameter groups into the LSTM including the attention mechanism in sequence to obtain prediction parameters corresponding to each first parameter group; Compare the predicted parameters corresponding to each first parameter group with the actual parameters corresponding to each first parameter group to determine the error parameters corresponding to each first parameter group; When the error parameter is greater than or equal to a preset error value, adjusting the model parameters of the LSTM; When the error parameter is less than the preset error value, the target model is obtained.
6. The method according to claim 5, characterized in that The step of sequentially inputting the plurality of first parameter groups into the LSTM including the attention mechanism to obtain prediction parameters corresponding to each first parameter group includes: Inputting the plurality of first parameter groups into the LSTM including the attention mechanism in sequence, and determining a weight corresponding to each first parameter group based on the attention mechanism; Based on the weight corresponding to each first parameter group, the prediction parameter corresponding to each first parameter group is determined.
7. The method according to claim 1, characterized in that The method further comprises: Based on the second parameter group, the operating parameters of the motor are controlled to control the torque accuracy of the motor.
8. A parameter prediction device, characterized in that: The parameter prediction device comprises: an acquisition module and a processing module; The acquisition module is used to acquire a first parameter group when the motor is running, wherein the first parameter group includes: stator voltage, stator current and rotor speed; The processing module is used to determine the weight of each parameter in the first parameter group based on a target model, wherein the target model is a model trained based on a long short-term memory network LSTM and an attention mechanism; The processing module is also used to predict a second parameter group of the motor through the target model based on the first parameter group and the weight of each parameter in the first parameter group, and the second parameter group includes at least one of the following: stator resistance, motor inductance and flux linkage.
9. An electronic device, characterized in that: include: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: When the computer-executable instructions stored in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device executes the method as claimed in any one of claims 1 to 7.
11. A computer program product, characterized in that The computer program product comprises computer instructions, and when the computer instructions are executed on an electronic device, the electronic device is caused to execute the method according to any one of claims 1 to 7.
12. A vehicle, characterized in that: The vehicle comprises the parameter prediction device according to claim 8, and the vehicle is used to implement the method according to any one of claims 1-7.
Citation Information
Patent Citations
CNN-LSTM fan fault prediction method and CNN-LSTM fan fault prediction system based on attention mechanism
CN112633317A