Motor output torque correction method and device based on neural network, and medium

The motor output torque correction method established by neural network optimizes parameters by using the input layer, hidden layer and output layer model, which solves the problem of insufficient accuracy of motor output torque, realizes high-precision torque correction under actual working conditions and avoids the increase of hardware cost.

CN114977953BActive Publication Date: 2026-02-03SHANGHAI LINGANG POWER ELECTRONICS RES INST CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210610595.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-31
Publication Date
2026-02-03
Estimated Expiration
2042-05-31

AI Technical Summary

Technical Problem

Existing motor control software cannot accurately reflect the impact of temperature on motor performance, resulting in insufficient accuracy of motor output torque. Furthermore, bench calibration cannot adapt to complex operating conditions, and there is a lack of effective torque correction methods.

Method used

A neural network-based method for correcting motor output torque is established. Correction models for the input, hidden, and output layers are built using training and test sets. Activation functions and gradient descent optimization algorithms are used to optimize parameters and generate a target model to correct torque deviation.

Benefits of technology

It improves the accuracy of motor output torque, solves the problem of temperature affecting motor performance, meets the requirements of actual working conditions, and avoids increasing hardware costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114977953B_ABST
    Figure CN114977953B_ABST
Patent Text Reader

Abstract

The application provides a motor output torque correction method and device based on a neural network and a medium, relates to the technical field of torque correction, and comprises the following steps: a database and a correction model are established, sample temperature, sample speed, sample d-axis current and sample q-axis current of a training set are input into the correction model, an activation function compensation mapping is used on each neuron of the hidden layer for the input layer, an activation function compensation mapping is used on the hidden layer for the output layer, a gradient descent optimization algorithm is used to optimize parameters of the hidden layer and the output layer, after iterative training, a test set is used for testing, a target model is generated, target d-axis current, target q-axis current, target speed and target temperature are obtained, the target model is used for prediction, a target torque deviation is obtained, and the target torque is corrected based on the target torque deviation, so that the problems of insufficient accuracy and influence on motor performance caused by the fact that the existing motor output torque is not corrected are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of torque correction technology, and in particular to a method, device and medium for correcting motor output torque based on neural networks. Background Technology

[0002] With the gradual development of new energy vehicles, permanent magnet synchronous motors, with their high power density, high efficiency, small size and light weight, are widely used in the transmission system of new energy vehicles.

[0003] It is known that temperature has a significant impact on the stator resistance and flux linkage of the permanent magnet in a motor. Current motor control software strategies include the following two approaches: For resistance, the sum of the cable resistance and stator resistance is measured in a 25°C constant-temperature chamber, and the resistance at other temperatures is converted using the temperature-resistance formula and entered into the motor parameter table; for flux linkage, the flux linkage is measured across the entire speed range at two temperatures (40°C and 85°C), the average data is taken, and the flux linkage across the entire temperature range is obtained through linear interpolation between these two temperatures. Neither of these strategies accurately reflects the impact of temperature on motor performance.

[0004] Secondly, the accuracy of the motor's output torque depends entirely on the results of the motor's bench calibration. Controlling the motor to operate at a constant temperature during bench calibration is extremely difficult. It is impossible to measure the effect of continuous changes in motor temperature on the output torque during bench calibration. Furthermore, due to limitations in bench hardware, there will inevitably be issues with the accuracy of the bench calibration data itself. Moreover, there is no feedback mechanism for torque accuracy deviations caused by these factors, making it unsuitable for adapting to varied and complex operating conditions.

[0005] Some existing solutions require modifying the original structure of the motor, adding electronic components, or adding a torque sensor to obtain a more accurate motor output torque. Therefore, there is a lack of a method that considers the effect of temperature on the motor stator resistance and the magnetic flux linkage of the permanent magnet to correct the output torque. Summary of the Invention

[0006] In order to overcome the above-mentioned technical defects, the purpose of this invention is to provide a method, device and medium for correcting motor output torque based on neural networks, so as to overcome the problem that the existing motor output torque is not corrected, does not match the actual motor performance, is not accurate enough, and affects the motor performance.

[0007] This invention discloses a method for correcting motor output torque based on neural networks, comprising the following:

[0008] Establish a database and a revised model, wherein the database includes a training set and a test set; the revised model includes an input layer, a hidden layer and an output layer, wherein the hidden layer contains m neurons;

