Motor drive system and method

By setting a state observer in the motor drive system to adaptively estimate and compensate the load torque, the position deviation problem caused by load torque is solved, and the motion accuracy and system stability of intelligent mechanical equipment are improved.

CN111800053BActive Publication Date: 2024-12-17GUANGZHOU SHIYUAN ELECTRONICS CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010733743.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-07-27
Publication Date
2024-12-17
Estimated Expiration
2040-07-27

AI Technical Summary

Technical Problem

In the prior art, when the motor drive system is subjected to a load, due to the occurrence of load torque, there is a deviation between the actual position of the motor and the desired position, which reduces the motion accuracy of the intelligent mechanical equipment.

Method used

By setting up a state observer in the motor drive system, the load torque is adaptively estimated and added to the drive torque to achieve compensation of the load torque, thereby reducing the deviation between the actual position and the desired position.

Benefits of technology

The load torque can be compensated quickly and effectively without establishing a dynamic model, improving the stability and motion accuracy of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111800053B_ABST
    Figure CN111800053B_ABST
Patent Text Reader

Abstract

The embodiment of the present application discloses a motor drive system and method, which relates to the field of motor drive technology. The system includes: a controller, which is used to determine the first torque value of the driving motor according to the expected position parameter, expected speed parameter, actual position parameter and actual speed parameter of the motor obtained at the current moment; a state observer, which is used to determine the first torque estimation value for compensating the load force according to the actual position parameter of the motor obtained at the current moment, and the load is driven by the motor; an adding unit, which is used to add the first torque value and the first torque estimation value to obtain the second torque value, and output the second torque value to drive the motor to operate through the second torque value at the current moment. The above scheme can solve the technical problem in the prior art that there is a deviation between the actual position and the expected position of the motor due to the generation of load torque, thereby reducing the accuracy of movement.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of motor drive technology, and more particularly to a motor drive system and method. Background Art

[0002] A motor is an electromagnetic device that converts or transmits electrical energy based on the law of electromagnetic induction. Its main function is to generate driving torque and use the driving torque as a power source for electrical appliances or various machines.

[0003] With the development of mechanical dynamics, various intelligent mechanical devices have been born, such as legged robots, robotic arms and other intelligent mechanical devices. At this time, the motor, as an important component of intelligent mechanical devices, can be used as a power source for intelligent mechanical devices to drive the intelligent mechanical devices to move. Among them, the device driven by the motor in the intelligent mechanical device can be recorded as a load.

[0004] In the prior art, in order to ensure the accuracy of the movement of intelligent mechanical equipment, a closed-loop control method is usually used to drive the motor to operate. Among them, the closed-loop control method is specifically: pre-planning the expected position and expected speed of the motor operation at each moment during the movement of the intelligent mechanical equipment, and then the motor drive system determines the motor operation deviation according to the actual position and actual speed of the motor operation at the current moment and the expected position and expected speed, and calculates the driving torque based on the motor operation deviation, and then controls the motor operation through the driving torque to ensure that the intelligent mechanical equipment moves accurately. In the process of realizing the present invention, the inventor found that the prior art has the following defects: when using the closed-loop control method, if the load is subjected to force (such as the load receiving external forces such as friction), a load torque will appear, which can also be understood as the torque when the load is subjected to force. When the load torque appears, it will cause the intelligent mechanical equipment to have a movement deviation. At this time, in order to eliminate the deviation, the intelligent mechanical equipment needs to compensate for the load torque, thereby offsetting the load force. Then, in order to compensate for the load torque, the motor drive system will make the motor drive torque equal to the load torque. Accordingly, in order to maintain the normal output of the driving torque, there will always be a deviation between the actual position of the motor and the expected position. At this time, the greater the load torque, the greater the driving torque, and the greater the deviation between the actual position and the expected position, which greatly reduces the accuracy of the movement of the intelligent mechanical equipment. Summary of the invention

[0005] The present application provides a motor drive system and method to solve the technical problem in the prior art that due to the generation of load torque, there is a deviation between the actual position and the expected position of the motor, thereby reducing the movement accuracy.

[0006] In a first aspect, an embodiment of the present application provides a motor drive system, including: a controller, a state observer, and an adding unit;

[0007] The controller is used to obtain the expected position parameter, expected speed parameter, actual position parameter and actual speed parameter of the motor at the current moment; and determine the first torque value of the driving motor at the current moment according to the expected position parameter, expected speed parameter, actual position parameter and actual speed parameter;

[0008] The state observer is used to obtain actual position parameters of the motor at a current moment; determine a first torque estimation value for compensating for a load force at a current moment according to the actual position parameters, the load being driven by the motor;

[0009] The adding unit is used to add the first torque value and the first torque estimation value to obtain a second torque value; and output the second torque value to drive the motor to operate through the second torque value at a current moment.

[0010] Furthermore, when the state observer is used to determine the first torque estimation value for compensating the load force at the current moment according to the actual position parameter, specifically:

[0011] Subtracting the actual position parameter from the first observed position parameter to obtain a position deviation parameter at the current moment, wherein the first observed position parameter is the motor observed position estimated by the state observer at the previous moment;

[0012] A first torque estimation value for compensating the load force at the current moment is calculated according to the position deviation parameter and the second torque estimation value, and the second torque estimation value is the torque estimation value for compensating the load force calculated by the state observer at the previous moment.

[0013] Furthermore, the state observer is also used for:

[0014] Obtaining the electromagnetic torque value of the motor at the current moment;

[0015] Obtaining a first observed speed parameter of the motor at a current moment according to the electromagnetic torque value, the first torque estimation value, the position deviation parameter and the second observed speed parameter estimated at a previous moment;

[0016] A second observed position parameter is obtained according to the second observed speed parameter, the first observed speed parameter and the first observed position parameter, where the second observed position parameter is the motor observed position estimated at the current moment.

[0017] Furthermore, the calculation formula of the first observation speed parameter is:

[0018] Omega(k)=(K1*(Error*freq-0.5*(Omega(k)-Omega(k-1)))+K2*Error+TrqComp(k)+Te+B) / J+Omega(k-1)

[0019] Among them, Omega(k) is the first observed speed parameter, Omega(k-1) is the second observed speed parameter, Error is the position deviation parameter at the current moment, freq is the iteration frequency of the state observer, TrqComp(k) is the first torque estimation value, Te is the electromagnetic torque value at the current moment, B is the motor friction coefficient, J is the motor moment of inertia, K1 is the first proportional coefficient, and K2 is the second proportional coefficient.

[0020] Furthermore, the calculation formula of the second observation position parameter is:

[0021] Thetaob(k)=0.5*(Omega(k)-Omega(k-1))+Thetaob(k-1)

[0022] Among them, Thetaob(k) is the second observation position parameter, Omega(k) is the first observation speed parameter, Omega(k-1) is the second observation speed parameter, and Thetaob(k-1) is the first observation position parameter.

[0023] Furthermore, it also includes: an electromagnetic torque acquisition unit,

[0024] The electromagnetic torque acquisition unit is used to acquire the current value of the motor at the current moment; and multiply the current value by the electromagnetic torque coefficient to obtain the electromagnetic torque value at the current moment.

[0025] Furthermore, the calculation formula of the first torque estimation value is:

[0026] TrqComp(k)=K3*Error+TrqComp(k-1)

[0027] Among them, TrqComp(k) is the first torque estimation value, TrqComp(k-1) is the second torque estimation value, Error is the position deviation parameter at the current moment, and K3 is the third proportional coefficient.

[0028] Furthermore, it also includes: a parameter smoothing unit,

[0029] The parameter smoothing unit is used to obtain the first expected position parameter of the motor and the first expected speed parameter of the motor currently output by the control device; determine the position change parameter according to the second expected position parameter of the motor and the first expected position parameter of the motor output by the control device last time, and determine the speed change parameter according to the second expected speed parameter of the motor and the first expected speed parameter of the motor output by the control device last time; calculate the proportional parameter of the control frequency between the control device and the controller; divide the position change parameter and the speed change parameter according to the proportional parameter to obtain multiple position periodic change amounts and multiple speed periodic change amounts respectively; determine the expected position parameter at the current moment according to the position periodic change amount and the expected position parameter at the previous moment, and determine the expected speed parameter at the current moment according to the speed periodic change amount and the expected speed parameter at the previous moment.

[0030] Further, it also includes: a position sensor and a numerical conversion unit;

[0031] The position sensor is used to obtain the rotation scale parameters of the motor at the current moment;

[0032] The numerical conversion unit is used to determine the rotation speed parameter of the motor at the current moment according to the rotation scale parameter; perform unit conversion on the rotation scale parameter and the rotation speed parameter to obtain the actual position parameter and the actual speed parameter of the motor at the current moment, wherein the unit of the actual position parameter is the same as that of the expected position parameter, and the unit of the actual speed parameter is the same as that of the expected speed parameter.

[0033] Furthermore, it also includes: a multiplication unit;

[0034] The multiplication unit is used to multiply the first torque estimation value by a fourth proportional coefficient to obtain a multiplication result;

[0035] When the adding unit is used to add the first torque value and the first torque estimation value to obtain the second torque value, specifically:

[0036] The first torque value and the multiplication result value are added to obtain a second torque value.

[0037] In a second aspect, the embodiment of the present application further provides a motor driving method, including:

