Joint torque compensation control method and system for permanent magnet motor
By estimating and compensating the torque in a permanent magnet motor, the problem of deviation of the robot joint torque sensor is solved, and the force control performance of the robot joint is improved.
Patent Information
- Application Number
- CN202411236782.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-04
- Publication Date
- 2024-12-31
AI Technical Summary
In the prior art, robot joint torque sensors are susceptible to non-torsion loads, resulting in torque reading deviations and reducing the robot's force control performance.
By obtaining the q-axis and d-axis currents of the permanent magnet motor, the initial torque is estimated, and the compensation torque is calculated based on the angular velocity and target angle. The initial torque is compensated by the correction coefficient, which avoids the deviation of the sensor's direct acquisition of torque.
The force control performance of the robot joint is improved, the torque reading deviation caused by suppressing crosstalk is avoided, and the compensation torque is combined with the actual torque.
Smart Images

Figure CN119232011A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of permanent magnet motor control, and in particular to a joint torque compensation control method and system for a permanent magnet motor. Background Art
[0002] Robot joint torque compensation refers to the real-time measurement, prediction and compensation of joint torque changes during robot movement to eliminate errors caused by nonlinearity, friction, load torque, inertia force and other factors, thereby improving the control accuracy and stability of the robot.
[0003] Currently, the data collected by joint torque sensors are generally relied on. However, since joint torque sensors are affected by other non-torsional loads, even if crosstalk suppression has been considered in sensor design and application, the deviation of torque readings cannot be eliminated, resulting in a decrease in the force control performance of the robot. Summary of the invention
[0004] In view of the above-mentioned defects, the purpose of the present invention is to propose a joint torque compensation control method and system for a permanent magnet motor, so as to solve the problem of poor shutdown force control performance of the robot.
[0005] To achieve this purpose, the present invention adopts the following technical solution: a joint torque compensation control method for a permanent magnet motor, comprising the following steps:
[0006] Step S1: Obtain the rotation instruction of the joint, obtain the target angle to which the joint is to rotate, and obtain the current angle of the joint;
[0007] Step S2: acquiring the q-axis current and the d-axis current output by the permanent magnet motor according to the current angle and the target angle;
[0008] Step S3: obtaining the torque of the permanent magnet motor according to the q-axis current and the d-axis current as the initial torque;
[0009] Step S4: obtaining the angular velocity of the permanent magnet motor during rotation, and obtaining the compensation torque according to the angular velocity;
[0010] Obtain compensation coefficient according to target angle;
[0011] The supplementary torque is corrected by the supplementary coefficient to obtain the corrected torque;
[0012] Step S5: Compensating the initial torque by using the correction torque.
[0013] Preferably, the specific steps of step S2 are as follows:
[0014] Obtaining the angle difference between the current angle and the target angle, and determining whether the angle difference is greater than an angle threshold, and if so, using the MTPA current control method to generate corresponding d-axis and q-axis currents;
[0015] If it is greater than, the speed of the permanent magnet motor is obtained. When the speed of the permanent magnet motor is less than the speed threshold, the MTPA current control method is used to generate the corresponding d-axis and q-axis currents. When the speed of the permanent magnet motor is greater than or equal to the speed threshold, the d-axis current is obtained according to the motor's operating parameters, design parameters and speed threshold, and the q-axis current limit value is obtained according to the maximum current and the d-axis current.
[0016] Preferably, the specific steps of obtaining the current of the d-axis according to the operating parameters, design parameters and speed threshold of the motor are as follows:
[0017] Get the given current I of the q axis in real time qRef , the given current I qRef Input to the low-pass filter to get the first parameter I' qRef ;
[0018] Get the feedback current I of the q axis in real time q , the given current I q Input to the low-pass filter to obtain the second parameter I' q ;
[0019] Get the first parameter I' qRef and the second parameter I′ q The difference E is used as the input of the PI controller to obtain the current feedback given term D1;
[0020] According to the rated current I n and rated speed ω n Calculate the amplification factor Kc of the feedforward given term of the weak magnetic current;
[0021] The speed increment of the current weak magnetic field is obtained, and the speed increment is adjusted by the amplification factor Kc to obtain the current feedback given item D2;
[0022] The d-axis current I is obtained by adding the feedback given term D1 and the feedforward given term D2. d .
[0023] Preferably, the formula for obtaining the limit value of the q-axis current is as follows:
[0024]
[0025] Among them I max is the maximum output current, I d is the current of d axis.
[0026] Preferably, the model formula for obtaining the initial torque is as follows:
[0027]
[0028] Where p is the number of permanent magnet motor poles, λ is the flux generated by the permanent magnet, L d , L q They are the inductance of the d-axis and the inductance of the q-axis respectively.
[0029] Preferably, the formula for obtaining the compensation torque according to the angular velocity is as follows:
[0030] T2=fc·sgn(q)+fv·q;
[0031] Where fc is the Coulomb friction coefficient, sgn(q) is used to indicate the rotation direction of the joint, when q is greater than 0, it indicates that the joint is rotating in the forward direction, sgn(q) = 1, when q is less than 0, it indicates that the joint is rotating in the reverse direction, sgn(q) = -1, fv is the viscous friction coefficient, and q is the angular velocity of the permanent magnet motor.
[0032] Preferably, the steps of obtaining the compensation coefficient according to the target angle are as follows:
[0033] Determine the angle interval into which the target angle falls according to the target angle;
[0034] The corresponding compensation coefficient is obtained according to the angle interval.
[0035] A joint torque compensation control system for a permanent magnet motor, using the joint torque compensation control method for a permanent magnet motor, comprising an analysis module, a data acquisition module, a torque acquisition module, a compensation module and a correction module;
[0036] The analysis module is used to obtain the rotation instruction of the joint, obtain the target angle to which the joint is to rotate, and obtain the current angle of the joint;
[0037] The data acquisition module is used to acquire the q-axis current and the d-axis current output by the permanent magnet motor according to the current angle and the target angle;
[0038] The torque acquisition module is used to acquire the torque of the permanent magnet motor according to the q-axis current and the d-axis current as the initial torque;
[0039] The compensation module is used to obtain the angular velocity of the permanent magnet motor when it rotates, and obtain the compensation torque according to the angular velocity;
[0040] Obtain compensation coefficient according to target angle;
[0041] The supplementary torque is corrected by the supplementary coefficient to obtain the corrected torque;
[0042] The correction module is used to compensate the initial torque by using the correction torque.
[0043] Preferably, the data acquisition module includes a first data submodule and a second data submodule;
[0044] The first data submodule is used to generate corresponding d-axis and q-axis currents using the MTPA current control method when the angle difference is less than the angle threshold;
[0045] The second data submodule is used to generate corresponding d-axis and q-axis currents using the MTPA current control method when the angle is greater than the angle threshold. When the speed of the permanent magnet motor is greater than or equal to the speed threshold, the d-axis current is obtained according to the motor's operating parameters, design parameters and speed threshold, and the q-axis current limit value is obtained according to the maximum current and the d-axis current.
[0046] Preferably, the second data submodule includes a first parameter acquisition unit, a second parameter acquisition unit, a first given item acquisition unit, an amplification factor acquisition unit, a second given item acquisition unit and an adding unit;
[0047] The first parameter acquisition unit is used to acquire the given current I of the q-axis in real time. qRef , the given current I qRef Input to the low-pass filter to get the first parameter I' qRef ;
[0048] The second parameter acquisition unit is used to obtain the feedback current I of the q axis in real time. q , the given current I q Input to the low-pass filter to obtain the second parameter I' q ;
[0049] The first given item acquisition unit is used to acquire a first parameter I′ qRef and the second parameter I′ q The difference E is used as the input of the PI controller to obtain the current feedback given term D1;
[0050] The gain factor acquisition unit is used to obtain the rated current I n and rated speed ω n Calculate the amplification factor Kc of the feedforward given term of the weak magnetic current;
[0051] The second given item acquisition unit is used to acquire the current magnetic weakening speed increment, and adjust the speed increment by the amplification factor Kc to obtain the current feedback given item D2;
[0052] The adding unit is used to obtain the d-axis current I by adding the feedback given term D1 and the feedforward given term D2. d .
[0053] One of the above technical solutions has the following advantages or beneficial effects: In the present invention, the torque of the permanent magnet motor is not directly acquired by a sensor, but is estimated by the current of the permanent magnet motor, thereby avoiding the deviation of the torque reading caused by suppressing crosstalk. Finally, the initial torque is compensated by the correction torque, so that the compensated torque is compounded with the actual torque. The force control performance of the robot joint is better improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] Figure 1 is a flow chart of an embodiment of the method of the present invention.
[0055] Figure 2 It is a schematic diagram of the structure of an embodiment of the system of the present invention. DETAILED DESCRIPTION
[0056] The embodiments of the present invention are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals represent the same or similar elements or elements having the same or similar functions from beginning to end. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be understood as limiting the present invention.
[0057] In the description of the embodiments of the present invention, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of the present invention, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.
[0058] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the present invention, unless otherwise specified, the meaning of "plurality" is two or more. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0059] like Figures 1-2 As shown, a joint torque compensation control method for a permanent magnet motor includes the following steps:
[0060] Step S1: Obtain the rotation instruction of the joint, obtain the target angle to which the joint is to rotate, and obtain the current angle of the joint;
[0061] Step S2: acquiring the q-axis current and the d-axis current output by the permanent magnet motor according to the current angle and the target angle;
[0062] Step S3: obtaining the torque of the permanent magnet motor according to the q-axis current and the d-axis current as the initial torque;
[0063] Step S4: obtaining the angular velocity of the permanent magnet motor during rotation, and obtaining the compensation torque according to the angular velocity;
[0064] Obtain compensation coefficient according to target angle;
[0065] The supplementary torque is corrected by the supplementary coefficient to obtain the corrected torque;
[0066] Step S5: Compensating the initial torque by using the correction torque.
[0067] Since the power output connected to the joint in the present invention is a permanent magnet motor, the mathematical model of the permanent magnet motor is usually transformed based on vector control or dq axis. Under this transformation, the three-phase current of the motor is decomposed into two orthogonal components: d-axis current (direct axis current) and q-axis current (quadrature axis current). Therefore, after determining the q-axis current and the d-axis current, the corresponding permanent magnet motor is controlled to rotate. At this time, the ideal torque (i.e., initial torque) of the current motor can be estimated; however, the joint torque of the permanent magnet motor will also be affected by friction. Without considering the load, the friction of the permanent magnet motor becomes the key to influencing the torque. At different speeds, the friction force received in the output shaft of the permanent magnet motor is different, and the torque required to be supplemented is also different.
[0068] Therefore, after the q-axis current and the d-axis current are determined, the corresponding current will be output to drive the permanent magnet motor to rotate. At this time, the angular velocity of the permanent magnet motor will be obtained in real time through the sensor, and then the corresponding compensation torque T2 will be calculated according to the angular velocity. Because the torque supplemented by the robot joint is usually different when the robot rotates to different angles, the present invention will set a corresponding compensation coefficient according to the target angle, and the correction torque will be obtained immediately by multiplying the compensation coefficient by the compensation torque.
[0069] Finally, the final torque is obtained by adding the correction torque to the initial torque.
[0070] In the present invention, the torque of the permanent magnet motor is not directly acquired by using a sensor, but is estimated by the current of the permanent magnet motor, thereby avoiding the deviation of the torque reading caused by suppressing crosstalk. Finally, the initial torque is compensated by the correction torque, so that the compensated torque is compounded with the actual torque. The force control performance of the robot joint is better improved.
[0071] Preferably, the specific steps of step S2 are as follows:
[0072] Obtaining the angle difference between the current angle and the target angle, and determining whether the angle difference is greater than an angle threshold, and if so, using the MTPA current control method to generate corresponding d-axis and q-axis currents;
[0073] If it is greater than, the speed of the permanent magnet motor is obtained. When the speed of the permanent magnet motor is less than the speed threshold, the MTPA current control method is used to generate the corresponding d-axis and q-axis currents. When the speed of the permanent magnet motor is greater than or equal to the speed threshold, the d-axis current is obtained according to the motor's operating parameters, design parameters and speed threshold, and the q-axis current limit value is obtained according to the maximum current and the d-axis current.
[0074] Even if the force control performance of the robot is improved by adjusting the torque, the input of different q-axis currents and d-axis currents will affect the stability of the robot joints during rotation. For this reason, the present invention takes into account that the permanent magnet motor has different control modes at different speeds and generates corresponding d-axis currents and q-axis currents.
[0075] If the angle difference is less than the angle threshold, even if the permanent magnet motor is driven to rotate at the maximum speed, when the shoulder joint reaches the first target angle, the speed of the permanent magnet motor has not entered the stage of weak magnetic control. Therefore, when the angle difference is less than the angle threshold, it is only necessary to use the MTPA current control method to generate the corresponding d-axis and q-axis currents to generate a stable current to drive the permanent magnet motor to drive the joint to rotate.
[0076] When the angle difference is greater than the angle threshold, the permanent magnet motor will reach the turning speed after accelerating for a period of time, so that the motor will enter the stage of weak magnetic control. In the weak magnetic control stage, the q-axis current needs to be limited to avoid excessive q-axis current. Of course, when selecting the q-axis current, the maximum limit value is directly selected as the q-axis current. This causes the permanent magnet motor to rotate too fast, thereby affecting the smooth rotation of the joint.
[0077] Preferably, the specific steps of obtaining the current of the d-axis according to the operating parameters, design parameters and speed threshold of the motor are as follows:
[0078] Get the given current I of the q axis in real time qRef , the given current I qRef Input to the low-pass filter to get the first parameter I' qRef ;
[0079] Get the feedback current I of the q axis in real time q , the given current I q Input to the low-pass filter to obtain the second parameter I' q ;
[0080] By acquiring the given current and feedback current of the q-axis in real time and applying a low-pass filter for processing, more stable and accurate current parameters can be obtained. This method helps to accurately control the operation of the motor and improve stability and reliability.
[0081] Get the first parameter I' qRef and the second parameter I′ q The difference E is used as the input of the PI controller to obtain the current feedback given term D1;
[0082] By calculating the difference E between the given current and the feedback current and using it as the input of the PI controller, a feedback given term D1 for adjusting the current can be obtained. The PI controller can effectively reduce the error and improve the accuracy of current control. The formula for obtaining the current feedback given term D1 is as follows:
[0083] D1(t)=K p E(t)+K i ∫E(t)dt;
[0084] Where t is time, K p With K i They are the proportional gain coefficient and the integral gain coefficient in the PI controller respectively;
[0085] According to the rated current I n and rated speed ω n The amplification factor Kc of the feedforward given item of the weak magnetic current is calculated; the calculated amplification factor Kc is determined based on the rated current and rated speed of the motor, and the speed increment is adjusted by the amplification factor Kc, which can ensure that the motor runs in an efficient and stable state.
[0086] The formula for obtaining the amplification factor Kc is as follows:
[0087]
[0088] Among them I n is the rated current, ω n is the rated speed;
[0089] The formula for obtaining the feedforward given item D2 is as follows:
[0090] D2=-|(S t -S z )×Kc|; where S t is the target speed, S z is the speed threshold.
[0091] The speed increment of the current weak magnetic field is obtained, and the speed increment is adjusted by the amplification factor Kc to obtain the current feedback given item D2;
[0092] The d-axis current I is obtained by adding the feedback given term D1 and the feedforward given term D2. d .
[0093] In the present invention, feedback control and feedforward control are combined, and the d-axis current is obtained through a simple addition operation. The d-axis current can be accurately obtained without relying on a complex algorithm. The feedforward given item D1 of the weak magnetic current can improve the speed response of the motor speed during rapid switching, and the feedback given item of the weak magnetic current ensures the speed stability of the motor under heavy load conditions. The weak magnetic control method has low calculation amount, simple structure and high operation stability.
[0094] Preferably, the formula for obtaining the limit value of the q-axis current is as follows:
[0095]
[0096] Among them I max is the maximum output current, I d is the current of d axis.
[0097] When the q-axis current is measured, the maximum limit value among the q-axis currents is selected as the input of the q-axis current.
[0098] Preferably, the model formula for obtaining the initial torque is as follows:
[0099]
[0100] Where p is the number of permanent magnet motor poles, λ is the flux generated by the permanent magnet, L d , L q They are the inductance of the d-axis and the inductance of the q-axis respectively.
[0101] Preferably, the formula for obtaining the compensation torque according to the angular velocity is as follows:
[0102] T2=fc·sgn(q)+fv·q;
[0103] Where fc is the Coulomb friction coefficient, sgn(q) is used to indicate the rotation direction of the joint, when q is greater than 0, it indicates that the joint is rotating in the forward direction, sgn(q) = 1, when q is less than 0, it indicates that the joint is rotating in the reverse direction, sgn(q) = -1, fv is the viscous friction coefficient, and q is the angular velocity of the permanent magnet motor.
[0104] The viscous friction coefficient and the Coulomb friction coefficient can be obtained through the robot's dynamic model. Under different lubrication conditions, the corresponding viscous friction coefficient and the Coulomb friction coefficient can be obtained. It is worth mentioning that when using the robot, the joints must be lubricated at all times to ensure that the viscous friction coefficient and the Coulomb friction coefficient fit the model, thereby ensuring the accuracy of the calculation of the compensation torque.
[0105] Preferably, the steps of obtaining the compensation coefficient according to the target angle are as follows:
[0106] Determine the angle interval into which the target angle falls according to the target angle;
[0107] The corresponding compensation coefficient is obtained according to the angle interval.
[0108] In the present invention, multiple angle intervals are set. For example, taking 10° as an interval, 18 intervals will be generated, such as [0~10°], [11~20°]...[171~180°]. Each angle interval will have a corresponding compensation coefficient, and the compensation coefficient of each angle interval is obtained through the dynamic model. Setting multiple intervals is to facilitate the acquisition of the compensation coefficient and quickly obtain the corresponding compensation coefficient.
[0109] For example, when the target angle is 157°, the target angle falls within the angle range of [151-160°]. At this time, the corresponding compensation coefficient is obtained, and then the compensation coefficient is multiplied by the compensation torque to obtain the corresponding correction torque.
[0110] A joint torque compensation control system for a permanent magnet motor, using the joint torque compensation control method for a permanent magnet motor, comprising an analysis module, a data acquisition module, a torque acquisition module, a compensation module and a correction module;
[0111] The analysis module is used to obtain the rotation instruction of the joint, obtain the target angle to which the joint is to rotate, and obtain the current angle of the joint;
[0112] The data acquisition module is used to acquire the q-axis current and the d-axis current output by the permanent magnet motor according to the current angle and the target angle;
[0113] The torque acquisition module is used to acquire the torque of the permanent magnet motor according to the q-axis current and the d-axis current as the initial torque;
[0114] The compensation module is used to obtain the angular velocity of the permanent magnet motor when it rotates, and obtain the compensation torque according to the angular velocity;
[0115] Obtain compensation coefficient according to target angle;
[0116] The supplementary torque is corrected by the supplementary coefficient to obtain the corrected torque;
[0117] The correction module is used to compensate the initial torque by using the correction torque.
[0118] Preferably, the data acquisition module includes a first data submodule and a second data submodule;
[0119] The first data submodule is used to generate corresponding d-axis and q-axis currents using the MTPA current control method when the angle difference is less than the angle threshold;
[0120] The second data submodule is used to generate corresponding d-axis and q-axis currents using the MTPA current control method when the angle is greater than the angle threshold. When the speed of the permanent magnet motor is greater than or equal to the speed threshold, the d-axis current is obtained according to the motor's operating parameters, design parameters and speed threshold, and the q-axis current limit value is obtained according to the maximum current and the d-axis current.
[0121] Preferably, the second data submodule includes a first parameter acquisition unit, a second parameter acquisition unit, a first given item acquisition unit, an amplification factor acquisition unit, a second given item acquisition unit and an adding unit;
[0122] The first parameter acquisition unit is used to acquire the given current I of the q-axis in real time. qRef , the given current I qRef Input to the low-pass filter to get the first parameter I' qRef ;
[0123] The second parameter acquisition unit is used to obtain the feedback current I of the q axis in real time. q , the given current I q Input to the low-pass filter to obtain the second parameter I' q ;
[0124] The first given item acquisition unit is used to acquire a first parameter I′ qRef and the second parameter I′ q The difference E is used as the input of the PI controller to obtain the current feedback given term D1;
[0125] The gain factor acquisition unit is used to obtain the rated current I n and rated speed ω n Calculate the amplification factor Kc of the feedforward given term of the weak magnetic current;
[0126] The second given item acquisition unit is used to acquire the current magnetic weakening speed increment, and adjust the speed increment by the amplification factor Kc to obtain the current feedback given item D2;
[0127] The adding unit is used to obtain the d-axis current I by adding the feedback given term D1 and the feedforward given term D2. d .
[0128] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "illustrative embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0129] Although the embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present invention. A person skilled in the art may make changes, modifications, substitutions and variations to the above embodiments within the scope of the present invention.
Claims
1. A joint torque compensation control method for a permanent magnet motor, characterized in that: The steps include: Step S1: Obtain the rotation instruction of the joint, obtain the target angle to which the joint is to rotate, and obtain the current angle of the joint; Step S2: acquiring the q-axis current and the d-axis current output by the permanent magnet motor according to the current angle and the target angle; Step S3: obtaining the torque of the permanent magnet motor according to the q-axis current and the d-axis current as the initial torque; Step S4: obtaining the angular velocity of the permanent magnet motor during rotation, and obtaining the compensation torque according to the angular velocity; Obtain compensation coefficient according to target angle; The supplementary torque is corrected by the supplementary coefficient to obtain the corrected torque; Step S5: Compensating the initial torque by using the correction torque.
2. A joint torque compensation control method for a permanent magnet motor according to claim 1, characterized in that: The specific steps of step S2 are as follows: Obtaining the angle difference between the current angle and the target angle, and determining whether the angle difference is greater than an angle threshold, and if so, using the MTPA current control method to generate corresponding d-axis and q-axis currents; If it is greater than, the speed of the permanent magnet motor is obtained. When the speed of the permanent magnet motor is less than the speed threshold, the MTPA current control method is used to generate the corresponding d-axis and q-axis currents. When the speed of the permanent magnet motor is greater than or equal to the speed threshold, the d-axis current is obtained according to the motor's operating parameters, design parameters and speed threshold, and the q-axis current limit value is obtained according to the maximum current and the d-axis current.
3. A joint torque compensation control method for a permanent magnet motor according to claim 2, characterized in that: The specific steps for obtaining the d-axis current according to the motor's operating parameters, design parameters, and speed threshold are as follows: Get the given current I of the q axis in real time qRef , the given current I qRef Input to the low-pass filter to get the first parameter I q ' Ref ; Get the feedback current I of the q axis in real time q , the given current I q Input to the low-pass filter to obtain the second parameter I q ′; Get the first parameter I q ' Ref With the second parameter I q The difference E of ′ is used as the input of the PI controller to obtain the current feedback given term D1; According to the rated current I n and rated speed ω n Calculate the amplification factor Kc of the feedforward given term of the weak magnetic current; The speed increment of the current weak magnetic field is obtained, and the speed increment is adjusted by the amplification factor Kc to obtain the current feedback given item D2; The d-axis current I is obtained by adding the feedback given term D1 and the feedforward given term D2. d .
4. A joint torque compensation control method for a permanent magnet motor according to claim 2, characterized in that: The formula for obtaining the limit value of the q-axis current is as follows: Among them I max is the maximum output current, I d is the current of d axis.
5. The joint torque compensation control method for a permanent magnet motor according to claim 1, characterized in that: The model formula for obtaining the initial torque is as follows: Where p is the number of permanent magnet motor poles, λ is the flux generated by the permanent magnet, L d , L q They are the inductance of the d-axis and the inductance of the q-axis respectively.
6. A joint torque compensation control method for a permanent magnet motor according to claim 1, characterized in that: The formula for obtaining the compensation torque based on the angular velocity is as follows: T2=fc·sgn(q)+fv·q; Where fc is the Coulomb friction coefficient, sgn(q) is used to indicate the rotation direction of the joint, when q is greater than 0, it indicates that the joint is rotating in the forward direction, sgn(q) = 1, when q is less than 0, it indicates that the joint is rotating in the reverse direction, sgn(q) = -1, fv is the viscous friction coefficient, and q is the angular velocity of the permanent magnet motor.
7. A joint torque compensation control method for a permanent magnet motor according to claim 1, characterized in that: The steps to obtain the compensation coefficient according to the target angle are as follows: Determine the angle interval into which the target angle falls according to the target angle; The corresponding compensation coefficient is obtained according to the angle interval.
8. A joint torque compensation control system for a permanent magnet motor, characterized in that: A joint torque compensation control method for a permanent magnet motor according to any one of claims 1 to 7, comprising an analysis module, a data acquisition module, a torque acquisition module, a compensation module and a correction module; The analysis module is used to obtain the rotation instruction of the joint, obtain the target angle to which the joint is to rotate, and obtain the current angle of the joint; The data acquisition module is used to acquire the q-axis current and the d-axis current output by the permanent magnet motor according to the current angle and the target angle; The torque acquisition module is used to acquire the torque of the permanent magnet motor according to the q-axis current and the d-axis current as the initial torque; The compensation module is used to obtain the angular velocity of the permanent magnet motor when it rotates, and obtain the compensation torque according to the angular velocity; Obtain compensation coefficient according to target angle; The supplementary torque is corrected by the supplementary coefficient to obtain the corrected torque; The correction module is used to compensate the initial torque by using the correction torque.
9. A joint torque compensation control system for a permanent magnet motor according to claim 8, characterized in that: The data acquisition module includes a first data submodule and a second data submodule; The first data submodule is used to generate corresponding d-axis and q-axis currents using the MTPA current control method when the angle difference is less than the angle threshold; The second data submodule is used to generate corresponding d-axis and q-axis currents using the MTPA current control method when the angle is greater than the angle threshold. When the speed of the permanent magnet motor is greater than or equal to the speed threshold, the d-axis current is obtained according to the motor's operating parameters, design parameters and speed threshold, and the q-axis current limit value is obtained according to the maximum current and the d-axis current.
10. A joint torque compensation control system for a permanent magnet motor according to claim 9, characterized in that: The second data submodule includes a first parameter acquisition unit, a second parameter acquisition unit, a first given item acquisition unit, an amplification factor acquisition unit, a second given item acquisition unit and an adding unit; The first parameter acquisition unit is used to acquire the given current I of the q-axis in real time. qRef , the given current I qRef Input to the low-pass filter to get the first parameter I q ' Ref ; The second parameter acquisition unit is used to obtain the feedback current I of the q axis in real time. q , the given current I q Input to the low-pass filter to obtain the second parameter I q ′; The first given item acquisition unit is used to acquire a first parameter I q ' Ref With the second parameter I q The difference E of ′ is used as the input of the PI controller to obtain the current feedback given term D1; The gain factor acquisition unit is used to obtain the rated current I n and rated speed ω n Calculate the amplification factor Kc of the feedforward given term of the weak magnetic current; The second given item acquisition unit is used to acquire the current magnetic weakening speed increment, and adjust the speed increment by the amplification factor Kc to obtain the current feedback given item D2; The adding unit is used to obtain the d-axis current I by adding the feedback given term D1 and the feedforward given term D2. d .