[0009] Obtain any data from the training set, including sample d-axis current, sample q-axis current, sample temperature, sample rotation speed, and sample torque deviation;

[0010] The sample temperature, sample rotation speed, sample d-axis current, and sample q-axis current are input to the input layer of the correction model.

[0011] The hidden layer uses activation functions to compensate for the sample temperature, sample rotation speed, sample d-axis current and sample q-axis current of the input layer at each neuron to obtain m intermediate values.

[0012] The output layer uses an activation function to compensate the mapping of the m intermediate values ​​to generate a predicted torque deviation.

[0013] The parameters of the hidden layer and the output layer are optimized using the gradient descent optimization algorithm until the difference between the predicted torque deviation and the sample torque deviation is determined to meet a preset range.

[0014] After iterative training, the model is tested on a test set, and the target model is generated when it meets the preset error range.

[0015] Obtain the target torque, target d-axis current, target q-axis current, target speed, and target temperature;

[0016] The target model is used to predict and obtain the target torque deviation based on the target d-axis current, target q-axis current, target rotational speed, and target temperature.

[0017] The target torque is corrected using the target torque deviation.

[0018] Preferably, the activation function includes the Sigmoid function, the hyperbolic tangent function, or a linear function.

[0019] Preferably, the hidden layer applies activation function compensation mapping to the sample temperature, sample rotation speed, sample d-axis current, and sample q-axis current of the input layer at each neuron to obtain m intermediate values, including:

[0020] The activation function is used to calculate the weighted compensation of each neuron in the hidden layer based on the inputs of the input layer; if the activation function is the Sigmoid function, then any intermediate value can be calculated as follows:

[0021]

[0022] Among them, u j For the j-th neuron u j The intermediate values ​​on the above; x1, x2, x3, and x4 are the d-axis current, q-axis current, temperature, and rotational speed of the input layer, respectively; v ij For each input layer xi Calculate u on the j-th neuron in the hidden layer j The weights, where i = 1, 2, 3, 4; The compensation for the hidden layer is calculated based on all input layers xi.

[0023] Preferably, the output layer uses an activation function to compensate the mapping of the m intermediate values ​​to generate a predicted torque deviation, including the following:

[0024] The activation function is used to perform weighted compensation calculations on each neuron in the hidden layer at the output layer;

[0025] If the activation function is the Sigmoid function, then the predicted torque deviation is calculated as follows:

[0026]

[0027] Where y represents the output layer, i.e., the predicted torque deviation; ω j For the j-th neuron u in the hidden layer j Calculate the weights of the output layer; u j For the j-th neuron u j The intermediate value on; θ y The compensation for the output layer y is calculated based on all neurons in the hidden layer.

[0028] Preferably, the step of optimizing the parameters of the hidden layer and the output layer using the gradient descent optimization algorithm until the difference between the predicted torque deviation and the sample torque deviation meets a preset range includes:

[0029] Establish an objective function, wherein the objective function is: Among them, y (k) To predict torque deviation; The sample torque deviation is represented by k; the number of training iterations is represented by k.

[0030] The objective function is used to differentiate the weights and compensations of the hidden layer and the output layer;

[0031] Adjust the weights and compensations of the hidden layer and the output layer until the difference between the predicted torque deviation and the sample torque deviation meets the preset range.

[0032] Preferably, after establishing the database, the following is also included:

[0033] The torque deviations in the database are standardized based on their respective mean and standard deviation.

[0034] Preferably, a test set is used for testing. If the preset accuracy requirements are not met, the activation function is replaced and the training is repeated.

[0035] Preferably, the preset accuracy requirement includes:

[0036] Determine whether the torque deviation output by the trained modified model meets the error range compared to the torque deviation in the test set. If so, it meets the preset accuracy requirements.

[0037] The present invention also provides a computer device, the computer device comprising:

[0038] Memory, used to store executable program code; and

[0039] The processor is used to call the executable program code in the memory to execute the output torque correction method.

[0040] The present invention also provides a computer-readable storage medium having a computer program stored thereon.

[0041] When the computer program is executed by the processor, it implements the steps of the output torque correction method.

[0042] Compared with existing technologies, the above technical solution has the following advantages:

[0043] The output torque correction method provided by this invention establishes a correction model including an input layer, a hidden layer, and an output layer. The correction model is trained, and compensation mapping is performed on the hidden layer and the output layer based on activation functions. At the same time, the parameters of the hidden layer and the output layer are optimized using a gradient descent optimization algorithm, and tested until the accuracy requirements are met. A target model is generated, and the target model is applied to the target torque to obtain the target torque deviation. The target torque is then corrected, solving the problems of insufficient accuracy and impaired motor performance caused by the lack of correction of the output torque of existing motors. Attached Figure Description

[0044] Figure 1 This is a flowchart of a first embodiment of the neural network-based motor output torque correction method of the present invention;

[0045] Figure 2 This is a flowchart illustrating the operation of a first embodiment of the neural network-based motor output torque correction method described in this invention.

[0046] Figure 3 This is a schematic diagram of the network structure of the correction model or target model in Embodiment 1 of the neural network-based motor output torque correction method of the present invention;

[0047] Figure 4 This is a schematic diagram illustrating how the objective function is used to differentiate the weights and compensations of the hidden layer and the output layer in Embodiment 1 of the neural network-based motor output torque correction method of the present invention.

[0048] Figure 5 This is a schematic diagram of the modules of the computer device described in this invention.

[0049] Figure label:

[0050] 9-Computer equipment; 91-Memory; 92-Processor. Detailed Implementation

[0051] The advantages of the present invention will be further illustrated below with reference to the accompanying drawings and specific embodiments.

[0052] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.

[0053] The terminology used in this disclosure is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. The singular forms “a,” “the,” and “the” as used in this disclosure and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any and all possible combinations of one or more of the associated listed items.

[0054] It should be understood that although the terms first, second, third, etc., may be used in this disclosure to describe various information, such information should not be limited to these terms. These terms are used only to distinguish information of the same type from one another. For example, without departing from the scope of this disclosure, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to determination."

[0055] In the description of this invention, it should be understood that the terms "longitudinal", "lateral", "up", "down", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing this invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this invention.

[0056] In the description of this invention, unless otherwise specified and limited, it should be noted that the terms "installation", "connection" and "linking" should be interpreted broadly. For example, they can refer to mechanical or electrical connections, or internal connections between two components. They can be direct connections or indirect connections through an intermediate medium. Those skilled in the art can understand the specific meaning of the above terms according to the specific circumstances.

[0057] In the following description, suffixes such as "module," "part," or "unit" used to denote elements are used only for the convenience of the description of the invention and have no specific meaning in themselves. Therefore, "module" and "part" can be used interchangeably.

[0058] Example 1: This example provides a neural network-based method for correcting motor output torque. A neural network model is established using current Id, Iq, and temperature T_mtr as inputs. The output torque is corrected based on a neural network algorithm to compensate for the inaccuracy caused by the temperature effect on the motor rotor. For details, please refer to [link to relevant documentation]. Figures 1-4 This includes the following steps:

[0059] S100: Establish a database and refine the model, wherein the database includes a training set and a test set; the refined model includes an input layer, a hidden layer and an output layer, wherein the hidden layer contains m neurons;

[0060] In this embodiment, both the training and test sets of the database contain several data points. The data sources can be bench tests or motor simulations; the data does not need to be continuous or linear. Each data point includes parameters such as d-axis current (Id), q-axis current (Iq), temperature, speed, and torque deviation. For explanation, during torque output, after outputting the initial torque, Id and Iq can be calculated using the torque calculation formula. Then, the torque is sequentially processed by a PI regulator, Park inverse converter, and three-phase inverter to output three-phase current. In this embodiment, the torque is corrected based on the rotor temperature, ensuring that the corrected output torque matches the actual motor state. It should also be noted that this correction model has four inputs in the input layer: Id, Iq, temperature T_mtr, and speed N. Through hidden layer processing, an output representing the temperature-induced torque deviation is obtained in the output layer.

[0061] Specifically, after the database is established, it also includes:

[0062] The torque deviations in the database are standardized based on their respective mean and standard deviation.

[0063] In this implementation, z-score standardization, also known as standardized scores, is used. This method standardizes the data based on the mean and standard deviation of the original data. The processed data conforms to a standard normal distribution, i.e., the mean is 0 and the standard deviation is 1. The transformation function is:

[0064] Where σ is the sample standard deviation and u is the sample mean. Specifically, it is important to emphasize that the above standardization process is used to transform data of different magnitudes into a unified Z-Score. Specifically, this facilitates comparisons between the torque deviation predicted by the gradient descent optimization algorithm and the sample torque deviation, as well as test results on the test set, etc.