[0038] The controller obtains the expected position parameter, expected speed parameter, actual position parameter and actual speed parameter of the motor at the current moment;

[0039] The controller determines a first torque value of the driving motor at the current moment according to the expected position parameter, the expected speed parameter, the actual position parameter and the actual speed parameter;

[0040] The state observer obtains the actual position parameters of the motor at the current moment;

[0041] The state observer determines a first torque estimation value for compensating for a load force at a current moment according to the actual position parameter, and the load is driven by the motor;

[0042] An adding unit adds the first torque value and the first torque estimation value to obtain a second torque value;

[0043] The adding unit outputs the second torque value to drive the motor to operate by the second torque value at a current moment.

[0044] Furthermore, the state observer determines the first torque estimation value for compensating the load force at the current moment according to the actual position parameter, including:

[0045] The state observer obtains a position deviation parameter at the current moment by subtracting the actual position parameter from a first observed position parameter, wherein the first observed position parameter is an observed position of the motor estimated by the state observer at the previous moment;

[0046] The state observer calculates a first torque estimation value for compensating the load force at the current moment according to the position deviation parameter and the second torque estimation value, and the second torque estimation value is a torque estimation value for compensating the load force calculated by the state observer at the previous moment.

[0047] Furthermore, it also includes:

[0048] The state observer obtains the electromagnetic torque value of the motor at the current moment;

[0049] The state observer obtains a first observed speed parameter of the motor at the current moment according to the electromagnetic torque value, the first torque estimation value, the position deviation parameter and the second observed speed parameter estimated at the previous moment;

[0050] The state observer obtains a second observed position parameter according to the second observed speed parameter, the first observed speed parameter and the first observed position parameter, where the second observed position parameter is the motor observed position estimated at the current moment.

[0051] Furthermore, the calculation formula of the first observation speed parameter is:

[0052] Omega(k)=(K1*(Error*freq-0.5*(Omega(k)-Omega(k-1)))+K2*Error+TrqComp(k)+Te+B) / J+Omega(k-1)

[0053] Among them, Omega(k) is the first observed speed parameter, Omega(k-1) is the second observed speed parameter, Error is the position deviation parameter at the current moment, freq is the iteration frequency of the state observer, TrqComp(k) is the first torque estimation value, Te is the electromagnetic torque value at the current moment, B is the motor friction coefficient, J is the motor moment of inertia, K1 is the first proportional coefficient, and K2 is the second proportional coefficient.

[0054] Furthermore, the calculation formula of the second observation position parameter is:

[0055] Thetaob(k)=0.5*(Omega(k)-Omega(k-1))+Thetaob(k-1)

[0056] Among them, Thetaob(k) is the second observation position parameter, Omega(k) is the first observation speed parameter, Omega(k-1) is the second observation speed parameter, and Thetaob(k-1) is the first observation position parameter.

[0057] Furthermore, before the state observer obtains the electromagnetic torque value of the motor at the current moment, it also includes:

[0058] The electromagnetic torque acquisition unit acquires the current value of the motor at the current moment;

[0059] The electromagnetic torque acquisition unit multiplies the current value by the electromagnetic torque coefficient to obtain the electromagnetic torque value at a current moment.

[0060] Furthermore, the calculation formula of the first torque estimation value is:

[0061] TrqComp(k)=K3*Error+TrqComp(k-1)

[0062] Among them, TrqComp(k) is the first torque estimation value, TrqComp(k-1) is the second torque estimation value, Error is the position deviation parameter at the current moment, and K3 is the third proportional coefficient.

[0063] Furthermore, before the controller obtains the expected position parameter, expected speed parameter, actual position parameter and actual speed parameter of the motor at the current moment, it also includes:

[0064] The parameter smoothing unit obtains the first expected position parameter of the motor and the first expected speed parameter of the motor currently output by the control device;

[0065] The parameter smoothing unit determines a position change parameter according to a second desired position parameter of the motor outputted last time by the control device and the first desired position parameter of the motor, and determines a speed change parameter according to a second desired speed parameter of the motor outputted last time by the control device and the first desired speed parameter;

[0066] The parameter smoothing unit calculates a proportional parameter of the control frequency between the control device and the controller;

[0067] The parameter smoothing unit evenly divides the position change parameter and the speed change parameter according to the proportional parameter to obtain a plurality of position periodic change amounts and a plurality of speed periodic change amounts respectively;

[0068] The parameter smoothing unit determines the expected position parameter at the current moment according to the position periodic variation and the expected position parameter at the previous moment, and determines the expected speed parameter at the current moment according to the speed periodic variation and the expected speed parameter at the previous moment.

[0069] Furthermore, before the controller obtains the expected position parameter, expected speed parameter, actual position parameter and actual speed parameter of the motor at the current moment, it also includes:

[0070] The position sensor obtains the rotation scale parameter of the motor at the current moment;

[0071] The numerical value conversion unit determines the rotation speed parameter of the motor at the current moment according to the rotation scale parameter;

[0072] The numerical conversion unit performs unit conversion on the rotation scale parameter and the rotation speed parameter to obtain the actual position parameter and the actual speed parameter of the motor at the current moment, wherein the actual position parameter has the same unit as the expected position parameter, and the actual speed parameter has the same unit as the expected speed parameter.

[0073] Furthermore, before the adding unit adds the first torque value and the first torque estimation value, the method further includes:

[0074] The multiplication unit multiplies the first torque estimation value by a fourth proportional coefficient to obtain a multiplication result;

[0075] The adding unit adds the first torque value and the first torque estimation value to obtain a second torque value, including:

[0076] The adding unit adds the first torque value and the multiplication result to obtain a second torque value.

[0077] The above motor drive system and method obtain the expected position parameter, expected speed parameter, actual position parameter and actual speed parameter of the motor at the current moment through the controller to calculate the first torque value of the drive motor, and the state observer obtains the actual position parameter at the current moment to observe the first torque estimation value of the load torque, and then the addition unit adds the first torque value and the first torque estimation value to obtain the second torque value of the final drive motor operation, and outputs the second torque value to drive the motor operation. The technical means can solve the technical problem in the prior art that the actual position of the motor and the expected position are deviated due to the generation of load torque, thereby reducing the accuracy of movement. By setting a state observer inside the system, the load torque is adaptively estimated, and the load torque compensation is realized. Without creating a dynamic model, the load torque compensation can be realized faster and better, thereby improving the stability of the system.

[0078] Furthermore, by setting a parameter smoothing unit, when the control frequencies of the control device and the controller are inconsistent, it is possible to prevent sudden changes in the desired position and the desired speed from affecting the stability of the motor drive system.

[0079] Furthermore, by providing a multiplication unit, the compensation effect can be adjusted, thereby making the compensation effect of the motor drive system more in line with the actual requirements of the user. BRIEF DESCRIPTION OF THE DRAWINGS

[0080] Figure 1 It is a structural schematic diagram of a motor drive system in the prior art;

[0081] Figure 2 A schematic diagram of the structure of a motor drive system provided in an embodiment of the present application;

[0082] Figure 3 An internal data processing flow chart of a controller provided in an embodiment of the present application;

[0083] Figure 4 A schematic diagram of a controller circuit structure provided in an embodiment of the present application;

[0084] Figure 5 A schematic diagram of the structure of an adding unit provided in an embodiment of the present application;

[0085] Figure 6 A schematic diagram of the structure of another motor drive system provided in an embodiment of the present application;

[0086] Figure 7 A flow chart of a motor driving method provided in an embodiment of the present application. DETAILED DESCRIPTION

[0087] The present application will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are used to explain the present application, rather than to limit the present application. It should also be noted that, for ease of description, only the parts related to the present application, rather than all structures, are shown in the accompanying drawings.

[0088] It should be noted that, in this article, relational terms such as first and second are only used to distinguish one entity or operation or object from another entity or operation or object, and do not necessarily require or imply any such actual relationship or order between these entities or operations or objects. For example, the "first" and "second" of a first moment value and a second moment value are used to distinguish two different moment values.

[0089] Figure 1 Schematic diagram of the structure of the motor drive system in the prior art. Figure 1 The motor drive system 1 includes an impedance controller 11, an adding unit 12, a drive unit 13 and a position measurement unit 14, wherein the drive unit 13 includes a current loop 131, a space vector pulse width modulation (SVPWM) device 132 and an inverter 133.

[0090] The motor drive system 1 is connected to the control device 15 and the motor 16 respectively, and the motor 16 drives the load to move through the driver (not shown). The motor drive system 1, the control device 15, the motor 16 and the load are all configured in the intelligent mechanical device for exemplary description. The control device 15 is used to determine the expected position and expected speed of the motor at each moment, wherein the expected position refers to the position where the motor 16 is planned to run at the current moment, and the position where the motor runs can also be understood as the angle of rotation of the motor. The expected speed refers to the speed at which the motor is planned to run at the current moment, and the speed at which the motor runs can also be understood as the angular velocity of the motor rotation. Afterwards, the control device 15 sends the expected position and expected speed to the impedance controller 11 in sequence according to each moment.

