A motor calibration method and system
By constructing a neural network model and utilizing known motor data and no-load acceleration data of unknown motors, the problem of motor calibration was solved, enabling the prediction of motor torque and voltage in the absence of an experimental platform, thereby improving the accuracy and efficiency of motor control.
Patent Information
- Application Number
- CN202311398206.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-25
- Publication Date
- 2026-11-27
- Estimated Expiration
- 2043-10-25
AI Technical Summary
Without a motor calibration test platform, it is difficult to accurately predict the voltage and torque of the motor, resulting in low control efficiency for different motors.
A neural network model is constructed and trained using known d-axis and q-axis current data of the motor and unloaded acceleration data of the unknown motor. The saturation characteristics of the motor are fitted by the neural network to generate the motor's torque and voltage data.
In the absence of a calibration experimental platform, data generated by neural networks can accurately predict the torque and voltage of the motor, supporting efficient motor control.
Smart Images

Figure CN117458924B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of motor control, and more specifically, relates to a motor calibration method and system. Background Technology
[0002] With the development of the new energy industry, electric motor drive technology has been widely applied in various fields. Due to its superior characteristics such as high efficiency, high power density, and wide speed range, permanent magnet synchronous motors (PMSMs) have been widely used in industrial production as a key component in realizing electric drive technology. Therefore, to fully utilize the characteristics of PMSMs, efficient control of them is necessary.
[0003] Currently, the control methods for permanent magnet synchronous motors typically use a rotor synchronization dq mathematical model. Due to the magnetic saturation characteristics of ferromagnetic materials, the d-axis and q-axis inductances vary with current, making it difficult to obtain the optimal current command for different motor operating conditions. A common solution is the lookup table method. This method requires first calibrating the motor, i.e., collecting motor state information such as torque and voltage under different d-axis and q-axis currents in a calibration experimental platform to construct a table of motor states corresponding to different d-axis and q-axis currents. Then, during control, the optimal current command for different motor states can be found based on the pre-made table to achieve efficient motor control. However, because different motors have different design structures, their corresponding motor state tables also differ, requiring recalibration. The cost of building a calibration experimental platform for each motor is extremely high, making it difficult to calibrate different motors. Summary of the Invention
[0004] In view of the shortcomings of the prior art, the purpose of this invention is to provide a motor calibration method and system, which aims to solve the problem that it is difficult to accurately predict the voltage and torque of a motor in the absence of a motor calibration experimental platform.
[0005] To achieve the above objectives, the present invention provides a motor calibration method, comprising the following steps:
[0006] A neural network model is constructed, comprising network 1 and network 2. The input and output of network 1 are used together as the input of network 2, and the final output of the network is the sum of the outputs of network 1 and network 2. Each part of the neural network is composed of fully connected networks.
[0007] Using X1, Y1, X 2a Y 2a The network is trained, where X1 represents the different d-axis and q-axis currents of the known motor. Y1 represents the corresponding torque and voltage. X 2aDifferent d-axis and q-axis currents were used in acceleration experiments of an unknown motor under no-load conditions. Y 2a For the corresponding torque and voltage Where m1 is the number of data pairs in X1, m 2a For X 2a Data pairs in the middle;
[0008] Different d-axis and q-axis current data of an unknown motor The input is fed into a trained neural network to obtain the corresponding torque and voltage. Complete the motor calibration; where m2 is the number of data pairs in X2.
[0009] Furthermore, the accelerated experiment includes:
[0010] S201. Construct datasets of different d-axis and q-axis currents for an unknown motor.
[0011] S202. Given constant d-axis and q-axis current commands for the motor. Accelerate it from zero to the rated speed ω r If the rated speed cannot be reached, then the maximum speed under this bus voltage will be used.
[0012] S203. During acceleration, if there is no stable interval for the d-axis and q-axis currents, execute S208; if there is, within the actual stable interval for the d-axis and q-axis currents, record the mechanical velocity difference Δω between the beginning and end of that interval. a And the acceleration time Δt in that interval. a And sample n different rotation speeds in this interval. corresponding voltage
[0013] S204. Calculate the torque of the motor based on its dynamic equations and moment of inertia. Where J is the moment of inertia of the motor, and T f This represents the frictional torque of the motor.
[0014] S205. Perform second-order polynomial fitting based on the squares of the n different rotational speeds and their corresponding voltages. The values of parameters A, B, and C in the formula are determined by the least squares method, and the voltage is calculated by substituting them into the rated speed.
[0015] S207. Note Join X 2a , Join Y 2a ;
[0016] S208. Select other d-axis and q-axis current commands and repeat S202 to S207 until all command combinations in the current data set have been tested.
[0017] Furthermore, it also includes:
[0018] S206. Repeat S202~S205, calculate... and The average value is used as the d-axis and q-axis current command. Torque and voltage under these conditions.
[0019] Furthermore, the loss function used for training the neural network is:
[0020]
[0021] in
[0022]
[0023]
[0024] Where N1() is the output of network 1, and N() is the final output of the network. represent or represent or W2 represents all the weight coefficients of Network 2, and λ represents the penalty weight.
[0025] The present invention also provides a motor calibration system, comprising:
[0026] The network construction module is used to build a neural network model, which includes network 1 and network 2. The input and output of network 1 are used together as the input of network 2, and the final output of the network is the sum of the outputs of network 1 and network 2. Each part of the neural network is composed of fully connected networks.
[0027] The network training module is used to utilize X1, Y1, and X 2a Y 2a The network is trained, where X1 represents the different d-axis and q-axis currents of the known motor. Y1 represents the corresponding torque and voltage. X 2a Different d-axis and q-axis currents were used in acceleration experiments of an unknown motor under no-load conditions. Y 2a For the corresponding torque and voltage Where m1 is the number of data pairs in X1, m 2a For X 2a Data pairs in the middle;
[0028] The motor calibration module is used to process different d-axis and q-axis current data of an unknown motor. The input is fed into a trained neural network to obtain the corresponding torque and voltage. Complete the motor calibration; where m2 is the number of data pairs in X2.
[0029] Compared with the prior art, the above-described technical solutions conceived in this invention can achieve the following results.
[0030] Beneficial effects:
[0031] (1) This invention introduces a neural network to fit data and learn motor saturation characteristics, which solves the problem of difficulty in calibrating motors in the absence of a motor calibration experimental platform;
[0032] (2) This invention introduces known motor data to expand the training dataset, and at the same time uses accelerated experiments to increase the amount of unknown motor data that can be obtained under no-load conditions, thus solving the problem of difficulty in training the network when there is a lack of data.
[0033] (3) This invention introduces known motor data to enable the neural network to learn saturation features, and adjusts the network weight parameters through the unloaded data of unknown motors to enable the network to perform well on unknown motors. The data generated by the trained neural network is close to the actual data.
[0034] (4) The data generated by the trained neural network of the present invention is close to the actual data, so the data generated by the neural network can be effectively used for the optimal control strategy of motor. Attached Figure Description
[0035] Figure 1 This is a flowchart illustrating the motor calibration method provided by the present invention;
[0036] Figure 2 This is a schematic diagram of the neural network structure in step S3;
[0037] Figure 3 The error in the prediction of motor 1 when motor 1 is unknown is (a) for torque and (b) for voltage.
[0038] Figure 4 The error in the predicted result of motor 2 when motor 2 is unknown is (a) for torque and (b) for voltage. Detailed Implementation
[0039] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention. Furthermore, the technical features involved in the various embodiments of this invention described below can be combined with each other as long as they do not conflict with each other.
[0040] This invention utilizes two permanent magnet synchronous motors as a specific implementation example. One motor is considered a known motor, and the other an unknown motor. The known motor contains torque and voltage Y1 data under different currents X1 (d and q), while the unknown motor only contains acceleration data X. 2a and Y 2a .
[0041] like Figure 1 As shown, the specific implementation method of this method is as follows:
[0042] S1. Obtain different d-axis and q-axis currents of a known motor. Corresponding torque and voltage data
[0043] S2. Conduct acceleration experiments on the unknown motor under no-load conditions to obtain its different acceleration d-axis and q-axis currents. The corresponding voltage and torque
[0044] S3. Construct a neural network model consisting of two parts: Network 1 and Network 2. The input and output of Network 1 are used together as the input to Network 2, and the final output is the sum of the outputs of Network 1 and Network 2. Network 1 contains two hidden layers, each with 10 neurons, and Network 2 contains one hidden layer with 10 neurons. Each part of the network is composed of fully connected networks, such as... Figure 2 As shown;
[0045] S4. Using X1, Y1, X 2a Y 2a Train the network;
[0046] S5. Obtain different d-axis and q-axis current data of the unknown motor. Input the trained neural network to obtain its corresponding torque and voltage data.
[0047] Example 1
[0048] When motor 1 is unknown and motor 2 is known, execute steps S1 to S5 to predict the torque and voltage of motor 1. Figure 3 It can be seen that the torque and voltage data of motor 1 generated by the trained neural network have small errors, all within 5%, indicating relatively accurate data generation. Figure 3 The current I and angle θ and i in d i q Relationship i d =-Isinθ,i q =Icosθ.
[0049] Example 2
[0050] When motor 2 is unknown and motor 1 is known, execute steps S1 to S5 to predict the torque and voltage of motor 2. Figure 4 It can be seen that the torque and voltage data of motor 2 generated by the trained neural network have small errors, all within 5%, indicating relatively accurate data generation. Figure 4 The current I and angle θ and i in d i q Relationship i d =-Isinθ,i q =Icosθ.
[0051] Those skilled in the art will readily understand that the above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for calibrating a motor, characterized in that, Includes the following steps: A neural network model is constructed, comprising network 1 and network 2. The input and output of network 1 are used together as the input of network 2, and the final output of the network is the sum of the outputs of network 1 and network 2. Each part of the neural network is composed of fully connected networks. use X 1, Y 1, X 2a , Y 2a The network is trained, where X 1 represents the different d-axis and q-axis currents of the known motor. , Y 1 represents the corresponding torque and voltage. , X 2a Different d-axis and q-axis currents were used in acceleration experiments of an unknown motor under no-load conditions. , Y 2a For the corresponding torque and voltage ;in, m 1 is X 1. Data pairs quantity m 2a for X 2a The number of data pairs; the accelerated experiments include: S201. Construct datasets of different d-axis and q-axis currents for an unknown motor. ; S202. Given constant d-axis and q-axis current commands for the motor. , This allows it to accelerate from zero to its rated speed. If the rated speed cannot be reached, then the maximum speed under the bus voltage will be used. S203. During acceleration, if there is no stable interval for the d-axis and q-axis currents, execute S208; if there is, record the difference in mechanical velocity between the beginning and end of the actual stable interval for the d-axis and q-axis currents. And the acceleration time in that range. and sample the interval n Different speeds corresponding voltage ; S204. Calculate the torque of the motor based on its dynamic equations and moment of inertia. ,in, J Let be the moment of inertia of the motor. T f This represents the frictional torque of the motor. S205. Based on the collected data n A second-order polynomial fit was performed on the squares of the corresponding voltages for each different rotational speed. The parameters in the formula are determined by the least squares method. A , B , C Take the value and substitute it into the rated speed to calculate the voltage. ; S207. Note , join in X 2a , , join in Y 2a ; S208. Select other d-axis and q-axis current commands and repeat S202~S207 until all command combinations in the current data set have been tested; Different d-axis and q-axis current data of an unknown motor The input is fed into a trained neural network to obtain the corresponding torque and voltage. Complete the motor calibration; among which, m 2 is X 2. Number of data pairs; The loss function used for training the neural network is: in in, N 1() represents the output of network 1. N ( ) represents the final output of the network. represent or , represent or , W 2 represents all the weight coefficients of network 2. λ For penalty weights.
2. The motor calibration method according to claim 1, characterized in that, Also includes: S206. Repeat S202~S205, calculate... and The average value is used as the d-axis and q-axis current command. , Torque and voltage under these conditions.
3. A motor calibration system, characterized in that, include: The network construction module is used to build a neural network model, which includes network 1 and network 2. The input and output of network 1 are used together as the input of network 2, and the final output of the network is the sum of the outputs of network 1 and network 2. Each part of the neural network is composed of fully connected networks. The network training module is used to utilize X 1, Y 1, X 2a , Y 2a The network is trained, where X 1 represents the different d-axis and q-axis currents of the known motor. , Y 1 represents the corresponding torque and voltage. , X 2a Different d-axis and q-axis currents were used in acceleration experiments of an unknown motor under no-load conditions. , Y 2a For the corresponding torque and voltage ;in, m 1 is X 1. Data pairs quantity m 2a for X 2a The number of data pairs; the accelerated experiments include: Construct different d-axis and q-axis current datasets for an unknown motor ; Given constant d-axis and q-axis current commands for the motor , This allows it to accelerate from zero to its rated speed. If the rated speed cannot be reached, then the maximum speed under the bus voltage will be used. During acceleration, if no stable d-axis or q-axis current range exists, other d-axis or q-axis current commands are repeated until all command combinations in the current dataset have been tested. If a stable range exists, the mechanical velocity difference between the start and end of the actual stable d-axis or q-axis current range is recorded. And the acceleration time in that range. and sample the interval n Different speeds corresponding voltage Calculate the motor torque based on the motor's dynamic equations and moment of inertia. ,in, J Let be the moment of inertia of the motor. T f This represents the frictional torque of the motor. According to the collected n A second-order polynomial fit was performed on the squares of the different rotation speeds and their corresponding voltages. The parameters in the formula are determined by the least squares method. A , B , C Take the value and substitute it into the rated speed to calculate the voltage. ; remember , join in X 2a , , join in Y 2a ; Repeat using other d-axis and q-axis current commands until all command combinations in the current dataset have been tested. The motor calibration module is used to process different d-axis and q-axis current data of an unknown motor. The input is fed into a trained neural network to obtain the corresponding torque and voltage. Complete the motor calibration; among which, m 2 is X 2. Number of data pairs; The loss function used for training the neural network is: in in, N 1() represents the output of network 1. N ( ) represents the final output of the network. represent or , represent or , W 2 represents all the weight coefficients of network 2. λ For penalty weights.
4. The motor calibration system according to claim 3, characterized in that, It also includes calculation and The average value is used as the d-axis and q-axis current command. , Torque and voltage under these conditions.