[0065] S200: Obtain any data from the training set, including sample d-axis current, sample q-axis current, sample temperature, sample rotation speed, and sample torque deviation; input the sample temperature, sample rotation speed, sample d-axis current, and sample q-axis current into the input layer of the correction model accordingly;

[0066] Specifically, sensors can be used to collect the actual torque, and the sample torque deviation can be calculated based on the difference between the actual torque and the sample torque (the sample torque deviation can also be pre-stored in a database). For ease of description, let the model input be: X=(x1,x2,x3,x4)=(Id,Iq,T_mtr,N)

[0067] S300: The hidden layer uses activation functions to compensate for mapping the sample temperature, sample rotation speed, sample d-axis current and sample q-axis current of the input layer at each neuron, and obtains m intermediate values.

[0068] For details, please refer to Figure 2 The activation functions include, but are not limited to, the Sigmoid function, the hyperbolic tangent function, or a linear function. In different implementation scenarios and facing different torque accuracy requirements, the mapping relationship of the Sigmoid function is as follows: The hyperbolic tangent function mapping relationship is as follows: The mapping relationship of the linear function is f(x) = x. In the network structure of this embodiment, the Sigmoid function is used as an example, and the hidden layer is preferably set to 6 neurons to achieve better prediction results. It should also be noted that the above-mentioned intermediate values, torque deviations, etc., in this embodiment can all include signs.

[0069] Specifically, the hidden layer applies activation function compensation mapping to each neuron for the sample temperature, sample rotation speed, sample d-axis current, and sample q-axis current of the input layer, obtaining m intermediate values, including:

[0070] The activation function is used to calculate the weighted compensation of each neuron in the hidden layer based on the inputs of the input layer; if the activation function is the Sigmoid function, then for any neuron, its median value can be calculated as:

[0071]

[0072] Among them, u j For the j-th neuron u j The intermediate values ​​on the above; x1, x2, x3, and x4 are the d-axis current, q-axis current, temperature, and rotational speed of the input layer, respectively; v ij For each input layer x i Calculate u on the j-th neuron in the hidden layer j The weights, where i = 1, 2, 3, 4; For all input layers x i Calculate the compensation for the hidden layer.

[0073] In this embodiment, the input layer contains four inputs: the d-axis current, the sample q-axis current, the sample temperature, and the sample rotation speed, which are Id, Iq, T_mtr, and N, respectively. They are numbered 1, 2, 3, and 4 for descriptive purposes. Based on the above description, as an example, for the first neuron... Therefore, the other 5 neurons in the middle stage of this embodiment are expressed in a similar way. The weights and compensations are not pre-set and customized, but can be optimized through the following step S500 to form a parameter combination with high prediction accuracy for forming the target model.

[0074] S400: The output layer uses an activation function to compensate the mapping of the m intermediate values ​​to generate a predicted torque deviation;

[0075] Specifically, a result is formed by combining the results of several neurons in the hidden layer with the output, that is, the output layer uses an activation function to compensate the mapping of the m intermediate values ​​to generate a predicted torque deviation, including the following:

[0076] The activation function is used to perform weighted compensation calculations on each neuron in the hidden layer at the output layer;

[0077] If the activation function is the Sigmoid function, then the predicted torque deviation is calculated as follows:

[0078]

[0079] Where y represents the output layer, i.e., the predicted torque deviation; ω j For the j-th neuron u in the hidden layer j Calculate the weights of the output layer; u j For the j-th neuron u j The intermediate value on; θy The compensation for the output layer y is calculated based on all neurons in the hidden layer.

[0080] In the above steps, as an example rather than a limitation, assuming the number of neurons is three, the following expression can be obtained: Other numbers of neural networks can also be obtained by referring to this expression. Of course, other activation functions can also be obtained by referring to it, which will not be elaborated here. It should be noted that the hidden layer and output layer in the modified model provided in this embodiment use the same activation function; therefore, when replacing them with other activation functions, consistency must also be maintained.

[0081] S500: The gradient descent optimization algorithm is used to optimize the parameters of the hidden layer and the output layer until the difference between the predicted torque deviation and the sample torque deviation is determined to meet the preset range.

[0082] Specifically, the step of using the gradient descent optimization algorithm to optimize the parameters of the hidden layer and the output layer until the difference between the predicted torque deviation and the sample torque deviation meets a preset range includes the following steps:

[0083] S510: Establish the objective function, wherein the objective function is... Among them, y (k) To predict torque deviation; The sample torque deviation is represented by k; the number of training iterations is represented by k.

[0084] In the above steps, it should be noted that the objective function is used to represent the error between the predicted torque deviation obtained by the modified model and the actual torque deviation (i.e., the sample torque deviation, which can be obtained by a torque sensor). When the error meets the preset range, it means that the training of the modified model can be completed.

[0085] S520: The objective function is used to calculate the derivatives of the weights and compensations of the hidden layer and the output layer;

[0086] In the above steps, the objective function is used to differentiate the weights and compensations of the hidden layer and the output layer to determine the relationship between the objective function and each input. The parameters (weights and compensations) are then adjusted and optimized to continuously adjust the difference between the predicted torque deviation and the sample torque deviation, so that the difference is within a preset range.

[0087] As an example, the objective function is used to differentiate the weights and compensations of the hidden layer and the output layer, and the expressions are as follows: These are the derivatives of the objective function with respect to the weights of each neuron in the output layer, the derivatives of the objective function with respect to the compensations of the output layer, the derivatives of the objective function with respect to the weights of each neuron in the hidden layer, and the derivatives of the objective function with respect to the compensations of all neurons in the hidden layer (see reference). Figure 4In each expression, the horizontal axis represents the respective weights and compensations, and the vertical axis represents the objective function f. The minimum value obtained by taking the derivative is the lowest point of the curve, which is used to optimize the parameters.

[0088]

[0089]

[0090]

[0091]

[0092] S530: Adjust the weights and compensations of the hidden layer and the output layer until the difference between the predicted torque deviation and the sample torque deviation is determined to meet the preset range.

[0093] In this embodiment, the learning rate and target error are set to 0.01 and 0.1 respectively, based on the control accuracy requirements. Therefore, the preset range of the function is: f (x1,x2,x3) =J<0.1.

[0094] S600: After iterative training, the model is tested on a test set, and the target model is generated when it meets the preset error range.

[0095] Specifically, the test set is used for testing. If the accuracy does not meet the preset requirements, the activation function (and / or the number of neurons in the hidden layer, the optimization algorithm, etc.) is changed, and the training is repeated.

[0096] In the above steps, it should be noted that the data structure of the test set can be the same as that of the training set to determine whether the torque deviation output by the corrected model after training meets the error range with the torque deviation in the test set. Alternatively, a different data structure can be used, such as only including the input and the corresponding output range (which is the torque including the error range) in the training set, or other data used to verify accuracy.

[0097] As an example, the preset error range in practical application scenarios can be set as shown in the table below:

[0098] Torque range accuracy <100NM ±3NM ≥100Nm ±3%

[0099] It is important to emphasize that the modified model in this scheme can be adapted to different activation functions, different numbers of neurons in the hidden layer, and even other optimization algorithms to meet the needs of different application scenarios.

[0100] S700: Obtain the target torque, target temperature, target d-axis current, target q-axis current, and target speed; use the target model to predict the target torque deviation based on the target d-axis current, target q-axis current, target temperature, and target speed.

[0101] It should be noted that the target model has the same structure as the modified model mentioned above. The modified model is used through the above training and testing process to determine the parameter combination that can obtain highly accurate prediction results, so as to be used in the target model for the correction of the target torque in real-world scenarios.

[0102] S800: The target torque is corrected using the target torque deviation.

[0103] In this embodiment, the target model, trained and tested, is activated to correct the target torque in real-world scenarios. After obtaining the target torque deviation (ΔTeref), a torque matching the actual motor condition is obtained based on the target torque. The compensation torque can be predicted based on the new input and output to the motor controller software, improving the accuracy of the output torque. This solves the problem of insufficient accuracy and performance degradation in existing motor output torque due to the lack of consideration for temperature effects, without requiring changes to the motor structure or the addition of additional devices.

[0104] To further demonstrate the effect of the target model provided in this embodiment on the correction of output torque, the following experimental data from a real-world scenario are used as supplementary explanation:

[0105] A) Without neural network learning, at a speed N of 11000 rpm, the target torque Te_ref is 113 NM, Id is -380.398 A, Iq is 92.568 A, the motor temperature T_mtr is 96.194℃, and the actual torque is 109.48 NM. The allowable torque deviation is 113 × 3% = 3.39 NM, and the actual torque deviation is 113 - 109.48 = 3.52 NM, which does not meet the requirements.