[0091] The impedance controller 11 outputs a driving torque, which can drive the motor to operate. When there is no load force during the movement of the intelligent mechanical device, due to the limitations of the hardware conditions of the intelligent mechanical device itself, deviations will occur during the movement, that is, the motor of the intelligent mechanical device does not reach the expected position and expected speed. At this time, the impedance controller 11 can obtain the actual position and actual speed of the motor at the current moment through the position measurement unit 14. Among them, the actual position refers to the position where the motor actually runs at the current moment, and the actual speed refers to the speed at which the motor actually runs at the current moment. Afterwards, the impedance controller 11 determines the position deviation according to the expected position and the actual position, determines the speed deviation according to the expected speed and the actual speed, and adjusts the position deviation using the proportional coefficient, and adjusts the speed deviation using the differential coefficient, thereby obtaining the driving torque. After the current driving torque is output, the motor operates according to the driving torque, which can reduce the position deviation and the speed deviation. However, when a load is applied during the movement of the intelligent mechanical device, a load torque will appear. In this case, the impedance controller 11 automatically outputs a driving torque, which is equal to the load torque. After the current driving torque is output, the motor operates according to the driving torque to offset the load force, that is, to compensate for the load torque. At this time, in order to continuously compensate for the load torque, it is necessary to maintain the output of the driving torque. In order to maintain the output of the driving torque, the motor of the intelligent mechanical device needs to be operated to an inaccurate position and speed so that the driving torque calculated by the impedance controller 11 according to the deviation is equal to the load torque. In this case, the intelligent mechanical device will inevitably have a position deviation during the movement. It can be understood that when the load torque is larger, the position deviation of the intelligent mechanical device during the movement is larger, and the accuracy of the movement of the intelligent mechanical device is lower.

[0092] Therefore, in the prior art, in order to ensure the accuracy of the movement of intelligent mechanical equipment, Figure 1In the system shown, when the intelligent mechanical device is subjected to load force during the movement, the control device 15 analyzes the load force of the intelligent mechanical device during the movement, and then calculates the torque bias value at each movement moment. After that, the control device 15 outputs the torque bias value. Correspondingly, the impedance controller 11 calculates the driving torque based on the deviation between the expected position and the actual position and the expected speed and the actual speed, instead of outputting a driving torque equal to the load torque. It can be understood that in addition to the deviation caused by the limitations of the hardware conditions of the intelligent mechanical device itself, the load torque will also have a deviation. Afterwards, the adding unit 12 adds the driving torque output by the impedance controller 11 and the torque bias value output by the control device 15 to obtain the final driving torque at the current movement moment. Among them, the torque bias value can also be understood as a torque compensation value, that is, after the control device 15 analyzes the load stress, in order to offset the load stress (that is, to compensate for the load torque caused by the load stress), the load torque is estimated, and then the torque bias value for compensating the load torque is obtained. After that, the estimated torque bias value and the driving torque generated by the deviation are added to obtain the final driving torque, which is used to compensate for the load torque and can also be understood as the load torque finally calculated. After that, according to the final driving torque, the motor is driven to operate by the drive unit. It can be understood that in the above description, the driving torque output by the impedance controller 11 is equal to the difference between the load torque (that is, the final driving torque) and the torque bias value. The more accurate the torque bias value is, that is, the closer the torque bias value is to the load torque, the smaller the driving torque output by the impedance controller 11 is, that is, the closer the expected position and the actual position are, so as to ensure the motion accuracy of the intelligent mechanical device.

[0093] However, when calculating the torque bias value, the control device 15 needs to establish an accurate dynamic model. When the load of the intelligent mechanical device requires more drivers to drive, the complexity of the dynamic model will increase. For example, in a legged robot, the load is controlled by 12 drivers. At this time, it is necessary to establish a dynamic model based on the 12 drivers, which greatly increases the complexity of the dynamic model and increases the pressure of data processing of the control device 15. In addition, if the dynamic model is inaccurate, the compensation effect will be reduced, thereby affecting the normal operation of the intelligent mechanical device.

[0094] In view of this, an embodiment of the present application provides a motor drive system, which can accurately compensate for the load torque when there is a load torque, reduce the deviation between the actual position and the expected position of the motor, and ensure the accuracy of movement without the need for modeling through a control device.

[0095] It should be noted that the motor drive system provided in the embodiment of the present application can drive the motor to operate, and after the motor is running, the load can be driven to operate through the driver, wherein the specific type of the load is not limited in the embodiment. It is understandable that a motor drive system can drive a motor to operate. If there are multiple motors in the intelligent mechanical device, then each motor corresponds to a motor drive system, and each motor drive system can be connected to the same control device.

[0096] Specifically, Figure 2 A schematic diagram of the structure of a motor drive system provided in an embodiment of the present application. Figure 2 , the motor drive system 2 includes a controller 21, a state observer 22 and an adding unit 23;

[0097] The controller 21 is used to obtain the expected position parameter, expected speed parameter, actual position parameter and actual speed parameter of the motor 24 at the current moment; and determine the first torque value of the driving motor 24 at the current moment according to the expected position parameter, expected speed parameter, actual position parameter and actual speed parameter;

[0098] The state observer 22 is used to obtain the actual position parameters of the motor 24 at the current moment; determine the first torque estimation value used to compensate for the load force at the current moment based on the actual position parameters, and the load is driven by the motor 24; the addition unit 23 is used to add the first torque value and the first torque estimation value to obtain a second torque value; output the second torque value to drive the motor 24 to operate through the second torque value at the current moment.

[0099] Specifically, the motor drive system 2 is used to drive the motor 24 to operate. Among them, the motor type can be set according to actual conditions. In the embodiment, a servo motor is used as an example for description. The servo motor can control the speed and position accuracy very accurately, and can convert the voltage signal into torque and speed to drive the load. The motor drive system includes a controller 21, a state observer 22 and an addition unit 23. In the embodiment, the control frequency of the controller 21 is set equal to the control frequency of the state observer 22. That is, the data processing cycle of the controller 21 and the state observer 22 is the same.

[0100] Among them, the controller 21 has data processing and calculation functions. In the embodiment, the controller 21 can be understood as an impedance controller, which can realize proportional differential control. It should be noted that the controller 21 has a certain control frequency, and the data processing cycle of the controller 21 can be determined by the control frequency, that is, the controller 21 processes data periodically according to the control frequency. At this time, each cycle of processing data can correspond to a moment. In the embodiment, the moment when the controller 21 currently processes data is recorded as the current moment.

[0101] The controller 21 can obtain the expected position parameter, expected speed parameter, actual position parameter and actual speed parameter of the motor at the current moment. Among them, the expected position parameter can also be understood as the expected position, that is, the expected position parameter is the position where the motor is planned to run at the current moment. The expected speed parameter can also be understood as the expected speed, that is, the expected speed parameter is the speed at which the motor is planned to run at the current moment. The expected position parameter and the expected speed parameter are generated by a control device 25 connected to the controller 21. Among them, the control device 25 is a computer device, which can be integrated with the motor drive system 2 in the same device, or it can be independent of the motor drive system 2. The control device 25 can plan the expected position parameter and expected speed parameter corresponding to the motor at each moment. It can be understood that when there are multiple motors 24 in the intelligent mechanical device, the controller 21 corresponding to each motor 24 is the same as the same control device 25. At this time, the control device 25 can respectively plan the expected position parameter and expected speed parameter corresponding to each motor 24 at each moment. Among them, the calculation method of the expected position parameter and the expected speed parameter can adopt the existing calculation method, and the embodiment does not limit this. For example, the intelligent mechanical device is a foot-type robot, which can imitate the walking action of humans. At this time, the foot-type robot is set to contain two states (for example, one state corresponds to the leg-lifting operation and the other state corresponds to the grounding operation) in imitation of the walking action of human legs crossing forward. The foot-type robot can achieve walking by repeating the two states. It can be understood that the above state can be understood as the state of the joints that realize walking in the foot-type robot. The joints are driven by motors, and the state of the joints can be understood as the posture of the joints. The control device 25 can determine the state of the joints at each moment during the walking process according to the position of the joints in the foot-type robot and the principle of robot dynamics. After that, according to two adjacent states, through S-curve planning, it can determine the position command and speed command of the motor-driven joint when it reaches the current state from the previous state, and then obtain the expected position and expected speed of the motor in the current state. Optionally, the expected position parameter and the expected speed parameter are transmitted in the form of electrical signals, and the electrical signal is preferably an analog electrical signal, which refers to a continuous signal.

[0102] The actual position parameter can also be understood as the actual position, which refers to the position at which the motor actually runs at the current moment. The actual speed parameter can also be understood as the actual speed, which refers to the speed at which the motor actually runs at the current moment. Optionally, the controller 21 can directly read the current actual position parameter of the motor 24, and calculate the actual speed parameter at the current moment through the actual position parameter at the current moment and the actual position parameter at the previous moment and the control frequency. Optionally, the controller 21 can also obtain the actual speed parameter and the actual position parameter through a position sensor and a numerical conversion unit. Optionally, the actual position parameter and the actual speed parameter are transmitted in the form of an electrical signal, and the electrical signal is preferably an analog electrical signal.

[0103] It can be understood that during the operation of the motor, due to the limitations of the load force of the intelligent mechanical equipment, hardware equipment and other factors, there will be deviations between the expected position parameters and actual position parameters, and between the expected speed parameters and actual speed parameters of the motor at the current moment. At this time, in order to eliminate the deviation, it is necessary to change the torque value of the input motor. In the embodiment, the torque value used to eliminate the deviation is calculated by the controller 21, and the torque value is recorded as the first torque value. Typically, when calculating the first torque value, a proportional differential method can be used, that is, the controller 21 can be considered as a proportional differential control system. At this time, the internal structure of the controller 21 is as follows Figure 3 shown. Figure 3 This is a flow chart of internal data processing of a controller provided in an embodiment of the present application. Figure 3 , the specific way in which the controller 21 calculates the first torque value is: calculating the difference between the expected position parameter and the actual position parameter, and passing the difference through the proportional control coefficient kp to obtain the position error elimination torque, and at the same time, calculating the difference between the expected speed parameter and the actual speed parameter, and passing the difference through the differential control coefficient kd to obtain the speed error elimination torque, and then adding the two torques to obtain the first torque value. Based on the above description, it can be seen that the calculation formula of the first torque value can be expressed as:

[0104] tpdout=(PosCmd-PosFb)*kp+(VeloCmd-VeloFb)*kd

[0105] Among them, PosCmd represents the expected position parameter (Position Command) at the current moment, PosFb represents the actual position parameter (Position Feedback) at the current moment, kp represents the proportional control coefficient, VeloCmd represents the expected velocity parameter (Velocity Command) at the current moment, VeloFb represents the actual velocity parameter (VelocityFeedback) at the current moment, kd represents the differential control coefficient, and tpdout represents the first torque value. The values ​​of kp and kd can be set by the controller of the motor drive system.

[0106] It can be seen from the above description that the controller 21 can also be understood as a position-based impedance control system.

[0107] Optional, Figure 3 The controller 21 shown can be a programmable logic device or a control circuit. When the controller 21 is a control circuit, its specific structure can be referred to as follows: Figure 4 .in, Figure 4 A schematic diagram of a controller circuit structure provided in an embodiment of the present application, referring to Figure 4, the controller 21 is composed of an amplifier 211, an amplifier 212, an amplifier 213 and peripheral resistors, wherein the amplifier 211 and its peripheral resistors form a subtractor, the amplifier 212 and its peripheral resistors form a subtractor, and the amplifier 213 and its peripheral resistors form an adder. Specifically, the first input terminal (+ terminal) of the amplifier 211 is the input terminal of the desired position parameter, the second input terminal (- terminal) of the amplifier 211 is the input terminal of the actual position parameter, the first input terminal (+ terminal) of the amplifier 212 is the input terminal of the desired speed parameter, the second input terminal (- terminal) of the amplifier 212 is the input terminal of the actual speed parameter, and the output terminal of the amplifier 213 outputs the first torque value. It should be noted that the specific models and parameters of the amplifiers and peripheral resistors mentioned above can be set according to actual conditions. At the same time, Figure 4 This is merely an exemplary description of the controller 21 , rather than a limitation of the controller 21 .

[0108] Furthermore, the state observer 22 can obtain the estimated value of the state variable according to the actual measured values ​​of the external variables (input variables and output variables) of the system. In the embodiment, the function of the state observer 22 is to observe the estimated value of the load torque according to the actual position parameters of the motor at the current moment, and record the estimated value obtained by the state observer 22 at the current moment as the first torque estimated value, which is used to perform torque compensation when the load is subjected to force. In other words, the load torque that may exist at the current moment is estimated in advance by the state observer 22, and compensation is performed in advance based on the estimated load torque. Among them, the state observer 22 can adopt a Lumberg observer, a Kalman observer, etc. In the embodiment, the Lumberg observer is used as an example for description, that is, in the position feedback path, a Lumberg observer is added to obtain an unmeasurable first torque estimate. Optionally, the working mode of the state observer 22 is as follows: the state observer 22 determines the position deviation according to the difference between the observed position parameter estimated at the previous moment and the actual position parameter at the current moment (the position deviation can reflect the position deviation when the state observer 22 estimates the load torque at the current moment), and then obtains a torque for compensating the deviation according to the position deviation, and sums the torque with the load torque estimated at the previous moment to obtain the first torque estimation value at the current moment. Among them, the state observer 22 can obtain the observed position parameter by observing the speed parameter. The observed speed parameter and the observed position parameter can be understood as the motor running position and running speed estimated by the state observer 22.

[0109] Since the state observer 22 estimates the first torque estimation value for compensating the load force, and the controller 21 calculates the first torque value for eliminating the position error and the speed error, then, by adding the above two values, the driving torque when the motor is running at the current moment can be obtained. In the embodiment, the driving torque is recorded as the second torque value. Typically, an adding unit 23 is set, the controller 21 sends the first torque value to the adding unit 23, the state observer 22 sends the first torque estimation value to the adding unit 23, and the adding unit 23 adds the two received torque values ​​and outputs the second torque value. Optionally, the controller 21 sends the first torque value to the adding unit 23 in the form of an electrical signal, and preferably an analog electrical signal. Similarly, the state observer 22 sends the first torque estimation value to the adding unit 23 in the form of an electrical signal, and preferably an analog electrical signal. The adding unit 23 also outputs the second torque value in the form of an electrical signal, and preferably an analog electrical signal, and the analog electrical signal is preferably an analog direct current signal.

[0110] Furthermore, the adding unit 23 may be a programmable logic device that implements the adding function, or an adding circuit. When the adding unit 23 is an adding circuit, its specific structure is as follows: Figure 5 Specifically, Figure 5 A schematic diagram of the structure of an adding unit provided in an embodiment of the present application, referring to Figure 5 The adding unit 23 is composed of an amplifier 231 and an external resistor, wherein the amplifier 231 and its external resistor form an adder (adding circuit). Specifically, the first input terminal (+ terminal) of the amplifier 231 is connected to the first torque value and the first torque estimation value through resistors, the second input terminal (- terminal) of the amplifier 231 is grounded through resistors, and the output terminal of the amplifier 231 outputs the second torque value. It should be noted that the specific models and parameters of the amplifier and external resistor mentioned above can be set according to actual conditions.

[0111] Optionally, the adding unit 23 outputs the second torque value to the driving unit 26, so that the driving unit 26 controls the operation of the motor 24 through the second torque value. At this time, the motor drive system 2 may also include a driving unit 26, and the driving unit 26 includes a current loop 261, a space vector pulse width modulator 262 and an inverter 263. It can be understood that the driving unit 26 can also be an independent module, which is not integrated in the motor drive system. Among them, the current loop 261 is a current feedback system, which is mainly used to improve the performance of the system by improving the stability of the current. In the embodiment, the current loop 261 is used to convert the second torque value into a current value used by the power supply machine 24, and the current value is also transmitted in the form of an electrical signal. The main idea of ​​the space vector pulse width modulator 262 is to use the ideal magnetic flux circle of the stator of the three-phase symmetrical motor when the three-phase symmetrical sinusoidal voltage is supplied as a reference standard, and to make appropriate switching with different switching modes of the three-phase inverter to form a PWM wave. The main function of the inverter 263 is to convert DC power into AC power. In the embodiment, the space vector pulse width modulator 262 and the inverter 263 are used to obtain a PWM wave based on the current value, and then drive the motor to operate through the PWM wave.

[0112] In the above, the controller obtains the expected position parameter, expected speed parameter, actual position parameter and actual speed parameter of the motor at the current moment to calculate the first torque value of the driving motor, and the state observer obtains the actual position parameter at the current moment to observe the first torque estimation value of the load torque, and then the addition unit adds the first torque value and the first torque estimation value to obtain the second torque value of the final driving motor operation, and outputs the second torque value to drive the motor operation. The technical means can solve the technical problem in the prior art that the actual position of the motor and the expected position are deviated due to the generation of load torque, thereby reducing the accuracy of movement. By setting a state observer inside the system, the load torque is adaptively estimated, and then the load torque is compensated. Without creating a dynamic model, the load torque compensation can be achieved faster and better. At the same time, since there is no need to control the device to establish a dynamic model, the calculation pressure of the control device is reduced, making the system more stable.

[0113] Based on the above embodiment, the state observer 22 is specifically used to determine the first torque estimation value for compensating the load force at the current moment according to the actual position parameter as follows: subtract the actual position parameter from the first observed position parameter to obtain the position deviation parameter at the current moment, where the first observed position parameter is the motor observed position estimated by the state observer at the previous moment; calculate the first torque estimation value for compensating the load force at the current moment according to the position deviation parameter and the second torque estimation value, where the second torque estimation value is the torque estimation value for compensating the load force calculated by the state observer at the previous moment.

[0114] The motor observed position refers to the motor running position estimated by the state observer 22, wherein the motor observed position can be obtained by the motor observed position and motor observed speed saved at the last moment. Accordingly, after the state observer 22 estimates the motor running position at the current moment, it is saved for use at the next moment. In the embodiment, the motor observed position estimated at the last moment is recorded as the first observed position parameter.

[0115] Specifically, when calculating the first torque estimation value, the difference between the actual position parameter at the current moment and the first observed position is first calculated and recorded as the position deviation parameter. The position deviation parameter can reflect the difference between the observed position of the motor estimated at the previous moment and the position to which the motor actually runs at the current moment, so that the state observer 22 can clearly understand the position deviation when estimating at the current moment. Afterwards, based on the position deviation parameter, the torque estimation value that eliminates the position deviation parameter is calculated, and then the torque estimation value is added to the torque estimation value obtained at the previous moment to obtain the first torque estimation value at the current moment. Among them, the torque estimation value obtained at the previous moment is recorded as the second torque estimation value. At this time, the calculation formula of the first torque estimation value is:

[0116] TrqComp(k)=K3*Error+TrqComp(k-1)

[0117] Wherein, TrqComp(k) is the first torque estimation value, TrqComp(k-1) is the second torque estimation value, Error is the position deviation parameter at the current moment, and K3 is the third proportional coefficient. It can be understood that the specific value of K3 can be set by the staff of the motor drive system.

[0118] It can be seen from the above formula that the position deviation parameter is taken into account when calculating the first torque estimation value, thereby ensuring the accuracy of the first torque estimation value. Optionally, after obtaining the first torque estimation value, the state observer 22 saves the first torque estimation value in addition to outputting the first torque estimation value. After saving the first torque estimation value, the state observer 22 takes the next moment as the current moment, and changes the saved first torque estimation value into the second torque estimation value for recalculating the first torque estimation value.

[0119] As can be seen from the above, when calculating the first torque estimation value, the first observed position parameter at the previous moment is used. Therefore, in addition to calculating the first torque estimation value, the state observer in the embodiment needs to calculate the motor observed position at the current moment. Accordingly, in the embodiment, the state observer 22 is also used to:

[0120] Obtaining the electromagnetic torque value of the motor 24 at the current moment;

[0121] Obtaining a first observed speed parameter of the motor at a current moment according to the electromagnetic torque value, the first torque estimation value, the position deviation parameter and the second observed speed parameter estimated at a previous moment;

[0122] A second observed position parameter is obtained according to the second observed speed parameter, the first observed speed parameter and the first observed position parameter, where the second observed position parameter is the motor observed position estimated at the current moment.

[0123] The electromagnetic torque value is the rotational torque formed on the rotor by the interaction between the magnetic flux of each pole of the motor's rotating magnetic field and the rotor current. For a servo motor, the electromagnetic torque value is proportional to the motor's current, and the proportional coefficient is a constant. In the embodiment, the proportional coefficient is recorded as the electromagnetic torque coefficient, and the specific value of the electromagnetic torque coefficient is usually related to the model of the motor.

[0124] Figure 6 A schematic diagram of the structure of another motor drive system provided in an embodiment of the present application. Figure 6 is Figure 2 Based on , some units for data processing are added. Figure 6 ,compared to Figure 2 In addition to the controller 21, the state observer 22, the adding unit 23, and the driving unit 26, the motor driving system 2 also includes an electromagnetic torque acquisition unit 27. The electromagnetic torque acquisition unit 27 is mainly used to calculate the electromagnetic torque value.

[0125] Accordingly, the motor drive system is set to further include: an electromagnetic torque acquisition unit 27. The electromagnetic torque acquisition unit 27 is used to acquire the current value of the motor 24 at the current moment; and multiply the current value by the electromagnetic torque coefficient to obtain the electromagnetic torque value at the current moment.

[0126] Among them, the electromagnetic torque acquisition unit 27 can obtain the current output by the current loop 261 at the current moment. Since the current is used to drive the motor, the current can also be understood as the current value of the motor 24 at the current moment. Further, the electromagnetic torque acquisition unit 27 also records the electromagnetic torque coefficient of the motor 24, so that when the current value is obtained, the current value is multiplied by the electromagnetic torque coefficient to obtain the electromagnetic torque value at the current moment, and then the calculated electromagnetic torque value is output to the state observer 22. The electromagnetic torque value is transmitted as an electrical signal. It can be understood that the control frequency of the motor torque acquisition unit 27 is equal to the control frequency of the state observer 22. Optionally, the electromagnetic torque acquisition unit 27 can be understood as a multiplier, which is an electronic device that performs the multiplication of two unrelated signals. In an embodiment, one end of the multiplier inputs the current value, the other end inputs the electromagnetic torque coefficient, and the output end outputs the electromagnetic torque value. Optionally, the electromagnetic torque acquisition unit 27 obtains a digital electrical signal when sampling the current value, wherein the digital electrical signal refers to a discrete signal or a pulse signal. Correspondingly, the electromagnetic torque value output by the electromagnetic torque acquisition unit 27 is also a digital electrical signal.

[0127] The state observer 22 obtains the electromagnetic torque value and can calculate the observed speed of the motor at the current moment. In the embodiment, the observed speed of the motor at the current moment is recorded as the first observed speed parameter. Since the observed speed of the motor at the previous moment is used in the process of calculating the first observed speed parameter, at this time, in order to distinguish it from the first observed speed parameter, the observed speed of the motor at the previous moment is recorded as the second observed speed parameter. Furthermore, when calculating the first observed speed parameter, the electromagnetic torque value, the position deviation parameter, the first torque estimation value and the second observed speed parameter are used. At this time, the calculation formula of the first observed speed parameter is:

[0128] Omega(k)=(K1*(Error*freq-0.5*(Omega(k)-Omega(k-1)))+K2*Error+TrqComp(k)+Te+B) / J+Omega(k-1)

[0129] Among them, Omega(k) is the first observed speed parameter, Omega(k-1) is the second observed speed parameter, Error is the position deviation parameter at the current moment, freq is the iteration frequency of the state observer, TrqComp(k) is the first torque estimation value, Te is the electromagnetic torque value at the current moment, B is the motor friction coefficient, J is the motor moment of inertia, K1 is the first proportional coefficient, and K2 is the second proportional coefficient. It should be noted that the specific values ​​of K1 and K2 can be set or changed by the staff of the motor drive system based on actual conditions.

[0130] Specifically, referring to the formula, the first observed speed parameter can also be understood as: determining the change parameter of the motor observed speed at the current moment based on the motor operation condition, and then obtaining the first observed speed parameter at the current moment based on the change parameter and the second observed speed parameter obtained at the previous moment. Typically, the iteration frequency of the state observer can also be understood as the control frequency of the state observer, and Error*freq can reflect the speed deviation parameter corresponding to the position deviation parameter at the current iteration frequency. 0.5*(Omega(k)-Omega(k-1)) can be understood as the integral of the motor observed speed, which can reflect the change parameter of the motor observed position at the current moment. K1*(Error*freq-0.5*(Omega(k)-Omega(k-1))) can be understood as a torque value obtained based on the speed deviation parameter and the change parameter of the motor observed position. K2*Error can be understood as a torque value obtained based on the position deviation parameter. Then, the two torque values ​​are added to the motor friction coefficient (which can also be understood as friction torque), the first torque estimation value and the electromagnetic torque value. The addition result is divided by the moment of inertia to obtain the speed change parameter at the current moment. Then, the first observed speed parameter is obtained based on the speed change parameter and the second observed speed parameter. At this time, the first observed speed parameter obtained not only takes into account the position deviation parameter, but also takes into account the force conditions during the operation of the motor, such as the friction torque, the electromagnetic torque value and the observed torque, thereby ensuring the accuracy of the first observed speed parameter.

[0131] After obtaining the first observed speed parameter, the motor observed position at the current moment can be obtained according to the first observed speed parameter. In the embodiment, the motor observed position at the current moment is recorded as the second observed position parameter. Since the motor observed position is reflected by the integral of the motor observed speed, the second observed position parameter can be obtained by the discrete integral formula. At this time, the calculation formula of the second observed position parameter is:

[0132] Thetaob(k)=0.5*(Omega(k)-Omega(k-1))+Thetaob(k-1)

[0133] Among them, Thetaob(k) is the second observation position parameter, Omega(k) is the first observation speed parameter, Omega(k-1) is the second observation speed parameter, and Thetaob(k-1) is the first observation position parameter.

[0134] According to the above formula, 0.5*(Omega(k)-Omega(k-1)) is the change parameter of the motor observed position at the current moment. By adding the change parameter to the first observed position parameter at the previous moment, the second observed position parameter at the current moment can be obtained.

[0135] It should be noted that after calculating the second observed position parameter, the first observed speed parameter, and the first torque estimation value, it can be considered that the state observer 22 completes the data processing at the current moment. Typically, the state observer 22 will save the calculated second observed position parameter, the first observed speed parameter, and the first torque estimation value for use at the next moment. Optionally, when saving the data calculated at the current moment, the data corresponding to the previous moment can be deleted to reduce the data processing pressure of the state observer 22.

[0136] It can be understood that the first torque estimation value not only takes into account the friction torque, electromagnetic torque, etc. of the motor, but also takes into account the external load torque estimated at the previous moment and the actual operating position of the motor, thereby ensuring the accuracy of the first torque estimation value. At the same time, the three proportional coefficients K1, K2 and K3 in the state observer can be adjusted by the staff according to actual conditions, thereby ensuring the observation effect of the state observer. Moreover, the motor drive system does not need to construct an additional dynamic model, which also reduces the operational complexity of the motor drive system. In addition, during the operation of the state observer, the moment of inertia is only one of the parameters, not the main parameter, which also reduces the degree of dependence on the moment of inertia.

[0137] Based on the above embodiments, Figure 6 , the motor drive system 2 also includes: a parameter smoothing unit 28. The parameter smoothing unit 28 is used to obtain the first expected position parameter of the motor and the first expected speed parameter of the motor currently output by the control device 25; determine the position change parameter according to the second expected position parameter of the motor output by the control device 25 last time and the first expected position parameter of the motor, and determine the speed change parameter according to the second expected speed parameter of the motor output by the control device last time and the first expected speed parameter of the motor; calculate the proportional parameter of the control frequency between the control device 25 and the controller 21; divide the position change parameter and the speed change parameter according to the proportional parameter 21, and obtain multiple position periodic change amounts and multiple speed periodic change amounts respectively; determine the expected position parameter at the current moment according to the position periodic change amount and the expected position parameter at the previous moment, and determine the expected speed parameter at the current moment according to the speed periodic change amount and the expected speed parameter at the previous moment.