[0106] B) Neural Network Training Process: Based on the (historical) database, at a rotational speed N of 11000 rpm, Id is -380.398A, Iq is 92.568A, the motor temperature T_mtr is 96.194℃, and the actual torque deviation is 3.52 NM. When the predicted torque deviation y(k) is 0.1 NM, the total deviation is 3.52 - 0.1 = 3.42 NM, which does not meet the torque accuracy requirements, and parameters (number of neurons and activation function, etc.) need to be adjusted. When the predicted torque deviation y(k) is 0.5 NM, the total deviation is 3.52 - 0.5 = 3.02 NM, which meets the accuracy requirements, and the optimal parameter v is stored. ij θ i w j θ y And activate the model.

[0107] C) After neural network learning: After model activation, under the operating conditions of speed N = 11000 rpm, Id = -380.398A, Iq = 92.568A, and motor temperature T_mtr = 96.194℃, the predicted torque deviation y(k) calculated by the target model using the optimal parameters is 0.5NM, and the final output torque is 109.48 + 0.5 = 109.98NM. The torque deviation is 3.02NM < 3.39NM, which meets the torque accuracy requirements.

[0108] This embodiment provides a method for correcting motor output torque. A correction model is established based on a neural network comprising an input layer, hidden layers, and an output layer. The correction model is trained, and activation functions are used to compensate for mappings in the hidden and output layers. A gradient descent optimization algorithm is employed to optimize the parameters of the hidden and output layers. The trained correction model is tested using a test set; if the test fails, the activation function is changed until a target model is obtained. This target model is applied to the target torque to obtain the target torque deviation, thereby correcting the target torque. This addresses the problem that existing motor output torque calculations do not consider the influence of temperature, resulting in insufficient accuracy and impacting motor performance. The neural network algorithm is added to existing control software without increasing hardware costs. This solution adds temperature-based compensation for the output torque of a permanent magnet synchronous motor, effectively meeting the accuracy requirements for motor torque in real-world scenarios.

[0109] Example 2:

[0110] To achieve the above objectives, the present invention also provides a computer device 9, such as... Figure 5 As shown, the computer device can be a smartphone, tablet computer, laptop computer, desktop computer, etc., that executes programs. The computer device in this embodiment includes, but is not limited to, a memory 91 and a processor 92 that can be interconnected via a device bus, such as... Figure 5 As shown. It should be noted that, Figure 5 Only computer devices with components are shown; however, it should be understood that implementation of all shown components is not required, and more or fewer components may be implemented instead.

[0111] In this embodiment, the memory 91 can be an internal storage unit of a computer device, such as the hard disk or RAM of the computer device. In other embodiments, the memory 91 can also be an external storage device of the computer device, such as a plug-in hard disk equipped on the computer device. In this embodiment, the memory 91 is typically used to store operating devices and various application software installed on the computer device, such as the program code and data of the neural network-based motor output torque correction method in Embodiment 1. In addition, the memory 91 can also be used to temporarily store various types of data that have been output or will be output.

[0112] In some embodiments, processor 92 may be a central processing unit (CPU), controller, microcontroller, microprocessor, or other data processing chip. This processor 92 is typically used to control the overall operation of a computer device. In this embodiment, processor 92 is used to run program code stored in memory 91 or process data, for example, to run the neural network-based motor output torque correction method of Embodiment 1.

[0113] Example 3:

[0114] To achieve the above objectives, the present invention also provides a computer-readable storage device, which includes multiple storage media, such as flash memory, hard disk, multimedia card, card-type memory (e.g., SD or D* memory), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, server, App application store, etc., on which computer programs are stored. When the programs are executed by processor 92, they perform corresponding functions. In this embodiment, the computer-readable storage medium is used to store data, and when executed by processor 92, it implements the motor output torque correction method based on neural networks in Embodiment 1.

[0115] It should be noted that the embodiments of the present invention have better implementability and are not intended to limit the present invention in any way. Any person skilled in the art may use the above-disclosed technical content to change or modify it into equivalent effective embodiments. However, any modifications or equivalent changes and modifications made to the above embodiments based on the technical essence of the present invention without departing from the content of the technical solution of the present invention shall still fall within the scope of the technical solution of the present invention.

Claims