[0138] Considering that in actual applications, there is a situation where the control frequency of the control device 25 is inconsistent with the control frequency of the controller 21. At this time, when the controller 21 calculates the expected position and expected speed output by the control device 25, there will be a sudden change in the expected position and expected speed. For example, the control frequency of the control device 25 is 1kHz, and the control frequency of the controller 21 is 10kHz. At this time, the data processing speed of the controller 21 is 10 times that of the control device 25. When the control device 25 outputs the expected position and expected speed, the expected position and expected speed will be used as the expected position parameters and expected speed parameters of 10 data processing moments in the controller 21. Then, when the control device 25 outputs the expected position and expected speed next time, the expected position parameters and expected speed parameters used by the controller 21 in data processing will be suddenly changed, which will seriously affect the stability of the motor drive system. Therefore, in the embodiment, a parameter smoothing unit 28 is added to the motor drive system 2 to smooth the expected position and expected speed output by the control device 25 according to the control frequency of the controller 21 and the control frequency of the control device 25.

[0139] In the embodiment, the expected position currently output by the control device 25 is recorded as the first expected position parameter of the motor, the expected speed currently output is recorded as the first expected speed parameter of the motor, the expected position previously output by the control device 25 is recorded as the second expected position parameter of the motor, and the expected speed previously output is recorded as the second expected speed parameter of the motor. Specifically, the parameter smoothing unit 28 is connected to the control device 25, and can receive the first expected speed parameter of the motor and the first expected position parameter of the motor output by the control device 25, and save the first expected speed parameter of the motor and the first expected position parameter of the motor, so that when the first expected speed parameter of the motor and the first expected position parameter of the motor are received next time, the saved first expected speed parameter of the motor and the first expected position parameter of the motor are changed into the second expected speed parameter of the motor and the second expected position parameter of the motor. It can be understood that when the parameter smoothing unit 28 receives the first expected speed parameter of the motor and the first expected position parameter of the motor for the first time, the corresponding second expected speed parameter and the second expected position parameter can be 0. Further, the difference between the first expected position parameter of the motor and the second expected position parameter of the motor is calculated, and the difference can reflect the change of the expected position. In the embodiment, the difference is recorded as the position change parameter. At the same time, the difference between the first desired speed parameter of the motor and the second desired speed parameter of the motor is calculated, and the difference can reflect the change of the desired speed. In the embodiment, the difference is recorded as the speed change parameter. Afterwards, the control frequency between the control device 25 and the controller 21 is subtracted to obtain a proportional parameter. The proportional parameter can reflect the data processing speed difference between the controller 21 and the control device 25. Afterwards, the position change parameter and the speed change parameter are divided equally according to the proportional parameter. For example, the control frequency of the control device 25 is 1kHz, and the control frequency of the controller 21 is 10kHz. At this time, the proportional parameter is 1 / 10. The parameter smoothing unit 28 divides the position change parameter into 10 parts, that is, divides the position change parameter by 10, and records the divided parameter as the position period change amount. The speed change parameter is also divided into 10 parts, that is, divides the speed change parameter by 10, and records the divided parameter as the speed period change amount.

[0140] Further, after the parameter smoothing unit 28 obtains the position period variation, based on the control frequency of the controller 21, a position period variation is added each time on the basis of the second desired position parameter of the motor to obtain the desired position parameter at the current moment. For example, the position period variation is 1 and there are 10 position period variations, and the second desired position parameter of the motor is 10. After that, the parameter smoothing unit 28 uses the parameter 11 obtained by 10+1 as the desired position parameter at the current moment according to the control frequency of the controller 21, and inputs it into the controller 21. At the next moment of the controller 21, the parameter 12 obtained by adding 11 to 1 is used as the desired position parameter and inputs it into the controller 21. And so on, until 10 position period variations are added. After that, the first desired position parameter newly sent by the control device 25 is received again, and the calculation is continued in the above manner. Similarly, after obtaining the speed period variation, based on the control frequency of the controller 21, a speed period variation is added each time on the basis of the second desired speed parameter of the motor to obtain the desired speed parameter at the current moment.

[0141] Optionally, since the expected position parameter and the expected speed parameter are respectively smoothed for the expected position and speed parameters output by the control device, at this time, the expected position and speed parameters output by the control device can be understood as digital electrical signals, wherein the digital electrical signals are discrete or pulse signals. The expected position parameter and the expected speed parameter can be understood as analog electrical signals. Optionally, the specific type and structure of the parameter smoothing unit 28 can be set according to actual conditions, for example, the parameter smoothing unit 28 is a programmable logic device or a digital / analog converter.

[0142] By setting the parameter smoothing unit, when the control frequencies of the control device and the controller are inconsistent, it is possible to prevent sudden changes in the desired position and the desired speed from affecting the stability of the motor drive system.

[0143] Based on the above embodiments, Figure 6 The motor drive system 2 also includes: a position sensor 29 and a numerical conversion unit 30.

[0144] The position sensor 29 is used to obtain the rotation scale parameter of the motor 24 at the current moment.

[0145] The numerical conversion unit 30 is used to determine the rotation speed parameter of the motor 24 at the current moment according to the rotation scale parameter; perform unit conversion on the rotation scale parameter and the rotation speed parameter to obtain the actual position parameter and the actual speed parameter of the motor at the current moment, wherein the unit of the actual position parameter is the same as that of the expected position parameter, and the unit of the actual speed parameter is the same as that of the expected speed parameter.

[0146] Specifically, since the controller 21 needs to obtain the actual speed parameter and the actual position parameter at the current moment, the state observer 22 needs to obtain the actual position parameter at the current moment. In order to reduce the amount of data processing of the controller 21 and the state observer 22, the embodiment is set to obtain the actual speed parameter and the actual position parameter through the position sensor 29 and the numerical conversion unit 30, wherein the position sensor 29 and the numerical conversion unit 30 can be understood as a position measurement unit. In the embodiment, the control frequency of the position sensor 29 and the numerical conversion unit 30 is set to be equal to the control frequency of the controller 21.

[0147] The specific model of the position sensor 29 is not limited in the embodiment. For example, the position sensor 29 is a photoelectric encoder. The position sensor 29 is connected to the motor 24 and can read the rotation scale parameter of the motor 24 at the current moment. The rotation scale parameter can also be understood as the scale corresponding to the current rotation angle of the motor 24. Afterwards, the position sensor 29 sends the rotation scale parameter to the numerical conversion unit 30. The rotation scale parameter is transmitted in the form of an electrical signal.

[0148] The numerical conversion unit 30 stores the rotation scale parameter sent by the position sensor 29 at the last moment. After that, the numerical conversion unit 30 subtracts the rotation scale parameter obtained at the current moment from the rotation scale parameter obtained at the last moment to obtain the rotation scale change parameter. After that, the numerical conversion unit 29 determines the duty cycle according to the control frequency, and divides the rotation scale change parameter by the duty cycle to obtain the rotation speed parameter at the current moment.

[0149] Furthermore, since the rotation scale parameter and the rotation speed parameter are obtained based on the position sensor 29, the parameters collected by the position sensor 29 can be understood as scale parameters, which may be different from the units of the expected position parameters and the expected speed parameters issued by the control device 25. Therefore, in order to facilitate the processing of the controller 21, the numerical conversion unit 30 is required to perform unit conversion on the rotation scale parameter and the rotation speed parameter so that the units of the converted rotation scale parameter and the rotation speed parameter are the same as those of the expected position parameter and the expected speed parameter. It can be understood that the numerical conversion unit 30 pre-stores the unit conversion calculation rules to perform unit conversion through the unit conversion calculation rules. At this time, the converted rotation scale parameter is the actual position parameter at the current moment, and the converted rotation speed parameter is the actual speed parameter at the current moment. Afterwards, the numerical conversion unit 30 sends the actual position parameter and the actual speed parameter to the controller 21, and sends the actual position parameter to the state observer 22.

[0150] Optionally, the rotation scale parameters collected by the position sensor 29 are digital electrical signals, and the actual position parameters and actual speed parameters output by the numerical conversion unit 30 are analog electrical signals. In this case, the specific type and structure of the numerical conversion unit 30 can be set according to actual conditions. For example, the numerical conversion unit 30 is a programmable logic device or a digital / analog converter.

[0151] As described above, by providing a numerical conversion unit and a position sensor in the motor drive system, it is possible to obtain an actual speed parameter and an actual position parameter having the same units as the expected speed parameter and the expected position parameter generated by the control device.

[0152] Based on the above embodiments, Figure 4 , the motor drive system also includes: a multiplication unit 31.

[0153] The multiplication unit 31 is used to multiply the first torque estimate value by the fourth proportional coefficient to obtain a multiplication result; when the addition unit 23 is used to add the first torque value and the first load torque estimate value to obtain a second torque value, specifically: the first torque value and the multiplication result are added to obtain the second torque value.