1. A method for correcting motor output torque based on neural networks, characterized in that, Including the following: A database and a revised model are established, comprising a training set and a test set. After establishing the database, the torque deviations in the database are standardized using z-scores based on their respective means and standard deviations. The standardization formula is as follows: , where σ is the sample standard deviation and u is the sample mean, the modified model includes an input layer, a hidden layer and an output layer, wherein the hidden layer contains m neurons; Obtain any data from the training set, including sample d-axis current, sample q-axis current, sample temperature, sample rotation speed, and sample torque deviation; The sample temperature, sample rotation speed, sample d-axis current, and sample q-axis current are input to the input layer of the correction model. The hidden layer uses activation functions to compensate for the sample temperature, sample rotation speed, sample d-axis current and sample q-axis current of the input layer at each neuron to obtain m intermediate values. The output layer uses an activation function to compensate the mapping of the m intermediate values ​​to generate a predicted torque deviation. The gradient descent optimization algorithm is used to optimize the parameters of the hidden layer and the output layer until the difference between the predicted torque deviation and the sample torque deviation is determined to meet the preset range. After iterative training, a test set is used for testing. A target model is generated once it meets the preset error range. The preset error range is: when torque < 100 NM, the error ≤ ±3 NM; when torque ≥ 100 NM, the error ≤ ±3%. Obtain the target torque, target d-axis current, target q-axis current, target speed, and target temperature; The target model is used to predict and obtain the target torque deviation based on the target d-axis current, target q-axis current, target rotational speed, and target temperature. The target torque is corrected using the target torque deviation; In this process, the hidden layer applies activation function compensation mapping to the sample temperature, sample rotation speed, sample d-axis current, and sample q-axis current of the input layer at each neuron to obtain m intermediate values, including: The activation function is used to perform weighted compensation calculations on each neuron in the hidden layer based on the individual inputs of the input layer. If the activation function is the Sigmoid function, then any intermediate value can be calculated as: in, Let x1 be the j-th neuron of the hidden layer; x2, x3, and x4 are the d-axis current, q-axis current, temperature, and rotational speed of the input layer, respectively. For each input layer x i Calculate the value of the j-th neuron in the hidden layer. The weights, where i = 1, 2, 3, 4; For all input layers x i Calculate the compensation for the hidden layers; The output layer applies an activation function to compensate for the mapping of the m intermediate values ​​to generate a predicted torque deviation, including the following: The activation function is used to perform weighted compensation calculations on each neuron in the hidden layer at the output layer; If the activation function is the Sigmoid function, then the predicted torque deviation is calculated as follows: in, This is the output layer, which predicts the torque deviation. Based on the j-th neuron in the hidden layer Calculate the weights of the output layer; This refers to the j-th neuron in the hidden layer. The output layer is calculated based on all neurons in the hidden layer. Compensation; The step of optimizing the parameters of the hidden layer and the output layer using the gradient descent optimization algorithm until the difference between the predicted torque deviation and the sample torque deviation meets a preset range includes: Establish an objective function, wherein the objective function is: ;in, To predict torque deviation; The sample torque deviation is represented by k; the number of training iterations is represented by k. The objective function is used to differentiate the weights and compensations of the hidden layer and the output layer; Adjust the weights and compensations of the hidden layer and the output layer until the difference between the predicted torque deviation and the sample torque deviation meets the preset range.

2. The output torque correction method according to claim 1, characterized in that: The activation function includes the Sigmoid function, the hyperbolic tangent function, or a linear function.

3. The output torque correction method according to claim 1, characterized in that, After the database is established, the following is also included: The torque deviations in the database are standardized based on their respective mean and standard deviation.

4. The output torque correction method according to claim 1, characterized in that: The test set is used for testing. If the accuracy does not meet the preset requirements, the activation function is changed and the training is repeated.

5. The output torque correction method according to claim 4, characterized in that, The preset accuracy requirements include: Determine whether the torque deviation output by the trained modified model meets the error range compared to the torque deviation in the test set. If so, it meets the preset accuracy requirements.

6. A computer device, characterized in that: The computer device includes: A memory for storing executable program code; and a processor for calling the executable program code in the memory to perform the steps including the output torque correction method as claimed in any one of claims 1 to 5.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by the processor, it implements the steps of the output torque correction method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Permanent magnet synchronous motor output torque estimation method and system

    CN111510026A

  • Voltage division line loss rate prediction and loss reduction potential evaluation method and system

    CN112085156A