[0154] In actual applications, there are situations where the staff needs to adjust the compensation effect according to actual needs, that is, the situation where the size of the first torque estimation value is adjusted according to actual needs. Therefore, in the embodiment, a multiplication unit 31 is added to the motor drive system 2 to adjust the size of the first torque estimation value through the multiplication unit 31. The multiplication unit 31 can also be understood as a multiplier. Specifically, the first torque estimation value output by the state controller 22 first reaches the multiplication unit 31. A proportional coefficient is set in the multiplication unit 31. In the embodiment, the proportional coefficient is recorded as the fourth proportional coefficient. The fourth proportional coefficient can be set by the staff according to their own needs, generally between 0-1. The multiplication unit 31 multiplies the received first torque estimation value with the fourth proportional coefficient to adjust the size of the first torque estimation value through the fourth proportional coefficient. Afterwards, the multiplication unit 31 outputs the multiplication result of the fourth proportional coefficient and the first torque estimation value to the addition unit 23. Afterwards, the addition unit 23 adds the received multiplication result to the first torque value output by the controller 21 to obtain the final second torque value.

[0155] As mentioned above, by setting the multiplication unit, the function of adjusting the compensation effect can be achieved, thereby making the compensation effect of the motor drive system more in line with the actual requirements of the user.

[0156] The present application also provides a motor driving method, which is executed by the motor driving system. Specifically, Figure 7 A flow chart of a motor driving method provided in an embodiment of the present application. Figure 7, the motor driving method specifically includes:

[0157] Step 110: The controller obtains the expected position parameter, expected speed parameter, actual position parameter, and actual speed parameter of the motor at the current moment.

[0158] Step 120: The controller determines a first torque value of the driving motor at the current moment according to the expected position parameter, the expected speed parameter, the actual position parameter, and the actual speed parameter.

[0159] Step 130: The state observer obtains the actual position parameters of the motor at the current moment.

[0160] Step 140: The state observer determines a first torque estimation value for compensating for a load force at a current moment according to the actual position parameter, and the load is driven by the motor.

[0161] Step 150: An adding unit adds the first torque value and the first torque estimation value to obtain a second torque value.

[0162] Step 160: The adding unit outputs the second torque value to drive the motor to operate by the second torque value at the current moment.

[0163] It is understandable that step 110 - step 120 and step 130 - step 140 may be executed simultaneously, and the embodiment does not limit the specific execution order.

[0164] In the above, the controller obtains the expected position parameter, expected speed parameter, actual position parameter and actual speed parameter of the motor at the current moment to calculate the first torque value of the driving motor, and the state observer obtains the actual position parameter at the current moment to observe the first torque estimation value of the load torque, and then the addition unit adds the first torque value and the first torque estimation value to obtain the second torque value for the final driving motor operation, and outputs the second torque value to drive the motor operation. The technical means can solve the technical problem in the prior art that the actual position of the motor and the expected position are deviated due to the generation of load torque, thereby reducing the accuracy of movement. By setting a state observer inside the system, the load torque is adaptively estimated, and the load torque compensation is realized, without creating a dynamic model, the load torque compensation can be realized faster and better, thereby improving the stability of the system.

[0165] Based on the above embodiment, step 140 specifically includes:

[0166] The state observer subtracts the actual position parameter from the first observed position parameter to obtain a position deviation parameter at the current moment, wherein the first observed position parameter is the observed position of the motor estimated by the state observer at the previous moment; the state observer calculates a first torque estimation value for compensating for the load force at the current moment based on the position deviation parameter and the second torque estimation value, wherein the second torque estimation value is the torque estimation value for compensating for the load force calculated by the state observer at the previous moment.

[0167] On the basis of the above embodiment, the motor driving method also includes: the state observer obtains the electromagnetic torque value of the motor at the current moment; the state observer obtains the first observed speed parameter of the motor at the current moment according to the electromagnetic torque value, the first torque estimation value, the position deviation parameter and the second observed speed parameter estimated at the previous moment; the state observer obtains the second observed position parameter according to the second observed speed parameter, the first observed speed parameter and the first observed position parameter, and the second observed position parameter is the motor observed position estimated at the current moment.

[0168] Based on the above embodiment, the calculation formula of the first observation speed parameter is:

[0169] Omega(k)=(K1*(Error*freq-0.5*(Omega(k)-Omega(k-1)))+K2*Error+TrqComp(k)+Te+B) / J+Omega(k-1)

[0170] Among them, Omega(k) is the first observed speed parameter, Omega(k-1) is the second observed speed parameter, Error is the position deviation parameter at the current moment, freq is the iteration frequency of the state observer, TrqComp(k) is the first torque estimation value, Te is the electromagnetic torque value at the current moment, B is the motor friction coefficient, J is the motor moment of inertia, K1 is the first proportional coefficient, and K2 is the second proportional coefficient.

[0171] Based on the above embodiment, the calculation formula of the second observation position parameter is:

[0172] Thetaob(k)=0.5*(Omega(k)-Omega(k-1))+Thetaob(k-1)

[0173] Among them, Thetaob(k) is the second observation position parameter, Omega(k) is the first observation speed parameter, Omega(k-1) is the second observation speed parameter, and Thetaob(k-1) is the first observation position parameter.

[0174] On the basis of the above embodiment, before step 130, it also includes: the electromagnetic torque acquisition unit acquires the current value of the motor at the current moment; the electromagnetic torque acquisition unit multiplies the current value with the electromagnetic torque coefficient to obtain the electromagnetic torque value at the current moment.

[0175] Based on the above embodiment, the calculation formula of the first torque estimation value is:

[0176] TrqComp(k)=K3*Error+TrqComp(k-1)

[0177] Among them, TrqComp(k) is the first torque estimation value, TrqComp(k-1) is the second torque estimation value, Error is the position deviation parameter at the current moment, and K3 is the third proportional coefficient.

[0178] On the basis of the above embodiment, before step 110, it also includes: a parameter smoothing unit obtains a first expected position parameter of the motor and a first expected speed parameter of the motor currently output by the control device; the parameter smoothing unit determines a position change parameter according to a second expected position parameter of the motor and the first expected position parameter of the motor outputted by the control device last time, and determines a speed change parameter according to a second expected speed parameter of the motor and the first expected speed parameter outputted by the control device last time; the parameter smoothing unit calculates a proportional parameter of the control frequency between the control device and the controller; the parameter smoothing unit divides the position change parameter and the speed change parameter according to the proportional parameter to obtain a plurality of position periodic changes and a plurality of speed periodic changes respectively; the parameter smoothing unit determines an expected position parameter at a current moment according to the position periodic change and the expected position parameter at a previous moment, and determines an expected speed parameter at a current moment according to the speed periodic change and the expected speed parameter at a previous moment.

[0179] On the basis of the above embodiment, before step 110, it also includes: the position sensor obtains the rotation scale parameter of the motor at the current moment; the numerical conversion unit determines the rotation speed parameter of the motor at the current moment according to the rotation scale parameter; the numerical conversion unit performs unit conversion on the rotation scale parameter and the rotation speed parameter to obtain the actual position parameter and actual speed parameter of the motor at the current moment, the actual position parameter has the same unit as the expected position parameter, and the actual speed parameter has the same unit as the expected speed parameter.

[0180] Based on the above embodiment, before step 160, the method further includes: the multiplication unit multiplies the first torque estimation value by a fourth proportional coefficient to obtain a multiplication result. Accordingly, step 160 includes: the addition unit adds the first torque value and the multiplication result to obtain a second torque value.

[0181] The motor driving method provided in the embodiment of the present application can be executed by the above motor driving system, and has corresponding functions and beneficial effects. Specific technical means not described in the motor driving method can refer to the relevant technical means described in the motor driving system.

[0182] The embodiment of the present application further provides an intelligent mechanical device, which includes the above-mentioned motor drive system, a motor and a load, and the motor drive system drives the motor to run, and the motor drives the load to move.

[0183] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0184] Note that the above are only preferred embodiments of the present application and the technical principles used. Those skilled in the art will understand that the present application is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present application. Therefore, although the present application is described in more detail through the above embodiments, the present application is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present application, and the scope of the present application is determined by the scope of the appended claims.

Claims

1. A motor drive system, It is characterized in that include: Controller, state observer and summing unit; The controller is used to obtain the expected position parameter, expected speed parameter, actual position parameter and actual speed parameter of the motor at the current moment; Determine a first torque value of the driving motor at the current moment according to the expected position parameter, the expected speed parameter, the actual position parameter and the actual speed parameter; The state observer is used to obtain the actual position parameters of the motor at the current moment; determining a first torque estimation value for compensating for a load force at a current moment according to the actual position parameter, the load being driven by the motor; The adding unit is used for adding the first torque value and the first torque estimation value to obtain a second torque value; Outputting the second torque value to drive the motor to operate by the second torque value at the current moment; Wherein, when the state observer is used to determine the first torque estimation value for compensating the load force at the current moment according to the actual position parameter, specifically: Subtracting the actual position parameter from the first observed position parameter to obtain a position deviation parameter at the current moment, wherein the first observed position parameter is the motor observed position estimated by the state observer at the previous moment; Calculating a first torque estimation value for compensating for load force at the current moment according to the position deviation parameter and the second torque estimation value, wherein the second torque estimation value is a torque estimation value for compensating for load force calculated by the state observer at the previous moment; Wherein, the state observer is also used for: Obtaining the electromagnetic torque value of the motor at the current moment; Obtaining a first observed speed parameter of the motor at a current moment according to the electromagnetic torque value, the first torque estimation value, the position deviation parameter and the second observed speed parameter estimated at a previous moment; A second observed position parameter is obtained according to the second observed speed parameter, the first observed speed parameter and the first observed position parameter, where the second observed position parameter is the motor observed position estimated at the current moment.

2. The motor drive system according to claim 1, It is characterized in that The calculation formula of the first observation velocity parameter is: Omega(k)=(K1*(Error*freq-0.5*(Omega(k)-Omega(k-1)))+K2*Error+TrqCom p(k)+Te+B) / J+Omega(k-1) Among them, Omega(k) is the first observed speed parameter, Omega(k-1) is the second observed speed parameter, Error is the position deviation parameter at the current moment, freq is the iteration frequency of the state observer, TrqComp(k) is the first torque estimation value, Te is the electromagnetic torque value at the current moment, B is the motor friction coefficient, J is the motor moment of inertia, K1 is the first proportional coefficient, and K2 is the second proportional coefficient.

3. The motor drive system according to claim 1, It is characterized in that The calculation formula of the second observation position parameter is: Thetaob(k)=0.5*(Omega(k)-Omega(k-1))+Thetaob(k-1) Among them, Thetaob(k) is the second observation position parameter, Omega(k) is the first observation speed parameter, Omega(k-1) is the second observation speed parameter, and Thetaob(k-1) is the first observation position parameter.

4. The motor drive system according to claim 1, It is characterized in that Also includes: Electromagnetic torque acquisition unit, The electromagnetic torque acquisition unit is used to acquire the current value of the motor at the current moment; The current value is multiplied by the electromagnetic torque coefficient to obtain the electromagnetic torque value at the current moment.

5. The motor drive system according to claim 1, It is characterized in that The calculation formula of the first torque estimation value is: TrqComp(k)=K3*Error+TrqComp(k-1) Among them, TrqComp(k) is the first torque estimation value, TrqComp(k-1) is the second torque estimation value, Error is the position deviation parameter at the current moment, and K3 is the third proportional coefficient.

6. The motor drive system according to claim 1, It is characterized in that Also includes: Parametric smoothing unit, The parameter smoothing unit is used to obtain the first expected position parameter of the motor and the first expected speed parameter of the motor currently output by the control device; The position change parameter is determined according to the second expected position parameter of the motor outputted by the control device last time and the first expected position parameter of the motor, and the speed change parameter is determined according to the second expected speed parameter of the motor outputted by the control device last time and the first expected speed parameter of the motor; the proportional parameter of the control frequency between the control device and the controller is calculated; the position change parameter and the speed change parameter are equally divided according to the proportional parameter to obtain a plurality of position periodic change amounts and a plurality of speed periodic change amounts respectively; the expected position parameter at the current moment is determined according to the position periodic change amount and the expected position parameter at the previous moment, and the expected speed parameter at the current moment is determined according to the speed periodic change amount and the expected speed parameter at the previous moment.

7. The motor drive system according to claim 1, It is characterized in that Also includes: Position sensor and value conversion unit; The position sensor is used to obtain the rotation scale parameters of the motor at the current moment; The numerical value conversion unit is used to determine the rotation speed parameter of the motor at the current moment according to the rotation scale parameter; The rotation scale parameter and the rotation speed parameter are converted into units to obtain an actual position parameter and an actual speed parameter of the motor at the current moment, wherein the actual position parameter has the same unit as the expected position parameter, and the actual speed parameter has the same unit as the expected speed parameter.

8. The motor drive system according to claim 1, It is characterized in that Also includes: Multiplication unit; The multiplication unit is used to multiply the first torque estimation value by a fourth proportional coefficient to obtain a multiplication result; When the adding unit is used to add the first torque value and the first torque estimation value to obtain the second torque value, specifically: The first torque value and the multiplication result are added to obtain a second torque value.

9. A motor driving method, It is characterized in that include: The controller obtains the expected position parameter, expected speed parameter, actual position parameter and actual speed parameter of the motor at the current moment; The controller determines a first torque value of the driving motor at the current moment according to the expected position parameter, the expected speed parameter, the actual position parameter and the actual speed parameter; The state observer obtains the actual position parameters of the motor at the current moment; The state observer determines a first torque estimation value for compensating for a load force at a current moment according to the actual position parameter, and the load is driven by the motor; An adding unit adds the first torque value and the first torque estimation value to obtain a second torque value; The adding unit outputs the second torque value, so as to drive the motor to operate by the second torque value at the current moment; The state observer determines the first torque estimation value for compensating the load force at the current moment according to the actual position parameter, including: The state observer obtains a position deviation parameter at the current moment by subtracting the actual position parameter from a first observed position parameter, wherein the first observed position parameter is an observed position of the motor estimated by the state observer at the previous moment; The state observer calculates a first torque estimation value for compensating the load force at the current moment according to the position deviation parameter and the second torque estimation value, and the second torque estimation value is the torque estimation value for compensating the load force calculated by the state observer at the previous moment; Among them, it also includes: The state observer obtains the electromagnetic torque value of the motor at the current moment; The state observer obtains a first observed speed parameter of the motor at the current moment according to the electromagnetic torque value, the first torque estimation value, the position deviation parameter and the second observed speed parameter estimated at the previous moment; The state observer obtains a second observed position parameter according to the second observed speed parameter, the first observed speed parameter and the first observed position parameter, where the second observed position parameter is the motor observed position estimated at the current moment.

10. The motor driving method according to claim 9, It is characterized in that The calculation formula of the first observation velocity parameter is: Omega(k)=(K1*(Error*freq-0.5*(Omega(k)-Omega(k-1)))+K2*Error+TrqCom p(k)+Te+B) / J+Omega(k-1) Among them, Omega(k) is the first observed speed parameter, Omega(k-1) is the second observed speed parameter, Error is the position deviation parameter at the current moment, freq is the iteration frequency of the state observer, TrqComp(k) is the first torque estimation value, Te is the electromagnetic torque value at the current moment, B is the motor friction coefficient, J is the motor moment of inertia, K1 is the first proportional coefficient, and K2 is the second proportional coefficient.

11. The motor driving method according to claim 9, It is characterized in that The calculation formula of the second observation position parameter is: Thetaob(k)=0.5*(Omega(k)-Omega(k-1))+Thetaob(k-1) Among them, Thetaob(k) is the second observation position parameter, Omega(k) is the first observation speed parameter, Omega(k-1) is the second observation speed parameter, and Thetaob(k-1) is the first observation position parameter.

12. The motor driving method according to claim 9, It is characterized in that Before the state observer obtains the electromagnetic torque value of the motor at the current moment, it also includes: The electromagnetic torque acquisition unit acquires the current value of the motor at the current moment; The electromagnetic torque acquisition unit multiplies the current value by the electromagnetic torque coefficient to obtain the electromagnetic torque value at a current moment.

13. The motor driving method according to claim 9, It is characterized in that The calculation formula of the first torque estimation value is: TrqComp(k)=K3*Error+TrqComp(k-1) Among them, TrqComp(k) is the first torque estimation value, TrqComp(k-1) is the second torque estimation value, Error is the position deviation parameter at the current moment, and K3 is the third proportional coefficient.

14. The motor driving method according to claim 9, It is characterized in that Before the controller obtains the expected position parameter, expected speed parameter, actual position parameter and actual speed parameter of the motor at the current moment, the controller further includes: The parameter smoothing unit obtains the first expected position parameter of the motor and the first expected speed parameter of the motor currently output by the control device; The parameter smoothing unit determines a position change parameter according to a second desired position parameter of the motor outputted last time by the control device and the first desired position parameter of the motor, and determines a speed change parameter according to a second desired speed parameter of the motor outputted last time by the control device and the first desired speed parameter; The parameter smoothing unit calculates a proportional parameter of the control frequency between the control device and the controller; The parameter smoothing unit evenly divides the position change parameter and the speed change parameter according to the proportional parameter to obtain a plurality of position periodic change amounts and a plurality of speed periodic change amounts respectively; The parameter smoothing unit determines the expected position parameter at the current moment according to the position periodic variation and the expected position parameter at the previous moment, and determines the expected speed parameter at the current moment according to the speed periodic variation and the expected speed parameter at the previous moment.

15. The motor driving method according to claim 9, It is characterized in that Before the controller obtains the expected position parameter, expected speed parameter, actual position parameter and actual speed parameter of the motor at the current moment, the controller further includes: The position sensor obtains the rotation scale parameters of the motor at the current moment; The numerical conversion unit determines the rotation speed parameter of the motor at the current moment according to the rotation scale parameter; The numerical conversion unit performs unit conversion on the rotation scale parameter and the rotation speed parameter to obtain the actual position parameter and the actual speed parameter of the motor at the current moment, wherein the actual position parameter has the same unit as the expected position parameter, and the actual speed parameter has the same unit as the expected speed parameter.

16. The motor driving method according to claim 9, It is characterized in that Before the adding unit adds the first torque value and the first torque estimation value, the method further includes: The multiplication unit multiplies the first torque estimation value by a fourth proportional coefficient to obtain a multiplication result; The adding unit adds the first torque value and the first torque estimation value to obtain a second torque value, including: The adding unit adds the first torque value and the multiplication result to obtain a second torque value.